Skip to content

fix: remove FP4 Mistral starter, fix model rename validation, limit Z-Image to Qwen3 4B encoders - #9587

Open
Pfannkuchensack wants to merge 4 commits into
invoke-ai:mainfrom
Pfannkuchensack:fix/small_v6_fixes
Open

Pfannkuchensack wants to merge 4 commits into
invoke-ai:mainfrom
Pfannkuchensack:fix/small_v6_fixes

Conversation

@Pfannkuchensack

Copy link
Copy Markdown
Member

Summary

Three small, independent fixes, one commit each.

1. Remove the FLUX.2 [dev] FP4 Mistral encoder starter model (#9565)
The Mistral loader has no FP4 support. Users downloaded 12.3 GB and got a shape mismatch at the first generation. This removes the starter entry and drops FP4 from the recommended encoders in the loader's 40-layer Mistral warning. The GGUF and FP8/BF16 variants are unaffected.

2. Model rename: accept 3-character names and re-enable Save (#9364)
Adopted from #9419 by @leepokai, who closed it because they could not follow up. The change is unmodified and they are credited as co-author.

  • The name validator required length > 3 while its message says "at least 3 characters". It now uses >= 3.
  • The Save button was gated on the number of keys in formState.errors, which could stay stale after clearing and retyping the name. It is now gated on !formState.isValid, the same pattern SystemPromptForm uses.

3. Only offer Qwen3 4B encoders for Z-Image (#9526)
Z-Image consumes 2560-wide embeddings. Three places also accepted Klein 9B's 8B encoder (4096 wide), which fails at the first denoise step:

  • the encoder picker (useQwen3EncoderModels)
  • the auto-default when switching to Z-Image (selectQwen3EncoderModels)
  • metadata recall (isQwen3EncoderModelConfig)

All three now use a new isZImageQwen3EncoderModelConfig guard (variant === 'qwen3_4b'), with a matching hook and selector. variant is required on all Qwen3 encoder configs, so no installed encoder is hidden by mistake.

Users who already have an 8B encoder in the Z-Image slot would see an empty picker while generation still fails. For them, readiness now reports "Selected Qwen3 Encoder is incompatible with Z-Image". The slot's config is resolved in the caller, following the existing wanWiredConfigs pattern. The now unused selectQwen3EncoderModels export is removed. The new i18n key is added to en.json only.

Related Issues / Discussions

Closes #9565
Closes #9364
Closes #9526

Supersedes #9419

QA Instructions

Automated (run locally):

  • tsc --noEmit, eslint, prettier --check, knip: clean
  • vitest on readiness.test.ts, parsing.test.tsx, modelSelected.test.ts: 226/226 passing. New tests:
    • readiness: an 8B encoder in the Z-Image slot produces the incompatibility reason, a 4B encoder does not
    • metadata: ZImageQwen3EncoderModel rejects an 8B encoder
    • listener: the Z-Image encoder slot defaults from the 4B pool, and stays empty when that pool is empty
  • ruff check and ruff format --check on the two Python files: clean. The starter list imports with no dangling reference.

I have not tested these changes manually in the running app. Suggested manual checks:

  1. FP4 starter: Model Manager → Starter Models → FLUX.2 [dev]. The "Mistral Encoder (Comfy FP4 mixed)" entry is gone.
  2. Rename: Model Manager → select a model → Edit → delete the whole name → type a new name of 3 or more characters. Save is enabled, and a 3-character name saves.
  3. Z-Image encoder: Install the "FLUX.2 Klein Qwen3 8B Encoder" and a Z-Image Qwen3 4B encoder.
    • Select a Z-Image model: the encoder picker lists only the 4B encoder.
    • With no Z-Image diffusers model installed, switch from another base to Z-Image: the encoder slot defaults to the 4B encoder.
    • With an 8B encoder already in the slot from a previous version, the Invoke button shows the incompatibility reason.

Merge Plan

No special considerations. The redux state shape is unchanged (no slice or migration changes). A slot that still holds an 8B encoder keeps its value and is only flagged by readiness.

Checklist

  • The PR has a short but descriptive title, suitable for a changelog
  • Tests added / updated (if applicable)
  • ❗Changes to a redux slice have a corresponding migration (n/a, no slice changes)
  • Documentation added / updated (if applicable) (n/a)
  • Updated What's New copy (if doing a release after this PR)

Pfannkuchensack and others added 3 commits September 13, 2026 22:55
The loader has no FP4 support, so the 12.3 GB download failed with a
shape mismatch at the first generation. Also drop FP4 from the
recommended encoders in the 40-layer Mistral warning.

Closes invoke-ai#9565
… clearing the name

The name validator required more than 3 characters while its message
says "at least 3". Save was gated on the error count, which could stay
stale after clearing and retyping the name; gate it on isValid instead.

Adopted from invoke-ai#9419.

Closes invoke-ai#9364

Co-authored-by: leepokai <109857817+leepokai@users.noreply.github.com>
Z-Image consumes 2560-wide embeddings, but the encoder picker, the
auto-default on model switch and metadata recall all accepted Klein
9B's 8B encoder (4096 wide), which fails at the first denoise step.

Narrow all three to qwen3_4b, and add a readiness reason for a slot
that still holds an 8B encoder from before this change - the picker
no longer shows it, so the slot would otherwise look valid.

Closes invoke-ai#9526
@github-actions github-actions Bot added python PRs that change python files backend PRs that change backend files frontend PRs that change frontend files labels Sep 13, 2026
@Pfannkuchensack Pfannkuchensack moved this from 6.14.2 to 6.14.1: Bug fixes to 6.14.0 in Invoke - Community Roadmap Sep 13, 2026
@Pfannkuchensack Pfannkuchensack moved this from 6.14.1: Bug fixes to 6.14.0 to 6.14.2 in Invoke - Community Roadmap Sep 13, 2026
The auto-default on switching to Z-Image dispatched only key, name and
base. The reducer parses with zModelIdentifierField, which requires hash
and type, so it dropped the payload and the encoder slot stayed empty.
Send the full identifier like the VAE and Anima defaults do, and type
the reducer's payload as ModelIdentifierField so the compiler catches
this shape.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend PRs that change backend files frontend PRs that change frontend files python PRs that change python files

Projects

Status: 6.14.2

2 participants