Nikhil0987 commited on
Commit
b1c944d
1 Parent(s): b3d2770

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -16,7 +16,10 @@ if st.button("Generate Video"):
16
  st.warning("Please upgrade 'accelerate' to version 0.17.0 or higher for CPU offloading.")
17
  else:
18
  with st.spinner("Generating video..."):
19
- pipe = DiffusionPipeline.from_pretrained("damo-vilab/text-to-video-ms-1.7b", torch_dtype=torch.float16, variant="fp16")
 
 
 
20
  pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
21
  pipe.enable_model_cpu_offload() # Assuming 'accelerate' is updated
22
 
 
16
  st.warning("Please upgrade 'accelerate' to version 0.17.0 or higher for CPU offloading.")
17
  else:
18
  with st.spinner("Generating video..."):
19
+ pipe = DiffusionPipeline.from_pretrained("damo-vilab/text-to-video-ms-1.7b",
20
+ torch_dtype=torch.float16,
21
+ variant="fp16",
22
+ device="cpu") # Force CPU usage
23
  pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
24
  pipe.enable_model_cpu_offload() # Assuming 'accelerate' is updated
25