radames commited on
Commit
c4a002d
1 Parent(s): 37ccbbb

compile back

Browse files
Files changed (1) hide show
  1. app-img2img.py +3 -3
app-img2img.py CHANGED
@@ -76,9 +76,9 @@ pipe.unet.to(memory_format=torch.channels_last)
76
  if psutil.virtual_memory().total < 64 * 1024**3:
77
  pipe.enable_attention_slicing()
78
 
79
- # if not mps_available and not xpu_available:
80
- # pipe.unet = torch.compile(pipe.unet, mode="reduce-overhead", fullgraph=True)
81
- # pipe(prompt="warmup", image=[Image.new("RGB", (512, 512))])
82
 
83
  compel_proc = Compel(
84
  tokenizer=pipe.tokenizer,
 
76
  if psutil.virtual_memory().total < 64 * 1024**3:
77
  pipe.enable_attention_slicing()
78
 
79
+ if not mps_available and not xpu_available:
80
+ pipe.unet = torch.compile(pipe.unet, mode="reduce-overhead", fullgraph=True)
81
+ pipe(prompt="warmup", image=[Image.new("RGB", (512, 512))])
82
 
83
  compel_proc = Compel(
84
  tokenizer=pipe.tokenizer,