Open ryukra opened 5 months ago
I don't sure……maybe in SDXL? More steps may help.
SDXL and SD1.5 have many differences, which could be the cause of the issue. SDXL has a unique positional encoding technique, and its latent space dimensions are also larger. I will work on adapting SDXL in the future. Thank you for your issue.
More steps fixes it for the most part, 30 already enough.
@Koishi-Star The striped noise could be a byproduct of using gamma = max(s_churn...
in both samplers (all other default samplers use gamma = min(s_churn...
). Since gamma
is used as a multiplier of sigma_hat
(and always multiplies is by 1.41
), we are skipping some essential denoising at last steps.
I've tested replacing max with min entirely - it makes both samplers perform much worse by reducing color range of generated images.
Maybe we could mitigate the noise by partially replacing gamma = max(s_churn...
in both sample_euler_dy
and sample_euler_smea_dy
with something like this:
if i > ((len(sigmas) - 1) / 3) * 2:
gamma = min(s_churn / (len(sigmas) - 1), 2 ** 0.5 - 1) if s_tmin <= sigmas[i] <= s_tmax else 0.
else:
gamma = max(s_churn / (len(sigmas) - 1), 2 ** 0.5 - 1) if s_tmin <= sigmas[i] <= s_tmax else 0.
@Koishi-Star The striped noise could be a byproduct of using in both samplers (all other default samplers use ). Since is used as a multiplier of (and always multiplies is by ), we are skipping some essential denoising at last steps. I've tested replacing max with min entirely - it makes both samplers perform much worse by reducing color range of generated images. Maybe we could mitigate the noise by partially replacing in both and with something like this:
gamma = max(s_churn...``gamma = min(s_churn...``gamma``sigma_hat``1.41``gamma = max(s_churn...``sample_euler_dy``sample_euler_smea_dy
if i > ((len(sigmas) - 1) / 3) * 2: gamma = min(s_churn / (len(sigmas) - 1), 2 ** 0.5 - 1) if s_tmin <= sigmas[i] <= s_tmax else 0. else: gamma = max(s_churn / (len(sigmas) - 1), 2 ** 0.5 - 1) if s_tmin <= sigmas[i] <= s_tmax else 0.
I'm not sure if it works, not sure what will cause striped noise. Default s_churn
is 0. , so at most time gamma will not be used. Even delte these codes will not result in error.
Here is metadata, you can test them if you want:
Positive promot:1girl,manhattan cafe \(umamusume\),umamusume,ask \(askzy\),torino aqua,migolu,(jiu ye sang:1.1),(rumoon:0.9),(mizumi zumi:1.1), heart hands,upper body, black gloves,indoors,black choker,long sleeves,collared shirt,yellow necktie,black vest,black coat,belt,black skirt,pleated skirt,black pantyhose, masterpiece,best quality,very aesthetic,absurdres,
Negative prompt:lowres,(bad),text,error,fewer,extra,missing,worst quality,jpeg artifacts,low quality,watermark,unfinished,displeasing,oldest,early,chromatic aberration,signature,extra digits,artistic error,username,scan,
Steps: 20, Sampler: Euler Dy, Schedule type: Automatic, CFG scale: 6, Seed: 56745646, Size: 832x1216, Model hash: e3c47aedb0, Model: animagineXLV31_v31, FP8 weight: Enable for SDXL, Cache FP16 weight for LoRA: False, Clip skip: 2, Pad conds: True, Version: v1.9.0
Will try to troubleshoot the problem with your example, thanks.
Default s_churn is 0. , so at most time gamma will not be used.
No, the current implementation works as follows:
gamma = max(s_churn / (len(sigmas) - 1), 2 ** 0.5 - 1)
;s_churn
= 0, so left part of max
is equal to 0;2 ** 0.5 - 1
~= 0.414;max(0, 0.414)
= 0.414Hmm, maybe for me it was just a side effect of combining perturbed-attention with samplers. The effect was sometimes noticeable on backgrounds and gradients, so I've done some testing with SDXL, Animagine and PDXL-based checkpoints. Looks like PDXL checkpoints suffer the most. Without fix:
With:
Again, the problem mostly appears when using PAG (and with big scale values), and I'm not sure if it's really worth fixing right now
Very good sampler, but it has a striped noise all over the image?
Thresholded image to exaggerate the effect: