Skip to content

Commit 111a5c8

Browse files
committed
Stability and documentation update v1.0.6
Improved stability when switching between Qwen3-VL GGUF models Fixed mmproj reuse issues in local vision models Refined internal GGUF model lifecycle management Documentation updates: - Clarified project scope as a prompt generator for QwenImageEdit and Wan2.2 - Reorganized Credits and Dependencies for clearer attribution - Updated llama-cpp-python installation notes to reference the JamePeng fork documentation Internal structure preparation for future backend refactoring No breaking changes to node interfaces
1 parent b3de55e commit 111a5c8

10 files changed

Lines changed: 308 additions & 117 deletions

File tree

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,27 @@ All notable changes to ComfyUI-MultiModal-Prompt-Nodes will be documented in thi
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.0.6] - 2026-01-16
9+
10+
### Fixed
11+
- Fixed an issue where incorrect **mmproj** could remain loaded when switching between Qwen3-VL GGUF models
12+
- Properly unload and reload GGUF models when model or mmproj changes
13+
- Prevent stale vision projectors from being reused across different Qwen3-VL models
14+
- Improved **mmproj auto-detection** logic to avoid accidentally picking mmproj files from other models
15+
16+
### Changed
17+
- Refined internal GGUF model lifecycle management for better stability when switching models (e.g. 8B ↔ 4B)
18+
- Minor internal refactors to reduce state leakage in llama-cpp-python based vision models
19+
- Improved README documentation for clarity and accuracy:
20+
- Clarified project scope as a **prompt generator for QwenImageEdit and Wan2.2**
21+
- Reorganized Credits and Dependencies to clearly separate derived works and external dependencies
22+
- Updated llama-cpp-python installation notes to reference the JamePeng fork documentation directly, avoiding incomplete or misleading installation instructions
23+
24+
### Added
25+
- Added a `backends/` directory as a **structural placeholder**
26+
- This directory does not change behavior in v1.0.6
27+
- Reserved for future refactoring of Local GGUF and Cloud API backends without changing node interfaces
28+
829
## [1.0.5] - 2026-01-13
930

1031
### Removed

README.md

Lines changed: 45 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# ComfyUI-MultiModal-Prompt-Nodes
22

3-
**Version:** 1.0.5
3+
**Version:** 1.0.6
44
**License:** GPL-3.0
55

6-
Advanced multimodal prompt generation nodes for ComfyUI with local GGUF models (Qwen-VL) and cloud API support.
6+
Multimodal prompt generator nodes for ComfyUI, designed to generate prompts for **QwenImageEdit** and **Wan2.2**.
7+
Supports **local LLM / local GGUF models** (Qwen3-VL, Qwen-VL) and **Qwen API** for image and video prompt generation and enhancement.
78

89
---
910

@@ -17,6 +18,13 @@ Based on extensive testing, **Wan2.2** and **Qwen-Image-Edit** respond **signifi
1718
### Vision Input Compatibility
1819
Vision input support varies by model and llama-cpp-python version. See Installation section for detailed compatibility information. Results may vary based on your specific environment.
1920

21+
### Local GGUF Model Stability
22+
Starting from **v1.0.6**, internal GGUF model handling has been improved to ensure stable behavior
23+
when switching between different Qwen3-VL models (e.g. 8B ↔ 4B), with mmproj files now being
24+
properly reloaded as part of the model switching process.
25+
26+
These changes are internal and do **not** affect node interfaces or workflows.
27+
2028
---
2129

2230
## Features
@@ -85,10 +93,8 @@ pip install dashscope pillow numpy
8593

8694
***Note:** Vision input support may vary depending on your environment and configuration. In my setup, I have not been able to get vision input working with Qwen2.5-VL even with the JamePeng fork.
8795

88-
**Recommended Installation (JamePeng fork for Qwen3-VL support):**
89-
```bash
90-
pip install llama-cpp-python==0.3.21 --break-system-packages
91-
```
96+
**Recommended Installation (JamePeng fork for Qwen3-VL support):**
97+
Please follow the build and installation instructions provided in the JamePeng fork repository, as this fork requires a custom build and cannot be reliably installed via a simple `pip install`.
9298

9399
**Source:** https://github.com/JamePeng/llama-cpp-python
94100

@@ -98,6 +104,9 @@ pip install llama-cpp-python==0.3.21 --break-system-packages
98104

99105
⚠️ **Disclaimer:** Your results may differ depending on system configuration, GPU drivers, and other factors. If you encounter issues, please verify your environment setup and consider reporting compatibility details.
100106

107+
**Note:** When using Qwen3-VL GGUF models, switching between different model sizes
108+
(e.g. 8B ↔ 4B) is supported and stable as of v1.0.6.
109+
101110
### 4. Place Models
102111

103112
Place your GGUF models in `ComfyUI/models/LLM/`:
@@ -406,19 +415,36 @@ For full details, see the [LICENSE](LICENSE) file and [AUTHORS.md](AUTHORS.md).
406415

407416
---
408417

418+
## Internal Structure Notes (for Advanced Users)
419+
420+
This repository may introduce internal structural changes over time
421+
(e.g. extracting Local GGUF or Cloud API implementations into separate modules)
422+
to improve maintainability and stability.
423+
424+
- Node interfaces (INPUT / RETURN types) are intended to remain stable
425+
- Internal refactors will be documented in the changelog
426+
- The `backends/` directory added in v1.0.6 is a **non-functional placeholder**
427+
for future internal refactoring
428+
429+
No user action is required.
430+
431+
---
432+
409433
## Credits
410434

