{"record":{"id":"c1148e9393140242","repo":"Comfy-Org/ComfyUI","slug":"unrecognized-frame-interpolation-model-format","errorCode":null,"errorMessage":"Unrecognized frame interpolation model format","messagePattern":"Unrecognized frame interpolation model format","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"comfy_extras/nodes_frame_interpolation.py","lineNumber":69,"sourceCode":"            model = FILMNet()\n            model.load_state_dict(sd)\n            return model\n\n        # Try RIFE (needs key remapping for raw checkpoints)\n        sd = comfy.utils.state_dict_prefix_replace(sd, {\"module.\": \"\", \"flownet.\": \"\"})\n        key_map = {}\n        for k in sd:\n            for i in range(5):\n                if k.startswith(f\"block{i}.\"):\n                    key_map[k] = f\"blocks.{i}.{k[len(f'block{i}.'):]}\"\n        if key_map:\n            sd = {key_map.get(k, k): v for k, v in sd.items()}\n        sd = {k: v for k, v in sd.items() if not k.startswith((\"teacher.\", \"caltime.\"))}\n\n        try:\n            head_ch, channels = detect_rife_config(sd)\n        except (KeyError, ValueError):\n            raise ValueError(\"Unrecognized frame interpolation model format\")\n        model = IFNet(head_ch=head_ch, channels=channels)\n        model.load_state_dict(sd)\n        return model\n\n\nclass FrameInterpolate(io.ComfyNode):\n    @classmethod\n    def define_schema(cls):\n        return io.Schema(\n            node_id=\"FrameInterpolate\",\n            display_name=\"Run Frame Interpolation Model\",\n            category=\"video\",\n            search_aliases=[\"rife\", \"film\", \"frame interpolation\", \"slow motion\", \"interpolate frames\", \"vfi\"],\n            inputs=[\n                FrameInterpolationModel.Input(\"interp_model\"),\n                io.Image.Input(\"images\"),\n                io.Int.Input(\"multiplier\", default=2, min=2, max=16),\n            ],","sourceCodeStart":51,"sourceCodeEnd":87,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy_extras/nodes_frame_interpolation.py#L51-L87","documentation":"Frame-interpolation model loader raises this when detect_rife_config cannot recover the RIFE IFNet architecture (head channels, channel widths) from the state dict. Before this, keys are remapped (blockN.* -> blocks.N.*) and teacher/caltime keys are stripped, so failure means the checkpoint matches no known RIFE layout — wrong model file, unsupported variant, or corrupted download.","triggerScenarios":"Loading a non-RIFE checkpoint (or a RIFE variant whose key layout detect_rife_config doesn't recognize) via the frame-interpolation loader; also truncated/corrupted .pth downloads where the probe keys are missing.","commonSituations":"Pointing the loader at FILM/GMFSS/other interpolator weights by mistake; community RIFE forks (RIFE v4 HD, realpath variants) with renamed keys; interrupted downloads (KeyError inside detect_rife_config is caught and re-raised as this generic message).","solutions":["Verify you are loading a supported RIFE checkpoint (the model the node documents); re-download if the file is smaller than expected.","Inspect the state dict keys yourself (torch.load then list(k for k in sd)[:20]) and compare against a known-good RIFE checkpoint.","If it is a fork with renamed keys, remap the keys to the expected layout before loading, or use a stock RIFE release."],"exampleFix":"# before\nmodel = load_rife('GMFSS_model.pth')  # wrong family\n# after\nmodel = load_rife('rife-v4.25.pth')     # supported RIFE checkpoint","handlingStrategy":"validation","validationCode":"sd = torch.load(path, map_location='cpu')\nprobe = [k for k in sd if not k.startswith(('teacher.', 'caltime.'))]\nif not any(k.startswith(('blocks.', 'block')) for k in probe):\n    raise ValueError(f'{path} does not look like a RIFE IFNet checkpoint (first keys: {probe[:5]})')","typeGuard":null,"tryCatchPattern":"try:\n    model = load_rife(path)\nexcept ValueError as e:\n    if 'Unrecognized frame interpolation model format' in str(e):\n        raise ValueError(f'{path} is not a supported RIFE checkpoint; download a stock RIFE release') from e\n    raise","preventionTips":["Download RIFE checkpoints only from the source the node documents; verify file size after download.","Do not point the loader at other interpolator families (FILM, GMFSS) — it loads RIFE IFNet only.","For RIFE forks with renamed keys, remap keys to the expected layout before loading."],"tags":["comfyui","frame-interpolation","rife","model-format"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}