Nodes/ComfyUI-QING/vLLM丨高级选项
ComfyUI Node

vLLM丨高级选项

The JSON you feed your vLLM-Omni server when the main node ran out of widgets

By sheengoa·Created about a year ago·Updated 20 days ago· 16
vLLM丨高级选项
    • advanced_options
    • debug_info
    enable_guidance_scalefalse
    guidance_scale4.00
    enable_cfg_scalefalse
    cfg_scale4.00
    enable_true_cfg_scalefalse
    true_cfg_scale4.00
    enable_resolutionfalse
    resolution1024
    enable_layersfalse
    layers4
    enable_lorafalse
    lora_namemy_lora
    lora_local_path/path/to/lora_adapter
    lora_scale1.00
    enable_lora_int_idfalse
    lora_int_id0
    enable_custom_jsonfalse
    custom_json

    The three QING vLLM API nodes (VLLMT2TAPI, VLLMT2IAPI, VLLMI2IAPI) each have a slot called advanced_options that takes a JSON string. VLLMAdvancedOptions is the node that builds that JSON - a toggle-and-slider front end over the extra parameters a vLLM-Omni server accepts but the main nodes don't bother exposing as individual widgets.

    Think of it as the "give me more knobs" node. You don't need it for basic calls; you do need it the moment you want guidance scale, CFG, resolution, layer counts, or a LoRA attached to a request.

    How it works

    The node is a pure builder: flip a toggle, set a value, and it assembles a JSON payload. Critically, only the toggles you flip to enable produce output - everything off-by-default means it emits a minimal payload (just {} if nothing is enabled). The resulting JSON has two possible top-level sections:

    • extra_body - built from guidance_scale, cfg_scale, true_cfg_scale, resolution, and layers, each gated by its enable_* toggle. These are the params vLLM-Omni reads as extra request options for diffusion-style generation.
    • lora - when enable_lora is on, an object with name, local_path, and scale (plus int_id if enable_lora_int_id is on). This is how you ask the server to attach a LoRA adapter to the generation.

    There's also enable_custom_json with a raw custom_json text box: anything you type there as a JSON object gets merged on top of the assembled payload, overriding keys. That's the escape hatch when the toggle list runs out - future vLLM-Omni params you can pass through without waiting for a pack update.

    The output is the JSON string; the second output, debug_info, is a readable dump of every submitted setting plus the final payload, so you can see exactly what will be sent.

    Inputs and outputs

    • Toggles + values (all required): enable_guidance_scale/guidance_scale, enable_cfg_scale/cfg_scale, enable_true_cfg_scale/true_cfg_scale, enable_resolution/resolution, enable_layers/layers, enable_lora/lora_name/lora_local_path/lora_scale, enable_lora_int_id/lora_int_id, enable_custom_json/custom_json.
    • Outputs: advanced_options (the JSON) and debug_info.

    Wire advanced_options into the advanced_options input of any of the three VLLM API nodes.

    Two things worth knowing

    lora_local_path defaults to /path/to/lora_adapter - that's a placeholder, not a real path. vLLM serves LoRAs by a name the server knows; the name is what matters, and the local path convention depends on how you launched the server. Set it deliberately.

    The pairing with guidance_scale vs true_cfg_scale. The T2I node already exposes true_cfg_scale directly (vLLM-Omni's Flux-family parameter), and the I2I node exposes guidance_scale. The advanced node covers both plus CFG and resolution so you don't have to choose. If you're new to what CFG guidance scales do, this is the one place where a wrong number visibly breaks output quality - start conservative and move one knob at a time.

    Installing it

    VLLMAdvancedOptions ships in ComfyUI-QING:

    cd ComfyUI/custom_nodes
    git clone https://github.com/GAO-SHIQING/ComfyUI-QING
    cd ComfyUI-QING
    python install_dependencies.py
    

    Restart ComfyUI, or install "ComfyUI-QING" via ComfyUI Manager. This node has no extra dependencies - the openai client in the pack's requirements covers the API nodes it feeds.

    Troubleshooting

    • The API node ignores my settings. Check debug_info on the API node: if advanced_options isn't in the request payload, the wire between this node and the advanced_options input isn't connected. Also confirm the toggle is enable - off toggles produce no output.
    • JSON parse error in the API node. custom_json must be a valid JSON object. debug_info here will show what was built; fix the custom JSON first.
    • LoRA not applying. The server has to know the adapter (vLLM requires adapters to be loaded/served before they can be attached by name). A missing adapter usually errors server-side - read the raw_response on the API node.

    It's a small, mechanical node, and that's its virtue: it converts seventeen knobs into one JSON string, and leaves the actual API calling to its three siblings.

    CategoryQING/API

    Inputs (18)

    NameTypeDefaultDescription
    enable_guidance_scaleBOOLEANfalse
    guidance_scaleFLOAT4.000–50
    enable_cfg_scaleBOOLEANfalse
    cfg_scaleFLOAT4.000–50
    enable_true_cfg_scaleBOOLEANfalse
    true_cfg_scaleFLOAT4.000–50
    enable_resolutionBOOLEANfalse
    resolutionINT102464–4096
    enable_layersBOOLEANfalse
    layersINT41–128
    enable_loraBOOLEANfalse
    lora_nameSTRINGmy_lora
    lora_local_pathSTRING/path/to/lora_adapter
    lora_scaleFLOAT1.000–10
    enable_lora_int_idBOOLEANfalse
    lora_int_idINT00–2147483647
    enable_custom_jsonBOOLEANfalse
    custom_jsonSTRING

    Outputs (2)

    NameTypeDescription
    advanced_optionsSTRING
    debug_infoSTRING