ComfyUI导出API接口
Reverse Lv4

导出API接口

访问网页,依次点击: 设置 -> 开发者模式 -> 启用

然后打开你需要导出的工作流,点击导出API,就能下载一个JSON文件,这个文件包含了工作流的所有信息,包括节点、参数、输出等。

咱需要做的就是找到自己要修改的参数,改好后发送请求即可,比如我的:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
{
"60": {
"inputs": {
"filename_prefix": "ComfyUI",
"images": [
"102:8",
0
]
},
"class_type": "SaveImage",
"_meta": {
"title": "保存图像"
}
},
"78": {
"inputs": {
"image": "123.jpg"
},
"class_type": "LoadImage",
"_meta": {
"title": "加载图像"
}
},
"93": {
"inputs": {
"upscale_method": "lanczos",
"megapixels": 1.5,
"resolution_steps": 1,
"image": [
"78",
0
]
},
"class_type": "ImageScaleToTotalPixels",
"_meta": {
"title": "缩放图像(像素)"
}
},
"102:39": {
"inputs": {
"vae_name": "qwen_image_vae.safetensors"
},
"class_type": "VAELoader",
"_meta": {
"title": "加载VAE"
}
},
"102:77": {
"inputs": {
"prompt": "",
"clip": [
"102:38",
0
],
"vae": [
"102:39",
0
],
"image": [
"78",
0
]
},
"class_type": "TextEncodeQwenImageEdit",
"_meta": {
"title": "文本编码(QwenImageEdit)"
}
},
"102:75": {
"inputs": {
"strength": 1,
"model": [
"102:66",
0
]
},
"class_type": "CFGNorm",
"_meta": {
"title": "CFG归一化"
}
},
"102:66": {
"inputs": {
"shift": 3,
"model": [
"102:89",
0
]
},
"class_type": "ModelSamplingAuraFlow",
"_meta": {
"title": "采样算法(AuraFlow)"
}
},
"102:8": {
"inputs": {
"samples": [
"102:3",
0
],
"vae": [
"102:39",
0
]
},
"class_type": "VAEDecode",
"_meta": {
"title": "VAE解码"
}
},
"102:37": {
"inputs": {
"unet_name": "qwen_image_edit_fp8_e4m3fn.safetensors",
"weight_dtype": "default"
},
"class_type": "UNETLoader",
"_meta": {
"title": "UNet加载器"
}
},
"102:38": {
"inputs": {
"clip_name": "qwen_2.5_vl_7b_fp8_scaled.safetensors",
"type": "qwen_image",
"device": "default"
},
"class_type": "CLIPLoader",
"_meta": {
"title": "加载CLIP"
}
},
"102:88": {
"inputs": {
"pixels": [
"78",
0
],
"vae": [
"102:39",
0
]
},
"class_type": "VAEEncode",
"_meta": {
"title": "VAE编码"
}
},
"102:89": {
"inputs": {
"lora_name": "Qwen-Image-Edit-Lightning-4steps-V1.0-bf16.safetensors",
"strength_model": 1,
"model": [
"102:37",
0
]
},
"class_type": "LoraLoaderModelOnly",
"_meta": {
"title": "LoRA加载器(仅模型)"
}
},
"102:3": {
"inputs": {
"seed": 367727343727927,
"steps": 4,
"cfg": 1,
"sampler_name": "euler",
"scheduler": "simple",
"denoise": 1,
"model": [
"102:75",
0
],
"positive": [
"102:76",
0
],
"negative": [
"102:77",
0
],
"latent_image": [
"102:88",
0
]
},
"class_type": "KSampler",
"_meta": {
"title": "K采样器"
}
},
"102:76": {
"inputs": {
"prompt": "A dynamic split-level water surface view. A large Bass fish with mouth wide open is explosively jumping out of the water, aiming directly at the dangling fish hook. The fish's open mouth is just inches away from the hook, closing in fast. Water splashes and droplets are frozen around them. The fish hook is in sharp focus, keeping its metallic texture. The fish is slightly blurred due to fast motion, but clearly interacting with the hook. Keep the fish hook strictly unchanged and sharp as the focal point.",
"clip": [
"102:38",
0
],
"vae": [
"102:39",
0
],
"image": [
"78",
0
]
},
"class_type": "TextEncodeQwenImageEdit",
"_meta": {
"title": "文本编码(QwenImageEdit)"
}
}
}