multimodalart HF staff commited on
Commit
f06d299
1 Parent(s): 1f94fad

experiment with quantization

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -24,6 +24,9 @@ snapshot_download(repo_id="AlexWortega/RIFE", local_dir="model_rife")
24
  pipe = CogVideoXPipeline.from_pretrained("THUDM/CogVideoX-5b", torch_dtype=torch.bfloat16).to(device)
25
  pipe.scheduler = CogVideoXDDIMScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing")
26
 
 
 
 
27
  os.makedirs("./output", exist_ok=True)
28
  os.makedirs("./gradio_tmp", exist_ok=True)
29
 
 
24
  pipe = CogVideoXPipeline.from_pretrained("THUDM/CogVideoX-5b", torch_dtype=torch.bfloat16).to(device)
25
  pipe.scheduler = CogVideoXDDIMScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing")
26
 
27
+ pipe.transformer.to(memory_format=torch.channels_last)
28
+ pipe.transformer = torch.compile(pipe.transformer, mode="max-autotune", fullgraph=True)
29
+
30
  os.makedirs("./output", exist_ok=True)
31
  os.makedirs("./gradio_tmp", exist_ok=True)
32