k-diffusion icon indicating copy to clipboard operation
k-diffusion copied to clipboard

fix: DPM-Solver++(2m & 3M) SDE.

Open davertor opened this issue 1 year ago • 0 comments

When using the stable diffusion webui with "DPM++ 3M SDE Karras", some of the boundary conditions result in the following error:

      File "/stable-diffusion-webui/repositories/k-diffusion/k_diffusion/sampling.py", line 700, in sample_dpmpp_3m_sde
        h_1, h_2 = h, h_1
    UnboundLocalError: local variable 'h' referenced before assignment

Checking the code, it seems that the indentation of the last part of sample_dpmpp_2m_sde and sample_dpmpp_3m_sde functions were wrong, and that's why h var was not defined in both samplers.

davertor avatar Apr 30 '24 16:04 davertor