Nodes/comfyui_meituan_image/LongCat Model Loader
ComfyUI Node

LongCat Model Loader

The gateway to Meituan's 6B bilingual image model

By xuchenxu168·Created 9 months ago·Updated 9 months ago· 1
LongCat Model Loader
    • LongCat Pipeline
    model_nameLongCat-Image
    custom_model_path
    dtypebfloat16
    enable_cpu_offloadtrue
    attention_backenddefault

    The name says Meituan, so your first instinct is that this calls some API and needs a key. It doesn't. LongCat-Image is Meituan's open-source, Apache-2.0 image generation model, and this loader pulls the weights down to your own machine and builds a local pipeline from them. No cloud, no key, no monthly quota - just a multi-gigabyte download and a wait while it loads.

    The model underneath is worth knowing even though the wrapper isn't famous yet. LongCat-Image is a 6B flow-matching transformer with a Qwen2.5-VL text encoder - the same design family as Alibaba's Z-Image, which the community basically calls its cousin. It shipped in December 2025, and its headline feature is legible Chinese text: signs, posters, product labels come out readable, not scribbled. It's one of the few open models where the bilingual (Chinese-English) claim isn't marketing.

    What the loader actually does

    This node is the boring but essential first step in any LongCat workflow. It scans ComfyUI/models/diffusion_models (and checkpoints) for anything LongCat-ish - a folder with "longcat" in the name, or a transformer/ subfolder - and lists what it finds in the model_name dropdown. Pick a name and it checks the folder; if the weights are missing it tries to download them from Hugging Face on the spot. Then it loads the transformer and tokenizer through the longcat_image Python package and picks the right pipeline class for you: if "edit" is in the path you get the edit pipeline, otherwise the generation pipeline. You never touch that choice directly.

    The inputs that matter

    Only a few of these deserve your attention:

    • model_name - LongCat-Image (full model, ~50 steps), LongCat-Image-Dev (faster, ~28 steps), or LongCat-Image-Edit (the editing model). This one decision controls everything downstream.
    • enable_cpu_offload (default true) - the whole reason this runs in ~17GB instead of 24GB+. Leave it on unless you've got serious VRAM.
    • dtype (default bfloat16) - leave it. float32 will just eat memory.
    • attention_backend - default is fine. sage swaps in SageAttention for a speed boost, but only if you've installed the sageattention package; if you haven't, it silently falls back, so there's no harm in trying it.
    • custom_model_path - for weights you've stashed somewhere unusual.

    It has exactly one output: longcat_pipeline (type LONGCAT_PIPE), which wires straight into LongCat Text to Image or LongCat Image Edit.

    Install

    ComfyUI Manager is the easy route - search for comfyui_meituan_image (it shows up as "LongCat Image"). Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/xuchenxu168/comfyui_meituan_image
    

    then restart ComfyUI. requirements.txt pulls accelerate, diffusers>=0.35, transformers>=4.57, safetensors, peft, and the longcat-image package itself from GitHub. On import the pack also tries to auto-install longcat-image if it's missing - that self-install-on-load trick is a known source of custom-node dependency pain, so if you see pip fighting in the console, install it yourself with pip install git+https://github.com/meituan-longcat/LongCat-Image.git@main and restart.

    The landmine: auto-download points at the wrong repo

    Here's the gotcha nobody's README will tell you. The auto-downloader maps the models to meituan/LongCat-Image - but the real repos live under the meituan-longcat org. If your first run dies with a repository-not-found error, that's why. Grab the weights manually instead:

    pip install "huggingface_hub[cli]"
    huggingface-cli download meituan-longcat/LongCat-Image --local-dir ComfyUI/models/diffusion_models/LongCat-Image
    

    (swap the repo and folder name for LongCat-Image-Dev and LongCat-Image-Edit as needed). If you see "Model not found," the folder you gave it needs a transformer/ subfolder inside.

    Honest take: this wrapper is young - it went up days after the model dropped and has roughly one star to its name. Treat it as a bridge to the model, not a battle-tested pack. First load also takes a while: the ~12.5GB transformer plus the Qwen text encoder is a lot of disk and RAM churn. Once it's cached, the loader is a formality - the interesting work happens in the generation and edit nodes it feeds.

    CategoryMeituan/LongCat

    Inputs (5)

    NameTypeDefaultDescription
    model_nameCOMBOLongCat-Image4 options: LongCat-Image, LongCat-Image-Edit, LongCat-Image-Dev, (manual path)
    custom_model_pathSTRING
    dtypeCOMBObfloat163 options: bfloat16, float16, float32
    enable_cpu_offloadCOMBOtrue2 options: true, false
    attention_backendCOMBOdefault2 options: default, sage

    Outputs (1)

    NameTypeDescription
    LongCat PipelineLONGCAT_PIPE