Warn when a copy of `pipeline.blocks` is modified · Issue #15067 · huggingface/diffusers · GitHub
Skip to content

Warn when a copy of pipeline.blocks is modified #15067

Open

Description

@yiyixuxu

ModularPipeline.blocks returns a copy, so modifying it (e.g. pipe.blocks.sub_blocks.insert(...)) does not change the pipeline. This is intentional and documented (see the note under init_pipeline), but some users may assume they can modify the pipeline this way (see #12386). It would be better to warn and point to the correct approach: modify the blocks, then create a new pipeline with blocks.init_pipeline().

Posted by Claude Code on behalf of @yiyixuxu, with their approval.

Activity

  1. TherealArithmeticProgression commented on Oct 18, 2026

    @TherealArithmeticProgression

    Checked the page on the diffusers documentation and went through the warning (see screen snip attached). Could you please assign the issue to me? I'll begin working on this asap.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions