Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
a70734a
1
Parent(s):
32e89fe
disabled fp8
Browse files
app.py
CHANGED
@@ -27,9 +27,9 @@ pipe = StableDiffusionXLControlNetTileSRPipeline.from_pretrained(
|
|
27 |
model_id, controlnet=controlnet, vae=vae, torch_dtype=torch.float16, use_safetensors=True, variant="fp16"
|
28 |
).to(device)
|
29 |
|
30 |
-
unet = UNet2DConditionModel.from_pretrained(model_id, subfolder="unet", variant="fp16", use_safetensors=True)
|
31 |
-
quantize_8bit(unet) # << Enable this if you have limited VRAM
|
32 |
-
pipe.unet = unet
|
33 |
|
34 |
pipe.enable_model_cpu_offload() # << Enable this if you have limited VRAM
|
35 |
pipe.enable_vae_tiling() # << Enable this if you have limited VRAM
|
|
|
27 |
model_id, controlnet=controlnet, vae=vae, torch_dtype=torch.float16, use_safetensors=True, variant="fp16"
|
28 |
).to(device)
|
29 |
|
30 |
+
# unet = UNet2DConditionModel.from_pretrained(model_id, subfolder="unet", variant="fp16", use_safetensors=True)
|
31 |
+
# quantize_8bit(unet) # << Enable this if you have limited VRAM
|
32 |
+
# pipe.unet = unet
|
33 |
|
34 |
pipe.enable_model_cpu_offload() # << Enable this if you have limited VRAM
|
35 |
pipe.enable_vae_tiling() # << Enable this if you have limited VRAM
|