mingyi456 commited on
Commit
e6a2dfe
·
verified ·
1 Parent(s): 95547ee

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +43 -1
README.md CHANGED
@@ -12,4 +12,46 @@ tags:
12
  base_model:
13
  - nvidia/Cosmos-Predict2-2B-Text2Image
14
  base_model_relation: quantized
15
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  base_model:
13
  - nvidia/Cosmos-Predict2-2B-Text2Image
14
  base_model_relation: quantized
15
+ ---
16
+ For more information (including how to compress models yourself), check out https://huggingface.co/DFloat11 and https://github.com/LeanModels/DFloat11
17
+
18
+ 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.
19
+
20
+ ### How to Use
21
+
22
+ #### ComfyUI
23
+ 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.
24
+
25
+ #### `diffusers`
26
+ Refer to this [model](https://huggingface.co/mingyi456/Cosmos-Predict2-2B-Text2Image-DF11) instead.
27
+
28
+ ### Compression Details
29
+
30
+ This is the `pattern_dict` for compression:
31
+
32
+ ```python
33
+ pattern_dict_comfyui = {
34
+ "t_embedder\.1": (
35
+ "linear_1",
36
+ "linear_2",
37
+ ),
38
+ r"blocks\.\d+": (
39
+ "self_attn.q_proj",
40
+ "self_attn.k_proj",
41
+ "self_attn.v_proj",
42
+ "self_attn.output_proj",
43
+ "cross_attn.q_proj",
44
+ "cross_attn.k_proj",
45
+ "cross_attn.v_proj",
46
+ "cross_attn.output_proj",
47
+ "mlp.layer1",
48
+ "mlp.layer2",
49
+ "adaln_modulation_self_attn.1",
50
+ "adaln_modulation_self_attn.2",
51
+ "adaln_modulation_cross_attn.1",
52
+ "adaln_modulation_cross_attn.2",
53
+ "adaln_modulation_mlp.1",
54
+ "adaln_modulation_mlp.2",
55
+ )
56
+ }
57
+ ```