From 5648a89f9488759d3e60ce39ece12af52b6ba17e Mon Sep 17 00:00:00 2001 From: Yousef Rafat <81116377+yousef-rafat@users.noreply.github.com> Date: Wed, 29 Apr 2026 23:15:09 +0300 Subject: [PATCH] exr fix --- comfy_extras/nodes_images.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/comfy_extras/nodes_images.py b/comfy_extras/nodes_images.py index 56352b57b..de783e00c 100644 --- a/comfy_extras/nodes_images.py +++ b/comfy_extras/nodes_images.py @@ -1113,6 +1113,12 @@ class SaveImageAdvanced(IO.ComfyNode): stream.height = height stream.time_base = Fraction(1, 1) + is_planar = av_fmt.startswith('gbrp') or 'p' in av_fmt.split('rgba')[-1] + if is_planar: + if av_fmt.startswith('gbr'): + img_np = img_np[:, :, [1, 2, 0, 3]] if has_alpha else img_np[:, :, [1, 2, 0]] + img_np = img_np.transpose(2, 0, 1) + try: frame = av.VideoFrame.from_ndarray(img_np, format=av_fmt) except ValueError: