Compare commits

...
Author SHA1 Message Date
Gerald LonlasandClaude Opus 4.7 6f9867a3ef fix(image-to-text): log warning when chat.completions fallback drops batch frames
When the chat.completions fallback path runs on a batched image input, only
the first frame is sent. Add a logging.warning so ComfyUI server logs surface
the dropped frame count even if the UI status string is ignored.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-19 00:45:02 +08:00
+8
View File
@@ -1,5 +1,6 @@
from __future__ import annotations
import logging
from typing import Any
from comfy_api.latest import io, ui
@@ -16,6 +17,8 @@ from .client import (
from .iotypes import ParamConnection
from .models import LMStudioConnectionPayload
_logger = logging.getLogger(__name__)
class LMStudioImageToText(io.ComfyNode):
@classmethod
@@ -181,6 +184,11 @@ class LMStudioImageToText(io.ComfyNode):
raise ValueError("chat.completions fallback returned no text output")
if batch_size > 1:
_logger.warning(
"LMStudio image_to_text chat.completions fallback only supports "
"one image; %d additional frame(s) were dropped.",
batch_size - 1,
)
fallback_reason += (
f" Note: chat.completions fallback only supports one image; "
f"{batch_size - 1} additional frame(s) were dropped."