0x00 来由
上一篇(https://www.jianshu.com/p/4c04fe70e0e3) 介绍的是Flux 官方提供的模型,比较吃显卡、内存。
于是乎就有这片低配要求的 nf4模式,直接放在checkpoints, 且自带 clip,vae
名称来由:
- NF4: Next-Gen Flux Model, 速度提升4倍,显存要求低4倍
- GGUF: GPT-Generated Unified Format
0x01 NF4 模型下载
这里使用的是:Flux.1-Dev BNB NF4 v2:
下载地址:
https://civitai.com/models/638187?modelVersionId=721627
保存到 model/checkpoints下:
![](https://img.haomeiwen.com/i3004399/d20a25b74acb9c4f.png)
0x02 GGUF 下载
来这里:
https://huggingface.co/city96/FLUX.1-dev-gguf/tree/main
下载规则:文件大小比显存略小即可。
比如我的显存12G,选择最接近的 9.86GB。
![](https://img.haomeiwen.com/i3004399/b93b566da0ba2134.png)
gguf 保存到 D:\ComfyUI\models\unet
![](https://img.haomeiwen.com/i3004399/c1e237b1a8eabc2b.png)
0x03 Clip 文件下载
参考上一篇: https://www.jianshu.com/p/4c04fe70e0e3
0x04 工具安装节点: ComfyUI-GGUF
通过节点安装器,安装节点 ComfyUI-GGUF:
![](https://img.haomeiwen.com/i3004399/a55a71eb8608c0d4.png)
0x05 手动安装节点: ComfyUI-NF4
目前的节点管理器中没有NF4,所以需要我们手动下载
cd custom_nodes
git clone https://github.com/comfyanonymous/ComfyUI_bitsandbytes_NF4
cd ComfyUI_bitsandbytes_NF4
pip install -r ./requirements.txt
![](https://img.haomeiwen.com/i3004399/df6caf82889bb53d.png)
0x06 工具安装节点: x-flux-comfyui
![](https://img.haomeiwen.com/i3004399/48f895fc15305671.png)
0x06 安装 Lora
打开这里:https://huggingface.co/XLabs-AI/flux-lora-collection/tree/main
文件列表中,带 comfy_converted 的文件,可以直接放到 models/lora目录中
![](https://img.haomeiwen.com/i3004399/f34aa6980f6c76ce.png)
下载黑悟空Lora: https://civitai.com/models/665047/wukong-flux-v1
![](https://img.haomeiwen.com/i3004399/e89a1386d0237fd6.png)
0x07 安装 Controlnet
下载三个 Controlnet 放到 D:\ComfyUI\models\xlabs\controlnet 下面
来源:
https://huggingface.co/XLabs-AI/flux-controlnet-hed-v3/tree/main
https://huggingface.co/XLabs-AI/flux-controlnet-canny-v3/tree/main
https://huggingface.co/XLabs-AI/flux-controlnet-depth-v3/tree/main
![](https://img.haomeiwen.com/i3004399/f4c1849ed07da7fa.png)
0x08 下载放大器
来源:https://huggingface.co/lokCX/4x-Ultrasharp/blob/main/4x-UltraSharp.pth
放到这里:D:\ComfyUI\models\upscale_models
![](https://img.haomeiwen.com/i3004399/be3e41ffb90e191d.png)
0x09 一些参数:
-
guidance:
- 写实: 2~3
-
卡通:3~4.5
image.png
-
cfg
使用Flux模型时,直接设置为1
0x10 跑一个例子:
效果不是太好,重在参与,哈哈,收工
![](https://img.haomeiwen.com/i3004399/f187904ded32a8d2.png)
网友评论