mingyi456 commited on
Commit
a142735
·
verified ·
1 Parent(s): 8339ed8

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +84 -1
README.md CHANGED
@@ -10,4 +10,87 @@ tags:
10
  base_model:
11
  - ACE-Step/Ace-Step1.5
12
  base_model_relation: quantized
13
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  base_model:
11
  - ACE-Step/Ace-Step1.5
12
  base_model_relation: quantized
13
+ ---
14
+ For more information (including how to compress models yourself), check out https://huggingface.co/DFloat11 and https://github.com/LeanModels/DFloat11
15
+
16
+ Feel free to request for other models for compression as well, although models whose architecture I am unfamiliar with might be slightly tricky for me.
17
+
18
+ ### How to Use
19
+
20
+ #### ComfyUI
21
+ Install the ComfyUI DFloat11 Extended node via the ComfyUI manager. After installing, simply replace the "Load Diffusion Model" node of an existing workflow with the "Load Diffusion Model" node. If you run into any issues, feel free to leave a comment.
22
+
23
+ #### Official implementation
24
+ This is coming soon, but I suspect that these existing compressed weights might be compatible out-of-the-box with the official implementation.
25
+
26
+ ### Compression Details
27
+
28
+ This is the `pattern_dict` for compressing ACEStep15-based models in ComfyUI:
29
+
30
+ ```python
31
+ pattern_dict_comfyui = {
32
+ r"decoder\.time_embed": (
33
+ "linear_1",
34
+ "linear_2",
35
+ "time_proj",
36
+ ),
37
+ r"decoder\.time_embed_r": (
38
+ "linear_1",
39
+ "linear_2",
40
+ "time_proj",
41
+ ),
42
+
43
+ r"decoder\.layers\.\d+": (
44
+ "self_attn.q_proj",
45
+ "self_attn.k_proj",
46
+ "self_attn.v_proj",
47
+ "self_attn.o_proj",
48
+ "cross_attn.q_proj",
49
+ "cross_attn.k_proj",
50
+ "cross_attn.v_proj",
51
+ "cross_attn.o_proj",
52
+ "mlp.gate_proj",
53
+ "mlp.up_proj",
54
+ "mlp.down_proj",
55
+ ),
56
+
57
+ r"encoder\.lyric_encoder\.layers\.\d++": (
58
+ "self_attn.q_proj",
59
+ "self_attn.k_proj",
60
+ "self_attn.v_proj",
61
+ "self_attn.o_proj",
62
+ "mlp.gate_proj",
63
+ "mlp.up_proj",
64
+ "mlp.down_proj",
65
+ ),
66
+ r"encoder\.timbre_encoder\.layers\.\d+": (
67
+ "self_attn.q_proj",
68
+ "self_attn.k_proj",
69
+ "self_attn.v_proj",
70
+ "self_attn.o_proj",
71
+ "mlp.gate_proj",
72
+ "mlp.up_proj",
73
+ "mlp.down_proj",
74
+ ),
75
+
76
+ r"tokenizer\.attention_pooler\.layers\.\d+": (
77
+ "self_attn.q_proj",
78
+ "self_attn.k_proj",
79
+ "self_attn.v_proj",
80
+ "self_attn.o_proj",
81
+ "mlp.gate_proj",
82
+ "mlp.up_proj",
83
+ "mlp.down_proj",
84
+ ),
85
+
86
+ r"detokenizer\.layers\.\d+": (
87
+ "self_attn.q_proj",
88
+ "self_attn.k_proj",
89
+ "self_attn.v_proj",
90
+ "self_attn.o_proj",
91
+ "mlp.gate_proj",
92
+ "mlp.up_proj",
93
+ "mlp.down_proj",
94
+ ),
95
+ }
96
+ ```