Skip to content

Latest commit

 

History

History
58 lines (31 loc) · 1.52 KB

README.md

File metadata and controls

58 lines (31 loc) · 1.52 KB

Stable Diffusion in DirectML

Modified version of stable-diffusion-tensorflow project with DirectML support.

魔改自stable-diffusion-tensorflow项目

Need 12 gigabytes of RAM to run it.

需要12GB的RAM运行(使用原项目提供的模型条件下)

(VRAM + RAM >= 12 gigabytes)

(即显存 + 内存 >= 12GB)

The weights were ported from the original implementation.

Installation & Usage

Clone this project to install

Generation is quite slow for some unknown reasons.

由于某些未知原因,生成速度相当缓慢。

需要手动修改后端以提供swish激活函数的支持,即在

site-packages\tensorflow_core\python\keras\api\_v1\keras\activations\__init__.py

import sys...下一行加入

from tensorflow.python.keras.activations import swish

并在

site-packages\tensorflow_core\python\keras\activations.py

结尾加入

@keras_export('keras.activations.swish')
def swish(x):
    return nn.sigmoid(x)*x

More testing needed.

Inpainting

a

Image2Image

  1. a high quality sketch of people standing with sun and grass , watercolor , pencil color

Screen Shot 2022-10-09 at 9 34 30 AM

References

  1. https://github.com/CompVis/stable-diffusion
  2. https://github.com/geohot/tinygrad/blob/master/examples/stable_diffusion.py