"web/git@developer.sourcefind.cn:chenpangpang/ComfyUI.git" did not exist on "43ae9fe7216198ff044ea33ac6f6d21a9ca9c2af"
Commit 8a35c12e authored by m957ymj75urz's avatar m957ymj75urz
Browse files

compute %width% and %height% in filepath when saving

parent f5365c9c
......@@ -746,6 +746,13 @@ class SaveImage:
except:
digits = 0
return (digits, prefix)
def compute_vars(input):
input = input.replace("%width%", str(images[0].shape[1]))
input = input.replace("%height%", str(images[0].shape[0]))
return input
filename_prefix = compute_vars(filename_prefix)
subfolder = os.path.dirname(os.path.normpath(filename_prefix))
filename = os.path.basename(os.path.normpath(filename_prefix))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment