-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix AutoPipeline from_pipe
where source pipeline is missing target pipeline's optional components
#10400
Fix AutoPipeline from_pipe
where source pipeline is missing target pipeline's optional components
#10400
Conversation
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. |
Hey @hlky , I was able to run the As for the code, I was able to find "target pipeline's optional components" included along with other components as you mentioned in the description. Thanks for the PR. |
@@ -528,7 +528,12 @@ def from_pipe(cls, pipeline, **kwargs): | |||
if k not in text_2_image_kwargs | |||
} | |||
|
|||
missing_modules = set(expected_modules) - set(pipeline._optional_components) - set(text_2_image_kwargs.keys()) | |||
missing_modules = ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think maybe
missing_modules = set(expected_modules) - set(text_2_image_cls._optional_components) - set(text_2_image_kwargs.keys())
Because if one component is optional for the other pipe (the pipe as in .from_pipe(pipe)
) but it's not optional for the target pipe (text_2_image here) - it is still missing, no?
Just a thought: I didn't run any tests, I think it might a bug we had and was able to get away with this because the _optional_componentes
is usually the same among different tasks for the same model group
so please let me know if it is the case:)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
…pipeline's optional components (#10400) * Optional components in AutoPipeline * missing_modules --------- Co-authored-by: YiYi Xu <[email protected]>
What does this PR do?
Flux IPAdapter introduced optional components
feature_extractor
andimage_encoder
to FluxPipeline, the changes have not yet been replicated to Img2Img/Inpaint pipelines, when checking for missing modules infrom_pipe
we consider the target pipeline'sexpected_modules
and the source pipeline's_optional_components
, we should also consider the target pipeline's optional components.Fixes #10399
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.
@yiyixuxu @vladmandic