{"record":{"id":"1891c5cdf3780ae2","repo":"invoke-ai/InvokeAI","slug":"fill-conditioning-was-provided-but-the-model-is-n","errorCode":null,"errorMessage":"fill_conditioning was provided, but the model is not a FLUX Fill model.","messagePattern":"fill_conditioning was provided, but the model is not a FLUX Fill model\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"invokeai/app/invocations/flux_denoise.py","lineNumber":354,"sourceCode":"            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.\n        init_latents = pack(init_latents) if init_latents is not None else None\n        inpaint_mask = pack(inpaint_mask) if inpaint_mask is not None else None\n        noise = pack(noise)\n        x = pack(x)\n\n        # Now that we have 'packed' the latent tensors, verify that we calculated the image_seq_len, packed_h, and\n        # packed_w correctly.\n        assert packed_h * packed_w == x.shape[1]\n","sourceCodeStart":336,"sourceCodeEnd":372,"githubUrl":"https://github.com/invoke-ai/InvokeAI/blob/0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06/invokeai/app/invocations/flux_denoise.py#L336-L372","documentation":"fill_conditioning (e.g. an inpaint mask/image used for FLUX Fill inpainting) is only consumed by FLUX Fill (DevFill variant) transformers. If the loaded transformer is not the DevFill variant, providing fill_conditioning is a configuration mistake, so the invocation raises instead of silently ignoring the conditioning.","triggerScenarios":"Passing a non-null fill_conditioning field to FLUX Denoise while the loaded transformer's config.variant is any FluxVariantType other than DevFill (e.g. Dev, Schnell, Kontext).","commonSituations":"User wires an inpaint/fill conditioning input but the model selector points at a regular FLUX Dev checkpoint instead of a FLUX Fill model; model was upgraded/replaced and the fill model is no longer loaded; workflow copied from a FLUX Fill example with a different model chosen.","solutions":["Load/select a FLUX Fill (DevFill variant) model in the model loader feeding the denoise invocation.","Remove the fill_conditioning input if inpainting via FLUX Fill is not intended (use the inpaint_mask field for regular masking instead).","Verify the transformer config variant is FluxVariantType.DevFill before connecting fill_conditioning."],"exampleFix":"// before\ndenoise.fill_conditioning = fillMaskField; // model is plain FLUX Dev\n// after\ndenoise.fill_conditioning = null; // or load a FLUX Fill model instead","handlingStrategy":"validation","validationCode":"if denoise.fill_conditioning is not None and model_config.variant != FluxVariantType.DevFill:\n    raise ValueError(\"fill_conditioning requires a FLUX Fill (DevFill) model\")","typeGuard":"def supports_fill_conditioning(config) -> bool:\n    return getattr(config, 'variant', None) == FluxVariantType.DevFill","tryCatchPattern":"try:\n    result = invoke(denoise)\nexcept ValueError as e:\n    if 'not a FLUX Fill model' in str(e):\n        denoise.fill_conditioning = None  # fall back to no fill conditioning\n        result = invoke(denoise)\n    else:\n        raise","preventionTips":["Load a DevFill-variant model whenever fill_conditioning is wired","Use inpaint_mask for generic inpainting instead of fill_conditioning on non-Fill models","Check transformer config.variant before connecting conditioning inputs"],"tags":["flux","flux-fill","inpainting","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"}