fix support multi-subfolder downloads for Z-Image Qwen3 encoder #8692
+154
−37
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fix Z-Image Qwen3 text encoder installation failing with "Could not identify model" error.
The Z-Image Qwen3 text encoder requires both
text_encoderandtokenizersubfolders from the HuggingFace repo, but the previous implementation only downloaded thetext_encodersubfolder. This caused the model probe to fail because:text_encoder/config.jsonbut foundconfig.jsondirectly in the model rootChanges:
subfoldersproperty toHFModelSourcesupporting+separated paths (e.g.,text_encoder+tokenizer)filter_files()anddownload_urls()to handle multiple subfolders_multifile_download()to preserve subfolder structure when downloading multiple subfoldersQwen3Encoderprobe check both nested (text_encoder/config.json) and direct (config.json) pathsQwen3EncoderLoaderto handle both directory structurestext_encodertotext_encoder+tokenizerRelated Issues / Discussions
Fixes Z-Image Turbo Qwen3 text encoder installation error.
QA Instructions
Merge Plan
Standard merge, no special considerations.
Checklist
What's Newcopy (if doing a release after this PR)