Spaces:
Runtime error
Runtime error
Update video_diffusion/inpaint_zoom/zoom_in_app.py
Browse files9 unmodified lines101112131415161716 unmodified lines343536373839409 unmodified linesif torch.cuda.is_available():device = torch.device("cuda")else:device = torch.device("cpu")os.environ["CUDA_VISIBLE_DEVICES"] = "0"16 unmodified linesdef load_model(self, model_id):if self.pipe is None:self.pipe = DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16, revision="fp16")self.pipe.scheduler = DPMSolverMultistepScheduler.from_config(self.pipe.scheduler.config)self.pipe = self.pipe.to(device)self.pipe.safety_checker = dummy9 unmodified lines1011121314151617181916 unmodified lines363738394041429 unmodified linesif torch.cuda.is_available():device = torch.device("cuda")dtype = torch.float16else:device = torch.device("cpu")dtype= torch.HalfTensoros.environ["CUDA_VISIBLE_DEVICES"] = "0"16 unmodified linesdef load_model(self, model_id):if self.pipe is None:self.pipe = DiffusionPipeline.from_pretrained(model_id, torch_dtype=dtype, revision="fp16")self.pipe.scheduler = DPMSolverMultistepScheduler.from_config(self.pipe.scheduler.config)self.pipe = self.pipe.to(device)self.pipe.safety_checker = dummy
video_diffusion/inpaint_zoom/zoom_in_app.py+3-1