DanielPFlorian commited on
Commit
b5eff20
Β·
verified Β·
1 Parent(s): ffe0987

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +275 -275
README.md CHANGED
@@ -1,275 +1,275 @@
1
- ---
2
- tags:
3
- - gguf
4
- - comfyui
5
- - workflow-generation
6
- - qwen
7
- - text-generation
8
- - sentence-transformers
9
- library_name: gguf
10
- base_model: Qwen/Qwen2.5-14B
11
- license: gpl-3.0
12
- language:
13
- - en
14
- pipeline_tag: text-generation
15
- ---
16
-
17
- # ComfyUI-WorkflowGenerator Models
18
-
19
- This repository contains the quantized GGUF models required for [ComfyUI-WorkflowGenerator](https://github.com/danielpflorian/ComfyUI-WorkflowGenerator), a custom node implementation that generates ComfyUI workflows from natural language descriptions.
20
-
21
- ## Models Included
22
-
23
- ### 1. Workflow Generator Model (Required)
24
-
25
- - **File**: `workflow-generator-q8_0.gguf`
26
- - **Tokenizer**: `workflow-generator/` directory
27
- - **Purpose**: Generates workflow diagrams from natural language instructions
28
- - **Base Model**: Qwen2.5-14B
29
- - **Training**: Fine-tuned from Qwen2.5-14B using LLaMA-Factory (see [original ComfyGPT repository](https://github.com/comfygpt/comfygpt/tree/main))
30
- - **Status**: **Required** - This model is always needed
31
-
32
- ### 2. Embedding Model (Required)
33
-
34
- - **Directory**: `paraphrase-multilingual-MiniLM-L12-v2/`
35
- - **Purpose**: Semantic search for node name matching and validation
36
- - **Base Model**: [sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2](https://huggingface.co/sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2)
37
- - **Status**: **Required** - Always needed for semantic search in NodeValidator
38
-
39
- ### 3. Node Validator Model (Optional)
40
-
41
- - **File**: `Qwen2.5-7B-Instruct-q8_0.gguf`
42
- - **Tokenizer**: `Qwen2.5-7B-Instruct/` directory
43
- - **Purpose**: Refines and corrects node names in workflow diagrams (LLM refinement mode)
44
- - **Base Model**: Qwen2.5-7B-Instruct (base model, not fine-tuned)
45
- - **Status**: **Optional** - Only needed if using LLM refinement (`use_llm_refinement=True`)
46
-
47
- ## Model Training Information
48
-
49
- ### Workflow Generator Model
50
-
51
- The `workflow-generator-q8_0.gguf` model was trained based on the [ComfyGPT research](https://github.com/comfygpt/comfygpt/tree/main) methodology:
52
-
53
- - **Original Model Source**: [xiatianzs/resources](https://huggingface.co/xiatianzs/resources/tree/main) - Original fine-tuned model from ComfyGPT research team
54
- - **Base Model**: [Qwen/Qwen2.5-14B](https://huggingface.co/Qwen/Qwen2.5-14B) from HuggingFace
55
- - **Training Method**: Full fine-tuning (Supervised Fine-Tuning / SFT)
56
- - **Training Framework**: [LLaMA-Factory](https://github.com/hiyouga/LLaMA-Factory)
57
- - **Training Dataset**: `FlowDataset.json` - Contains instruction-input-output pairs where:
58
- - Instruction: "Based on the description I provided, generate a JSON example of the required ComfyUi workflow."
59
- - Input: Natural language workflow descriptions
60
- - Output: JSON diagrams (list of edges representing workflow connections)
61
- - **Training Hyperparameters**:
62
- - Learning rate: 1.0e-5
63
- - Epochs: 3.0
64
- - Batch size: 1 per device (gradient accumulation: 4 steps)
65
- - LR scheduler: Cosine with 0.1 warmup ratio
66
- - Precision: bf16
67
- - Cutoff length: 8,192 tokens (training cutoff; model architecture supports up to 131,072 tokens)
68
- - DeepSpeed: ZeRO-3 optimization
69
- - **Quantization**: q8_0 (8-bit quantization for efficient inference)
70
-
71
- For more details on the training process, see the [original ComfyGPT repository](https://github.com/comfygpt/comfygpt/tree/main) and [training configuration](https://github.com/comfygpt/comfygpt/tree/main/train/sft).
72
-
73
- ### Embedding Model
74
-
75
- The `paraphrase-multilingual-MiniLM-L12-v2` model is a SentenceTransformer model used for semantic search in the NodeValidator. It encodes node names into embeddings and finds the most similar nodes when correcting invalid node names in workflow diagrams.
76
-
77
- - **Original Model**: [sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2](https://huggingface.co/sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2)
78
- - **Type**: SentenceTransformer (HuggingFace format)
79
- - **Size**: ~420 MB
80
- - **Dimensions**: 384 (embedding vector size)
81
- - **Use Case**: Semantic similarity search for node name matching
82
-
83
- ### Node Validator Model
84
-
85
- The `Qwen2.5-7B-Instruct-q8_0.gguf` model is the base [Qwen2.5-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-7B-Instruct) model (not fine-tuned), used for its built-in instruction-following capabilities to select the best node from semantic search candidates.
86
-
87
- ## Quick Download
88
-
89
- Download all models at once:
90
-
91
- ```bash
92
- huggingface-cli download DanielPFlorian/comfyui-workflowgenerator-models \
93
- --local-dir ./ComfyUI/models/LLM/comfyui-workflowgenerator
94
- ```
95
-
96
- Or download specific models:
97
-
98
- ```bash
99
- # Download only the required models (workflow-generator + embedding model)
100
- huggingface-cli download DanielPFlorian/comfyui-workflowgenerator-models \
101
- --include "workflow-generator-q8_0.gguf" "workflow-generator/*" "paraphrase-multilingual-MiniLM-L12-v2/*" \
102
- --local-dir ./ComfyUI/models/LLM/comfyui-workflowgenerator
103
- ```
104
-
105
- ## Installation and Setup
106
-
107
- ### Step 1: Download Models
108
-
109
- Download the models to your ComfyUI models directory:
110
-
111
- ```bash
112
- # Navigate to ComfyUI directory
113
- cd /path/to/ComfyUI
114
-
115
- # Download all models
116
- huggingface-cli download DanielPFlorian/comfyui-workflowgenerator-models \
117
- --local-dir ./models/LLM/comfyui-workflowgenerator
118
- ```
119
-
120
- ### Step 2: Organize Files in LLM Directory
121
-
122
- After downloading, organize the files in `ComfyUI/models/LLM/` as follows:
123
-
124
- ```
125
- ComfyUI/models/LLM/
126
- β”œβ”€β”€ workflow-generator-q8_0.gguf # Main model (required)
127
- β”œβ”€β”€ workflow-generator/ # Main tokenizer (required)
128
- β”‚ β”œβ”€β”€ tokenizer.json
129
- β”‚ β”œβ”€β”€ tokenizer_config.json
130
- β”‚ β”œβ”€β”€ vocab.json
131
- β”‚ β”œβ”€β”€ merges.txt
132
- β”‚ β”œβ”€β”€ special_tokens_map.json
133
- β”‚ β”œβ”€β”€ added_tokens.json
134
- β”‚ β”œβ”€β”€ config.json
135
- β”‚ β”œβ”€β”€ generation_config.json
136
- β”‚ └── model.safetensors.index.json
137
- β”œβ”€β”€ paraphrase-multilingual-MiniLM-L12-v2/ # Embedding model (required)
138
- β”‚ β”œβ”€β”€ config.json
139
- β”‚ β”œβ”€β”€ model.safetensors
140
- β”‚ β”œβ”€β”€ modules.json
141
- β”‚ β”œβ”€β”€ sentence_bert_config.json
142
- β”‚ β”œβ”€β”€ config_sentence_transformers.json
143
- β”‚ β”œβ”€β”€ tokenizer.json
144
- β”‚ β”œβ”€β”€ tokenizer_config.json
145
- β”‚ β”œβ”€β”€ special_tokens_map.json
146
- β”‚ β”œβ”€β”€ sentencepiece.bpe.model
147
- β”‚ β”œβ”€β”€ unigram.json
148
- β”‚ └── 1_Pooling/
149
- β”‚ └── config.json
150
- β”œβ”€β”€ Qwen2.5-7B-Instruct-q8_0.gguf # NodeValidator model (optional)
151
- └── Qwen2.5-7B-Instruct/ # NodeValidator tokenizer (optional)
152
- β”œβ”€β”€ tokenizer.json
153
- β”œβ”€β”€ tokenizer_config.json
154
- β”œβ”€β”€ vocab.json
155
- β”œβ”€β”€ merges.txt
156
- β”œβ”€β”€ config.json
157
- └── generation_config.json
158
- ```
159
-
160
- **Important**: The tokenizer directory name must match the model name (without `.gguf` extension and quantization suffix). The auto-detection code looks for:
161
- - `workflow-generator-q8_0.gguf` β†’ `workflow-generator/` tokenizer
162
- - `Qwen2.5-7B-Instruct-q8_0.gguf` β†’ `Qwen2.5-7B-Instruct/` tokenizer
163
-
164
- ## Usage
165
-
166
- ### Required Models
167
-
168
- - **workflow-generator-q8_0.gguf** + **workflow-generator/** tokenizer - Always needed
169
- - **paraphrase-multilingual-MiniLM-L12-v2/** - Always needed for semantic search
170
-
171
- ### Optional Models
172
-
173
- - **Qwen2.5-7B-Instruct-q8_0.gguf** + **Qwen2.5-7B-Instruct/** tokenizer - Only needed if using LLM refinement (`use_llm_refinement=True`)
174
-
175
- ### Model Usage in ComfyUI-WorkflowGenerator
176
-
177
- 1. **WorkflowGenerator Node**: Uses `workflow-generator-q8_0.gguf` to generate workflow diagrams from natural language
178
- 2. **NodeValidator Node**:
179
- - Uses `paraphrase-multilingual-MiniLM-L12-v2` for semantic search (always)
180
- - Uses `Qwen2.5-7B-Instruct-q8_0.gguf` for LLM refinement (optional, when `use_llm_refinement=True`)
181
- 3. **WorkflowBuilder Node**: No models needed (deterministic code)
182
-
183
- ## Model Specifications
184
-
185
- ### Workflow Generator Model
186
-
187
- - **Format**: GGUF (q8_0 quantization)
188
- - **Base**: Qwen2.5-14B
189
- - **Size**: ~8-9 GB (quantized)
190
- - **Context Window**: 131,072 tokens (128K) - Model architecture supports up to 131K tokens, though training used 16,384 token cutoff
191
- - **Quantization**: q8_0 (8-bit, good balance of quality and size)
192
-
193
- ### Embedding Model
194
-
195
- - **Format**: SentenceTransformer (HuggingFace format)
196
- - **Base**: sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2
197
- - **Size**: ~420 MB
198
- - **Dimensions**: 384 (embedding vector size)
199
-
200
- ### Node Validator Model
201
-
202
- - **Format**: GGUF (q8_0 quantization)
203
- - **Base**: Qwen2.5-7B-Instruct
204
- - **Size**: ~4-5 GB (quantized)
205
- - **Context Window**: 32,768 tokens
206
- - **Quantization**: q8_0 (8-bit, good balance of quality and size)
207
-
208
- ## System Requirements
209
-
210
- - **VRAM**:
211
- - Minimum: 8 GB (for workflow-generator with CPU offloading)
212
- - Recommended: 16+ GB (for both models on GPU)
213
- - **RAM**: 16+ GB recommended
214
- - **Storage**: ~15-16 GB for all models, tokenizers, and embedding model
215
-
216
- ## Performance Tips
217
-
218
- 1. **Use GGUF models**: Smaller size and better VRAM efficiency than HuggingFace models
219
- 2. **GPU Layers**: Use "auto" setting for optimal GPU layer allocation
220
- 3. **LLM Refinement**: Only enable if you need higher accuracy (slower but more accurate)
221
- 4. **Semantic Search Only**: Faster execution, deterministic results (recommended for most use cases)
222
-
223
- ## Troubleshooting
224
-
225
- ### Model Not Found
226
-
227
- - Verify models are in `ComfyUI/models/LLM/` directory
228
- - Check tokenizer directory name matches model name (without `.gguf` and quantization suffix)
229
- - Restart ComfyUI after moving files
230
-
231
- ### Tokenizer Not Found
232
-
233
- - Ensure tokenizer directory exists with the correct name
234
- - Verify tokenizer files (`tokenizer.json`, `tokenizer_config.json`, `vocab.json`) are present
235
- - Check directory structure matches the expected format
236
-
237
- ### Out of Memory
238
-
239
- - Reduce `n_gpu_layers` (try "auto" or lower number)
240
- - Use smaller quantization (q4_0 instead of q8_0) - note: you'll need to re-quantize
241
- - Set `device_preference` to "cpu" for some operations
242
-
243
- ## Related Resources
244
-
245
- - **ComfyUI-WorkflowGenerator**: [GitHub Repository](https://github.com/danielpflorian/ComfyUI-WorkflowGenerator)
246
- - **Original ComfyGPT Research**: [GitHub Repository](https://github.com/comfygpt/comfygpt)
247
- - **Research Paper**: [arXiv:2503.17671](https://arxiv.org/abs/2503.17671)
248
- - **Project Website**: [https://comfygpt.github.io/](https://comfygpt.github.io/)
249
-
250
- ## Citation
251
-
252
- If you use these models in your research, please cite the original ComfyGPT paper:
253
-
254
- ```bibtex
255
- @article{huang2025comfygpt,
256
- title={ComfyGPT: A Self-Optimizing Multi-Agent System for Comprehensive ComfyUI Workflow Generation},
257
- author={Huang, Oucheng and Ma, Yuhang and Zhao, Zeng and Wu, Mingrui and Ji, Jiayi and Zhang, Rongsheng and Hu, Zhipeng and Sun, Xiaoshuai and Ji, Rongrong},
258
- journal={arXiv preprint arXiv:2503.17671},
259
- year={2025}
260
- }
261
- ```
262
-
263
- ## License
264
-
265
- These models are provided for use with ComfyUI-WorkflowGenerator. Please refer to:
266
- - Original ComfyGPT repository for model training details and licensing
267
- - Qwen2.5 model licenses from HuggingFace
268
- - ComfyUI-WorkflowGenerator repository for usage terms
269
-
270
- ## Support
271
-
272
- For issues, questions, or contributions:
273
- - **Issues**: [ComfyUI-WorkflowGenerator Issues](https://github.com/danielpflorian/ComfyUI-WorkflowGenerator/issues)
274
- - **Documentation**: [ComfyUI-WorkflowGenerator Wiki](https://github.com/danielpflorian/ComfyUI-WorkflowGenerator/wiki)
275
-
 
1
+ ---
2
+ tags:
3
+ - gguf
4
+ - comfyui
5
+ - workflow-generation
6
+ - qwen
7
+ - text-generation
8
+ - sentence-transformers
9
+ library_name: gguf
10
+ base_model: Qwen/Qwen2.5-14B
11
+ license: gpl-3.0
12
+ language:
13
+ - en
14
+ pipeline_tag: text-generation
15
+ ---
16
+
17
+ # ComfyUI-WorkflowGenerator Models
18
+
19
+ This repository contains the quantized GGUF models required for [ComfyUI-WorkflowGenerator](https://github.com/danielpflorian/ComfyUI-WorkflowGenerator), a custom node implementation that generates ComfyUI workflows from natural language descriptions.
20
+
21
+ ## Models Included
22
+
23
+ ### 1. Workflow Generator Model (Required)
24
+
25
+ - **File**: `workflow-generator-q8_0.gguf`
26
+ - **Tokenizer**: `workflow-generator/` directory
27
+ - **Purpose**: Generates workflow diagrams from natural language instructions
28
+ - **Base Model**: Qwen2.5-14B
29
+ - **Training**: Fine-tuned from Qwen2.5-14B using LLaMA-Factory (see [original ComfyGPT repository](https://github.com/comfygpt/comfygpt/tree/main))
30
+ - **Status**: **Required** - This model is always needed
31
+
32
+ ### 2. Embedding Model (Required)
33
+
34
+ - **Directory**: `paraphrase-multilingual-MiniLM-L12-v2/`
35
+ - **Purpose**: Semantic search for node name matching and validation
36
+ - **Base Model**: [sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2](https://huggingface.co/sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2)
37
+ - **Status**: **Required** - Always needed for semantic search in NodeValidator
38
+
39
+ ### 3. Node Validator Model (Optional)
40
+
41
+ - **File**: `Qwen2.5-7B-Instruct-q8_0.gguf`
42
+ - **Tokenizer**: `Qwen2.5-7B-Instruct/` directory
43
+ - **Purpose**: Refines and corrects node names in workflow diagrams (LLM refinement mode)
44
+ - **Base Model**: Qwen2.5-7B-Instruct (base model, not fine-tuned)
45
+ - **Status**: **Optional** - Only needed if using LLM refinement (`use_llm_refinement=True`)
46
+
47
+ ## Model Training Information
48
+
49
+ ### Workflow Generator Model
50
+
51
+ The `workflow-generator-q8_0.gguf` model was trained based on the [ComfyGPT research](https://github.com/comfygpt/comfygpt/tree/main) methodology:
52
+
53
+ - **Original Model Source**: [xiatianzs/resources](https://huggingface.co/xiatianzs/resources/tree/main) - Original fine-tuned model from ComfyGPT research team
54
+ - **Base Model**: [Qwen/Qwen2.5-14B](https://huggingface.co/Qwen/Qwen2.5-14B) from HuggingFace
55
+ - **Training Method**: Full fine-tuning (Supervised Fine-Tuning / SFT)
56
+ - **Training Framework**: [LLaMA-Factory](https://github.com/hiyouga/LLaMA-Factory)
57
+ - **Training Dataset**: `FlowDataset.json` - Contains instruction-input-output pairs where:
58
+ - Instruction: "Based on the description I provided, generate a JSON example of the required ComfyUi workflow."
59
+ - Input: Natural language workflow descriptions
60
+ - Output: JSON diagrams (list of edges representing workflow connections)
61
+ - **Training Hyperparameters**:
62
+ - Learning rate: 1.0e-5
63
+ - Epochs: 3.0
64
+ - Batch size: 1 per device (gradient accumulation: 4 steps)
65
+ - LR scheduler: Cosine with 0.1 warmup ratio
66
+ - Precision: bf16
67
+ - Cutoff length: 8,192 tokens (training cutoff; model architecture supports up to 131,072 tokens)
68
+ - DeepSpeed: ZeRO-3 optimization
69
+ - **Quantization**: q8_0 (8-bit quantization for efficient inference)
70
+
71
+ For more details on the training process, see the [original ComfyGPT repository](https://github.com/comfygpt/comfygpt/tree/main) and [training configuration](https://github.com/comfygpt/comfygpt/tree/main/train/sft).
72
+
73
+ ### Embedding Model
74
+
75
+ The `paraphrase-multilingual-MiniLM-L12-v2` model is a SentenceTransformer model used for semantic search in the NodeValidator. It encodes node names into embeddings and finds the most similar nodes when correcting invalid node names in workflow diagrams.
76
+
77
+ - **Original Model**: [sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2](https://huggingface.co/sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2)
78
+ - **Type**: SentenceTransformer (HuggingFace format)
79
+ - **Size**: ~420 MB
80
+ - **Dimensions**: 384 (embedding vector size)
81
+ - **Use Case**: Semantic similarity search for node name matching
82
+
83
+ ### Node Validator Model
84
+
85
+ The `Qwen2.5-7B-Instruct-q8_0.gguf` model is the base [Qwen2.5-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-7B-Instruct) model (not fine-tuned), used for its built-in instruction-following capabilities to select the best node from semantic search candidates.
86
+
87
+ ## Quick Download
88
+
89
+ Download all models at once:
90
+
91
+ ```bash
92
+ huggingface-cli download DanielPFlorian/comfyui-workflowgenerator-models \
93
+ --local-dir ./ComfyUI/models/LLM/
94
+ ```
95
+
96
+ Or download specific models:
97
+
98
+ ```bash
99
+ # Download only the required models (workflow-generator + embedding model)
100
+ huggingface-cli download DanielPFlorian/comfyui-workflowgenerator-models \
101
+ --include "workflow-generator-q8_0.gguf" "workflow-generator/*" "paraphrase-multilingual-MiniLM-L12-v2/*" \
102
+ --local-dir ./ComfyUI/models/LLM/
103
+ ```
104
+
105
+ ## Installation and Setup
106
+
107
+ ### Step 1: Download Models
108
+
109
+ Download the models to your ComfyUI models directory:
110
+
111
+ ```bash
112
+ # Navigate to ComfyUI directory
113
+ cd /path/to/ComfyUI
114
+
115
+ # Download all models
116
+ huggingface-cli download DanielPFlorian/comfyui-workflowgenerator-models \
117
+ --local-dir ./models/LLM/
118
+ ```
119
+
120
+ ### Step 2: Organize Files in LLM Directory
121
+
122
+ After downloading, organize the files in `ComfyUI/models/LLM/` as follows:
123
+
124
+ ```
125
+ ComfyUI/models/LLM/
126
+ β”œβ”€β”€ workflow-generator-q8_0.gguf # Main model (required)
127
+ β”œβ”€β”€ workflow-generator/ # Main tokenizer (required)
128
+ β”‚ β”œβ”€β”€ tokenizer.json
129
+ β”‚ β”œβ”€β”€ tokenizer_config.json
130
+ β”‚ β”œβ”€β”€ vocab.json
131
+ β”‚ β”œβ”€β”€ merges.txt
132
+ β”‚ β”œβ”€β”€ special_tokens_map.json
133
+ β”‚ β”œβ”€β”€ added_tokens.json
134
+ β”‚ β”œβ”€β”€ config.json
135
+ β”‚ β”œβ”€β”€ generation_config.json
136
+ β”‚ └── model.safetensors.index.json
137
+ β”œβ”€β”€ paraphrase-multilingual-MiniLM-L12-v2/ # Embedding model (required)
138
+ β”‚ β”œβ”€β”€ config.json
139
+ β”‚ β”œβ”€β”€ model.safetensors
140
+ β”‚ β”œβ”€β”€ modules.json
141
+ β”‚ β”œβ”€β”€ sentence_bert_config.json
142
+ β”‚ β”œβ”€β”€ config_sentence_transformers.json
143
+ β”‚ β”œβ”€β”€ tokenizer.json
144
+ β”‚ β”œβ”€β”€ tokenizer_config.json
145
+ β”‚ β”œβ”€β”€ special_tokens_map.json
146
+ β”‚ β”œβ”€β”€ sentencepiece.bpe.model
147
+ β”‚ β”œβ”€β”€ unigram.json
148
+ β”‚ └── 1_Pooling/
149
+ β”‚ └── config.json
150
+ β”œβ”€β”€ Qwen2.5-7B-Instruct-q8_0.gguf # NodeValidator model (optional)
151
+ └── Qwen2.5-7B-Instruct/ # NodeValidator tokenizer (optional)
152
+ β”œβ”€β”€ tokenizer.json
153
+ β”œβ”€β”€ tokenizer_config.json
154
+ β”œβ”€β”€ vocab.json
155
+ β”œβ”€β”€ merges.txt
156
+ β”œβ”€β”€ config.json
157
+ └── generation_config.json
158
+ ```
159
+
160
+ **Important**: The tokenizer directory name must match the model name (without `.gguf` extension and quantization suffix). The auto-detection code looks for:
161
+ - `workflow-generator-q8_0.gguf` β†’ `workflow-generator/` tokenizer
162
+ - `Qwen2.5-7B-Instruct-q8_0.gguf` β†’ `Qwen2.5-7B-Instruct/` tokenizer
163
+
164
+ ## Usage
165
+
166
+ ### Required Models
167
+
168
+ - **workflow-generator-q8_0.gguf** + **workflow-generator/** tokenizer - Always needed
169
+ - **paraphrase-multilingual-MiniLM-L12-v2/** - Always needed for semantic search
170
+
171
+ ### Optional Models
172
+
173
+ - **Qwen2.5-7B-Instruct-q8_0.gguf** + **Qwen2.5-7B-Instruct/** tokenizer - Only needed if using LLM refinement (`use_llm_refinement=True`)
174
+
175
+ ### Model Usage in ComfyUI-WorkflowGenerator
176
+
177
+ 1. **WorkflowGenerator Node**: Uses `workflow-generator-q8_0.gguf` to generate workflow diagrams from natural language
178
+ 2. **NodeValidator Node**:
179
+ - Uses `paraphrase-multilingual-MiniLM-L12-v2` for semantic search (always)
180
+ - Uses `Qwen2.5-7B-Instruct-q8_0.gguf` for LLM refinement (optional, when `use_llm_refinement=True`)
181
+ 3. **WorkflowBuilder Node**: No models needed (deterministic code)
182
+
183
+ ## Model Specifications
184
+
185
+ ### Workflow Generator Model
186
+
187
+ - **Format**: GGUF (q8_0 quantization)
188
+ - **Base**: Qwen2.5-14B
189
+ - **Size**: ~8-9 GB (quantized)
190
+ - **Context Window**: 131,072 tokens (128K) - Model architecture supports up to 131K tokens, though training used 16,384 token cutoff
191
+ - **Quantization**: q8_0 (8-bit, good balance of quality and size)
192
+
193
+ ### Embedding Model
194
+
195
+ - **Format**: SentenceTransformer (HuggingFace format)
196
+ - **Base**: sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2
197
+ - **Size**: ~420 MB
198
+ - **Dimensions**: 384 (embedding vector size)
199
+
200
+ ### Node Validator Model
201
+
202
+ - **Format**: GGUF (q8_0 quantization)
203
+ - **Base**: Qwen2.5-7B-Instruct
204
+ - **Size**: ~4-5 GB (quantized)
205
+ - **Context Window**: 32,768 tokens
206
+ - **Quantization**: q8_0 (8-bit, good balance of quality and size)
207
+
208
+ ## System Requirements
209
+
210
+ - **VRAM**:
211
+ - Minimum: 8 GB (for workflow-generator with CPU offloading)
212
+ - Recommended: 16+ GB (for both models on GPU)
213
+ - **RAM**: 16+ GB recommended
214
+ - **Storage**: ~15-16 GB for all models, tokenizers, and embedding model
215
+
216
+ ## Performance Tips
217
+
218
+ 1. **Use GGUF models**: Smaller size and better VRAM efficiency than HuggingFace models
219
+ 2. **GPU Layers**: Use "auto" setting for optimal GPU layer allocation
220
+ 3. **LLM Refinement**: Only enable if you need higher accuracy (slower but more accurate)
221
+ 4. **Semantic Search Only**: Faster execution, deterministic results (recommended for most use cases)
222
+
223
+ ## Troubleshooting
224
+
225
+ ### Model Not Found
226
+
227
+ - Verify models are in `ComfyUI/models/LLM/` directory
228
+ - Check tokenizer directory name matches model name (without `.gguf` and quantization suffix)
229
+ - Restart ComfyUI after moving files
230
+
231
+ ### Tokenizer Not Found
232
+
233
+ - Ensure tokenizer directory exists with the correct name
234
+ - Verify tokenizer files (`tokenizer.json`, `tokenizer_config.json`, `vocab.json`) are present
235
+ - Check directory structure matches the expected format
236
+
237
+ ### Out of Memory
238
+
239
+ - Reduce `n_gpu_layers` (try "auto" or lower number)
240
+ - Use smaller quantization (q4_0 instead of q8_0) - note: you'll need to re-quantize
241
+ - Set `device_preference` to "cpu" for some operations
242
+
243
+ ## Related Resources
244
+
245
+ - **ComfyUI-WorkflowGenerator**: [GitHub Repository](https://github.com/danielpflorian/ComfyUI-WorkflowGenerator)
246
+ - **Original ComfyGPT Research**: [GitHub Repository](https://github.com/comfygpt/comfygpt)
247
+ - **Research Paper**: [arXiv:2503.17671](https://arxiv.org/abs/2503.17671)
248
+ - **Project Website**: [https://comfygpt.github.io/](https://comfygpt.github.io/)
249
+
250
+ ## Citation
251
+
252
+ If you use these models in your research, please cite the original ComfyGPT paper:
253
+
254
+ ```bibtex
255
+ @article{huang2025comfygpt,
256
+ title={ComfyGPT: A Self-Optimizing Multi-Agent System for Comprehensive ComfyUI Workflow Generation},
257
+ author={Huang, Oucheng and Ma, Yuhang and Zhao, Zeng and Wu, Mingrui and Ji, Jiayi and Zhang, Rongsheng and Hu, Zhipeng and Sun, Xiaoshuai and Ji, Rongrong},
258
+ journal={arXiv preprint arXiv:2503.17671},
259
+ year={2025}
260
+ }
261
+ ```
262
+
263
+ ## License
264
+
265
+ These models are provided for use with ComfyUI-WorkflowGenerator. Please refer to:
266
+ - Original ComfyGPT repository for model training details and licensing
267
+ - Qwen2.5 model licenses from HuggingFace
268
+ - ComfyUI-WorkflowGenerator repository for usage terms
269
+
270
+ ## Support
271
+
272
+ For issues, questions, or contributions:
273
+ - **Issues**: [ComfyUI-WorkflowGenerator Issues](https://github.com/danielpflorian/ComfyUI-WorkflowGenerator/issues)
274
+ - **Documentation**: [ComfyUI-WorkflowGenerator Wiki](https://github.com/danielpflorian/ComfyUI-WorkflowGenerator/wiki)
275
+