Skip to content

Conversation

@sayakpaul
Copy link
Member

What does this PR do?

Adds tests for the newly added QwenImage layer model.

First, this PR fixes how we return the outputs; otherwise, we run into:

FAILED tests/pipelines/qwenimage/test_qwenimage_layered.py::QwenImageLayeredPipelineFastTests::test_callback_inputs - UnboundLocalError: local variable 'images' referenced before assignment

Second, we need to decide how to tackle this situation (which is fairly common across all failures):

FAILED tests/pipelines/qwenimage/test_qwenimage_layered.py::QwenImageLayeredPipelineFastTests::test_attention_slicing_forward_pass - TypeError: unsupported operand type(s) for -: 'list' and 'list'

Unlike other pipelines, we're always returning a list[Image.Image | np.ndarray | torch.Tensor]. One solution could be to apply np.stack() or torch.stack when output_type="np" or output_type="pt".

Cc: @yiyixuxu @naykun

@HuggingFaceDocBuilderDev

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.

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