Spaces:
Running
on
Zero
Running
on
Zero
Commit
•
f54a55a
1
Parent(s):
c6dfa2b
Update app.py
Browse files
app.py
CHANGED
@@ -22,11 +22,12 @@ taef1 = AutoencoderTiny.from_pretrained("madebyollin/taef1", torch_dtype=torch.b
|
|
22 |
pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-schnell",
|
23 |
vae=taef1,
|
24 |
torch_dtype=torch.bfloat16)
|
|
|
|
|
|
|
25 |
#pipe.enable_model_cpu_offload()
|
26 |
clip_slider = CLIPSliderFlux(pipe, device=torch.device("cuda"))
|
27 |
|
28 |
-
clip_slider.transformer.to(memory_format=torch.channels_last)
|
29 |
-
clip_slider.transformer = torch.compile(clip_slider.unet, mode="max-autotune", fullgraph=True)
|
30 |
|
31 |
base_model = 'black-forest-labs/FLUX.1-schnell'
|
32 |
controlnet_model = 'InstantX/FLUX.1-dev-Controlnet-Canny-alpha'
|
|
|
22 |
pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-schnell",
|
23 |
vae=taef1,
|
24 |
torch_dtype=torch.bfloat16)
|
25 |
+
|
26 |
+
pipe.transformer.to(memory_format=torch.channels_last)
|
27 |
+
pipe.transformer = torch.compile(pipe.transformer, mode="max-autotune", fullgraph=True)
|
28 |
#pipe.enable_model_cpu_offload()
|
29 |
clip_slider = CLIPSliderFlux(pipe, device=torch.device("cuda"))
|
30 |
|
|
|
|
|
31 |
|
32 |
base_model = 'black-forest-labs/FLUX.1-schnell'
|
33 |
controlnet_model = 'InstantX/FLUX.1-dev-Controlnet-Canny-alpha'
|