fffiloni commited on
Commit
a8a4d72
·
1 Parent(s): 695f2ee

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -12,7 +12,7 @@ pipe.enable_model_cpu_offload()
12
  pipe.to("cuda")
13
  pipe_xl = DiffusionPipeline.from_pretrained("cerspense/zeroscope_v2_XL", torch_dtype=torch.float16, revision="refs/pr/17")
14
  pipe_xl.vae.enable_slicing()
15
- pipe_xl.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
16
  pipe_xl.enable_model_cpu_offload()
17
  pipe_xl.to("cpu")
18
 
@@ -25,7 +25,7 @@ def infer(prompt):
25
  print(video_path)
26
 
27
  video = [Image.fromarray(frame).resize((1024, 576)) for frame in video_frames]
28
- del pipe
29
  #pipe_xl.to("cuda")
30
  video_frames = pipe_xl(prompt, video=video, strength=0.6).frames
31
  video_path = export_to_video(video_frames, output_video_path="xl_result.mp4")
 
12
  pipe.to("cuda")
13
  pipe_xl = DiffusionPipeline.from_pretrained("cerspense/zeroscope_v2_XL", torch_dtype=torch.float16, revision="refs/pr/17")
14
  pipe_xl.vae.enable_slicing()
15
+ pipe_xl.scheduler = DPMSolverMultistepScheduler.from_config(pipe_xl.scheduler.config)
16
  pipe_xl.enable_model_cpu_offload()
17
  pipe_xl.to("cpu")
18
 
 
25
  print(video_path)
26
 
27
  video = [Image.fromarray(frame).resize((1024, 576)) for frame in video_frames]
28
+ #del pipe
29
  #pipe_xl.to("cuda")
30
  video_frames = pipe_xl(prompt, video=video, strength=0.6).frames
31
  video_path = export_to_video(video_frames, output_video_path="xl_result.mp4")