Skip to content

[bug]: XLabs FLUX ControlNet v3 checkpoints are installed as FLUX main models #9832

Closed

Description

@Pfannkuchensack

Is there an existing issue for this problem?

  • I have searched the existing issues

Install method

Manual (development checkout)

Operating system

Windows 10

GPU vendor

Nvidia (CUDA)

GPU model

RTX 4090

GPU VRAM

24 GB

Version number

main at 8111b50 (7.0.0-alpha.1)

Browser

None (model installed through the API)

System Information

Python 3.12, torch 2.13.0+cu130

What happened

Installing flux-canny-controlnet-v3.safetensors from XLabs-AI/flux-controlnet-collections registers it as a FLUX main model (type: main, base: flux, format: checkpoint) instead of a ControlNet. It then does not show up where ControlNets are chosen and cannot be used as one.

What you expected to happen

The file is registered as a FLUX ControlNet (type: controlnet, base: flux, format: checkpoint).

How to reproduce the problem

  1. Download flux-canny-controlnet-v3.safetensors from XLabs-AI/flux-controlnet-collections (1.39 GiB).
  2. Install it from its local path, e.g. POST /api/v2/models/install?source=<path>&inplace=true with body {}.
  3. The new model record has type: main.

Additional context

Both config classes match the file, and the main model wins:

  • Main model. Main_Checkpoint_FLUX_Config._validate_is_flux (invokeai/backend/model_manager/configs/main.py) accepts any state dict containing double_blocks.0.img_attn.norm.key_norm.scale. The XLabs ControlNet has two FLUX double blocks, so it contains that key.
  • ControlNet. ControlNet_Checkpoint_FLUX_Config matches too, since is_state_dict_xlabs_controlnet recognises the file. The comment in _validate_looks_like_controlnet (configs/controlnet.py) already notes that XLabs ControlNets also contain double_blocks. keys.
  • Tie-break. ModelConfigFactory.matches_sort_key (configs/factory.py) ranks ModelType.Main first, so the main config is chosen.

The file's 86 tensors fall under these prefixes: controlnet_blocks, double_blocks, guidance_in, img_in, input_hint_block, pos_embed_input, time_in, txt_in, vector_in. There are no single_blocks or final_layer keys, which every FLUX.1 main checkpoint has.

Possible fix: let _validate_is_flux reject state dicts that is_state_dict_xlabs_controlnet or is_state_dict_instantx_controlnet recognise, or require a main-only key such as final_layer.linear.weight.

Workaround: install with an explicit type, i.e. body {"type": "controlnet", "base": "flux"}. The model then loads and works as a ControlNet; a FLUX.1 dev generation with a canny control image succeeded.

Activity

  1. added a commit that references this issue on Oct 17, 2026
    ac27b56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions