Skip to content

add modular pipeline for qwen-image 2.1 - #14976

Open
akshan-main wants to merge 1 commit into
huggingface:mainfrom
akshan-main:qwenimage21-modular
Open

akshan-main wants to merge 1 commit into
huggingface:mainfrom
akshan-main:qwenimage21-modular

Conversation

@akshan-main

@akshan-main akshan-main commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds a modular pipeline for Qwen-Image 2.1: QwenImage21AutoBlocks + QwenImage21ModularPipeline, covering text-to-image and image-conditioned generation with one or more condition images. Same shape as flux2 (text_encoder / vae_encoder / denoise / decode, with the image-conditioned variants selected on image and image_latents). The denoiser is shared by both workflows and keeps one prefix KV cache per guidance branch, so the cache also works when the guider starts or stops mid-run. sample_sigmas is a pipeline config, so the checkpoint's grid loads from model_index.json as in QwenImage21Pipeline.

Outputs match QwenImage21Pipeline exactly with shared components and seed, on the tiny components and on Qwen/Qwen-Image-2.1 in bf16 (text-to-image, edit, two-image edit, with and without guidance and the KV cache). Test components live in akshan-main/tiny-qwenimage21-modular-pipe.

Also registers QwenImage21Pipeline in the auto text-to-image mapping so ModularPipeline.from_pretrained("Qwen/Qwen-Image-2.1") resolves the modular class, and makes the test helper that reads modular_model_index.json skip null config values.

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline?
  • Did you read our philosophy doc (important for complex PRs)?
  • Was this discussed/approved via a GitHub issue or the forum? Discussed on Slack with @sayakpaul @yiyixuxu
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

Who can review?

@yiyixuxu @sayakpaul

@github-actions github-actions Bot added size/L PR with diff > 200 LOC documentation Improvements or additions to documentation tests modular-pipelines utils pipelines and removed size/L PR with diff > 200 LOC labels Oct 7, 2026
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Hi @akshan-main, thanks for the PR! It does not appear to link an issue it fixes. If this PR addresses an existing issue, please add a closing keyword (e.g. Fixes #1234) to the PR description so the issue is linked. See the contribution guide for more details. If this PR intentionally does not fix a tracked issue, a maintainer can add the no-issue-needed label to silence this reminder.

Please note that PRs without a linked issue are likely to be automatically closed 10 days after this notice.

Once the PR links an issue (or gets the no-issue-needed label), you can ignore this message — it stays here as a comment, but it no longer applies.

@yiyixuxu yiyixuxu added the no-issue-needed for PRs that do not require link to an issue label Oct 7, 2026

This branch has not been deployed

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

Labels

documentation Improvements or additions to documentation modular-pipelines no-issue-needed for PRs that do not require link to an issue pipelines tests utils

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants