Nodes/ComfyUI_FlowRVS/FlowRVS_SM_Model
ComfyUI Node

FlowRVS_SM_Model

A Wan 2.1 1.3B that was fine-tuned to find objects

By smthemex·Created 11 months ago·Updated 7 months ago· 8
FlowRVS_SM_Model
    • model
    wan_dit
    rvs_dit

    This is the node where the whole FlowRVS pack actually spends its money. FlowRVS_SM_Model loads the model - and if you've ever loaded a Wan model in ComfyUI before, most of it will feel familiar, except for one twist: it's a loader with two dropdowns instead of one, because the thing you're running is really two checkpoints bolted together.

    FlowRVS is a research model for referring video segmentation (RVOS): you give it a video and a sentence naming an object - "the gun", "the red car" - and it returns a per-frame mask of just that object. Its trick is that instead of building a segmentation network from scratch, it took the stock Wan 2.1 1.3B text-to-video transformer and fine-tuned it (on MeViS) so that the same architecture that normally generates pixels instead predicts mask latents. That's why this node needs both halves: the Wan base, and the FlowRVS tune layered on top.

    What the two dropdowns are

    • wan_dit - the base Wan 2.1 1.3B transformer, scanned from your ComfyUI/models/diffusion_models folder.
    • rvs_dit - the FlowRVS checkpoint, scanned from ComfyUI/models/FlowRVS/. The pack creates that folder and registers it the first time it runs, so you don't have to make it yourself.

    Both offer a "none" option, and the node will flatly refuse to run if either is still on "none" - you'll get an assert that says exactly that ("need FlowRVS dit and wan dit"). That's the most common red node on this pack's first run, and it's the loader being honest, not a crash.

    Under the hood it builds the Wan2.1-T2V-1.3B architecture from a config bundled inside the pack, then loads the FlowRVS checkpoint on top of it (the checkpoint can carry EMA weights, and the loader applies them when present). Everything runs in bfloat16. The output is a normal ComfyUI MODEL that wires straight into the pack's own FlowRVS_SM_KSampler - and only that sampler, because the conditioning this pipeline produces isn't something a stock KSampler understands.

    One behavior that surprises people: before loading, the node calls a cleanup routine that unpatches and unloads whatever other models are sitting in VRAM. If your graph suddenly drops off the other model you had loaded, that's intentional - it's making room, not breaking something.

    The two files you need

    ComfyUI/models/FlowRVS/FlowRVS_dit_mevis.pth            # 2.64GB, from huggingface.co/xmz111/FlowRVS
    ComfyUI/models/diffusion_models/Wan2.1-T2V-1.3B.safetensors  # the diffusers transformer, renamed
    

    The second one is diffusion_pytorch_model.safetensors from Wan-AI/Wan2.1-T2V-1.3B-Diffusers on HuggingFace - grab it, rename it so it isn't a 40-character filename, drop it in. The full pipeline also wants the Wan VAE and the umt5 text encoder; the README spells out all four files, and the other nodes in this pack cover the VAE half.

    Installing

    cd ComfyUI/custom_nodes
    git clone https://github.com/smthemex/ComfyUI_FlowRVS.git
    pip install -r requirements.txt
    

    ComfyUI Manager works too - search "ComfyUI_FlowRVS". The requirements file pulls in diffusers, transformers, sentencepiece, timm, pycocotools, moviepy and friends, which are heavy; give it a minute. If you get an ImportError for omegaconf or opencv, those two aren't in requirements.txt but are imported by the code - pip install omegaconf opencv-python and move on.

    Troubleshooting

    • Dropdown is empty - the file isn't in the right folder, or the pack's FlowRVS folder hasn't been created yet (restart ComfyUI once after install).
    • "need FlowRVS dit and wan dit" - one of the dropdowns is on none.
    • Old checkpoints stop working after an update - smthemex keeps touching this pack (the changelog says "support new checkpoints, fix some bugs", with a February 2026 commit), so after a git pull, re-check the README's model list.

    smthemex is a one-person port factory - Sonic lip-sync, TwinFlow, SenseNova U1, StoryDiffusion all come from the same author, turning new papers into ComfyUI packs fast. FlowRVS is one of the more niche ones, and the polish is "it works" rather than "it's beautiful". But for a task that has almost no other ComfyUI presence, that's still worth a lot.

    CategoryFlowRVS_SM

    Inputs (2)

    NameTypeDefaultDescription
    wan_ditCOMBO1 options: none
    rvs_ditCOMBO1 options: none

    Outputs (1)

    NameTypeDescription
    modelMODEL