提示词工程又一魅力时刻!!!
推特上有作者发现,使用FLUX1.1的时候在prompt中加入类似“IMG_1018.CR2”这样的字符串,图片的真实性会大大提高 ,无论是人物还是风景,效果都直逼照片级别。
本质上就是在提示词里模仿相机的文件命名:IMG+任意编号+相机原始文件格式。

FLUX1.1 Pro 代号“蓝莓”,由黑暗森林团队(Black Forest Labs)在10月2日发布,图像生成速度和质量都有显著提升。与前代FLUX1 Pro相比,生成速度提升了六倍,同时在图像质量、提示遵循度和多样性方面也都有改进。
目前FLUX1.1 pro可以在togetherai上免费使用。
下面直接看示例:所有图片均为左侧正常提示词,右侧为加了“IMG_1018.CR2”的效果,1024*768直出,没有任何后期处理。说实话,即便不加那个文件名,每张图也已经很逼真了——不愧是FLUX1.1pro,分不出来,根本分不出来。
睡觉的小猫
a sleeping cat
站在树枝上的小鸟
Little bird sings saddest song, far too young for injured tone, strikes the heart like felted hammers, starring whispers through the pasture, little bird just say the word, the world will hear you little bird
阿尔卑斯的秋景
the picturesque autumn alps, green meadows and colorful trees are reflected on the clear water under the cloudy sky, high resolution, canon eos style camera. beautiful mountains and waters, picturesque scenery, colorful fallen lea ves, colorful reflections in the water, mirror lake, residential houses by mountains and forests, colorful autumn lea ves
女性肖像
A cinematic portrait of a young woman with long, wa vy brown hair smiling warmly towards the camera, she is wearing a light, delicate, sleeveless dress with thin straps, the lighting in the scene is a rich mix of warm tones—deep oranges, soft reds, and subtle hints of pink—creating a vibrant yet intimate atmosphere that suggests a lively evening event, such as a wedding or a sophisticated party, the background is filled with softly blurred figures, creating a bokeh effect with round, diffused lights hanging in the distance, enhancing the depth and adding a dreamy quality to the image, the woman is captured in a slightly angled pose, with her body turned partially to the side, her right shoulder is closer to the camera, creating a dynamic perspective, her chin is slightly lifted, accentuating her jawline, and her head is tilted gently to her left, adding a playful yet elegant touch to her demeanor, her smile is wide and genuine, with her lips softly parted, exuding warmth and approachability, her eyes are bright and full of life, capturing the viewer’s attention with a sparkle that suggests joy and contentment, her hair cascades naturally over her shoulders, with soft wa ves framing her face, the lighting casts a soft glow on her skin, which is smooth and radiant, the slightly low angle of the shot adds to the sense of confidence and poise in her posture, the background is softly out of focus, with a bokeh effect occupying about 80% of the space, allowing the main subject to stand out while the figures behind her remain abstract, contributing to the overall sense of depth and warmth in the composition, The background showcases a meticulously crafted bokeh effect, occupying around 80% of the background space, with the blur strength set to a medium-high level, creating a smooth, creamy texture that softly dissolves the details of the figures behind her. The bokeh lights are a mixture of warm tones—primarily soft oranges and reds—adding to the intimate atmosphere of the scene
更有意思的是,提示词里除了“IMG_1018.CR2”之外什么都不写,也能直接生成逼真的、仿佛由佳能相机拍摄的图片。
当然,FLUX1.1 pro目前暂未开源(估计一时半会也不会),只能通过调用API的形式使用。这里我们改用大家最常用的FLUX dev来做示范。
不解读了,大家自己看。左侧为正常出图,右侧加了“IMG_1018.CR2”。分不清,根本分不清。太真实了,以至于反而不确定这个文件名到底发挥了多大作用……
a sleeping dog in the park
不过,在提示词较短的情况下,加了“IMG_1018.CR2”出图质量反而变差。玄学。
既然这种提示词书写方式在FLUX上有效,那再来测试一下AI绘画领域的另一个扛把子——Midjourney 6.1的表现。其他参数保持一致,仅改变提示词。

一直觉得Midjourney对于真实风格人物的照片效果一般。提示词中加上“IMG_1018.CR2”后,效果勉强可以接受,但跟FLUX还是没法比。

依旧尝试除了“IMG_1018.CR2”外什么都不写的方案。

真实的离谱——必须单独拎出来给大家看看,这跟照片有什么区别?
特别是第一张亚洲小女孩,真的爱了。扩一下图直接拿来做封面~

至于原理,因为并非专门研究提示词工程,用GPT来帮忙解读一下。其实主要原因还是前面那两点:在FLUX训练过程中,训练集里有大量类似文件名的、由相机拍摄的高质量真实照片。就像LoRA的触发词一样,在提示词中加入特定相机文件名,会触发摄影相关的特征。有懂的大佬也可以在评论区补充解释。

这让我想起之前调教ChatGPT的时候,习惯性在提示词中加上“完成之后我会给你20美金作为小费”“深呼吸,一步一步思考”“如果你失败了会有200个无辜老奶奶去世”。很玄学,但有些时候真的有用。不过现在的GPT o1已经不需要这些了。
