mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-08-08 05:12:35 +00:00
fix grid overwriting bug
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -6,3 +6,5 @@ __pycache__
|
|||||||
/model.ckpt
|
/model.ckpt
|
||||||
/GFPGANv1.3.pth
|
/GFPGANv1.3.pth
|
||||||
/ui-config.json
|
/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])
|
filecount = len([x for x in os.listdir(path) if os.path.splitext(x)[1] == '.' + extension])
|
||||||
fullfn = "a.png"
|
fullfn = "a.png"
|
||||||
fullfn_without_extension = "a"
|
fullfn_without_extension = "a"
|
||||||
for i in range(100):
|
for i in range(500):
|
||||||
fn = f"{filecount:05}" if basename == '' else f"{basename}-{filecount:04}"
|
fn = f"{filecount+i:05}" if basename == '' else f"{basename}-{filecount+i:04}"
|
||||||
fullfn = os.path.join(path, f"{fn}{file_decoration}.{extension}")
|
fullfn = os.path.join(path, f"{fn}{file_decoration}.{extension}")
|
||||||
fullfn_without_extension = os.path.join(path, f"{fn}{file_decoration}")
|
fullfn_without_extension = os.path.join(path, f"{fn}{file_decoration}")
|
||||||
if not os.path.exists(fullfn):
|
if not os.path.exists(fullfn):
|
||||||
|
Reference in New Issue
Block a user