clamp colormatch output

This commit is contained in:
kijai 2024-05-06 22:08:56 +03:00
parent 07ba67864a
commit 24f27c5b82

View File

@ -104,7 +104,10 @@ https://github.com/hahnec/color-matcher/
print(f"Error occurred during transfer: {e}") print(f"Error occurred during transfer: {e}")
break break
out.append(torch.from_numpy(image_result)) 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: class SaveImageWithAlpha:
def __init__(self): def __init__(self):