Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Colorization + ControlNet #27

Open
tg-bomze opened this issue Apr 17, 2023 · 3 comments
Open

[WIP] Colorization + ControlNet #27

tg-bomze opened this issue Apr 17, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@tg-bomze
Copy link

Hello, we have been trying (at neural.love) to train the colorization model based on the ControlNet architecture.

The model was trained on different LR's on the manually collected b&w-colorful image pares dataset.

Any recommendations regarding the training process are highly appreciated.

Current model problems:

  • adding colored spots to a homogeneous surface
  • coloring an object in a color that it cannot actually be

It is still heavily work-in-progress, but it could already (sometimes) colorize quite well, which is why we decided to share it. I have created a pull request here, and here are some results of the first version:
01
02
03
04
05
06
07
08

@lllyasviel lllyasviel added the enhancement New feature or request label May 10, 2023
@rensortino
Copy link

Hi, really nice results, I am training ControlNet (with SD2.1) on images from COCO and noticed similar issues. In particular, here is what I found:

  • The model often oversaturates the colors, even if most of the results seem realistic
  • Sometimes it produces some totally random colors, in particular with food images for some reason (fluo green bread or bright purple coffee)
  • Colors sometimes "leak" into adjacent areas
  • People are often colored with cold tones, which gives them sort of a "dead" look

Despite this, the overall quality is still incredible and these artifacts are understandable in the end, as it is a generative model and it is basically "inventing" the colors.

I was thinking of customizing the text prompt used in training using the color tonality of the image, e.g., extracting the overall tonality of the image (cold, warm, bright, dark) and embedding this information in the prompt. If this gives some improvements, I will post in this discussion

@crisz94
Copy link

crisz94 commented Mar 7, 2024

@rensortino @tg-bomze Hey guys, I am also working on gray image colorization with sd + controlnet. But I'm wondering how to set the prompts during training? In ColorizeNet(https://github.com/rensortino/ColorizeNet), the author used 10 prompts (basically all variants of “colorize this image”) and randomly provide them during training along with the gray image. Do you guys have any other suggestions? Any advices will be appriciated! Thanks!

@geroldmeisinger
Copy link

geroldmeisinger commented Mar 7, 2024

how to set the prompts during training?

  1. use a image dataset which has good prompts (laion, gcc etc.)
  2. convert color image to grayscale
  3. train on grayscale with prompts from image dataset

could not be easier :)
i don't think you want an instruction-based model(?). a simple prompt describing the image should suffice.

i made something similar here: https://huggingface.co/GeroldMeisinger/controlnet-channels (colorization from missing RGB channel). btw there are already some colorization controlnet in CN 1.1 and the first colorization CN ever here https://civitai.com/models/80549/color-based-picture-control-controlnet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants