leejet / stable-diffusion.cpp

Stable Diffusion in pure C/C++
MIT License
2.91k stars 233 forks source link

Support png image and resize image with 64 pixels in img2img mode #212

Closed delldu closed 3 months ago

delldu commented 3 months ago

1) Before modification

./build/bin/sd --mode img2img --model models/sdxl_turbo_q8_0.gguf -p "red shoes" -i images/shose.png --strength 0.75 --cfg-scale 1.8 --steps 10 -o output_img2img_sdxl.png

output error message

input image must be a 3 channels RGB image, but got 4 channels

2) After modification

./build/bin/sd --mode img2img --model models/sdxl_turbo_q8_0.gguf -p "red shoes" -i images/shose.png --strength 0.75 --cfg-scale 1.8 --steps 10 -o output_img2img_sdxl.png

Create output_img2img_sdxl OK.

leejet commented 3 months ago

Thank you for your contribution.