Nodes/Runware.ai ComfyUI Inference API Integration/Stable Diffusion XL Lightning (custom model)
ComfyUI Node

Stable Diffusion XL Lightning (custom model)

The fast SDXL rung, on any checkpoint

By Runware·Created 2 years ago·Updated about a month ago· 140
Stable Diffusion XL Lightning (custom model)
  • seedImage
  • maskImage
  • outpaint
  • lora
  • controlNet
  • ipAdapters
  • embeddings
  • refiner
  • ultralytics
  • acceleratorOptions
  • advancedFeatures.watermark.image
  • image
modelcivitai:350352@391971
positivePrompt
width1024
height1024
negativePrompt
seed0
stepsfalse
steps_value1
scheduler(default)
CFGScalefalse
CFGScale_value0.00
strengthfalse
strength_value0.80
maskMarginfalse
maskMargin_value32
clipSkipfalse
clipSkip_value0
vae
promptWeighting(default)
numberResults1
advancedFeaturesfalse
advancedFeatures.watermark.bgColor
advancedFeatures.watermark.displayPosition(default)
advancedFeatures.watermark.fontColor
advancedFeatures.watermark.opacityfalse
advancedFeatures.watermark.opacity_value0.10
advancedFeatures.watermark.text
safetyfalse
safety.checkContentfalse
ttlfalse
ttl_value60
outputFormatJPG
outputQuality95
advanced_json

SDXL Lightning was ByteDance's February 2024 answer to the speed problem: take SDXL, distill it so it renders in a handful of steps instead of thirty, and ship it under a name that promises exactly what it delivers. RunwareArch_sdxl_lightning is the custom-model node for that architecture - the model field defaults to a Lightning checkpoint (civitai:350352@391971) but takes any Lightning-style SDXL AIR - so you get the fast SDXL family in the cloud, no downloads, no VRAM.

The distillation context is the whole reason this node exists. Distilled models trade detail for speed - the KB's line is that every distillation "drastically reduces" some quality - and Lightning's design assumption is 1–4 steps with CFG near or at 1. In Runware's cloud, that collapse of steps is a collapse of cost per run, which makes this the budget SDXL node: same checkpoint ecosystem, dramatically cheaper iterations. It's the right rung for drafts, batches, and anything where "good enough at a tenth of the price" wins.

How it works

imageInference with the AIR in the model field. Standard mechanics - prompt and IMAGE inputs up, image back. The sampling controls are the full SDXL set (scheduler with 76 choices, gated steps/CFGScale, clipSkip, vae, promptWeighting) plus the feature sockets (lora, controlNet, ipAdapters, embeddings, refiner). Note both steps and CFGScale are off by default - for a distilled model, the checkpoint's own low-step defaults are usually the right call, and overriding them with SDXL-era habits (30 steps, CFG 7) is how you get oversaturated, overcooked output.

The inputs that matter

  • model (required) - the AIR, default civitai:350352@391971. Search the catalog for other Lightning checkpoints.
  • positivePrompt (required) - plus negativePrompt; Lightning still honors a good negative list.
  • width / height - 1024×1024 defaults, 128–2048, step 8.
  • steps / CFGScale - gated. When you enable them, think "1–4 steps, CFG near 1," not "SDXL normal." The distillation doc is blunt: the settings are completely different from the standard version.
  • seedImage / maskImage - img2img and inpainting, with maskMargin.
  • lora / controlNet / ipAdapters - the stackable feature sockets.

Installing it

Install the pack. ComfyUI Manager → search Runware → install → restart. Manual:

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

Key from runware.ai/api-keys → ComfyUI Settings → Runware API key (or RUNWARE_API_KEY).

Where people get burned

  • Bringing SDXL settings to a Lightning model. 30 steps and CFG 7 on a 4-step model is the classic recipe for garbage. Trust the low-step defaults; that's the distillation.
  • "Fast" has a ceiling. Lightning output is draft-grade versus full SDXL. For final work the pack's regular RunwareArch_sdxl or Runware_rundiffusion_juggernaut_z are the higher rungs.
  • Cost is lower, not zero. Each run is still metered; the title bar shows the price. It's just a much smaller number than full SDXL.
  • Checkpoint availability. The catalog is what it is - the search button shows hosted AIRs, and an unserved ID 404s.

