如何用 ComfyUI 生成艺术字海报?
说起艺术字海报,可能大部分人都不陌生,但想要做出精度高,样式丰富的海报需要花费的时间精力并不少,今天分享的这个技术,不仅能帮你轻松将文字或 Logo 融于场景,还能一键生成高质量艺术作品替你节约大量时间。
这种海报在远观之下,它会显示文字信息,但凑近看,会发现文字的线条巧妙地融入到了海报的其他内容之中,你甚至无法分辨出图片里会含有这些文字。
1. 下载与安装
首先,你需要下载并安装插件和模型。这个 workflow 主要是通过 ControlNet (opens in a new tab) 来控制输入的图形边缘,使其更好地与生成的场景融合,你需要安装 comfyui_controlnet_aux (opens in a new tab) 这个插件。如果你是在 Comflowy 中使用,可以参考上期安装教程:如何使用 ComfyUI 实现人脸修复? (opens in a new tab)
模型下载:
- control v1p_sd15_qrcode_monster.safetensors (opens in a new tab):这个模型不仅能生成二维码,在生成花式文字场景下表现也不错,它能更好地将 Controlnet 的图片作为图像中的主体,使其更好地与生成的图像融合。
最后你能搭出这样的工作流:
2. 效果展示
2.1 艺术字海报
这个工作流用到的最主要的插件是 ControlNet ,通过选择不同的模型能够让它更好地理解用户指令,精确控制图像生成,这里我们会使用这个插件识别图片中的主体轮廓。
如果你想要了解更多关于 ControlNet 的模型,可以参考:ControlNet (opens in a new tab),它在工作流中很常用,下载地址:ControlNet (opens in a new tab) 。
Workflow
我用它搭出了一个基础工作流来实现海报生成,输入任何你想用的字母,我这里使用的是" Lisa "。
添加场景描述:In the snow all over the sky, a girl walking alone in the snow, wearing red thin trench coat, with a white scarf, Bare legs, bare feet, Holding her body tightly,her head bowed, her eyes closed, her mouth pressed together, and she was about to cry, Long white hair blows in the wind, The detailed and beautiful face was depressed,Step by step, behind is a series of footprints, the snow is very big, the biting wind blowing her scarf, the distance is unbroken snow mountains, in this evening, helpless forward.
FaceDetailer
根据生成的图片可以看到整体氛围和人物场景的效果还是不错的,但面部生成效果的非常模糊。这时可以使用上期如何使用 ComfyUI 实现人脸修复? (opens in a new tab)中介绍的面部修复插件—— FaceDetailer ,帮助改善这一问题。
模型下载:
- sam_vit b_01ec64.pth (opens in a new tab) :将模型放入ComfyUI\models\sams文件夹中,它能提高被识别到的人脸至更高的分辨率,使插件可以更细致地修复面部的细节。
- bbox/face_yolov8m.pt (opens in a new tab) :你需要将这个模型放入ComfyUI\models\ultralytics\bbox,这是一个面部检测模型,可以识别图像中的人脸的位置和范围。
修复后的人脸皮肤质感更加细腻,五官更加清晰,脸型轮廓也修复的更加自然。
Lora 模型
除了更换提示词中描述的场景,你也可以选择添加 Lora 模型,帮助你生成更符合自己喜爱偏向的图片。
这里我选择了 Niji Default (opens in a new tab) 明亮动漫风和 MoXin (opens in a new tab) 写意插画风来帮助我生成卡通人物。除了这两个,你还可以参考这篇文章选择自己喜欢的 Lora 模型:10 个值得下载的 LoRA 模型 (opens in a new tab)
提示词:Under the starry night sky, a young man walks alone in the quiet countryside. He is dressed in a dark hoodie, with a gray scarf casually draped around his neck. His hands are stuffed in his pockets, his head bowed, his brows furrowed, and his lips pursed, seemingly deep in thought, with a glint of determination and confusion in his eyes.His short hair gently flutters in the night breeze, and his delicate face reveals an imperceptible trace of melancholy. He walks steadily forward step by step, leaving a trail of footprints of varying depths behind him. The stars in the night sky seem to guide his direction, while the distant undulating mountains appear especially mysterious in the night.
这里我为了让它生成的图片更加立体,质感更强,更换了 Lora 模型,分别是:Anime Impasto Style (opens in a new tab) 和 3D cartoon avatar (opens in a new tab) 。
提示词:In the soft light of a summer evening, a lady strolls leisurely by the West Lake. She wears a pale blue dress and simple sandals on her feet, adorned with a pair of exquisite pearl earrings, and holds a book in her hand. The lotus flowers on the lake exude a subtle fragrance, perfectly blending with the tranquil ambiance of a summer dusk.
提示词:A painter sits on a flat rock, with an easel and a palette of vibrant colors arrayed before him. Dressed in a loose linen shirt and wearing an old straw hat, he is completely absorbed in his artistic creation. In the tranquil valley, a meandering stream gently winds through the lush grassland. The water is crystal clear, with a few fallen leaves drifting on the surface, swaying softly with the current. Surrounding the valley are undulating mountains, dotted with quaint cottages on the hillsides, where smoke from cooking fires rises and intertwines with the distant blue sky and white clouds.
2.2 生成场景
使用这个 workflow 除了可以将输入的文字融入人物中,还可以放入风景中,下图我使用了创造沙漠、城镇、风景场景的 Lora :Stygia (opens in a new tab),来帮我生成“幻想沙漠“。
提示词:(masterpiece:1.2), (best quality,:1.2), 8k, HDR, ultra detailed, ((photorealistic)), professional light, cinematic lighting,ambient lighting, a small town in ancient Egypt, by a river with a boat in the water and palm trees in the foreground and a building with a tower, Stygia, epiCPhoto
提示词:(masterpiece:1.2), (best quality,:1.2), 8k, HDR, ultra detailed, ((photorealistic)), professional light, cinematic lighting,ambient lighting, the mysterious entrance to a dark and sinister burial cave in the mountains in Stygia, epiCPhoto
2.3 生成图标
除了输入文字,我也尝试输入了 Logo 图标用基础工作流生成风景,如果你想要更好的效果和风格,可以在这个基础上加入模型。
提示词:Beside a serene lake, surrounded by a ring of mountains, lies a lush green meadow speckled with vibrant wildflowers in a kaleidoscope of colors. Small birds flit across the water's surface, their delicate wings skimming the ripples as they add a dynamic touch to the scene.
提示词:Inside the forest, towering trees form a dense green canopy, with sunlight filtering through the gaps to cast mottled patterns of light and shadow. The ground, covered in moss, is carpeted with fallen leaves and pine needles, creating a soft layer that makes a faint crunching sound underfoot. The tree trunks are robust, some covered with a layer of moss, while others are tightly entwined with vines. A small forest stream flows quietly, with a few leaves floating on the surface, and the banks are lined with various wildflowers and shrubs. In the distance, several large boulders are scattered haphazardly in the forest clearing, covered with moss and weeds, exuding an ancient and natural charm.
注:对于一些细节比较多的 Logo ,在描述提示词的时候尽量选择比较丰富的场景,这样生成的效果能更加自然。像我下图一中生成海边落日场景时,生成的效果比较割裂,而图二巧妙的将 Logo 融入了场景。