czl commited on
Commit
3da643f
1 Parent(s): 8ffeacd

update xformers param

Browse files
Files changed (1) hide show
  1. 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
- pipe.enable_xformers_memory_efficient_attention()
 
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