Spaces:
Running
on
Zero
Running
on
Zero
update xformers param
Browse files- tools/synth.py +2 -1
tools/synth.py
CHANGED
@@ -169,7 +169,8 @@ def pipe_img(
|
|
169 |
cache_interval=cache_interval, cache_branch_id=cache_branch_id
|
170 |
) # lower is faster but lower quality
|
171 |
helper.enable()
|
172 |
-
|
|
|
173 |
if use_torchcompile:
|
174 |
pipe.unet = torch.compile(pipe.unet, mode="reduce-overhead", fullgraph=True)
|
175 |
return pipe
|
|
|
169 |
cache_interval=cache_interval, cache_branch_id=cache_branch_id
|
170 |
) # lower is faster but lower quality
|
171 |
helper.enable()
|
172 |
+
if torch.cuda.is_available():
|
173 |
+
pipe.enable_xformers_memory_efficient_attention()
|
174 |
if use_torchcompile:
|
175 |
pipe.unet = torch.compile(pipe.unet, mode="reduce-overhead", fullgraph=True)
|
176 |
return pipe
|