Skip to content

Commit bdfbdf9

Browse files
Merge pull request #11 from EnragedAntelope/claude/remove-old-references-OloBO
Rebrand from YANC to EA_LMStudio
2 parents d7162e3 + 07d4e9e commit bdfbdf9

9 files changed

Lines changed: 66 additions & 153 deletions

File tree

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
publish-node:
1616
name: Publish Custom Node to registry
1717
runs-on: ubuntu-latest
18-
if: ${{ github.repository_owner == 'ALatentPlace' }}
18+
if: ${{ github.repository_owner == 'EnragedAntelope' }}
1919
steps:
2020
- name: Check out code
2121
uses: actions/checkout@v4

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2025 A Latent Place
3+
Copyright (c) 2025 EnragedAntelope
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

LMStudio.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
YANC LM Studio Node - ComfyUI integration for LM Studio
2+
EA LM Studio Node - ComfyUI integration for LM Studio
33
Provides text generation using local LLM/VLM models via LM Studio server.
44
"""
55
import logging
@@ -29,7 +29,7 @@
2929
)
3030

3131
# Setup logging
32-
logger = logging.getLogger("YANC_LMStudio")
32+
logger = logging.getLogger("EA_LMStudio")
3333

3434
# Initialize configuration and model cache at module load
3535
_config_manager = ConfigManager()
@@ -84,15 +84,15 @@
8484
GPT_OSS_FINAL_PATTERN = r"<\|channel\|>final<\|message\|>(.*?)$"
8585

8686

87-
class YANCLMStudio:
87+
class EALMStudio:
8888
"""
8989
LM Studio integration node for ComfyUI.
9090
Queries local LM Studio server for text generation with LLM/VLM models.
9191
9292
Note: model.respond() automatically applies the model's chat template.
9393
"""
9494

95-
CATEGORY = "YANC/LMStudio"
95+
CATEGORY = "EA/LMStudio"
9696
RETURN_TYPES = ("STRING", "STRING", "STRING")
9797
RETURN_NAMES = ("response", "reasoning", "troubleshooting")
9898
OUTPUT_NODE = True
@@ -638,15 +638,15 @@ def generate(
638638
elif "image" in error_str or "vision" in error_str or "multi" in error_str:
639639
troubleshooting_lines.append("[HINT] This model may not support images or multiple image inputs. Try with a single image or text-only.")
640640

641-
logger.exception("YANC_LMStudio generation error")
641+
logger.exception("EA_LMStudio generation error")
642642
return "", "", "\n".join(troubleshooting_lines)
643643

644644

645645
# Node registration
646646
NODE_CLASS_MAPPINGS = {
647-
"YANC_LMStudio": YANCLMStudio
647+
"EA_LMStudio": EALMStudio
648648
}
649649

650650
NODE_DISPLAY_NAME_MAPPINGS = {
651-
"YANC_LMStudio": "YANC LM Studio"
651+
"EA_LMStudio": "EA LM Studio"
652652
}

README.md

Lines changed: 35 additions & 122 deletions
Original file line numberDiff line numberDiff line change
@@ -1,149 +1,62 @@
1-
# YANC_LMStudio
1+
# EA_LMStudio
22

3-
A ComfyUI custom node for integrating LM Studio's local LLM/VLM inference.
3+
A ComfyUI custom node for local LLM/VLM inference via [LM Studio](https://lmstudio.ai/).
44

55
## Features
66

7-
- **Automatic Model Discovery**: Models are fetched from LM Studio at ComfyUI startup
8-
- **Vision Model Support**: Up to 4 image inputs for VLM models (LLaVA, Qwen-VL, etc.)
9-
- **Image Resizing**: Automatic resize options to speed up VLM inference
10-
- **Reasoning Extraction**: Separate thinking/reasoning from final response
11-
- **Speculative Decoding**: Optional draft model support
12-
- **VRAM Management**: Unload models after use (enabled by default)
7+
- **Auto Model Discovery** - Models populate automatically from LM Studio at startup
8+
- **Vision Support** - Up to 4 image inputs with smart auto-resize to prevent OOM
9+
- **Reasoning Extraction** - Separates thinking from final response (DeepSeek R1, Qwen3, QwQ, etc.)
10+
- **Advanced Controls** - Temperature, top-k/p, repetition penalty, speculative decoding
11+
- **Smart Troubleshooting** - Helpful error messages with specific hints
12+
- **VRAM Management** - Auto-unload after generation (enabled by default)
1313

1414
## Installation
15+
16+
**Via ComfyUI Manager** (recommended): Search for "EA_LMStudio"
17+
18+
**Manual:**
1519
```bash
1620
cd ComfyUI/custom_nodes
17-
git clone https://github.com/ALatentPlace/YANC_LMStudio.git
18-
cd YANC_LMStudio
19-
pip install -r requirements.txt
21+
git clone https://github.com/EnragedAntelope/EA_LMStudio.git
22+
pip install -r EA_LMStudio/requirements.txt
2023
```
2124

22-
Or install via ComfyUI Manager.
23-
24-
## Setup
25-
26-
1. **Start LM Studio** with the server enabled (default: `http://127.0.0.1:1234`)
27-
2. **Start ComfyUI** - models are auto-fetched at startup
28-
3. Find the node under **YANC -> LMStudio**
29-
30-
## Model Selection
31-
32-
### Automatic (Recommended)
33-
Models are fetched from LM Studio's `/v1/models` endpoint when ComfyUI starts. Select from the dropdown.
34-
35-
**Requirement:** LM Studio must be running before starting ComfyUI.
36-
37-
### Manual Entry
38-
If LM Studio wasn't running at startup or you added models later:
39-
1. Select `-- Custom (enter below) --` from dropdown
40-
2. Enter model identifier in `custom_model_name`
41-
3. Find identifiers in LM Studio's model list
42-
43-
### Refresh Models
44-
Enable `refresh_models`, queue once, then disable. Updates take effect on next node load.
45-
46-
## Image Inputs (VLMs)
47-
48-
The node supports up to 4 image inputs for vision-language models:
49-
- **image1-4**: Optional image inputs (connect any combination)
50-
- **image_resize**: Resize images before processing to speed up inference
51-
- `No Resize` - Use original size
52-
- `Low (512px)` - Fast processing
53-
- `Medium (768px)` - Balanced (default)
54-
- `High (1024px)` - Better detail
55-
- `Ultra (1536px)` - Maximum detail
56-
57-
**Note:** Not all VLMs support multiple images. If you get errors with multiple images, try using only `image1`.
58-
59-
## Reasoning Extraction
60-
61-
Many reasoning models (DeepSeek R1, Qwen3, QwQ, GLM-Z1) wrap their "thinking" process in special tags. The node can extract this separately from the final response.
62-
63-
### Modes
25+
## Quick Start
6426

65-
- **Auto-detect (recommended)**: Automatically detects common reasoning patterns:
66-
- `<think>...</think>` - DeepSeek R1, Qwen3, QwQ, GLM-Z1
67-
- `<thinking>...</thinking>` - Alternative format
68-
- `<reasoning>...</reasoning>` - Some models
69-
- GPT-OSS analysis channel format
27+
1. Start LM Studio with server enabled (default: `http://127.0.0.1:1234`)
28+
2. Start ComfyUI
29+
3. Find the node: **EA -> LMStudio**
7030

71-
- **Disabled**: Returns the full response as-is (no extraction)
31+
## Tips
7232

73-
- **Custom tags**: Specify your own open/close tags for models with unique formats
33+
- **Models not showing?** LM Studio must be running before ComfyUI starts. Use `refresh_models` checkbox to re-fetch.
34+
- **Context errors?** Increase context length in LM Studio settings (not max_tokens).
35+
- **VLM issues?** Try a smaller image resize option or single image if multi-image fails.
36+
- **Force thinking mode:** Add `/think` to prompts for Qwen3, or "Think step by step" for others.
7437

75-
### Output
38+
## Custom Server
7639

77-
- **response**: Final answer with reasoning tags removed (if extracted)
78-
- **reasoning**: Extracted thinking/reasoning content
79-
80-
This allows you to route reasoning to a separate display or log while keeping the final response clean.
81-
82-
### Forcing Thinking Mode
83-
84-
Models don't always produce thinking output for simple queries. To encourage thinking:
85-
- **Qwen3 models**: Add `/think` to your prompt (e.g., "Explain quantum physics /think")
86-
- **Other models**: Use phrases like "Think step by step" or "Show your reasoning"
87-
88-
## Custom Server Address
89-
90-
Default: `http://127.0.0.1:1234`
91-
92-
To change, edit `lms_config/user_config.json`:
40+
Edit `lms_config/user_config.json`:
9341
```json
9442
{
9543
"server_host": "192.168.1.100",
96-
"server_port": 1234,
97-
"timeout_seconds": 5
44+
"server_port": 1234
9845
}
9946
```
100-
This file survives git updates.
101-
102-
## Parameters
103-
104-
### Required
105-
| Parameter | Default | Description |
106-
|-----------|---------|-------------|
107-
| system_message | "You are a helpful assistant." | System prompt defining LLM behavior |
108-
| prompt | "" | User prompt / question |
109-
| model_selection | - | Model dropdown or "Custom" |
110-
| max_tokens | 1024 | Maximum OUTPUT tokens (see note below) |
111-
| temperature | 0.7 | Randomness (0=deterministic, 1+=creative) |
112-
113-
### Optional
114-
| Parameter | Default | Description |
115-
|-----------|---------|-------------|
116-
| image_resize | Medium (768px) | Resize images before VLM processing |
117-
| top_p | 1.0 | Nucleus sampling (lower=more focused) |
118-
| top_k | 0 | Limits vocabulary (0=disabled, 20-40 recommended for thinking models) |
119-
| repeat_penalty | 1.0 | Reduce repetition (1.1-1.3 recommended) |
120-
| reasoning_mode | Auto-detect | How to extract reasoning from response |
121-
| unload_llm | True | Unload LLM after generation (recommended) |
122-
123-
### Understanding max_tokens vs Context Length
124-
125-
- **max_tokens**: Limits OUTPUT tokens (how long the response can be)
126-
- **Context Length**: Total tokens for INPUT + OUTPUT combined (set in LM Studio when loading model)
127-
128-
If you see "Reached context length" errors, increase the model's context length in LM Studio's settings, not max_tokens.
12947

13048
## Outputs
13149

132-
- **response**: The generated text
133-
- **reasoning**: Extracted thinking/reasoning (if reasoning_tag found)
134-
- **troubleshooting**: Status messages, errors, and hints
50+
| Output | Description |
51+
|--------|-------------|
52+
| response | Generated text (reasoning removed if extracted) |
53+
| reasoning | Extracted thinking content |
54+
| troubleshooting | Status messages and debug hints |
13555

136-
## Troubleshooting
137-
138-
Check the `troubleshooting` output for detailed status information.
56+
## License
13957

140-
**Common Issues:**
141-
- "Cannot connect": Ensure LM Studio server is running
142-
- "Model not found": Verify model identifier matches LM Studio
143-
- "Context length exceeded": Increase context length in LM Studio model settings
144-
- Empty dropdown: Start LM Studio before ComfyUI, or use manual entry
145-
- Multi-image errors: Model may only support single image, try just image1
58+
[MIT License](LICENSE)
14659

147-
## License
60+
---
14861

149-
MIT License
62+
*Based on [YANC_LMStudio](https://github.com/ALatentPlace/YANC_LMStudio) by A Latent Place*

__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
YANC_LMStudio - LM Studio integration for ComfyUI
2+
EA_LMStudio - LM Studio integration for ComfyUI
33
Provides automatic model discovery and text/vision generation.
44
"""
55
from .LMStudio import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS

