MoonRide303 / Fooocus-MRE

Focus on prompting and generating
GNU General Public License v3.0
954 stars 56 forks source link

A black and white image as input, always output a black and white image #122

Closed skywolf123 closed 1 year ago

skywolf123 commented 1 year ago

A black and white image as input, using the prompt words "a bunch of flowers in a glass vase", regardless of the adjustment of Start Step and Denoise, will output a black and white image, even if I add the prompt words "color photograph" 背景 拷贝

MoonRide303 commented 1 year ago

@skywolf123 Seems to be working fine for me (tested in MRE v2.0.78.2):

input: image

output: image

You can also enable CN to keep shape closer to the original, for example like this: image

And one more good option could be disabling Image-2-Image (to avoid generation being influenced by colors from the input image), and using input only to guide CNs. When you disable Image-2-Image you need to set proper resolution (as it's no longer inherited from Input), which would be "776x1336" in this case, and then you can just rely on CNs guiding generation, like this: image

skywolf123 commented 1 year ago

@MoonRide303 Thank you for your reply. I hadn't tried such an extreme parameter (start step 0, denoise 1) before, and yes, it did produce a color image when I tried it. I have tried parameters like (start step 0.1, denoise 0.9) and (start step 0.06, denoise 0.94) that still produce a black and white image. It seems that the color of the input Image has a very large effect on the image-2-image function. What I'm confused about is that the example is also a black and white image but with the default parameters or less extreme parameters you can produce a color image

image

MoonRide303 commented 1 year ago

@skywolf123 Yes, the model managed to add a bit of colors in this case, but in general img2img is heavilly influenced by pixel colors from the input - but that's the whole idea of it, to be influenced by pixels from input image :). If you go with higher denoise (up to the max: start step 0, denoise 1) you'll increase chance of something different than input to be generated, but there is no single fixed denoising level that will always guarantee you to generate colors. For some combinations of prompt and seed model can generate BW image even in txt2img mode (even when not mentioning directly colors or bw), when not being influenced by any input image.

PS I am closing this issue, as there's nothing to be fixed here - it's just how diffusion models work.