Skip to content

fix pipeline __setattr__ value == None #3063

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

Conversation

williamberman
Copy link
Contributor

No description provided.

Comment on lines 510 to 515
if hasattr(self, name) and hasattr(self.config, name):
# We need to overwrite the config if name exists in config
if isinstance(getattr(self.config, name), (tuple, list)):
if self.config[name][0] is not None:
if value is not None and self.config[name][0] is not None:
class_library_tuple = (value.__module__.split(".")[0], value.__class__.__name__)
else:
Copy link
Contributor Author

@williamberman williamberman Apr 12, 2023

Choose a reason for hiding this comment

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

the setting value can be None with a defined class library tuple on the config -- i.e. if the text encoder is an optional component

I think overwriting the config class library tuple to None in this case is not ideal but acceptable as it isn't common behavior

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Apr 12, 2023

The documentation is not available anymore as the PR was closed or merged.

@patrickvonplaten patrickvonplaten merged commit 639f645 into huggingface:main Apr 12, 2023
w4ffl35 pushed a commit to w4ffl35/diffusers that referenced this pull request Apr 14, 2023
* fix pipeline __setattr__

* add test

---------

Co-authored-by: Patrick von Platen <[email protected]>
dg845 pushed a commit to dg845/diffusers that referenced this pull request May 6, 2023
* fix pipeline __setattr__

* add test

---------

Co-authored-by: Patrick von Platen <[email protected]>
yoonseokjin pushed a commit to yoonseokjin/diffusers that referenced this pull request Dec 25, 2023
* fix pipeline __setattr__

* add test

---------

Co-authored-by: Patrick von Platen <[email protected]>
AmericanPresidentJimmyCarter pushed a commit to AmericanPresidentJimmyCarter/diffusers that referenced this pull request Apr 26, 2024
* fix pipeline __setattr__

* add test

---------

Co-authored-by: Patrick von Platen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants