本地部署Flux.1文生图大模型(基于ComfyUI)

简介

Flux.1 是一款开源的图像生成模型,可通过Comfyui调用Flux.1

1.模型选择

[pro] 最顶级的模型,只能通过 API 调用;
[dev] 由[pro]提炼,开源但非商用,质量和效果与[pro]类似;
[schnell] 经过蒸馏的 4 步模型,速度比 [dev] 快 10 倍,Apache 2 开源许可

FLUX.1 [dev]

最低显存要求24G
https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/main

FLUX.1 [dev] fp8

最低 12G 显存
https://huggingface.co/Kijai/flux-fp8/blob/main/flux1-dev-fp8.safetensors

FLUX.1 [schnell]

基本都能跑
https://huggingface.co/black-forest-labs/FLUX.1-schnell/blob/main/flux1-schnell.safetensors

2.安装ComfyUI

https://github.com/comfyanonymous/ComfyUI
选择release,下载ComfyUI_windows_portable_nvidia.7z
解压后执行run_nvidia_gpu.bat

3.设置中文

https://github.com/AIGODLIKE/AIGODLIKE-ComfyUI-Translation
下载zip包,解压
将文件夹放到ComfyUI的custom_nodes目录中

4.下载文本编码器模型

https://huggingface.co/comfyanonymous/flux_text_encoders/tree/main
下载t5xxl_fp8_e4m3fn.safetensors(显存超32G可以选fp16)和clip_l.safetensors
将文件夹放到ComfyUI的models/clip目录中

5.下载VAE模型

https://huggingface.co/black-forest-labs/FLUX.1-schnell/blob/main/ae.safetensors
下载ae.safetensors
将文件夹放到ComfyUI的models/vae目录中

6.lora真人模型推荐

https://pan.tuio.cc/s/KKYtL
将模型放到ComfyUI的models/loras目录中

7.工作流推荐

https://pan.tuio.cc/s/qE2fL
直接复制到网页即可

8.提示词推荐

blockchain
这是一张高分辨率的照片,一个时尚的美女站在一个安静的图书馆里,她的皮肤晶莹剔透,匀称的脸,她的身材穿着柔软的针织毛衣和飘逸的裙子,她仔细阅读书架时的表情若有感触,她的姿势优雅而镇定
This is a high-resolution photograph, a fashionable beauty with clear, dewy skin and a symmetrical face stands in a tranquil library, her figure adorned in a soft, cable-knit sweater and a flowing skirt, her expression thoughtful as she peruses the shelves, her posture elegant and poised,Young Asian woman.

blockchain
这是一张日常风格的清晰手机自拍。在阳光明媚的暖房里,一个面色红润、五官鲜明的时尚前卫的女人坐在一张老式躺椅上,她的身体披着一件奢华的丝绸长袍,她的表情是一种安详的沉思
This is a clear mobile selfie photo with a daily style. A fashion-forward woman with a glowing complexion and sharp features lounges on a vintage chaise longue in a sunlit conservatory, her form draped in a luxurious silk robe, her expression one of serene contemplation,Young Asian woman.


本地部署Flux.1文生图大模型(基于ComfyUI)
http://example.com/2024/09/30/deployment-native-comfyui/
作者
WLK
发布于
2024年9月30日
许可协议