mingyi456 commited on
Commit
9c2eea1
·
verified ·
1 Parent(s): ddf3c80

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +39 -0
README.md CHANGED
@@ -11,6 +11,9 @@ library_name: diffusers
11
  tags:
12
  - diffusion-single-file
13
  ---
 
 
 
14
 
15
  ```python
16
  import torch
@@ -57,4 +60,40 @@ image = pipe(
57
  enable_prompt_rewrite=True
58
  ).images[0]
59
  image.save('image longcat-image.png')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
  ```
 
11
  tags:
12
  - diffusion-single-file
13
  ---
14
+ ### How to Use
15
+
16
+ #### `diffusers`
17
 
18
  ```python
19
  import torch
 
60
  enable_prompt_rewrite=True
61
  ).images[0]
62
  image.save('image longcat-image.png')
63
+ ```
64
+
65
+ #### ComfyUI
66
+ Currently, this model is not supported natively in ComfyUI. Do let me know if it receives native support, and I will get to supporting it.
67
+
68
+ ### Compression details
69
+
70
+ This is the `pattern_dict` for compression:
71
+
72
+ ```python
73
+ pattern_dict = {
74
+ r"transformer_blocks\.\d+": (
75
+ "norm1.linear",
76
+ "norm1_context.linear",
77
+ "attn.to_q",
78
+ "attn.to_k",
79
+ "attn.to_v",
80
+ "attn.to_out.0",
81
+ "attn.add_q_proj",
82
+ "attn.add_k_proj",
83
+ "attn.add_v_proj",
84
+ "attn.to_add_out",
85
+ "ff.net.0.proj",
86
+ "ff.net.2",
87
+ "ff_context.net.0.proj",
88
+ "ff_context.net.2",
89
+ ),
90
+ r"single_transformer_blocks\.\d+": (
91
+ "norm.linear",
92
+ "proj_mlp",
93
+ "proj_out",
94
+ "attn.to_q",
95
+ "attn.to_k",
96
+ "attn.to_v",
97
+ ),
98
+ }
99
  ```