lms_config/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""YANC_LMStudio configuration package."""
1+
"""EA_LMStudio configuration package."""
22
from .config_manager import ConfigManager
33

44
__all__ = ["ConfigManager"]

lms_config/config_manager.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
"""
2-
Configuration manager for YANC_LMStudio.
2+
Configuration manager for EA_LMStudio.
33
Handles server settings with gitignore-protected user config.
44
"""
55
import json
66
import logging
77
from pathlib import Path
88
from typing import Dict, Any
99

10-
logger = logging.getLogger("YANC_LMStudio")
10+
logger = logging.getLogger("EA_LMStudio")
1111

1212
DEFAULT_CONFIG: Dict[str, Any] = {
1313
"server_host": "127.0.0.1",
@@ -17,7 +17,7 @@
1717

1818

1919
class ConfigManager:
20-
"""Manages YANC_LMStudio configuration with user override support."""
20+
"""Manages EA_LMStudio configuration with user override support."""
2121

2222
def __init__(self):
2323
self.config_dir = Path(__file__).parent
@@ -74,7 +74,7 @@ def create_user_config_template(self) -> None:
7474
"""
7575
if not self.user_config_path.exists():
7676
template = {
77-
"_comment": "YANC_LMStudio user configuration. This file is gitignored and survives updates.",
77+
"_comment": "EA_LMStudio user configuration. This file is gitignored and survives updates.",
7878
"_instructions": "Modify values below to override defaults. Delete this file to reset.",
7979
"server_host": "127.0.0.1",
8080
"server_port": 1234,

model_fetcher.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
"""
2-
Model fetcher for YANC_LMStudio.
2+
Model fetcher for EA_LMStudio.
33
Queries LM Studio server for available models via /v1/models endpoint.
44
"""
55
import re
66
import requests
77
import logging
88
from typing import List, Tuple, Optional
99

10-
logger = logging.getLogger("YANC_LMStudio")
10+
logger = logging.getLogger("EA_LMStudio")
1111

1212
# Module-level cache for models
1313
_cached_models: List[str] = []
@@ -79,7 +79,7 @@ def fetch_models_from_server(server_url: str, timeout: float = 5.0) -> Tuple[Lis
7979

8080
if "data" not in data:
8181
error = "Unexpected response format from LM Studio (missing 'data' field)"
82-
logger.warning(f"YANC_LMStudio: {error}")
82+
logger.warning(f"EA_LMStudio: {error}")
8383
return models, error
8484

8585
for model in data["data"]:
@@ -101,23 +101,23 @@ def fetch_models_from_server(server_url: str, timeout: float = 5.0) -> Tuple[Lis
101101
# Sort alphabetically for easier navigation
102102
models.sort(key=str.lower)
103103

104-
logger.info(f"YANC_LMStudio: Fetched {len(models)} models from {server_url}")
104+
logger.info(f"EA_LMStudio: Fetched {len(models)} models from {server_url}")
105105

106106
except requests.exceptions.ConnectionError:
107107
error = f"Cannot connect to LM Studio at {server_url}. Ensure LM Studio is running with server enabled."
108-
logger.warning(f"YANC_LMStudio: {error}")
108+
logger.warning(f"EA_LMStudio: {error}")
109109
except requests.exceptions.Timeout:
110110
error = f"Connection to LM Studio timed out ({timeout}s). Server may be busy or unreachable."
111-
logger.warning(f"YANC_LMStudio: {error}")
111+
logger.warning(f"EA_LMStudio: {error}")
112112
except requests.exceptions.HTTPError as e:
113113
error = f"LM Studio returned HTTP error: {e.response.status_code}"
114-
logger.warning(f"YANC_LMStudio: {error}")
114+
logger.warning(f"EA_LMStudio: {error}")
115115
except requests.exceptions.JSONDecodeError:
116116
error = "Invalid JSON response from LM Studio"
117-
logger.warning(f"YANC_LMStudio: {error}")
117+
logger.warning(f"EA_LMStudio: {error}")
118118
except Exception as e:
119119
error = f"Unexpected error fetching models: {type(e).__name__}: {str(e)}"
120-
logger.error(f"YANC_LMStudio: {error}")
120+
logger.error(f"EA_LMStudio: {error}")
121121

122122
return models, error
123123

@@ -179,8 +179,8 @@ def initialize_model_cache(server_url: str, timeout: float = 5.0) -> None:
179179
"""
180180
success, message = refresh_model_cache(server_url, timeout)
181181
if not success:
182-
logger.warning(f"YANC_LMStudio startup: {message}")
183-
logger.warning("YANC_LMStudio: Models will need to be entered manually or refreshed later")
182+
logger.warning(f"EA_LMStudio startup: {message}")
183+
logger.warning("EA_LMStudio: Models will need to be entered manually or refreshed later")
184184

185185

186186
def get_last_fetch_error() -> Optional[str]:

pyproject.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
[project]
2-
name = "YANC_LMStudio"
3-
description = "A custom node for a LMStudio integration into ComfyUI."
2+
name = "EA_LMStudio"
3+
description = "A custom node for LM Studio integration into ComfyUI."
44
version = "1.2.0"
55
license = {file = "LICENSE"}
66

77
[project.urls]
8-
Repository = "https://github.com/ALatentPlace/YANC_LMStudio"
8+
Repository = "https://github.com/EnragedAntelope/EA_LMStudio"
99
# Used by Comfy Registry https://comfyregistry.org
1010

1111
[tool.comfy]
12-
PublisherId = "alatentplace"
13-
DisplayName = "YANC_LMStudio"
12+
PublisherId = "enragedantelope"
13+
DisplayName = "EA_LMStudio"
1414
Icon = ""

0 commit comments

Comments
 (0)