werran 发表于 2023-4-4 03:33:15

Stable Diffusion 默认参数的修改办法

虽然每次生成都可以重新调整 Stable Diffusion 的参数,但是刷新页面之后其又会返回默认值,反复调整甚为繁琐。其表现包括但不限于:
[*]NovelAI 图片生成中默认进行 28 steps,该参数在 SD 中为 20 steps。
[*]NAI 默认的 Prompt 为:masterpiece, best quality,
Negative Prompt 为:lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry,
[*]NAI 的 CFG Scale 为 11,SD 的 CFG Scale 为 7。
[*]NAI 的 eta noise seed delta 为 31337。(对应 strength 0.69, noise 0.667)
[*]NAI 的 CLIP Layer = 2。
对于 noise seed delta 和 clip layer 的问题,我们在设置可以进行保存;但对于 steps 等生成参数,每次刷新 webui 都会重新回到默认值。因此,我们需要解决的问题是:如何一劳永逸的使参数?实际上,关于 Stable Diffusion webui 的默认参数,都在其根目录的 ui-config.json 中进行了定义。
配置设置(ui-config.json)打开安装 Stable Diffusion webui 的根目录,找到 ui-config.json 文件,打开编辑。我们需要注意的是如下几项(出现位置并不连续):“txt2img/Prompt/value”,”txt2img/Negative prompt/value”,”txt2img/Sampling Steps/value”,”txt2img/CFG Scale/value”以及 img2img 设置的:“img2img/Prompt/value”,”img2img/Negative prompt/value”,”img2img/Sampling Steps/value”,”img2img/CFG Scale/value”以及 img2img 的:"img2img/Prompt/value": "masterpiece, best quality, ","img2img/Negative prompt/value": "lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts,signature, watermark, username, blurry, artist name, ","img2img/Sampling Steps/value": 28,"img2img/CFG Scale/value": 11.0,修改后保存并退出,重启webui。至此可以发现webui中的各项参数默认值都已经根据预设调整好。总结通过上述操作,实现了 Stable Diffusion 的设置及 webui 默认参数修改,使其方便使用

283782122 发表于 2023-4-4 20:17:46

学到了 谢谢

虹龙绿剑 发表于 2023-4-5 07:43:58

学习了,谢谢

ydybezd 发表于 2023-4-10 01:03:21

学习学习

215407819@qq.co 发表于 2023-8-24 21:50:02

复杂了

少年丶行 发表于 2023-9-1 15:57:11

很不错,学习了
页: [1]
查看完整版本: Stable Diffusion 默认参数的修改办法