adamirus commited on
Commit
3c022b7
·
1 Parent(s): f8f1c7b

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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").device
12
- pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config).device
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()