Skip to content

Conversation

@clinty
Copy link
Contributor

@clinty clinty commented Mar 27, 2024

FlaxStableDiffusionSafetyChecker sets main_input_name to "clip_input". This makes StableDiffusionSafetyChecker consistent.

FlaxStableDiffusionSafetyChecker sets main_input_name to "clip_input".
This makes StableDiffusionSafetyChecker consistent.
@sayakpaul sayakpaul requested a review from pcuenca March 28, 2024 08:28
@pcuenca
Copy link
Member

pcuenca commented Mar 28, 2024

Hi @clinty! Thanks for the contribution. However, I'd like to understand what purpose it serves or how you expect this to be used. Unlike in the transformers codebase, main_input_name is not used in diffusers (except for some tests). Are you experiencing any shortcomings because it's not defined in StableDiffusionSafetyChecker?

@clinty
Copy link
Contributor Author

clinty commented Mar 28, 2024

@pcuenca only confusion on my part when I checked the value and found it to be input_ids and not one of the two valid inputs. I am not aware of any code which is using this.

@pcuenca
Copy link
Member

pcuenca commented Mar 28, 2024

Ah, it's set to a default value. In that case I'd support changing it to avoid confusion. I triggered a CI run, copying @sayakpaul as this affects the PyTorch implementation

Copy link
Member

@pcuenca pcuenca left a comment

Choose a reason for hiding this comment

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

LGTM as long as tests pass.

@sayakpaul sayakpaul requested a review from yiyixuxu March 28, 2024 13:21
@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.

@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

@github-actions github-actions bot added the stale Issues that haven't received updates label Apr 27, 2024
@clinty
Copy link
Contributor Author

clinty commented Apr 29, 2024

The test failure has the appearance of something transient.

@github-actions github-actions bot removed the stale Issues that haven't received updates label Apr 29, 2024
@yiyixuxu yiyixuxu merged commit f53352f into huggingface:main Apr 29, 2024
@clinty clinty deleted the sd-safety-checker-main-input branch May 4, 2024 14:15
sayakpaul added a commit that referenced this pull request Dec 23, 2024
…7500)

FlaxStableDiffusionSafetyChecker sets main_input_name to "clip_input".
This makes StableDiffusionSafetyChecker consistent.

Co-authored-by: Sayak Paul <[email protected]>
Co-authored-by: YiYi Xu <[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.

5 participants