stable-diffusion.cpp icon indicating copy to clipboard operation
stable-diffusion.cpp copied to clipboard

photo enhancer / color correction

Open magdesign opened this issue 8 months ago • 4 comments

how would i use this to color correct an existing photo ?

with:

build/bin/sd --mode img2img -m models/v2-1_768-ema-pruned.ckpt  -p "enhance colors" -i ~/Pictures/Lastenrad_01.jpg  -o ~/Pictures/Lastenrad_1made.png --strength 0.4

i get a complete new image... thanks for any example.of a correct prompt to enhance an existing image

magdesign avatar Mar 09 '25 16:03 magdesign

Lower strength values will give you a result that's closer to the original input image. Maybe using controlnets could also help you.

stduhpf avatar Mar 09 '25 16:03 stduhpf

thanks for the hint. so i tried again with

build/bin/sd --mode img2img -m models/v2-1_768-ema-pruned.ckpt  -p "enhance overall colors of the image" -i ~/Pictures/Lastenrad_01.jpg  -o ~/Pictures/Lastenrad_1light.png --strength 0.1

the original image:

Image

the 'corrected' result:

Image

it does not really fix any color or quality. do i have to change the prompt, or use another model?

magdesign avatar Mar 09 '25 17:03 magdesign

Yes, you should change the prompt. You need to use a prompt that describes the content of the image. Maybe the positive prompt could be something like "High quality picture of a cargo tricycle", and the negative prompt could be something like "low quality, muted colors".

A different model might give you better results, but no guarentee.

Also a controlnet could definitely help make it work with higher strength.

stduhpf avatar Mar 09 '25 17:03 stduhpf

I don't think Stable Diffusion is necessarily the best thing to use for color correction. It might be possible to do this, but that's not really what it's built for.

Tynach avatar Nov 08 '25 07:11 Tynach