Skip to content

Commit 08afe53

Browse files
committed
update docs
1 parent 11a9eee commit 08afe53

8 files changed

Lines changed: 42 additions & 16 deletions

File tree

README.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,14 @@
3535
```python
3636
from comfykit import ComfyKit
3737

38-
kit = ComfyKit()
38+
# Connect to local ComfyUI server
39+
kit = ComfyKit(comfyui_url="http://127.0.0.1:8188")
3940
result = await kit.execute("workflow.json", {"prompt": "a cute cat"})
4041

4142
print(result.images) # ['http://127.0.0.1:8188/view?filename=cat_001.png']
43+
44+
# 🌐 Or use RunningHub cloud (no local GPU needed)
45+
# kit = ComfyKit(runninghub_api_key="rh-xxx")
4246
```
4347

4448
### Get structured data back
@@ -129,8 +133,8 @@ import asyncio
129133
from comfykit import ComfyKit
130134

131135
async def main():
132-
# Initialize (uses default config)
133-
kit = ComfyKit()
136+
# Connect to local ComfyUI (default: http://127.0.0.1:8188)
137+
kit = ComfyKit(comfyui_url="http://127.0.0.1:8188")
134138

135139
# Execute workflow
136140
result = await kit.execute(
@@ -148,6 +152,8 @@ async def main():
148152
asyncio.run(main())
149153
```
150154

155+
> 💡 **Tip**: `comfyui_url` defaults to `http://127.0.0.1:8188` and can be omitted
156+
151157
---
152158

153159
## 📚 Usage Examples
@@ -157,8 +163,8 @@ asyncio.run(main())
157163
```python
158164
from comfykit import ComfyKit
159165

160-
# Connect to local ComfyUI (default)
161-
kit = ComfyKit()
166+
# Connect to local ComfyUI
167+
kit = ComfyKit(comfyui_url="http://127.0.0.1:8188") # Default, can be omitted
162168

163169
# Execute local workflow file
164170
result = await kit.execute("workflow.json", {

README_CN.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,14 @@
3636
```python
3737
from comfykit import ComfyKit
3838

39-
kit = ComfyKit()
39+
# Connect to local ComfyUI server
40+
kit = ComfyKit(comfyui_url="http://127.0.0.1:8188")
4041
result = await kit.execute("workflow.json", {"prompt": "a cute cat"})
4142

4243
print(result.images) # ['http://127.0.0.1:8188/view?filename=cat_001.png']
44+
45+
# 🌐 Or use RunningHub cloud (no local GPU needed)
46+
# kit = ComfyKit(runninghub_api_key="rh-xxx")
4347
```
4448

4549
### 获得结构化的返回数据
@@ -134,8 +138,8 @@ import asyncio
134138
from comfykit import ComfyKit
135139

136140
async def main():
137-
# 初始化(使用默认配置)
138-
kit = ComfyKit()
141+
# Connect to local ComfyUI (default: http://127.0.0.1:8188)
142+
kit = ComfyKit(comfyui_url="http://127.0.0.1:8188")
139143

140144
# 执行 workflow
141145
result = await kit.execute(
@@ -153,6 +157,8 @@ async def main():
153157
asyncio.run(main())
154158
```
155159

160+
> 💡 **提示**`comfyui_url` 默认为 `http://127.0.0.1:8188`,可省略此参数
161+
156162
### 方式 2:RunningHub 云端(无需本地环境)⭐
157163

158164
如果你没有本地 GPU 或 ComfyUI 环境,可以使用 RunningHub 云平台:
@@ -188,8 +194,8 @@ asyncio.run(main())
188194
```python
189195
from comfykit import ComfyKit
190196

191-
# 默认连接本地 ComfyUI
192-
kit = ComfyKit()
197+
# Connect to local ComfyUI
198+
kit = ComfyKit(comfyui_url="http://127.0.0.1:8188") # Default, can be omitted
193199

194200
# 执行本地 workflow 文件
195201
result = await kit.execute("workflow.json", {

docs/en/index.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,14 @@
4747
```python
4848
from comfykit import ComfyKit
4949

50-
kit = ComfyKit()
50+
# Connect to local ComfyUI server
51+
kit = ComfyKit(comfyui_url="http://127.0.0.1:8188")
5152
result = await kit.execute("workflow.json", {"prompt": "a cute cat"})
5253

5354
print(result.images) # ['http://127.0.0.1:8188/view?filename=cat_001.png']
55+
56+
# 🌐 Or use RunningHub cloud (no local GPU needed)
57+
# kit = ComfyKit(runninghub_api_key="rh-xxx")
5458
```
5559

5660
### Get structured data back

docs/en/quick-start.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ import asyncio
4747
from comfykit import ComfyKit
4848

4949
async def main():
50-
# Initialize (uses default config)
51-
kit = ComfyKit()
50+
# Connect to local ComfyUI (default: http://127.0.0.1:8188)
51+
kit = ComfyKit(comfyui_url="http://127.0.0.1:8188")
5252

5353
# Execute workflow
5454
result = await kit.execute(
@@ -66,6 +66,8 @@ async def main():
6666
asyncio.run(main())
6767
```
6868

69+
> 💡 **Tip**: `comfyui_url` defaults to `http://127.0.0.1:8188` and can be omitted
70+
6971
## Understanding the Results
7072

7173
When you execute a workflow, ComfyKit returns an `ExecuteResult` object:

docs/en/usage/basic.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ The most basic usage is to execute a local workflow file:
77
```python
88
from comfykit import ComfyKit
99

10+
# Connect to local ComfyUI (default: http://127.0.0.1:8188)
1011
kit = ComfyKit()
1112

1213
# Execute local workflow file

docs/zh/index.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,14 @@
4747
```python
4848
from comfykit import ComfyKit
4949

50-
kit = ComfyKit()
50+
# Connect to local ComfyUI server
51+
kit = ComfyKit(comfyui_url="http://127.0.0.1:8188")
5152
result = await kit.execute("workflow.json", {"prompt": "a cute cat"})
5253

5354
print(result.images) # ['http://127.0.0.1:8188/view?filename=cat_001.png']
55+
56+
# 🌐 Or use RunningHub cloud (no local GPU needed)
57+
# kit = ComfyKit(runninghub_api_key="rh-xxx")
5458
```
5559

5660
### 获得结构化的返回数据

docs/zh/quick-start.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ import asyncio
4747
from comfykit import ComfyKit
4848

4949
async def main():
50-
# 初始化(使用默认配置)
51-
kit = ComfyKit()
50+
# Connect to local ComfyUI (default: http://127.0.0.1:8188)
51+
kit = ComfyKit(comfyui_url="http://127.0.0.1:8188")
5252

5353
# 执行 workflow
5454
result = await kit.execute(
@@ -66,6 +66,8 @@ async def main():
6666
asyncio.run(main())
6767
```
6868

69+
> 💡 **提示**`comfyui_url` 默认为 `http://127.0.0.1:8188`,可省略此参数
70+
6971
## 理解返回结果
7072

7173
当你执行一个 workflow 时,ComfyKit 会返回一个 `ExecuteResult` 对象:

docs/zh/usage/basic.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
```python
88
from comfykit import ComfyKit
99

10+
# Connect to local ComfyUI (default: http://127.0.0.1:8188)
1011
kit = ComfyKit()
1112

1213
# 执行本地 workflow 文件

0 commit comments

Comments
 (0)