Skip to content

Conversation

@Pfannkuchensack
Copy link
Collaborator

Summary

Fix Z-Image Qwen3 text encoder installation failing with "Could not identify model" error.

The Z-Image Qwen3 text encoder requires both text_encoder and tokenizer subfolders from the HuggingFace repo, but the previous implementation only downloaded the text_encoder subfolder. This caused the model probe to fail because:

  1. The tokenizer files were missing
  2. The probe expected text_encoder/config.json but found config.json directly in the model root

Changes:

  • Add subfolders property to HFModelSource supporting + separated paths (e.g., text_encoder+tokenizer)
  • Extend filter_files() and download_urls() to handle multiple subfolders
  • Update _multifile_download() to preserve subfolder structure when downloading multiple subfolders
  • Make Qwen3Encoder probe check both nested (text_encoder/config.json) and direct (config.json) paths
  • Update Qwen3EncoderLoader to handle both directory structures
  • Change starter model source from text_encoder to text_encoder+tokenizer

Related Issues / Discussions

Fixes Z-Image Turbo Qwen3 text encoder installation error.

QA Instructions

  1. Start InvokeAI
  2. Go to Model Manager → Starter Models
  3. Install "Z-Image Qwen3 Text Encoder"
  4. Verify the model installs successfully without errors
  5. Verify the model appears in the model list with correct type (Qwen3Encoder)

Merge Plan

Standard merge, no special considerations.

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
  • Documentation added / updated (if applicable)
  • Updated What's New copy (if doing a release after this PR)

…n3 encoder

The Z-Image Qwen3 text encoder requires both text_encoder and tokenizer
subfolders from the HuggingFace repo, but the previous implementation
only downloaded the text_encoder subfolder, causing model identification
to fail.

Changes:
- Add subfolders property to HFModelSource supporting '+' separated paths
- Extend filter_files() and download_urls() to handle multiple subfolders
- Update _multifile_download() to preserve subfolder structure
- Make Qwen3Encoder probe check both nested and direct config.json paths
- Update Qwen3EncoderLoader to handle both directory structures
- Change starter model source to text_encoder+tokenizer
@github-actions github-actions bot added python PRs that change python files backend PRs that change backend files services PRs that change app services labels Dec 23, 2025
@github-actions github-actions bot added the frontend PRs that change frontend files label Dec 23, 2025
Copy link
Collaborator

@lstein lstein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works as advertised. Code reviewed: no issues detected.

@lstein lstein merged commit 21138e5 into invoke-ai:main Dec 24, 2025
13 checks passed
@Pfannkuchensack Pfannkuchensack deleted the fix/z-image-qwen3-encoder-install branch December 24, 2025 16:52
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 services PRs that change app services

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants