Skip to content

feat: add TAEQI2.1 support for Qwen Image 2.1 - #2123

Merged
leejet merged 1 commit into
masterfrom
feat/taeqi2-1-support
Oct 10, 2026
Merged

leejet merged 1 commit into
masterfrom
feat/taeqi2-1-support

Conversation

@leejet

@leejet leejet commented Oct 10, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Add TAEQI2.1 encoding, decoding, and previews for Qwen Image 2.1, with 64-channel latents, 16x spatial compression, and RGBA output.

Related Issue / Discussion

N/A

Additional Information

N/A

Checklist

Summary by CodeRabbit

  • New Features
    • Added TAE support for Qwen Image 2.1, including image encoding, decoding, and previews.
    • Supports 64-channel latents, 16× spatial scaling, and RGBA images. Official safetensors weights can be used without conversion.
  • Documentation
    • Added setup and usage instructions for encoding, decoding, and generating previews with Qwen Image 2.1.

@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e33cf889-4087-49d6-b35d-6b6a45f02e04

📥 Commits

Reviewing files that changed from the base of the PR and between b7a74e6 and 690d504.


📒 Files selected for processing (4)
  • docs/qwen_image_2.1.md
  • docs/taesd.md
  • src/model/vae/tae.hpp
  • src/pipeline/model_builders.cpp

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.



📝 Walkthrough

Walkthrough

Adds Qwen Image 2.1 support to TAESD with a 16-channel image representation, 64 latent channels, and patch size 2. The model builder selects the image autoencoder path. Documentation describes weight download and CLI usage for encoding, decoding, and previews.

Changes

Qwen Image 2.1 TAE Support

Layer / File(s) Summary
TAESD f16 model support
src/model/vae/tae.hpp
TinyEncoder and TinyDecoder accept an f16 mode. For Qwen Image 2.1, TAESD enables that mode, sets 64 latent channels, patchifies encoder input, and unpatchifies decoder output.
Model selection and usage instructions
src/pipeline/model_builders.cpp, docs/taesd.md, docs/qwen_image_2.1.md
create_tae selects TinyImageAutoEncoder for Qwen Image 2.1. The documentation adds TAEQI2.1 setup and CLI instructions for encoding, decoding, and previews.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Suggested reviewers: stduhpf, carlgao4


Merge Risk | ⚪ Minimal · up to 690d5

Merge Risk: ⚪ Minimal · up to 690d5

No actionable issue was established in the Qwen Image 2.1 TAE changes. The PR is mergeable after normal checks, though loading the official checkpoint remains untested.

Security Architecture Review

Security architecture risk: 🔵 Low · up to 690d5

The change remains within the existing local processing boundary, with no demonstrated expansion of privileges. Risk is low rather than minimal because malformed-input behavior and exposure through external integrations are not fully established.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The demonstrated exposure is image and latent processing within the caller's existing inference process and backend. Malformed-input failures could affect that process's availability, but the inspected construction and execution paths establish no new privilege or cross-tenant transition. Deployment-specific tenant sharing and external access to low-level C++ entrypoints remain unknown.

Trust Boundaries and Controls

  • observed — The inspected init-image path normalizes image channels before encoding. Model metadata validation rejects missing required sources and mismatched registered tensor dimensions. These controls predate the PR and remain on the selected processing path; they do not establish complete validation of arbitrary direct decode inputs or checkpoint authenticity.

Resilience and Maintainability Implications

  • inferred — Ordinary execution failures retain existing cleanup and retry containment rather than introducing a new persistent transition. Reentrant graph execution is rejected by the existing active-state guard, but this is not evidence of thread-safe concurrent use. Stronger cancellation and interruption guarantees remain unestablished.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 2 files. (2 skipped: 2 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: adding TAEQI2.1 support for Qwen Image 2.1.
Description check Passed The description includes all required sections, explains the change, identifies related issues as N/A, provides additional information as N/A, and confirms the contribution checklist.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 2 files. (2 skipped: 2 unsupported.)


  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR


🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

🔧 Cppcheck (2.22.0)
src/pipeline/model_builders.cpp

Cppcheck timed out; analysis of this file is incomplete



Comment @coderabbitai help to get the list of available commands.

@leejet
leejet merged commit 2988060 into master Oct 10, 2026
11 checks passed
@leejet
leejet deleted the feat/taeqi2-1-support branch October 10, 2026 16:01
@stduhpf

stduhpf commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

Oh.
I think I started working on this right before you merged it, I was confused why I had conficts when trying to rebase my implementation on lastest master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants