lllyasviel / ControlNet-v1-1-nightly

Nightly release of ControlNet 1.1
4.68k stars 371 forks source link

[WIP] Colorization + ControlNet #27

Open tg-bomze opened 1 year ago

tg-bomze commented 1 year ago

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:

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

rensortino commented 1 year ago

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:

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 commented 6 months ago

@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 commented 6 months ago

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