Skip to content

[CI] Add GLM Image Transformer Model Tests#13344

Merged
DN6 merged 5 commits intomainfrom
glmimage-refactor
Apr 7, 2026
Merged

[CI] Add GLM Image Transformer Model Tests#13344
DN6 merged 5 commits intomainfrom
glmimage-refactor

Conversation

@DN6
Copy link
Copy Markdown
Collaborator

@DN6 DN6 commented Mar 26, 2026

What does this PR do?

Fixes # (issue)

Before submitting

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@DN6 DN6 requested review from dg845 and yiyixuxu March 27, 2026 07:51
Copy link
Copy Markdown
Collaborator

@yiyixuxu yiyixuxu left a comment

Choose a reason for hiding this comment

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

looks good to me,
but it's currently failing though


@property
def output_shape(self) -> tuple:
return (16, 8, 8)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can you check the output shape here? It looks like the model output shape is the same as the input shape (4, 8, 8), so setting output_shape to (16, 8, 8) causes training tests such as TestGlmImageTransformerTraining.test_training to fail with a shape error.

Copy link
Copy Markdown
Collaborator

@dg845 dg845 left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! Left one question about the test output shape.

In addition to the tests which failed in the latest CI run (https://github.com/huggingface/diffusers/actions/runs/23590953774/job/68695918619?pr=13344), I also got the following test failures locally:

  1. TestGlmImageTransformerCompile.test_torch_compile_repeated_blocks: I think this can be fixed by setting _repeated_blocks = ["GlmImageTransformerBlock"] in GlmImageTransformer2DModel.
  2. TestGlmImageTransformer.test_model_parallelism: it looks like some submodules in GlmImageCombinedTimestepSizeEmbeddings might end up on different devices, causing a device mismatch error. Could you look into it?

@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@github-actions github-actions Bot added the size/M PR with diff < 200 LOC label Apr 7, 2026
@DN6 DN6 merged commit a2583e5 into main Apr 7, 2026
17 of 18 checks passed
@DN6
Copy link
Copy Markdown
Collaborator Author

DN6 commented Apr 7, 2026

@dg845 Thanks for flagging. Fixed the issues 👍🏽

terarachang pushed a commit to terarachang/diffusers that referenced this pull request Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

models size/M PR with diff < 200 LOC tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants