920 字
5 分钟
StableDiffusion:介绍
1. 基本原理
-
人类绘图:草稿、线稿、描边、上色、处理细节
-
AI绘图:参考图 → 增加噪声 → 提取图像的信息特征 → 去除噪声【
Stable Diffusion含义即为稳定扩散】

2. 核心功能
2.1 文生图(text-to-img)
输入一段提示词,AI会根据文字内容生成相应的图像。
- 正向提示词(希望AI生成的内容)
masterpiece, best quality, wallpaper forced, high quality, a girl, flowers, auburn hair, English countryside, midday, clear sky, rolling green hills, close-up shot, head and shoulders, natural lighting,- 负向提示词(可选,希望AI
避免生成的内容)
worst quality, grayscale, simple background, bad hands, bad feet, bad anatomy, watermark, signature,- 生成图像
| 动漫风格-1 | 动漫风格-2 |
|---|---|
![]() | ![]() |
| 真实风格-1 | 真实风格-2 |
|---|---|
![]() | ![]() |
2.2 图生图(img-to-img)
输入一段提示词和一幅参考图,AI会根据提示词及参考图,重新生成新的图像。
- 提示词
The picture is a documentary photograph of a young woman, wearing a blue headscarf with a yellow ribbon, a yellow dress with a white collar, and a pearl earring.| 参考图 | AI生成图 | AI生成图 | AI生成图 |
|---|---|---|---|
![]() | ![]() | ![]() | ![]() |
2.3 局部重绘(inpaint)
输入一段提示词和一幅参考图像,再圈定一块需要重绘的范围,AI会根据提示词,在圈定的绘制范围内重新生成新的图像。
| 参考图 | 蒙版图 |
|---|---|
![]() | ![]() |
| 生成图:yellow shirt | 生成图:light green sweater | 生成图:pink sweater |
|---|---|---|
![]() | ![]() | ![]() |
2.4 扩图(outpaint)
输入一段提示词和一幅参考图像,再设定一个大于原始图像尺寸的蒙版,AI会根据提示词,在蒙版的灰白区域,重新生成新的图像。
- 提示词
The image is a portrait of a young Asian woman sitting on a wooden chair. She is wearing a white collared shirt with a blue and white striped tie and a black skirt. Her long black hair is styled in loose waves and she is looking directly at the camera with a slight smile on her lips. The background is blurred, but it appears to be a room with a white wall and a wooden floor. The overall mood of the image is relaxed and casual.| 参考图 | 蒙版图 | 生成图 |
|---|---|---|
![]() | ![]() | ![]() |
2.5 高清放大(upscale)
输入一幅参考图像,选择合适的放大算法和放大比例,AI会根据算法和比例,进行图像放大。
| 参考图:768 * 1024 | 生成图:1536 * 2048 |
|---|---|
![]() | ![]() |
3. 辅助功能
3.1 构图控制:ControlNet插件
边缘检测:Canny、HED、Lineart
| 参考图 | Canny图像 | HED图像 | Lineart图像 |
|---|---|---|---|
![]() | ![]() | ![]() | ![]() |
| 动漫风格 | 动漫风格 | 真人风格 | 真人风格 |
|---|---|---|---|
![]() | ![]() | ![]() | ![]() |
深度检测:Depth
| 参考图 | Depth图像 |
|---|---|
![]() | ![]() |
| 动漫风格 | 动漫风格 | 真人风格 |
|---|---|---|
![]() | ![]() | ![]() |
![]() | ![]() | ![]() |
姿态检测:Pose
| 参考图 | Openpose图像 |
|---|---|
![]() | ![]() |
| 动漫风格 | 真人风格 |
|---|---|
![]() | ![]() |
3.2 元素控制:LoRA模型
汉服
| AI生成图 | AI生成图 | AI生成图 |
|---|---|---|
![]() | ![]() | ![]() |
手办
| AI生成图 | AI生成图 |
|---|---|
![]() | ![]() |
| AI生成图 | AI生成图 | AI生成图 |
|---|---|---|
![]() | ![]() | ![]() |
沁彩
| AI生成图:人物 | AI生成图:人物 |
|---|---|
![]() | ![]() |
![]() | ![]() |
| AI生成图:场景 | AI生成图:场景 |
|---|---|
![]() | ![]() |
![]() | ![]() |
Q版手绘
| AI生成图:半身 | AI生成图:半身 |
|---|---|
![]() | ![]() |
| AI生成图:全身 | AI生成图:全身 | AI生成图:全身 |
|---|---|---|
![]() | ![]() | ![]() |
水彩·小场景
| AI生成图 | AI生成图 | AI生成图 | AI生成图 |
|---|---|---|---|
![]() | ![]() | ![]() | ![]() |



























































