mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-05-26 08:57:26 +08:00
default pyav build doesn't support float16 exr
This commit is contained in:
parent
29653e7fcc
commit
34d7a5da73
@ -171,8 +171,9 @@ class SaveImageAdvanced(IO.ComfyNode):
|
|||||||
av_fmt = 'gbrapf32le' if has_alpha else 'gbrpf32le'
|
av_fmt = 'gbrapf32le' if has_alpha else 'gbrpf32le'
|
||||||
elif bit_depth == "16-bit":
|
elif bit_depth == "16-bit":
|
||||||
if file_format == "exr":
|
if file_format == "exr":
|
||||||
img_np = img_tensor.cpu().numpy().astype(np.float16)
|
# default pyav build doesn't come with a codec for float16 exr format
|
||||||
av_fmt = 'gbrapf16le' if has_alpha else 'gbrpf16le'
|
img_np = img_tensor.cpu().numpy().astype(np.float32)
|
||||||
|
av_fmt = 'gbrapf32le' if has_alpha else 'gbrpf32le'
|
||||||
else:
|
else:
|
||||||
img_np = (img_tensor * 65535.0).clamp(0, 65535).to(torch.int32).cpu().numpy().astype(np.uint16)
|
img_np = (img_tensor * 65535.0).clamp(0, 65535).to(torch.int32).cpu().numpy().astype(np.uint16)
|
||||||
av_fmt = 'rgba64le' if has_alpha else 'rgb48le'
|
av_fmt = 'rgba64le' if has_alpha else 'rgb48le'
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user