mingyi456 commited on
Commit
bd4281b
·
verified ·
1 Parent(s): 00b9d67

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +45 -1
README.md CHANGED
@@ -12,4 +12,48 @@ tags:
12
  base_model:
13
  - nvidia/Cosmos-Predict2-14B-Text2Image
14
  base_model_relation: quantized
15
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  base_model:
13
  - nvidia/Cosmos-Predict2-14B-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 my own fork of the DF11 ComfyUI custom node: https://github.com/mingyi456/ComfyUI-DFloat11-Extended instead. After installing the DF11 custom node, use the provided workflow [json](cosmos_predict2_14B_t2i-DF11-workflow.json), or simply replace the "Load Diffusion Model" node of an existing Kontext workflow with the "DFloat11 Model Loader" node. If you run into any issues, feel free to leave a comment. The workflow is also embedded in the below [png](cosmos_predict2_14B_t2i-DF11-workflow.png) image.
24
+
25
+ ![](cosmos_predict2_14B_t2i-DF11-workflow.png)
26
+
27
+ #### `diffusers`
28
+ Refer to this [model](https://huggingface.co/mingyi456/Cosmos-Predict2-14B-Text2Image-DF11) instead.
29
+
30
+ ### Compression Details
31
+
32
+ This is the `pattern_dict` for compression:
33
+
34
+ ```python
35
+ pattern_dict_comfyui = {
36
+ "t_embedder\.1": (
37
+ "linear_1",
38
+ "linear_2",
39
+ ),
40
+ r"blocks\.\d+": (
41
+ "self_attn.q_proj",
42
+ "self_attn.k_proj",
43
+ "self_attn.v_proj",
44
+ "self_attn.output_proj",
45
+ "cross_attn.q_proj",
46
+ "cross_attn.k_proj",
47
+ "cross_attn.v_proj",
48
+ "cross_attn.output_proj",
49
+ "mlp.layer1",
50
+ "mlp.layer2",
51
+ "adaln_modulation_self_attn.1",
52
+ "adaln_modulation_self_attn.2",
53
+ "adaln_modulation_cross_attn.1",
54
+ "adaln_modulation_cross_attn.2",
55
+ "adaln_modulation_mlp.1",
56
+ "adaln_modulation_mlp.2",
57
+ )
58
+ }
59
+ ```