5 min read
什么?AI一键生成mockup不要太轻松了!

前言
设计师们,特别是UI、品牌、视觉设计师都知道,要讲好设计故事,必须要好的效果展示。通常我们完成一个logo、品牌识别、或者一些平面视觉设计后,会还原到真实场景中,看看效果,这个过程需要用到mockup。 常规的做法,是设计方案后,会找到一些常用的mockup模板,然后把设计图案贴上去。
当然,这个设计过程也不复杂,传统手艺,貌似也没什么问题。但问题是,怎么找到这么多符合预期的mockup素材?还有在ps或者其他软件中制作mockup展示,多少还有些工作量。
那么,今天,我们看看AI辅助mockup制作的方案,探讨一下。
技术原理
虽然今天演示的ComfyUI工作流,但是其核心技术,是来自阿里巴巴前不久开源的In-Context LoRA (IC-LoRA)
技术方案,项目地址:https://ali-vilab.github.io/In-Context-LoRA-Page
。
而我们制作mockup只是使用其中一个LoRA:Visual Identity Design
但是,官方给出的mockup制作,是基于文生图生成logo(图案),然后进行mockup制作的,那么,如果我们想要把自己制作的logo或图案放到mockup里面呢?
当然可以!收到B站大佬小志Jason
的启发,我尝试解读一下这个原理:
IC-LoRA的核心原理是通过在一张图里面生成左右两张图,可以理解左边生成logo,右边生成mockup,强大的FLUX模型,会根据提示语引导,生成一致性的内容。所以我们看到,在
Visual Identity Design
LoRA的提示语中,第一段是描述整个场景,第二段_[IMAGE1]生成图案元素,第三段[IMAGE2]生成mockup。 所以不难看出,只要flux获得参考(当然,这个是需要训练LoRA让FLUX知道这个规则)。那么对照左右两侧的潜空间,就可以生成一致性很高的图。
效果
看看利用此技术,搭建的ComfyUI工作流,生成的logo mockup图。
下面的图,是全自动进行的,输入logo图片,然后产出,未经过任何图像处理。
文字上,还是会有问题,这个跟我使用qquf的模型有关系,但是整体效果还是不错的,关键这个流程,是全自动的,设计师也可以基于AI的输出,对图片稍微处理,这样也可以大大提升效率。 而且,mockup只需要输入参考,或者也可以手动输入,不用费劲去找素材了。
如果对于最终提案还有距离,作为方案的探索,前期设计概念发散,也有很大帮助~😂
工作流
我们要实现的功能:
- 输入:logo(图案)和mockup参考
- 输出:logo的mockup图
过程的图像处理、提示语处理,全部都自动完成。
提示语处理
需要对logo图案和mockup参考进行反推,然后使用语言大模型对提示语进行处理,最后的提示词符合In-Context LoRA (IC-LoRA)
提示语规则。
我们先看一下提示语规则:
_The pair of images highlights a logo and its real-world use for a rustic coffee brand; [IMAGE1] a striking teal background showcases a logo with a stylized, perched bird in black and white, titled “Bluebird Roast” in an elegant serif font, with a leafy branch detail underneath; [IMAGE2] this logo is applied to a coffee mug sitting atop a woven coaster on a dark mahogany table, with a blurred background that emphasizes the warm tones and classic aesthetic of the branding in a cozy setting._
拆解后:
_The pair of images <整体描述>; [IMAGE1]<logo图案描述> ; [IMAGE2] this logo is applied to a <mockup描述> ._
反推就使用joycation2进行反推,需要对logo和mockup参考图分别进行。
按照规则,拼接提示语。
最后将拼接后的提示语,使用qwen语言大模型进行最后处理。
例如我输入了两个图,最后提示语会处理为这样:
输入图:
输出提示语:
_a minimalist digital logo is showcased, featuring a stylized, abstract representation of a panda's face and ears in bold, solid black. The design is symmetric and clean, with no additional text or colors, set against a plain white background; [IMAGE1] the same minimalist logo design is then adapted into a high-quality, light grey tote bag, with soft, even lighting highlighting the textures of the fabric, capturing a clean and modern aesthetic."_[IMAGE2]The design is printed in a high-quality, minimalist photograph of a person standing against a light grey background, wearing light blue jeans and a white t-shirt, with only their torso and legs visible. They are holding a large, plain white tote bag with both hands, positioned in the center of the frame. The lighting is soft and evenly distributed, highlighting the textures of the fabric. The composition follows the rule of thirds, with the tote bag occupying the central vertical line. The overall aesthetic is clean and modern, with a focus on simplicity and practicality._
图像处理
如上所述,我们需要将logo进行拼接,作为噪声,输入到采样中,这里需要拼接图像,然后制作重绘模板。
也就是以下的,从图1生成2、3图
目的明确后,其实流程也比较简单。
采样
采样流程就很简单了,flux-gguf工作流,串联ic lora,我这里还串联了一个8步加速模型,提高抽卡速度。
当然,后面其实还可以接高清放大流程,让画面质量更高。
更多 AI 辅助设计和设计灵感趋势,请关注公众号(设计小站):sjxz00。