{"id":3668,"date":"2026-04-23T11:13:14","date_gmt":"2026-04-23T02:13:14","guid":{"rendered":"https:\/\/persc.jp\/blog\/?p=3668"},"modified":"2026-04-23T15:29:25","modified_gmt":"2026-04-23T06:29:25","slug":"comfyui-headless-cli","status":"publish","type":"post","link":"https:\/\/persc.jp\/blog\/comfyui-headless-cli\/","title":{"rendered":"ComfyUI\u30d8\u30c3\u30c9\u30ec\u30b9\u30e2\u30fc\u30c9\u30fbCLI\u5b9f\u884c\u30ac\u30a4\u30c9\uff5cGUI\u306a\u3057\u3067\u5b9f\u52d9\u30d0\u30c3\u30c1\u81ea\u52d5\u5316"},"content":{"rendered":"<p>ComfyUI\uff08\u30ce\u30fc\u30c9\u3092\u3064\u306a\u3044\u3067\u753b\u50cf\u751f\u6210AI\u3092\u52d5\u304b\u3059\u30c4\u30fc\u30eb\uff09\u306f\u9ad8\u6a5f\u80fd\u306a\u30ce\u30fc\u30c9\u30d9\u30fc\u30b9\u306eUI\u304c\u9b45\u529b\u3067\u3059\u304c\u3001\u5b9f\u904b\u7528\u3067\u306fGUI\u3092\u4f7f\u308f\u305a\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u304b\u3089\u52d5\u304b\u3057\u305f\u3044\u5834\u9762\u304c\u5c11\u306a\u304f\u3042\u308a\u307e\u305b\u3093\u3002\u30b5\u30fc\u30d0\u30fc\u4e0a\u3067\u5927\u91cf\u306e\u753b\u50cf\u3092\u30d0\u30c3\u30c1\u751f\u6210\u3059\u308b\u3068\u304d\u3001\u30d6\u30e9\u30a6\u30b6\u3092\u958b\u304f\u5fc5\u8981\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u3002\u30af\u30e9\u30a6\u30c9GPU\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3084CI\/CD\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u3067\u306e\u5229\u7528\u3082\u540c\u69d8\u3067\u3059\u3002<\/p>\n<p>ComfyUI\u306e\u30d8\u30c3\u30c9\u30ec\u30b9\u30e2\u30fc\u30c9\u3092\u4f7f\u3048\u3070\u3001GUI\u306a\u3057\u3067\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u3092API\u304b\u3089\u9001\u4fe1\u3057\u3001\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u64cd\u4f5c\u3060\u3051\u3067\u753b\u50cf\u751f\u6210\u3092\u5b8c\u7d50\u3067\u304d\u307e\u3059\u3002\u30b5\u30fc\u30d0\u30fc\u30ea\u30bd\u30fc\u30b9\u306e\u7bc0\u7d04\u306b\u3082\u3064\u306a\u304c\u308b\u5b9f\u7528\u7684\u306a\u904b\u7528\u624b\u6cd5\u3067\u3059\u3002<\/p>\n<p>\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001ComfyUI\u3092\u30d8\u30c3\u30c9\u30ec\u30b9\u30e2\u30fc\u30c9\u3067\u8d77\u52d5\u3059\u308b\u65b9\u6cd5\u304b\u3089\u3001\u516c\u5f0f<code>comfy-cli<\/code>\u306e\u6d3b\u7528\u3001API\u7d4c\u7531\u3067\u306e\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u5b9f\u884c\u3001cron\u3084\u30bf\u30b9\u30af\u30b9\u30b1\u30b8\u30e5\u30fc\u30e9\u3068\u306e\u9023\u643a\u3001\u3055\u3089\u306b\u30b5\u30fc\u30d0\u30fc\u3067\u306e\u5e38\u6642\u7a3c\u50cd\u8a2d\u5b9a\u307e\u3067\u3001\u6bb5\u968e\u7684\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n<h2>\u30d8\u30c3\u30c9\u30ec\u30b9\u30e2\u30fc\u30c9\u3068\u306f\uff5cComfyUI\u3092GUI\u306a\u3057\u3067\u52d5\u304b\u3059\u30e1\u30ea\u30c3\u30c8<\/h2>\n<p>\u30d8\u30c3\u30c9\u30ec\u30b9\u30e2\u30fc\u30c9\u306f\u3001\u30d6\u30e9\u30a6\u30b6GUI\u3092\u8d77\u52d5\u305b\u305a\u306bComfyUI\u306e\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u3060\u3051\u3092\u52d5\u304b\u3059\u904b\u7528\u65b9\u6cd5\u3067\u3059\u3002\u3053\u3053\u3067\u306f3\u3064\u306e\u4e3b\u8981\u5229\u70b9\u3068\u3001\u5b9f\u969b\u306b\u6d3b\u7528\u3055\u308c\u308b\u30b7\u30fc\u30f3\u3092\u9806\u306b\u6574\u7406\u3057\u307e\u3059\u3002<\/p>\n<h3>GUI\u30ec\u30b9\u3067\u52d5\u4f5c\u3055\u305b\u308b3\u3064\u306e\u5229\u70b9<\/h3>\n<p>ComfyUI\u306e\u30d8\u30c3\u30c9\u30ec\u30b9\u30e2\u30fc\u30c9\u3068\u306f\u3001\u30d6\u30e9\u30a6\u30b6\u306eGUI\u3092\u8d77\u52d5\u305b\u305a\u306b\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u30b5\u30fc\u30d0\u30fc\u3060\u3051\u3092\u7a3c\u50cd\u3055\u305b\u308b\u904b\u7528\u65b9\u6cd5\u3067\u3059\u3002\u901a\u5e38\u306f\u30d6\u30e9\u30a6\u30b6\u304c\u81ea\u52d5\u3067\u958b\u304d\u307e\u3059\u304c\u3001\u30d8\u30c3\u30c9\u30ec\u30b9\u30e2\u30fc\u30c9\u3067\u306f\u3053\u306e\u52d5\u4f5c\u3092\u6291\u5236\u3057\u307e\u3059\u3002<\/p>\n<p>\u53b3\u5bc6\u306b\u306f\u3001\u30d8\u30c3\u30c9\u30ec\u30b9\u904b\u7528\u306f3\u3064\u306e\u5c64\u306b\u6574\u7406\u3067\u304d\u307e\u3059\u30021\u5c64\u76ee\u304c\u8d77\u52d5\u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u3088\u308b\u30d6\u30e9\u30a6\u30b6\u81ea\u52d5\u8d77\u52d5\u6291\u6b62\u30012\u5c64\u76ee\u304c\u516c\u5f0f<code>comfy-cli<\/code>\u3067\u306eCLI\u5b8c\u7d50\u904b\u7528\u30013\u5c64\u76ee\u304cComfyUI\u30b5\u30fc\u30d0\u30fc\u3092\u7acb\u3061\u4e0a\u3052\u306a\u3044\u30b9\u30bf\u30f3\u30c9\u30a2\u30ed\u30f3\u30b9\u30af\u30ea\u30d7\u30c8\u5316\u3067\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3067\u306f1\u5c64\u76ee\u30682\u5c64\u76ee\u3092\u4e2d\u5fc3\u306b\u30013\u5c64\u76ee\u306b\u306f\u7c21\u5358\u306b\u89e6\u308c\u307e\u3059\u3002<\/p>\n<p>GUI\u3092\u4f7f\u308f\u306a\u3044\u904b\u7528\u306b\u306f\u3001\u4e3b\u306b3\u3064\u306e\u30e1\u30ea\u30c3\u30c8\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>1\u3064\u76ee\u306f\u30ea\u30bd\u30fc\u30b9\u306e\u7bc0\u7d04\u3067\u3059\u3002\u30d6\u30e9\u30a6\u30b6\u3092\u8d77\u52d5\u3057\u306a\u3044\u305f\u3081\u3001GPU\u30e1\u30e2\u30ea\u3084CPU\u30ea\u30bd\u30fc\u30b9\u3092\u753b\u50cf\u751f\u6210\u306b\u96c6\u4e2d\u3067\u304d\u307e\u3059\u3002\u7279\u306bVRAM\uff08GPU\u306e\u4f5c\u696d\u30e1\u30e2\u30ea\uff09\u304c\u9650\u3089\u308c\u308b\u30af\u30e9\u30a6\u30c9GPU\u74b0\u5883\u3067\u306f\u5927\u304d\u306a\u5dee\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>2\u3064\u76ee\u306f\u81ea\u52d5\u5316\u3068\u306e\u89aa\u548c\u6027\u3067\u3059\u3002\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u304b\u3089\u8d77\u52d5\u30fb\u5b9f\u884c\u3067\u304d\u308b\u305f\u3081\u3001\u30b9\u30af\u30ea\u30d7\u30c8\u3084\u30b9\u30b1\u30b8\u30e5\u30fc\u30e9\u3068\u306e\u7d44\u307f\u5408\u308f\u305b\u304c\u5bb9\u6613\u306b\u306a\u308a\u307e\u3059\u3002\u4eba\u624b\u3092\u4ecb\u3055\u306a\u3044\u5b8c\u5168\u81ea\u52d5\u306e\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u304c\u69cb\u7bc9\u3067\u304d\u308b\u70b9\u304c\u5f37\u307f\u3067\u3059\u3002<\/p>\n<p>3\u3064\u76ee\u306f\u30ea\u30e2\u30fc\u30c8\u904b\u7528\u306e\u3057\u3084\u3059\u3055\u3067\u3059\u3002SSH\u3067\u30b5\u30fc\u30d0\u30fc\u306b\u63a5\u7d9a\u3057\u3001CLI\u3060\u3051\u3067\u64cd\u4f5c\u3067\u304d\u308b\u305f\u3081\u3001\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u74b0\u5883\u304c\u306a\u3044Linux\u30b5\u30fc\u30d0\u30fc\u3067\u3082\u554f\u984c\u306a\u304f\u52d5\u304b\u305b\u307e\u3059\u3002<\/p>\n<h3>\u60f3\u5b9a\u3055\u308c\u308b\u6d3b\u7528\u30b7\u30fc\u30f3<\/h3>\n<p>\u30d8\u30c3\u30c9\u30ec\u30b9\u5b9f\u884c\u304c\u5f79\u7acb\u3064\u30b7\u30fc\u30f3\u306f\u591a\u5c90\u306b\u308f\u305f\u308a\u307e\u3059\u3002\u4ee3\u8868\u7684\u306a\u3082\u306e\u3092\u6319\u3052\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<ul>\n<li>\u6570\u767e\u679a\u306e\u753b\u50cf\u3092\u591c\u9593\u306b\u307e\u3068\u3081\u3066\u751f\u6210\u3059\u308b\u30d0\u30c3\u30c1\u51e6\u7406<\/li>\n<li>GitHub Actions\u306a\u3069\u306eCI\/CD\u3067\u753b\u50cf\u30a2\u30bb\u30c3\u30c8\u3092\u81ea\u52d5\u751f\u6210\u3059\u308b\u30ef\u30fc\u30af\u30d5\u30ed\u30fc<\/li>\n<li>\u30af\u30e9\u30a6\u30c9GPU\u30b5\u30fc\u30d0\u30fc\u4e0a\u3067\u306e\u5e38\u6642\u7a3c\u50cd\u30b5\u30fc\u30d3\u30b9<\/li>\n<li>cron\u3084\u30bf\u30b9\u30af\u30b9\u30b1\u30b8\u30e5\u30fc\u30e9\u306b\u3088\u308b\u5b9a\u6642\u5b9f\u884c<\/li>\n<\/ul>\n<p>\u5b9f\u52d9\u3067\u306f\u3001\u5efa\u7bc9\u30d1\u30fc\u30b9\u306e\u30d0\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u3092\u5927\u91cf\u306b\u751f\u6210\u3059\u308b\u5834\u9762\u3067\u30d8\u30c3\u30c9\u30ec\u30b9\u30e2\u30fc\u30c9\u304c\u5f79\u7acb\u3061\u307e\u3059\u3002\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u7528\u610f\u3057\u3066\u304a\u3051\u3070\u3001\u5c31\u696d\u5f8c\u306b\u81ea\u52d5\u3067\u51e6\u7406\u3092\u56de\u305b\u308b\u304b\u3089\u3067\u3059\u3002<\/p>\n<h2>ComfyUI\u30d8\u30c3\u30c9\u30ec\u30b9\u8d77\u52d5\u306e\u57fa\u672c\u8a2d\u5b9a<\/h2>\n<p>\u30d8\u30c3\u30c9\u30ec\u30b9\u904b\u7528\u306e\u7b2c\u4e00\u6b69\u306f\u3001\u8d77\u52d5\u6642\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u6307\u5b9a\u306b\u3042\u308a\u307e\u3059\u3002\u3053\u3053\u3067\u306f<code>--disable-auto-launch<\/code>\u304b\u3089\u59cb\u307e\u308a\u3001\u516c\u5f0fcomfy-cli\u3084<code>--listen<\/code>\/<code>--port<\/code>\u3068\u3044\u3063\u305f\u4e3b\u8981\u30aa\u30d7\u30b7\u30e7\u30f3\u307e\u3067\u3092\u9806\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n<h3>&#8211;disable-auto-launch\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u8d77\u52d5\u3059\u308b<\/h3>\n<p>ComfyUI\u3092\u30d8\u30c3\u30c9\u30ec\u30b9\u30e2\u30fc\u30c9\u3067\u8d77\u52d5\u3059\u308b\u6700\u3082\u30b7\u30f3\u30d7\u30eb\u306a\u65b9\u6cd5\u306f\u3001<code>--disable-auto-launch<\/code>\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4ed8\u3051\u308b\u3053\u3068\u3067\u3059\u3002\u3053\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u6307\u5b9a\u3059\u308b\u3068\u3001\u8d77\u52d5\u6642\u306b\u30d6\u30e9\u30a6\u30b6\u304c\u81ea\u52d5\u3067\u958b\u304b\u306a\u304f\u306a\u308a\u307e\u3059\uff082026\u5e744\u6708\u73fe\u5728\uff09\u3002<\/p>\n<pre><code class=\"language-bash\">python main.py --disable-auto-launch\n<\/code><\/pre>\n<p>\u8d77\u52d5\u5f8c\u3082API\u30b5\u30fc\u30d0\u30fc\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u3067<code>http:\/\/127.0.0.1:8188<\/code>\u3067\u5f85\u3061\u53d7\u3051\u307e\u3059\u3002\u30d6\u30e9\u30a6\u30b6\u304c\u958b\u304b\u306a\u3044\u3060\u3051\u3067\u3001\u30b5\u30fc\u30d0\u30fc\u6a5f\u80fd\u306f\u3059\u3079\u3066\u5229\u7528\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<h3>\u516c\u5f0fcomfy-cli\u3067CLI\u3092\u4e00\u672c\u5316\u3059\u308b<\/h3>\n<p>Comfy-Org\u304c\u63d0\u4f9b\u3059\u308b\u516c\u5f0fCLI\u30c4\u30fc\u30eb<code>comfy-cli<\/code>\u3092\u4f7f\u3046\u3068\u3001\u74b0\u5883\u69cb\u7bc9\u304b\u3089\u8d77\u52d5\u307e\u3067\u30b3\u30de\u30f3\u30c9\u4e00\u672c\u3067\u5b8c\u7d50\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-bash\"># \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\npip install comfy-cli\n\n# ComfyUI\u672c\u4f53\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\ncomfy install\n\n# \u30e2\u30c7\u30eb\u306e\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\ncomfy model download --url &lt;\u30e2\u30c7\u30ebURL&gt;\n\n# \u30ab\u30b9\u30bf\u30e0\u30ce\u30fc\u30c9\u306e\u8ffd\u52a0\ncomfy node install &lt;\u30ce\u30fc\u30c9\u540d&gt;\n\n# \u30d8\u30c3\u30c9\u30ec\u30b9\u8d77\u52d5\ncomfy launch -- --disable-auto-launch\n<\/code><\/pre>\n<p><code>comfy launch<\/code>\u306b\u7d9a\u304f<code>--<\/code>\u4ee5\u964d\u306e\u5f15\u6570\u306f\u3001\u5185\u90e8\u3067ComfyUI\u672c\u4f53\u306b\u6e21\u3055\u308c\u307e\u3059\u3002\u30e2\u30c7\u30eb\u3084\u30ab\u30b9\u30bf\u30e0\u30ce\u30fc\u30c9\u306e\u7ba1\u7406\u3082GUI\u3092\u958b\u304b\u305a\u306b\u9032\u3081\u3089\u308c\u308b\u305f\u3081\u3001\u30b5\u30fc\u30d0\u30fc\u74b0\u5883\u3067\u306e\u69cb\u7bc9\u4f5c\u696d\u304c\u5927\u5e45\u306b\u7c21\u7565\u5316\u3055\u308c\u307e\u3059\u3002<\/p>\n<h3>&#8211;listen\u3068&#8211;port\u3067\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u8a2d\u5b9a\u3059\u308b<\/h3>\n<p>\u30ed\u30fc\u30ab\u30eb\u30de\u30b7\u30f3\u4ee5\u5916\u304b\u3089API\u306b\u30a2\u30af\u30bb\u30b9\u3057\u305f\u3044\u5834\u5408\u306f\u3001<code>--listen<\/code>\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u30ea\u30c3\u30b9\u30f3\u30a2\u30c9\u30ec\u30b9\u3092\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-bash\">python main.py --disable-auto-launch --listen 0.0.0.0 --port 8188\n<\/code><\/pre>\n<p><code>--listen 0.0.0.0<\/code>\u3092\u6307\u5b9a\u3059\u308b\u3068\u3001\u3059\u3079\u3066\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u304b\u3089\u306e\u63a5\u7d9a\u3092\u53d7\u3051\u4ed8\u3051\u307e\u3059\u3002<code>--port<\/code>\u3067\u30dd\u30fc\u30c8\u756a\u53f7\u306e\u5909\u66f4\u3082\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p>\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u306e\u89b3\u70b9\u304b\u3089\u3001\u5916\u90e8\u516c\u958b\u3059\u308b\u5834\u5408\u306f\u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb\u3084\u30ea\u30d0\u30fc\u30b9\u30d7\u30ed\u30ad\u30b7\u306e\u8a2d\u5b9a\u3092\u5fc5\u305a\u4f75\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u8a8d\u8a3c\u306a\u3057\u3067API\u304c\u516c\u958b\u3055\u308c\u308b\u3068\u3001\u7b2c\u4e09\u8005\u306b\u4e0d\u6b63\u5229\u7528\u3055\u308c\u308b\u30ea\u30b9\u30af\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<h3>\u305d\u306e\u307b\u304b\u306e\u4e3b\u8981\u306a\u8d77\u52d5\u30aa\u30d7\u30b7\u30e7\u30f3<\/h3>\n<p>\u30d8\u30c3\u30c9\u30ec\u30b9\u904b\u7528\u3067\u77e5\u3063\u3066\u304a\u304d\u305f\u3044\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u307e\u3068\u3081\u307e\u3059\uff082026\u5e744\u6708\u6642\u70b9\u3067\u63d0\u4f9b\u3055\u308c\u3066\u3044\u308b\u4e3b\u8981\u30aa\u30d7\u30b7\u30e7\u30f3\uff09\u3002<\/p>\n<table>\n<thead>\n<tr>\n<th>\u30aa\u30d7\u30b7\u30e7\u30f3<\/th>\n<th>\u52b9\u679c<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>--cpu<\/code><\/td>\n<td>GPU\u3092\u4f7f\u308f\u305aCPU\u306e\u307f\u3067\u5b9f\u884c<\/td>\n<\/tr>\n<tr>\n<td><code>--highvram<\/code><\/td>\n<td>VRAM\u4f7f\u7528\u91cf\u306e\u4e0a\u9650\u3092\u5f15\u304d\u4e0a\u3052<\/td>\n<\/tr>\n<tr>\n<td><code>--lowvram<\/code><\/td>\n<td>VRAM\u4f7f\u7528\u91cf\u3092\u6291\u3048\u3066\u5b9f\u884c<\/td>\n<\/tr>\n<tr>\n<td><code>--disable-api-nodes<\/code><\/td>\n<td>API\u30ce\u30fc\u30c9\u306e\u8aad\u307f\u8fbc\u307f\u3092\u7121\u52b9\u5316<\/td>\n<\/tr>\n<tr>\n<td><code>--preview-method none<\/code><\/td>\n<td>\u30d7\u30ec\u30d3\u30e5\u30fc\u751f\u6210\u3092\u7121\u52b9\u5316\u3057\u901f\u5ea6\u3092\u512a\u5148<\/td>\n<\/tr>\n<tr>\n<td><code>--quick-test-for-ci<\/code><\/td>\n<td>CI\u5411\u3051\u306e\u30df\u30cb\u30de\u30e0\u8d77\u52d5\uff08\u52d5\u4f5c\u78ba\u8a8d\u7528\uff09<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u30b5\u30fc\u30d0\u30fc\u904b\u7528\u3067\u306f<code>--preview-method none<\/code>\u3092\u4f75\u7528\u3059\u308b\u3068\u3001\u30d7\u30ec\u30d3\u30e5\u30fc\u753b\u50cf\u306e\u751f\u6210\u3092\u30b9\u30ad\u30c3\u30d7\u3067\u304d\u307e\u3059\u3002GUI\u3067\u78ba\u8a8d\u3057\u306a\u3044\u306a\u3089\u4e0d\u8981\u306a\u51e6\u7406\u306e\u305f\u3081\u3001\u308f\u305a\u304b\u3067\u3059\u304c\u901f\u5ea6\u5411\u4e0a\u304c\u898b\u8fbc\u3081\u307e\u3059\u3002CI\u74b0\u5883\u3067\u8efd\u304f\u758e\u901a\u3060\u3051\u53d6\u308a\u305f\u3044\u5834\u5408\u306f\u3001<code>--quick-test-for-ci<\/code>\u304c\u5f79\u7acb\u3061\u307e\u3059\u3002<\/p>\n<h2>API\u7d4c\u7531\u3067\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u3092\u5b9f\u884c\u3059\u308b\u624b\u9806<\/h2>\n<p>\u30d8\u30c3\u30c9\u30ec\u30b9\u306e\u771f\u4fa1\u304c\u767a\u63ee\u3055\u308c\u308b\u306e\u306f\u3001API\u7d4c\u7531\u3067\u306e\u81ea\u52d5\u5b9f\u884c\u3067\u3059\u3002\u3053\u3053\u3067\u306f\u4e3b\u8981\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c85\u7a2e\u3092\u62bc\u3055\u3048\u305f\u3046\u3048\u3067\u3001JSON\u66f8\u304d\u51fa\u3057\u30fb\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u306e\u9001\u4fe1\u30fb\u7d50\u679c\u53d6\u5f97\u30fb\u9032\u6357\u76e3\u8996\u307e\u3067\u3092\u9806\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n<h3>\u4e3b\u8981\u306aAPI\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c85\u7a2e<\/h3>\n<p>ComfyUI\u304c\u63d0\u4f9b\u3059\u308b\u4e3b\u306aAPI\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u306f\u6b21\u306e5\u7a2e\u985e\u3067\u3059\uff08\u516c\u5f0fDocs\u306e<a href=\"https:\/\/docs.comfy.org\/development\/comfyui-server\/comms_routes\">ComfyUI Routes<\/a>\u53c2\u7167\u30012026\u5e744\u6708\u73fe\u5728\uff09\u3002<\/p>\n<table>\n<thead>\n<tr>\n<th>\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8<\/th>\n<th>\u5f79\u5272<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>POST \/prompt<\/code><\/td>\n<td>\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u3092\u30ad\u30e5\u30fc\u306b\u6295\u5165\u3057\u3066\u5b9f\u884c<\/td>\n<\/tr>\n<tr>\n<td><code>GET \/ws<\/code><\/td>\n<td>WebSocket\u3067\u9032\u6357\u30fb\u7d50\u679c\u3092\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u53d7\u4fe1<\/td>\n<\/tr>\n<tr>\n<td><code>GET \/history\/{prompt_id}<\/code><\/td>\n<td>\u5b9f\u884c\u7d50\u679c\u3068\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u53d6\u5f97<\/td>\n<\/tr>\n<tr>\n<td><code>GET \/view<\/code><\/td>\n<td>\u751f\u6210\u753b\u50cf\u3092HTTP\u3067\u53d6\u5f97<\/td>\n<\/tr>\n<tr>\n<td><code>POST \/upload\/{image_type}<\/code><\/td>\n<td>\u5165\u529b\u753b\u50cf\u3092\u30b5\u30fc\u30d0\u30fc\u3078\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u672c\u756a\u904b\u7528\u3067\u306f\u3001<code>\/view<\/code>\u306b\u3088\u308b\u753b\u50cf\u53d6\u5f97\u3068<code>\/upload<\/code>\u306b\u3088\u308b\u5165\u529b\u753b\u50cfPOST\u307e\u3067\u62bc\u3055\u3048\u3066\u304a\u304f\u3068\u3001img2img\u3084ControlNet\uff08\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u30cd\u30c3\u30c8\uff09\u3092\u542b\u3080\u5b9f\u7528\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u3092\u7d44\u3081\u308b\u5e45\u304c\u5e83\u304c\u308a\u307e\u3059\u3002<\/p>\n<h3>\u30ef\u30fc\u30af\u30d5\u30ed\u30fcJSON\u3092API\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3067\u66f8\u304d\u51fa\u3059<\/h3>\n<p>\u30d8\u30c3\u30c9\u30ec\u30b9\u5b9f\u884c\u306e\u6838\u5fc3\u306f\u3001\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u3092JSON\u5f62\u5f0f\u3067API\u306b\u9001\u4fe1\u3059\u308b\u3053\u3068\u3067\u3059\u3002\u307e\u305a\u306f\u5b9f\u884c\u3057\u305f\u3044\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u3092API\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3067\u66f8\u304d\u51fa\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>ComfyUI\u306eGUI\u4e0a\u3067\u6b21\u306e\u624b\u9806\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<ol>\n<li>\u8a2d\u5b9a\u753b\u9762\u3067\u300cDev Mode Options\u300d\u3092\u6709\u52b9\u306b\u3059\u308b<\/li>\n<li>\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u3092\u69cb\u7bc9\u30fb\u30c6\u30b9\u30c8\u3059\u308b<\/li>\n<li>\u30e1\u30cb\u30e5\u30fc\u304b\u3089\u300cSave (API format)\u300d\u3092\u9078\u629e\u3057\u3066\u4fdd\u5b58\u3059\u308b<\/li>\n<\/ol>\n<p>\u66f8\u304d\u51fa\u3055\u308c\u305fJSON\u30d5\u30a1\u30a4\u30eb\u306b\u306f\u3001\u5404\u30ce\u30fc\u30c9\u306eID\u3001\u30af\u30e9\u30b9\u540d\u3001\u5165\u529b\u5024\u304c\u3059\u3079\u3066\u542b\u307e\u308c\u307e\u3059\u3002\u3053\u306eJSON\u3092API\u30ea\u30af\u30a8\u30b9\u30c8\u306e\u30dc\u30c7\u30a3\u3068\u3057\u3066\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<h3>curl\u3084Python\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u3092\u9001\u4fe1\u3059\u308b<\/h3>\n<p>\u30ef\u30fc\u30af\u30d5\u30ed\u30fcJSON\u304c\u7528\u610f\u3067\u304d\u305f\u3089\u3001<code>POST \/prompt<\/code>\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u306b\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u9001\u4fe1\u3057\u307e\u3059\u3002curl\u3092\u4f7f\u3063\u305f\u6700\u3082\u30b7\u30f3\u30d7\u30eb\u306a\u4f8b\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<pre><code class=\"language-bash\">curl -X POST http:\/\/127.0.0.1:8188\/prompt \n  -H &quot;Content-Type: application\/json&quot; \n  -d '{&quot;prompt&quot;: &lt;\u30ef\u30fc\u30af\u30d5\u30ed\u30fcJSON&gt;}'\n<\/code><\/pre>\n<p>Python\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u9001\u4fe1\u3059\u308b\u5834\u5408\u306f\u3001requests\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-python\">import json\nimport requests\n\nwith open(&quot;workflow_api.json&quot;, &quot;r&quot;) as f:\n    workflow = json.load(f)\n\nresponse = requests.post(\n    &quot;http:\/\/127.0.0.1:8188\/prompt&quot;,\n    json={&quot;prompt&quot;: workflow}\n)\nprompt_id = response.json()[&quot;prompt_id&quot;]\nprint(f&quot;\u9001\u4fe1\u5b8c\u4e86: {prompt_id}&quot;)\n<\/code><\/pre>\n<p>\u30ec\u30b9\u30dd\u30f3\u30b9\u306b\u542b\u307e\u308c\u308b<code>prompt_id<\/code>\u306f\u3001\u5b9f\u884c\u72b6\u6cc1\u306e\u78ba\u8a8d\u3084\u7d50\u679c\u306e\u53d6\u5f97\u306b\u4f7f\u3046\u91cd\u8981\u306a\u5024\u3067\u3059\u3002<\/p>\n<p>\u8907\u6570\u306e\u30ef\u30fc\u30af\u30d5\u30ed\u30fcJSON\u3092\u30ea\u30b9\u30c8\u5316\u3057\u3001for\u30eb\u30fc\u30d7\u3067\u9023\u7d9a\u9001\u4fe1\u3059\u308b\u30d0\u30c3\u30c1\u30b9\u30af\u30ea\u30d7\u30c8\u304c\u3001\u91cf\u7523\u6642\u306b\u6271\u3044\u3084\u3059\u3044\u5b9f\u88c5\u3067\u3059\u3002\u30b7\u30fc\u30c9\u5024\u3084\u30d7\u30ed\u30f3\u30d7\u30c8\u3060\u3051\u3092\u5909\u3048\u306a\u304c\u3089\u6570\u5341\u679a\u3092\u4e00\u62ec\u751f\u6210\u3059\u308b\u65b9\u6cd5\u304c\u52b9\u7387\u7684\u3067\u3059\u3002<\/p>\n<h3>\u7d50\u679c\u53d6\u5f97\u306f2\u30d1\u30bf\u30fc\u30f3\uff5c\/view\u53d6\u5f97\u304bWebSocket\u30b9\u30c8\u30ea\u30fc\u30df\u30f3\u30b0\u304b<\/h3>\n<p>\u751f\u6210\u7d50\u679c\u3092\u53d7\u3051\u53d6\u308b\u65b9\u6cd5\u306f\u3001\u5927\u304d\u304f2\u30d1\u30bf\u30fc\u30f3\u3042\u308a\u307e\u3059\u3002\u3069\u3061\u3089\u3092\u9078\u3076\u304b\u306f\u904b\u7528\u8981\u4ef6\u3067\u6c7a\u3081\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><strong>\u30d1\u30bf\u30fc\u30f31: SaveImage\u30ce\u30fc\u30c9\uff0b<code>\/view<\/code>\u3067HTTP\u53d6\u5f97<\/strong><\/p>\n<p>\u6a19\u6e96\u306eSaveImage\u30ce\u30fc\u30c9\u3067\u753b\u50cf\u3092\u30b5\u30fc\u30d0\u30fc\u306eoutput\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u4fdd\u5b58\u3057\u3001<code>\/history\/{prompt_id}<\/code>\u3067\u30d5\u30a1\u30a4\u30eb\u540d\u3092\u53d6\u5f97\u3057\u305f\u3046\u3048\u3067<code>\/view<\/code>\u304b\u3089\u753b\u50cf\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u6d41\u308c\u3067\u3059\u3002\u6c38\u7d9a\u30d5\u30a1\u30a4\u30eb\u304c\u6b8b\u308b\u305f\u3081\u30c7\u30d0\u30c3\u30b0\u3057\u3084\u3059\u304f\u3001\u904b\u7528\u5074\u3067\u5c65\u6b74\u3092\u8ffd\u3044\u3084\u3059\u3044\u5229\u70b9\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-bash\"># \u5c65\u6b74\u304b\u3089\u51fa\u529b\u30d5\u30a1\u30a4\u30eb\u540d\u3092\u78ba\u8a8d\ncurl http:\/\/127.0.0.1:8188\/history\/&lt;prompt_id&gt;\n\n# \/view \u3067\u753b\u50cf\u3092\u53d6\u5f97\ncurl &quot;http:\/\/127.0.0.1:8188\/view?filename=&lt;\u30d5\u30a1\u30a4\u30eb\u540d&gt;&amp;type=output&quot; \n  -o result.png\n<\/code><\/pre>\n<p><strong>\u30d1\u30bf\u30fc\u30f32: SaveImageWebsocket\u30ce\u30fc\u30c9\uff0bWebSocket\u30b9\u30c8\u30ea\u30fc\u30df\u30f3\u30b0<\/strong><\/p>\n<p>SaveImageWebsocket\u30ce\u30fc\u30c9\u3092\u4f7f\u3046\u3068\u3001\u753b\u50cf\u30d0\u30a4\u30ca\u30ea\u304cWebSocket\u7d4c\u7531\u3067\u76f4\u63a5\u9001\u3089\u308c\u3066\u304d\u307e\u3059\u3002\u30c7\u30a3\u30b9\u30af\u306b\u66f8\u304d\u51fa\u3055\u305a\u30e1\u30e2\u30ea\u3067\u51e6\u7406\u3067\u304d\u308b\u305f\u3081\u3001\u77ed\u547d\u30bf\u30b9\u30af\u3092\u5927\u91cf\u306b\u634c\u304fAPI\u30b5\u30fc\u30d3\u30b9\u7528\u9014\u3084\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u5bb9\u91cf\u3092\u7bc0\u7d04\u3057\u305f\u3044\u5834\u9762\u306b\u5411\u304d\u307e\u3059\u3002<\/p>\n<h3>WebSocket\u3067\u9032\u6357\u3092\u76e3\u8996\u3059\u308b<\/h3>\n<p>\u5b9f\u884c\u306e\u9032\u6357\u3092\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u3067\u8ffd\u8de1\u3059\u308b\u306b\u306f\u3001<code>\/ws<\/code>\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u3078\u306eWebSocket\u63a5\u7d9a\u3092\u5229\u7528\u3057\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-python\">import websocket\nimport json\n\nws = websocket.WebSocket()\nws.connect(&quot;ws:\/\/127.0.0.1:8188\/ws&quot;)\n\nwhile True:\n    message = json.loads(ws.recv())\n    if message[&quot;type&quot;] == &quot;executing&quot;:\n        node = message[&quot;data&quot;].get(&quot;node&quot;)\n        if node is None:\n            print(&quot;\u5b9f\u884c\u5b8c\u4e86&quot;)\n            break\n        print(f&quot;\u5b9f\u884c\u4e2d: \u30ce\u30fc\u30c9 {node}&quot;)\n<\/code><\/pre>\n<p><code>executing<\/code>\u30e1\u30c3\u30bb\u30fc\u30b8\u306e<code>node<\/code>\u304c<code>None<\/code>\u306b\u306a\u3063\u305f\u30bf\u30a4\u30df\u30f3\u30b0\u304c\u5b9f\u884c\u5b8c\u4e86\u306e\u5408\u56f3\u306b\u306a\u308a\u307e\u3059\u3002\u9577\u6642\u9593\u30d0\u30c3\u30c1\u3067\u3082\u9032\u6357\u3092\u30ed\u30b0\u306b\u6b8b\u3057\u3084\u3059\u3044\u69cb\u9020\u3067\u3059\u3002<\/p>\n<h3>\u30b5\u30fc\u30d0\u30fc\u3092\u7acb\u3066\u305a\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u5358\u72ec\u5b9f\u884c\u3059\u308b\uff08\u4e0a\u7d1a\uff09<\/h3>\n<p>ComfyUI\u30b5\u30fc\u30d0\u30fc\u3092\u7acb\u3061\u4e0a\u3052\u305a\u3001Python\u30b9\u30af\u30ea\u30d7\u30c8\u5358\u4f53\u3067\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u3092\u5b9f\u884c\u3059\u308b\u30d1\u30bf\u30fc\u30f3\u3082\u5b58\u5728\u3057\u307e\u3059\u3002\u5185\u90e8API\u306e<code>WorkflowExecutor<\/code>\u3084<code>ExecutionCache<\/code>\u3092\u76f4\u63a5\u547c\u3073\u51fa\u3057\u3066\u30b3\u30fc\u30c9\u304b\u3089\u5b9f\u884c\u3059\u308b\u624b\u6cd5\u3067\u3001HTTP\u30aa\u30fc\u30d0\u30fc\u30d8\u30c3\u30c9\u3092\u6392\u9664\u3067\u304d\u308b\u70b9\u304c\u9b45\u529b\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u305f\u3060\u3057\u3001\u5185\u90e8API\u306f\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u3067\u4ed5\u69d8\u304c\u5909\u308f\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u3001\u66f4\u65b0\u8ffd\u5f93\u306e\u624b\u9593\u304c\u767a\u751f\u3057\u307e\u3059\u3002\u9577\u671f\u904b\u7528\u3067\u306f\u30b5\u30fc\u30d0\u30fc\uff0bAPI\u65b9\u5f0f\u306e\u307b\u3046\u304c\u5b89\u5b9a\u3059\u308b\u3053\u3068\u304c\u591a\u304f\u3001\u672c\u683c\u5c0e\u5165\u306e\u524d\u306b\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u30b3\u30b9\u30c8\u3092\u898b\u7a4d\u3082\u3063\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2>cron\u3084\u30bf\u30b9\u30af\u30b9\u30b1\u30b8\u30e5\u30fc\u30e9\u3067\u5b9a\u6642\u30d0\u30c3\u30c1\u5b9f\u884c\u3059\u308b<\/h2>\n<p>API\u3067\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u3092\u53e9\u3051\u308b\u3088\u3046\u306b\u306a\u308c\u3070\u3001\u6b21\u306e\u30b9\u30c6\u30c3\u30d7\u306f\u5b9a\u6642\u30d0\u30c3\u30c1\u5316\u3067\u3059\u3002\u3053\u3053\u3067\u306fLinux\u306ecron\u306b\u3088\u308b\u5b9a\u671f\u5b9f\u884c\u306e\u8a2d\u5b9a\u3068\u3001Windows\u306e\u30bf\u30b9\u30af\u30b9\u30b1\u30b8\u30e5\u30fc\u30e9\u3067\u306e\u81ea\u52d5\u5316\u65b9\u6cd5\u3092\u9806\u306b\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<h3>Linux\u306ecron\u3067\u5b9a\u671f\u5b9f\u884c\u3092\u8a2d\u5b9a\u3059\u308b<\/h3>\n<p>ComfyUI\u30b5\u30fc\u30d0\u30fc\u304c\u5e38\u6642\u8d77\u52d5\u3057\u3066\u3044\u308b\u524d\u63d0\u3067\u3001cron\u304b\u3089API\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u5b9a\u671f\u9001\u4fe1\u3059\u308b\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<p>\u307e\u305a\u3001\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u3092\u9001\u4fe1\u3059\u308b\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-bash\">#!\/bin\/bash\n# generate.sh\ncurl -s -X POST http:\/\/127.0.0.1:8188\/prompt \n  -H &quot;Content-Type: application\/json&quot; \n  -d @\/path\/to\/workflow_api.json\n<\/code><\/pre>\n<p>\u3053\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3092cron\u306b\u767b\u9332\u3059\u308c\u3070\u3001\u6307\u5b9a\u6642\u523b\u306b\u81ea\u52d5\u3067\u753b\u50cf\u751f\u6210\u304c\u8d70\u308a\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-bash\"># \u6bce\u65e5\u5348\u524d2\u6642\u306b\u5b9f\u884c\n0 2 * * * \/path\/to\/generate.sh &gt;&gt; \/var\/log\/comfyui-batch.log 2&gt;&amp;1\n<\/code><\/pre>\n<p>\u30ed\u30b0\u3092\u30d5\u30a1\u30a4\u30eb\u306b\u51fa\u529b\u3057\u3066\u304a\u304f\u3068\u3001\u5b9f\u884c\u7d50\u679c\u306e\u78ba\u8a8d\u3084\u30a8\u30e9\u30fc\u306e\u8ffd\u8de1\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002<\/p>\n<h3>Windows\u30bf\u30b9\u30af\u30b9\u30b1\u30b8\u30e5\u30fc\u30e9\u3067\u81ea\u52d5\u5316\u3059\u308b<\/h3>\n<p>Windows\u74b0\u5883\u3067\u306f\u3001\u30bf\u30b9\u30af\u30b9\u30b1\u30b8\u30e5\u30fc\u30e9\u3092\u4f7f\u3063\u3066\u540c\u69d8\u306e\u5b9a\u6642\u5b9f\u884c\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p>PowerShell\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u7528\u610f\u3057\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-powershell\"># generate.ps1\n$workflow = Get-Content &quot;C:ComfyUIworkflow_api.json&quot; -Raw\n$body = @{ prompt = ($workflow | ConvertFrom-Json) } | ConvertTo-Json -Depth 100\nInvoke-RestMethod -Uri &quot;http:\/\/127.0.0.1:8188\/prompt&quot; -Method Post -Body $body -ContentType &quot;application\/json&quot;\n<\/code><\/pre>\n<p>\u30bf\u30b9\u30af\u30b9\u30b1\u30b8\u30e5\u30fc\u30e9\u3067\u300c\u57fa\u672c\u30bf\u30b9\u30af\u306e\u4f5c\u6210\u300d\u304b\u3089\u3053\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u767b\u9332\u3059\u308c\u3070\u3001\u6307\u5b9a\u3057\u305f\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u3067\u81ea\u52d5\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002\u5b9f\u52d9\u3067\u306f\u3001\u696d\u52d9\u7d42\u4e86\u5f8c\u306e20\u6642\u306b\u5efa\u7bc9\u30d1\u30fc\u30b9\u306e\u30d0\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u751f\u6210\u3092\u4ed5\u8fbc\u3093\u3067\u304a\u304f\u3068\u3044\u3063\u305f\u4f7f\u3044\u65b9\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>CI\/CD\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u3084\u30b5\u30fc\u30d0\u30fc\u5e38\u6642\u7a3c\u50cd\u306b\u7d44\u307f\u8fbc\u3080<\/h2>\n<p>ComfyUI\u306e\u30d8\u30c3\u30c9\u30ec\u30b9\u904b\u7528\u306f\u3001CI\/CD\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u3084\u30b5\u30fc\u30d0\u30fc\u5e38\u6642\u7a3c\u50cd\u3068\u3044\u3063\u305f\u30d7\u30ed\u30c0\u30af\u30b7\u30e7\u30f3\u904b\u7528\u306b\u3082\u5c55\u958b\u3067\u304d\u307e\u3059\u3002\u3053\u3053\u3067\u306fGitHub Actions\u3067\u306e\u6d3b\u7528\u304b\u3089\u3001systemd\u3067\u306e\u5e38\u6642\u7a3c\u50cd\u8a2d\u5b9a\u307e\u3067\u3092\u9806\u306b\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<h3>GitHub Actions\u3067\u306e\u6d3b\u7528\u3068cm-cli\u306b\u3088\u308b\u30ce\u30fc\u30c9\u540c\u671f<\/h3>\n<p>ComfyUI\u306e\u30d8\u30c3\u30c9\u30ec\u30b9\u5b9f\u884c\u306f\u3001CI\/CD\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u306b\u3082\u7d44\u307f\u8fbc\u3081\u307e\u3059\u3002GitHub Actions\u3067\u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u30d7\u30c3\u30b7\u30e5\u3055\u308c\u305f\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u3092\u81ea\u52d5\u5b9f\u884c\u3057\u3001\u751f\u6210\u753b\u50cf\u3092\u30a2\u30fc\u30c6\u30a3\u30d5\u30a1\u30af\u30c8\u3068\u3057\u3066\u4fdd\u5b58\u3059\u308b\u69cb\u6210\u304c\u4ee3\u8868\u4f8b\u3067\u3059\u3002<\/p>\n<p>\u57fa\u672c\u7684\u306a\u6d41\u308c\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<ol>\n<li>GPU\u5bfe\u5fdc\u306e\u30bb\u30eb\u30d5\u30db\u30b9\u30c8\u30e9\u30f3\u30ca\u30fc\u3092\u7528\u610f\u3059\u308b<\/li>\n<li>ComfyUI-Manager\u4ed8\u5c5e\u306e<code>cm-cli<\/code>\u3067\u30ab\u30b9\u30bf\u30e0\u30ce\u30fc\u30c9\u3092\u5ba3\u8a00\u7684\u306b\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3059\u308b<\/li>\n<li>ComfyUI\u3092\u30d8\u30c3\u30c9\u30ec\u30b9\u30e2\u30fc\u30c9\u3067\u8d77\u52d5\u3059\u308b<\/li>\n<li>\u30ef\u30fc\u30af\u30d5\u30ed\u30fcJSON\u3092API\u306b\u9001\u4fe1\u3059\u308b<\/li>\n<li>\u751f\u6210\u7d50\u679c\u3092\u30a2\u30fc\u30c6\u30a3\u30d5\u30a1\u30af\u30c8\u3068\u3057\u3066\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b<\/li>\n<\/ol>\n<p><code>cm-cli<\/code>\u306fComfyUI\u672c\u4f53\u3092\u8d77\u52d5\u305b\u305a\u30ab\u30b9\u30bf\u30e0\u30ce\u30fc\u30c9\u306e\u4e00\u62ec\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30fb\u66f4\u65b0\u30fb\u7121\u52b9\u5316\u3092\u5b9f\u884c\u3067\u304d\u308b\u305f\u3081\u3001\u30d8\u30c3\u30c9\u30ec\u30b9CI\u74b0\u5883\u3067\u306e\u4f9d\u5b58\u95a2\u4fc2\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u306b\u9069\u3057\u305f\u9078\u629e\u80a2\u3067\u3059\u3002<code>snapshot save<\/code>\u3068<code>snapshot restore<\/code>\u3067\u30ce\u30fc\u30c9\u69cb\u6210\u3092\u30d5\u30a1\u30a4\u30eb\u306b\u30d0\u30fc\u30b8\u30e7\u30f3\u7ba1\u7406\u3067\u304d\u3001\u30e9\u30f3\u30ca\u30fc\u3054\u3068\u306e\u74b0\u5883\u5dee\u5206\u3092\u6291\u3048\u3089\u308c\u307e\u3059\u3002<\/p>\n<p>GPU\u5bfe\u5fdc\u306eCI\u74b0\u5883\u304c\u5fc5\u8981\u306a\u305f\u3081\u3001\u30bb\u30eb\u30d5\u30db\u30b9\u30c8\u30e9\u30f3\u30ca\u30fc\u3084\u30af\u30e9\u30a6\u30c9GPU\u30b5\u30fc\u30d3\u30b9\u3068\u306e\u7d44\u307f\u5408\u308f\u305b\u304c\u73fe\u5b9f\u7684\u306a\u9078\u629e\u80a2\u306b\u306a\u308a\u307e\u3059\u3002ComfyUI\u306eDocker\u904b\u7528\u306b\u3064\u3044\u3066\u306f\u3001<a href=\"https:\/\/persc.jp\/blog\/comfyui-docker-cloud-gpu\/\">ComfyUI Docker\u30fb\u30af\u30e9\u30a6\u30c9GPU\u6d3b\u7528\u30ac\u30a4\u30c9<\/a>\u3067\u8a73\u3057\u304f\u89e3\u8aac\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3>systemd\u30b5\u30fc\u30d3\u30b9\u3068\u3057\u3066\u5e38\u6642\u7a3c\u50cd\u3055\u305b\u308b<\/h3>\n<p>Linux\u30b5\u30fc\u30d0\u30fc\u3067ComfyUI\u3092\u5e38\u6642\u7a3c\u50cd\u3055\u305b\u308b\u306b\u306f\u3001systemd\u306e\u30b5\u30fc\u30d3\u30b9\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3059\u308b\u306e\u304c\u78ba\u5b9f\u3067\u3059\u3002<\/p>\n<pre><code class=\"language-ini\">[Unit]\nDescription=ComfyUI Headless Server\nAfter=network.target\n\n[Service]\nType=simple\nUser=comfyui\nWorkingDirectory=\/opt\/ComfyUI\nEnvironment=PATH=\/opt\/ComfyUI\/venv\/bin:\/usr\/bin\nExecStart=\/opt\/ComfyUI\/venv\/bin\/python main.py --disable-auto-launch --listen 0.0.0.0 --preview-method none\nRestart=on-failure\nRestartSec=10\n\n[Install]\nWantedBy=multi-user.target\n<\/code><\/pre>\n<p>\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u3092<code>\/etc\/systemd\/system\/comfyui.service<\/code>\u306b\u914d\u7f6e\u3057\u3001\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3067\u6709\u52b9\u5316\u3057\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-bash\">sudo systemctl daemon-reload\nsudo systemctl enable comfyui\nsudo systemctl start comfyui\n<\/code><\/pre>\n<p><code>Restart=on-failure<\/code>\u306b\u3088\u308a\u3001\u7570\u5e38\u7d42\u4e86\u3057\u305f\u5834\u5408\u3082\u81ea\u52d5\u3067\u518d\u8d77\u52d5\u3055\u308c\u307e\u3059\u3002\u30ed\u30b0\u306f<code>journalctl -u comfyui<\/code>\u3067\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/persc.jp\/blog\/comfyui-automation-guide\/\">ComfyUI\u81ea\u52d5\u5316\u30ac\u30a4\u30c9<\/a>\u3067\u81ea\u52d5\u5316\u306e\u5168\u4f53\u50cf\u3092\u307e\u3068\u3081\u3066\u3044\u307e\u3059\u3002\u30d8\u30c3\u30c9\u30ec\u30b9\u5b9f\u884c\u306f\u305d\u306e\u4e2d\u6838\u3068\u306a\u308b\u904b\u7528\u624b\u6cd5\u3067\u3059\u3002<\/p>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>ComfyUI\u306e\u30d8\u30c3\u30c9\u30ec\u30b9\u30e2\u30fc\u30c9\u3068CLI\u5b9f\u884c\u306f\u3001\u753b\u50cf\u751f\u6210\u306e\u81ea\u52d5\u5316\u306b\u5fc5\u8981\u306a\u57fa\u672c\u77e5\u8b58\u3067\u3059\u3002<\/p>\n<p>\u30dd\u30a4\u30f3\u30c8\u3092\u632f\u308a\u8fd4\u308a\u307e\u3059\u3002<code>--disable-auto-launch<\/code>\u30aa\u30d7\u30b7\u30e7\u30f3\u3067GUI\u306a\u3057\u306e\u8d77\u52d5\u304c\u53ef\u80fd\u3067\u3059\u3002\u516c\u5f0f\u306e<code>comfy-cli<\/code>\u3092\u4f7f\u3048\u3070\u3001\u74b0\u5883\u69cb\u7bc9\u304b\u3089\u8d77\u52d5\u307e\u3067\u30b3\u30de\u30f3\u30c9\u4e00\u672c\u3067\u5b8c\u7d50\u3057\u307e\u3059\u3002API\u7d4c\u7531\u3067<code>\/prompt<\/code>\u306b\u30ef\u30fc\u30af\u30d5\u30ed\u30fcJSON\u3092\u9001\u4fe1\u3057\u3001<code>\/view<\/code>\u3084<code>\/upload<\/code>\u3001WebSocket\u307e\u3067\u7d44\u307f\u5408\u308f\u305b\u308c\u3070\u3001\u30b9\u30af\u30ea\u30d7\u30c8\u3060\u3051\u3067\u753b\u50cf\u751f\u6210\u3092\u5b8c\u7d50\u3067\u304d\u307e\u3059\u3002cron\u3084\u30bf\u30b9\u30af\u30b9\u30b1\u30b8\u30e5\u30fc\u30e9\u3068\u7d44\u307f\u5408\u308f\u305b\u308c\u3070\u5b9a\u6642\u30d0\u30c3\u30c1\u51e6\u7406\u3082\u5b9f\u73fe\u3057\u307e\u3059\u3002systemd\u30b5\u30fc\u30d3\u30b9\u5316\u3059\u308c\u3070\u3001\u30b5\u30fc\u30d0\u30fc\u3067\u306e\u5e38\u6642\u7a3c\u50cd\u3082\u5b89\u5b9a\u3057\u3066\u904b\u7528\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u307e\u305a\u306f<code>--disable-auto-launch<\/code>\u3092\u4ed8\u3051\u3066\u8d77\u52d5\u3057\u3001curl\u3067\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u30921\u56de\u9001\u4fe1\u3059\u308b\u3068\u3053\u308d\u304b\u3089\u8a66\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002\u30d8\u30c3\u30c9\u30ec\u30b9\u5b9f\u884c\u306e\u611f\u899a\u304c\u3064\u304b\u3081\u305f\u3089\u3001\u30d0\u30c3\u30c1\u30b9\u30af\u30ea\u30d7\u30c8\u3084\u5b9a\u6642\u5b9f\u884c\u3078\u3068\u6bb5\u968e\u7684\u306b\u62e1\u5f35\u3057\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<h3>\u3042\u308f\u305b\u3066\u8aad\u307f\u305f\u3044<\/h3>\n<ul>\n<li><a href=\"https:\/\/persc.jp\/blog\/comfyui-automation-guide\/\">ComfyUI\u81ea\u52d5\u5316\u30ac\u30a4\u30c9<\/a> \u2014 \u30d8\u30c3\u30c9\u30ec\u30b9\u5b9f\u884c\u3092\u542b\u3080ComfyUI\u81ea\u52d5\u5316\u306e\u5168\u4f53\u50cf\u3092\u6574\u7406<\/li>\n<li><a href=\"https:\/\/persc.jp\/blog\/comfyui-api-guide\/\">ComfyUI API\u6d3b\u7528\u30ac\u30a4\u30c9<\/a> \u2014 API\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u306e\u8a73\u7d30\u4ed5\u69d8\u3084Python\u30e9\u30c3\u30d1\u30fc\u306e\u5b9f\u88c5\u4f8b\u3092\u89e3\u8aac<\/li>\n<li><a href=\"https:\/\/persc.jp\/blog\/comfyui-folder-watch\/\">ComfyUI\u30d5\u30a9\u30eb\u30c0\u76e3\u8996\u3067\u81ea\u52d5\u751f\u6210<\/a> \u2014 \u7279\u5b9a\u30d5\u30a9\u30eb\u30c0\u3078\u306e\u30d5\u30a1\u30a4\u30eb\u8ffd\u52a0\u3092\u30c8\u30ea\u30ac\u30fc\u306b\u753b\u50cf\u3092\u81ea\u52d5\u751f\u6210\u3059\u308b\u65b9\u6cd5<\/li>\n<li><a href=\"https:\/\/persc.jp\/blog\/comfyui-docker-cloud-gpu\/\">ComfyUI Docker\u30fb\u30af\u30e9\u30a6\u30c9GPU\u6d3b\u7528\u30ac\u30a4\u30c9<\/a> \u2014 Docker\u74b0\u5883\u3067\u306e\u30d8\u30c3\u30c9\u30ec\u30b9\u904b\u7528\u3084\u30af\u30e9\u30a6\u30c9GPU\u306e\u6d3b\u7528\u65b9\u6cd5\u3092\u7d39\u4ecb<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>ComfyUI\uff08\u30ce\u30fc\u30c9\u3092\u3064\u306a\u3044\u3067\u753b\u50cf\u751f\u6210AI\u3092\u52d5\u304b\u3059\u30c4\u30fc\u30eb\uff09\u306f\u9ad8\u6a5f\u80fd\u306a\u30ce\u30fc\u30c9\u30d9\u30fc\u30b9\u306eUI\u304c\u9b45\u529b\u3067\u3059\u304c\u3001\u5b9f\u904b\u7528\u3067\u306fGUI\u3092\u4f7f\u308f\u305a\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u304b\u3089\u52d5\u304b\u3057\u305f\u3044\u5834\u9762\u304c\u5c11\u306a\u304f\u3042\u308a\u307e\u305b\u3093\u3002\u30b5\u30fc\u30d0\u30fc\u4e0a\u3067\u5927\u91cf\u306e\u753b\u50cf\u3092\u30d0\u30c3\u30c1\u751f\u6210\u3059\u308b\u3068\u304d [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"swell_btn_cv_data":"","footnotes":""},"categories":[112,114,113],"tags":[],"class_list":["post-3668","post","type-post","status-publish","format-standard","hentry","category-ai-architect","category-comfyui-ai-architect","category-service-ai-architect"],"acf":[],"_links":{"self":[{"href":"https:\/\/persc.jp\/blog\/wp-json\/wp\/v2\/posts\/3668","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/persc.jp\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/persc.jp\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/persc.jp\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/persc.jp\/blog\/wp-json\/wp\/v2\/comments?post=3668"}],"version-history":[{"count":2,"href":"https:\/\/persc.jp\/blog\/wp-json\/wp\/v2\/posts\/3668\/revisions"}],"predecessor-version":[{"id":4565,"href":"https:\/\/persc.jp\/blog\/wp-json\/wp\/v2\/posts\/3668\/revisions\/4565"}],"wp:attachment":[{"href":"https:\/\/persc.jp\/blog\/wp-json\/wp\/v2\/media?parent=3668"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/persc.jp\/blog\/wp-json\/wp\/v2\/categories?post=3668"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/persc.jp\/blog\/wp-json\/wp\/v2\/tags?post=3668"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}