Spaces:
Runtime error
Runtime error
Commit
•
9a7ba21
1
Parent(s):
79e393a
Update app.py
Browse files
app.py
CHANGED
@@ -21,6 +21,8 @@ pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)
|
|
21 |
# need to explicitly call pipe.to("cuda").
|
22 |
pipe.enable_model_cpu_offload()
|
23 |
|
|
|
|
|
24 |
# Generator seed,
|
25 |
generator = torch.manual_seed(0)
|
26 |
|
@@ -41,7 +43,8 @@ def generate_images(image, prompt):
|
|
41 |
prompt,
|
42 |
canny_image,
|
43 |
generator=generator,
|
44 |
-
num_images_per_prompt=3
|
|
|
45 |
)
|
46 |
all_outputs = []
|
47 |
all_outputs.append(canny_image)
|
|
|
21 |
# need to explicitly call pipe.to("cuda").
|
22 |
pipe.enable_model_cpu_offload()
|
23 |
|
24 |
+
pipe.enable_xformers_memory_efficient_attention()
|
25 |
+
|
26 |
# Generator seed,
|
27 |
generator = torch.manual_seed(0)
|
28 |
|
|
|
43 |
prompt,
|
44 |
canny_image,
|
45 |
generator=generator,
|
46 |
+
num_images_per_prompt=3,
|
47 |
+
num_inference_steps=20,
|
48 |
)
|
49 |
all_outputs = []
|
50 |
all_outputs.append(canny_image)
|