KingNish commited on
Commit
41631fe
1 Parent(s): a140f0e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -20,6 +20,10 @@ pipe = FLUXPipelineWithIntermediateOutputs.from_pretrained(
20
  "black-forest-labs/FLUX.1-schnell", torch_dtype=dtype
21
  ).to("cuda")
22
  pipe.vae = AutoencoderTiny.from_pretrained("madebyollin/taef1", torch_dtype=torch.float16).to("cuda")
 
 
 
 
23
  torch.cuda.empty_cache()
24
 
25
  # Inference function
 
20
  "black-forest-labs/FLUX.1-schnell", torch_dtype=dtype
21
  ).to("cuda")
22
  pipe.vae = AutoencoderTiny.from_pretrained("madebyollin/taef1", torch_dtype=torch.float16).to("cuda")
23
+ pipe.transformer.to(memory_format=torch.channels_last)
24
+ pipe.transformer = torch.compile(
25
+ pipe.transformer, mode="max-autotune", fullgraph=True
26
+ )
27
  torch.cuda.empty_cache()
28
 
29
  # Inference function