{"record":{"id":"276ff97df909ab9c","repo":"invoke-ai/InvokeAI","slug":"cfg-scale-must-be-greater-than-1-276ff9","errorCode":null,"errorMessage":"cfg_scale must be greater than 1","messagePattern":"cfg_scale must be greater than 1","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"invokeai/app/invocations/tiled_multi_diffusion_denoise_latents.py","lineNumber":136,"sourceCode":"        description=FieldDescriptions.unet,\n        input=Input.Connection,\n        title=\"UNet\",\n    )\n    cfg_rescale_multiplier: float = InputField(\n        title=\"CFG Rescale Multiplier\", default=0, ge=0, lt=1, description=FieldDescriptions.cfg_rescale_multiplier\n    )\n    control: ControlField | list[ControlField] | None = InputField(\n        default=None,\n        input=Input.Connection,\n    )\n\n    @field_validator(\"cfg_scale\")\n    def ge_one(cls, v: list[float] | float) -> list[float] | float:\n        \"\"\"Validate that all cfg_scale values are >= 1\"\"\"\n        if isinstance(v, list):\n            for i in v:\n                if i < 1:\n                    raise ValueError(\"cfg_scale must be greater than 1\")\n        else:\n            if v < 1:\n                raise ValueError(\"cfg_scale must be greater than 1\")\n        return v\n\n    @staticmethod\n    def create_pipeline(\n        unet: UNet2DConditionModel,\n        scheduler: SchedulerMixin,\n    ) -> MultiDiffusionPipeline:\n        # TODO(ryand): Get rid of this FakeVae hack.\n        class FakeVae:\n            class FakeVaeConfig:\n                def __init__(self) -> None:\n                    self.block_out_channels = [0]\n\n            def __init__(self) -> None:\n                self.config = FakeVae.FakeVaeConfig()","sourceCodeStart":118,"sourceCodeEnd":154,"githubUrl":"https://github.com/invoke-ai/InvokeAI/blob/0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06/invokeai/app/invocations/tiled_multi_diffusion_denoise_latents.py#L118-L154","documentation":"The tiled multi-diffusion denoise invocation validates cfg_scale via a pydantic field_validator requiring every value to be >= 1 (a pydantic field_validator). CFG scales below 1 are outside the sampler's supported range for this node, so input validation fails before invoke.","triggerScenarios":"Passing a scalar cfg_scale < 1 or a list containing any value < 1 to the Tiled Multi-Diffusion Denoise Latents node — e.g. cfg_scale 0.5, or [7.0, 0.8].","commonSituations":"Users experimenting with negative/low CFG guidance; UI/API payloads crafted without client-side checks; batch lists where one entry was accidentally set below 1.","solutions":["Set every cfg_scale value to >= 1 (e.g. 7.5 or [7.5, 6.0]).","If you want weaker guidance, use a value slightly above 1 rather than below.","Sanitize user/batch inputs before building the node payload to clamp values to >= 1."],"exampleFix":"// before\ncfg_scale = [7.5, 0.8]\n// after\ncfg_scale = [7.5, 1.0]","handlingStrategy":"validation","validationCode":"cfg = node.cfg_scale\nvalues = cfg if isinstance(cfg, list) else [cfg]\nif any(v < 1 for v in values):\n    raise ValueError(\"All cfg_scale values must be >= 1\")","typeGuard":"def cfg_scale_valid(v) -> bool:\n    values = v if isinstance(v, list) else [v]\n    return all(x >= 1 for x in values)","tryCatchPattern":"try:\n    result = invoke(context)\nexcept ValueError as e:\n    if \"cfg_scale\" in str(e):\n        clamp_cfg_scale(node, minimum=1.0)\n        retry(context)\n    else:\n        raise","preventionTips":["Clamp user-entered CFG values to >= 1 in client code","Check every element of cfg_scale lists, not just the first","Never set CFG below 1 for tiled multi-diffusion denoise"],"tags":["validation","pydantic","cfg-scale"],"backgroundTag":"input-validation-failed","analyzedSha":"0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06","analyzedAt":"2026-08-29T04:46:49.967Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}