multimodalart's picture
Squashing commit
4450790 verified
|
raw
history blame
9.22 kB

cm-cli: ComfyUI-Manager CLI

cm-cli ๋Š” ComfyUI๋ฅผ ์‹คํ–‰์‹œํ‚ค์ง€ ์•Š๊ณ  command line์—์„œ ComfyUI-Manager์˜ ์—ฌ๋Ÿฌ๊ฐ€์ง€ ๊ธฐ๋Šฅ์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋„๋ก ๋„์™€์ฃผ๋Š” ๋„๊ตฌ์ž…๋‹ˆ๋‹ค.

-= ComfyUI-Manager CLI (V2.24) =-


python cm-cli.py [OPTIONS]

OPTIONS:
    [install|reinstall|uninstall|update|disable|enable|fix] node_name ... ?[--channel <channel name>] ?[--mode [remote|local|cache]]
    [update|disable|enable|fix] all ?[--channel <channel name>] ?[--mode [remote|local|cache]]
    [simple-show|show] [installed|enabled|not-installed|disabled|all|snapshot|snapshot-list] ?[--channel <channel name>] ?[--mode [remote|local|cache]]
    save-snapshot ?[--output <snapshot .json/.yaml>]
    restore-snapshot <snapshot .json/.yaml> ?[--pip-non-url] ?[--pip-non-local-url] ?[--pip-local-url]
    cli-only-mode [enable|disable]
    restore-dependencies
    clear

How To Use?

  • python cm-cli.py ๋ฅผ ํ†ตํ•ด์„œ ์‹คํ–‰ ์‹œํ‚ฌ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
  • ์˜ˆ๋ฅผ ๋“ค์–ด custom node๋ฅผ ๋ชจ๋‘ ์—…๋ฐ์ดํŠธ ํ•˜๊ณ  ์‹ถ๋‹ค๋ฉด
    • ComfyUI-Manager๊ฒฝ๋กœ ์—์„œ python cm-cli.py update all ๋ฅผ command๋ฅผ ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
    • ComfyUI ๊ฒฝ๋กœ์—์„œ ์‹คํ–‰ํ•œ๋‹ค๋ฉด, python custom_nodes/ComfyUI-Manager/cm-cli.py update all ์™€ ๊ฐ™์ด cm-cli.py ์˜ ๊ฒฝ๋กœ๋ฅผ ์ง€์ •ํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค.

Prerequisite

  • ComfyUI ๋ฅผ ์‹คํ–‰ํ•˜๋Š” python๊ณผ ๋™์ผํ•œ python ํ™˜๊ฒฝ์—์„œ ์‹คํ–‰ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.
    • venv๋ฅผ ์‚ฌ์šฉํ•  ๊ฒฝ์šฐ ํ•ด๋‹น venv๋ฅผ activate ํ•œ ์ƒํƒœ์—์„œ ์‹คํ–‰ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.
    • portable ๋ฒ„์ „์„ ์‚ฌ์šฉํ•  ๊ฒฝ์šฐ run_nvidia_gpu.bat ํŒŒ์ผ์ด ์žˆ๋Š” ๊ฒฝ๋กœ์ธ ๊ฒฝ์šฐ, ๋‹ค์Œ๊ณผ ๊ฐ™์€ ๋ฐฉ์‹์œผ๋กœ ์ฝ”๋งจ๋“œ๋ฅผ ์‹คํ–‰ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. .\python_embeded\python.exe ComfyUI\custom_nodes\ComfyUI-Manager\cm-cli.py update all
  • ComfyUI ์˜ ๊ฒฝ๋กœ๋Š” COMFYUI_PATH ํ™˜๊ฒฝ ๋ณ€์ˆ˜๋กœ ์„ค์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋งŒ์•ฝ ์ƒ๋žตํ•  ๊ฒฝ์šฐ ๋‹ค์Œ๊ณผ ๊ฐ™์€ ๊ฒฝ๊ณ  ๋ฉ”์‹œ์ง€๊ฐ€ ๋‚˜ํƒ€๋‚˜๋ฉฐ, ComfyUI-Manager๊ฐ€ ์„ค์น˜๋œ ๊ฒฝ๋กœ๋ฅผ ๊ธฐ์ค€์œผ๋กœ ์ƒ๋Œ€ ๊ฒฝ๋กœ๋กœ ์„ค์ •๋ฉ๋‹ˆ๋‹ค. WARN: The `COMFYUI_PATH` environment variable is not set. Assuming `custom_nodes/ComfyUI-Manager/../../` as the ComfyUI path.

