EmanHassan26 commited on
Commit
49d0d6d
·
verified ·
1 Parent(s): 9c17756

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -36,9 +36,9 @@ pipe_depth = StableDiffusionControlNetPipeline.from_pretrained(
36
  "runwayml/stable-diffusion-v1-5", controlnet=controlnet_depth, torch_dtype=torch.float16).to("cuda")
37
 
38
  # Load a quick, highly accurate MiDaS model pipeline via torch hub
39
- #midas = torch.hub.load("intel-isl/MiDaS", "MiDaS_small").to(device).eval()
40
- #midas_transforms = torch.hub.load("intel-isl/MiDaS", "transforms")
41
- #transform_depth = midas_transforms.flag_transform if hasattr(midas_transforms, 'flag_transform') else midas_transforms.dpt_transform
42
 
43
 
44
  @spaces.GPU
 
36
  "runwayml/stable-diffusion-v1-5", controlnet=controlnet_depth, torch_dtype=torch.float16).to("cuda")
37
 
38
  # Load a quick, highly accurate MiDaS model pipeline via torch hub
39
+ midas = torch.hub.load("intel-isl/MiDaS", "MiDaS_small").to(device).eval()
40
+ midas_transforms = torch.hub.load("intel-isl/MiDaS", "transforms")
41
+ transform_depth = midas_transforms.flag_transform if hasattr(midas_transforms, 'flag_transform') else midas_transforms.dpt_transform
42
 
43
 
44
  @spaces.GPU