Skip to content

Commit e3a660f

Browse files
committed
Prioritize Qwen3.6 API models and mark legacy Qwen models with deprecation notices.
1 parent 2fa73f0 commit e3a660f

3 files changed

Lines changed: 120 additions & 33 deletions

File tree

README.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ Supports **local LLM / local GGUF models** (Qwen2.5-VL, Qwen3-VL, Qwen3.5 and Qw
1111

1212
The following notes are intended for existing users upgrading to `1.0.11`.
1313

14+
### Qwen API model list updated for Model Studio deprecation notices
15+
Cloud API model selection now prioritizes Qwen3.6 models, including `qwen3.6-plus` and `qwen3.6-flash`.
16+
Older API models remain selectable for existing workflow compatibility, but are marked as deprecated in the UI:
17+
- `deprecated: announced offline since 2026-05-13` for models already announced as offline.
18+
- `deprecated: offline scheduled 2026-07-13` for models announced for the July 13, 2026 offline window.
19+
- `deprecated: legacy, prefer Qwen3.6` for legacy models kept for compatibility.
20+
1421
### Expanded search paths for local Qwen-family GGUF models
1522
In addition to `models/LLM`, this release now searches `models/text_encoders` and its subdirectories for GGUF files. Because this changes how model paths are handled internally, you may need to reselect your models the first time you run the node after updating.
1623

@@ -177,7 +184,7 @@ Add your Alibaba Cloud Dashscope API key to this file.
177184
- `target_language`: Output language (auto/zh/en)
178185
- `llm_model`: Model selection
179186
- `Local: xxx`: Local GGUF models (auto-detected)
180-
- API models: qwen-vl-max, qwen-plus, etc.
187+
- API models: qwen3.6-plus, qwen3.6-flash, etc.
181188
- `mmproj`: mmproj file (required for local models)
182189
- `(Auto-detect)`: Automatic detection
183190
- `(Not required)`: For API models or text-only mode
@@ -208,7 +215,7 @@ Add your Alibaba Cloud Dashscope API key to this file.
208215
- `target_language`: Output language (auto/zh/en)
209216
- `llm_model`: Model selection
210217
- `Local: xxx`: Local GGUF models
211-
- API models: qwen-vl-max (for I2V), qwen-plus, etc.
218+
- API models: qwen3.6-plus, qwen3.6-flash, etc.
212219
- `mmproj`: mmproj selection (same as other nodes)
213220
- `max_retries`: API retry attempts
214221
- `device`: CPU/GPU for local models
@@ -224,7 +231,7 @@ Add your Alibaba Cloud Dashscope API key to this file.
224231
**Important notes:**
225232
- **Use Chinese prompts** (`target_language: zh`) for best results
226233
- Supports up to 600+ Chinese characters (2048 tokens)
227-
- For I2V tasks, use `qwen-vl-*` models
234+
- For I2V tasks, use Qwen3.6 or `qwen-vl-*` models
228235

229236
**Example T2V workflow:**
230237
1. Enter prompt: "A cat looking out from a windowsill"
@@ -238,7 +245,7 @@ Add your Alibaba Cloud Dashscope API key to this file.
238245
2. Enter motion description: "The camera slowly pushes in"
239246
3. Set `task_type`: Image-to-Video
240247
4. Set `target_language`: zh
241-
5. Ensure model supports vision (qwen-vl-*)
248+
5. Ensure model supports vision (Qwen3.6 or qwen-vl-*)
242249
6. Run to get I2V prompt
243250

244251
---

qwen_nodes.py

Lines changed: 54 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,51 @@
5050

5151
key_path = os.path.join(folder_paths.get_folder_paths("custom_nodes")[0], "ComfyUI-MultiModal-Prompt-Nodes", "api_key.txt")
5252

53+
QWEN_API_MAIN_MODELS = [
54+
"qwen3.6-plus",
55+
"qwen3.6-flash",
56+
"qwen3.6-plus-2026-04-02",
57+
"qwen3.6-flash-2026-04-16",
58+
"qwen3.6-35b-a3b",
59+
]
60+
61+
QWEN_API_OFFLINE_SINCE_2026_05_13 = [
62+
"qwen-vl-max-latest",
63+
"qwen-vl-max-2025-08-13",
64+
"qwen-vl-max-2025-04-08",
65+
"qwen-max-latest",
66+
]
67+
68+
QWEN_API_OFFLINE_SCHEDULED_2026_07_13 = [
69+
"qwen-vl-max",
70+
"qwen-vl-plus",
71+
"qwen-plus",
72+
"qwen-max",
73+
"qwen-turbo",
74+
]
75+
76+
QWEN_API_LEGACY_MODELS = [
77+
"qwen-plus-latest",
78+
]
79+
80+
QWEN_API_MODELS = (
81+
QWEN_API_MAIN_MODELS
82+
+ [f"{model} (deprecated: announced offline since 2026-05-13)" for model in QWEN_API_OFFLINE_SINCE_2026_05_13]
83+
+ [f"{model} (deprecated: offline scheduled 2026-07-13)" for model in QWEN_API_OFFLINE_SCHEDULED_2026_07_13]
84+
+ [f"{model} (deprecated: legacy, prefer Qwen3.6)" for model in QWEN_API_LEGACY_MODELS]
85+
)
86+
87+
QWEN_API_MODEL_IDS = set(
88+
QWEN_API_MAIN_MODELS
89+
+ QWEN_API_OFFLINE_SINCE_2026_05_13
90+
+ QWEN_API_OFFLINE_SCHEDULED_2026_07_13
91+
+ QWEN_API_LEGACY_MODELS
92+
)
93+
QWEN_API_VISION_MODEL_IDS = {model for model in QWEN_API_MODEL_IDS if model.startswith(("qwen3.6-", "qwen-vl-"))}
94+
95+
def normalize_api_model_name(model):
96+
return model.split(" (", 1)[0]
97+
5398
IMAGE_SYSTEM_PROMPT_ZH = '''
5499
你是一位Prompt优化师,旨在将用户输入改写为优质Prompt,使其更完整、更具表现力,同时不改变原意。
55100
任务要求:
@@ -299,12 +344,13 @@ def build_force_translate_to_zh_prompt(text, prompt_style):
299344
f"{text}"
300345
)
301346

302-
def api_edit(prompt, img_list, model="qwen-vl-max-latest", save_tokens=True, api_key=None, kwargs={}):
347+
def api_edit(prompt, img_list, model="qwen3.6-plus", save_tokens=True, api_key=None, kwargs={}):
303348
if not api_key:
304349
raise EnvironmentError("API_KEY is not set!")
305-
350+
351+
model = normalize_api_model_name(model)
306352
print(f'Using "{model}" for prompt rewriting...')
307-
assert model in ["qwen-vl-max", "qwen-vl-max-latest", "qwen-vl-max-2025-08-13", "qwen-vl-max-2025-04-08"], f'"{model}" is not available for the "Qwen-Image-Edit" style.'
353+
assert model in QWEN_API_VISION_MODEL_IDS, f'"{model}" is not available for the "Qwen-Image-Edit" style.'
308354
sys_promot = "you are a helpful assistant, you should provide useful answers to users."
309355
messages = [
310356
{"role": "system", "content": sys_promot},
@@ -338,7 +384,7 @@ def api_edit(prompt, img_list, model="qwen-vl-max-latest", save_tokens=True, api
338384
else:
339385
raise Exception(f'Failed to post: {response}')
340386

341-
def polish_prompt_edit(api_key, prompt, img, model="qwen-vl-max-latest", max_retries=10, save_tokens=True, target_language="auto"):
387+
def polish_prompt_edit(api_key, prompt, img, model="qwen3.6-plus", max_retries=10, save_tokens=True, target_language="auto"):
342388
retries = 0
343389

344390
# Detect original language
@@ -395,8 +441,9 @@ def api(prompt, model, api_key=None, kwargs={}):
395441
if not api_key:
396442
raise EnvironmentError("API_KEY is not set!")
397443

444+
model = normalize_api_model_name(model)
398445
print(f'Using "{model}" for prompt rewriting...')
399-
assert model in ["qwen-vl-max", "qwen-vl-max-latest", "qwen-vl-max-2025-08-13", "qwen-plus", "qwen-max", "qwen-plus-latest", "qwen-max-latest"], f'"{model}" is not available for the "Qwen-Image" style.'
446+
assert model in QWEN_API_MODEL_IDS, f'"{model}" is not available for the "Qwen-Image" style.'
400447
messages = [
401448
{'role': 'system', 'content': 'You are a helpful assistant.'},
402449
{'role': 'user', 'content': prompt}
@@ -417,7 +464,7 @@ def api(prompt, model, api_key=None, kwargs={}):
417464
else:
418465
raise Exception(f'Failed to post: {response}')
419466

420-
def polish_prompt(api_key, prompt, model="qwen-plus", max_retries=10, target_language="auto"):
467+
def polish_prompt(api_key, prompt, model="qwen3.6-plus", max_retries=10, target_language="auto"):
421468
retries = 0
422469

423470
# Detect original language
@@ -480,13 +527,8 @@ def INPUT_TYPES(s):
480527
if not mmproj_files:
481528
mmproj_options = ["(Auto-detect)", "(Not required)"]
482529

483-
# API
484-
api_models = ["qwen-vl-max", "qwen-vl-max-latest", "qwen-vl-max-2025-08-13",
485-
"qwen-vl-max-2025-04-08", "qwen-plus", "qwen-max",
486-
"qwen-plus-latest", "qwen-max-latest"]
487-
488530
# integration
489-
all_models = local_models + api_models
531+
all_models = local_models + QWEN_API_MODELS
490532
if not all_models:
491533
all_models = ["(No models found)"]
492534

wan_nodes.py

Lines changed: 55 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,51 @@
4545

4646
key_path = os.path.join(folder_paths.get_folder_paths("custom_nodes")[0], "ComfyUI-MultiModal-Prompt-Nodes", "api_key.txt")
4747

48+
QWEN_API_MAIN_MODELS = [
49+
"qwen3.6-plus",
50+
"qwen3.6-flash",
51+
"qwen3.6-plus-2026-04-02",
52+
"qwen3.6-flash-2026-04-16",
53+
"qwen3.6-35b-a3b",
54+
]
55+
56+
QWEN_API_OFFLINE_SINCE_2026_05_13 = [
57+
"qwen-vl-max-latest",
58+
"qwen-vl-max-2025-08-13",
59+
"qwen-vl-max-2025-04-08",
60+
"qwen-max-latest",
61+
]
62+
63+
QWEN_API_OFFLINE_SCHEDULED_2026_07_13 = [
64+
"qwen-vl-max",
65+
"qwen-vl-plus",
66+
"qwen-plus",
67+
"qwen-max",
68+
"qwen-turbo",
69+
]
70+
71+
QWEN_API_LEGACY_MODELS = [
72+
"qwen-plus-latest",
73+
]
74+
75+
QWEN_API_MODELS = (
76+
QWEN_API_MAIN_MODELS
77+
+ [f"{model} (deprecated: announced offline since 2026-05-13)" for model in QWEN_API_OFFLINE_SINCE_2026_05_13]
78+
+ [f"{model} (deprecated: offline scheduled 2026-07-13)" for model in QWEN_API_OFFLINE_SCHEDULED_2026_07_13]
79+
+ [f"{model} (deprecated: legacy, prefer Qwen3.6)" for model in QWEN_API_LEGACY_MODELS]
80+
)
81+
82+
QWEN_API_MODEL_IDS = set(
83+
QWEN_API_MAIN_MODELS
84+
+ QWEN_API_OFFLINE_SINCE_2026_05_13
85+
+ QWEN_API_OFFLINE_SCHEDULED_2026_07_13
86+
+ QWEN_API_LEGACY_MODELS
87+
)
88+
QWEN_API_VISION_MODEL_IDS = {model for model in QWEN_API_MODEL_IDS if model.startswith(("qwen3.6-", "qwen-vl-"))}
89+
90+
def normalize_api_model_name(model):
91+
return model.split(" (", 1)[0]
92+
4893
# Wan2.2 Video Generation System Prompts
4994
WAN_T2V_SYSTEM_PROMPT_ZH = '''
5095
你是提示词优化师,旨在将用户输入改写为优质视频生成Prompt,使其更完整、更具表现力,同时不改变原意。
@@ -207,7 +252,9 @@ def api_with_image(prompt, img_list, model, task_type="i2v", save_tokens=True, a
207252
if not api_key:
208253
raise EnvironmentError("API_KEY is not set!")
209254

255+
model = normalize_api_model_name(model)
210256
print(f'Using "{model}" for Wan2.2 I2V prompt rewriting...')
257+
assert model in QWEN_API_VISION_MODEL_IDS, f'"{model}" is not available for Wan2.2 I2V API usage.'
211258

212259
# Select appropriate system prompt based on language
213260
lang = get_caption_language(prompt)
@@ -247,7 +294,9 @@ def api(prompt, model, task_type="t2v", api_key=None, kwargs={}):
247294
if not api_key:
248295
raise EnvironmentError("API_KEY is not set!")
249296

297+
model = normalize_api_model_name(model)
250298
print(f'Using "{model}" for Wan2.2 T2V prompt rewriting...')
299+
assert model in QWEN_API_MODEL_IDS, f'"{model}" is not available for Wan2.2 T2V API usage.'
251300

252301
# Select appropriate system prompt based on language
253302
lang = get_caption_language(prompt)
@@ -273,7 +322,7 @@ def api(prompt, model, task_type="t2v", api_key=None, kwargs={}):
273322
else:
274323
raise Exception(f'Failed to post: {response}')
275324

276-
def polish_prompt_wan(api_key, prompt, task_type="t2v", model="qwen-plus", max_retries=10, image=None, save_tokens=True, target_language="auto"):
325+
def polish_prompt_wan(api_key, prompt, task_type="t2v", model="qwen3.6-plus", max_retries=10, image=None, save_tokens=True, target_language="auto"):
277326
"""
278327
Polish prompt for Wan2.2 video generation
279328
@@ -338,20 +387,8 @@ def INPUT_TYPES(s):
338387
if not mmproj_files:
339388
mmproj_options = ["(Auto-detect)", "(Not required)"]
340389

341-
# API
342-
api_models = [
343-
"qwen-vl-max",
344-
"qwen-vl-max-latest",
345-
"qwen-vl-max-2025-08-13",
346-
"qwen-vl-max-2025-04-08",
347-
"qwen-plus",
348-
"qwen-max",
349-
"qwen-plus-latest",
350-
"qwen-max-latest"
351-
]
352-
353390
# integration
354-
all_models = local_models + api_models
391+
all_models = local_models + QWEN_API_MODELS
355392
if not all_models:
356393
all_models = ["(No models found)"]
357394

@@ -368,7 +405,7 @@ def INPUT_TYPES(s):
368405
}),
369406
"llm_model": (all_models, {
370407
"default": all_models[0] if all_models[0] != "(No models found)" else all_models[0],
371-
"tooltip": 'Select "Local: xxx" for local models. Use qwen-vl-* for I2V with API.'
408+
"tooltip": 'Select "Local: xxx" for local models. Use Qwen3.6 or qwen-vl-* for I2V with API.'
372409
}),
373410
"mmproj": (mmproj_options, {
374411
"default": mmproj_options[0],
@@ -502,8 +539,9 @@ def rewrite(self, prompt, task_type, target_language, llm_model, mmproj, max_ret
502539

503540
# Validate model selection for I2V
504541
if task_internal == "i2v":
505-
if not llm_model.startswith("qwen-vl"):
506-
raise ValueError(f'For Image-to-Video tasks, please use a qwen-vl-* model. Current model: {llm_model}')
542+
api_model_id = normalize_api_model_name(llm_model)
543+
if api_model_id not in QWEN_API_VISION_MODEL_IDS:
544+
raise ValueError(f'For Image-to-Video tasks, please use a Qwen3.6 or qwen-vl-* model. Current model: {llm_model}')
507545
if image is None:
508546
raise ValueError("Image input is required for Image-to-Video task!")
509547

0 commit comments

Comments
 (0)