Skip to content

Conversation

sayakpaul
Copy link
Member

What does this PR do?

Calling pipe.enable_vae_tiling() is same calling pipe.vae.enable_tiling(). Same applies for slicing, too.

We can remove these methods to encourage users to be more explicit (in this case even the line of code doesn't change).

This PR starts a deprecation cycle for these methods.

@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.

@@ -1705,6 +1705,12 @@ def enable_vae_tiling(self):
compute decoding and encoding in several steps. This is useful for saving a large amount of memory and to allow
processing larger images.
"""
depr_message = "Calling `enable_vae_tiling()` on a `DiffusionPipeline` is deprecated and this method will be removed in a future version. Please use `pipe.vae.enable_tiling()`."
Copy link
Collaborator

Choose a reason for hiding this comment

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

Perhaps use "Calling enable_vae_tiling() on a {cls.__name__} is deprecated`? So the specific pipeline name shows up in the message?

Copy link
Collaborator

@DN6 DN6 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. Just minor comment about the warning message.

@sayakpaul sayakpaul requested a review from DN6 September 9, 2025 13:49
@sayakpaul sayakpaul merged commit 5e181ed into main Sep 11, 2025
33 of 34 checks passed
@sayakpaul sayakpaul deleted the deprecate-slicing-tiling-pipe branch September 11, 2025 04:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants