Upload folder using huggingface_hub
Browse files
app.py
CHANGED
@@ -4,12 +4,12 @@ from diffusers import DiffusionPipeline, DPMSolverMultistepScheduler
|
|
4 |
from diffusers.utils import export_to_video
|
5 |
|
6 |
# Отключение CUDA (GPU)
|
7 |
-
torch.device('cuda')
|
8 |
|
9 |
def generate_video(prompt):
|
10 |
# load pipeline
|
11 |
-
pipe = DiffusionPipeline.from_pretrained("damo-vilab/text-to-video-ms-1.7b", torch_dtype=torch.float16, variant="fp16")
|
12 |
-
pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
|
13 |
|
14 |
# optimize for GPU memory
|
15 |
pipe.enable_model_cpu_offload()
|
|
|
4 |
from diffusers.utils import export_to_video
|
5 |
|
6 |
# Отключение CUDA (GPU)
|
7 |
+
#torch.device('cuda')
|
8 |
|
9 |
def generate_video(prompt):
|
10 |
# load pipeline
|
11 |
+
pipe = DiffusionPipeline.from_pretrained("damo-vilab/text-to-video-ms-1.7b", torch_dtype=torch.float16, variant="fp16") #.device
|
12 |
+
pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
|
13 |
|
14 |
# optimize for GPU memory
|
15 |
pipe.enable_model_cpu_offload()
|