logo
RunComfy
  • ComfyUI
  • TrainerNew
  • Models
  • API
  • Pricing
discord logo
ComfyUI>Workflows>SDXL LoRA Inference | AI Toolkit ComfyUI

SDXL LoRA Inference | AI Toolkit ComfyUI

Workflow Name: RunComfy/SDXL-LoRA-Inference
Workflow ID: 0000...1342
SDXL LoRA Inference is a production-ready ComfyUI workflow designed to run AI Toolkit-trained SDXL LoRAs with inference behavior closely aligned to training previews. The workflow is built around the RC SDXL custom node, which wraps an SDXL-specific inference pipeline instead of a generic sampling graph. This ensures consistent LoRA injection, SDXL-correct defaults, and predictable sampling behavior across runs. The streamlined graph reduces common ComfyUI mismatch issues and is ideal for creators who want reliable, fast, and reproducible SDXL LoRA inference.

SDXL LoRA Inference: Run AI Toolkit LoRA in ComfyUI for Training‑Matched Results

SDXL LoRA Inference: training‑matched results with fewer steps in ComfyUI. This workflow runs Stable Diffusion XL (SDXL) with AI Toolkit–trained LoRAs via RunComfy’s RC SDXL (RCSDXL) custom node (open‑sourced in the runcomfy-com GitHub organization repositories). By wrapping an SDXL‑specific pipeline (instead of a generic sampler graph) and standardizing LoRA loading and scaling (lora_path / lora_scale) with SDXL‑correct defaults, your ComfyUI outputs stay much closer to what you saw in training previews.

If you trained an SDXL LoRA in AI Toolkit (RunComfy Trainer or elsewhere) and your ComfyUI results look “off” compared to training previews, this workflow is the quickest way to return to training‑matched behavior.


How to use the SDXL LoRA Inference workflow

Step 1: Open the workflow

Open the RunComfy SDXL LoRA Inference workflow

Step 2: Import your LoRA (2 options)

  • Option A (RunComfy training result): RunComfy → Trainer → LoRA Assets → find your LoRA → ⋮ → Copy LoRA Link
    LoRA Assets WebUI
  • Option B (AI Toolkit LoRA trained outside RunComfy): Copy a direct .safetensors download link for your LoRA and paste that URL into lora_path.
    Set lora_path in RCSDXL

Step 3: Configure RCSDXL for SDXL LoRA Inference

In the RCSDXL SDXL LoRA Inference node UI, set the remaining parameters:

  • prompt: your primary text prompt (include any trigger tokens you used during training)
  • negative_prompt: optional; leave blank if you didn’t use one in training previews
  • width / height: output resolution
  • sample_steps: sampling steps (match your training preview settings when comparing results)
  • guidance_scale: CFG / guidance (match training preview CFG)
  • seed: use a fixed seed for reproducibility; change it to explore variations
  • lora_scale: LoRA strength/intensity

If you tweaked sampling during training, open the AI Toolkit training YAML and copy the same values here—especially width, height, sample_steps, guidance_scale, and seed. If you trained on RunComfy, you can also open the LoRA Config in Trainer → LoRA Assets and copy the preview/sample values.

LoRA Assets Config WebUI

Step 4: Run SDXL LoRA Inference

  • Click Queue/Run → output is saved automatically via SaveImage

Why SDXL LoRA Inference often looks different in ComfyUI & What the RCSDXL custom node does

Most SDXL LoRA mismatches aren’t caused by one wrong knob—they happen because the inference pipeline changes. AI Toolkit training previews are generated through a model‑specific SDXL inference implementation, while many ComfyUI graphs are reconstructed from generic components. Even with the same prompt, steps, CFG, and seed, a different pipeline (and LoRA injection path) can produce noticeably different results.

The RC SDXL (RCSDXL) node wraps an SDXL‑specific inference pipeline so SDXL LoRA Inference stays aligned with the AI Toolkit training preview pipeline and uses consistent LoRA injection behavior for SDXL. Reference implementation: `src/pipelines/sdxl.py`


Troubleshooting SDXL LoRA Inference

Most “training preview vs ComfyUI inference” problems come from pipeline mismatches, not a single wrong parameter. If your LoRA was trained with AI Toolkit (SDXL), the most reliable way to recover training‑matched behavior in ComfyUI is to run inference through RunComfy’s RCSDXL custom node, which aligns SDXL sampling + LoRA injection at the pipeline level.

(1) Inference on lora .safetensor files sdxl model doesn't match samples in training

Why this happens

Even when the LoRA loads, results can still drift if your ComfyUI graph doesn’t match the training preview pipeline (different SDXL defaults, different LoRA injection path, different refiner handling).

