mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-04-20 03:13:30 +00:00
Lower PNG compression for more speed.
After some quick tests compress_level=4 seems to give the best compression performance ratio for stable diffusion images. It's 10x faster than max compression for an image size increase of only 2.5%.
This commit is contained in:
parent
8a3d2067af
commit
cc127eeabd
2
nodes.py
2
nodes.py
@ -779,7 +779,7 @@ class SaveImage:
|
|||||||
metadata.add_text(x, json.dumps(extra_pnginfo[x]))
|
metadata.add_text(x, json.dumps(extra_pnginfo[x]))
|
||||||
|
|
||||||
file = f"{filename}_{counter:05}_.png"
|
file = f"{filename}_{counter:05}_.png"
|
||||||
img.save(os.path.join(full_output_folder, file), pnginfo=metadata, optimize=True)
|
img.save(os.path.join(full_output_folder, file), pnginfo=metadata, compress_level=4)
|
||||||
results.append({
|
results.append({
|
||||||
"filename": file,
|
"filename": file,
|
||||||
"subfolder": subfolder,
|
"subfolder": subfolder,
|
||||||
|
Loading…
Reference in New Issue
Block a user