Nodes/Lance-3B AIO/Lance Args
ComfyUI Node

Lance Args

Task, resolution, and where your models live

By SteveImmanuel·Created 4 months ago·Updated 3 months ago· 8
Lance Args
    • model_args
    • inference_args
    • data_config
    • LANCE_CKPT_DIR
    • VIT_CKPT_DIR
    • WAN_CKPT_PATH
    taskt2i
    resolutionimage_768res
    video_height768
    video_width768
    num_frames50
    text_templatetrue
    use_KVcachetrue
    validation_num_timesteps30
    validation_timestep_shift3.5
    cfg_text_scale4.0
    ckpt_root_dirlance
    data_seed42

    Lance-Args is the control tower of the whole comfyui-lance-aio pack. It doesn't load a single model weight, but every node in the graph is waiting on its outputs. Before you wire anything else, you drag this in and tell Lance what job you're giving it - generate an image, generate a video, edit a video, or just answer a question about one.

    The pack is an unofficial ComfyUI port of ByteDance's Lance-3B, a 3B-active Apache 2.0 model that does image and video generation, editing, and understanding in one architecture. That "one model, seven tasks" design is exactly why this node exists: the rest of the pack needs to know which of the seven you're running, at what resolution, with how many frames, and where your checkpoints live. Lance-Args answers all of that and passes the answer down the line.

    What you actually set

    • task - the big one. Choices are t2i, t2v, i2v, image_edit, video_edit, x2t_image, and x2t_video (x2t = "anything to text", the understanding tasks). Your choice decides which checkpoint folder gets loaded (image-ish tasks pull Lance_3B, video-ish tasks pull Lance_3B_Video) and which output node you wire up downstream.
    • resolution - a preset dropdown (video_192p, video_360p, video_480p, image_256res, image_512res, image_768res). Pick the preset for your task; image_768res is the default, which is fine for images but you'll want a video preset for video tasks.
    • video_height / video_width / num_frames - explicit overrides for video. Height and width step in multiples of 16, and frames default to 50. If you're doing image work you mostly ignore these.
    • cfg_text_scale (default 4.0) - the classifier-free-guidance strength for the text condition during generation. This is your "how hard does the model obey the prompt" knob, same idea as CFG in a normal sampler.
    • validation_num_timesteps (default 30) and validation_timestep_shift (default 3.5) - how many denoising steps and how much timestep shift to use. Fewer steps is faster and slightly rougher; this is the closest thing this pack has to a sampler step count.
    • text_template and use_KVcache - both default to true. The first wraps your prompt in Lance's chat template, the second enables the KV-cache path that makes generation much faster. Leave them on.
    • ckpt_root_dir (default lance) - which subfolder of ComfyUI/models your Lance checkpoints live in. It's auto-populated with whatever folders exist under models.
    • data_seed (default 42) - seeds the validation noise. Bump it to get different results from the same prompt.

    What comes out

    Three of its six outputs are plain strings that feed the loaders, and that's the thing beginners trip on: Lance Args doesn't emit models, it emits paths and config objects. The three STRING outputs - LANCE_CKPT_DIR, VIT_CKPT_DIR, WAN_CKPT_PATH - wire straight into the ckpt_dir/ckpt_path inputs of the Lance Loader, ViT Loader, and WAN VAE Loader. The model_args, inference_args, and data_config outputs go into the loaders and the prompt/generation nodes. Follow the included example workflows and it'll all fall into place.

    Installing the pack

    ComfyUI Manager can find it as comfyui-lance-aio (display name "Lance-3B AIO"). Or clone it directly:

    cd ComfyUI/custom_nodes
    git clone https://github.com/SteveImmanuel/comfyui-lance-aio
    cd comfyui-lance-aio
    pip install -r requirements.txt
    

    The requirements are light - transformers>=4.50.3,<5, decord, imageio - but that version pin on transformers matters. The official Lance codebase breaks on transformers>=5, so don't let your environment upgrade past it.

    The real weight is in the checkpoints. Download from bytedance-research/Lance on Hugging Face and arrange them under ComfyUI/models/lance/ - Lance_3B/, Lance_3B_Video/, Qwen2.5-VL-ViT/, and Wan2.2_VAE.pth. The files ship in FP32, so the image and video checkpoints are 20+ GB each; give yourself disk headroom. The pack itself is built to run on 12GB VRAM (8GB for image tasks), so it'll stream what doesn't fit - that's the whole point of this port.

    Where people get burned

    Forgetting to set the task before wiring the rest of the graph. The understanding tasks need the ViT loader and the understanding output node; generation tasks need the VAE. If you change task after wiring, the paths update (that part is automatic) but the rest of your graph won't rewire itself - you're switching between two different pipelines.

    CategoryLance

    Inputs (12)

    NameTypeDefaultDescription
    taskCOMBOt2i7 options: i2v, t2v, t2i, x2t_image, x2t_video, image_edit, +1
    resolutionCOMBOimage_768res6 options: video_192p, video_360p, video_480p, image_256res, image_512res, image_768res
    video_heightINT76864–4096
    video_widthINT76864–4096
    num_framesINT501–1024
    text_templateBOOLEANtrue
    use_KVcacheBOOLEANtrue
    validation_num_timestepsINT301–200
    validation_timestep_shiftFLOAT3.50–10
    cfg_text_scaleFLOAT4.00–30
    ckpt_root_dirCOMBOlance26 options: gligen, embeddings, hypernetworks, upscale_models, optical_flow, frame_interpolation, +20
    data_seedINT42

    Outputs (6)

    NameTypeDescription
    model_argsMODEL_ARGS
    inference_argsINFERENCE_ARGS
    data_configDATA_CONFIG
    LANCE_CKPT_DIRSTRING
    VIT_CKPT_DIRSTRING
    WAN_CKPT_PATHSTRING