Nodes/ComfyUI_Anytext/AnyText Loader
ComfyUI Node

AnyText Loader

Load AnyText with an init_device control

By zmwv823·Created 2 years ago·Updated about a year ago· 103
AnyText Loader
    • model
    • vae
    • ckpt_name
    ckpt_name
    control_net_name
    miaobi_clip
    weight_dtypeauto
    init_device

    The loader that kicks off an AnyText graph. It reads an AnyText checkpoint off disk and produces the AnyText_Model that the encoder and sampler consume - nothing renders text until this node has run. It's one of a small family of AnyText loaders in the pack; this is the variant with an init_device toggle.

    Like every AnyText loader, it supports two ways of feeding the model, and choosing between them is the main thing you do here.

    How it works - the two options

    Option 1: full AnyText checkpoint. Put a complete AnyText checkpoint in ckpt_name and leave control_net_name on None. One file, everything inside.

    Option 2: SD 1.5 checkpoint + AnyText control model. Load an SD 1.5 base in ckpt_name and the AnyText control model in control_net_name. AnyText then layers onto your chosen base - the same "plug into an existing diffusion model" pattern the KB describes for the AnyText control weights. The node's note warns you not to load a control_net when you're using a full checkpoint; the two paths are mutually exclusive.

    The inputs and outputs that matter

    • ckpt_name - full AnyText checkpoint (Option 1) or SD 1.5 base (Option 2). Empty on this listing because the crawl box had no checkpoints installed; it reads ComfyUI/models/checkpoints on yours.
    • control_net_name - None for Option 1, the AnyText control model for Option 2. This is the switch between the two paths.
    • init_device (auto / device / cpu) - where the model gets initialised. auto is the sane default; cpu init can help on machines where loading straight to GPU spikes memory. This control is what distinguishes this loader from its siblings.
    • weight_dtype (default auto) - precision; fp16 trims VRAM.
    • miaobi_clip - optional CLIP for Chinese prompts without a translator (here only None is listed).

    Outputs are model (AnyText_Model), vae (VAE) and ckpt_name (STRING).

    How to install it

    ComfyUI Manager, search ComfyUI_Anytext, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/zmwv823/ComfyUI_Anytext
    

    then restart. Download an AnyText checkpoint (Sanster/AnyText or ModelScope's anytext_v1.1.ckpt) into models/checkpoints, or an SD 1.5 checkpoint plus the control model into models/controlnet. Base font Arial_Unicode.ttf goes in models/fonts.

    Common issues & troubleshooting

    Which AnyText loader? The pack ships a few. UL_AnyTextLoader (this one) has the init_device control. UL_AnyText_Loader (with the underscore) swaps that for a miaobi_clip that includes google-flan-t5-large. UL_AnyTextLoaderTest additionally lets you pass in a MODEL/CLIP/VAE you loaded with native nodes. Same job, different revisions - use whichever your workflow already references and don't overthink it.

    Load spikes to OOM. Try init_device = cpu so the checkpoint materialises on system RAM first, or set weight_dtype = fp16.

    Broke after loading both a checkpoint and a control_net. That's Option 1 and Option 2 crossed. Full checkpoint → control_net_name = None. Only the SD 1.5 path uses the control model.

    Chinese prompt renders as noise. Route it through the translator nodes to English, or use a loader/CLIP path that encodes Chinese directly. This variant lists only None for miaobi_clip, so the translator route is your cleanest option here.

    CategoryUL Group/Image Generation

    Inputs (5)

    NameTypeDefaultDescription
    ckpt_nameCOMBO0 options:
    control_net_nameCOMBO1 options: None
    miaobi_clipCOMBO1 options: None
    weight_dtypeCOMBOautoOnly fp16 and fp32 works. 仅支持fp16和fp32。
    init_deviceCOMBO3 options: auto, device, cpu

    Outputs (3)

    NameTypeDescription
    modelAnyText_Model
    vaeVAE
    ckpt_nameSTRING