Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -30,6 +30,13 @@ pipeline = StableDiffusionControlNetPipeline.from_pretrained(base_model_id , con
|
|
30 |
# pipeline = StableDiffusionControlNetPipeline.from_pretrained(base_model_id , controlnet=controlnet, torch_dtype=torch.float16)
|
31 |
pipeline.scheduler = UniPCMultistepScheduler.from_config(pipeline.scheduler.config)
|
32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
pipeline = pipeline.to(device)
|
34 |
# torch.cuda.empty_cache()
|
35 |
|
|
|
30 |
# pipeline = StableDiffusionControlNetPipeline.from_pretrained(base_model_id , controlnet=controlnet, torch_dtype=torch.float16)
|
31 |
pipeline.scheduler = UniPCMultistepScheduler.from_config(pipeline.scheduler.config)
|
32 |
|
33 |
+
|
34 |
+
|
35 |
+
pipe.enable_xformers_memory_efficient_attention()
|
36 |
+
pipe.enable_model_cpu_offload()
|
37 |
+
pipe.enable_attention_slicing()
|
38 |
+
|
39 |
+
|
40 |
pipeline = pipeline.to(device)
|
41 |
# torch.cuda.empty_cache()
|
42 |
|