Hide text-only API models in vision modes without auto-switching the selected model
This commit is contained in:
+2
-2
@@ -15,8 +15,8 @@ All notable changes to ComfyUI-MultiModal-Prompt-Nodes will be documented in thi
|
||||
- Allowed `qwen3.7-plus` for vision input workflows while keeping `qwen3.7-max` text-only
|
||||
- Blocked Wan I2V text-only API model selections with a clear ComfyUI execution-block message instead of a runtime traceback
|
||||
- Centralized shared Qwen API model definitions used by Qwen and Wan prompt generator nodes
|
||||
- Hid text-only API models from the Wan model dropdown when Image-to-Video is selected while keeping them available for Text-to-Video
|
||||
- Hid text-only API models from the Qwen model dropdown when Qwen-Image-Edit is selected while keeping them available for Qwen-Image
|
||||
- Hid text-only API models from the Wan model dropdown when Image-to-Video is selected while keeping them available for Text-to-Video, without automatically switching the selected model
|
||||
- Hid text-only API models from the Qwen model dropdown when Qwen-Image-Edit is selected while keeping them available for Qwen-Image, without automatically switching the selected model
|
||||
- Blocked Qwen-Image-Edit text-only API model selections with a clear ComfyUI execution-block message instead of a runtime traceback
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -649,7 +649,7 @@ class QwenImageEditPromptGenerator:
|
||||
if api_model_id not in QWEN_API_VISION_MODEL_IDS:
|
||||
message = (
|
||||
f'"{api_model_id}" is text-only and cannot be used for Qwen-Image-Edit. '
|
||||
"Use qwen3.7-plus, a Qwen3.6 model, or a qwen-vl-* model instead."
|
||||
"Please select a vision-capable model such as qwen3.7-plus, a Qwen3.6 model, or a qwen-vl-* model."
|
||||
)
|
||||
print(f"[Qwen Prompt Rewriter] Execution blocked: {message}")
|
||||
return (ExecutionBlocker(message),)
|
||||
|
||||
+1
-1
@@ -513,7 +513,7 @@ class WanVideoPromptGenerator:
|
||||
if api_model_id not in QWEN_API_VISION_MODEL_IDS:
|
||||
message = (
|
||||
f'"{api_model_id}" is text-only and cannot be used for Image-to-Video tasks. '
|
||||
"Use qwen3.7-plus, a Qwen3.6 model, or a qwen-vl-* model instead."
|
||||
"Please select a vision-capable model such as qwen3.7-plus, a Qwen3.6 model, or a qwen-vl-* model."
|
||||
)
|
||||
print(f"[Wan2.2 Prompt Rewriter] Execution blocked: {message}")
|
||||
return (ExecutionBlocker(message),)
|
||||
|
||||
@@ -42,12 +42,6 @@ function isPlaceholderOption(value) {
|
||||
return String(value || "").startsWith("(");
|
||||
}
|
||||
|
||||
function chooseReplacementModel(previousValue, nextOptions, config) {
|
||||
const wasLocal = isLocalModel(previousValue, config);
|
||||
const sameKind = nextOptions.find((value) => isLocalModel(value, config) === wasLocal && !isPlaceholderOption(value));
|
||||
return sameKind || nextOptions.find((value) => !isPlaceholderOption(value)) || nextOptions[0];
|
||||
}
|
||||
|
||||
function getModelRelativePath(rawValue, config) {
|
||||
if (typeof rawValue !== "string") {
|
||||
return null;
|
||||
@@ -117,11 +111,6 @@ function syncVisionRequiredModelOptions(node, config, visionRequired) {
|
||||
: allOptions;
|
||||
|
||||
modelWidget.options.values = nextOptions;
|
||||
if (!nextOptions.includes(modelWidget.value) && nextOptions.length > 0) {
|
||||
modelWidget.value = chooseReplacementModel(modelWidget.value, nextOptions, config);
|
||||
syncMmprojOptions(node, config);
|
||||
}
|
||||
|
||||
node.setDirtyCanvas?.(true, true);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user