File size: 4,499 Bytes
cc69848 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 |
PRESET = {
"full": {
"enable_conv": True,
"unet_target_module": [
"Transformer2DModel",
"ResnetBlock2D",
"Downsample2D",
"Upsample2D",
"HunYuanDiTBlock", #HunYuanDiT
"DoubleStreamBlock", #Flux
"SingleStreamBlock", #Flux
"SingleDiTBlock", #SD3.5
"MMDoubleStreamBlock", #HunYuanVideo
"MMSingleStreamBlock", #HunYuanVideo
],
"unet_target_name": [
"conv_in",
"conv_out",
"time_embedding.linear_1",
"time_embedding.linear_2",
],
"text_encoder_target_module": [
"CLIPAttention",
"CLIPSdpaAttention",
"CLIPMLP",
"MT5Block",
"BertLayer",
],
"text_encoder_target_name": [],
},
"full-lin": {
"enable_conv": False,
"unet_target_module": [
"Transformer2DModel",
"ResnetBlock2D",
"HunYuanDiTBlock",
"DoubleStreamBlock",
"SingleStreamBlock",
"SingleDiTBlock",
"MMDoubleStreamBlock", #HunYuanVideo
"MMSingleStreamBlock", #HunYuanVideo
],
"unet_target_name": [
"time_embedding.linear_1",
"time_embedding.linear_2",
],
"text_encoder_target_module": [
"CLIPAttention",
"CLIPSdpaAttention",
"CLIPMLP",
"MT5Block",
"BertLayer",
],
"text_encoder_target_name": [],
},
"attn-mlp": {
"enable_conv": False,
"unet_target_module": [
"Transformer2DModel",
"HunYuanDiTBlock",
"DoubleStreamBlock",
"SingleStreamBlock",
"SingleDiTBlock",
"MMDoubleStreamBlock", #HunYuanVideo
"MMSingleStreamBlock", #HunYuanVideo
],
"unet_target_name": [],
"text_encoder_target_module": [
"CLIPAttention",
"CLIPSdpaAttention",
"CLIPMLP",
"MT5Block",
"BertLayer",
],
"text_encoder_target_name": [],
},
"attn-only": {
"enable_conv": False,
"unet_target_module": [
"CrossAttention",
"SelfAttention",
],
"unet_target_name": [],
"text_encoder_target_module": [
"CLIPAttention",
"CLIPSdpaAttention",
"BertAttention",
"MT5LayerSelfAttention",
],
"text_encoder_target_name": [],
},
"unet-only": {
"enable_conv": True,
"unet_target_module": [
"Transformer2DModel",
"ResnetBlock2D",
"Downsample2D",
"Upsample2D",
"HunYuanDiTBlock",
"DoubleStreamBlock",
"SingleStreamBlock",
"SingleDiTBlock",
"MMDoubleStreamBlock", #HunYuanVideo
"MMSingleStreamBlock", #HunYuanVideo
],
"unet_target_name": [
"conv_in",
"conv_out",
"time_embedding.linear_1",
"time_embedding.linear_2",
],
"text_encoder_target_module": [],
"text_encoder_target_name": [],
},
"unet-transformer-only": {
"enable_conv": False,
"unet_target_module": [
"Transformer2DModel",
"HunYuanDiTBlock",
"DoubleStreamBlock",
"SingleStreamBlock",
"SingleDiTBlock",
"MMDoubleStreamBlock", #HunYuanVideo
"MMSingleStreamBlock", #HunYuanVideo
],
"unet_target_name": [],
"text_encoder_target_module": [],
"text_encoder_target_name": [],
},
"unet-convblock-only": {
"enable_conv": True,
"unet_target_module": ["ResnetBlock2D", "Downsample2D", "Upsample2D"],
"unet_target_name": [
"conv_in",
"conv_out",
],
"text_encoder_target_module": [],
"text_encoder_target_name": [],
},
"ia3": {
"enable_conv": False,
"unet_target_module": [],
"unet_target_name": ["to_k", "to_v", "ff.net.2"],
"text_encoder_target_module": [],
"text_encoder_target_name": ["k_proj", "v_proj", "mlp.fc2"],
"name_algo_map": {
"mlp.fc2": {"train_on_input": True},
"ff.net.2": {"train_on_input": True},
},
},
}
|