Skip to content

Support for Offset Noise in examples #2753

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

Merged
merged 2 commits into from
Mar 23, 2023
Merged

Conversation

haofanwang
Copy link
Contributor

As title.

Offset noise is a recent training trick introduced by crosslabs.

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Mar 20, 2023

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

@@ -297,6 +297,7 @@ def parse_args():
parser.add_argument(
"--enable_xformers_memory_efficient_attention", action="store_true", help="Whether or not to use xformers."
)
parser.add_argument("--noise_offset", type=float, default=0, help="The scale of noise offset.")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
parser.add_argument("--noise_offset", type=float, default=0, help="The scale of noise offset.")
parser.add_argument("--noise_offset", type=float, default=0, help="The scale of noise offset. See: https://www.crosslabs.org//blog/diffusion-with-offset-noise for more information.")

@@ -333,6 +333,7 @@ def parse_args():
parser.add_argument(
"--enable_xformers_memory_efficient_attention", action="store_true", help="Whether or not to use xformers."
)
parser.add_argument("--noise_offset", type=float, default=0, help="The scale of noise offset.")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
parser.add_argument("--noise_offset", type=float, default=0, help="The scale of noise offset.")
parser.add_argument("--noise_offset", type=float, default=0, help="The scale of noise offset. See: https://www.crosslabs.org//blog/diffusion-with-offset-noise for more information.")

Copy link
Contributor

@patrickvonplaten patrickvonplaten left a comment

Choose a reason for hiding this comment

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

Cool, looks good to me - @williamberman @sayakpaul can you also take a quick look?

Copy link
Member

@sayakpaul sayakpaul left a comment

Choose a reason for hiding this comment

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

Superb!

Just curious -- have you performed any experiments with noise offsets?

@haofanwang
Copy link
Contributor Author

I have used this in my personal project to achieve better dark lighting. @sayakpaul

@sayakpaul
Copy link
Member

Ah interesting!

I think once the code quality checks pass, we can merge this.

@haofanwang
Copy link
Contributor Author

Done. @sayakpaul

@sayakpaul sayakpaul merged commit e0d8c9e into huggingface:main Mar 23, 2023
@sayakpaul
Copy link
Member

Excellent! Well done 🔥

w4ffl35 pushed a commit to w4ffl35/diffusers that referenced this pull request Apr 14, 2023
AmericanPresidentJimmyCarter pushed a commit to AmericanPresidentJimmyCarter/diffusers that referenced this pull request Apr 26, 2024
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.

4 participants