Comfy-Org/ComfyUI · error · ValueError
SeedVR2PostProcessing: unknown color_correction_method {colo
Error message
SeedVR2PostProcessing: unknown color_correction_method {color_correction_method!r} What it means
SeedVR2PostProcessing dispatches on the color_correction_method string: 'lab', 'wavelet', 'adain', and 'none' are implemented. Any other value falls into the final else and raises this error naming the unknown method. It is a strict enum check — there is no silent default.
Source
Thrown at comfy_extras/nodes_seedvr.py:213
target_w = min(decoded_5d.shape[3], reference_w)
decoded_5d = decoded_5d[:, :, :target_h, :target_w, :]
if color_correction_method in ("lab", "wavelet", "adain"):
reference_5d = reference_full[:b, :t, :, :, :]
reference_5d = cls._resize_reference(reference_5d, target_h, target_w)
output_device = decoded_5d.device
decoded_raw = cls._to_seedvr2_raw(decoded_5d)
reference_raw = cls._to_seedvr2_raw(reference_5d)
decoded_flat = decoded_raw.permute(0, 1, 4, 2, 3).reshape(b * t, decoded_raw.shape[4], target_h, target_w)
reference_flat = reference_raw.permute(0, 1, 4, 2, 3).reshape(b * t, reference_raw.shape[4], target_h, target_w)
output = cls._color_transfer_chunked(
decoded_flat, reference_flat, output_device, color_correction_method,
)
output = output.reshape(b, t, output.shape[1], output.shape[2], output.shape[3]).permute(0, 1, 3, 4, 2)
output = output.add(1.0).div(2.0).clamp(0.0, 1.0)
elif color_correction_method == "none":
output = decoded_5d
else:
raise ValueError(f"SeedVR2PostProcessing: unknown color_correction_method {color_correction_method!r}")
if alpha_input is not None:
alpha_5d, _ = cls._as_bthwc(alpha_input)
alpha_5d = alpha_5d[:output.shape[0], :output.shape[1], :output.shape[2], :output.shape[3], :]
output = torch.cat([output, alpha_5d.to(dtype=output.dtype, device=output.device)], dim=-1)
h2 = output.shape[-3] - (output.shape[-3] % 2)
w2 = output.shape[-2] - (output.shape[-2] % 2)
output = output[:, :, :h2, :w2, :]
if decoded_was_4d:
output = output.reshape(-1, output.shape[-3], output.shape[-2], output.shape[-1])
return io.NodeOutput(output)
@staticmethod
def _as_bthwc(images):
if images.ndim == 4:
return images.unsqueeze(0), True
if images.ndim == 5:
return images, FalseView on GitHub (pinned to 1c6d8d45b3)
Solutions
- Set color_correction_method to one of: 'lab', 'wavelet', 'adain', 'none'.
- Check the workflow JSON for stale values (case-sensitive, no surrounding whitespace) and re-save from the UI.
- If a custom frontend supplies the value, validate it against the allowed set before queueing the prompt.
Example fix
# before
{"color_correction_method": "LAB"}
# after
{"color_correction_method": "lab"} Defensive patterns
Strategy: validation
Validate before calling
ALLOWED = {'lab', 'wavelet', 'adain', 'none'}
if color_correction_method not in ALLOWED:
raise ValueError(f'invalid color_correction_method {color_correction_method!r}; use one of {sorted(ALLOWED)}') Type guard
def is_valid_color_method(v) -> bool:
return isinstance(v, str) and v in {'lab', 'wavelet', 'adain', 'none'} Prevention
- Build prompts with values copied from the node's combo list, not typed from memory.
- Re-save hand-edited workflows in the UI to normalize enums.
- Validate enum inputs at the API boundary before queueing.
When it happens
Trigger: Supplying color_correction_method='LAB' (wrong case), 'none '/typo, or a new method name not in {lab, wavelet, adain, none} to SeedVR2PostProcessing, e.g. via a serialized workflow JSON or an API call that bypasses the combo widget.
Common situations: Hand-edited workflow JSON with a stale or misspelled enum; a frontend/custom node passing its own method names; version skew where a method was renamed or removed between ComfyUI versions.
Related errors
- SeedVR2TemporalChunk: chunking_mode must be 'auto' or 'manua
- Unknown context_schedule '{context_schedule}'.
- Unknown fuse_method '{fuse_method}'.
- {cls.__name__} does not have a NONE member to map None to
- Invalid {cls.__name__} string: '{value}'. Valid values are:
AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14).
Data as JSON: /api/errors/6bbb831a612e7acd.
Report an issue: GitHub.