Views
No views yet
pattern_dict for compressing ACEStep15-based models in ComfyUI:1pattern_dict_comfyui = {
2 r"decoder\.time_embed": (
3 "linear_1",
4 "linear_2",
5 "time_proj",
6 ),
7 r"decoder\.time_embed_r": (
8 "linear_1",
9 "linear_2",
10 "time_proj",
11 ),
12
13 r"decoder\.layers\.\d+": (
14 "self_attn.q_proj",
15 "self_attn.k_proj",
16 "self_attn.v_proj",
17 "self_attn.o_proj",
18 "cross_attn.q_proj",
19 "cross_attn.k_proj",
20 "cross_attn.v_proj",
21 "cross_attn.o_proj",
22 "mlp.gate_proj",
23 "mlp.up_proj",
24 "mlp.down_proj",
25 ),
26
27 r"encoder\.lyric_encoder\.layers\.\d++": (
28 "self_attn.q_proj",
29 "self_attn.k_proj",
30 "self_attn.v_proj",
31 "self_attn.o_proj",
32 "mlp.gate_proj",
33 "mlp.up_proj",
34 "mlp.down_proj",
35 ),
36 r"encoder\.timbre_encoder\.layers\.\d+": (
37 "self_attn.q_proj",
38 "self_attn.k_proj",
39 "self_attn.v_proj",
40 "self_attn.o_proj",
41 "mlp.gate_proj",
42 "mlp.up_proj",
43 "mlp.down_proj",
44 ),
45
46 r"tokenizer\.attention_pooler\.layers\.\d+": (
47 "self_attn.q_proj",
48 "self_attn.k_proj",
49 "self_attn.v_proj",
50 "self_attn.o_proj",
51 "mlp.gate_proj",
52 "mlp.up_proj",
53 "mlp.down_proj",
54 ),
55
56 r"detokenizer\.layers\.\d+": (
57 "self_attn.q_proj",
58 "self_attn.k_proj",
59 "self_attn.v_proj",
60 "self_attn.o_proj",
61 "mlp.gate_proj",
62 "mlp.up_proj",
63 "mlp.down_proj",
64 ),
65}