{"record":{"id":"03890a45954cf7b4","repo":"Comfy-Org/ComfyUI","slug":"unknown-interpolation-method-self-interpolation","errorCode":null,"errorMessage":"Unknown interpolation method {self.interpolation}","messagePattern":"Unknown interpolation method (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"comfy/ldm/cosmos/position_embedding.py","lineNumber":205,"sourceCode":"\n        self.pos_emb_h = nn.Parameter(torch.empty(len_h, model_channels, device=device, dtype=dtype))\n        self.pos_emb_w = nn.Parameter(torch.empty(len_w, model_channels, device=device, dtype=dtype))\n        self.pos_emb_t = nn.Parameter(torch.empty(len_t, model_channels, device=device, dtype=dtype))\n\n    def generate_embeddings(self, B_T_H_W_C: torch.Size, fps=Optional[torch.Tensor], device=None, dtype=None) -> torch.Tensor:\n        B, T, H, W, _ = B_T_H_W_C\n        if self.interpolation == \"crop\":\n            emb_h_H = self.pos_emb_h[:H].to(device=device, dtype=dtype)\n            emb_w_W = self.pos_emb_w[:W].to(device=device, dtype=dtype)\n            emb_t_T = self.pos_emb_t[:T].to(device=device, dtype=dtype)\n            emb = (\n                repeat(emb_t_T, \"t d-> b t h w d\", b=B, h=H, w=W)\n                + repeat(emb_h_H, \"h d-> b t h w d\", b=B, t=T, w=W)\n                + repeat(emb_w_W, \"w d-> b t h w d\", b=B, t=T, h=H)\n            )\n            assert list(emb.shape)[:4] == [B, T, H, W], f\"bad shape: {list(emb.shape)[:4]} != {B, T, H, W}\"\n        else:\n            raise ValueError(f\"Unknown interpolation method {self.interpolation}\")\n\n        return normalize(emb, dim=-1, eps=1e-6)\n","sourceCodeStart":187,"sourceCodeEnd":208,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy/ldm/cosmos/position_embedding.py#L187-L208","documentation":"VideoRopePosition3DEmb.build_emb() supports only the 'crop' interpolation method for slicing precomputed rope tables to the requested (T,H,W). Any other interpolation string raises ValueError. The method string comes from the model config key pos_emb_interpolation.","triggerScenarios":"Constructing the Cosmos/Predict2 rope embedding with pos_emb_interpolation set to anything other than 'crop' (e.g. 'interp', 'resize', 'padding'), typically when a checkpoint config is passed through unsanitized.","commonSituations":"Upstream NVIDIA Cosmos configs that name interpolation differently; hand-edited model configs; ports of predict2 variants that expect a resizable rope table.","solutions":["Set pos_emb_interpolation to \"crop\" in the model config.","If you need extrapolation behavior, raise max_img_h/max_img_w/max_frames in the config so the 'crop' slice covers your resolution instead of changing the method string.","Verify the config remapping layer in your loader normalizes pos_emb_interpolation."],"exampleFix":"# before\ncfg[\"pos_emb_interpolation\"] = \"interp\"\n\n# after\ncfg[\"pos_emb_interpolation\"] = \"crop\"","handlingStrategy":"validation","validationCode":"assert cfg.get(\"pos_emb_interpolation\") == \"crop\", \"only 'crop' interpolation is supported\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pin enum-like config fields to the values this port supports.","Size max_img_h/max_img_w/max_frames generously so 'crop' covers all target resolutions."],"tags":["cosmos","rope","config","positional-embedding"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}