prompts

其他资源 2025-08-15

稳定的扩散prompts图像生成

制定有效prompts的综合指南,以稳定扩散。

目录

  1. 介绍
  2. 提示制定原则
  3. 生成详细prompts的技术
  4. 通过prompts处理常见问题
  5. 用于图像标签的剪辑和deepdanbooru
  6. 嵌入式负面提示
  7. 高级技巧和技巧
  8. 及时的例子

介绍

稳定扩散是一种使用ML模型生成高质量图像的强大技术。制定有效prompts对于取得理想的结果至关重要。本指南将为您提供创建prompts的深刻见解和建议。

提示制定原则

稳定扩散的有效及时设计遵循以下原则:

  • 简单性:从描述要生成的核心概念的基本prompts开始。
  • 样式:结合定义所需样式的元素,例如艺术家名称或特定艺术风格。
  • 负面prompts :采用标准负面prompts来指导模型的生成过程远离不良结果。
  • 采样器选择:选择适当的采样器,以获取所需的图像质量和详细信息。

生成详细prompts的技术

  • 关键字组合:组合相关的关键字,这些关键字描述了要在生成的图像中包含的场景,对象和颜色。
  • 显式描述:明确指定详细信息,例如纹理,照明和对象在场景中的位置。
  • 参考图像:使用参考图像或链接来帮助指导模型生成匹配所需样式或内容的图像。
  • 迭代精致:改进提示,根据前几代的结果进行调整。

通过prompts处理常见问题

解决在迅速设计过程中可能出现的常见问题:

  • 柔软或模糊的纹理:对不同的采样器进行实验,从Euler家族移开,以获得更有趣和现实的纹理。
  • 缺乏细节:添加特定的关键字以强调所需的细节,例如雀斑,皮肤毛孔,详细的皮肤,鸡皮toss,用于皮肤质地。
  • 不一致的结果:限制生成图像的尺寸以避免一致性问题,并考虑根据需要对图像进行升级。

用于图像标签的剪辑和deepdanbooru

在本节中,我们将讨论两个图像标记系统,即剪辑和DeepDanbooru,并提供一些图像标记的简单示例。

夹子

剪辑(对比性语言图像预处理)是图像标记和零击学习模型。它在大量图像和文本标题的数据集上进行了训练,从而使其能够理解并生成各种图像标签。剪辑可用于通过提供描述图像内容的相关标签来为稳定扩散模型创建详细的prompts 。

示例1 :海滩上美丽日落的图像可能被剪辑标记为:

ocean, beach, sunset, waves, sand, palm trees, golden sky

或者

a masterpiece of an ocean with waves and palm trees, sunset in the east

示例2 :坐在窗台上的猫的图像可能被剪辑标记为:

a fluffy cat sitting on a windowsill, captivated, curious

或者

cat, windowsill, sitting, whiskers, fluffy, indoor, looking outside

Deepdanbooru

DeepDanbooru是一个图像标记系统,它使用Deep Learning自动将标签分配给图像,主要集中在动漫风格和任何类型的卡通图像上。它在具有关联标签的大图像数据集上进行了训练,从而可以识别广泛的属性,字符和样式。

https://danbooru.d*on*ma*i.us/tags

示例1 :森林中带有蓝色头发和白色盔甲的角色的图像:

1girl, blue_hair, white_armor, smiling, long_hair, ribbon, solo, forest

示例2 :带有樱花树的景观图像:

cherry_blossoms, no_humans, landscape, tree, sky, petals, scenic

夹子和DeepDanbooru均可用于生成图像的标签,然后可以用作稳定扩散模型的prompts 。通过使用这些标记系统,您可以更有效地指导图像生成过程,以确保生成的图像与所需的内容和样式匹配。

嵌入式负面提示

负面提示是一种使用文本反演或prompts中对比术语的方法,以鼓励语言模型产生更好的响应或预测。在解决生成的输出中的手工固定等问题时,此技术可能是有益的。

负面提示的一个例子是使用简单的嵌入,可以在Civitai和Hugging Face中找到。通过在负面提示中融合简单的不合格,它可以帮助提高产生的响应的质量。在负面提示中使用易于听觉的一个示例如下:

(EasyNegative:1.2), (monochrome:1.1), (greyscale),

负面提示的另一种方法是使用BAD_PROMPT_V2,这是一种文本反转,可用于纠正生成的输出中的手工固定问题。有关BAD_PROMPT_V2的更多信息可以在“拥抱面”页面上找到。

