Compare commits

...

7 Commits

Author SHA1 Message Date
Yousef R. Gamaleldin
0e3c8c07c3
remvoe linear and raw from avif
Co-authored-by: Alexis Rolland <alexisrolland@hotmail.com>
2026-04-30 15:12:02 +03:00
Yousef R. Gamaleldin
f10bb1e780
remove srgb from exr
Co-authored-by: Alexis Rolland <alexisrolland@hotmail.com>
2026-04-30 15:08:19 +03:00
Yousef Rafat
59075cf255 display_name 2026-04-30 15:02:26 +03:00
Yousef Rafat
15f993a036 remove 12-bit 2026-04-30 14:58:18 +03:00
Yousef R. Gamaleldin
e996b817cd
Update comfy_extras/nodes_convert_color_space.py
Co-authored-by: Alexis Rolland <alexisrolland@hotmail.com>
2026-04-30 14:57:41 +03:00
Yousef R. Gamaleldin
632771d988
remove download
Co-authored-by: Alexis Rolland <alexisrolland@hotmail.com>
2026-04-30 14:53:47 +03:00
Yousef Rafat
87514354a5 ... 2026-04-30 11:43:53 +03:00
2 changed files with 9 additions and 13 deletions

View File

@ -38,7 +38,8 @@ class ConvertColorSpace(IO.ComfyNode):
@classmethod
def define_schema(cls):
return IO.Schema(
node_id="Convert Color Space",
node_id="ConvertColorSpace",
display_name="Convert Color Space",
category="image/color",
inputs=[
IO.Image.Input("images"),
@ -71,7 +72,7 @@ class ConvertColorSpace(IO.ComfyNode):
elif source_color_space == "HDR Display (PQ/Rec.2020)":
# assuming Linear Rec.2020 input. Convert to Linear Rec.709
matrix = M_2020_to_709.to(device)
matrix = M_2020_to_709.to(device=device, dtype=rgb.dtype)
rgb = pq_to_linear(rgb)
rgb = torch.matmul(rgb, matrix.T)
@ -87,7 +88,7 @@ class ConvertColorSpace(IO.ComfyNode):
elif target_color_space == "HDR Display (PQ/Rec.2020)":
# convert Gamut from Linear Rec.709 to Linear Rec.2020
rgb = torch.matmul(rgb, M_709_to_2020.to(device).T).clamp(min=0)
rgb = torch.matmul(rgb, M_709_to_2020.to(device=device, dtype=rgb.dtype).T).clamp(min=0)
rgb = linear_to_pq(rgb)
img_tensor = torch.cat([rgb, alpha], dim=-1) if has_alpha else rgb

View File

@ -943,7 +943,7 @@ class SaveImageAdvanced(IO.ComfyNode):
def define_schema(cls):
return IO.Schema(
node_id="SaveImageAdvanced",
search_aliases=["save", "save image", "export image", "output image", "write image", "download"],
search_aliases=["save", "save image", "export image", "output image", "write image"],
display_name="Save Image",
description="Saves the input images to your ComfyUI output directory.",
category="image",
@ -989,7 +989,7 @@ class SaveImageAdvanced(IO.ComfyNode):
),
IO.Combo.Input(
"interpret_as",
options=["sRGB", "Linear", "Raw/Data"],
options=["sRGB"],
default="sRGB",
advanced=True,
),
@ -1006,7 +1006,7 @@ class SaveImageAdvanced(IO.ComfyNode):
),
IO.Combo.Input(
"interpret_as",
options=["sRGB", "Linear", "Raw/Data"],
options=["Linear", "Raw/Data"],
default="Linear",
advanced=True,
),
@ -1068,16 +1068,11 @@ class SaveImageAdvanced(IO.ComfyNode):
stream.pix_fmt = av_fmt
elif file_format == "avif":
try:
stream = container.add_stream('libsvtav1', rate=1)
except Exception:
stream = container.add_stream('av1', rate=1)
stream = container.add_stream('libsvtav1', rate=1)
stream.time_base = Fraction(1, 1)
if bit_depth == "12-bit":
stream.pix_fmt = 'yuv420p12le'
elif bit_depth in ["10-bit", "16-bit", "32-bit"]:
if bit_depth in ["10-bit", "16-bit", "32-bit"]:
stream.pix_fmt = 'yuv420p10le'
else:
stream.pix_fmt = 'yuv420p'