找回密码
 加入我们

QQ登录

只需一步,快速开始

搜索
查看: 71|回复: 1

[智能] SD模型文件放置目录路径

[复制链接]
发表于 2024-1-3 15:01 | 显示全部楼层 |阅读模式

高质量的模型,能够成倍提升出图质量。

常见模型分类
常见的模型主要分为四类:Checkpoint、LoRA、Textual Inversion、Hypernetwork,分别对应 4 种不同的训练方式。
Checkpoint:通过 Dreambooth 训练方式得到的大模型, 特点是出图效果好,但由于训练的是一个完整的新模型,所以训练速度普遍较慢,生成模型文件较大,一般几个 G,文件格式为 safetensors 或 ckpt。
LoRA:一种轻量化的模型微调训练方法,是在原有大模型的基础上,对该模型进行微调,用于输出固定特征的人或事物。特点是对于特定风格特征的出图效果好,训练速度快,模型文件小,一般几十到一百多 MB,需要搭配大模型使用。
Textual Inversion:一种使用文本提示来训练模型的方法,可以简单理解为一组打包的提示词,用于生成固定特征的人或事物。特点是对于特定风格特征的出图效果好,模型文件非常小,一般几十 K,但是训练速度较慢,需要搭配大模型使用。
Hypernetwork:类似 LoRA,但模型效果不如 LoRA,需要搭配大模型使用。
模型推荐:Checkpoint > LoRA > Textual Inversion > Hypernetwork

通常情况 Checkpoint 模型搭配 LoRA 或 Textual Inversion 模型使用,可以获得更好的出图效果。
补充:还有一类 VAE 模型,简单理解它的作用就是提升图像色彩效果,让画面看上去不会那么灰蒙蒙,此外对图像细节进行细微调整。




Fine-tuned Model Checkpoints (Dreambooth Models)
  • Download the custom model
  • Place the model inside the models/Stable-diffusion directory of your AUTOMATIC1111 Web UI instance
  • Refresh your model list or restart the Stable Diffusion Web UI
  • Select the custom model from the Stable Diffusion checkpoint input field
  • Use the trained keyword in a prompt (listed on the custom model's page)
  • Make awesome images!

Checkpoints 模型:放在models/Stable-diffusion 目录下

Textual Inversions
  • Download the textual inversion
  • Place the textual inversion inside the embeddings directory of your AUTOMATIC1111 Web UI instance
  • Use the trained keyword in a prompt (listed on the textual inversion's page)
  • Make awesome images!

Textual Inversions(文本):放在embeddings 目录下

Aesthetic Gradients
  • Install the Aesthetic Gradients extension
  • Download the aesthetic gradient
  • Place the aesthetic graident inside the aesthetic_embeddings directory of your AUTOMATIC1111 Web UI instance
  • Restart the Stable Diffusion Web UI
  • Adjust the aesthetic gradient setting
  • Make awesome images!

Aesthetic Gradients(梯度):放在 aesthetic_embeddings目录下

Hypernetwork
  • Download the hypernetwork
  • Place the hypernetwork inside the models/hypernetworks directory of your AUTOMATIC1111 Web UI instance
  • Restart the Stable Diffusion Web UI
  • Select the hypernetwork from the Hypernetwork input field in settings
  • Adjust the hypernetwork strength using the Hypernetwork strength range slider in settings
  • Make awesome images!

Hypernetwork(超级网络):放在 models/hypernetworks目录下

LoRA
  • Download the LoRA
  • Place the file inside the models/lora folder
  • Click on the show extra networks button under the Generate button (purple icon)
  • Go to the Lora tab and refresh if needed
  • Click on the one you want to apply, it will be added in the prompt
  • Make sure to adjust the weight, by default it's :1 which is usually to high

LORA:放在 models/lora目录下
(Low-Rank Adaptation of Large Language Models 基于大型语言模型的低阶自适应,是经过特殊训练后的一个微调补充)

LoRA
Old UI (Versions Prior to Jan 20th) 旧版
  • Ensure that you've installed the Additional Networks extension, you can do this from the extensions tab. After installing you will need to restart AUTOMATIC1111.
  • Download the LoRA
  • Place the file inside the extensions/sd-webui-additional-networks/models/lora folder
  • On the txt2img or img2img tab, dropdown the Additional Networks area at the bottom of the page
  • Check enable
  • Set Model 1 to the LoRA model you downloaded
  • Set Weight 1 to a 0.85 a good starting value and adjust as needed
  • Make awesome images!

确保安装了Additional Networks,然后放在extensions/sd-webui-additional-networks/models/lora目录下。

Note: You can use a LoRA with any model, but usually they are trained on a specific model and will perform best on that model or a derivative of that model.
LoRA可以用于任何模型下,但是实际上最好是放在训练时的大模型下能达到最佳效果。

LoCon
  • Ensure that you're utilizing the latest version of Automatic1111 or that you've installed the   LoCon Extension
  • Download the LoCon
  • Place the file inside the models/LyCORIS folder
  • Click on the show extra networks button under the Generate button (purple icon)
  • Go to the LyCORIS tab and refresh if needed
  • Click on the one you want to apply, it will be added in the prompt
  • Make sure to adjust the weight, by default it's :1 which is usually too high

LoCon:放在 models/LyCORIS目录下

Wildcards
  • Ensure that you've installed the Wildcard Extension
  • Download the Wildcards archive
  • Extract the archive into extensions/stable-diffusion-webui-wildcards/wildcards
  • Use one or many of the wildcard words in your prompt to trigger the word replacement on generation (ex. __hair-style__)

Wildcards:确保安装了 Wildcard 扩展,然后放在extensions/stable-diffusion-webui-wildcards/wildcards目录下

Motion Module
  • Ensure that you've installed the AnimateDiff Extension
  • Download the Motion Module
  • Place the file inside the extensions/sd-webui-animatediff/model/ folder

Motion Module:确保安装了AnimateDiff 扩展,然后放在extensions/sd-webui-animatediff/model/ 目录下

回复

使用道具 举报

 楼主| 发表于 2024-2-16 12:57 | 显示全部楼层
目前 CivitAI(俗称 C 站, https://civitai.com/ )是业内比较成熟的一个 Stable Diffusion 模型社区,上面汇集了上千个模型,以及上万张附带提示词的图像,这大大降低了 Stable Diffusion 的入门学习成本。

这里有简要介绍 C 站的一些优秀模型,并结合示例进行应用说明。

https://zhuanlan.zhihu.com/p/631858294
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 加入我们

本版积分规则

QQ|Archiver|手机版|小黑屋|吹友吧 ( 京ICP备05078561号 )

GMT+8, 2024-12-28 00:33 , Processed in 0.293662 second(s), 16 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表