Skip to content

[FEATURE] Add native Qwen-Image 2.1 support - #51

Merged
lzx1413 merged 1 commit into
mainfrom
qwen_image_21
Sep 26, 2026
Merged

lzx1413 merged 1 commit into
mainfrom
qwen_image_21

Conversation

@lzx1413

@lzx1413 lzx1413 commented Sep 26, 2026

Copy link
Copy Markdown
Collaborator

Description

Integrate Qwen-Image 2.1 into TeleFuser with a locally implemented DiT and a stage-based pipeline for text-to-image generation, image editing, and reference-guided generation.

Motivation

Enable Qwen-Image 2.1 inference through TeleFuser’s existing pipeline and model-loading architecture, with runnable examples and service contract coverage.

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Documentation update

Changes Made

  • Implement the Qwen-Image 2.1 DiT and compose text encoding, denoising, and VAE stages using ModuleManager.
  • Add text-to-image, edit, and reference examples with defaults declared directly in Python. The reference example uses the official five-image “Outfit styling” case.
  • Update the example README and add example registry and service parity tests.

Testing

  • Focused unit tests pass: 69 tests
  • Manual reference generation performed on physical GPU 3
  • Benchmarks added or updated
pytest -q tests/unit/service/test_example_service_parity.py tests/unit/test_example_registry.py
ruff check examples/qwen_image telefuser/models/qwen_image_21_dit.py telefuser/pipelines/qwen_image tests/unit/service/test_example_service_parity.py tests/unit/test_example_registry.py
CUDA_VISIBLE_DEVICES=3 python examples/qwen_image/qwen_image_21_reference_h100.py \
  --output_path work_dirs/qwen-image-2.1-reference.png

The 40-step reference run produced a valid 1024×1024 image. Python syntax and diff checks passed.

Checklist

  • Code follows the project’s coding standards; ruff and ruff-format commit hooks passed
  • Full pre-commit suite run (pre-commit run --all-files)
  • Full test suite passes (pytest tests/)
  • New focused tests added
  • Documentation updated
  • Commit message is clear and descriptive
  • PR title follows the [TYPE] Brief description convention

Related Issues

None linked.

Additional Notes

The existing service schema accepts one reference image per request. The five-image official example runs through the CLI without adding a new service interface.

GPU Architecture Support

No kernels were added or modified. Inference was validated on an H100 (SM90).

Performance Impact

No performance benchmark was run; this PR makes no performance claim.

Implement the Qwen-Image 2.1 DiT and compose text encoding, denoising, and VAE stages with ModuleManager loading.

Add text-to-image, edit, and five-image reference examples with inline defaults, official reference assets, and README documentation. Include focused example registry and service parity coverage.

Verified with 69 focused pytest cases, ruff, syntax and diff checks, and a 40-step reference generation on physical GPU 3.
@lzx1413 lzx1413 mentioned this pull request Sep 26, 2026
33 tasks
@lzx1413
lzx1413 merged commit 8c1333d into main Sep 26, 2026
7 checks passed
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.

1 participant