test/expand-client-coverage
Add 12 focused unit tests targeting uncovered branches identified by pytest-cov on main (97.01% → 99.30%): client.py - coerce_seed: .item() raises at runtime → falls through to unsupported-type error (lines 117-118, 142) - coerce_seed: plain unsupported types (dict, object) raise ValueError (line 142) - extract_chat_completion_text: non-str/non-list content returns "" (line 207) - extract_chat_completion_text: list items with no usable text are skipped (lines 222-228) - extract_responses_text: output list with unresolvable items returns "" (line 234) - extract_responses_text: output=None returns "" (end of function) - build_chat_messages_with_image: blank/None system_prompt omits the system message (line 291) image_to_text_node.py - _responses_kwargs: empty/whitespace system_prompt omits "instructions" key (line 112) - execute: responses endpoint returns empty string → falls back to chat.completions (line 157) - execute: both endpoints return empty text → ValueError propagates (line 181) - execute: single-image chat fallback status does not mention dropped frames (line 183) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
ComfyUI LMStudio Nodes (Unofficial)
Small ComfyUI custom nodes to connect to a remote LMStudio server through OpenAI-compatible API (/v1).
Nodes
-
LMStudio - Connect
- Connect to a remote LMStudio URL
- Set API token
- Pull/load model list automatically (Refresh Models)
- Test connectivity to server
- Supports LM Reasonning mode toggle
- Supports Tooling / MCP toggle
-
LMStudio - Text Gen
- System prompt + user prompt
- Text generation through the shared connection
<think>...</think>blocks are stripped from response output
-
LMStudio - Image To Text
- System prompt + user prompt + image input
- Image description / caption style generation
<think>...</think>blocks are stripped from response output
Quick start
- Put this folder in
ComfyUI/custom_nodes/ - Install deps:
pip install -r requirements.txt - Restart ComfyUI
Testing
Run the Python unit tests with coverage gate (>=90%):
pytest -q
Notes
- This is not an official LMStudio project.
- Not affiliated with LMStudio.
- It is a quickly vibecoded utility project.
References
Languages
Python
94.8%
JavaScript
5.2%
