From 24f27c5b8233bc3032c6021333fcf20c1c043efc Mon Sep 17 00:00:00 2001 From: kijai <40791699+kijai@users.noreply.github.com> Date: Mon, 6 May 2024 22:08:56 +0300 Subject: [PATCH] clamp colormatch output --- nodes/image_nodes.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nodes/image_nodes.py b/nodes/image_nodes.py index 4dec4d3..520773c 100644 --- a/nodes/image_nodes.py +++ b/nodes/image_nodes.py @@ -104,7 +104,10 @@ https://github.com/hahnec/color-matcher/ print(f"Error occurred during transfer: {e}") break out.append(torch.from_numpy(image_result)) - return (torch.stack(out, dim=0).to(torch.float32), ) + + out = torch.stack(out, dim=0).to(torch.float32) + out.clamp_(0, 1) + return (out,) class SaveImageWithAlpha: def __init__(self):