How to fix (recommended)

  • Use RCSDXL and paste your direct .safetensors link into lora_path.
  • Copy the sampling values from your AI Toolkit training config (or RunComfy Trainer → LoRA Assets Config): width, height, sample_steps, guidance_scale, seed.
  • Keep “extra speed stacks” (LCM/Lightning/Turbo) out of the comparison unless you trained/sampled with them.

(2) SDXL lora key not loaded "lora_te2_text_projection.*"

Why this happens

Your LoRA contains SDXL Text Encoder 2 projection keys that your current loading path isn’t applying (easy to hit when injection/key mapping doesn’t match SDXL’s dual‑encoder setup).

How to fix (most reliable)

  • Use RCSDXL and load the LoRA via lora_path inside the node (pipeline‑level injection).
  • Keep lora_scale consistent, and include the same trigger tokens used during training.
  • If warnings persist, try the exact base checkpoint used in training (mismatched SDXL variants can produce missing/ignored keys).

(3) Can't use LoRAs with SDXL anymore

Why this happens

After updating ComfyUI / custom nodes, SDXL LoRA application can change (loader behavior, caching, memory behavior), making previously-working graphs fail or drift.

How to fix (recommended)

  • Use RCSDXL to keep the SDXL inference path stable and training‑aligned.
  • Clear model/node cache or restart the session after updates (especially if behavior changes only after you tweak LoRA/loader settings).
  • For debugging, run a minimal base‑only SDXL workflow first, then add complexity back.

(4) Scheduling Hook LoRA incorrect CLIP cache in subsequent run after value change

Why this happens

Hook/scheduling workflows can reuse cached CLIP state after parameter changes, which breaks reproducibility and makes LoRA behavior look inconsistent run-to-run.

How to fix (recommended)

  • For training‑matched inference, prefer RCSDXL with simple lora_path / lora_scale first (avoid hook/scheduling layers until the baseline matches).
  • If you must use hook/scheduling nodes, clear cache (or restart) after changing hook parameters, then rerun with the same seed.

(5) Ksampler error while try use LORA in inpaiting SDXL

Why this happens

Inpainting stacks patch the model during sampling. Some custom nodes / helper wrappers can conflict with LoRA patching when you change settings mid‑session, triggering KSampler/inpaint worker errors.

How to fix (recommended)

  • Confirm the LoRA works in RCSDXL in a plain txt2img workflow first (pipeline‑level baseline).
  • Add inpainting back one component at a time. If the error appears only after edits, restart/clear cache before rerunning.
  • If the issue only happens with a specific helper node, try the vanilla inpaint path or update/disable the conflicting custom node.

(6) Im getting this error clip missing: ['clip_l.logit_scale', 'clip_l.transformer.text_projection.weight']

Why this happens

This usually means the loaded CLIP/text‑encoder assets don’t match the SDXL checkpoint you’re running (missing expected SDXL CLIP weights), which can also make LoRA behavior look “off”.

How to fix (recommended)

  • Make sure you’re using a proper SDXL checkpoint setup with correct SDXL text encoders/CLIP components.
  • Then run LoRA inference via RCSDXL so the SDXL conditioning path stays consistent end‑to‑end.

Run SDXL LoRA Inference now

Open the RunComfy SDXL LoRA Inference workflow, paste your LoRA into lora_path, and run RCSDXL for training‑matched SDXL LoRA inference in ComfyUI.

Want More ComfyUI Workflows?

Nunchaku Qwen Image | Multi-Image Editor

Blend and style multiple images with next-level control.

ComfyUI Vid2Vid Dance Transfer

Transfers the motion and style from a source video onto a target image or object.

ACE++ Character Consistency

Generate consistent images of your character across poses, angles, and styles from a single photo.

Flux 2 Dev | Photoreal Text-to-Image Generator

Next-level image realism with advanced generation control power

Omost | Enhance Image Creation

Omost | Enhance Image Creation

Omost uses LLM coding to generate precise, high-quality images.

Wan2.2 Fun Camera | Cinematic Motion from Images

Turn still images into lively cinematic shots with smooth camera moves.

Flux Kontext Zoom Out ComfyUI Workflow | Seamless Outpainting

Zoom Out LoRA enlarges images seamlessly with natural continuation.

Face Restore + ControlNet + Reactor | Restore Old Photos

Face Restore + ControlNet + Reactor | Restore Old Photos

Revive faded photos into vibrant memories, preserving every detail for cherished reminiscence.

Follow us
  • LinkedIn
  • Facebook
  • Instagram
  • Twitter
Support
  • Discord
  • Email
  • System Status
  • Affiliate
Resources
  • Free ComfyUI Online
  • ComfyUI Guides
  • RunComfy API
  • ComfyUI Tutorials
  • ComfyUI Nodes
  • Learn More
Legal
  • Terms of Service
  • Privacy Policy
  • Cookie Policy
RunComfy
Copyright 2026 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.