Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.
TypeScript ai-artartificial-intelligencegenerative-artimage-generationimg2imginpaintinglatent-diffusionlinuxmacosoutpaintingstable-diffusiontxt2imgwindows
feat: update architecture capabilities and policies
Alexander Eichhorncc1c7902d45f
diff --git a/invokeai/backend/architectures/defs/ernie_image.py b/invokeai/backend/architectures/defs/ernie_image.pyindex 7e9ca997f3..e4b925e97d 100644--- a/invokeai/backend/architectures/defs/ernie_image.py+++ b/invokeai/backend/architectures/defs/ernie_image.py@@ -35,5 +35,10 @@ register(dimension_grid=16,guidance_label="CFG",scheduler_set="flow",+ # `ernie_image_denoise` takes a `scheduler` field and builds the sampler from it+ # (ERNIE_IMAGE_SCHEDULER_MAP), so the choice reaches the graph rather than being a+ # UI affordance. Omitting this defaulted it to False, which would have hidden the+ # dropdown and pinned every generation to the first entry.+ scheduler_applies_to_graph=True,),)diff --git a/invokeai/frontend/webv2/src/features/generation/core/__fixtures__/architectureCapabilities.json b/invokeai/frontend/webv2/src/features/generation/core/__fixtures__/architectureCapabilities.jsonnew file mode 100644index 0000000000..139b5dd087--- /dev/null+++ b/invokeai/frontend/webv2/src/features/generation/core/__fixtures__/architectureCapabilities.json@@ -0,0 +1,1172 @@+[+ {+ "base": "anima",+ "variant": null,+ "modality": {+ "modes": [+ "img2img",+ "inpaint",+ "outpaint",+ "txt2img"+ ],+ "metadata_slug": "anima"+ },+ "features": {+ "negative_prompt": {+ "visible": true,+ "usage": "cfg-gated"+ },+ "dimension_grid": 8,+ "spatial_compression": 8,+ "guidance_label": "CFG",+ "scheduler_set": "anima",+ "scheduler_applies_to_graph": true,+ "control_kinds": [],+ "max_reference_images": 0,+ "reference_images_require_variant": null,+ "supports_regional_guidance": false,+ "regional_negative": false,+ "clip_skip_max": null,+ "supports_seamless": false,+ "supports_cfg_rescale": false,+ "sd_vae_override": false,+ "color_compensation": false,+ "vae_precision": false+ },+ "defaults": {+ "vae": null,+ "vae_precision": null,+ "scheduler": "euler",+ "steps": 35,+ "cfg_scale": 4.5,+ "cfg_rescale_multiplier": null,+ "width": 1024,+ "height": 1024,+ "guidance": null,+ "cpu_only": null,+ "fp8_storage": null+ }+ },+ {+ "base": "cogview4",+ "variant": null,+ "modality": {+ "modes": [+ "img2img",+ "inpaint",+ "outpaint",+ "txt2img"+ ],+ "metadata_slug": "cogview4"+ },+ "features": {+ "negative_prompt": {+ "visible": true,+ "usage": "always"+ },+ "dimension_grid": 32,+ "spatial_compression": 8,+ "guidance_label": "CFG",+ "scheduler_set": "standard",+ "scheduler_applies_to_graph": false,+ "control_kinds": [],+ "max_reference_images": 0,+ "reference_images_require_variant": null,+ "supports_regional_guidance": false,+ "regional_negative": false,+ "clip_skip_max": null,+ "supports_seamless": false,+ "supports_cfg_rescale": false,+ "sd_vae_override": false,+ "color_compensation": false,+ "vae_precision": false+ },+ "defaults": {+ "vae": null,+ "vae_precision": null,+ "scheduler": "euler_a",+ "steps": 50,+ "cfg_scale": 3.5,+ "cfg_rescale_multiplier": null,+ "width": 1024,+ "height": 1024,+ "guidance": null,+ "cpu_only": null,+ "fp8_storage": null+ }+ },+ {+ "base": "ernie-image",+ "variant": null,+ "modality": {+ "modes": [+ "txt2img"+ ],+ "metadata_slug": "ernie_image"+ },+ "features": {+ "negative_prompt": {+ "visible": true,+ "usage": "cfg-gated"+ },+ "dimension_grid": 16,+ "spatial_compression": 8,+ "guidance_label": "CFG",+ "scheduler_set": "flow",+ "scheduler_applies_to_graph": true,+ "control_kinds": [],+ "max_reference_images": 0,+ "reference_images_require_variant": null,+ "supports_regional_guidance": false,+ "regional_negative": false,+ "clip_skip_max": null,+ "supports_seamless": false,+ "supports_cfg_rescale": false,+ "sd_vae_override": false,+ "color_compensation": false,+ "vae_precision": false+ },+ "defaults": {+ "vae": null,+ "vae_precision": null,+ "scheduler": "euler",+ "steps": 50,+ "cfg_scale": 4.0,+ "cfg_rescale_multiplier": null,+ "width": 1024,+ "height": 1024,+ "guidance": null,+ "cpu_only": null,+ "fp8_storage": null+ }+ },+ {+ "base": "flux",+ "variant": null,+ "modality": {+ "modes": [+ "img2img",+ "inpaint",+ "outpaint",+ "txt2img"+ ],+ "metadata_slug": "flux"+ },+ "features": {+ "negative_prompt": {+ "visible": false,+ "usage": "never"+ },+ "dimension_grid": 16,+ "spatial_compression": 8,+ "guidance_label": "Guidance",+ "scheduler_set": "flow",+ "scheduler_applies_to_graph": true,+ "control_kinds": [+ "control_lora",+ "controlnet"+ ],+ "max_reference_images": 5,+ "reference_images_require_variant": null,+ "supports_regional_guidance": true,+ "regional_negative": false,+ "clip_skip_max": null,+ "supports_seamless": false,+ "supports_cfg_rescale": false,+ "sd_vae_override": false,+ "color_compensation": false,+ "vae_precision": false+ },+ "defaults": {+ "vae": null,+ "vae_precision": null,+ "scheduler": "euler",+ "steps": 28,+ "cfg_scale": 1.0,+ "cfg_rescale_multiplier": null,+ "width": 1024,+ "height": 1024,+ "guidance": 3.5,+ "cpu_only": null,+ "fp8_storage": null+ }+ },+ {+ "base": "flux",+ "variant": "dev_fill",+ "modality": {+ "modes": [+ "img2img",+ "inpaint",+ "outpaint",+ "txt2img"+ ],+ "metadata_slug": "flux"+ },+ "features": {+ "negative_prompt": {+ "visible": false,+ "usage": "never"+ },+ "dimension_grid": 16,+ "spatial_compression": 8,+ "guidance_label": "Guidance",+ "scheduler_set": "flow",+ "scheduler_applies_to_graph": true,+ "control_kinds": [+ "control_lora",+ "controlnet"+ ],+ "max_reference_images": 5,+ "reference_images_require_variant": null,+ "supports_regional_guidance": true,+ "regional_negative": false,+ "clip_skip_max": null,+ "supports_seamless": false,+ "supports_cfg_rescale": false,+ "sd_vae_override": false,+ "color_compensation": false,+ "vae_precision": false+ },+ "defaults": {+ "vae": null,+ "vae_precision": null,+ "scheduler": "euler",+ "steps": 50,+ "cfg_scale": 1.0,+ "cfg_rescale_multiplier": null,+ "width": 1024,+ "height": 1024,+ "guidance": 30.0,+ "cpu_only": null,+ "fp8_storage": null+ }+ },+ {+ "base": "flux",+ "variant": "schnell",+ "modality": {+ "modes": [+ "img2img",+ "inpaint",+ "outpaint",+ "txt2img"+ ],+ "metadata_slug": "flux"+ },+ "features": {+ "negative_prompt": {+ "visible": false,+ "usage": "never"+ },+ "dimension_grid": 16,+ "spatial_compression": 8,+ "guidance_label": "Guidance",+ "scheduler_set": "flow",+ "scheduler_applies_to_graph": true,+ "control_kinds": [+ "control_lora",+ "controlnet"+ ],+ "max_reference_images": 5,+ "reference_images_require_variant": null,+ "supports_regional_guidance": true,+ "regional_negative": false,+ "clip_skip_max": null,+ "supports_seamless": false,+ "supports_cfg_rescale": false,+ "sd_vae_override": false,+ "color_compensation": false,+ "vae_precision": false+ },+ "defaults": {+ "vae": null,+ "vae_precision": null,+ "scheduler": "euler",+ "steps": 4,+ "cfg_scale": 1.0,+ "cfg_rescale_multiplier": null,+ "width": 1024,+ "height": 1024,+ "guidance": null,+ "cpu_only": null,+ "fp8_storage": null+ }+ },+ {+ "base": "flux2",+ "variant": null,+ "modality": {+ "modes": [+ "img2img",+ "inpaint",+ "outpaint",+ "txt2img"+ ],+ "metadata_slug": "flux2"+ },+ "features": {+ "negative_prompt": {+ "visible": false,+ "usage": "never"+ },+ "dimension_grid": 16,+ "spatial_compression": 8,+ "guidance_label": "Guidance",+ "scheduler_set": "flow",+ "scheduler_applies_to_graph": true,+ "control_kinds": [],+ "max_reference_images": 5,+ "reference_images_require_variant": null,+ "supports_regional_guidance": true,+ "regional_negative": false,+ "clip_skip_max": null,+ "supports_seamless": false,+ "supports_cfg_rescale": false,+ "sd_vae_override": false,+ "color_compensation": false,+ "vae_precision": false+ },+ "defaults": {+ "vae": null,+ "vae_precision": null,+ "scheduler": "euler",+ "steps": 4,+ "cfg_scale": 1.0,+ "cfg_rescale_multiplier": null,+ "width": 1024,+ "height": 1024,+ "guidance": null,+ "cpu_only": null,+ "fp8_storage": null+ }+ },+ {+ "base": "flux2",+ "variant": "dev",+ "modality": {+ "modes": [+ "img2img",+ "inpaint",+ "outpaint",+ "txt2img"+ ],+ "metadata_slug": "flux2"+ },+ "features": {+ "negative_prompt": {+ "visible": false,+ "usage": "never"+ },+ "dimension_grid": 16,+ "spatial_compression": 8,+ "guidance_label": "Guidance",+ "scheduler_set": "flow",+ "scheduler_applies_to_graph": true,+ "control_kinds": [],+ "max_reference_images": 5,+ "reference_images_require_variant": null,+ "supports_regional_guidance": true,+ "regional_negative": false,+ "clip_skip_max": null,+ "supports_seamless": false,+ "supports_cfg_rescale": false,+ "sd_vae_override": false,+ "color_compensation": false,+ "vae_precision": false+ },+ "defaults": {+ "vae": null,+ "vae_precision": null,+ "scheduler": "euler",+ "steps": 28,+ "cfg_scale": 1.0,+ "cfg_rescale_multiplier": null,+ "width": 1024,+ "height": 1024,+ "guidance": 3.5,+ "cpu_only": null,+ "fp8_storage": null+ }+ },+ {+ "base": "flux2",+ "variant": "klein_4b_base",+ "modality": {+ "modes": [+ "img2img",+ "inpaint",+ "outpaint",+ "txt2img"+ ],+ "metadata_slug": "flux2"+ },+ "features": {+ "negative_prompt": {+ "visible": false,+ "usage": "never"+ },+ "dimension_grid": 16,+ "spatial_compression": 8,+ "guidance_label": "Guidance",+ "scheduler_set": "flow",+ "scheduler_applies_to_graph": true,+ "control_kinds": [],+ "max_reference_images": 5,+ "reference_images_require_variant": null,+ "supports_regional_guidance": true,+ "regional_negative": false,+ "clip_skip_max": null,+ "supports_seamless": false,+ "supports_cfg_rescale": false,+ "sd_vae_override": false,+ "color_compensation": false,+ "vae_precision": false+ },+ "defaults": {+ "vae": null,+ "vae_precision": null,+ "scheduler": "euler",+ "steps": 28,+ "cfg_scale": 1.0,+ "cfg_rescale_multiplier": null,+ "width": 1024,+ "height": 1024,+ "guidance": null,+ "cpu_only": null,+ "fp8_storage": null+ }+ },+ {+ "base": "flux2",+ "variant": "klein_9b_base",+ "modality": {+ "modes": [+ "img2img",+ "inpaint",+ "outpaint",+ "txt2img"+ ],+ "metadata_slug": "flux2"+ },+ "features": {+ "negative_prompt": {+ "visible": false,+ "usage": "never"+ },+ "dimension_grid": 16,+ "spatial_compression": 8,+ "guidance_label": "Guidance",+ "scheduler_set": "flow",+ "scheduler_applies_to_graph": true,+ "control_kinds": [],+ "max_reference_images": 5,+ "reference_images_require_variant": null,+ "supports_regional_guidance": true,+ "regional_negative": false,+ "clip_skip_max": null,+ "supports_seamless": false,+ "supports_cfg_rescale": false,+ "sd_vae_override": false,+ "color_compensation": false,+ "vae_precision": false+ },+ "defaults": {+ "vae": null,+ "vae_precision": null,+ "scheduler": "euler",+ "steps": 28,+ "cfg_scale": 1.0,+ "cfg_rescale_multiplier": null,+ "width": 1024,+ "height": 1024,+ "guidance": null,+ "cpu_only": null,+ "fp8_storage": null+ }+ },+ {+ "base": "ideogram-4",+ "variant": null,+ "modality": {+ "modes": [+ "txt2img"+ ],+ "metadata_slug": "ideogram4"+ },+ "features": {+ "negative_prompt": {+ "visible": false,+ "usage": "never"+ },+ "dimension_grid": 16,+ "spatial_compression": 8,+ "guidance_label": "Guidance",+ "scheduler_set": "flow",+ "scheduler_applies_to_graph": false,+ "control_kinds": [],+ "max_reference_images": 0,+ "reference_images_require_variant": null,+ "supports_regional_guidance": false,+ "regional_negative": false,+ "clip_skip_max": null,+ "supports_seamless": false,+ "supports_cfg_rescale": false,+ "sd_vae_override": false,+ "color_compensation": false,+ "vae_precision": false+ },+ "defaults": {+ "vae": null,+ "vae_precision": null,+ "scheduler": "euler",+ "steps": 48,+ "cfg_scale": 1.0,+ "cfg_rescale_multiplier": null,+ "width": 1024,+ "height": 1024,+ "guidance": null,+ "cpu_only": null,+ "fp8_storage": null+ }+ },+ {+ "base": "krea-2",+ "variant": null,+ "modality": {+ "modes": [+ "img2img",+ "inpaint",+ "outpaint",+ "txt2img"+ ],+ "metadata_slug": "krea2"+ },+ "features": {+ "negative_prompt": {+ "visible": true,+ "usage": "cfg-gated"+ },+ "dimension_grid": 16,+ "spatial_compression": 8,+ "guidance_label": "CFG",+ "scheduler_set": "flow",+ "scheduler_applies_to_graph": false,+ "control_kinds": [],+ "max_reference_images": 0,+ "reference_images_require_variant": null,+ "supports_regional_guidance": true,+ "regional_negative": false,+ "clip_skip_max": null,+ "supports_seamless": false,+ "supports_cfg_rescale": false,+ "sd_vae_override": false,+ "color_compensation": false,+ "vae_precision": false+ },+ "defaults": {+ "vae": null,+ "vae_precision": null,+ "scheduler": "euler",+ "steps": 8,+ "cfg_scale": 1.0,+ "cfg_rescale_multiplier": null,+ "width": 1024,+ "height": 1024,+ "guidance": null,+ "cpu_only": null,+ "fp8_storage": null+ }+ },+ {+ "base": "krea-2",+ "variant": "krea2_base",+ "modality": {+ "modes": [+ "img2img",+ "inpaint",+ "outpaint",+ "txt2img"+ ],+ "metadata_slug": "krea2"+ },+ "features": {+ "negative_prompt": {+ "visible": true,+ "usage": "cfg-gated"+ },+ "dimension_grid": 16,+ "spatial_compression": 8,+ "guidance_label": "CFG",+ "scheduler_set": "flow",+ "scheduler_applies_to_graph": false,+ "control_kinds": [],+ "max_reference_images": 0,+ "reference_images_require_variant": null,+ "supports_regional_guidance": true,+ "regional_negative": false,+ "clip_skip_max": null,+ "supports_seamless": false,+ "supports_cfg_rescale": false,+ "sd_vae_override": false,+ "color_compensation": false,+ "vae_precision": false+ },+ "defaults": {+ "vae": null,+ "vae_precision": null,+ "scheduler": "euler",+ "steps": 28,+ "cfg_scale": 5.5,+ "cfg_rescale_multiplier": null,+ "width": 1024,+ "height": 1024,+ "guidance": null,+ "cpu_only": null,+ "fp8_storage": null+ }+ },+ {+ "base": "minimax-h3",+ "variant": null,+ "modality": {+ "modes": [+ "extend_video",+ "flf2v",+ "i2v",+ "lf2v",+ "t2v",+ "txt2img"+ ],+ "metadata_slug": "minimax_h3"+ },+ "features": {+ "negative_prompt": {+ "visible": false,+ "usage": "never"+ },+ "dimension_grid": 32,+ "spatial_compression": 16,+ "guidance_label": "Guidance",+ "scheduler_set": null,+ "scheduler_applies_to_graph": false,+ "control_kinds": [],+ "max_reference_images": 0,+ "reference_images_require_variant": null,+ "supports_regional_guidance": false,+ "regional_negative": false,+ "clip_skip_max": null,+ "supports_seamless": false,+ "supports_cfg_rescale": false,+ "sd_vae_override": false,+ "color_compensation": false,+ "vae_precision": false+ },+ "defaults": {+ "vae": null,+ "vae_precision": null,+ "scheduler": null,+ "steps": 50,+ "cfg_scale": 1.0,+ "cfg_rescale_multiplier": null,+ "width": 1344,+ "height": 768,+ "guidance": null,+ "cpu_only": null,+ "fp8_storage": null+ }+ },+ {+ "base": "qwen-image",+ "variant": null,+ "modality": {+ "modes": [+ "img2img",+ "inpaint",+ "outpaint",+ "txt2img"+ ],+ "metadata_slug": "qwen_image"+ },+ "features": {+ "negative_prompt": {+ "visible": true,+ "usage": "cfg-gated"+ },+ "dimension_grid": 16,+ "spatial_compression": 8,+ "guidance_label": "CFG",+ "scheduler_set": "standard",+ "scheduler_applies_to_graph": false,+ "control_kinds": [],+ "max_reference_images": 5,+ "reference_images_require_variant": "edit",+ "supports_regional_guidance": false,+ "regional_negative": false,+ "clip_skip_max": null,+ "supports_seamless": false,+ "supports_cfg_rescale": false,+ "sd_vae_override": false,+ "color_compensation": false,+ "vae_precision": false+ },+ "defaults": {+ "vae": null,+ "vae_precision": null,+ "scheduler": "euler_a",+ "steps": 40,+ "cfg_scale": 4.0,+ "cfg_rescale_multiplier": null,+ "width": 1024,+ "height": 1024,+ "guidance": null,+ "cpu_only": null,+ "fp8_storage": null+ }+ },+ {+ "base": "sd-1",+ "variant": null,+ "modality": {+ "modes": [+ "img2img",+ "inpaint",+ "outpaint",+ "txt2img"+ ],+ "metadata_slug": null+ },+ "features": {+ "negative_prompt": {+ "visible": true,+ "usage": "always"+ },+ "dimension_grid": 8,+ "spatial_compression": 8,+ "guidance_label": "CFG",+ "scheduler_set": "standard",+ "scheduler_applies_to_graph": true,+ "control_kinds": [+ "controlnet",+ "t2i_adapter"+ ],+ "max_reference_images": 5,+ "reference_images_require_variant": null,+ "supports_regional_guidance": true,+ "regional_negative": true,+ "clip_skip_max": 12,+ "supports_seamless": true,+ "supports_cfg_rescale": true,+ "sd_vae_override": true,+ "color_compensation": false,+ "vae_precision": true+ },+ "defaults": {+ "vae": null,+ "vae_precision": null,+ "scheduler": "euler_a",+ "steps": 30,+ "cfg_scale": 7.0,+ "cfg_rescale_multiplier": null,+ "width": 512,+ "height": 512,+ "guidance": null,+ "cpu_only": null,+ "fp8_storage": null+ }+ },+ {+ "base": "sd-2",+ "variant": null,+ "modality": {+ "modes": [+ "img2img",+ "inpaint",+ "outpaint",+ "txt2img"+ ],+ "metadata_slug": null+ },+ "features": {+ "negative_prompt": {+ "visible": true,+ "usage": "always"+ },+ "dimension_grid": 8,+ "spatial_compression": 8,+ "guidance_label": "CFG",+ "scheduler_set": "standard",+ "scheduler_applies_to_graph": true,+ "control_kinds": [],+ "max_reference_images": 0,+ "reference_images_require_variant": null,+ "supports_regional_guidance": false,+ "regional_negative": false,+ "clip_skip_max": 24,+ "supports_seamless": true,+ "supports_cfg_rescale": true,+ "sd_vae_override": true,+ "color_compensation": false,+ "vae_precision": true+ },+ "defaults": {+ "vae": null,+ "vae_precision": null,+ "scheduler": "euler_a",+ "steps": 30,+ "cfg_scale": 7.0,+ "cfg_rescale_multiplier": null,+ "width": 768,+ "height": 768,+ "guidance": null,+ "cpu_only": null,+ "fp8_storage": null+ }+ },+ {+ "base": "sd-3",+ "variant": null,+ "modality": {+ "modes": [+ "img2img",+ "inpaint",+ "outpaint",+ "txt2img"+ ],+ "metadata_slug": "sd3"+ },+ "features": {+ "negative_prompt": {+ "visible": true,+ "usage": "always"+ },+ "dimension_grid": 16,+ "spatial_compression": 8,+ "guidance_label": "CFG",+ "scheduler_set": "standard",+ "scheduler_applies_to_graph": false,+ "control_kinds": [],+ "max_reference_images": 0,+ "reference_images_require_variant": null,+ "supports_regional_guidance": false,+ "regional_negative": false,+ "clip_skip_max": null,+ "supports_seamless": false,+ "supports_cfg_rescale": false,+ "sd_vae_override": false,+ "color_compensation": false,+ "vae_precision": false+ },+ "defaults": {+ "vae": null,+ "vae_precision": null,+ "scheduler": "euler_a",+ "steps": 40,+ "cfg_scale": 4.5,+ "cfg_rescale_multiplier": null,+ "width": 1024,+ "height": 1024,+ "guidance": null,+ "cpu_only": null,+ "fp8_storage": null+ }+ },+ {+ "base": "sdxl",+ "variant": null,+ "modality": {+ "modes": [+ "img2img",+ "inpaint",+ "outpaint",+ "txt2img"+ ],+ "metadata_slug": "sdxl"+ },+ "features": {+ "negative_prompt": {+ "visible": true,+ "usage": "always"+ },+ "dimension_grid": 8,+ "spatial_compression": 8,+ "guidance_label": "CFG",+ "scheduler_set": "standard",+ "scheduler_applies_to_graph": true,+ "control_kinds": [+ "controlnet",+ "t2i_adapter"+ ],+ "max_reference_images": 5,+ "reference_images_require_variant": null,+ "supports_regional_guidance": true,+ "regional_negative": true,+ "clip_skip_max": null,+ "supports_seamless": true,+ "supports_cfg_rescale": false,+ "sd_vae_override": true,+ "color_compensation": true,+ "vae_precision": true+ },+ "defaults": {+ "vae": null,+ "vae_precision": null,+ "scheduler": "euler_a",+ "steps": 30,+ "cfg_scale": 7.0,+ "cfg_rescale_multiplier": null,+ "width": 1024,+ "height": 1024,+ "guidance": null,+ "cpu_only": null,+ "fp8_storage": null+ }+ },+ {+ "base": "sdxl-refiner",+ "variant": null,+ "modality": {+ "modes": [],+ "metadata_slug": null+ },+ "features": {+ "negative_prompt": {+ "visible": true,+ "usage": "always"+ },+ "dimension_grid": 8,+ "spatial_compression": 8,+ "guidance_label": "CFG",+ "scheduler_set": "standard",+ "scheduler_applies_to_graph": true,+ "control_kinds": [],+ "max_reference_images": 0,+ "reference_images_require_variant": null,+ "supports_regional_guidance": false,+ "regional_negative": false,+ "clip_skip_max": null,+ "supports_seamless": false,+ "supports_cfg_rescale": false,+ "sd_vae_override": true,+ "color_compensation": true,+ "vae_precision": true+ },+ "defaults": {+ "vae": null,+ "vae_precision": null,+ "scheduler": null,+ "steps": null,+ "cfg_scale": null,+ "cfg_rescale_multiplier": null,+ "width": 1024,+ "height": 1024,+ "guidance": null,+ "cpu_only": null,+ "fp8_storage": null+ }+ },+ {+ "base": "wan",+ "variant": null,+ "modality": {+ "modes": [+ "extend_video",+ "i2v",+ "img2img",+ "inpaint",+ "interpolate",+ "outpaint",+ "t2v",+ "txt2img"+ ],+ "metadata_slug": "wan"+ },+ "features": {+ "negative_prompt": {+ "visible": true,+ "usage": "always"+ },+ "dimension_grid": 16,+ "spatial_compression": 8,+ "guidance_label": "Guidance",+ "scheduler_set": "flow",+ "scheduler_applies_to_graph": false,+ "control_kinds": [],+ "max_reference_images": 0,+ "reference_images_require_variant": null,+ "supports_regional_guidance": false,+ "regional_negative": false,+ "clip_skip_max": null,+ "supports_seamless": false,+ "supports_cfg_rescale": false,+ "sd_vae_override": false,+ "color_compensation": false,+ "vae_precision": false+ },+ "defaults": {+ "vae": null,+ "vae_precision": null,+ "scheduler": "euler",+ "steps": 40,+ "cfg_scale": 4.0,+ "cfg_rescale_multiplier": null,+ "width": 1024,+ "height": 1024,+ "guidance": null,+ "cpu_only": null,+ "fp8_storage": null+ }+ },+ {+ "base": "wan",+ "variant": "ti2v_5b",+ "modality": {+ "modes": [+ "extend_video",+ "i2v",+ "img2img",+ "inpaint",+ "interpolate",+ "outpaint",+ "t2v",+ "txt2img"+ ],+ "metadata_slug": "wan"+ },+ "features": {+ "negative_prompt": {+ "visible": true,+ "usage": "always"+ },+ "dimension_grid": 16,+ "spatial_compression": 8,+ "guidance_label": "Guidance",+ "scheduler_set": "flow",+ "scheduler_applies_to_graph": false,+ "control_kinds": [],+ "max_reference_images": 0,+ "reference_images_require_variant": null,+ "supports_regional_guidance": false,+ "regional_negative": false,+ "clip_skip_max": null,+ "supports_seamless": false,+ "supports_cfg_rescale": false,+ "sd_vae_override": false,+ "color_compensation": false,+ "vae_precision": false+ },+ "defaults": {+ "vae": null,+ "vae_precision": null,+ "scheduler": "euler",+ "steps": 30,+ "cfg_scale": 5.0,+ "cfg_rescale_multiplier": null,+ "width": 1024,+ "height": 1024,+ "guidance": null,+ "cpu_only": null,+ "fp8_storage": null+ }+ },+ {+ "base": "z-image",+ "variant": null,+ "modality": {+ "modes": [+ "img2img",+ "inpaint",+ "outpaint",+ "txt2img"+ ],+ "metadata_slug": "z_image"+ },+ "features": {+ "negative_prompt": {+ "visible": true,+ "usage": "cfg-gated"+ },+ "dimension_grid": 16,+ "spatial_compression": 8,+ "guidance_label": "CFG",+ "scheduler_set": "flow",+ "scheduler_applies_to_graph": true,+ "control_kinds": [+ "z_image_control"+ ],+ "max_reference_images": 0,+ "reference_images_require_variant": null,+ "supports_regional_guidance": false,+ "regional_negative": false,+ "clip_skip_max": null,+ "supports_seamless": false,+ "supports_cfg_rescale": false,+ "sd_vae_override": false,+ "color_compensation": false,+ "vae_precision": false+ },+ "defaults": {+ "vae": null,+ "vae_precision": null,+ "scheduler": "euler",+ "steps": 9,+ "cfg_scale": 1.0,+ "cfg_rescale_multiplier": null,+ "width": 1024,+ "height": 1024,+ "guidance": null,+ "cpu_only": null,+ "fp8_storage": null+ }+ },+ {+ "base": "z-image",+ "variant": "zbase",+ "modality": {+ "modes": [+ "img2img",+ "inpaint",+ "outpaint",+ "txt2img"+ ],+ "metadata_slug": "z_image"+ },+ "features": {+ "negative_prompt": {+ "visible": true,+ "usage": "cfg-gated"+ },+ "dimension_grid": 16,+ "spatial_compression": 8,+ "guidance_label": "CFG",+ "scheduler_set": "flow",+ "scheduler_applies_to_graph": true,+ "control_kinds": [+ "z_image_control"+ ],+ "max_reference_images": 0,+ "reference_images_require_variant": null,+ "supports_regional_guidance": false,+ "regional_negative": false,+ "clip_skip_max": null,+ "supports_seamless": false,+ "supports_cfg_rescale": false,+ "sd_vae_override": false,+ "color_compensation": false,+ "vae_precision": false+ },+ "defaults": {+ "vae": null,+ "vae_precision": null,+ "scheduler": "euler",+ "steps": 50,+ "cfg_scale": 4.0,+ "cfg_rescale_multiplier": null,+ "width": 1024,+ "height": 1024,+ "guidance": null,+ "cpu_only": null,+ "fp8_storage": null+ }+ }+]diff --git a/invokeai/frontend/webv2/src/features/generation/core/baseGenerationPolicies.test.ts b/invokeai/frontend/webv2/src/features/generation/core/baseGenerationPolicies.test.tsindex bfafee5810..ed0eaf3bf5 100644--- a/invokeai/frontend/webv2/src/features/generation/core/baseGenerationPolicies.test.ts+++ b/invokeai/frontend/webv2/src/features/generation/core/baseGenerationPolicies.test.ts@@ -1191,3 +1191,33 @@ describe('Krea-2, Ideogram 4 and Wan policies', () => {).toEqual([]);});});++describe('the guidance slider value from a model record', () => {+ // MainModelDefaultSettings has separate cfg_scale and guidance fields; the UI has one control.+ // Which field feeds it depends on guidanceLabel, and getting that backwards reads a distilled+ // model's "CFG off" marker as its guidance setting.+ it('prefers guidance over cfg_scale for a guidance-labelled architecture', () => {+ const model = createModel('flux', {+ variant: 'dev',+ default_settings: { cfg_scale: 1, guidance: 3.5, steps: 28 },+ } as Partial<MainModelConfig>);++ // Not 1 — that is the CFG-off marker, and buildFluxGraph wires this value into `guidance`.+ expect(getDefaultGenerateSettings(model).cfgScale).toBe(3.5);+ });++ it('falls back to cfg_scale when a guidance-labelled model records no guidance', () => {+ const model = createModel('flux', {+ variant: 'schnell',+ default_settings: { cfg_scale: 1, steps: 4 },+ } as Partial<MainModelConfig>);++ expect(getDefaultGenerateSettings(model).cfgScale).toBe(1);+ });++ it('prefers cfg_scale for a CFG-labelled architecture', () => {+ const model = createModel('sdxl', { default_settings: { cfg_scale: 6.5, steps: 30 } } as Partial<MainModelConfig>);++ expect(getDefaultGenerateSettings(model).cfgScale).toBe(6.5);+ });+});diff --git a/invokeai/frontend/webv2/src/features/generation/core/baseGenerationPolicies.ts b/invokeai/frontend/webv2/src/features/generation/core/baseGenerationPolicies.tsindex f15fddb332..755796caf0 100644--- a/invokeai/frontend/webv2/src/features/generation/core/baseGenerationPolicies.ts+++ b/invokeai/frontend/webv2/src/features/generation/core/baseGenerationPolicies.ts@@ -433,13 +433,31 @@ export const getGenerationDimensions = (};};+/**+ * The value the single guidance slider takes from a model record.+ *+ * `MainModelDefaultSettings` carries `cfg_scale` and `guidance` as separate fields, but the UI has+ * one control -- `guidanceLabel` is the whole difference between them. Which field feeds it depends+ * on the label: a guidance-distilled model records `cfg_scale: 1.0` meaning "CFG off" *and* the+ * guidance value it actually samples with, so preferring `cfg_scale` reads the off-switch as the+ * setting. FLUX dev records `{cfg_scale: 1.0, guidance: 3.5}` and `buildFluxGraph` wires+ * `guidance: settings.cfgScale`, so the old order generated at guidance 1.0 instead of 3.5.+ */+const getRecordGuidanceValue = (+ defaults: GenerateDefaultSettings | undefined,+ guidanceLabel: GuidanceLabel+): number | null | undefined =>+ guidanceLabel === 'Guidance'+ ? defaults?.guidance ?? defaults?.cfg_scale+ : defaults?.cfg_scale ?? defaults?.guidance;+export const getGenerationDefaults = (model: GenerateModelConfig | undefined) => {const config = getBaseGenerationConfig(model);const defaults = model?.default_settings as GenerateDefaultSettings;return {cfgRescaleMultiplier: getNumber(defaults?.cfg_rescale_multiplier, 0),- cfgScale: getNumber(defaults?.cfg_scale ?? defaults?.guidance, config.defaults.cfgScale),+ cfgScale: getNumber(getRecordGuidanceValue(defaults, config.guidanceLabel), config.defaults.cfgScale),scheduler: defaults?.scheduler ?? config.defaults.scheduler,steps: Math.max(1, Math.round(getNumber(defaults?.steps, config.defaults.steps))),vaePrecision: defaults?.vae_precision === 'fp16' ? ('fp16' as const) : ('fp32' as const),diff --git a/tests/backend/architectures/test_capabilities_fixture.py b/tests/backend/architectures/test_capabilities_fixture.pynew file mode 100644index 0000000000..7219fae04e--- /dev/null+++ b/tests/backend/architectures/test_capabilities_fixture.py@@ -0,0 +1,77 @@+"""The capabilities response webv2 is built against.++webv2 has no generated OpenAPI types -- it hand-writes its wire DTOs -- so nothing on the frontend+side would notice a renamed field, a dropped facet or a new architecture. This fixture is the+contract between the two, and it earns its keep twice: `scripts/mock-backend.mjs` serves it, so the+journey tests exercise the same payload shape the real route returns, and the frontend's unit tests+map it into their own types.++The mirror image of `tests/app/invocations/test_frontend_graph_node_types.py`, which reads a+frontend-written file and checks it against the backend registry. This one goes the other way.+"""++import json+import os+from pathlib import Path+from typing import Any++from invokeai.backend.architectures.capabilities import architecture_capabilities++FIXTURE_PATH = (+ Path(__file__).parents[3]+ / "invokeai"+ / "frontend"+ / "webv2"+ / "src"+ / "features"+ / "generation"+ / "core"+ / "__fixtures__"+ / "architectureCapabilities.json"+)++REGEN_HINT = (+ f"Regenerate it with:\n"+ f" REGEN_CAPABILITIES_FIXTURE=1 pytest {Path(__file__).name}\n"+ f"and commit the result, so webv2's tests and mock backend see what this backend serves."+)+++def _rendered() -> list[dict[str, Any]]:+ return [row.model_dump(mode="json") for row in architecture_capabilities()]+++def test_the_fixture_matches_what_the_endpoint_serves() -> None:+ rendered = _rendered()++ if os.environ.get("REGEN_CAPABILITIES_FIXTURE"):+ FIXTURE_PATH.write_text(+ json.dumps(rendered, indent=2, ensure_ascii=False) + "\n", encoding="utf-8", newline="\n"+ )++ assert FIXTURE_PATH.exists(), f"{FIXTURE_PATH} is missing. {REGEN_HINT}"+ committed = json.loads(FIXTURE_PATH.read_text(encoding="utf-8"))++ assert committed == rendered, (+ f"The committed capabilities fixture no longer matches this backend.\n{REGEN_HINT}\n"+ "If a field was renamed or removed, webv2's hand-written wire type in "+ "`features/generation/core/` needs the same edit -- that is what this test is for."+ )+++def test_every_architecture_webv2_can_generate_with_has_a_base_row() -> None:+ """The half that matters at runtime: a missing row means the Generate panel has no policy.++ Read from the graph-builder contract webv2 already writes for the invocation check, so the two+ cross-stack artifacts stay in step rather than each carrying their own list of architectures.+ """+ contract_path = FIXTURE_PATH.parents[1] / "__snapshots__" / "generateGraphNodeTypes.json"+ if not contract_path.exists():+ # The frontend test that writes it may not have run in this checkout; the invocation-side+ # test owns that failure, so do not duplicate it here.+ return++ generatable = set(json.loads(contract_path.read_text(encoding="utf-8"))["byBase"])+ served = {row["base"] for row in _rendered() if row["variant"] is None}++ assert generatable <= served, sorted(generatable - served)diff --git a/tests/backend/architectures/test_features.py b/tests/backend/architectures/test_features.pyindex fe418d0dec..ca16b6ced0 100644--- a/tests/backend/architectures/test_features.py+++ b/tests/backend/architectures/test_features.py@@ -165,3 +165,34 @@ def test_an_architecture_that_cannot_do_cfg_declares_no_cfg() -> None:if features.negative_prompt.usage == "never" and settings.cfg_scale != 1.0:contradictory.append(f"{base.value}: cfg_scale={settings.cfg_scale} but negative prompt is 'never'")assert contradictory == []+++def test_scheduler_applies_to_graph_matches_the_node() -> None:+ """The flag must agree with whether the denoise node actually takes a `scheduler` field.++ `scheduler_applies_to_graph` drives whether the UI offers a scheduler dropdown at all. Declaring+ it False for a node that reads one hides a control the graph honours and pins every generation+ to whatever the node defaults to; declaring it True for a node without the field offers a+ dropdown that reaches nothing.++ ERNIE-Image shipped the first of those: `ernie_image_denoise` builds its sampler from+ `ERNIE_IMAGE_SCHEDULER_MAP[self.scheduler]`, but the facet omitted the flag and it defaulted to+ False. Thirteen of the fourteen agreed; nothing compared them, so the one that did not was+ invisible.+ """+ schedulers = {+ cls.get_type(): "scheduler" in cls.model_json_schema()["properties"]+ for cls in InvocationRegistry.get_invocation_classes()+ }++ disagreements = []+ for base, node_type in sorted(DENOISE_NODE.items(), key=lambda item: item[0].value):+ features = get(base, FeaturesFacet)+ if features is None or node_type not in schedulers:+ continue+ if schedulers[node_type] != features.scheduler_applies_to_graph:+ disagreements.append(+ f"{base.value}: {node_type} has scheduler field = {schedulers[node_type]}, "+ f"facet declares scheduler_applies_to_graph = {features.scheduler_applies_to_graph}"+ )+ assert disagreements == []