mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-01-10 18:05:16 +00:00
Prevent potential int overflow in SaveImage
This commit is contained in:
parent
44294a446e
commit
1f717903bc
2
nodes.py
2
nodes.py
@ -790,7 +790,7 @@ class SaveImage:
|
||||
paths = list()
|
||||
for image in images:
|
||||
i = 255. * image.cpu().numpy()
|
||||
img = Image.fromarray(i.astype(np.uint8))
|
||||
img = Image.fromarray(np.clip(i, 0, 255).astype(np.uint8))
|
||||
metadata = PngInfo()
|
||||
if prompt is not None:
|
||||
metadata.add_text("prompt", json.dumps(prompt))
|
||||
|
Loading…
Reference in New Issue
Block a user