@optima-chat/comfy-cli 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,195 +3,195 @@ name: comfy-cli
3
3
  description: "ComfyUI CLI tool for AI agents. ALWAYS use when user wants to: generate images (生成图片/画图/图像/生成画), edit images (编辑图片/修改图片/图生图/改图), create videos (生成视频/图生视频/制作视频), manage ComfyUI workflows (工作流/ComfyUI). Uses 'comfy generate', 'comfy edit', 'comfy video' commands."
4
4
  ---
5
5
 
6
- # ComfyUI CLI - AI Image & Video Generation
6
+ # ComfyUI CLI - AI 图像与视频生成工具
7
7
 
8
- ## When to Use This Skill
8
+ ## 何时使用此 Skill
9
9
 
10
- Use this skill when:
11
- - User wants to generate images from text prompts (文生图)
12
- - User wants to edit or transform existing images (图生图)
13
- - User wants to create videos from images (图生视频)
14
- - User asks about ComfyUI workflows, queue status, or models
15
- - User mentions: 生成图片、画图、图像处理、视频生成、ComfyUI
10
+ 在以下情况使用此 Skill:
11
+ - 用户想要从文本提示词生成图像(文生图)
12
+ - 用户想要编辑或转换现有图像(图生图)
13
+ - 用户想要从图像创建视频(图生视频)
14
+ - 用户询问 ComfyUI 工作流、队列状态或模型
15
+ - 用户提到:生成图片、画图、图像处理、视频生成、ComfyUI
16
16
 
17
- ## Available Commands
17
+ ## 可用命令
18
18
 
19
- ### 1. Generate Images: `comfy generate`
19
+ ### 1. 生成图像:`comfy generate`
20
20
 
21
- Generate images from text prompts using Stable Diffusion / FLUX models.
21
+ 使用 Stable Diffusion / FLUX 模型从文本提示词生成图像。
22
22
 
23
- **Syntax:**
23
+ **语法:**
24
24
  ```bash
25
- comfy generate "PROMPT" [OPTIONS]
25
+ comfy generate "提示词" [选项]
26
26
  ```
27
27
 
