kelseye commited on
Commit
4b4192e
·
verified ·
1 Parent(s): a3cdd78

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +11 -9
README.md CHANGED
@@ -1,19 +1,19 @@
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
  |![](./assets/image_PandaMeme_happy.jpg)|![](./assets/image_PandaMeme_sleepy.jpg)|![](./assets/image_PandaMeme_surprised.jpg)|
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,12 +21,13 @@ cd DiffSynth-Studio
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,13 +70,14 @@ image = template(
69
  image.save("image_PandaMeme_surprised.jpg")
70
  ```
71
 
72
- * 开启惰性加载和显存管理,需 24G 显存
73
 
74
  ```python
75
  from diffsynth.diffusion.template import TemplatePipeline
76
  from diffsynth.pipelines.flux2_image import Flux2ImagePipeline, ModelConfig
77
  import torch
78
 
 
79
  vram_config = {
80
  "offload_dtype": "disk",
81
  "offload_device": "disk",
@@ -129,9 +131,9 @@ image = template(
129
  image.save("image_PandaMeme_surprised.jpg")
130
  ```
131
 
132
- ## 训练代码
133
 
134
- 安装 DiffSynth-Studio 后,使用以下脚本可开启训练,更多信息请参考 [DiffSynth-Studio 文档](https://diffsynth-studio-doc.readthedocs.io/zh-cn/latest/)
135
 
136
  ```shell
137
  modelscope download --dataset DiffSynth-Studio/diffsynth_example_dataset --include "flux2/Template-KleinBase4B-PandaMeme/*" --local_dir ./data/diffsynth_example_dataset
 
1
  ---
2
  license: apache-2.0
3
  ---
4
+ # Templates-PandaMeme (FLUX.2-klein-base-4B)
5
 
6
+ This model is part of the first batch of Diffusion Templates series models open-sourced by [DiffSynth-Studio](https://github.com/modelscope/DiffSynth-Studio). It's an Easter egg model capable of generating various quirky panda-head meme images.
7
 
8
+ ## Demo
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
  |![](./assets/image_PandaMeme_happy.jpg)|![](./assets/image_PandaMeme_sleepy.jpg)|![](./assets/image_PandaMeme_surprised.jpg)|
13
 
14
+ ## Inference Code
15
 
16
+ * Install [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
+ * Direct inference (requires 40G GPU memory)
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
  image.save("image_PandaMeme_surprised.jpg")
71
  ```
72
 
73
+ * Enable lazy loading and memory management, requires 24G GPU memory
74
 
75
  ```python
76
  from diffsynth.diffusion.template import TemplatePipeline
77
  from diffsynth.pipelines.flux2_image import Flux2ImagePipeline, ModelConfig
78
  import torch
79
 
80
+ ```python
81
  vram_config = {
82
  "offload_dtype": "disk",
83
  "offload_device": "disk",
 
131
  image.save("image_PandaMeme_surprised.jpg")
132
  ```
133
 
134
+ ## Training Code
135
 
136
+ After installing DiffSynth-Studio, use the following script to start training. For more information, please refer to the [DiffSynth-Studio Documentation](https://diffsynth-studio-doc.readthedocs.io/zh-cn/latest/).
137
 
138
  ```shell
139
  modelscope download --dataset DiffSynth-Studio/diffsynth_example_dataset --include "flux2/Template-KleinBase4B-PandaMeme/*" --local_dir ./data/diffsynth_example_dataset