Skip to content

Commit 46eeff5

Browse files
committed
add xlabs flux comfy converted lora support
1 parent d8c65b4 commit 46eeff5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

model.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,10 @@ std::string convert_diffusers_name_to_compvis(std::string key, char seq) {
422422
return key;
423423
}
424424

425-
std::string convert_tensor_name(const std::string& name) {
425+
std::string convert_tensor_name(std::string name) {
426+
if (starts_with(name, "diffusion_model")) {
427+
name = "model." + name;
428+
}
426429
std::string new_name = name;
427430
if (starts_with(name, "cond_stage_model.") || starts_with(name, "conditioner.embedders.") || starts_with(name, "text_encoders.") || ends_with(name, ".vision_model.visual_projection.weight")) {
428431
new_name = convert_open_clip_to_hf_clip(name);

0 commit comments

Comments
 (0)