Update app.py
Browse files
app.py
CHANGED
|
@@ -36,8 +36,7 @@ except Exception as e:
|
|
| 36 |
|
| 37 |
# Load upscaler pipeline with optimizations
|
| 38 |
upscaler = StableDiffusionUpscalePipeline.from_pretrained("stabilityai/stable-diffusion-x4-upscaler", torch_dtype=dtype).to(device)
|
| 39 |
-
|
| 40 |
-
upscaler.enable_model_cpu_offload()
|
| 41 |
if hasattr(upscaler, "enable_attention_slicing"):
|
| 42 |
upscaler.enable_attention_slicing(1)
|
| 43 |
if hasattr(upscaler, "enable_vae_slicing"):
|
|
|
|
| 36 |
|
| 37 |
# Load upscaler pipeline with optimizations
|
| 38 |
upscaler = StableDiffusionUpscalePipeline.from_pretrained("stabilityai/stable-diffusion-x4-upscaler", torch_dtype=dtype).to(device)
|
| 39 |
+
|
|
|
|
| 40 |
if hasattr(upscaler, "enable_attention_slicing"):
|
| 41 |
upscaler.enable_attention_slicing(1)
|
| 42 |
if hasattr(upscaler, "enable_vae_slicing"):
|