Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -14,8 +14,8 @@ def tune_video_predict(
|
|
14 |
num_inference_steps: int,
|
15 |
guidance_scale: float,
|
16 |
):
|
17 |
-
unet = UNet3DConditionModel.from_pretrained(
|
18 |
-
pipe = TuneAVideoPipeline.from_pretrained(
|
19 |
video = pipe(prompt, video_length=video_length, height=height, width=width, num_inference_steps=num_inference_steps, guidance_scale=guidance_scale).videos
|
20 |
output_path = save_videos_grid(video, save_path='output', path=f"{prompt}.gif")
|
21 |
return output_path
|
|
|
14 |
num_inference_steps: int,
|
15 |
guidance_scale: float,
|
16 |
):
|
17 |
+
unet = UNet3DConditionModel.from_pretrained("Tune-A-Video-library/a-man-is-surfing", subfolder='unet', torch_dtype=torch.float16).to('cuda')
|
18 |
+
pipe = TuneAVideoPipeline.from_pretrained(pipe_id, unet=unet, torch_dtype=torch.float16).to("cuda")
|
19 |
video = pipe(prompt, video_length=video_length, height=height, width=width, num_inference_steps=num_inference_steps, guidance_scale=guidance_scale).videos
|
20 |
output_path = save_videos_grid(video, save_path='output', path=f"{prompt}.gif")
|
21 |
return output_path
|