{"record":{"id":"79fdf4316cf05fe7","repo":"invoke-ai/InvokeAI","slug":"control-loras-cannot-be-used-with-flux-schnell","errorCode":null,"errorMessage":"Control LoRAs cannot be used with FLUX Schnell","messagePattern":"Control LoRAs cannot be used with FLUX Schnell","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"invokeai/app/invocations/flux_denoise.py","lineNumber":345,"sourceCode":"                t_0 = timesteps[0]\n                x = t_0 * noise + (1.0 - t_0) * init_latents\n            else:\n                x = init_latents\n        else:\n            # init_latents are not provided, so we are not doing image-to-image (i.e. we are starting from pure noise).\n            if self.denoising_start > 1e-5:\n                raise ValueError(\"denoising_start should be 0 when initial latents are not provided.\")\n\n            assert noise is not None\n            x = noise\n\n        # If len(timesteps) == 1, then short-circuit. We are just noising the input latents, but not taking any\n        # denoising steps.\n        if len(timesteps) <= 1:\n            return x\n\n        if is_schnell and self.control_lora:\n            raise ValueError(\"Control LoRAs cannot be used with FLUX Schnell\")\n\n        # Prepare the extra image conditioning tensor (img_cond) for either FLUX structural control or FLUX Fill.\n        img_cond: torch.Tensor | None = None\n        is_flux_fill = transformer_config.variant is FluxVariantType.DevFill\n        if is_flux_fill:\n            img_cond = self._prep_flux_fill_img_cond(context, device=device, dtype=inference_dtype)\n        else:\n            if self.fill_conditioning is not None:\n                raise ValueError(\"fill_conditioning was provided, but the model is not a FLUX Fill model.\")\n\n            if self.control_lora is not None:\n                img_cond = self._prep_structural_control_img_cond(context)\n\n        inpaint_mask = self._prep_inpaint_mask(context, x)\n\n        img_ids = generate_img_ids(h=latent_h, w=latent_w, batch_size=b, device=x.device, dtype=x.dtype)\n\n        # Pack all latent tensors.","sourceCodeStart":327,"sourceCodeEnd":363,"githubUrl":"https://github.com/invoke-ai/InvokeAI/blob/0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06/invokeai/app/invocations/flux_denoise.py#L327-L363","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Remove the Control LoRA from the FLUX Denoise invocation (clear the control_lora field or disconnect the node edge).","Switch the transformer to a FLUX Dev (or Dev Fill) model, which supports Control LoRAs.","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."],"exampleFix":"// before\nfluxDenoise.control_lora = controlLoraField; // transformer is FLUX Schnell\n// after\nfluxDenoise.control_lora = null; // Control LoRAs require FLUX Dev, not Schnell","handlingStrategy":"validation","validationCode":"if model_config.variant == FluxVariantType.Schnell and denoise.control_lora is not None:\n    raise ValueError(\"Detach the Control LoRA or switch to a FLUX Dev model\")","typeGuard":"def is_schnell_with_control_lora(config, denoise) -> bool:\n    return getattr(config, 'variant', None) == FluxVariantType.Schnell and denoise.control_lora is not None","tryCatchPattern":"try:\n    result = invoke(denoise)\nexcept ValueError as e:\n    if 'Control LoRAs cannot be used with FLUX Schnell' in str(e):\n        denoise.control_lora = None  # or load a Dev model\n        result = invoke(denoise)\n    else:\n        raise","preventionTips":["Only enable Control LoRAs on FLUX Dev-family models","When switching model checkpoints, audit all connected conditioning fields","Encode the model variant in workflow templates to prevent mismatched wiring"],"tags":["flux","schnell","control-lora","invalid-combination"],"backgroundTag":"incompatible-model-feature-combination","analyzedSha":"0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06","analyzedAt":"2026-08-29T04:46:49.967Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}