Closed EmotionIce closed 1 month ago
Hey @EmotionIce! I'm here to assist you with any bugs, questions, or contributions. Let's squash this bug together! 🤖
There are known issues with the denoising strength parameter in the ADetailer extension, particularly when used with ForgeUI in Flux mode. The dynamic denoise strength adjustment logic can cause the denoise strength to fall below the expected threshold, leading to incorrect behavior. This is due to the get_dynamic_denoise_strength
function, which modifies the denoise strength based on the bounding box size and a power scaling factor (ad_dynamic_denoise_power
). If this power scaling factor is set to a value that significantly alters the denoise strength, it can cause the denoise strength to fall below 0.8, resulting in minimal effect on the output [1].
Here is the relevant code snippet:
@staticmethod
def get_dynamic_denoise_strength(
denoise_strength: float, bbox: Sequence[Any], image_size: tuple[int, int]
):
denoise_power = opts.data.get("ad_dynamic_denoise_power", 0)
if denoise_power == 0:
return denoise_strength
modified_strength = dynamic_denoise_strength(
denoise_power=denoise_power,
denoise_strength=denoise_strength,
bbox=bbox,
image_size=image_size,
)
print(
f"[-] ADetailer: dynamic denoising -- {denoise_strength:.2f} -> {modified_strength:.2f}"
)
return modified_strength
To address this issue, you can try the following steps:
Adjust the ad_dynamic_denoise_power
Setting: Ensure that the ad_dynamic_denoise_power
is set to a value within the recommended range (2-4). This can help in achieving a more effective denoise strength.
Check Dependencies and Compatibility: Verify that all dependencies for ADetailer are correctly installed and that the version of ADetailer you're using is compatible with your version of ForgeUI and Flux mode.
Review Configuration Settings: Double-check the specific configurations for the inpaint feature within ADetailer. Settings such as "Inpaint mask blur", "Inpaint denoising strength", and "Inpaint only masked" are crucial for the correct operation of the inpainting process [2].
If these steps do not resolve the issue, you might consider reverting to an older version of ADetailer, as some users have found success with this approach [3].
To continue talking to Dosu, mention @dosu.
how did you solve this one? It's extremely annoying, and without hacking my adetailer code I don't see a way to fix it
Describe the bug
im using the latest version of forgeUi in flux mode with a flux model but also while using the adetailer extension running with a sdxl model. The issue is that denoising strengths below 0.8 have very little to no effect on the result. In my testing, until a strength of 0.973 it is somewhat working but still rather weakly. At and above 0.974, the denoising seems to start from a full light blue background and the result is unusable.
My setup: 1070 ti (8gb), windows 11, latest forge and latest adetailer version Adetailer Inpaint Settings:
Result images with different denoising strengths:
Original, as generated by flux
Adetailer with 0.7 strength -> almost no diff to original
Adetailer with 0.973 strength -> at least some difference
Adetailer with 0.974 strength -> blue background from adetailer step
Steps to reproduce
Screenshots
No response
Console logs, from start to end.
List of installed extensions
Only have ADetailer installed