28
- **Parameters:**
29
- - `PROMPT`: Text description of the image to generate
30
- - `--width <number>`: Image width (default: 1024)
31
- - `--height <number>`: Image height (default: 1024)
32
- - `--no-wait`: Submit and return immediately without waiting for completion
33
- - `--pretty`: Human-readable table format output (default: JSON)
28
+ **参数:**
29
+ - `提示词`: 要生成图像的文本描述
30
+ - `--width <数字>`: 图像宽度(默认:1024
31
+ - `--height <数字>`: 图像高度(默认:1024
32
+ - `--no-wait`: 提交后立即返回,不等待完成
33
+ - `--pretty`: 人类可读的表格格式输出(默认:JSON
34
34
 
35
- **Returns:**
36
- - JSON with `prompt_id`, `status`, `outputs` (image file paths)
37
- - Default behavior: waits for completion and shows real-time progress
35
+ **返回:**
36
+ - 包含 `prompt_id`、`status`、`outputs`(图像文件路径)的 JSON
37
+ - 默认行为:等待完成并显示实时进度
38
38
 
39
- **When to use:**
40
- - User asks to generate/create images from text
41
- - User provides image description
42
- - Text-to-image generation
39
+ **使用场景:**
40
+ - 用户要求生成/创建图像
41
+ - 用户提供图像描述
42
+ - 文本生成图像
43
43
 
44
- ### 2. Edit Images: `comfy edit`
44
+ ### 2. 编辑图像:`comfy edit`
45
45
 
46
- Edit or transform existing images with text prompts (Image-to-Image).
46
+ 使用文本提示词编辑或转换现有图像(图生图)。
47
47
 
48
- **Syntax:**
48
+ **语法:**
49
49
  ```bash
50
- comfy edit <IMAGE_PATH> "PROMPT" [OPTIONS]
50
+ comfy edit <图像路径> "提示词" [选项]
51
51
  ```
52
52
 
53
- **Parameters:**
54
- - `IMAGE_PATH`: Path to input image file
55
- - `PROMPT`: Transformation description (e.g., "anime style", "add more details")
56
- - `--no-wait`: Submit and return immediately without waiting for completion
57
- - `--pretty`: Human-readable table format output (default: JSON)
53
+ **参数:**
54
+ - `图像路径`: 输入图像文件的路径
55
+ - `提示词`: 转换描述(例如:"动漫风格""添加更多细节"
56
+ - `--no-wait`: 提交后立即返回,不等待完成
57
+ - `--pretty`: 人类可读的表格格式输出(默认:JSON
58
58
 
59
- **Returns:**
60
- - JSON with `prompt_id`, `status`, `outputs` (edited image file paths)
61
- - Default behavior: waits for completion and shows real-time progress
59
+ **返回:**
60
+ - 包含 `prompt_id`、`status`、`outputs`(编辑后图像文件路径)的 JSON
61
+ - 默认行为:等待完成并显示实时进度
62
62
 
63
- **When to use:**
64
- - User wants to modify/edit an existing image
65
- - User wants to apply style transfer
66
- - Image-to-image transformation
63
+ **使用场景:**
64
+ - 用户想要修改/编辑现有图像
65
+ - 用户想要应用风格转换
66
+ - 图像到图像的转换
67
67
 
68
- ### 3. Create Videos: `comfy video`
68
+ ### 3. 创建视频:`comfy video`
69
69
 
70
- Generate videos from images using I2V (Image-to-Video) models.
70
+ 使用 I2V(图像到视频)模型从图像生成视频。
71
71
 
72
- **Syntax:**
72
+ **语法:**
73
73
  ```bash
74
- comfy video <IMAGE_PATH> [OPTIONS]
74
+ comfy video <图像路径> [选项]
75
75
  ```
76
76
 
77
- **Parameters:**
78
- - `IMAGE_PATH`: Path to input image file
79
- - `-p, --prompt <text>`: Motion description prompt (optional)
80
- - `-n, --negative <text>`: Negative prompt (optional)
81
- - `--width <number>`: Video width (default: 512)
82
- - `--height <number>`: Video height (default: 512)
83
- - `--no-wait`: Submit and return immediately without waiting for completion
84
- - `--pretty`: Human-readable table format output (default: JSON)
77
+ **参数:**
78
+ - `图像路径`: 输入图像文件的路径
79
+ - `-p, --prompt <文本>`: 运动描述提示词(可选)
80
+ - `-n, --negative <文本>`: 负面提示词(可选)
81
+ - `--width <数字>`: 视频宽度(默认:512
82
+ - `--height <数字>`: 视频高度(默认:512
83
+ - `--no-wait`: 提交后立即返回,不等待完成
84
+ - `--pretty`: 人类可读的表格格式输出(默认:JSON
85
85
 
86
- **Returns:**
87
- - JSON with `prompt_id`, `status`, `outputs` (video file paths)
88
- - Default behavior: waits for completion and shows real-time progress
86
+ **返回:**
87
+ - 包含 `prompt_id`、`status`、`outputs`(视频文件路径)的 JSON
88
+ - 默认行为:等待完成并显示实时进度
89
89
 
90
- **When to use:**
91
- - User wants to animate a static image
92
- - User wants to create video from image
93
- - Image-to-video generation
90
+ **使用场景:**
91
+ - 用户想要为静态图像添加动画
92
+ - 用户想要从图像创建视频
93
+ - 图像到视频的生成
94
94
 
95
- ### 4. Download Results: `comfy download`
95
+ ### 4. 下载结果:`comfy download`
96
96
 
97
- Download generated images/videos to local directory.
97
+ 将生成的图像/视频下载到本地目录。
98
98
 
99
- **Syntax:**
99
+ **语法:**
100
100
  ```bash
101
- comfy download <PROMPT_ID> [OPTIONS]
101
+ comfy download <PROMPT_ID> [选项]
102
102
  ```
103
103
 
104
- **Parameters:**
105
- - `PROMPT_ID`: The prompt ID returned from generate/edit/video commands
106
- - `-o, --output <dir>`: Output directory (default: ./comfy-output)
107
- - `--pretty`: Human-readable output
104
+ **参数:**
105
+ - `PROMPT_ID`: generate/edit/video 命令返回的提示词 ID
106
+ - `-o, --output <目录>`: 输出目录(默认:./comfy-output
107
+ - `--pretty`: 人类可读的输出
108
108
 
109
- **Returns:**
110
- - JSON with downloaded file paths
109
+ **返回:**
110
+ - 包含已下载文件路径的 JSON
111
111
 
112
- ### 5. Workflow Management
112
+ ### 5. 工作流管理
113
113
 
114
- **List workflow history:**
114
+ **列出工作流历史:**
115
115
  ```bash
116
116
  comfy workflow list [--limit 10] [--pretty]
117
117
  ```
118
118
 
119
- **Get workflow result:**
119
+ **获取工作流结果:**
120
120
  ```bash
121
121
  comfy workflow get <PROMPT_ID> [--pretty]
122
122
  ```
123
123
 
124
- **Submit custom workflow:**
124
+ **提交自定义工作流:**
125
125
  ```bash
126
- comfy workflow submit <WORKFLOW_FILE> [--pretty]
126
+ comfy workflow submit <工作流文件> [--pretty]
127
127
  ```
128
128
 
129
- ### 6. Queue Management
129
+ ### 6. 队列管理
130
130
 
131
- **Check queue status:**
131
+ **检查队列状态:**
132
132
  ```bash
133
133
  comfy queue status [--pretty]
134
134
  ```
135
135
 
136
- **Clear queue:**
136
+ **清空队列:**
137
137
  ```bash
138
138
  comfy queue clear --confirm [--pretty]
139
139
  ```
140
140
 
141
- **Delete queue item:**
141
+ **删除队列项:**
142
142
  ```bash
143
- comfy queue delete <ITEM_ID> [--pretty]
143
+ comfy queue delete <项目ID> [--pretty]
144
144
  ```
145
145
 
146
- **Interrupt current execution:**
146
+ **中断当前执行:**
147
147
  ```bash
148
148
  comfy interrupt [--pretty]
149
149
  ```
150
150
 
151
- ### 7. Model Management
151
+ ### 7. 模型管理
152
152
 
153
- **List available models:**
153
+ **列出可用模型:**
154
154
  ```bash
155
155
  comfy model list [--type checkpoints|loras|vae|...] [--pretty]
156
156
  ```
157
157
 
158
- **Model types:**
159
- - `checkpoints`: Stable Diffusion / FLUX checkpoint models
160
- - `loras`: LoRA models
161
- - `vae`: VAE models
162
- - `controlnet`: ControlNet models
163
- - `upscale_models`: Upscaler models
158
+ **模型类型:**
159
+ - `checkpoints`: Stable Diffusion / FLUX 检查点模型
160
+ - `loras`: LoRA 模型
161
+ - `vae`: VAE 模型
162
+ - `controlnet`: ControlNet 模型
163
+ - `upscale_models`: 放大模型
164
164
 
165
- ### 8. System Information
165
+ ### 8. 系统信息
166
166
 
167
- **Get system stats:**
167
+ **获取系统状态:**
168
168
  ```bash
169
169
  comfy system stats [--pretty]
170
170
  ```
171
171
 
172
- Returns: GPU/CPU usage, memory, device info
172
+ 返回:GPU/CPU 使用率、内存、设备信息
173
173
 
174
- ### 9. Configuration
174
+ ### 9. 配置
175
175
 
176
- **Set ComfyUI server address (required for first use):**
176
+ **设置 ComfyUI 服务器地址(首次使用必需):**
177
177
  ```bash
178
178
  comfy config set server http://localhost:8188
179
179
  ```
180
180
 
181
- **View current config:**
181
+ **查看当前配置:**
182
182
  ```bash
183
183
  comfy config list [--pretty]
184
184
  ```
185
185
 
186
- **Other config options:**
186
+ **其他配置选项:**
187
187
  ```bash
188
188
  comfy config set timeout 30000
189
189
  comfy config set outputDir ./my-outputs
190
190
  ```
191
191
 
192
- ## Output Format
192
+ ## 输出格式
193
193
 
194
- All commands default to **JSON output** (AI-friendly, reduces 50%+ tokens):
194
+ 所有命令默认输出 **JSON 格式**(AI 友好,减少 50%+ token):
195
195
 
196
196
  ```json
197
197
  {
@@ -204,238 +204,238 @@ All commands default to **JSON output** (AI-friendly, reduces 50%+ tokens):
204
204
  }
205
205
  ```
206
206
 
207
- Use `--pretty` flag for human-readable table format with colors.
207
+ 使用 `--pretty` 标志获取带颜色的人类可读表格格式。
208
208
 
209
- ## Workflow Examples
209
+ ## 工作流示例
210
210
 
211
- ### Example 1: Quick Image Generation
212
- **User**: "帮我生成一张猫的图片"
211
+ ### 示例 1:快速生成图像
212
+ **用户**:"帮我生成一张猫的图片"
213
213
 
214
- **Assistant**:
214
+ **助手**:
215
215
  ```bash
216
216
  comfy generate "a cute cat"
217
217
  ```
218
218
 
219
- **Result**: Returns JSON with `prompt_id` and `outputs` containing image file paths. Default behavior waits for completion and shows real-time progress via WebSocket.
219
+ **结果**:返回包含 `prompt_id` `outputs`(包含图像文件路径)的 JSON。默认行为等待完成并通过 WebSocket 显示实时进度。
220
220
 
221
- ### Example 2: High-Resolution Image
222
- **User**: "生成一张 1920x1080 的风景画"
221
+ ### 示例 2:高分辨率图像
222
+ **用户**:"生成一张 1920x1080 的风景画"
223
223
 
224
- **Assistant**:
224
+ **助手**:
225
225
  ```bash
226
226
  comfy generate "beautiful landscape with mountains and lake" --width 1920 --height 1080
227
227
  ```
228
228
 
229
- ### Example 3: Image Style Transfer
230
- **User**: "把这张图片改成动漫风格"
229
+ ### 示例 3:图像风格转换
230
+ **用户**:"把这张图片改成动漫风格"
231
231
 
232
- **Assistant** (assuming user uploaded `photo.jpg`):
232
+ **助手**(假设用户上传了 `photo.jpg`):
233
233
  ```bash
234
234
  comfy edit photo.jpg "anime style"
235
235
  ```
236
236
 
237
- ### Example 4: Image Editing with Details
238
- **User**: "给这张照片添加更多细节,提高质量"
237
+ ### 示例 4:添加细节的图像编辑
238
+ **用户**:"给这张照片添加更多细节,提高质量"
239
239
 
240
- **Assistant**:
240
+ **助手**:
241
241
  ```bash
242
242
  comfy edit photo.jpg "add more details, enhance quality, 4k resolution"
243
243
  ```
244
244
 
245
- ### Example 5: Video Creation
246
- **User**: "用这张人物图片生成一个视频"
245
+ ### 示例 5:视频创建
246
+ **用户**:"用这张人物图片生成一个视频"
247
247
 
248
- **Assistant**:
248
+ **助手**:
249
249
  ```bash
250
250
  comfy video portrait.png --prompt "smooth motion, natural movement"
251
251
  ```
252
252
 
253
- ### Example 6: Non-blocking Generation
254
- **User**: "生成一张图片,不用等完成"
253
+ ### 示例 6:非阻塞生成
254
+ **用户**:"生成一张图片,不用等完成"
255
255
 
256
- **Assistant**:
256
+ **助手**:
257
257
  ```bash
258
258
  comfy generate "sunset over ocean" --no-wait
259
259
  ```
260
260
 
261
- Returns immediately with `prompt_id`. Check status later with:
261
+ 立即返回 `prompt_id`。稍后检查状态:
262
262
  ```bash
263
263
  comfy workflow get <prompt_id>
264
264
  ```
265
265
 
266
- ### Example 7: Batch Image Generation
267
- **User**: "帮我生成 3 张不同的猫的图片"
266
+ ### 示例 7:批量图像生成
267
+ **用户**:"帮我生成 3 张不同的猫的图片"
268
268
 
269
- **Assistant**:
269
+ **助手**:
270
270
  ```bash
271
271
  comfy generate "a cute cat sitting" --no-wait
272
272
  comfy generate "a cat playing with toys" --no-wait
273
273
  comfy generate "a cat sleeping on a couch" --no-wait
274
274
  ```
275
275
 
276
- Then check queue status:
276
+ 然后检查队列状态:
277
277
  ```bash
278
278
  comfy queue status
279
279
  ```
280
280
 
281
- ### Example 8: Workflow with Model Check
282
- **User**: "检查一下有哪些可用的模型,然后生成图片"
281
+ ### 示例 8:检查模型后生成
282
+ **用户**:"检查一下有哪些可用的模型,然后生成图片"
283
283
 
284
- **Assistant**:
284
+ **助手**:
285
285
  ```bash
286
- # First check available models
286
+ # 首先检查可用模型
287
287
  comfy model list --type checkpoints
288
288
 
289
- # Then generate with appropriate prompt
289
+ # 然后使用适当的提示词生成
290
290
  comfy generate "a beautiful portrait"
291
291
  ```
292
292
 
293
- ### Example 9: Complete Workflow
294
- **User**: "生成一张图片,编辑它,然后生成视频"
293
+ ### 示例 9:完整工作流
294
+ **用户**:"生成一张图片,编辑它,然后生成视频"
295
295
 
296
- **Assistant**:
296
+ **助手**:
297
297
  ```bash
298
- # 1. Generate base image
298
+ # 1. 生成基础图像
299
299
  comfy generate "a portrait of a woman"
300
- # Output: ./comfy-output/image_001.png
300
+ # 输出:./comfy-output/image_001.png
301
301
 
302
- # 2. Edit the image
302
+ # 2. 编辑图像
303
303
  comfy edit ./comfy-output/image_001.png "add cinematic lighting"
304
- # Output: ./comfy-output/image_002.png
304
+ # 输出:./comfy-output/image_002.png
305
305
 
306
- # 3. Create video from edited image
306
+ # 3. 从编辑后的图像创建视频
307
307
  comfy video ./comfy-output/image_002.png --prompt "slow motion, cinematic"
308
- # Output: ./comfy-output/video_001.mp4
308
+ # 输出:./comfy-output/video_001.mp4
309
309
  ```
310
310
 
311
- ## Best Practices
311
+ ## 最佳实践
312
312
 
313
- ### 1. Output Format Selection
314
- - **Default (JSON)**: Best for AI agents, programmatic parsing, reduces tokens
315
- - **Pretty mode**: Best for human inspection, debugging, visual feedback
316
- - Use `--pretty` when user explicitly wants to see formatted output
313
+ ### 1. 输出格式选择
314
+ - **默认(JSON)**:最适合 AI 代理、编程解析,减少 token
315
+ - **Pretty 模式**:最适合人工检查、调试、视觉反馈
316
+ - 当用户明确要求查看格式化输出时使用 `--pretty`
317
317
 
318
- ### 2. Wait Strategy
319
- - **Default (wait)**: Recommended for interactive workflows, shows real-time progress
320
- - **--no-wait**: Use when submitting multiple jobs, batch processing, or time-consuming operations
321
- - After `--no-wait`, use `comfy workflow get <prompt_id>` to check completion
318
+ ### 2. 等待策略
319
+ - **默认(wait)**:推荐用于交互式工作流,显示实时进度
320
+ - **--no-wait**:用于提交多个任务、批处理或耗时操作
321
+ - 使用 `--no-wait` 后,用 `comfy workflow get <prompt_id>` 检查完成状态
322
322
 
323
- ### 3. Error Handling
324
- - Always check `success` field in JSON response
325
- - If error occurs, check:
326
- 1. ComfyUI server is running: `comfy system stats`
327
- 2. Server address is correct: `comfy config list`
328
- 3. Queue is not stuck: `comfy queue status`
323
+ ### 3. 错误处理
324
+ - 始终检查 JSON 响应中的 `success` 字段
325
+ - 如果发生错误,检查:
326
+ 1. ComfyUI 服务器是否运行:`comfy system stats`
327
+ 2. 服务器地址是否正确:`comfy config list`
328
+ 3. 队列是否卡住:`comfy queue status`
329
329
 
330
- ### 4. Performance Optimization
331
- - Use appropriate image sizes (1024x1024 for SD, 512x512 for videos)
332
- - Consider `--no-wait` for batch operations
333
- - Check system resources before large generations: `comfy system stats`
330
+ ### 4. 性能优化
331
+ - 使用适当的图像尺寸(SD 1024x1024,视频用 512x512
332
+ - 批量操作时考虑使用 `--no-wait`
333
+ - 大型生成前检查系统资源:`comfy system stats`
334
334
 
335
- ### 5. First-time Setup
336
- Always configure server address before first use:
335
+ ### 5. 首次设置
336
+ 首次使用前务必配置服务器地址:
337
337
  ```bash
338
338
  comfy config set server http://localhost:8188
339
339
  ```
340
340
 
341
- ## Common Patterns
341
+ ## 常用模式
342
342
 
343
- ### Pattern 1: Generate and Download
343
+ ### 模式 1:生成并下载
344
344
  ```bash
345
- # Generate image
345
+ # 生成图像
346
346
  comfy generate "a cat" --no-wait
347
- # Returns: { "prompt_id": "abc123" }
347
+ # 返回:{ "prompt_id": "abc123" }
348
348
 
349
- # Download result later
349
+ # 稍后下载结果
350
350
  comfy download abc123
351
351
  ```
352
352
 
353
- ### Pattern 2: Iterative Editing
353
+ ### 模式 2:迭代编辑
354
354
  ```bash
355
- # Start with base image
355
+ # 从基础图像开始
356
356
  comfy generate "a portrait"
357
357
 
358
- # Edit step 1
358
+ # 编辑步骤 1
359
359
  comfy edit output_001.png "add dramatic lighting"
360
360
 
361
- # Edit step 2
361
+ # 编辑步骤 2
362
362
  comfy edit output_002.png "increase contrast"
363
363
  ```
364
364
 
365
- ### Pattern 3: Queue Management
365
+ ### 模式 3:队列管理
366
366
  ```bash
367
- # Submit multiple jobs
367
+ # 提交多个任务
368
368
  comfy generate "cat" --no-wait
369
369
  comfy generate "dog" --no-wait
370
370
  comfy generate "bird" --no-wait
371
371
 
372
- # Check queue
372
+ # 检查队列
373
373
  comfy queue status
374
374
 
375
- # If needed, clear queue
375
+ # 如需要,清空队列
376
376
  comfy queue clear --confirm
377
377
  ```
378
378
 
379
- ## Tips
379
+ ## 提示
380
380
 
381
- **Server Connection:**
382
- - Default server: `http://localhost:8188`
383
- - For remote servers: `comfy config set server http://remote-ip:8188`
384
- - Check connection: `comfy system stats`
381
+ **服务器连接:**
382
+ - 默认服务器:`http://localhost:8188`
383
+ - 远程服务器:`comfy config set server http://remote-ip:8188`
384
+ - 检查连接:`comfy system stats`
385
385
 
386
- **Model Selection:**
387
- - ComfyUI automatically uses default checkpoint model
388
- - Check available models: `comfy model list --type checkpoints`
389
- - For custom workflows, use: `comfy workflow submit custom.json`
386
+ **模型选择:**
387
+ - ComfyUI 自动使用默认检查点模型
388
+ - 检查可用模型:`comfy model list --type checkpoints`
389
+ - 自定义工作流:`comfy workflow submit custom.json`
390
390
 
391
- **Output Files:**
392
- - Default output directory: `./comfy-output/`
393
- - Change with: `comfy config set outputDir ./my-outputs`
394
- - Downloaded files retain original ComfyUI filenames
391
+ **输出文件:**
392
+ - 默认输出目录:`./comfy-output/`
393
+ - 修改:`comfy config set outputDir ./my-outputs`
394
+ - 下载的文件保留原始 ComfyUI 文件名
395
395
 
396
- **Real-time Progress:**
397
- - Default wait mode shows progress via WebSocket
398
- - Progress includes: node execution, current step, percentage
399
- - Use `--no-wait` to skip progress monitoring
396
+ **实时进度:**
397
+ - 默认等待模式通过 WebSocket 显示进度
398
+ - 进度包括:节点执行、当前步骤、百分比
399
+ - 使用 `--no-wait` 跳过进度监控
400
400
 
401
- **Interruption:**
402
- - Stop current generation: `comfy interrupt`
403
- - Clear pending jobs: `comfy queue clear --confirm`
401
+ **中断:**
402
+ - 停止当前生成:`comfy interrupt`
403
+ - 清空待处理任务:`comfy queue clear --confirm`
404
404
 
405
- **JSON Parsing:**
406
- - All JSON responses follow consistent structure
407
- - Check `success` field first
408
- - Access data via `data` field
409
- - Errors include `error` field with details
405
+ **JSON 解析:**
406
+ - 所有 JSON 响应遵循一致的结构
407
+ - 首先检查 `success` 字段
408
+ - 通过 `data` 字段访问数据
409
+ - 错误包含带详细信息的 `error` 字段
410
410
 
411
- ## Configuration
411
+ ## 配置
412
412
 
413
- Config file location: `~/.comfy-cli/config.json`
413
+ 配置文件位置:`~/.comfy-cli/config.json`
414
414
 
415
- **Available settings:**
416
- - `server`: ComfyUI server address (required)
417
- - `timeout`: Request timeout in milliseconds (default: 30000)
418
- - `autoConnect`: Auto-connect to WebSocket (default: true)
419
- - `outputDir`: Default output directory (default: `./comfy-output`)
415
+ **可用设置:**
416
+ - `server`: ComfyUI 服务器地址(必需)
417
+ - `timeout`: 请求超时时间(毫秒,默认:30000
418
+ - `autoConnect`: 自动连接到 WebSocket(默认:true
419
+ - `outputDir`: 默认输出目录(默认:`./comfy-output`)
420
420
 
421
- ## Troubleshooting
421
+ ## 故障排除
422
422
 
423
- **"Connection refused" error:**
424
- - Ensure ComfyUI is running: Check browser at http://localhost:8188
425
- - Verify server address: `comfy config list`
426
- - Test connection: `comfy system stats`
423
+ **"Connection refused" 错误:**
424
+ - 确保 ComfyUI 正在运行:在浏览器检查 http://localhost:8188
425
+ - 验证服务器地址:`comfy config list`
426
+ - 测试连接:`comfy system stats`
427
427
 
428
- **"Workflow failed" error:**
429
- - Check error details in JSON response
430
- - Verify model files are available: `comfy model list`
431
- - Check ComfyUI console logs
428
+ **"Workflow failed" 错误:**
429
+ - 检查 JSON 响应中的错误详情
430
+ - 验证模型文件可用:`comfy model list`
431
+ - 检查 ComfyUI 控制台日志
432
432
 
433
- **Slow generation:**
434
- - Check GPU availability: `comfy system stats`
435
- - Reduce image resolution
436
- - Check queue: `comfy queue status`
433
+ **生成缓慢:**
434
+ - 检查 GPU 可用性:`comfy system stats`
435
+ - 降低图像分辨率
436
+ - 检查队列:`comfy queue status`
437
437
 
438
- **Missing output files:**
439
- - Check output directory: `comfy config list`
440
- - Verify generation completed: `comfy workflow get <prompt_id>`
441
- - Use `comfy download <prompt_id>` to re-download
438
+ **输出文件丢失:**
439
+ - 检查输出目录:`comfy config list`
440
+ - 验证生成已完成:`comfy workflow get <prompt_id>`
441
+ - 使用 `comfy download <prompt_id>` 重新下载
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optima-chat/comfy-cli",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "A CLI tool for ComfyUI designed for LLM interactions",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",