Spaces:
Runtime error
Runtime error
cocktailpeanut
commited on
Commit
•
a7b3e4b
1
Parent(s):
ad2d8cc
xformers
Browse files
app.py
CHANGED
@@ -28,7 +28,8 @@ unet = UNet2DConditionModel.from_pretrained(model_id, subfolder="unet", revision
|
|
28 |
|
29 |
# pipe for TokenFlow
|
30 |
tokenflow_pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16).to(device)
|
31 |
-
|
|
|
32 |
|
33 |
def randomize_seed_fn():
|
34 |
seed = random.randint(0, np.iinfo(np.int32).max)
|
|
|
28 |
|
29 |
# pipe for TokenFlow
|
30 |
tokenflow_pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16).to(device)
|
31 |
+
if device == "cuda":
|
32 |
+
tokenflow_pipe.enable_xformers_memory_efficient_attention()
|
33 |
|
34 |
def randomize_seed_fn():
|
35 |
seed = random.randint(0, np.iinfo(np.int32).max)
|