Skip to content

[Core] Fix community pipeline initialization compatibility with primitive types#13874

Open
ProgramerSalar wants to merge 1 commit into
huggingface:mainfrom
ProgramerSalar:fix-issue-6969
Open

[Core] Fix community pipeline initialization compatibility with primitive types#13874
ProgramerSalar wants to merge 1 commit into
huggingface:mainfrom
ProgramerSalar:fix-issue-6969

Conversation

@ProgramerSalar
Copy link
Copy Markdown

What does this PR do?

This PR fixes Issue #6969.

When the image_encoder argument was added to the base pipeline, it shifted the order of positional arguments. This caused legacy community pipelines (like Bingsu/regional-prompter) that instantiate via super().__init__(...) with an ordered list to accidentally pass primitive types (like booleans) into the image_encoder slot. This resulted in an AttributeError: 'bool' object has no attribute '__module__' when the library attempted to register the module.

This PR adds a defensive type check isinstance(module, (bool, int, float, str)) inside _fetch_class_library_tuple to safely return None, None, allowing these legacy community pipelines to load seamlessly without crashing.

Fixes #6969

Before submitting

Who can review?

Core library:

@github-actions github-actions Bot added pipelines fixes-issue size/S PR with diff < 50 LOC labels Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expanded init fields in StableDiffusionPipeline cause incompatibilities with many/most inherited pipelines

1 participant