Features

1. --channel, --mode

  • ์ •๋ณด ๋ณด๊ธฐ ๊ธฐ๋Šฅ๊ณผ ์ปค์Šคํ…€ ๋…ธ๋“œ ๊ด€๋ฆฌ ๊ธฐ๋Šฅ์˜ ๊ฒฝ์šฐ๋Š” --channel๊ณผ --mode๋ฅผ ํ†ตํ•ด ์ •๋ณด DB๋ฅผ ์„ค์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
  • ์˜ˆ๋“ค ๋“ค์–ด python cm-cli.py update all --channel recent --mode remote์™€ ๊ฐ™์€ command๋ฅผ ์‹คํ–‰ํ•  ๊ฒฝ์šฐ, ํ˜„์žฌ ComfyUI-Manager repo์— ๋‚ด์žฅ๋œ ๋กœ์ปฌ์˜ ์ •๋ณด๊ฐ€ ์•„๋‹Œ remote์˜ ์ตœ์‹  ์ •๋ณด๋ฅผ ๊ธฐ์ค€์œผ๋กœ ๋™์ž‘ํ•˜๋ฉฐ, recent channel์— ์žˆ๋Š” ๋ชฉ๋ก์„ ๋Œ€์ƒ์œผ๋กœ๋งŒ ๋™์ž‘ํ•ฉ๋‹ˆ๋‹ค.
  • --channel, --mode ๋Š” simple-show, show, install, uninstall, update, disable, enable, fix command์—์„œ๋งŒ ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.

2. ๊ด€๋ฆฌ ์ •๋ณด ๋ณด๊ธฐ

[simple-show|show] [installed|enabled|not-installed|disabled|all|snapshot|snapshot-list] ?[--channel <channel name>] ?[--mode [remote|local|cache]]

  • [show|simple-show] - show๋Š” ์ƒ์„ธํ•˜๊ฒŒ ์ •๋ณด๋ฅผ ๋ณด์—ฌ์ฃผ๋ฉฐ, simple-show๋Š” ๊ฐ„๋‹จํ•˜๊ฒŒ ์ •๋ณด๋ฅผ ๋ณด์—ฌ์ค๋‹ˆ๋‹ค.

python cm-cli.py show installed ์™€ ๊ฐ™์€ ์ฝ”๋งจ๋“œ๋ฅผ ์‹คํ–‰ํ•˜๋ฉด ์„ค์น˜๋œ ์ปค์Šคํ…€ ๋…ธ๋“œ์˜ ์ •๋ณด๋ฅผ ์ƒ์„ธํ•˜๊ฒŒ ๋ณด์—ฌ์ค๋‹ˆ๋‹ค.

-= ComfyUI-Manager CLI (V2.24) =-

FETCH DATA from: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/custom-node-list.json
[    ENABLED    ]  ComfyUI-Manager                                   (author: Dr.Lt.Data)
[    ENABLED    ]  ComfyUI-Impact-Pack                               (author: Dr.Lt.Data)
[    ENABLED    ]  ComfyUI-Inspire-Pack                              (author: Dr.Lt.Data)
[    ENABLED    ]  ComfyUI_experiments                               (author: comfyanonymous)
[    ENABLED    ]  ComfyUI-SAI_API                                   (author: Stability-AI)
[    ENABLED    ]  stability-ComfyUI-nodes                           (author: Stability-AI)
[    ENABLED    ]  comfyui_controlnet_aux                            (author: Fannovel16)
[    ENABLED    ]  ComfyUI-Frame-Interpolation                       (author: Fannovel16)
[    DISABLED   ]  ComfyUI-Loopchain                                 (author: Fannovel16)

python cm-cli.py simple-show installed ์™€ ๊ฐ™์€ ์ฝ”๋งจ๋“œ๋ฅผ ์ด์šฉํ•ด์„œ ์„ค์น˜๋œ ์ปค์Šคํ…€ ๋…ธ๋“œ์˜ ์ •๋ณด๋ฅผ ๊ฐ„๋‹จํ•˜๊ฒŒ ๋ณด์—ฌ์ค๋‹ˆ๋‹ค.

