Upload folder using huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,19 +1,19 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
---
|
| 4 |
-
# Templates
|
| 5 |
|
| 6 |
-
|
| 7 |
|
| 8 |
-
##
|
| 9 |
|
| 10 |
|Prompt: A meme with a happy expression.|Prompt: A meme with a sleepy expression.|Prompt: A meme with a surprised expression.|
|
| 11 |
|-|-|-|
|
| 12 |
||||
|
| 13 |
|
| 14 |
-
##
|
| 15 |
|
| 16 |
-
*
|
| 17 |
|
| 18 |
```
|
| 19 |
git clone https://github.com/modelscope/DiffSynth-Studio.git
|
|
@@ -21,13 +21,12 @@ cd DiffSynth-Studio
|
|
| 21 |
pip install -e .
|
| 22 |
```
|
| 23 |
|
| 24 |
-
*
|
| 25 |
|
| 26 |
```python
|
| 27 |
from diffsynth.diffusion.template import TemplatePipeline
|
| 28 |
from diffsynth.pipelines.flux2_image import Flux2ImagePipeline, ModelConfig
|
| 29 |
import torch
|
| 30 |
-
```
|
| 31 |
|
| 32 |
pipe = Flux2ImagePipeline.from_pretrained(
|
| 33 |
torch_dtype=torch.bfloat16,
|
|
@@ -70,7 +69,7 @@ image = template(
|
|
| 70 |
image.save("image_PandaMeme_surprised.jpg")
|
| 71 |
```
|
| 72 |
|
| 73 |
-
*
|
| 74 |
|
| 75 |
```python
|
| 76 |
from diffsynth.diffusion.template import TemplatePipeline
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
---
|
| 4 |
+
# Templates-魔性熊猫(FLUX.2-klein-base-4B)
|
| 5 |
|
| 6 |
+
本模型是 [DiffSynth-Studio](https://github.com/modelscope/DiffSynth-Studio) 开源的首批 Diffusion Templates 系列模型。这是一个彩蛋模型,能够生成各种魔性的熊猫头表情包。
|
| 7 |
|
| 8 |
+
## 效果展示
|
| 9 |
|
| 10 |
|Prompt: A meme with a happy expression.|Prompt: A meme with a sleepy expression.|Prompt: A meme with a surprised expression.|
|
| 11 |
|-|-|-|
|
| 12 |
||||
|
| 13 |
|
| 14 |
+
## 推理代码
|
| 15 |
|
| 16 |
+
* 安装 [DiffSynth-Studio](https://github.com/modelscope/DiffSynth-Studio)
|
| 17 |
|
| 18 |
```
|
| 19 |
git clone https://github.com/modelscope/DiffSynth-Studio.git
|
|
|
|
| 21 |
pip install -e .
|
| 22 |
```
|
| 23 |
|
| 24 |
+
* 直接推理,需 40G 显存
|
| 25 |
|
| 26 |
```python
|
| 27 |
from diffsynth.diffusion.template import TemplatePipeline
|
| 28 |
from diffsynth.pipelines.flux2_image import Flux2ImagePipeline, ModelConfig
|
| 29 |
import torch
|
|
|
|
| 30 |
|
| 31 |
pipe = Flux2ImagePipeline.from_pretrained(
|
| 32 |
torch_dtype=torch.bfloat16,
|
|
|
|
| 69 |
image.save("image_PandaMeme_surprised.jpg")
|
| 70 |
```
|
| 71 |
|
| 72 |
+
* 开启惰性加载和显存管理,需 24G 显存
|
| 73 |
|
| 74 |
```python
|
| 75 |
from diffsynth.diffusion.template import TemplatePipeline
|