yaron123 commited on
Commit
0cd204f
·
1 Parent(s): 19e55d9
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -502,6 +502,9 @@ function custom(){
502
  # torch pipes
503
 
504
  image_pipe = FluxPipeline.from_pretrained(base, torch_dtype=torch.bfloat16).to(device)
 
 
 
505
 
506
  pegasus_tokenizer = PegasusTokenizerFast.from_pretrained("google/pegasus-xsum")
507
  pegasus_model = PegasusForConditionalGeneration.from_pretrained("google/pegasus-xsum")
 
502
  # torch pipes
503
 
504
  image_pipe = FluxPipeline.from_pretrained(base, torch_dtype=torch.bfloat16).to(device)
505
+ image_pipe.enable_model_cpu_offload()
506
+ image_pipe.enable_vae_slicing()
507
+ image_pipe.enable_vae_tiling()
508
 
509
  pegasus_tokenizer = PegasusTokenizerFast.from_pretrained("google/pegasus-xsum")
510
  pegasus_model = PegasusForConditionalGeneration.from_pretrained("google/pegasus-xsum")