basujindal / stable-diffusion

Optimized Stable Diffusion modified to run on lower GPU VRAM
Other
3.14k stars 467 forks source link

txt2img_gradio.py starts gradio gui but does not take params #211

Open danieldaugherty opened 1 year ago

danieldaugherty commented 1 year ago

Hi,

I'm playing around with this lib on Ubuntu 22.04.1, and when I try to generate images from the CLI using the scripts (I tried txt2img_gradio & img2img_gradio), all that happens is the corresponding gradio GUI launches. No parameters are used.

Example

$ python optimizedSD/txt2img_gradio.py --n_samples 2 --n_iter 2 --plms --ddim_steps 200 --full_precision --prompt "cartoon of man driving car animated tv show sitcom"
Loading model from models/ldm/stable-diffusion-v1/model.ckpt
Global Step: 470000
UNet: Running in eps-prediction mode
CondStage: Running in eps-prediction mode
FirstStage: Running in eps-prediction mode
making attention of type 'vanilla' with 512 in_channels
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
making attention of type 'vanilla' with 512 in_channels
/home/daniel/miniconda3/envs/ldm/lib/python3.8/site-packages/gradio/utils.py:54: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
  if StrictVersion(latest_pkg_version) > StrictVersion(current_pkg_version):
/home/daniel/miniconda3/envs/ldm/lib/python3.8/site-packages/gradio/utils.py:54: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
  if StrictVersion(latest_pkg_version) > StrictVersion(current_pkg_version):
Running on local URL:  http://127.0.0.1:7861

To create a public link, set `share=True` in `launch()`.

Am I doing something wrong?

Thanks in advance.

ForceConstant commented 1 year ago

I had a similar question, but yes it seems that that text2img_gradio doesn't take arguments like optimized_text2img does. So am not sure how to specify arguments when using gradio. Did you find out yet?

basujindal commented 1 year ago

Hi, sorry for the late reply; the gradio interface does not take any inputs while launching as all the options are available in the gradio GUI. Thanks!