stable_diffusion.openvino icon indicating copy to clipboard operation
stable_diffusion.openvino copied to clipboard

How to output two separate files??

Open Zoranvedek opened this issue 3 years ago • 2 comments

Here's what I'm trying to do:

--init-image "white_noise_1.png" --prompt "white noise" --output "white_noise_1.png" --output "ani__001.png" --num-inference-steps 4

...it should be fairly obvious, but what I'm looking to achieve is using an initial image, write over the initial image, and output a second file with the incremental change, pull in the new initial image, wash rinse repeat, effectively giving me an animated sequence of incremental steps. So one image will get written over and reloaded each time it runs, while still saving incremental changes.

...using "--output" twice isn't working, and I don't know enough about the syntax involved in order to get it to work otherwise--honestly, I'm not sure if it will work. Any help is appreciated, but speak slowly and use small words.

Zoranvedek avatar Oct 21 '22 06:10 Zoranvedek

Can you try to write a (shell-script-)loop to increment the "num-inference-step"?

Start with --num-inference-steps 1 and write to a file --output "white_noise_1.png" Then --num-inference-steps 2 and write to a file --output "white_noise_2.png" then --num-inference-steps 3 and write to a file --output "white_noise_3.png"

and so on?

Currently multiple "--output" parameters are not supported. Do you want to try working out a PullRequest (PR)?

brmarkus avatar Oct 21 '22 09:10 brmarkus

I went ahead and wrote a prompt list where I feed the previous file into the next:

python V:\Stable_diffusion_openvino\stable_diffusion.openvino\demo.py --init-image "white_noise_1.png" --prompt "white noise " --output "ani__001.png" --num-inference-steps 2

python V:\Stable_diffusion_openvino\stable_diffusion.openvino\demo.py --init-image "ani__001.png" --prompt "white noise" --output "ani__002.png" --num-inference-steps 2

...and so on. I've got 96 frames this way, and can easily run it again, and again, and again, but after about 96 frames it's already gone about as far as it will go. I was just wanting to animate the process step by step, and I'm already there.

Zoranvedek avatar Oct 21 '22 10:10 Zoranvedek