Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -306,33 +306,33 @@ def compose(prompt, version, guidance_scale, steps):
|
|
306 |
model_up.to(device)
|
307 |
return compose_language_descriptions(prompt, guidance_scale, steps)
|
308 |
elif version == 'Stable_Diffusion_1v_4':
|
|
|
309 |
model.to(cpu)
|
310 |
model_up.to(cpu)
|
311 |
-
clevr_model.to(cpu)
|
312 |
pipe.to(device)
|
313 |
return stable_diffusion_compose(prompt, guidance_scale, steps)
|
314 |
else:
|
|
|
315 |
model.to(cpu)
|
316 |
model_up.to(cpu)
|
317 |
-
pipe.to(cpu)
|
318 |
clevr_model.to(device)
|
319 |
return compose_clevr_objects(prompt, guidance_scale, steps)
|
320 |
|
321 |
|
322 |
examples_1 = 'a camel | a forest'
|
323 |
-
examples_2 = 'A
|
324 |
examples_3 = '0.1, 0.5 | 0.3, 0.5 | 0.5, 0.5 | 0.7, 0.5 | 0.9, 0.5'
|
325 |
-
examples_4 = '
|
326 |
-
examples_5 = 'a white church
|
327 |
-
examples_6 = 'a
|
328 |
-
examples_7 = '
|
329 |
examples = [
|
330 |
-
[examples_7, 'Stable_Diffusion_1v_4',
|
331 |
-
[
|
332 |
-
[
|
333 |
-
[examples_6, 'Stable_Diffusion_1v_4',
|
334 |
-
[examples_1, 'GLIDE',
|
335 |
-
[examples_2, 'GLIDE',
|
336 |
[examples_3, 'CLEVR Objects', 10, 100]
|
337 |
]
|
338 |
|
|
|
306 |
model_up.to(device)
|
307 |
return compose_language_descriptions(prompt, guidance_scale, steps)
|
308 |
elif version == 'Stable_Diffusion_1v_4':
|
309 |
+
clevr_model.to(cpu)
|
310 |
model.to(cpu)
|
311 |
model_up.to(cpu)
|
|
|
312 |
pipe.to(device)
|
313 |
return stable_diffusion_compose(prompt, guidance_scale, steps)
|
314 |
else:
|
315 |
+
pipe.to(cpu)
|
316 |
model.to(cpu)
|
317 |
model_up.to(cpu)
|
|
|
318 |
clevr_model.to(device)
|
319 |
return compose_clevr_objects(prompt, guidance_scale, steps)
|
320 |
|
321 |
|
322 |
examples_1 = 'a camel | a forest'
|
323 |
+
examples_2 = 'A blue sky | A mountain in the horizon | Cherry Blossoms in front of the mountain'
|
324 |
examples_3 = '0.1, 0.5 | 0.3, 0.5 | 0.5, 0.5 | 0.7, 0.5 | 0.9, 0.5'
|
325 |
+
examples_4 = 'red trees | a blue house'
|
326 |
+
examples_5 = 'a white church | lightning in the background'
|
327 |
+
examples_6 = 'a camel | arctic'
|
328 |
+
examples_7 = 'A lake | A mountain | Cherry Blossoms next to the lake'
|
329 |
examples = [
|
330 |
+
[examples_7, 'Stable_Diffusion_1v_4', 15, 50],
|
331 |
+
[examples_5, 'Stable_Diffusion_1v_4', 15, 50],
|
332 |
+
[examples_4, 'Stable_Diffusion_1v_4', 20, 50],
|
333 |
+
[examples_6, 'Stable_Diffusion_1v_4', 15, 50],
|
334 |
+
[examples_1, 'GLIDE', 15, 100],
|
335 |
+
[examples_2, 'GLIDE', 15, 100],
|
336 |
[examples_3, 'CLEVR Objects', 10, 100]
|
337 |
]
|
338 |
|