Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6f9867a3ef |
@@ -1,5 +1,6 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import logging
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
from comfy_api.latest import io, ui
|
from comfy_api.latest import io, ui
|
||||||
@@ -16,6 +17,8 @@ from .client import (
|
|||||||
from .iotypes import ParamConnection
|
from .iotypes import ParamConnection
|
||||||
from .models import LMStudioConnectionPayload
|
from .models import LMStudioConnectionPayload
|
||||||
|
|
||||||
|
_logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class LMStudioImageToText(io.ComfyNode):
|
class LMStudioImageToText(io.ComfyNode):
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -181,6 +184,11 @@ class LMStudioImageToText(io.ComfyNode):
|
|||||||
raise ValueError("chat.completions fallback returned no text output")
|
raise ValueError("chat.completions fallback returned no text output")
|
||||||
|
|
||||||
if batch_size > 1:
|
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 += (
|
fallback_reason += (
|
||||||
f" Note: chat.completions fallback only supports one image; "
|
f" Note: chat.completions fallback only supports one image; "
|
||||||
f"{batch_size - 1} additional frame(s) were dropped."
|
f"{batch_size - 1} additional frame(s) were dropped."
|
||||||
|
|||||||
Reference in New Issue
Block a user