Comfy-Org/ComfyUI · error · ValueError

pose_method='cam_dec' requires a camera decoder, but the loa

Error message

pose_method='cam_dec' requires a camera decoder, but the loaded model (head_type='{diffusion.head_type}') does not have one. Use pose_method='ray_pose' instead.

What it means

Depth-Anything-3 raises this when pose_method is set to 'cam_dec' but the loaded model's diffusion_model.cam_dec is None — i.e. the checkpoint has no camera-decoder module. Only the ray_pose method (DualDPT head) is available in that configuration.

Source

Thrown at comfy_extras/nodes_depth_anything_3.py:281

        # Capability checks for multi-view mode.
        diffusion = da3_model.model.diffusion_model
        pose_method = mode["pose_method"]
        ref_view_strategy = mode["ref_view_strategy"]

        has_cam_dec = diffusion.cam_dec is not None
        has_dualdpt = diffusion.head_type == "dualdpt"

        if not has_cam_dec and not has_dualdpt:
            raise ValueError(
                "multi-view mode requires Small or Base model. The loaded model "
                f"(head_type='{diffusion.head_type}') does not support cross-view "
                "attention or camera pose estimation. Switch mode to 'mono', or "
                "load Small or Base model for mult-view."
            )

        if pose_method == "cam_dec" and not has_cam_dec:
            raise ValueError(
                "pose_method='cam_dec' requires a camera decoder, but the loaded "
                f"model (head_type='{diffusion.head_type}') does not have one. "
                "Use pose_method='ray_pose' instead."
            )
        if pose_method == "ray_pose" and not has_dualdpt:
            raise ValueError(
                "pose_method='ray_pose' requires a DualDPT head, but the loaded "
                f"model has a '{diffusion.head_type}' head. "
                "Use pose_method='cam_dec' instead."
            )

        return cls._execute_multiview(
            da3_model, image, resolution, resize_method,
            ref_view_strategy, pose_method,
        )

    @classmethod
    def _execute_mono(cls, model, image, resolution, resize_method) -> io.NodeOutput:

View on GitHub (pinned to 1c6d8d45b3)

Solutions

  1. Set pose_method to 'ray_pose' in the node's mode input.
  2. Or load the checkpoint variant that ships the camera decoder (cam_dec).
Defensive patterns

Strategy: validation

Validate before calling

if pose_method == 'cam_dec' and da3_model.model.diffusion_model.cam_dec is None:
    pose_method = 'ray_pose'  # checkpoint has no camera decoder

Type guard

def da3_has_cam_dec(da3_model) -> bool:
    return da3_model.model.diffusion_model.cam_dec is not None

Prevention

When it happens

Trigger: Loading a Small/Base checkpoint variant without the camera decoder (cam_dec is None) and running multi-view mode with pose_method='cam_dec'.

Common situations: Default pose_method not matching the downloaded checkpoint variant; switching checkpoints between runs while keeping pose_method; tutorials that assume the full Base model with camera decoder.

Related errors


AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14). Data as JSON: /api/errors/17972c970d01fcc9. Report an issue: GitHub.