Skip to content

[tests] refactor stable diffusion pipeline tests - #14339

Open
sayakpaul wants to merge 3 commits into
mainfrom
refactor-sd-pipe-tests
Open

[tests] refactor stable diffusion pipeline tests#14339
sayakpaul wants to merge 3 commits into
mainfrom
refactor-sd-pipe-tests

Conversation

@sayakpaul

Copy link
Copy Markdown
Member

No description provided.

@sayakpaul
sayakpaul requested review from DN6 and dg845 July 30, 2026 12:24
@github-actions github-actions Bot added tests size/L PR with diff > 200 LOC labels Jul 30, 2026
@Cyb3rLab5

Copy link
Copy Markdown

Nice work

@Cyb3rLab5 Cyb3rLab5 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Wow. Nice work

@require_torch_accelerator
class StableDiffusionPipelineSlowTests(unittest.TestCase):
def setUp(self):
class TestStableDiffusionPipelineSlow:

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.

I say we just consolidate all tests that use real checkpoints under the nightly decorator.

image_params = IMAGE_TO_IMAGE_IMAGE_PARAMS
image_latents_params = IMAGE_TO_IMAGE_IMAGE_PARAMS
callback_cfg_params = TEXT_TO_IMAGE_CALLBACK_CFG_PARAMS
required_input_params_in_call_signature = TEXT_GUIDED_IMAGE_VARIATION_PARAMS - {"height", "width"}

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.

Nit. Instead of this set manipulation, I prefer just defining the frozen_set explicitly. It is easier to understand.

inputs = self.get_dummy_inputs(device)
image = sd_pipe(**inputs).images
original_image_slice = image[0, -3:, -3:, -1]
original_image_slice = sd_pipe(**self.get_dummy_inputs()).images[0, -1, -3:, -3:]

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.

Let's use cached pipeline output?

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

Labels

size/L PR with diff > 200 LOC tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants