一、介绍
今天介绍这个好玩的插件 ComfyUI APQNodes,默认的Flux模型是无法理解准确的颜色代码。
而这个插件可以帮我忙将输入的十六进制颜色代码转换为 FLUX.1 Dev 已知的最相似的颜色名称(来自预先测试的 155 个颜色名称)。
所以就可以利用它给我们的场景配色了,超级方便。
先来看几张效果图,左边参考图用来提取颜色,右边成品。
二、插件安装
插件地址:https://github.com/AIPOQUE/ComfyUI-APQNodes
节点管理搜 ComfyUI-APQNodes
这个插件的作用是帮忙把十六进制颜色代码转换为 FLUX.1 Dev 已知的最相似的颜色名称.
如果你想自动提取一张图片的代码,还需要安装个很基础的插件 was-node-suite-comfyui
三、使用说明
我们分步骤说明,先来看个完整的工作流
第一步,就是提取颜色了,这里先利用了 was插件的颜色调色板功能,如下图这样,默认是提取16个颜色,我这里改成8个就够了。这一步提取的是十六进制的颜色代码,看右下角这边输出的就是。
然后利用 ComfyUI-APQNodes 插件里面的ColorPalette 节点,自动识别前面的颜色代码,转成接近的自然语言的颜色值。
下面这些颜色代码通过ColorPalette后会转化成下面的自然语言文本。
#5b1d4a
#af4381
#12162b
#11355f
#26649e
#38a4d3
#89a7d5
#d1cce6
The colors are restricted to following 8 colors: plum, rebecca purple, onyx, indigo, savoy blue, pacific blue, ash gray, silver,
然后和我自己写的提示词拼起来,就凑成了完整的一个带颜色的提示词脚本了,完整脚本如下:
> This high-tech e-sports room is equipped with a powerful gaming PC featuring a transparent chassis, allowing a clear view of the intricate internal hardware. The PC is connected to an ultra-wide curved surround screen, delivering an ultimate immersive visual experience. Complementing this setup is an ergonomically designed gaming chair, ensuring player comfort during extended gaming sessions. The room also boasts a full range of peripheral equipment, including a responsive mechanical keyboard, a high-precision mouse for accurate positioning, surround sound headphones providing an immersive audio experience, a high-definition noise-canceling microphone for team communication, and an HD webcam for live streaming. Additionally, the room features an adjustable smart lighting system, e-sports-themed decorations such as posters, figurines, and team logos, a display cabinet for showcasing trophies and awards, a comfortable carpet, and a mini-fridge or snack cabinet for storing drinks and snacks. There is also a professional-grade cable management system to ensure a neat and tidy desktop. For further needs, an optional secondary screen or multiple screens can be added for multitasking, along with a beanbag or lounge area for relaxation between matches. Green plants and other decorations can also be included to enhance the room's vitality.
The colors are restricted to following 8 colors: plum, rebecca purple, onyx, indigo, savoy blue, pacific blue, ash gray, silver,
最后就是接入到Flux的默认文生图工作流中,去生成图片就好了。
如果你觉得颜色太多不喜欢,可以用提示词替换节点,把不想要的替换成空就好了,一个不够还可以再接一个提示词替换节点。
注意的地方,第一行颜色不能替换,不然会报错。
四、总结
以上就是颜色插件的使用啦,想要什么颜色就什么颜色,可控性大大提升。
技术的迭代是飞快的,要关注最新的消息才不会掉队。
关注我,每天分享最新的ComfyUI技术前沿。
今天介绍的颜色插件和工作流我都打包好了。
网盘:https://pan.quark.cn/s/9826b440429f