提交 5e206571 编写于 作者: A AUTOMATIC

fix grid overwriting bug

上级 3f55d9a9
......@@ -6,3 +6,5 @@ __pycache__
/model.ckpt
/GFPGANv1.3.pth
/ui-config.json
/outputs
/config.json
......@@ -267,8 +267,8 @@ def save_image(image, path, basename, seed=None, prompt=None, extension='png', i
filecount = len([x for x in os.listdir(path) if os.path.splitext(x)[1] == '.' + extension])
fullfn = "a.png"
fullfn_without_extension = "a"
for i in range(100):
fn = f"{filecount:05}" if basename == '' else f"{basename}-{filecount:04}"
for i in range(500):
fn = f"{filecount+i:05}" if basename == '' else f"{basename}-{filecount+i:04}"
fullfn = os.path.join(path, f"{fn}{file_decoration}.{extension}")
fullfn_without_extension = os.path.join(path, f"{fn}{file_decoration}")
if not os.path.exists(fullfn):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册