Spaces:
Runtime error
Runtime error
Commit
·
60c555f
1
Parent(s):
338945b
revert to latentdiffusion model, parameter tweaks
Browse files
app.py
CHANGED
@@ -14,7 +14,7 @@ from huggingface_hub import snapshot_download
|
|
14 |
|
15 |
with warnings.catch_warnings():
|
16 |
warnings.simplefilter('ignore')
|
17 |
-
image_gen = gr.Interface.load("spaces/multimodalart/
|
18 |
|
19 |
os.system("git clone https://github.com/google-research/frame-interpolation")
|
20 |
sys.path.append("frame-interpolation")
|
@@ -38,9 +38,10 @@ def generate_story(choice, input_text):
|
|
38 |
return generated_text
|
39 |
|
40 |
|
41 |
-
def generate_images(text, steps=
|
|
|
42 |
|
43 |
-
image_bytes = image_gen(text, steps,
|
44 |
|
45 |
# Algo from spaces/Gradio-Blocks/latent_gpt2_story/blob/main/app.py
|
46 |
generated_images = []
|
@@ -68,7 +69,6 @@ def generate_interpolation(text, fps=5):
|
|
68 |
mediapy.write_video("out.mp4", vid, fps=fps)
|
69 |
return "out.mp4"
|
70 |
|
71 |
-
|
72 |
demo = gr.Blocks()
|
73 |
|
74 |
with demo:
|
|
|
14 |
|
15 |
with warnings.catch_warnings():
|
16 |
warnings.simplefilter('ignore')
|
17 |
+
image_gen = gr.Interface.load("spaces/multimodalart/latentdiffusion")
|
18 |
|
19 |
os.system("git clone https://github.com/google-research/frame-interpolation")
|
20 |
sys.path.append("frame-interpolation")
|
|
|
38 |
return generated_text
|
39 |
|
40 |
|
41 |
+
def generate_images(text, width=256, height=256, steps=50, num_images=2,
|
42 |
+
diversity=3):
|
43 |
|
44 |
+
image_bytes = image_gen(text, steps, width, height, num_images, diversity)
|
45 |
|
46 |
# Algo from spaces/Gradio-Blocks/latent_gpt2_story/blob/main/app.py
|
47 |
generated_images = []
|
|
|
69 |
mediapy.write_video("out.mp4", vid, fps=fps)
|
70 |
return "out.mp4"
|
71 |
|
|
|
72 |
demo = gr.Blocks()
|
73 |
|
74 |
with demo:
|