在负面提示中利用BAD_PROMPT_V2的一个示例:

(bad_prompt_version2:0.8), (worst quality:1.4), (low quality:1.4) , (monochrome:1.1)

通过利用EasyNgative和bad_prompt_v2之类的资源,可以创建更准确和可靠的生成响应。

高级技巧和技巧

采用高级技术来优化您的prompts以进行稳定扩散:

  • 对采样器进行微调:调整DPM ++ 2M Karras Sampler步骤,以找到颗粒感和光真相之间的最佳平衡。
  • 分辨率管理:以较小的分辨率生成图像,并执行SD高档以节省时间,同时保持质量。
  • 多个高档:如有必要,进行多次升级以达到所需的图像质量。
  • 雇用修复:使用雇用修复选项来生成许多图像,而无需进行手动调整,但请注意,它会降低人类选择的水平。

通过遵循这些准则和建议,您可以制作有效的prompts ,以驱动稳定的扩散以产生与您所需的样式和内容相匹配的高质量图像。

及时的例子

迅速的示例集,以激发和指导创建有效的prompts 。

  1. 赛博朋克城市景观

    neon-lit cyberpunk city at night, futuristic skyscrapers, flying cars, crowded streets, by Syd Mead
    
  2. 神秘的森林

    enchanting forest, glowing trees, magical creatures, dense fog, moonlit night, by Brian Froud
    
  3. 文艺复兴时期的肖像

    Renaissance-style portrait, woman wearing a pearl necklace, soft lighting, elegant attire, by Leonardo da Vinci
    
  4. 复古旅行海报

    vintage travel poster, tropical beach, palm trees, golden sunset, art deco style, by A.M. Cassandre
    
  5. 科幻空间场景

    epic sci-fi space battle, spaceships, laser beams, distant planets, vibrant colors, by Chris Foss
    
  6. 野生动植物插图

    realistic wildlife illustration, lion family resting in the grass, African savanna, golden hour, by Robert Bateman
    
  7. 幻想景观

    dreamy fantasy landscape, floating islands, waterfalls, dragons soaring in the sky, by Roger Dean
    
  8. 抽象艺术

    abstract expressionist painting, bold colors, dynamic brush strokes, intense emotion, by Jackson Pollock
    
  9. 森林监护人战士

    A majestic forest guardian warrior, with hair flowing in the wind and piercing blue eyes, stands near a rainforest with a cascading waterfall in the background. She wears gleaming gold and white armor, adorned with big hoop gold earrings and a tiara. A battle axe and broad sword hang from her belt, ready for battle. This should be a lifelike, super highly detailed, professional digital painting with HD quality and 8k resolution, in the style of Artgerm, Greg Rutkowski, and Loish.
    
  10. 中世纪骑士战士

A noble and chivalrous medieval knight warrior, with hair flowing in the wind and piercing blue eyes, stands in front of a castle with a clear blue sky in the background. She wears gleaming gold and white armor, adorned with big hoop gold earrings and a tiara. A battle axe and broad sword hang from her belt, ready for battle. This should be a lifelike, super highly detailed, professional digital painting with HD quality and 8k resolution, in the style of Alphonse Mucha, Artgerm, and Greg Rutkowski.
  1. 未来派太空战士
A fierce and futuristic space warrior, with hair flowing in the wind and piercing blue eyes, stands on the bridge of a spaceship with stars and galaxies in the background. She wears gleaming gold and white armor, adorned with big hoop gold earrings and a tiara. A laser sword and plasma blaster hang from her belt, ready for battle. This should be a lifelike, super highly detailed, professional digital painting with HD quality and 8k resolution, in the style of WLOP, Artgerm, and Greg Rutkowski.
  1. 神话般的海战士
A mythical sea warrior, with hair flowing in the wind and piercing blue eyes, stands on the rocky shore of an island with a stormy sea in the background. She wears gleaming gold and white armor, adorned with big hoop gold earrings and a tiara. A trident and harpoon hang from her belt, ready for battle. This should be a lifelike, super highly detailed, professional digital painting with HD quality and 8k resolution, in the style of Alphonse Mucha, Loish, and Artgerm.

这些及时的示例展示了如何有效地结合场景描述,特定对象,艺术风格和艺术家名称,以指导稳定的扩散,以生成所需的图像。

下载源码

通过命令行克隆项目:

git clone https://github.com/3ee-Games/prompts.git