411-
### Original Authors
435+
### Derived From / Inspirations
436+
This project is a restructured and extended ComfyUI custom node collection, derived from the following GPL-3.0 licensed projects:
437+
412438
- **ComfyUI-QwenPromptRewriter**: [lihaoyun6](https://github.com/lihaoyun6/ComfyUI-QwenPromptRewriter) (GPL-3.0)
413439
- **ComfyUI-QwenVL**: [1038lab](https://github.com/1038lab/ComfyUI-QwenVL) (GPL-3.0)
414440

415-
### Dependencies
416-
- **llama-cpp-python**: [Andrei Betlen](https://github.com/abetlen/llama-cpp-python)
417-
- **Qwen3-VL support**: [JamePeng's fork](https://github.com/JamePeng/llama-cpp-python)
418-
- **Qwen models**: [Alibaba Cloud Qwen Team](https://github.com/QwenLM/Qwen)
419-
- **Dashscope API**: Alibaba Cloud
441+
For detailed attribution, file-level mapping, and contribution notes, see **[AUTHORS.md](AUTHORS.md)**.
420442

421-
For full attribution, see [AUTHORS.md](AUTHORS.md)
443+
### Key Dependencies / Providers
444+
- **llama-cpp-python**: Andrei Betlen
445+
- **Qwen3-VL support**: JamePeng's llama-cpp-python fork
446+
- **Qwen models**: Alibaba Cloud Qwen Team
447+
- **Dashscope API**: Alibaba Cloud
422448

423449
---
424450

@@ -446,10 +472,9 @@ Areas needing help:
446472

447473
See [CHANGELOG.md](CHANGELOG.md) for detailed version history.
448474

449-
### Current Version: 1.0.5
450-
- Device selection: CPU/GPU dropdown
451-
- Raw style for Vision LLM Node
452-
- Unified interface across all nodes
453-
- Extended token limit for Wan (2048)
454-
- API key management via api_key.txt only
455-
- mmproj auto-detect improvements
475+
### Current Version: 1.0.6
476+
- Improved stability when switching between Qwen3-VL GGUF models
477+
- Fixed mmproj reuse issues in local vision models
478+
- Internal structure preparation for future backend refactoring
479+
- Documentation updates clarifying project scope, installation notes, and attribution
480+
- No breaking changes to node interfaces

__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# the Free Software Foundation, either version 3 of the License, or
77
# (at your option) any later version.
88

9-
__version__ = "1.0.5"
9+
__version__ = "1.0.6"
1010

1111
from .qwen_nodes import NODE_CLASS_MAPPINGS as qNODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS as qNODE_DISPLAY_NAME_MAPPINGS
1212
from .wan_nodes import NODE_CLASS_MAPPINGS as wNODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS as wNODE_DISPLAY_NAME_MAPPINGS

backends/.gitkeep

Whitespace-only changes.

backends/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# backends (placeholder)
2+
3+
This directory is intentionally added as a **structural placeholder**.
4+
5+
Future versions may move implementation details here, e.g.:
6+
7+
- `local_gguf.py`: Local GGUF backend (llama-cpp-python, mmproj handling, caching)
8+
- `cloud_api.py`: Cloud/API backend (DashScope or other providers)
9+
- `messages.py`: Shared message/image preprocessing utilities
10+
11+
**Important:** Node interfaces (ComfyUI INPUT/RETURN types) are intended to remain stable.

backends/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"""Backend package (placeholder)
2+
3+
This package is reserved for future refactors that extract Local GGUF and Cloud API
4+
implementations out of node definition files, without changing node interfaces.
5+
"""

import_utils.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
"""import_utils.py
2+
Small helpers to make local (same-folder) imports robust inside ComfyUI custom nodes.
3+
4+
This module is intentionally tiny and dependency-free.
5+
"""
6+
7+
from __future__ import annotations
8+
9+
import os
10+
import sys
11+
from typing import Optional
12+
13+
14+
def ensure_local_import(file_path: str, *, prepend: bool = True) -> str:
15+
"""Ensure the directory containing *file_path* is present in sys.path.
16+
17+
ComfyUI sometimes loads custom nodes in a way that does not guarantee the node
18+
folder is on sys.path. Several nodes in this repo import sibling modules
19+
(e.g. vision_llm_node.py). This helper makes that import reliable.
20+
21+
Args:
22+
file_path: Usually pass __file__ from the caller module.
23+
prepend: If True, insert at sys.path[0]; else append.
24+
25+
Returns:
26+
The normalized directory path that was inserted/ensured.
27+
"""
28+
node_dir = os.path.dirname(os.path.abspath(file_path))
29+
# Normalize for stable comparisons across platforms
30+
node_dir = os.path.normpath(node_dir)
31+
32+
if node_dir and node_dir not in sys.path:
33+
if prepend:
34+
sys.path.insert(0, node_dir)
35+
else:
36+
sys.path.append(node_dir)
37+
38+
return node_dir

qwen_nodes.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,11 @@ def rewrit(self, image, prompt, prompt_style, target_language, llm_model, mmproj
474474
# vision_llm_node rewrite_prompt_with_gguf import
475475
import sys
476476
current_dir = os.path.dirname(os.path.abspath(__file__))
477-
sys.path.insert(0, current_dir)
477+
if current_dir not in sys.path:
478+
sys.path.insert(0, current_dir)
479+
# Centralized import path handling
480+
from import_utils import ensure_local_import
481+
ensure_local_import(__file__)
478482
from vision_llm_node import rewrite_prompt_with_gguf
479483

480484
# Model path retrieval

0 commit comments

Comments
 (0)