Skip to content

[CI] Add GLM Image Transformer Model Tests#13344

Open
DN6 wants to merge 1 commit intomainfrom
glmimage-refactor
Open

[CI] Add GLM Image Transformer Model Tests#13344
DN6 wants to merge 1 commit 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?

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.

3 participants