---
title: Analog-Diffusion
canonical_url: "https://www.modelscope.cn/models/dienstag/Analog-Diffusion"
md_url: "https://www.modelscope.cn/models/dienstag/Analog-Diffusion.md"
repository: dienstag/Analog-Diffusion
chinese_name: "胶片质感扩散生成模型"
last_updated: 2023-02-15
license: creativeml-openrail-m
pipeline_tag: text-to-image-synthesis
tasks:
  - text-to-image-synthesis
parameters: 1.1B
tensor_type:
  - F16
library_name:
  - safetensors
  - pytorch
frameworks:
  - pytorch
downloads: 484
stars: 9
tags:
  - "text2image generation"
  - "stablediffusion model"
  - "stable diffusion"
  - "文到图"
  - "文生图"
  - "生成"
  - "图片生成"
  - "生成图片"
  - "ai作画"
  - "作画ai"
  - "作画"
---

# Analog-Diffusion

> Analog-Diffusion - dienstag 在 ModelScope 开源的模型。输出胶片摄影质感的图像；微调自Stable Diffusion

dienstag/Analog-Diffusion 是 ModelScope 魔搭社区上的 1.1B 参数text-to-image-synthesis模型，采用 creativeml-openrail-m 许可。

- **Repository**: dienstag/Analog-Diffusion
- **License**: creativeml-openrail-m
- **Tasks**: text-to-image-synthesis
- **Parameters**: 1.1B
- **Tags**: text2image generation, stablediffusion model, stable diffusion, 文到图, 文生图, 生成, 图片生成, 生成图片, ai作画, 作画ai, 作画
- **Downloads**: 484
- **Stars**: 9
- **Last updated**: 2023-02-15

Source: https://www.modelscope.cn/models/dienstag/Analog-Diffusion

---

**Analog Diffusion**

![Header](images/page1.jpg)

本模型利用dreambooth方法微调Stable Diffusion 1.5而来，数据集为胶片摄影数据集。

在prompt中加入`analog style` 以实现胶片摄影效果。

在`negative_prompt` 中最好加入` blur haze naked` . 微调数据集中并不存在NSFW样本但是模型有可能输出NSFW内容。

请注意，在`negative_prompt` 中加入`blur`和`haze`，可以使图像更清晰，但也有不太明显的模拟胶片效果。



样例图像的参数（prompt, sampler, seed, *etc.*）请参考[本文件](parameters_used_examples.txt)。

![Environments Example](images/page2.jpg)
![Characters Example](images/page3.jpg)



 [点击此处查看一些随机挑选的样本](https://imgur.com/a/7iOgTFv)



## 使用方法：

```python
from modelscope.utils.constant import Tasks
from modelscope.pipelines import pipeline
import cv2

pipe = pipeline(task=Tasks.text_to_image_synthesis, 
                model='dienstag/Analog-Diffusion',
                model_revision='v1.0')

prompt = 'analog style blonde Princess Peach in the mushroom kingdom'
negative_prompt = 'blur haze'
output = pipe({'text': prompt, 'negative_prompt': negative_prompt})
cv2.imwrite('result.png', output['output_imgs'][0])
```
