invoke-ai/InvokeAI · error · ValueError

Control LoRAs cannot be used with FLUX Schnell

Error message

Control LoRAs cannot be used with FLUX Schnell

What it means

FLUX Schnell is a distilled 4-step model that does not support Control LoRA adapters. The FLUX Denoise invocation explicitly rejects combining a Schnell transformer with a control_lora input, because the Control LoRA patching approach only works with FLUX Dev-style transformers. Throwing here prevents a wasted (or silently wrong) diffusion run.

Source

Thrown at invokeai/app/invocations/flux_denoise.py:345

                t_0 = timesteps[0]
                x = t_0 * noise + (1.0 - t_0) * init_latents
            else:
                x = init_latents
        else:
            # init_latents are not provided, so we are not doing image-to-image (i.e. we are starting from pure noise).
            if self.denoising_start > 1e-5:
                raise ValueError("denoising_start should be 0 when initial latents are not provided.")

            assert noise is not None
            x = noise

        # If len(timesteps) == 1, then short-circuit. We are just noising the input latents, but not taking any
        # denoising steps.
        if len(timesteps) <= 1:
            return x

        if is_schnell and self.control_lora:
            raise ValueError("Control LoRAs cannot be used with FLUX Schnell")

        # Prepare the extra image conditioning tensor (img_cond) for either FLUX structural control or FLUX Fill.
        img_cond: torch.Tensor | None = None
        is_flux_fill = transformer_config.variant is FluxVariantType.DevFill
        if is_flux_fill:
            img_cond = self._prep_flux_fill_img_cond(context, device=device, dtype=inference_dtype)
        else:
            if self.fill_conditioning is not None:
                raise ValueError("fill_conditioning was provided, but the model is not a FLUX Fill model.")

            if self.control_lora is not None:
                img_cond = self._prep_structural_control_img_cond(context)

        inpaint_mask = self._prep_inpaint_mask(context, x)

        img_ids = generate_img_ids(h=latent_h, w=latent_w, batch_size=b, device=x.device, dtype=x.dtype)

        # Pack all latent tensors.

View on GitHub (pinned to 0b6a024f2f)

Solutions

  1. Remove the Control LoRA from the FLUX Denoise invocation (clear the control_lora field or disconnect the node edge).
  2. Switch the transformer to a FLUX Dev (or Dev Fill) model, which supports Control LoRAs.
  3. If structural control is needed with Schnell, use an alternative control mechanism (e.g. FLUX ControlNet or pre-processing the image) instead of a Control LoRA.

Example fix

// before
fluxDenoise.control_lora = controlLoraField; // transformer is FLUX Schnell
// after
fluxDenoise.control_lora = null; // Control LoRAs require FLUX Dev, not Schnell
Defensive patterns

Strategy: validation

Validate before calling

if model_config.variant == FluxVariantType.Schnell and denoise.control_lora is not None:
    raise ValueError("Detach the Control LoRA or switch to a FLUX Dev model")

Type guard

def is_schnell_with_control_lora(config, denoise) -> bool:
    return getattr(config, 'variant', None) == FluxVariantType.Schnell and denoise.control_lora is not None

Try / catch

try:
    result = invoke(denoise)
except ValueError as e:
    if 'Control LoRAs cannot be used with FLUX Schnell' in str(e):
        denoise.control_lora = None  # or load a Dev model
        result = invoke(denoise)
    else:
        raise

Prevention

When it happens

Trigger: Calling the FLUX Denoise invocation (via a graph) with a FLUX Schnell model loaded while a Control LoRA is attached to the control_lora field; the check fires in _run_diffusion after timestep preparation, whenever len(timesteps) > 1.

Common situations: User selects a Schnell model in the workflow but leaves a Control LoRA node/field connected from a previous Dev-based workflow; swapping model checkpoints without disconnecting the Control LoRA; copying a Dev workflow template and only changing the model.

Related errors


AI-assisted analysis of invoke-ai/InvokeAI@0b6a024f2f (2026-08-29). Data as JSON: /api/errors/79fdf4316cf05fe7. Report an issue: GitHub.