asahi417 commited on
Commit
a5bdaaa
·
verified ·
1 Parent(s): 7810d79

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,10 +1,10 @@
1
  import gradio as gr
2
- import os
3
  from diffusers.utils import load_image
4
  import spaces
 
5
  from panna import Depth2Image, DepthAnythingV2
6
 
7
- model_image = Depth2Image("stabilityai/stable-diffusion-2-depth")
8
  model_depth = DepthAnythingV2("depth-anything/Depth-Anything-V2-Large-hf")
9
  title = ("# [Depth2Image](https://huggingface.co/stabilityai/stable-diffusion-2-depth) with [DepthAnythingV2](https://huggingface.co/depth-anything/Depth-Anything-V2-Large-hf)\n"
10
  "Depth2Image with depth map predicted by DepthAnything V2. The demo is part of [panna](https://github.com/abacws-abacus/panna) project.")
 
1
  import gradio as gr
 
2
  from diffusers.utils import load_image
3
  import spaces
4
+ import torch
5
  from panna import Depth2Image, DepthAnythingV2
6
 
7
+ model_image = Depth2Image("stabilityai/stable-diffusion-2-depth", torch_dtype=torch.float32)
8
  model_depth = DepthAnythingV2("depth-anything/Depth-Anything-V2-Large-hf")
9
  title = ("# [Depth2Image](https://huggingface.co/stabilityai/stable-diffusion-2-depth) with [DepthAnythingV2](https://huggingface.co/depth-anything/Depth-Anything-V2-Large-hf)\n"
10
  "Depth2Image with depth map predicted by DepthAnything V2. The demo is part of [panna](https://github.com/abacws-abacus/panna) project.")