Skip to content

Commit 631a8c9

Browse files
committed
bugfix, boost now runs on cpu
1 parent 27e5b97 commit 631a8c9

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

README.md

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

99
## Changelog
10+
* v0.2.8 bugfix
11+
* boost now also able to run on cpu
1012
* v0.2.7 separate tab
1113
* Depth Tab now available for stand-alone (batch) processing
1214
* v0.2.6 ui layout and settings

scripts/depthmap.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151

5252
whole_size_threshold = 1600 # R_max from the paper
5353
pix2pixsize = 1024
54-
scriptname = "DepthMap v0.2.7"
54+
scriptname = "DepthMap v0.2.8"
5555

5656
class Script(scripts.Script):
5757
def title(self):
@@ -205,6 +205,8 @@ def run_depthmap(processed, outpath, inputimages, inputnames, compute_device, mo
205205
if not os.path.exists(pix2pixmodel_path):
206206
download_file(pix2pixmodel_path,"https://sfu.ca/~yagiz/CVPR21/latest_net_G.pth")
207207
opt = MyTestOptions().parse()
208+
if compute_device == 1:
209+
opt.gpu_ids = [] # cpu mode
208210
pix2pixmodel = Pix2Pix4DepthModel(opt)
209211
pix2pixmodel.save_dir = './models/pix2pix'
210212
pix2pixmodel.load_networks('latest')

0 commit comments

Comments
 (0)