CLI
Generate(パートナーノード)— Beta
comfy generate はベータ版です。 フラグ名、モデルエイリアス、出力形式は変更される可能性があります。基盤となるパートナーエンドポイントは安定していますが、CLI のインターフェースは依然として進化中です。フィードバックは comfy-cli GitHub リポジトリ にお寄せください。<MODEL_OR_ACTION> は以下のいずれかです。
- モデルエイリアス(例:
flux-pro、ideogram-edit、kling、dalle) — 対応するパートナーモデルを直接呼び出します。 - 予約済みアクション:
list、schema、refresh、upload、resume。
COMFY_API_KEY を設定するか、各呼び出しで --api-key <KEY> を渡します。キーは platform.comfy.org で取得してください。
実行レベルのフラグ(すべてのモデルで使用可能):
--download PATH: 結果の画像/動画をPATHに保存します。--async: 完了をポーリングする代わりに、ジョブIDを即座に返して非同期実行します。後でcomfy generate resume <model> <job_id>で再開できます。--json: 生のAPIレスポンスをJSONとして出力します(スクリプト用に便利です)。--timeout SECONDS: デフォルトの300秒のポーリングタイムアウトを上書きします。--api-key KEY: インラインAPIキー(COMFY_API_KEYを上書きします)。
list
利用可能なパートナーモデルを短いエイリアスと共に一覧表示します。
使用法:
--partner TEXT/-p TEXT: パートナーでフィルタ(例:bfl、kling、ideogram、openai)。--category TEXT/--style TEXT/-c TEXT: カテゴリでフィルタ(例:text-to-image、image-edit、inpaint、upscale、text-to-video、image-to-video)。--query TEXT/-q TEXT: モデルID/概要に対する部分文字列検索。
schema
特定のモデルのパラメータを表示します。必須/任意のフラグ、型、デフォルト値、および実行例を含みます。
使用法:
refresh
ローカルにキャッシュされたモデルカタログをクラウドのOpenAPI仕様から更新します。新しいパートナーモデルが追加されたときに便利です。
使用法:
upload
ローカルファイル(またはリモートURLの再ホスト)をComfyのストレージにアップロードし、署名付きURLを出力します。ほとんどのモデルはローカルファイルパスを直接受け付けますが、これはURLを明示的に取得したい場合に使用します(例: 同じアセットを複数回の呼び出しで再利用する場合)。
使用法:
参照アセットは24時間後に自動的に削除されます。 アップロードされたファイル(
comfy generate upload 経由、またはモデルにローカルファイルパスを渡す際の暗黙的なアップロード)は、Comfyが管理するGCSバケット(api-nodes-prod)に保存され、署名付きURLでのみアクセス可能です。バケットのライフサイクルルールにより、アップロードから1日後にオブジェクトは自動的に削除されます。長時間実行される非同期ジョブの間もアセットを保持する必要がある場合は、各ジョブの前に再アップロードするか、ご自身でホストしてURLを直接渡してください。resume
以前に送信した非同期ジョブ(通常は --async を指定した動画ジョブ)を再開します。結果が準備できるまでポーリングし、必要に応じてダウンロードします。
使用法:
モデルエイリアス(一部抜粋)
以下の短いエイリアスを<MODEL> として使用できます。完全かつ最新のカタログは comfy generate list を実行して確認してください。
人気:
| エイリアス | パートナー | カテゴリ |
|---|---|---|
nano-banana | Google (Gemini Flash Image) | テキストから画像 / 画像編集 |
seedance | ByteDance | テキストから動画 / 画像から動画(非同期) |
grok、grok-edit | xAI | テキストから画像 / 画像編集 |
grok-video | xAI | テキストから動画(非同期) |
| エイリアス | パートナー | カテゴリ |
|---|---|---|
flux-pro、flux-ultra、flux-2 | BFL | テキストから画像(非同期) |
flux-kontext、flux-kontext-max | BFL | 画像編集(非同期) |
flux-fill、flux-expand、flux-canny、flux-depth | BFL | インペイント / アウトペイント / controlnet |
ideogram、ideogram-edit、ideogram-remix、ideogram-reframe、ideogram-bg | Ideogram | テキストから画像 / 画像編集 |
dalle、dalle-edit | OpenAI | テキストから画像 / 画像編集 |
stability-ultra、stability-sd3、stability-upscale、stability-upscale-creative、stability-upscale-fast | Stability | テキストから画像 / アップスケール |
recraft、recraft-vectorize、recraft-rmbg、recraft-replace-bg、recraft-i2i、recraft-inpaint、recraft-upscale、recraft-upscale-creative | Recraft | テキストから画像 / 画像編集 |
reve、reve-edit | Reve | テキストから画像 / 画像編集 |
runway | Runway | テキストから画像 |
kling、kling-i2v、kling-extend、kling-lipsync | Kling | テキストから動画 / 画像から動画 / 動画延長 / リップシンク(非同期) |
luma、luma-i2v | Luma | テキストから動画 / 画像から動画(非同期) |
hailuo | MiniMax | テキストから動画(非同期) |
runway-i2v | Runway | 画像から動画(非同期) |
moonvalley-t2v、moonvalley-i2v | Moonvalley | テキストから動画 / 画像から動画(非同期) |
pika、pika-i2v | Pika | テキストから動画 / 画像から動画(非同期) |
vidu、vidu-i2v、vidu-extend | Vidu | テキストから動画 / 画像から動画 / 動画延長(非同期) |
ノード
Usage:--install-completion: Install completion for the current shell.--show-completion: Show completion for the current shell, to copy it or customize the installation.--help: Show this message and exit.
deps-in-workflowdisableenablefixinstallinstall-depsreinstallrestore-dependenciesrestore-snapshotsave-snapshot: Save a snapshot of the current ComfyUI…showsimple-showuninstallupdate
deps-in-workflow
Usage:
--workflow TEXT: Workflow file (.json/.png) [required]--output TEXT: Workflow file (.json/.png) [required]--channel TEXT: Specify the operation mode--mode TEXT: [remote|local|cache]--help: Show this message and exit.
disable
Usage:
ARGS...: disable custom nodes [required]
--channel TEXT: Specify the operation mode--mode TEXT: [remote|local|cache]--help: Show this message and exit.
enable
Usage:
ARGS...: enable custom nodes [required]
--channel TEXT: Specify the operation mode--mode TEXT: [remote|local|cache]--help: Show this message and exit.
fix
Usage:
ARGS...: fix dependencies for specified custom nodes [required]
--channel TEXT: Specify the operation mode--mode TEXT: [remote|local|cache]--help: Show this message and exit.
install
Usage:
ARGS...: install custom nodes [required]
--channel TEXT: Specify the operation mode--mode TEXT: [remote|local|cache]--help: Show this message and exit.
install-deps
Usage:
--deps TEXT: Dependency spec file (.json)--workflow TEXT: Workflow file (.json/.png)--channel TEXT: Specify the operation mode--mode TEXT: [remote|local|cache]--help: Show this message and exit.
reinstall
Usage:
ARGS...: reinstall custom nodes [required]
--channel TEXT: Specify the operation mode--mode TEXT: [remote|local|cache]--help: Show this message and exit.
restore-dependencies
Usage:
--help: Show this message and exit.
restore-snapshot
Usage:
PATH: [required]
--help: Show this message and exit.
save-snapshot
Save a snapshot of the current ComfyUI environment
Usage:
--output TEXT: Specify the output file path. (.json/.yaml)--help: Show this message and exit.
show
Usage:
ARGS...: [installed|enabled|not-installed|disabled|all|snapshot|snapshot-list] [required]
--channel TEXT: Specify the operation mode--mode TEXT: [remote|local|cache]--help: Show this message and exit.
simple-show
Usage:
ARGS...: [installed|enabled|not-installed|disabled|all|snapshot|snapshot-list] [required]
--channel TEXT: Specify the operation mode--mode TEXT: [remote|local|cache]--help: Show this message and exit.
uninstall
Usage:
ARGS...: uninstall custom nodes [required]
--channel TEXT: Specify the operation mode--mode TEXT: [remote|local|cache]--help: Show this message and exit.
update
Usage:
ARGS...: update custom nodes [required]
--channel TEXT: Specify the operation mode--mode TEXT: [remote|local|cache]--help: Show this message and exit.
モデル
使用方法:--install-completion: 現在のシェルに対してコマンド補完機能をインストールします。--show-completion: 現在のシェル向けのコマンド補完スクリプトを表示し、コピーまたはカスタマイズ可能な状態にします。--help: このメッセージを表示して終了します。
download: モデルを指定された相対パスにダウンロードします…list: 現在ダウンロード済みのすべてのモデルの一覧を表示します…remove: 1つ以上のダウンロード済みモデルを削除します…
download
モデルがまだダウンロードされていない場合、指定された相対パスにダウンロードします。
使用方法:
--url TEXT: モデルをダウンロードするための URL [必須]--relative-path TEXT: モデルをインストールするための、現在のワークスペースからの相対パス。 [デフォルト: models/checkpoints]--help: このメッセージを表示して終了します。
list
現在ダウンロード済みのすべてのモデルを表形式で一覧表示します。
使用方法:
--relative-path TEXT: モデルが格納されている、現在のワークスペースからの相対パス。 [デフォルト: models/checkpoints]--help: このメッセージを表示して終了します。
remove
直接モデル名を指定するか、インタラクティブな選択を通じて、1つ以上のダウンロード済みモデルを削除します。
使用方法:
--relative-path TEXT: モデルが格納されている、現在のワークスペースからの相対パス。 [デフォルト: models/checkpoints]--model-names TEXT: 削除対象のモデルファイル名のリスト(スペース区切り)--help: このメッセージを表示して終了します。