divamgupta / stable-diffusion-tensorflow

Stable Diffusion in TensorFlow / Keras
Other
1.57k stars 227 forks source link

Support --batch parameter #29

Open SivanMehta opened 1 year ago

SivanMehta commented 1 year ago

This PR allows passing the --batch parameter on the command line so that more than one image can be generated at once. By default, this is set to 1 to replicate existing functionality when this parameter is not provided.

When using batched generation, output is updated to indicate each file that is generated:

$ python text2image.py --prompt="nothing" --output="test.png" --batch=4

# generator output

saved at test-1.png
saved at test-2.png
saved at test-3.png
saved at test-4.png

I am very open to updated the design of the output if you think that something else would work better.

SivanMehta commented 1 year ago

I think that #13 would implement this entirely, feel free to close this if that one is merged.