[ComfyUI]Flux:官方欲放弃NF4投向GGUF?更低质量损失,最低6G显存福音
大家好我是极客菌!!!
Flux ControlNet模型简介
在之前的文章中已经介绍过Flux模型,这是一款当前最大且优秀的文生图模型。同时当前Flux模型的社区已逐步构建起来,能够看到社区对该模型的认可和积极推进。但是因为Flux模型的12B模型参数,约23.8的权重weight大小,所需要的推理资源也很大,这是许多读者想尝试Flux模型的最大门槛。当然社区也出现了许多解决此问题的方法,如:BizyAir ComfyUI插件(云端计算:[Flux:还在为Flux耗显存发愁?
本文将要介绍的主题方案为GGUF方法。这也是当前最先进的LLM大模型的优化方案。GGUF全称为:GPT-Generated Unified Format,这是一种高效存储和交换大模型预训练结果的二进制格式,由llama.cpp创始人Georgi Gerganov定义。GGUF已成为大语言模型量化标准方法之一,并已得到大家所熟知的HuggingFace、Ollama的官方支持。在LLM大需要模型Ollama本地部署常用量化方案就有GGUF。如近期刚发布的Llama3量化参数如下所示:
ComfyUI官方
从ComfyUI官方的项目说明中,能够看出ComfyUI有计划打算放弃NF4方案而选择GGUF方式。插件地址:https://github.com/comfyanonymous/ComfyUI_bitsandbytes_NF4
XLabs
从下图中可以看出XLabs-AI官方推荐的是GGUF方式。插件地址:https://github.com/XLabs-AI/x-flux-comfyui
Flux GGUF ComfyUI模型体验
当前最新版本的ComfyUI结合社区插件ComfyUI-GGUF已支持在ComfyUI中体验。需要更新ComfyUI到最新版本,同时通过插件管理器搜索ComfyUI-GGUF并安装他。同时还需要下载对应的flux1-dev GGUF模型并放置在 /ComfyUI/models/unet 目录下。
-
• ComfyUI插件地址:https://github.com/city96/ComfyUI-GGUF
-
• flux1-dev GGU模型地址:https://huggingface.co/city96/FLUX.1-dev-gguf/tree/main
-
• flux1-dev GGU LIBLIB模型地址:https://www.liblib.art/modelinfo/e3a5aacc49ea4c2eaef2792c899e7352
官方同时提供了flux1-schnell GGUF版本,这是蒸馏版模型的量化版本,更推荐大家选择合适量化精度的flux1-dev GGUF版本模型体验。
另外,虽然有些同学本地4090可运行全精度DEV版本,但仍然建议常备一个GGUF8模型,因为后续工作流增加LORA和Controlnet所需的显存会更大。如果只有6G显存则建议使用GGUF-4模型,12G以上显存可尝试GGUF-6/8模型。
Flux Dev换脸工作流
另外,LIBLIBAI平台已支持Flux模型在线运行体验,并且Flux文|图生图+LORA+CN+提示反推一键切换工作流笔者已增加换脸节点使用
GGUF工作流
在工作流使用中很简单仅需要将原来Flux Dev工作流中的 Load Diffusion Model节点替换为 Unet Loader (GGUF) 节点即可。
-
• flux1-dev.gguf(Q8、Q4)模型地址:
-
• flux1-dev.gguf(Q8、Q4)模型LIBLIB地址:
-
• Flux-Dev-GGUF工作流(文|图生图):
(需要的同学可以自行扫描获取)
01. 美猴王
Chinese style, the monkey king, looking majestic and menancing, showing a little teeth in his snicker, wearing his shining armor and wielding his signature pole.
02. 混合生命体-猫与孔雀
Capture a hyper-realistic photograph of a whimsical creature, a kitten with the vibrant feathers of a parrot, and the elegant, sweeping tail of a peacock. The kitten’s body is small and fluffy, with patches of brightly colored feathers in shades of blue, green, and red, blending seamlessly with its soft fur. Its eyes are large and curious, while its tail fans out behind it in a display of shimmering peacock feathers. The scene is set in a tropical forest, with the creature perched on a low branch, surrounded by lush greenery and exotic flowers, as sunlight filters through the canopy, highlighting its dazzling, unique appearance.
03. 荷叶-舞者
In the twilight, floating on the water was a lotus leaf shaped like a beautiful girl. A pink lotus blooms next to it. The texture of the leaves Outlines like a figure, embodying graceful curves and natural imperfections that give life to her silhouette. The color of the leaves reflects the soft tones of the early morning, adding depth to the realistic presentation.
04. 写实摄影
chinese girl, 8k,raw photo,best quality,hp,sim,girl,wavy black hair,shoulder-length,white shirt,minimalism,soft lighting,close-up,natural appearance,dark hair,casual wear,slight head turn,visible ears,earrings,neutral background,observational photography,indoor,medium lens,natural texture,easy setting,black lines,art,portrait style,,,in clothes
05. 广告摄影
chinese girl,20-old-years, full of youth and vitality, beautiful and elegant, with delicate skin, fresh makeup, smiling expression, hands washing face, foam on hands and face, real person, commercial shooting, head fully in the picture, side view, medium shot, white background, 8k resolution, rich in details, natural skin tone, full of youth, frontal view, soft light, high definition.,,in clothes
06. 清晨
chinese girl,20-old-years, full of youth and vitality, beautiful and elegant, with delicate skin, fresh makeup, smiling expression, hands washing face, foam on hands and face, real person, commercial shooting, head fully in the picture, side view, medium shot, white background, 8k resolution, rich in details, natural skin tone, full of youth, frontal view, soft light, high definition.,,in clothes
07. 大长腿
chinese girl,20-old-years,Yellow background, a beautiful Asian girl, resembling Audrey Hepburn, with a beautiful face, long hair, light blue v-neck long silk dress, slender figure, wearing high heels, full body shot, wide shot, stage lighting, 8k, photographic style, silk,,in clothes
08. 高贵
chinese girl,20-old-years,Chinese young female celebrity, restaurant, long legs, queen style, high heels, elaborate make-up, fashion style, upscale restaurant, elegant layout, soft lighting, telephoto lens, shallow depth of field, side light, confident smile, luxury decoration, warm color tone, charming.,,in clothes
感兴趣的小伙伴,赠送全套AIGC学习资料,包含AI绘画、AI人工智能等前沿科技教程和软件工具,具体看这里。
AIGC技术的未来发展前景广阔,随着人工智能技术的不断发展,AIGC技术也将不断提高。未来,AIGC技术将在游戏和计算领域得到更广泛的应用,使游戏和计算系统具有更高效、更智能、更灵活的特性。同时,AIGC技术也将与人工智能技术紧密结合,在更多的领域得到广泛应用,对程序员来说影响至关重要。未来,AIGC技术将继续得到提高,同时也将与人工智能技术紧密结合,在更多的领域得到广泛应用。
一、AIGC所有方向的学习路线
AIGC所有方向的技术点做的整理,形成各个领域的知识点汇总,它的用处就在于,你可以按照下面的知识点去找对应的学习资源,保证自己学得较为全面。
二、AIGC必备工具
工具都帮大家整理好了,安装就可直接上手!
三、最新AIGC学习笔记
当我学到一定基础,有自己的理解能力的时候,会去阅读一些前辈整理的书籍或者手写的笔记资料,这些笔记详细记载了他们对一些技术点的理解,这些理解是比较独到,可以学到不一样的思路。
四、AIGC视频教程合集
观看全面零基础学习视频,看视频学习是最快捷也是最有效果的方式,跟着视频中老师的思路,从基础到深入,还是很容易入门的。
五、实战案例
纸上得来终觉浅,要学会跟着视频一起敲,要动手实操,才能将自己的所学运用到实际当中去,这时候可以搞点实战案例来学习。
更多推荐
所有评论(0)