Spaces:
Runtime error
Runtime error
Ahsen Khaliq
commited on
Commit
·
35814d2
1
Parent(s):
18cbd98
Update app.py
Browse files
app.py
CHANGED
@@ -85,7 +85,7 @@ model_config.update({
|
|
85 |
'class_cond': False,
|
86 |
'diffusion_steps': 1000,
|
87 |
'rescale_timesteps': True,
|
88 |
-
'timestep_respacing': '
|
89 |
# timesteps.
|
90 |
'image_size': 256,
|
91 |
'learn_sigma': True,
|
@@ -217,6 +217,6 @@ def inference(text, init_image, skip_timesteps):
|
|
217 |
title = "CLIP Guided Diffusion HQ"
|
218 |
description = "Gradio demo for CLIP Guided Diffusion. To use it, simply add your text, or click one of the examples to load them. Read more at the links below."
|
219 |
article = "<p style='text-align: center'> By Katherine Crowson (https://github.com/crowsonkb, https://twitter.com/RiversHaveWings). It uses OpenAI's 256x256 unconditional ImageNet diffusion model (https://github.com/openai/guided-diffusion) together with CLIP (https://github.com/openai/CLIP) to connect text prompts with images. | <a href='https://colab.research.google.com/drive/12a_Wrfi2_gwwAuN3VvMTwVMz9TfqctNj' target='_blank'>Colab</a></p>"
|
220 |
-
iface = gr.Interface(inference, inputs=["text",gr.inputs.Image(type="file", label='initial image (optional)', optional=True),gr.inputs.Slider(minimum=0, maximum=
|
221 |
enable_queue=True)
|
222 |
iface.launch()
|
|
|
85 |
'class_cond': False,
|
86 |
'diffusion_steps': 1000,
|
87 |
'rescale_timesteps': True,
|
88 |
+
'timestep_respacing': '300', # Modify this value to decrease the number of
|
89 |
# timesteps.
|
90 |
'image_size': 256,
|
91 |
'learn_sigma': True,
|
|
|
217 |
title = "CLIP Guided Diffusion HQ"
|
218 |
description = "Gradio demo for CLIP Guided Diffusion. To use it, simply add your text, or click one of the examples to load them. Read more at the links below."
|
219 |
article = "<p style='text-align: center'> By Katherine Crowson (https://github.com/crowsonkb, https://twitter.com/RiversHaveWings). It uses OpenAI's 256x256 unconditional ImageNet diffusion model (https://github.com/openai/guided-diffusion) together with CLIP (https://github.com/openai/CLIP) to connect text prompts with images. | <a href='https://colab.research.google.com/drive/12a_Wrfi2_gwwAuN3VvMTwVMz9TfqctNj' target='_blank'>Colab</a></p>"
|
220 |
+
iface = gr.Interface(inference, inputs=["text",gr.inputs.Image(type="file", label='initial image (optional)', optional=True),gr.inputs.Slider(minimum=0, maximum=150, step=1, default=0, label="skip_timesteps")], outputs=["image","video"], title=title, description=description, article=article, examples=[["coral reef city by artistation artists"]],
|
221 |
enable_queue=True)
|
222 |
iface.launch()
|