Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -5,6 +5,7 @@ import spaces
|
|
5 |
import torch
|
6 |
import time
|
7 |
from diffusers import DiffusionPipeline, AutoencoderTiny
|
|
|
8 |
from custom_pipeline import FluxWithCFGPipeline
|
9 |
|
10 |
torch.backends.cuda.matmul.allow_tf32 = True
|
@@ -23,7 +24,7 @@ pipe = FluxWithCFGPipeline.from_pretrained(
|
|
23 |
)
|
24 |
pipe.vae = AutoencoderTiny.from_pretrained("madebyollin/taef1", torch_dtype=dtype)
|
25 |
pipe.to("cuda")
|
26 |
-
pipe.
|
27 |
|
28 |
torch.cuda.empty_cache()
|
29 |
|
|
|
5 |
import torch
|
6 |
import time
|
7 |
from diffusers import DiffusionPipeline, AutoencoderTiny
|
8 |
+
from diffusers.models.attention_processor import AttnProcessor2_0
|
9 |
from custom_pipeline import FluxWithCFGPipeline
|
10 |
|
11 |
torch.backends.cuda.matmul.allow_tf32 = True
|
|
|
24 |
)
|
25 |
pipe.vae = AutoencoderTiny.from_pretrained("madebyollin/taef1", torch_dtype=dtype)
|
26 |
pipe.to("cuda")
|
27 |
+
pipe.unet.set_attn_processor(AttnProcessor2_0())
|
28 |
|
29 |
torch.cuda.empty_cache()
|
30 |
|