Skip to content

Commit 15c5f3d

Browse files
committed
Map qwen-image-edit-2511 models to Arch.qwen_e_p #2245
* use same workflow as the 2509 version of qwen image edit for now
1 parent a27bbce commit 15c5f3d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

ai_diffusion/resources.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ class Arch(Enum):
9494

9595
@staticmethod
9696
def from_string(string: str, model_type: str = "eps", filename: str | None = None):
97+
filename = filename.lower() if filename else ""
9798
if string == "sd15":
9899
return Arch.sd15
99100
if string == "sdxl" and model_type == "v-prediction":
@@ -102,7 +103,7 @@ def from_string(string: str, model_type: str = "eps", filename: str | None = Non
102103
return Arch.sdxl
103104
if string == "sd3":
104105
return Arch.sd3
105-
if string == "flux" and filename and "kontext" in filename.lower():
106+
if string == "flux" and "kontext" in filename:
106107
return Arch.flux_k
107108
if string == "flux" or string == "flux-schnell":
108109
return Arch.flux
@@ -112,12 +113,12 @@ def from_string(string: str, model_type: str = "eps", filename: str | None = Non
112113
return Arch.illu_v
113114
if string == "chroma":
114115
return Arch.chroma
115-
if string == "qwen-image" and filename and "edit" in filename.lower():
116-
if "2509" in filename.lower():
116+
if string == "qwen-image" and "edit" in filename:
117+
if "2509" in filename or "2511" in filename:
117118
return Arch.qwen_e_p
118119
else:
119120
return Arch.qwen_e
120-
if string == "qwen-image" and filename and "layered" in filename.lower():
121+
if string == "qwen-image" and "layered" in filename:
121122
return Arch.qwen_l
122123
if string == "qwen-image":
123124
return Arch.qwen

0 commit comments

Comments
 (0)