Skip to content

Commit 3014f1a

Browse files
committed
bugfix: create 3dphoto model path
1 parent b0d436f commit 3014f1a

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ To generate realistic depth maps `from a single image`, this script uses code an
1111
[![screenshot](examples.png)](https://raw.githubusercontent.com/thygate/stable-diffusion-webui-depthmap-script/main/examples.png)
1212

1313
## Changelog
14+
* v0.3.5 bugfix
15+
* create path to 3dphoto models before download (see [issue](https://github.com/thygate/stable-diffusion-webui-depthmap-script/issues/76))
1416
* v0.3.4 new featues
1517
* depth clipping option (original idea by [@Extraltodeus](https://github.com/Extraltodeus))
1618
* by popular demand, 3D-Photo-Inpainting is now implemented

scripts/depthmap.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858

5959
whole_size_threshold = 1600 # R_max from the paper
6060
pix2pixsize = 1024
61-
scriptname = "DepthMap v0.3.4"
61+
scriptname = "DepthMap v0.3.5"
6262

6363
class Script(scripts.Script):
6464
def title(self):
@@ -502,6 +502,9 @@ def run_3dphoto(device, img_rgb, img_depth, inputnames, outpath, fnExt, vid_ssaa
502502
edgemodel_path = './models/3dphoto/edge_model.pth'
503503
depthmodel_path = './models/3dphoto/depth_model.pth'
504504
colormodel_path = './models/3dphoto/color_model.pth'
505+
# create paths to model if not present
506+
os.makedirs('./models/3dphoto/', exist_ok=True)
507+
505508
if not os.path.exists(edgemodel_path):
506509
download_file(edgemodel_path,"https://filebox.ece.vt.edu/~jbhuang/project/3DPhoto/model/edge-model.pth")
507510
if not os.path.exists(depthmodel_path):

0 commit comments

Comments
 (0)