-= ComfyUI-Manager CLI (V2.24) =-

FETCH DATA from: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/custom-node-list.json
ComfyUI-Manager                                   
ComfyUI-Impact-Pack                               
ComfyUI-Inspire-Pack                              
ComfyUI_experiments                               
ComfyUI-SAI_API                                   
stability-ComfyUI-nodes                           
comfyui_controlnet_aux                            
ComfyUI-Frame-Interpolation                       
ComfyUI-Loopchain                                 
  • [installed|enabled|not-installed|disabled|all|snapshot|snapshot-list]
    • enabled, disabled: ์„ค์น˜๋œ ์ปค์Šคํ…€ ๋…ธ๋“œ๋“ค ์ค‘ enable ๋˜์—ˆ๊ฑฐ๋‚˜, disable๋œ ๋…ธ๋“œ๋“ค์„ ๋ณด์—ฌ์ค๋‹ˆ๋‹ค.
    • installed: enable, disable ์—ฌ๋ถ€์™€ ์ƒ๊ด€์—†์ด ์„ค์น˜๋œ ๋ชจ๋“  ๋…ธ๋“œ๋ฅผ ๋ณด์—ฌ์ค๋‹ˆ๋‹ค
    • not-installed: ์„ค์น˜๋˜์ง€ ์•Š์€ ์ปค์Šคํ…€ ๋…ธ๋“œ์˜ ๋ชฉ๋ก์„ ๋ณด์—ฌ์ค๋‹ˆ๋‹ค.
    • all: ๋ชจ๋“  ์ปค์Šคํ…€ ๋…ธ๋“œ์˜ ๋ชฉ๋ก์„ ๋ณด์—ฌ์ค๋‹ˆ๋‹ค.
    • snapshot: ํ˜„์žฌ ์„ค์น˜๋œ ์ปค์Šคํ…€ ๋…ธ๋“œ์˜ snapshot ์ •๋ณด๋ฅผ ๋ณด์—ฌ์ค๋‹ˆ๋‹ค. show๋กค ํ†ตํ•ด์„œ ๋ณผ ๊ฒฝ์šฐ๋Š” json ์ถœ๋ ฅ ํ˜•ํƒœ๋กœ ๋ณด์—ฌ์ฃผ๋ฉฐ, simple-show๋ฅผ ํ†ตํ•ด์„œ ๋ณผ ๊ฒฝ์šฐ๋Š” ๊ฐ„๋‹จํ•˜๊ฒŒ, ์ปค๋ฐ‹ ํ•ด์‹œ์™€ ํ•จ๊ป˜ ๋ณด์—ฌ์ค๋‹ˆ๋‹ค.
    • snapshot-list: ComfyUI-Manager/snapshots ์— ์ €์žฅ๋œ snapshot ํŒŒ์ผ์˜ ๋ชฉ๋ก์„ ๋ณด์—ฌ์ค๋‹ˆ๋‹ค.

3. ์ปค์Šคํ…€ ๋…ธ๋“œ ๊ด€๋ฆฌ ํ•˜๊ธฐ

[install|reinstall|uninstall|update|disable|enable|fix] node_name ... ?[--channel <channel name>] ?[--mode [remote|local|cache]]

  • python cm-cli.py install ComfyUI-Impact-Pack ComfyUI-Inspire-Pack ComfyUI_experiments ์™€ ๊ฐ™์ด ์ปค์Šคํ…€ ๋…ธ๋“œ์˜ ์ด๋ฆ„์„ ๋‚˜์—ดํ•ด์„œ ๊ด€๋ฆฌ ๊ธฐ๋Šฅ์„ ์ ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
  • ์ปค์Šคํ…€ ๋…ธ๋“œ์˜ ์ด๋ฆ„์€ show๋ฅผ ํ–ˆ์„ ๋•Œ ๋ณด์—ฌ์ฃผ๋Š” ์ด๋ฆ„์ด๋ฉฐ, git repository์˜ ์ด๋ฆ„์ž…๋‹ˆ๋‹ค. (์ถ”ํ›„ nickname ์„ ์‚ฌ์šฉ๊ฐ€๋Šฅํ•˜๋Œ๊ณ  ์—…๋ฐ์ดํŠธ ํ•  ์˜ˆ์ •์ž…๋‹ˆ๋‹ค.)

