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

experiment with compilation (#1)

Browse files

- experiment with quantization (f06d2993bb713a1e723d89dd550d4d05e70a2301)


Co-authored-by: Apolinário from multimodal AI art <[email protected]>

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