File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -175,6 +175,12 @@ std::unordered_map<std::string, std::string> pmid_v2_name_map = {
175
175
};
176
176
177
177
std::string convert_open_clip_to_hf_clip (const std::string& name) {
178
+ // Specific fix for ComfyUI-style SDXL CLIP-G text projection name
179
+ // Check this *before* any other modifications
180
+ if (name == " conditioner.embedders.1.model.text_projection.weight" ) {
181
+ return " cond_stage_model.1.transformer.text_model.text_projection" ;
182
+ }
183
+
178
184
std::string new_name = name;
179
185
std::string prefix;
180
186
if (starts_with (new_name, " conditioner.embedders.0.open_clip." )) {
@@ -185,7 +191,7 @@ std::string convert_open_clip_to_hf_clip(const std::string& name) {
185
191
new_name = new_name.substr (strlen (" conditioner.embedders.0." ));
186
192
} else if (starts_with (new_name, " conditioner.embedders.1." )) {
187
193
prefix = " cond_stage_model.1." ;
188
- new_name = new_name.substr (strlen (" conditioner.embedders.0 ." ));
194
+ new_name = new_name.substr (strlen (" conditioner.embedders.1 ." )); // Fix bug: use correct length for prefix 1
189
195
} else if (starts_with (new_name, " cond_stage_model." )) {
190
196
prefix = " cond_stage_model." ;
191
197
new_name = new_name.substr (strlen (" cond_stage_model." ));
You can’t perform that action at this time.
0 commit comments