[update|disable|enable|fix] all ?[--channel <channel name>] ?[--mode [remote|local|cache]]

  • update, disable, enable, fix ๊ธฐ๋Šฅ์€ all ๋กœ ์ง€์ • ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.

  • ์„ธ๋ถ€ ๋™์ž‘

    • install: ์ง€์ •๋œ ์ปค์Šคํ…€ ๋…ธ๋“œ๋“ค์„ ์„ค์น˜ํ•ฉ๋‹ˆ๋‹ค
    • reinstall: ์ง€์ •๋œ ์ปค์Šคํ…€ ๋…ธ๋“œ๋ฅผ ์‚ญ์ œํ•˜๊ณ  ์žฌ์„ค์น˜ ํ•ฉ๋‹ˆ๋‹ค.
    • uninstall: ์ง€์ •๋œ ์ปค์Šคํ…€ ๋…ธ๋“œ๋“ค์„ ์‚ญ์ œํ•ฉ๋‹ˆ๋‹ค.
    • update: ์ง€์ •๋œ ์ปค์Šคํ…€ ๋…ธ๋“œ๋“ค์„ ์—…๋ฐ์ดํŠธํ•ฉ๋‹ˆ๋‹ค.
    • disable: ์ง€์ •๋œ ์ปค์Šคํ…€ ๋…ธ๋“œ๋“ค์„ ๋น„ํ™œ์„ฑํ™”ํ•ฉ๋‹ˆ๋‹ค.
    • enable: ์ง€์ •๋œ ์ปค์Šคํ…€ ๋…ธ๋“œ๋“ค์„ ํ™œ์„ฑํ™”ํ•ฉ๋‹ˆ๋‹ค.
    • fix: ์ง€์ •๋œ ์ปค์Šคํ…€ ๋…ธ๋“œ์˜ ์˜์กด์„ฑ์„ ๊ณ ์น˜๊ธฐ ์œ„ํ•œ ์‹œ๋„๋ฅผ ํ•ฉ๋‹ˆ๋‹ค.

4. ์Šค๋ƒ…์ƒท ๊ด€๋ฆฌ ๊ธฐ๋Šฅ

  • python cm-cli.py save-snapshot ?[--output <snapshot .json/.yaml>]: ํ˜„์žฌ์˜ snapshot์„ ์ €์žฅํ•ฉ๋‹ˆ๋‹ค.
    • --output ์œผ๋กœ ์ž„์˜์˜ ๊ฒฝ๋กœ์— .yaml ํŒŒ์ผ๊ณผ format์œผ๋กœ ์ €์žฅํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
  • python cm-cli.py restore-snapshot <snapshot .json/.yaml>: ์ง€์ •๋œ snapshot์œผ๋กœ ๋ณต๊ตฌํ•ฉ๋‹ˆ๋‹ค.
    • snapshot ๊ฒฝ๋กœ์— ํŒŒ์ผ์ด ์กด์žฌํ•˜๋Š” ๊ฒฝ์šฐ ํ•ด๋‹น snapshot์„ ๋กœ๋“œํ•ฉ๋‹ˆ๋‹ค.
    • snapshot ๊ฒฝ๋กœ์— ํŒŒ์ผ์ด ์กด์žฌํ•˜์ง€ ์•Š๋Š” ๊ฒฝ์šฐ ๋ฌต์‹œ์ ์œผ๋กœ, ComfyUI-Manager/snapshots ์— ์žˆ๋‹ค๊ณ  ๊ฐ€์ •ํ•ฉ๋‹ˆ๋‹ค.
    • --pip-non-url: PyPI ์— ๋“ฑ๋ก๋œ pip ํŒจํ‚ค์ง€๋“ค์— ๋Œ€ํ•ด์„œ ๋ณต๊ตฌ๋ฅผ ์ˆ˜ํ–‰
    • --pip-non-local-url: web URL์— ๋“ฑ๋ก๋œ pip ํŒจํ‚ค์ง€๋“ค์— ๋Œ€ํ•ด์„œ ๋ณต๊ตฌ๋ฅผ ์ˆ˜ํ–‰
    • --pip-local-url: local ๊ฒฝ๋กœ๋ฅผ ์ง€์ •ํ•˜๊ณ  ์žˆ๋Š” pip ํŒจํ‚ค์ง€๋“ค์— ๋Œ€ํ•ด์„œ ๋ณต๊ตฌ๋ฅผ ์ˆ˜ํ–‰

