Skip to content

feat: denoise strength as starting noise level#1738

Open
stduhpf wants to merge 1 commit into
leejet:masterfrom
stduhpf:denoise-strength
Open

feat: denoise strength as starting noise level#1738
stduhpf wants to merge 1 commit into
leejet:masterfrom
stduhpf:denoise-strength

Conversation

@stduhpf

@stduhpf stduhpf commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Currently, in img2img mode, the strength parameter simply determines how many denoising steps to skip (e.g., a strength of 0.7 skips the first 30% of steps). This is a simple and familliar behavior, probably inherited from legacy engines like Automatic1111.

The issue with this approach is that it doesn't align with the intuitive meaning of "denoising strength," and the actual amount of noise added is heavily dependent on the specific scheduler being used.

This PR introduces an alternative interpretation of the strength parameter, treating it as a noise level rather than a step count. When enabled, a strength of 0.7 ensures that denoising begins at the step where the model's input is approximately a mix of 70% noise and 30% initial image.

Key Changes:

  • Noise-based Strength: Allows strength to control the actual noise ratio. Depending on the scheduler and model, this may produce significantly different results than the default step-skipping method.
  • Sigma Adjustment: Added an optional mechanism to edit the first step's sigmas to exactly match the requested noise level. Since this modifies the schedule, it is disabled by default.
  • Backward Compatibility: To avoid breaking existing workflows, these features are disabled by default.

Configuration:
These can be enabled via the --extra-sample-args argument using the following boolean fields:

  • strength_as_noise_level
  • force_first_sigma

Related Issue / Discussion

N/A

Additional Information

With dreamshaper v8 (unet/diffusion):

Default behavior:

strength 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
default scheduler output_0 1_standard output_0 2_standard output_0 3_standard output_0 4_standard output_0 5_standard output_0 6_standard output_0 7_standard output_0 8_standard output_0 9_standard
karras scheduler output_0 1_standard output_0 2_standard output_0 3_standard output_0 4_standard output_0 5_standard output_0 6_standard output_0 7_standard output_0 8_standard output_0 9_standard

Enabling strength_as_noise_level=on:

strength 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
default scheduler output_0 1_noise_level output_0 2_noise_level output_0 3_noise_level output_0 4_noise_level output_0 5_noise_level output_0 6_noise_level output_0 7_noise_level output_0 8_noise_level output_0 9_noise_level
karras scheduler output_0 1_noise_level output_0 2_noise_level output_0 3_noise_level output_0 4_noise_level output_0 5_noise_level output_0 6_noise_level output_0 7_noise_level output_0 8_noise_level output_0 9_noise_level

Enabling strength_as_noise_level=on,force_first_sigma=on:

strength 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
default scheduler output_0 1_sigma_on output_0 2_sigma_on output_0 3_sigma_on output_0 4_sigma_on output_0 5_sigma_on output_0 6_sigma_on output_0 7_sigma_on output_0 8_sigma_on output_0 9_sigma_on
karras scheduler output_0 1_sigma_on output_0 2_sigma_on output_0 3_sigma_on output_0 4_sigma_on output_0 5_sigma_on output_0 6_sigma_on output_0 7_sigma_on output_0 8_sigma_on output_0 9_sigma_on

With Flux2 Klein 4b (DiT/Flow):

strength 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
default output_0 1_standard output_0 2_standard output_0 3_standard output_0 4_standard output_0 5_standard output_0 6_standard output_0 7_standard output_0 8_standard output_0 9_standard
noise level output_0 1_noise_level output_0 2_noise_level output_0 3_noise_level output_0 4_noise_level output_0 5_noise_level output_0 6_noise_level output_0 7_noise_level output_0 8_noise_level output_0 9_noise_level
+ first sigma output_0 1_sigma_on output_0 2_sigma_on output_0 3_sigma_on output_0 4_sigma_on output_0 5_sigma_on output_0 6_sigma_on output_0 7_sigma_on output_0 8_sigma_on output_0 9_sigma_on

Checklist

@stduhpf stduhpf changed the title feat: denosie strength as starting noise level feat: denoise strength as starting noise level Jul 4, 2026
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.

1 participant