Skip to content

Commit 1a64c6a

Browse files
committed
Bump version
Also do not needlessly unload models in standalone mode.
1 parent a87f446 commit 1a64c6a

File tree

5 files changed

+18
-16
lines changed

5 files changed

+18
-16
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ video by [@graemeniedermayer](https://github.com/graemeniedermayer), more exampl
2121
images generated by [@semjon00](https://github.com/semjon00) from CC0 photos, more examples [here](https://github.com/thygate/stable-diffusion-webui-depthmap-script/pull/56#issuecomment-1367596463).
2222

2323
## Changelog
24+
* v0.4.1 standalone mode
25+
* ability to run DepthMap without WebUI (Use main.py. Make sure all the dependencies are installed. The support is not feature-complete.)
2426
* v0.4.0 large code refactor
2527
* UI improvements
2628
* improved Batch from Directory, Clip and renormalize DepthMap

scripts/depthmap.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,6 @@
1010
from src.misc import *
1111

1212

13-
# Ugly workaround to fix gradio tempfile issue
14-
def ensure_gradio_temp_directory():
15-
try:
16-
import tempfile
17-
path = os.path.join(tempfile.gettempdir(), 'gradio')
18-
if not (os.path.exists(path)):
19-
os.mkdir(path)
20-
except Exception as e:
21-
traceback.print_exc()
22-
23-
24-
ensure_gradio_temp_directory()
25-
26-
2713
class Script(scripts.Script):
2814
def title(self):
2915
return SCRIPT_NAME

src/common_ui.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,20 @@
1010
from src.misc import *
1111

1212

13+
# Ugly workaround to fix gradio tempfile issue
14+
def ensure_gradio_temp_directory():
15+
try:
16+
import tempfile
17+
path = os.path.join(tempfile.gettempdir(), 'gradio')
18+
if not (os.path.exists(path)):
19+
os.mkdir(path)
20+
except Exception as e:
21+
traceback.print_exc()
22+
23+
24+
ensure_gradio_temp_directory()
25+
26+
1327
def main_ui_panel(is_depth_tab):
1428
inp = GradioComponentBundle()
1529
# TODO: Greater visual separation

src/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ def core_generation_funnel(outpath, inputimages, inputdepthmaps, inputnames, inp
294294
else:
295295
raise e
296296
finally:
297-
if backbone.get_opt('depthmap_script_keepmodels', False):
297+
if backbone.get_opt('depthmap_script_keepmodels', True):
298298
model_holder.offload() # Swap to CPU memory
299299
else:
300300
if 'model' in locals():

src/misc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def get_commit_hash():
1616

1717

1818
SCRIPT_NAME = "DepthMap"
19-
SCRIPT_VERSION = "v0.4.0"
19+
SCRIPT_VERSION = "v0.4.1"
2020
SCRIPT_FULL_NAME = f"{SCRIPT_NAME} {SCRIPT_VERSION} ({get_commit_hash()})"
2121

2222

0 commit comments

Comments
 (0)