5. CLI only mode

ComfyUI-Manager๋ฅผ CLI๋กœ๋งŒ ์‚ฌ์šฉํ•  ๊ฒƒ์ธ์ง€๋ฅผ ์„ค์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

cli-only-mode [enable|disable]

  • security ํ˜น์€ policy ์˜ ์ด์œ ๋กœ GUI ๋ฅผ ํ†ตํ•œ ComfyUI-Manager ์‚ฌ์šฉ์„ ์ œํ•œํ•˜๊ณ  ์‹ถ์€ ๊ฒฝ์šฐ ์ด ๋ชจ๋“œ๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
    • CLI only mode๋ฅผ ์ ์šฉํ•  ๊ฒฝ์šฐ ComfyUI-Manager ๊ฐ€ ๋งค์šฐ ์ œํ•œ๋œ ์ƒํƒœ๋กœ ๋กœ๋“œ๋˜์–ด, ๋‚ด๋ถ€์ ์œผ๋กœ ์ œ๊ณตํ•˜๋Š” web API๊ฐ€ ๋น„ํ™œ์„ฑํ™” ๋˜๋ฉฐ, ๋ฉ”์ธ ๋ฉ”๋‰ด์—์„œ๋„ Manager ๋ฒ„ํŠผ์ด ํ‘œ์‹œ๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

6. ์˜์กด์„ฑ ์„ค์น˜

restore-dependencies

  • ComfyUI/custom_nodes ํ•˜์œ„ ๊ฒฝ๋กœ์— ์ปค์Šคํ…€ ๋…ธ๋“œ๋“ค์ด ์„ค์น˜๋˜์–ด ์žˆ๊ธด ํ•˜์ง€๋งŒ, ์˜์กด์„ฑ์ด ์„ค์น˜๋˜์ง€ ์•Š์€ ๊ฒฝ์šฐ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
  • colab ๊ณผ ๊ฐ™์ด cloud instance๋ฅผ ์ƒˆ๋กœ ์‹œ์ž‘ํ•˜๋Š” ๊ฒฝ์šฐ ์˜์กด์„ฑ ์žฌ์„ค์น˜ ๋ฐ ์„ค์น˜ ์Šคํฌ๋ฆฝํŠธ๊ฐ€ ์žฌ์‹คํ–‰ ๋˜์–ด์•ผ ํ•˜๋Š” ๊ฒฝ์šฐ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.
  • ComfyUI์„ ์žฌ์„ค์น˜ํ•  ๊ฒฝ์šฐ, custom_nodes ๊ฒฝ๋กœ๋งŒ ๋ฐฑ์—…ํ–ˆ๋‹ค๊ฐ€ ์žฌ์„ค์น˜ ํ•  ๊ฒฝ์šฐ ํ™œ์šฉ ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.

7. clear

GUI์—์„œ install, update๋ฅผ ํ•˜๊ฑฐ๋‚˜ snapshot ์„ restoreํ•˜๋Š” ๊ฒฝ์šฐ ์˜ˆ์•ฝ์„ ํ†ตํ•ด์„œ ๋‹ค์Œ๋ฒˆ ComfyUI๋ฅผ ์‹คํ–‰ํ•  ๊ฒฝ์šฐ ์‹คํ–‰๋˜๋Š” ๊ตฌ์กฐ์ž…๋‹ˆ๋‹ค. clear ๋Š” ์ด๋Ÿฐ ์˜ˆ์•ฝ ์ƒํƒœ๋ฅผ clearํ•ด์„œ, ์•„๋ฌด๋Ÿฐ ์‚ฌ์ „ ์‹คํ–‰์ด ์ ์šฉ๋˜์ง€ ์•Š๋„๋ก ํ•ฉ๋‹ˆ๋‹ค.