This is alternative version of DPM++ 2M Karras sampler.
I don't claim that this sampler ultimate or best, but I use it on a regular basis, cause I realy like the cleanliness and soft colors of the images that this sampler generates.
The results may not be obvious at first glance, examine the details in full resolution to see the difference (especially in dark areas, backgrounds and eyes).
I have nothing to do with the creation or modification of this sampler. All material and info was taken from Reddit.
All credits go to hallatore.
Original github page.
More examples:
IMPORTANT! Before installing, back up the original file.
To install this sampler, download the file, unzip it and put it in a folder stable-diffusion-webui/modules/ and rename to sd_samplers_kdiffusion.py if necessary.

Then you should reload (whole SD not only UI) and you will see this:

Description
FAQ
Comments (38)
27.05.23 - Added version for Automatic 1111 v1.3.0
There is 2 files in archive: version with Alt-sampler and Backup-file.
plz help me
Traceback (most recent call last):
File "C:\stable-diffusion-webui\launch.py", line 356, in <module>
start()
File "C:\stable-diffusion-webui\launch.py", line 347, in start
import webui
File "C:\stable-diffusion-webui\webui.py", line 31, in <module>
from modules import extra_networks, ui_extra_networks_checkpoints
File "C:\stable-diffusion-webui\modules\ui_extra_networks_checkpoints.py", line 5, in <module>
from modules import shared, ui_extra_networks, sd_models
File "C:\stable-diffusion-webui\modules\ui_extra_networks.py", line 8, in <module>
from modules.images import read_info_from_image
File "C:\stable-diffusion-webui\modules\images.py", line 21, in <module>
from modules import sd_samplers, shared, script_callbacks, errors
File "C:\stable-diffusion-webui\modules\sd_samplers.py", line 1, in <module>
from modules import sd_samplers_compvis, sd_samplers_kdiffusion, shared
File "C:\stable-diffusion-webui\modules\sd_samplers_kdiffusion.py", line 11, in <module>
from modules.script_callbacks import AfterCFGCallbackParams, cfg_after_cfg_callback
ImportError: cannot import name 'AfterCFGCallbackParams' from 'modules.script_callbacks' (C:\stable-diffusion-webui\modules\script_callbacks.py)
版本老了,更新一下
[已退出进程,代码为 1 (0x00000001)]
提示:检测到 SD-WebUI 进程退出状态不正常,建议前往疑难解答页面扫描错误记录或寻求其他帮助。
v1.3我也是这个问题,请问后来解决了吗?
@Conclusions 用上一个版本就正常了
@dkxbsgt982 我也是用的老版本就好了,不知道什么问题。老版本出来的图都很油,跟上蜡似的
@Conclusions 不会啊,看我最新post的作品就是用1.2.0版本的,细腻!!当然也希望大神能继续优化,继续牛逼哈!
一样的:ImportError: cannot import name 'AfterCFGCallbackParams' from
提示:Python 运行时抛出了一个异常。请检查疑难解答页面。
'modules.script_callbacks' (G:\Stable
Diffusion\stable-diffusion-webui\modules\script_callbacks.py)
--------
[已退出进程,代码为 1 (0x00000001)]
更新你的版本
@dkxbsgt982 你好,请问能分享一个v1.2的给我吗,全网找了半天了都没有
File~~~~
I want to see more examples (from users) before I try this.
not work, error. fix pls
i got error to , after paste the file , now i can't open the SD
我也是,得怎么解决
same error
What is the difference between V1.3 and the previous version?
Worked for me straight away. Not sure why there are so many comments about it not working.
Thanks for this!
Since my launch sequence is also checking for new A1111 repo update every time. This is not really a way. Did you think of making a pull request on his repo ?
There is already a file in the modules directory called "sd_samplers_kdiffusion.py", so I don't know if I should overwrite the existing file. When I change the filename to "sd_samplers_kdiffusion1.py" and add it to the modules directory, "DPM++ 2M alt Karras" does not appear in the list of sampling methods, even after fully restarting SD and GUI.
Should I overwrite the existing "sd_samplers_kdiffusion.py" that was already there with this downloaded file?
Ok, I chose to overwrite the existing file and now can see "DPM++ 2M alt Karras".
Ok, I chose to overwrite the existing file and now can see "DPM++ 2M alt Karras".
Quote of the year!! Thank you!
error
适用于sd-webui1.6.0版本之前
将DPM++ 2M alt Karras采样添加到更新版本后的采样文件
用记事本打开发布者提供的sd_samplers_kdiffusion.py文件,复制40行到74行的代码
(也就是
from tqdm.auto import trange
……
['k_dpmpp_2m_alt_ka'], {'scheduler': 'karras'}))
)
打开\sd-webui-aki-v4.1\modules目录下sd_samplers_kdiffusion.py文件,复制代码到40行之后
(也就是放在
samplers_data_k_diffusion = [
sd_samplers_common.SamplerData(label, lambda model, funcname=funcname: KDiffusionSampler(funcname, model), aliases, options)
for label, funcname, aliases, options in samplers_k_diffusion
if hasattr(k_diffusion.sampling, funcname)
]
这段代码下面)
谢谢你大好人,专程登录来感谢你!
感谢
神仙
...very bad idear...
you are right
Watch it on BILIBILI,search DPM directly.
Forgive the Stupid Question of the Morning (patent pending), but where in Easy Diffusion are you supposed to put this file once you've downloaded it?
Is this still working/required? If I add this too my SD directory I get errors.
能否更新到1.51兼容的?
Can you pls update for 1.6.0 ?
Details
Available On (1 platform)
Same model published on other platforms. May have additional downloads or version variants.