SDXL Lightning custom model is the "cheap and quick SDXL" node. When you need to see twenty variations of an idea before committing a single full-price render, this is the rung.

CategoryRunware/Custom models

Inputs (45)

NameTypeDefaultDescription
modelSTRINGcivitai:350352@391971AIR of any checkpoint of this architecture. Use the search button to browse the catalog.
positivePromptSTRINGText prompt describing elements to include in the generated output.
widthINT1024128–2048Width of the generated media in pixels.
heightINT1024128–2048Height of the generated media in pixels.
seedImageoptIMAGE
maskImageoptIMAGE
outpaintoptRUNWARE_OUTPAINT
loraoptRUNWARE_LORA
controlNetoptRUNWARE_CONTROLNET
ipAdaptersoptRUNWARE_IPADAPTERS
embeddingsoptRUNWARE_EMBEDDINGS
refineroptRUNWARE_REFINER
ultralyticsoptRUNWARE_ULTRALYTICS
acceleratorOptionsoptRUNWARE_ACCELERATOROPTIONS
advancedFeatures.watermark.imageoptIMAGE
negativePromptoptSTRINGPrompt to guide what to exclude from generation. Ignored when guidance is disabled (CFGScale ≤ 1).
seedoptINT00–9223372036854776000Random seed for reproducible generation. When not provided, a random seed is generated in the unsigned 32-bit range.
stepsoptBOOLEANfalseEnable to set steps. Off uses the model's default.
steps_valueoptINT11–50Total number of denoising steps. Higher values generally produce more detailed results but take longer.
scheduleroptCOMBO(default)Scheduler to use for the diffusion process.
CFGScaleoptBOOLEANfalseEnable to set CFGScale. Off uses the model's default.
CFGScale_valueoptFLOAT0.000–30Guidance scale representing how closely the output will resemble the prompt. Higher values produce results more aligned with the prompt.
strengthoptBOOLEANfalseEnable to set strength. This setting has usage rules in this model, so it is off unless you enable it.
strength_valueoptFLOAT0.800–1Strength of the transformation. Lower values result in more influence from the original input.
maskMarginoptBOOLEANfalseEnable to set maskMargin. Off uses the model's default.
maskMargin_valueoptINT3232–128Extra context pixels around the masked region during inpainting. The model zooms into the masked area with these additional pixels for better integration.
clipSkipoptBOOLEANfalseEnable to set clipSkip. Off uses the model's default.
clipSkip_valueoptINT00–4Number of layers to skip in the CLIP model.
vaeoptSTRINGVAE model identifier. Overrides the default VAE included with the base model.
promptWeightingoptCOMBO(default)Syntax used for prompt weighting.
numberResultsoptINT11–20Number of results to generate. Each result uses a different seed, producing variations of the same parameters.
advancedFeaturesoptBOOLEANfalseEnable to set advancedFeatures. Off uses the model's default.
advancedFeatures.watermark.bgColoroptSTRINGBackground color in hex format.
advancedFeatures.watermark.displayPositionoptCOMBO(default)Watermark position.
advancedFeatures.watermark.fontColoroptSTRINGText color in hex format.
advancedFeatures.watermark.opacityoptBOOLEANfalseEnable to set advancedFeatures.watermark.opacity. Off uses the model's default.
advancedFeatures.watermark.opacity_valueoptFLOAT0.100.1–1Watermark opacity.
advancedFeatures.watermark.textoptSTRINGWatermark text.
safetyoptBOOLEANfalseEnable to set safety. Off uses the model's default.
safety.checkContentoptBOOLEANfalseEnable or disable content safety checking.
ttloptBOOLEANfalseEnable to set ttl. Off uses the model's default.
ttl_valueoptINT60Time-to-live (TTL) in seconds for generated content. Only applies when `outputType` is `URL`.
outputFormatoptCOMBOJPGFile format for the generated image.
outputQualityoptINT9520–99Compression quality of the output. Higher values preserve quality but increase file size.
advanced_jsonoptSTRINGOptional JSON merged into the request. For: hiresFix

Outputs (1)

NameTypeDescription
imageIMAGE