mihaiciorobitca commited on
Commit
23200b5
·
verified ·
1 Parent(s): 9a64566

Add files using upload-large-folder tool

Browse files
Files changed (50) hide show
  1. .venv-backups/25343869/backup.log +36 -0
  2. .venv-backups/25343869/venv-main-2025-08-27-0546.txt +165 -0
  3. .venv-backups/25343869/venv-main-2025-08-27-0600.txt +165 -0
  4. .venv-backups/25343869/venv-main-2025-08-27-0630.txt +165 -0
  5. .venv-backups/25343869/venv-main-2025-08-27-0700.txt +166 -0
  6. .venv-backups/25343869/venv-main-2025-08-27-0800.txt +173 -0
  7. .venv-backups/25343869/venv-main-2025-08-27-0830.txt +173 -0
  8. .venv-backups/25343869/venv-main-2025-08-27-0900.txt +173 -0
  9. .venv-backups/25343869/venv-main-2025-08-27-1000.txt +178 -0
  10. .venv-backups/25343869/venv-main-2025-08-27-1030.txt +178 -0
  11. .venv-backups/25343869/venv-main-2025-08-27-1100.txt +178 -0
  12. .venv-backups/25343869/venv-main-2025-08-27-1130.txt +178 -0
  13. .venv-backups/25343869/venv-main-2025-08-27-1200.txt +178 -0
  14. .venv-backups/25365439/backup.log +51 -0
  15. .venv-backups/25365439/venv-main-2025-08-27-1844.txt +165 -0
  16. .venv-backups/25365439/venv-main-2025-08-27-1900.txt +166 -0
  17. .venv-backups/25365439/venv-main-2025-08-27-1930.txt +173 -0
  18. .venv-backups/25365439/venv-main-2025-08-27-2000.txt +173 -0
  19. .venv-backups/25365439/venv-main-2025-08-27-2030.txt +173 -0
  20. .venv-backups/25365439/venv-main-2025-08-28-0730.txt +173 -0
  21. .venv-backups/25365439/venv-main-2025-08-28-0800.txt +173 -0
  22. .venv-backups/25365439/venv-main-2025-08-28-0830.txt +173 -0
  23. .venv-backups/25365439/venv-main-2025-08-28-0930.txt +173 -0
  24. .venv-backups/25365439/venv-main-2025-08-28-1200.txt +173 -0
  25. .venv-backups/25365439/venv-main-2025-08-28-1230.txt +173 -0
  26. .venv-backups/25365439/venv-main-2025-08-29-1230.txt +173 -0
  27. .venv-backups/25365439/venv-main-2025-08-29-1630.txt +173 -0
  28. .venv-backups/25474989/venv-main-2025-08-30-1437.txt +165 -0
  29. ComfyUI/.gitattributes +2 -0
  30. ComfyUI/CODEOWNERS +24 -0
  31. ComfyUI/LICENSE +674 -0
  32. ComfyUI/README.md +410 -0
  33. ComfyUI/alembic.ini +84 -0
  34. ComfyUI/comfyui_version.py +3 -0
  35. ComfyUI/cuda_malloc.py +91 -0
  36. ComfyUI/download.py +14 -0
  37. ComfyUI/execution.py +1147 -0
  38. ComfyUI/extra_model_paths.yaml.example +47 -0
  39. ComfyUI/folder_paths.py +425 -0
  40. ComfyUI/hook_breaker_ac10a0.py +17 -0
  41. ComfyUI/latent_preview.py +108 -0
  42. ComfyUI/main.py +369 -0
  43. ComfyUI/new_updater.py +35 -0
  44. ComfyUI/node_helpers.py +60 -0
  45. ComfyUI/nodes.py +2363 -0
  46. ComfyUI/protocol.py +7 -0
  47. ComfyUI/pyproject.toml +24 -0
  48. ComfyUI/pytest.ini +9 -0
  49. ComfyUI/requirements.txt +30 -0
  50. ComfyUI/server.py +977 -0
.venv-backups/25343869/backup.log ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [2025-08-27 05:46:38] Processing virtual environment: /venv/main
2
+ [2025-08-27 05:46:38] SUCCESS: Created backup at /workspace/.venv-backups/25343869/venv-main-2025-08-27-0546.txt
3
+ [2025-08-27 05:46:39] Backup process completed
4
+ [2025-08-27 06:00:01] Processing virtual environment: /venv/main
5
+ [2025-08-27 06:00:01] SUCCESS: Created backup at /workspace/.venv-backups/25343869/venv-main-2025-08-27-0600.txt
6
+ [2025-08-27 06:00:01] Backup process completed
7
+ [2025-08-27 06:30:01] Processing virtual environment: /venv/main
8
+ [2025-08-27 06:30:01] SUCCESS: Created backup at /workspace/.venv-backups/25343869/venv-main-2025-08-27-0630.txt
9
+ [2025-08-27 06:30:01] Backup process completed
10
+ [2025-08-27 07:00:01] Processing virtual environment: /venv/main
11
+ [2025-08-27 07:00:02] SUCCESS: Created backup at /workspace/.venv-backups/25343869/venv-main-2025-08-27-0700.txt
12
+ [2025-08-27 07:00:02] Backup process completed
13
+ [2025-08-27 08:00:01] Processing virtual environment: /venv/main
14
+ [2025-08-27 08:00:01] SUCCESS: Created backup at /workspace/.venv-backups/25343869/venv-main-2025-08-27-0800.txt
15
+ [2025-08-27 08:00:02] Backup process completed
16
+ [2025-08-27 08:30:01] Processing virtual environment: /venv/main
17
+ [2025-08-27 08:30:01] SUCCESS: Created backup at /workspace/.venv-backups/25343869/venv-main-2025-08-27-0830.txt
18
+ [2025-08-27 08:30:01] Backup process completed
19
+ [2025-08-27 09:00:01] Processing virtual environment: /venv/main
20
+ [2025-08-27 09:00:01] SUCCESS: Created backup at /workspace/.venv-backups/25343869/venv-main-2025-08-27-0900.txt
21
+ [2025-08-27 09:00:01] Backup process completed
22
+ [2025-08-27 10:00:01] Processing virtual environment: /venv/main
23
+ [2025-08-27 10:00:01] SUCCESS: Created backup at /workspace/.venv-backups/25343869/venv-main-2025-08-27-1000.txt
24
+ [2025-08-27 10:00:01] Backup process completed
25
+ [2025-08-27 10:30:01] Processing virtual environment: /venv/main
26
+ [2025-08-27 10:30:01] SUCCESS: Created backup at /workspace/.venv-backups/25343869/venv-main-2025-08-27-1030.txt
27
+ [2025-08-27 10:30:02] Backup process completed
28
+ [2025-08-27 11:00:01] Processing virtual environment: /venv/main
29
+ [2025-08-27 11:00:01] SUCCESS: Created backup at /workspace/.venv-backups/25343869/venv-main-2025-08-27-1100.txt
30
+ [2025-08-27 11:00:02] Backup process completed
31
+ [2025-08-27 11:30:01] Processing virtual environment: /venv/main
32
+ [2025-08-27 11:30:01] SUCCESS: Created backup at /workspace/.venv-backups/25343869/venv-main-2025-08-27-1130.txt
33
+ [2025-08-27 11:30:01] Backup process completed
34
+ [2025-08-27 12:00:01] Processing virtual environment: /venv/main
35
+ [2025-08-27 12:00:01] SUCCESS: Created backup at /workspace/.venv-backups/25343869/venv-main-2025-08-27-1200.txt
36
+ [2025-08-27 12:00:01] Backup process completed
.venv-backups/25343869/venv-main-2025-08-27-0546.txt ADDED
@@ -0,0 +1,165 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ aiofiles==24.1.0
2
+ aiohappyeyeballs==2.6.1
3
+ aiohttp==3.12.15
4
+ aiohttp_socks==0.10.1
5
+ aiosignal==1.4.0
6
+ albucore==0.0.24
7
+ albumentations==2.0.8
8
+ alembic==1.16.4
9
+ annotated-types==0.7.0
10
+ asttokens==3.0.0
11
+ attrs==25.3.0
12
+ av==15.0.0
13
+ beautifulsoup4==4.13.4
14
+ certifi==2025.6.15
15
+ cffi==1.17.1
16
+ chardet==5.2.0
17
+ charset-normalizer==3.4.2
18
+ click==8.2.1
19
+ colour-science==0.4.6
20
+ comfyui-embedded-docs==0.2.4
21
+ comfyui_frontend_package==1.23.4
22
+ comfyui_workflow_templates==0.1.41
23
+ comm==0.2.2
24
+ cryptography==45.0.5
25
+ debugpy==1.8.14
26
+ decorator==5.2.1
27
+ easydict==1.13
28
+ einops==0.8.1
29
+ executing==2.2.0
30
+ filelock==3.18.0
31
+ frozenlist==1.7.0
32
+ fsspec==2025.5.1
33
+ gdown==5.2.0
34
+ gitdb==4.0.12
35
+ GitPython==3.1.45
36
+ greenlet==3.2.3
37
+ h11==0.16.0
38
+ h2==4.2.0
39
+ hf-xet==1.1.5
40
+ hpack==4.1.0
41
+ huggingface-hub==0.34.3
42
+ hyperframe==6.1.0
43
+ idna==3.10
44
+ imageio==2.37.0
45
+ inquirerpy==0.3.4
46
+ ipykernel==6.29.5
47
+ ipython==9.3.0
48
+ ipython_pygments_lexers==1.1.1
49
+ ipywidgets==8.1.7
50
+ jedi==0.19.2
51
+ Jinja2==3.1.4
52
+ jsonschema==4.25.0
53
+ jsonschema-specifications==2025.4.1
54
+ jupyter_client==8.6.3
55
+ jupyter_core==5.8.1
56
+ jupyterlab_widgets==3.0.15
57
+ kornia==0.8.1
58
+ kornia_rs==0.1.9
59
+ lazy_loader==0.4
60
+ llvmlite==0.44.0
61
+ Mako==1.3.10
62
+ markdown-it-py==3.0.0
63
+ MarkupSafe==2.1.5
64
+ matplotlib-inline==0.1.7
65
+ matrix-nio==0.25.2
66
+ mdurl==0.1.2
67
+ mpmath==1.3.0
68
+ multidict==6.6.3
69
+ nest-asyncio==1.6.0
70
+ networkx==3.3
71
+ numba==0.61.2
72
+ numpy==2.1.2
73
+ nvidia-cublas-cu12==12.8.3.14
74
+ nvidia-cuda-cupti-cu12==12.8.57
75
+ nvidia-cuda-nvrtc-cu12==12.8.61
76
+ nvidia-cuda-runtime-cu12==12.8.57
77
+ nvidia-cudnn-cu12==9.7.1.26
78
+ nvidia-cufft-cu12==11.3.3.41
79
+ nvidia-cufile-cu12==1.13.0.11
80
+ nvidia-curand-cu12==10.3.9.55
81
+ nvidia-cusolver-cu12==11.7.2.55
82
+ nvidia-cusparse-cu12==12.5.7.53
83
+ nvidia-cusparselt-cu12==0.6.3
84
+ nvidia-nccl-cu12==2.26.2
85
+ nvidia-nvjitlink-cu12==12.8.61
86
+ nvidia-nvtx-cu12==12.8.55
87
+ opencv-python==4.12.0.88
88
+ opencv-python-headless==4.12.0.88
89
+ packaging==25.0
90
+ parso==0.8.4
91
+ pexpect==4.9.0
92
+ pfzy==0.3.4
93
+ pillow==11.0.0
94
+ pixeloe==0.1.4
95
+ platformdirs==4.3.8
96
+ pooch==1.8.2
97
+ prompt_toolkit==3.0.51
98
+ propcache==0.3.2
99
+ psutil==7.0.0
100
+ ptyprocess==0.7.0
101
+ pure_eval==0.2.3
102
+ pycparser==2.22
103
+ pycryptodome==3.23.0
104
+ pydantic==2.11.7
105
+ pydantic-settings==2.10.1
106
+ pydantic_core==2.33.2
107
+ PyGithub==2.7.0
108
+ Pygments==2.19.2
109
+ PyJWT==2.10.1
110
+ PyMatting==1.1.14
111
+ PyNaCl==1.5.0
112
+ PySocks==1.7.1
113
+ python-dateutil==2.9.0.post0
114
+ python-dotenv==1.1.1
115
+ python-socks==2.7.1
116
+ PyYAML==6.0.2
117
+ pyzmq==27.0.0
118
+ referencing==0.36.2
119
+ regex==2025.7.34
120
+ rembg==2.0.67
121
+ requests==2.32.4
122
+ rich==14.1.0
123
+ rpds-py==0.26.0
124
+ safetensors==0.5.3
125
+ scikit-image==0.25.2
126
+ scipy==1.16.1
127
+ sentencepiece==0.2.0
128
+ setuptools==80.9.0
129
+ shellingham==1.5.4
130
+ simsimd==6.5.0
131
+ six==1.17.0
132
+ smmap==5.0.2
133
+ soundfile==0.13.1
134
+ soupsieve==2.7
135
+ spandrel==0.4.1
136
+ SQLAlchemy==2.0.42
137
+ stack-data==0.6.3
138
+ stringzilla==3.12.5
139
+ sympy==1.13.3
140
+ tifffile==2025.6.11
141
+ timm==1.0.19
142
+ tokenizers==0.21.4
143
+ toml==0.10.2
144
+ torch==2.7.1+cu128
145
+ torchaudio==2.7.1+cu128
146
+ torchsde==0.2.6
147
+ torchvision==0.22.1+cu128
148
+ tornado==6.5.1
149
+ tqdm==4.67.1
150
+ traitlets==5.14.3
151
+ trampoline==0.1.2
152
+ transformers==4.54.1
153
+ transparent-background==1.3.4
154
+ triton==3.3.1
155
+ typer==0.16.0
156
+ typing-inspection==0.4.1
157
+ typing_extensions==4.14.0
158
+ unpaddedbase64==2.1.0
159
+ urllib3==2.5.0
160
+ uv==0.8.4
161
+ wcwidth==0.2.13
162
+ wget==3.2
163
+ wheel==0.45.1
164
+ widgetsnbextension==4.0.14
165
+ yarl==1.20.1
.venv-backups/25343869/venv-main-2025-08-27-0600.txt ADDED
@@ -0,0 +1,165 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ aiofiles==24.1.0
2
+ aiohappyeyeballs==2.6.1
3
+ aiohttp==3.12.15
4
+ aiohttp_socks==0.10.1
5
+ aiosignal==1.4.0
6
+ albucore==0.0.24
7
+ albumentations==2.0.8
8
+ alembic==1.16.4
9
+ annotated-types==0.7.0
10
+ asttokens==3.0.0
11
+ attrs==25.3.0
12
+ av==15.0.0
13
+ beautifulsoup4==4.13.4
14
+ certifi==2025.6.15
15
+ cffi==1.17.1
16
+ chardet==5.2.0
17
+ charset-normalizer==3.4.2
18
+ click==8.2.1
19
+ colour-science==0.4.6
20
+ comfyui-embedded-docs==0.2.4
21
+ comfyui_frontend_package==1.23.4
22
+ comfyui_workflow_templates==0.1.41
23
+ comm==0.2.2
24
+ cryptography==45.0.5
25
+ debugpy==1.8.14
26
+ decorator==5.2.1
27
+ easydict==1.13
28
+ einops==0.8.1
29
+ executing==2.2.0
30
+ filelock==3.18.0
31
+ frozenlist==1.7.0
32
+ fsspec==2025.5.1
33
+ gdown==5.2.0
34
+ gitdb==4.0.12
35
+ GitPython==3.1.45
36
+ greenlet==3.2.3
37
+ h11==0.16.0
38
+ h2==4.2.0
39
+ hf-xet==1.1.5
40
+ hpack==4.1.0
41
+ huggingface-hub==0.34.3
42
+ hyperframe==6.1.0
43
+ idna==3.10
44
+ imageio==2.37.0
45
+ inquirerpy==0.3.4
46
+ ipykernel==6.29.5
47
+ ipython==9.3.0
48
+ ipython_pygments_lexers==1.1.1
49
+ ipywidgets==8.1.7
50
+ jedi==0.19.2
51
+ Jinja2==3.1.4
52
+ jsonschema==4.25.0
53
+ jsonschema-specifications==2025.4.1
54
+ jupyter_client==8.6.3
55
+ jupyter_core==5.8.1
56
+ jupyterlab_widgets==3.0.15
57
+ kornia==0.8.1
58
+ kornia_rs==0.1.9
59
+ lazy_loader==0.4
60
+ llvmlite==0.44.0
61
+ Mako==1.3.10
62
+ markdown-it-py==3.0.0
63
+ MarkupSafe==2.1.5
64
+ matplotlib-inline==0.1.7
65
+ matrix-nio==0.25.2
66
+ mdurl==0.1.2
67
+ mpmath==1.3.0
68
+ multidict==6.6.3
69
+ nest-asyncio==1.6.0
70
+ networkx==3.3
71
+ numba==0.61.2
72
+ numpy==2.1.2
73
+ nvidia-cublas-cu12==12.8.3.14
74
+ nvidia-cuda-cupti-cu12==12.8.57
75
+ nvidia-cuda-nvrtc-cu12==12.8.61
76
+ nvidia-cuda-runtime-cu12==12.8.57
77
+ nvidia-cudnn-cu12==9.7.1.26
78
+ nvidia-cufft-cu12==11.3.3.41
79
+ nvidia-cufile-cu12==1.13.0.11
80
+ nvidia-curand-cu12==10.3.9.55
81
+ nvidia-cusolver-cu12==11.7.2.55
82
+ nvidia-cusparse-cu12==12.5.7.53
83
+ nvidia-cusparselt-cu12==0.6.3
84
+ nvidia-nccl-cu12==2.26.2
85
+ nvidia-nvjitlink-cu12==12.8.61
86
+ nvidia-nvtx-cu12==12.8.55
87
+ opencv-python==4.12.0.88
88
+ opencv-python-headless==4.12.0.88
89
+ packaging==25.0
90
+ parso==0.8.4
91
+ pexpect==4.9.0
92
+ pfzy==0.3.4
93
+ pillow==11.0.0
94
+ pixeloe==0.1.4
95
+ platformdirs==4.3.8
96
+ pooch==1.8.2
97
+ prompt_toolkit==3.0.51
98
+ propcache==0.3.2
99
+ psutil==7.0.0
100
+ ptyprocess==0.7.0
101
+ pure_eval==0.2.3
102
+ pycparser==2.22
103
+ pycryptodome==3.23.0
104
+ pydantic==2.11.7
105
+ pydantic-settings==2.10.1
106
+ pydantic_core==2.33.2
107
+ PyGithub==2.7.0
108
+ Pygments==2.19.2
109
+ PyJWT==2.10.1
110
+ PyMatting==1.1.14
111
+ PyNaCl==1.5.0
112
+ PySocks==1.7.1
113
+ python-dateutil==2.9.0.post0
114
+ python-dotenv==1.1.1
115
+ python-socks==2.7.1
116
+ PyYAML==6.0.2
117
+ pyzmq==27.0.0
118
+ referencing==0.36.2
119
+ regex==2025.7.34
120
+ rembg==2.0.67
121
+ requests==2.32.4
122
+ rich==14.1.0
123
+ rpds-py==0.26.0
124
+ safetensors==0.5.3
125
+ scikit-image==0.25.2
126
+ scipy==1.16.1
127
+ sentencepiece==0.2.0
128
+ setuptools==80.9.0
129
+ shellingham==1.5.4
130
+ simsimd==6.5.0
131
+ six==1.17.0
132
+ smmap==5.0.2
133
+ soundfile==0.13.1
134
+ soupsieve==2.7
135
+ spandrel==0.4.1
136
+ SQLAlchemy==2.0.42
137
+ stack-data==0.6.3
138
+ stringzilla==3.12.5
139
+ sympy==1.13.3
140
+ tifffile==2025.6.11
141
+ timm==1.0.19
142
+ tokenizers==0.21.4
143
+ toml==0.10.2
144
+ torch==2.7.1+cu128
145
+ torchaudio==2.7.1+cu128
146
+ torchsde==0.2.6
147
+ torchvision==0.22.1+cu128
148
+ tornado==6.5.1
149
+ tqdm==4.67.1
150
+ traitlets==5.14.3
151
+ trampoline==0.1.2
152
+ transformers==4.54.1
153
+ transparent-background==1.3.4
154
+ triton==3.3.1
155
+ typer==0.16.0
156
+ typing-inspection==0.4.1
157
+ typing_extensions==4.14.0
158
+ unpaddedbase64==2.1.0
159
+ urllib3==2.5.0
160
+ uv==0.8.4
161
+ wcwidth==0.2.13
162
+ wget==3.2
163
+ wheel==0.45.1
164
+ widgetsnbextension==4.0.14
165
+ yarl==1.20.1
.venv-backups/25343869/venv-main-2025-08-27-0630.txt ADDED
@@ -0,0 +1,165 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ aiofiles==24.1.0
2
+ aiohappyeyeballs==2.6.1
3
+ aiohttp==3.12.15
4
+ aiohttp_socks==0.10.1
5
+ aiosignal==1.4.0
6
+ albucore==0.0.24
7
+ albumentations==2.0.8
8
+ alembic==1.16.4
9
+ annotated-types==0.7.0
10
+ asttokens==3.0.0
11
+ attrs==25.3.0
12
+ av==15.0.0
13
+ beautifulsoup4==4.13.4
14
+ certifi==2025.6.15
15
+ cffi==1.17.1
16
+ chardet==5.2.0
17
+ charset-normalizer==3.4.2
18
+ click==8.2.1
19
+ colour-science==0.4.6
20
+ comfyui-embedded-docs==0.2.4
21
+ comfyui_frontend_package==1.23.4
22
+ comfyui_workflow_templates==0.1.41
23
+ comm==0.2.2
24
+ cryptography==45.0.5
25
+ debugpy==1.8.14
26
+ decorator==5.2.1
27
+ easydict==1.13
28
+ einops==0.8.1
29
+ executing==2.2.0
30
+ filelock==3.18.0
31
+ frozenlist==1.7.0
32
+ fsspec==2025.5.1
33
+ gdown==5.2.0
34
+ gitdb==4.0.12
35
+ GitPython==3.1.45
36
+ greenlet==3.2.3
37
+ h11==0.16.0
38
+ h2==4.2.0
39
+ hf-xet==1.1.5
40
+ hpack==4.1.0
41
+ huggingface-hub==0.34.3
42
+ hyperframe==6.1.0
43
+ idna==3.10
44
+ imageio==2.37.0
45
+ inquirerpy==0.3.4
46
+ ipykernel==6.29.5
47
+ ipython==9.3.0
48
+ ipython_pygments_lexers==1.1.1
49
+ ipywidgets==8.1.7
50
+ jedi==0.19.2
51
+ Jinja2==3.1.4
52
+ jsonschema==4.25.0
53
+ jsonschema-specifications==2025.4.1
54
+ jupyter_client==8.6.3
55
+ jupyter_core==5.8.1
56
+ jupyterlab_widgets==3.0.15
57
+ kornia==0.8.1
58
+ kornia_rs==0.1.9
59
+ lazy_loader==0.4
60
+ llvmlite==0.44.0
61
+ Mako==1.3.10
62
+ markdown-it-py==3.0.0
63
+ MarkupSafe==2.1.5
64
+ matplotlib-inline==0.1.7
65
+ matrix-nio==0.25.2
66
+ mdurl==0.1.2
67
+ mpmath==1.3.0
68
+ multidict==6.6.3
69
+ nest-asyncio==1.6.0
70
+ networkx==3.3
71
+ numba==0.61.2
72
+ numpy==2.1.2
73
+ nvidia-cublas-cu12==12.8.3.14
74
+ nvidia-cuda-cupti-cu12==12.8.57
75
+ nvidia-cuda-nvrtc-cu12==12.8.61
76
+ nvidia-cuda-runtime-cu12==12.8.57
77
+ nvidia-cudnn-cu12==9.7.1.26
78
+ nvidia-cufft-cu12==11.3.3.41
79
+ nvidia-cufile-cu12==1.13.0.11
80
+ nvidia-curand-cu12==10.3.9.55
81
+ nvidia-cusolver-cu12==11.7.2.55
82
+ nvidia-cusparse-cu12==12.5.7.53
83
+ nvidia-cusparselt-cu12==0.6.3
84
+ nvidia-nccl-cu12==2.26.2
85
+ nvidia-nvjitlink-cu12==12.8.61
86
+ nvidia-nvtx-cu12==12.8.55
87
+ opencv-python==4.12.0.88
88
+ opencv-python-headless==4.12.0.88
89
+ packaging==25.0
90
+ parso==0.8.4
91
+ pexpect==4.9.0
92
+ pfzy==0.3.4
93
+ pillow==11.0.0
94
+ pixeloe==0.1.4
95
+ platformdirs==4.3.8
96
+ pooch==1.8.2
97
+ prompt_toolkit==3.0.51
98
+ propcache==0.3.2
99
+ psutil==7.0.0
100
+ ptyprocess==0.7.0
101
+ pure_eval==0.2.3
102
+ pycparser==2.22
103
+ pycryptodome==3.23.0
104
+ pydantic==2.11.7
105
+ pydantic-settings==2.10.1
106
+ pydantic_core==2.33.2
107
+ PyGithub==2.7.0
108
+ Pygments==2.19.2
109
+ PyJWT==2.10.1
110
+ PyMatting==1.1.14
111
+ PyNaCl==1.5.0
112
+ PySocks==1.7.1
113
+ python-dateutil==2.9.0.post0
114
+ python-dotenv==1.1.1
115
+ python-socks==2.7.1
116
+ PyYAML==6.0.2
117
+ pyzmq==27.0.0
118
+ referencing==0.36.2
119
+ regex==2025.7.34
120
+ rembg==2.0.67
121
+ requests==2.32.4
122
+ rich==14.1.0
123
+ rpds-py==0.26.0
124
+ safetensors==0.5.3
125
+ scikit-image==0.25.2
126
+ scipy==1.16.1
127
+ sentencepiece==0.2.0
128
+ setuptools==80.9.0
129
+ shellingham==1.5.4
130
+ simsimd==6.5.0
131
+ six==1.17.0
132
+ smmap==5.0.2
133
+ soundfile==0.13.1
134
+ soupsieve==2.7
135
+ spandrel==0.4.1
136
+ SQLAlchemy==2.0.42
137
+ stack-data==0.6.3
138
+ stringzilla==3.12.5
139
+ sympy==1.13.3
140
+ tifffile==2025.6.11
141
+ timm==1.0.19
142
+ tokenizers==0.21.4
143
+ toml==0.10.2
144
+ torch==2.7.1+cu128
145
+ torchaudio==2.7.1+cu128
146
+ torchsde==0.2.6
147
+ torchvision==0.22.1+cu128
148
+ tornado==6.5.1
149
+ tqdm==4.67.1
150
+ traitlets==5.14.3
151
+ trampoline==0.1.2
152
+ transformers==4.54.1
153
+ transparent-background==1.3.4
154
+ triton==3.3.1
155
+ typer==0.16.0
156
+ typing-inspection==0.4.1
157
+ typing_extensions==4.14.0
158
+ unpaddedbase64==2.1.0
159
+ urllib3==2.5.0
160
+ uv==0.8.4
161
+ wcwidth==0.2.13
162
+ wget==3.2
163
+ wheel==0.45.1
164
+ widgetsnbextension==4.0.14
165
+ yarl==1.20.1
.venv-backups/25343869/venv-main-2025-08-27-0700.txt ADDED
@@ -0,0 +1,166 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ aiofiles==24.1.0
2
+ aiohappyeyeballs==2.6.1
3
+ aiohttp==3.12.15
4
+ aiohttp_socks==0.10.1
5
+ aiosignal==1.4.0
6
+ albucore==0.0.24
7
+ albumentations==2.0.8
8
+ alembic==1.16.4
9
+ annotated-types==0.7.0
10
+ asttokens==3.0.0
11
+ attrs==25.3.0
12
+ av==15.0.0
13
+ beautifulsoup4==4.13.4
14
+ certifi==2025.6.15
15
+ cffi==1.17.1
16
+ chardet==5.2.0
17
+ charset-normalizer==3.4.2
18
+ click==8.2.1
19
+ colour-science==0.4.6
20
+ comfyui-embedded-docs==0.2.4
21
+ comfyui_frontend_package==1.23.4
22
+ comfyui_workflow_templates==0.1.41
23
+ comm==0.2.2
24
+ cryptography==45.0.5
25
+ debugpy==1.8.14
26
+ decorator==5.2.1
27
+ easydict==1.13
28
+ einops==0.8.1
29
+ executing==2.2.0
30
+ filelock==3.18.0
31
+ frozenlist==1.7.0
32
+ fsspec==2025.5.1
33
+ gdown==5.2.0
34
+ gitdb==4.0.12
35
+ GitPython==3.1.45
36
+ greenlet==3.2.3
37
+ h11==0.16.0
38
+ h2==4.2.0
39
+ hf-xet==1.1.5
40
+ hpack==4.1.0
41
+ huggingface-hub==0.34.3
42
+ hyperframe==6.1.0
43
+ idna==3.10
44
+ imageio==2.37.0
45
+ inquirerpy==0.3.4
46
+ ipykernel==6.29.5
47
+ ipython==9.3.0
48
+ ipython_pygments_lexers==1.1.1
49
+ ipywidgets==8.1.7
50
+ jedi==0.19.2
51
+ Jinja2==3.1.4
52
+ jsonschema==4.25.0
53
+ jsonschema-specifications==2025.4.1
54
+ jupyter_client==8.6.3
55
+ jupyter_core==5.8.1
56
+ jupyterlab_widgets==3.0.15
57
+ kornia==0.8.1
58
+ kornia_rs==0.1.9
59
+ lazy_loader==0.4
60
+ llvmlite==0.44.0
61
+ Mako==1.3.10
62
+ markdown-it-py==3.0.0
63
+ MarkupSafe==2.1.5
64
+ matplotlib-inline==0.1.7
65
+ matrix-nio==0.25.2
66
+ mdurl==0.1.2
67
+ mpmath==1.3.0
68
+ multidict==6.6.3
69
+ nest-asyncio==1.6.0
70
+ networkx==3.3
71
+ numba==0.61.2
72
+ numpy==2.1.2
73
+ nvidia-cublas-cu12==12.8.3.14
74
+ nvidia-cuda-cupti-cu12==12.8.57
75
+ nvidia-cuda-nvrtc-cu12==12.8.61
76
+ nvidia-cuda-runtime-cu12==12.8.57
77
+ nvidia-cudnn-cu12==9.7.1.26
78
+ nvidia-cufft-cu12==11.3.3.41
79
+ nvidia-cufile-cu12==1.13.0.11
80
+ nvidia-curand-cu12==10.3.9.55
81
+ nvidia-cusolver-cu12==11.7.2.55
82
+ nvidia-cusparse-cu12==12.5.7.53
83
+ nvidia-cusparselt-cu12==0.6.3
84
+ nvidia-nccl-cu12==2.26.2
85
+ nvidia-nvjitlink-cu12==12.8.61
86
+ nvidia-nvtx-cu12==12.8.55
87
+ opencv-python==4.12.0.88
88
+ opencv-python-headless==4.12.0.88
89
+ packaging==25.0
90
+ parso==0.8.4
91
+ pexpect==4.9.0
92
+ pfzy==0.3.4
93
+ piexif==1.1.3
94
+ pillow==11.0.0
95
+ pixeloe==0.1.4
96
+ platformdirs==4.3.8
97
+ pooch==1.8.2
98
+ prompt_toolkit==3.0.51
99
+ propcache==0.3.2
100
+ psutil==7.0.0
101
+ ptyprocess==0.7.0
102
+ pure_eval==0.2.3
103
+ pycparser==2.22
104
+ pycryptodome==3.23.0
105
+ pydantic==2.11.7
106
+ pydantic-settings==2.10.1
107
+ pydantic_core==2.33.2
108
+ PyGithub==2.7.0
109
+ Pygments==2.19.2
110
+ PyJWT==2.10.1
111
+ PyMatting==1.1.14
112
+ PyNaCl==1.5.0
113
+ PySocks==1.7.1
114
+ python-dateutil==2.9.0.post0
115
+ python-dotenv==1.1.1
116
+ python-socks==2.7.1
117
+ PyYAML==6.0.2
118
+ pyzmq==27.0.0
119
+ referencing==0.36.2
120
+ regex==2025.7.34
121
+ rembg==2.0.67
122
+ requests==2.32.4
123
+ rich==14.1.0
124
+ rpds-py==0.26.0
125
+ safetensors==0.5.3
126
+ scikit-image==0.25.2
127
+ scipy==1.16.1
128
+ sentencepiece==0.2.0
129
+ setuptools==80.9.0
130
+ shellingham==1.5.4
131
+ simsimd==6.5.0
132
+ six==1.17.0
133
+ smmap==5.0.2
134
+ soundfile==0.13.1
135
+ soupsieve==2.7
136
+ spandrel==0.4.1
137
+ SQLAlchemy==2.0.42
138
+ stack-data==0.6.3
139
+ stringzilla==3.12.5
140
+ sympy==1.13.3
141
+ tifffile==2025.6.11
142
+ timm==1.0.19
143
+ tokenizers==0.21.4
144
+ toml==0.10.2
145
+ torch==2.7.1+cu128
146
+ torchaudio==2.7.1+cu128
147
+ torchsde==0.2.6
148
+ torchvision==0.22.1+cu128
149
+ tornado==6.5.1
150
+ tqdm==4.67.1
151
+ traitlets==5.14.3
152
+ trampoline==0.1.2
153
+ transformers==4.54.1
154
+ transparent-background==1.3.4
155
+ triton==3.3.1
156
+ typer==0.16.0
157
+ typing-inspection==0.4.1
158
+ typing_extensions==4.14.0
159
+ unpaddedbase64==2.1.0
160
+ urllib3==2.5.0
161
+ uv==0.8.4
162
+ wcwidth==0.2.13
163
+ wget==3.2
164
+ wheel==0.45.1
165
+ widgetsnbextension==4.0.14
166
+ yarl==1.20.1
.venv-backups/25343869/venv-main-2025-08-27-0800.txt ADDED
@@ -0,0 +1,173 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ aiofiles==24.1.0
2
+ aiohappyeyeballs==2.6.1
3
+ aiohttp==3.12.15
4
+ aiohttp_socks==0.10.1
5
+ aiosignal==1.4.0
6
+ albucore==0.0.24
7
+ albumentations==2.0.8
8
+ alembic==1.16.4
9
+ annotated-types==0.7.0
10
+ asttokens==3.0.0
11
+ attrs==25.3.0
12
+ av==15.0.0
13
+ beautifulsoup4==4.13.4
14
+ certifi==2025.6.15
15
+ cffi==1.17.1
16
+ chardet==5.2.0
17
+ charset-normalizer==3.4.2
18
+ click==8.2.1
19
+ colour-science==0.4.6
20
+ comfyui-embedded-docs==0.2.4
21
+ comfyui_frontend_package==1.23.4
22
+ comfyui_workflow_templates==0.1.41
23
+ comm==0.2.2
24
+ contourpy==1.3.3
25
+ cryptography==45.0.5
26
+ cycler==0.12.1
27
+ debugpy==1.8.14
28
+ decorator==5.2.1
29
+ easydict==1.13
30
+ einops==0.8.1
31
+ executing==2.2.0
32
+ filelock==3.18.0
33
+ fonttools==4.59.1
34
+ frozenlist==1.7.0
35
+ fsspec==2025.5.1
36
+ gdown==5.2.0
37
+ gitdb==4.0.12
38
+ GitPython==3.1.45
39
+ greenlet==3.2.3
40
+ h11==0.16.0
41
+ h2==4.2.0
42
+ hf-xet==1.1.5
43
+ hpack==4.1.0
44
+ huggingface-hub==0.34.3
45
+ hyperframe==6.1.0
46
+ idna==3.10
47
+ imageio==2.37.0
48
+ inquirerpy==0.3.4
49
+ ipykernel==6.29.5
50
+ ipython==9.3.0
51
+ ipython_pygments_lexers==1.1.1
52
+ ipywidgets==8.1.7
53
+ jedi==0.19.2
54
+ Jinja2==3.1.4
55
+ jsonschema==4.25.0
56
+ jsonschema-specifications==2025.4.1
57
+ jupyter_client==8.6.3
58
+ jupyter_core==5.8.1
59
+ jupyterlab_widgets==3.0.15
60
+ kiwisolver==1.4.9
61
+ kornia==0.8.1
62
+ kornia_rs==0.1.9
63
+ lazy_loader==0.4
64
+ llvmlite==0.44.0
65
+ Mako==1.3.10
66
+ markdown-it-py==3.0.0
67
+ MarkupSafe==2.1.5
68
+ matplotlib==3.10.5
69
+ matplotlib-inline==0.1.7
70
+ matrix-nio==0.25.2
71
+ mdurl==0.1.2
72
+ mpmath==1.3.0
73
+ multidict==6.6.3
74
+ nest-asyncio==1.6.0
75
+ networkx==3.3
76
+ numba==0.61.2
77
+ numpy==2.1.2
78
+ nvidia-cublas-cu12==12.8.3.14
79
+ nvidia-cuda-cupti-cu12==12.8.57
80
+ nvidia-cuda-nvrtc-cu12==12.8.61
81
+ nvidia-cuda-runtime-cu12==12.8.57
82
+ nvidia-cudnn-cu12==9.7.1.26
83
+ nvidia-cufft-cu12==11.3.3.41
84
+ nvidia-cufile-cu12==1.13.0.11
85
+ nvidia-curand-cu12==10.3.9.55
86
+ nvidia-cusolver-cu12==11.7.2.55
87
+ nvidia-cusparse-cu12==12.5.7.53
88
+ nvidia-cusparselt-cu12==0.6.3
89
+ nvidia-nccl-cu12==2.26.2
90
+ nvidia-nvjitlink-cu12==12.8.61
91
+ nvidia-nvtx-cu12==12.8.55
92
+ opencv-python==4.12.0.88
93
+ opencv-python-headless==4.12.0.88
94
+ packaging==25.0
95
+ parso==0.8.4
96
+ pexpect==4.9.0
97
+ pfzy==0.3.4
98
+ piexif==1.1.3
99
+ pillow==11.0.0
100
+ pixeloe==0.1.4
101
+ platformdirs==4.3.8
102
+ pooch==1.8.2
103
+ prompt_toolkit==3.0.51
104
+ propcache==0.3.2
105
+ psutil==7.0.0
106
+ ptyprocess==0.7.0
107
+ pure_eval==0.2.3
108
+ pycparser==2.22
109
+ pycryptodome==3.23.0
110
+ pydantic==2.11.7
111
+ pydantic-settings==2.10.1
112
+ pydantic_core==2.33.2
113
+ PyGithub==2.7.0
114
+ Pygments==2.19.2
115
+ PyJWT==2.10.1
116
+ PyMatting==1.1.14
117
+ PyNaCl==1.5.0
118
+ pyparsing==3.2.3
119
+ PySocks==1.7.1
120
+ python-dateutil==2.9.0.post0
121
+ python-dotenv==1.1.1
122
+ python-socks==2.7.1
123
+ PyWavelets==1.9.0
124
+ PyYAML==6.0.2
125
+ pyzmq==27.0.0
126
+ referencing==0.36.2
127
+ regex==2025.7.34
128
+ rembg==2.0.67
129
+ requests==2.32.4
130
+ rich==14.1.0
131
+ rpds-py==0.26.0
132
+ safetensors==0.5.3
133
+ scikit-image==0.25.2
134
+ scipy==1.16.1
135
+ sentencepiece==0.2.0
136
+ setuptools==80.9.0
137
+ shellingham==1.5.4
138
+ simsimd==6.5.0
139
+ six==1.17.0
140
+ smmap==5.0.2
141
+ soundfile==0.13.1
142
+ soupsieve==2.7
143
+ spandrel==0.4.1
144
+ SQLAlchemy==2.0.42
145
+ stack-data==0.6.3
146
+ stringzilla==3.12.5
147
+ sympy==1.13.3
148
+ tifffile==2025.6.11
149
+ timm==1.0.19
150
+ tokenizers==0.21.4
151
+ toml==0.10.2
152
+ torch==2.7.1+cu128
153
+ torchaudio==2.7.1+cu128
154
+ torchsde==0.2.6
155
+ torchvision==0.22.1+cu128
156
+ tornado==6.5.1
157
+ tqdm==4.67.1
158
+ traitlets==5.14.3
159
+ trampoline==0.1.2
160
+ transformers==4.54.1
161
+ transparent-background==1.3.4
162
+ triton==3.3.1
163
+ typer==0.16.0
164
+ typing-inspection==0.4.1
165
+ typing_extensions==4.14.0
166
+ unpaddedbase64==2.1.0
167
+ urllib3==2.5.0
168
+ uv==0.8.4
169
+ wcwidth==0.2.13
170
+ wget==3.2
171
+ wheel==0.45.1
172
+ widgetsnbextension==4.0.14
173
+ yarl==1.20.1
.venv-backups/25343869/venv-main-2025-08-27-0830.txt ADDED
@@ -0,0 +1,173 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ aiofiles==24.1.0
2
+ aiohappyeyeballs==2.6.1
3
+ aiohttp==3.12.15
4
+ aiohttp_socks==0.10.1
5
+ aiosignal==1.4.0
6
+ albucore==0.0.24
7
+ albumentations==2.0.8
8
+ alembic==1.16.4
9
+ annotated-types==0.7.0
10
+ asttokens==3.0.0
11
+ attrs==25.3.0
12
+ av==15.0.0
13
+ beautifulsoup4==4.13.4
14
+ certifi==2025.6.15
15
+ cffi==1.17.1
16
+ chardet==5.2.0
17
+ charset-normalizer==3.4.2
18
+ click==8.2.1
19
+ colour-science==0.4.6
20
+ comfyui-embedded-docs==0.2.4
21
+ comfyui_frontend_package==1.23.4
22
+ comfyui_workflow_templates==0.1.41
23
+ comm==0.2.2
24
+ contourpy==1.3.3
25
+ cryptography==45.0.5
26
+ cycler==0.12.1
27
+ debugpy==1.8.14
28
+ decorator==5.2.1
29
+ easydict==1.13
30
+ einops==0.8.1
31
+ executing==2.2.0
32
+ filelock==3.18.0
33
+ fonttools==4.59.1
34
+ frozenlist==1.7.0
35
+ fsspec==2025.5.1
36
+ gdown==5.2.0
37
+ gitdb==4.0.12
38
+ GitPython==3.1.45
39
+ greenlet==3.2.3
40
+ h11==0.16.0
41
+ h2==4.2.0
42
+ hf-xet==1.1.5
43
+ hpack==4.1.0
44
+ huggingface-hub==0.34.3
45
+ hyperframe==6.1.0
46
+ idna==3.10
47
+ imageio==2.37.0
48
+ inquirerpy==0.3.4
49
+ ipykernel==6.29.5
50
+ ipython==9.3.0
51
+ ipython_pygments_lexers==1.1.1
52
+ ipywidgets==8.1.7
53
+ jedi==0.19.2
54
+ Jinja2==3.1.4
55
+ jsonschema==4.25.0
56
+ jsonschema-specifications==2025.4.1
57
+ jupyter_client==8.6.3
58
+ jupyter_core==5.8.1
59
+ jupyterlab_widgets==3.0.15
60
+ kiwisolver==1.4.9
61
+ kornia==0.8.1
62
+ kornia_rs==0.1.9
63
+ lazy_loader==0.4
64
+ llvmlite==0.44.0
65
+ Mako==1.3.10
66
+ markdown-it-py==3.0.0
67
+ MarkupSafe==2.1.5
68
+ matplotlib==3.10.5
69
+ matplotlib-inline==0.1.7
70
+ matrix-nio==0.25.2
71
+ mdurl==0.1.2
72
+ mpmath==1.3.0
73
+ multidict==6.6.3
74
+ nest-asyncio==1.6.0
75
+ networkx==3.3
76
+ numba==0.61.2
77
+ numpy==2.1.2
78
+ nvidia-cublas-cu12==12.8.3.14
79
+ nvidia-cuda-cupti-cu12==12.8.57
80
+ nvidia-cuda-nvrtc-cu12==12.8.61
81
+ nvidia-cuda-runtime-cu12==12.8.57
82
+ nvidia-cudnn-cu12==9.7.1.26
83
+ nvidia-cufft-cu12==11.3.3.41
84
+ nvidia-cufile-cu12==1.13.0.11
85
+ nvidia-curand-cu12==10.3.9.55
86
+ nvidia-cusolver-cu12==11.7.2.55
87
+ nvidia-cusparse-cu12==12.5.7.53
88
+ nvidia-cusparselt-cu12==0.6.3
89
+ nvidia-nccl-cu12==2.26.2
90
+ nvidia-nvjitlink-cu12==12.8.61
91
+ nvidia-nvtx-cu12==12.8.55
92
+ opencv-python==4.12.0.88
93
+ opencv-python-headless==4.12.0.88
94
+ packaging==25.0
95
+ parso==0.8.4
96
+ pexpect==4.9.0
97
+ pfzy==0.3.4
98
+ piexif==1.1.3
99
+ pillow==11.0.0
100
+ pixeloe==0.1.4
101
+ platformdirs==4.3.8
102
+ pooch==1.8.2
103
+ prompt_toolkit==3.0.51
104
+ propcache==0.3.2
105
+ psutil==7.0.0
106
+ ptyprocess==0.7.0
107
+ pure_eval==0.2.3
108
+ pycparser==2.22
109
+ pycryptodome==3.23.0
110
+ pydantic==2.11.7
111
+ pydantic-settings==2.10.1
112
+ pydantic_core==2.33.2
113
+ PyGithub==2.7.0
114
+ Pygments==2.19.2
115
+ PyJWT==2.10.1
116
+ PyMatting==1.1.14
117
+ PyNaCl==1.5.0
118
+ pyparsing==3.2.3
119
+ PySocks==1.7.1
120
+ python-dateutil==2.9.0.post0
121
+ python-dotenv==1.1.1
122
+ python-socks==2.7.1
123
+ PyWavelets==1.9.0
124
+ PyYAML==6.0.2
125
+ pyzmq==27.0.0
126
+ referencing==0.36.2
127
+ regex==2025.7.34
128
+ rembg==2.0.67
129
+ requests==2.32.4
130
+ rich==14.1.0
131
+ rpds-py==0.26.0
132
+ safetensors==0.5.3
133
+ scikit-image==0.25.2
134
+ scipy==1.16.1
135
+ sentencepiece==0.2.0
136
+ setuptools==80.9.0
137
+ shellingham==1.5.4
138
+ simsimd==6.5.0
139
+ six==1.17.0
140
+ smmap==5.0.2
141
+ soundfile==0.13.1
142
+ soupsieve==2.7
143
+ spandrel==0.4.1
144
+ SQLAlchemy==2.0.42
145
+ stack-data==0.6.3
146
+ stringzilla==3.12.5
147
+ sympy==1.13.3
148
+ tifffile==2025.6.11
149
+ timm==1.0.19
150
+ tokenizers==0.21.4
151
+ toml==0.10.2
152
+ torch==2.7.1+cu128
153
+ torchaudio==2.7.1+cu128
154
+ torchsde==0.2.6
155
+ torchvision==0.22.1+cu128
156
+ tornado==6.5.1
157
+ tqdm==4.67.1
158
+ traitlets==5.14.3
159
+ trampoline==0.1.2
160
+ transformers==4.54.1
161
+ transparent-background==1.3.4
162
+ triton==3.3.1
163
+ typer==0.16.0
164
+ typing-inspection==0.4.1
165
+ typing_extensions==4.14.0
166
+ unpaddedbase64==2.1.0
167
+ urllib3==2.5.0
168
+ uv==0.8.4
169
+ wcwidth==0.2.13
170
+ wget==3.2
171
+ wheel==0.45.1
172
+ widgetsnbextension==4.0.14
173
+ yarl==1.20.1
.venv-backups/25343869/venv-main-2025-08-27-0900.txt ADDED
@@ -0,0 +1,173 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ aiofiles==24.1.0
2
+ aiohappyeyeballs==2.6.1
3
+ aiohttp==3.12.15
4
+ aiohttp_socks==0.10.1
5
+ aiosignal==1.4.0
6
+ albucore==0.0.24
7
+ albumentations==2.0.8
8
+ alembic==1.16.4
9
+ annotated-types==0.7.0
10
+ asttokens==3.0.0
11
+ attrs==25.3.0
12
+ av==15.0.0
13
+ beautifulsoup4==4.13.4
14
+ certifi==2025.6.15
15
+ cffi==1.17.1
16
+ chardet==5.2.0
17
+ charset-normalizer==3.4.2
18
+ click==8.2.1
19
+ colour-science==0.4.6
20
+ comfyui-embedded-docs==0.2.4
21
+ comfyui_frontend_package==1.23.4
22
+ comfyui_workflow_templates==0.1.41
23
+ comm==0.2.2
24
+ contourpy==1.3.3
25
+ cryptography==45.0.5
26
+ cycler==0.12.1
27
+ debugpy==1.8.14
28
+ decorator==5.2.1
29
+ easydict==1.13
30
+ einops==0.8.1
31
+ executing==2.2.0
32
+ filelock==3.18.0
33
+ fonttools==4.59.1
34
+ frozenlist==1.7.0
35
+ fsspec==2025.5.1
36
+ gdown==5.2.0
37
+ gitdb==4.0.12
38
+ GitPython==3.1.45
39
+ greenlet==3.2.3
40
+ h11==0.16.0
41
+ h2==4.2.0
42
+ hf-xet==1.1.5
43
+ hpack==4.1.0
44
+ huggingface-hub==0.34.3
45
+ hyperframe==6.1.0
46
+ idna==3.10
47
+ imageio==2.37.0
48
+ inquirerpy==0.3.4
49
+ ipykernel==6.29.5
50
+ ipython==9.3.0
51
+ ipython_pygments_lexers==1.1.1
52
+ ipywidgets==8.1.7
53
+ jedi==0.19.2
54
+ Jinja2==3.1.4
55
+ jsonschema==4.25.0
56
+ jsonschema-specifications==2025.4.1
57
+ jupyter_client==8.6.3
58
+ jupyter_core==5.8.1
59
+ jupyterlab_widgets==3.0.15
60
+ kiwisolver==1.4.9
61
+ kornia==0.8.1
62
+ kornia_rs==0.1.9
63
+ lazy_loader==0.4
64
+ llvmlite==0.44.0
65
+ Mako==1.3.10
66
+ markdown-it-py==3.0.0
67
+ MarkupSafe==2.1.5
68
+ matplotlib==3.10.5
69
+ matplotlib-inline==0.1.7
70
+ matrix-nio==0.25.2
71
+ mdurl==0.1.2
72
+ mpmath==1.3.0
73
+ multidict==6.6.3
74
+ nest-asyncio==1.6.0
75
+ networkx==3.3
76
+ numba==0.61.2
77
+ numpy==2.1.2
78
+ nvidia-cublas-cu12==12.8.3.14
79
+ nvidia-cuda-cupti-cu12==12.8.57
80
+ nvidia-cuda-nvrtc-cu12==12.8.61
81
+ nvidia-cuda-runtime-cu12==12.8.57
82
+ nvidia-cudnn-cu12==9.7.1.26
83
+ nvidia-cufft-cu12==11.3.3.41
84
+ nvidia-cufile-cu12==1.13.0.11
85
+ nvidia-curand-cu12==10.3.9.55
86
+ nvidia-cusolver-cu12==11.7.2.55
87
+ nvidia-cusparse-cu12==12.5.7.53
88
+ nvidia-cusparselt-cu12==0.6.3
89
+ nvidia-nccl-cu12==2.26.2
90
+ nvidia-nvjitlink-cu12==12.8.61
91
+ nvidia-nvtx-cu12==12.8.55
92
+ opencv-python==4.12.0.88
93
+ opencv-python-headless==4.12.0.88
94
+ packaging==25.0
95
+ parso==0.8.4
96
+ pexpect==4.9.0
97
+ pfzy==0.3.4
98
+ piexif==1.1.3
99
+ pillow==11.0.0
100
+ pixeloe==0.1.4
101
+ platformdirs==4.3.8
102
+ pooch==1.8.2
103
+ prompt_toolkit==3.0.51
104
+ propcache==0.3.2
105
+ psutil==7.0.0
106
+ ptyprocess==0.7.0
107
+ pure_eval==0.2.3
108
+ pycparser==2.22
109
+ pycryptodome==3.23.0
110
+ pydantic==2.11.7
111
+ pydantic-settings==2.10.1
112
+ pydantic_core==2.33.2
113
+ PyGithub==2.7.0
114
+ Pygments==2.19.2
115
+ PyJWT==2.10.1
116
+ PyMatting==1.1.14
117
+ PyNaCl==1.5.0
118
+ pyparsing==3.2.3
119
+ PySocks==1.7.1
120
+ python-dateutil==2.9.0.post0
121
+ python-dotenv==1.1.1
122
+ python-socks==2.7.1
123
+ PyWavelets==1.9.0
124
+ PyYAML==6.0.2
125
+ pyzmq==27.0.0
126
+ referencing==0.36.2
127
+ regex==2025.7.34
128
+ rembg==2.0.67
129
+ requests==2.32.4
130
+ rich==14.1.0
131
+ rpds-py==0.26.0
132
+ safetensors==0.5.3
133
+ scikit-image==0.25.2
134
+ scipy==1.16.1
135
+ sentencepiece==0.2.0
136
+ setuptools==80.9.0
137
+ shellingham==1.5.4
138
+ simsimd==6.5.0
139
+ six==1.17.0
140
+ smmap==5.0.2
141
+ soundfile==0.13.1
142
+ soupsieve==2.7
143
+ spandrel==0.4.1
144
+ SQLAlchemy==2.0.42
145
+ stack-data==0.6.3
146
+ stringzilla==3.12.5
147
+ sympy==1.13.3
148
+ tifffile==2025.6.11
149
+ timm==1.0.19
150
+ tokenizers==0.21.4
151
+ toml==0.10.2
152
+ torch==2.7.1+cu128
153
+ torchaudio==2.7.1+cu128
154
+ torchsde==0.2.6
155
+ torchvision==0.22.1+cu128
156
+ tornado==6.5.1
157
+ tqdm==4.67.1
158
+ traitlets==5.14.3
159
+ trampoline==0.1.2
160
+ transformers==4.54.1
161
+ transparent-background==1.3.4
162
+ triton==3.3.1
163
+ typer==0.16.0
164
+ typing-inspection==0.4.1
165
+ typing_extensions==4.14.0
166
+ unpaddedbase64==2.1.0
167
+ urllib3==2.5.0
168
+ uv==0.8.4
169
+ wcwidth==0.2.13
170
+ wget==3.2
171
+ wheel==0.45.1
172
+ widgetsnbextension==4.0.14
173
+ yarl==1.20.1
.venv-backups/25343869/venv-main-2025-08-27-1000.txt ADDED
@@ -0,0 +1,178 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ aiofiles==24.1.0
2
+ aiohappyeyeballs==2.6.1
3
+ aiohttp==3.12.15
4
+ aiohttp_socks==0.10.1
5
+ aiosignal==1.4.0
6
+ albucore==0.0.24
7
+ albumentations==2.0.8
8
+ alembic==1.16.4
9
+ annotated-types==0.7.0
10
+ asttokens==3.0.0
11
+ attrs==25.3.0
12
+ av==15.0.0
13
+ beautifulsoup4==4.13.4
14
+ certifi==2025.6.15
15
+ cffi==1.17.1
16
+ chardet==5.2.0
17
+ charset-normalizer==3.4.2
18
+ click==8.2.1
19
+ color-matcher==0.6.0
20
+ colour-science==0.4.6
21
+ comfyui-embedded-docs==0.2.4
22
+ comfyui_frontend_package==1.23.4
23
+ comfyui_workflow_templates==0.1.41
24
+ comm==0.2.2
25
+ contourpy==1.3.3
26
+ cryptography==45.0.5
27
+ cycler==0.12.1
28
+ ddt==1.7.2
29
+ debugpy==1.8.14
30
+ decorator==5.2.1
31
+ docutils==0.22
32
+ easydict==1.13
33
+ einops==0.8.1
34
+ executing==2.2.0
35
+ filelock==3.18.0
36
+ fonttools==4.59.1
37
+ frozenlist==1.7.0
38
+ fsspec==2025.5.1
39
+ gdown==5.2.0
40
+ gitdb==4.0.12
41
+ GitPython==3.1.45
42
+ greenlet==3.2.3
43
+ h11==0.16.0
44
+ h2==4.2.0
45
+ hf-xet==1.1.5
46
+ hpack==4.1.0
47
+ huggingface-hub==0.34.3
48
+ hyperframe==6.1.0
49
+ idna==3.10
50
+ imageio==2.37.0
51
+ inquirerpy==0.3.4
52
+ ipykernel==6.29.5
53
+ ipython==9.3.0
54
+ ipython_pygments_lexers==1.1.1
55
+ ipywidgets==8.1.7
56
+ jedi==0.19.2
57
+ Jinja2==3.1.4
58
+ jsonschema==4.25.0
59
+ jsonschema-specifications==2025.4.1
60
+ jupyter_client==8.6.3
61
+ jupyter_core==5.8.1
62
+ jupyterlab_widgets==3.0.15
63
+ kiwisolver==1.4.9
64
+ kornia==0.8.1
65
+ kornia_rs==0.1.9
66
+ lazy_loader==0.4
67
+ llvmlite==0.44.0
68
+ Mako==1.3.10
69
+ markdown-it-py==3.0.0
70
+ MarkupSafe==2.1.5
71
+ matplotlib==3.10.5
72
+ matplotlib-inline==0.1.7
73
+ matrix-nio==0.25.2
74
+ mdurl==0.1.2
75
+ mpmath==1.3.0
76
+ mss==10.1.0
77
+ multidict==6.6.3
78
+ nest-asyncio==1.6.0
79
+ networkx==3.3
80
+ numba==0.61.2
81
+ numpy==2.1.2
82
+ nvidia-cublas-cu12==12.8.3.14
83
+ nvidia-cuda-cupti-cu12==12.8.57
84
+ nvidia-cuda-nvrtc-cu12==12.8.61
85
+ nvidia-cuda-runtime-cu12==12.8.57
86
+ nvidia-cudnn-cu12==9.7.1.26
87
+ nvidia-cufft-cu12==11.3.3.41
88
+ nvidia-cufile-cu12==1.13.0.11
89
+ nvidia-curand-cu12==10.3.9.55
90
+ nvidia-cusolver-cu12==11.7.2.55
91
+ nvidia-cusparse-cu12==12.5.7.53
92
+ nvidia-cusparselt-cu12==0.6.3
93
+ nvidia-nccl-cu12==2.26.2
94
+ nvidia-nvjitlink-cu12==12.8.61
95
+ nvidia-nvtx-cu12==12.8.55
96
+ opencv-python==4.12.0.88
97
+ opencv-python-headless==4.12.0.88
98
+ packaging==25.0
99
+ parso==0.8.4
100
+ pexpect==4.9.0
101
+ pfzy==0.3.4
102
+ piexif==1.1.3
103
+ pillow==11.0.0
104
+ pixeloe==0.1.4
105
+ platformdirs==4.3.8
106
+ pooch==1.8.2
107
+ prompt_toolkit==3.0.51
108
+ propcache==0.3.2
109
+ psutil==7.0.0
110
+ ptyprocess==0.7.0
111
+ pure_eval==0.2.3
112
+ pycparser==2.22
113
+ pycryptodome==3.23.0
114
+ pydantic==2.11.7
115
+ pydantic-settings==2.10.1
116
+ pydantic_core==2.33.2
117
+ PyGithub==2.7.0
118
+ Pygments==2.19.2
119
+ PyJWT==2.10.1
120
+ PyMatting==1.1.14
121
+ PyNaCl==1.5.0
122
+ pyparsing==3.2.3
123
+ PySocks==1.7.1
124
+ python-dateutil==2.9.0.post0
125
+ python-dotenv==1.1.1
126
+ python-socks==2.7.1
127
+ PyWavelets==1.9.0
128
+ PyYAML==6.0.2
129
+ pyzmq==27.0.0
130
+ referencing==0.36.2
131
+ regex==2025.7.34
132
+ rembg==2.0.67
133
+ requests==2.32.4
134
+ rich==14.1.0
135
+ rpds-py==0.26.0
136
+ safetensors==0.5.3
137
+ sageattention @ file:///workspace/sageattention-2.1.1-cp312-cp312-linux_x86_64.whl#sha256=13a5e89433f26b8ced2c00c251bb24d76c4589c4f728bcb3adf753aed0257a1c
138
+ scikit-image==0.25.2
139
+ scipy==1.16.1
140
+ sentencepiece==0.2.0
141
+ setuptools==80.9.0
142
+ shellingham==1.5.4
143
+ simsimd==6.5.0
144
+ six==1.17.0
145
+ smmap==5.0.2
146
+ soundfile==0.13.1
147
+ soupsieve==2.7
148
+ spandrel==0.4.1
149
+ SQLAlchemy==2.0.42
150
+ stack-data==0.6.3
151
+ stringzilla==3.12.5
152
+ sympy==1.13.3
153
+ tifffile==2025.6.11
154
+ timm==1.0.19
155
+ tokenizers==0.21.4
156
+ toml==0.10.2
157
+ torch==2.7.0+cu128
158
+ torchaudio==2.7.0+cu128
159
+ torchsde==0.2.6
160
+ torchvision==0.22.0+cu128
161
+ tornado==6.5.1
162
+ tqdm==4.67.1
163
+ traitlets==5.14.3
164
+ trampoline==0.1.2
165
+ transformers==4.54.1
166
+ transparent-background==1.3.4
167
+ triton==3.3.0
168
+ typer==0.16.0
169
+ typing-inspection==0.4.1
170
+ typing_extensions==4.14.0
171
+ unpaddedbase64==2.1.0
172
+ urllib3==2.5.0
173
+ uv==0.8.4
174
+ wcwidth==0.2.13
175
+ wget==3.2
176
+ wheel==0.45.1
177
+ widgetsnbextension==4.0.14
178
+ yarl==1.20.1
.venv-backups/25343869/venv-main-2025-08-27-1030.txt ADDED
@@ -0,0 +1,178 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ aiofiles==24.1.0
2
+ aiohappyeyeballs==2.6.1
3
+ aiohttp==3.12.15
4
+ aiohttp_socks==0.10.1
5
+ aiosignal==1.4.0
6
+ albucore==0.0.24
7
+ albumentations==2.0.8
8
+ alembic==1.16.4
9
+ annotated-types==0.7.0
10
+ asttokens==3.0.0
11
+ attrs==25.3.0
12
+ av==15.0.0
13
+ beautifulsoup4==4.13.4
14
+ certifi==2025.6.15
15
+ cffi==1.17.1
16
+ chardet==5.2.0
17
+ charset-normalizer==3.4.2
18
+ click==8.2.1
19
+ color-matcher==0.6.0
20
+ colour-science==0.4.6
21
+ comfyui-embedded-docs==0.2.4
22
+ comfyui_frontend_package==1.23.4
23
+ comfyui_workflow_templates==0.1.41
24
+ comm==0.2.2
25
+ contourpy==1.3.3
26
+ cryptography==45.0.5
27
+ cycler==0.12.1
28
+ ddt==1.7.2
29
+ debugpy==1.8.14
30
+ decorator==5.2.1
31
+ docutils==0.22
32
+ easydict==1.13
33
+ einops==0.8.1
34
+ executing==2.2.0
35
+ filelock==3.18.0
36
+ fonttools==4.59.1
37
+ frozenlist==1.7.0
38
+ fsspec==2025.5.1
39
+ gdown==5.2.0
40
+ gitdb==4.0.12
41
+ GitPython==3.1.45
42
+ greenlet==3.2.3
43
+ h11==0.16.0
44
+ h2==4.2.0
45
+ hf-xet==1.1.5
46
+ hpack==4.1.0
47
+ huggingface-hub==0.34.3
48
+ hyperframe==6.1.0
49
+ idna==3.10
50
+ imageio==2.37.0
51
+ inquirerpy==0.3.4
52
+ ipykernel==6.29.5
53
+ ipython==9.3.0
54
+ ipython_pygments_lexers==1.1.1
55
+ ipywidgets==8.1.7
56
+ jedi==0.19.2
57
+ Jinja2==3.1.4
58
+ jsonschema==4.25.0
59
+ jsonschema-specifications==2025.4.1
60
+ jupyter_client==8.6.3
61
+ jupyter_core==5.8.1
62
+ jupyterlab_widgets==3.0.15
63
+ kiwisolver==1.4.9
64
+ kornia==0.8.1
65
+ kornia_rs==0.1.9
66
+ lazy_loader==0.4
67
+ llvmlite==0.44.0
68
+ Mako==1.3.10
69
+ markdown-it-py==3.0.0
70
+ MarkupSafe==2.1.5
71
+ matplotlib==3.10.5
72
+ matplotlib-inline==0.1.7
73
+ matrix-nio==0.25.2
74
+ mdurl==0.1.2
75
+ mpmath==1.3.0
76
+ mss==10.1.0
77
+ multidict==6.6.3
78
+ nest-asyncio==1.6.0
79
+ networkx==3.3
80
+ numba==0.61.2
81
+ numpy==2.1.2
82
+ nvidia-cublas-cu12==12.8.3.14
83
+ nvidia-cuda-cupti-cu12==12.8.57
84
+ nvidia-cuda-nvrtc-cu12==12.8.61
85
+ nvidia-cuda-runtime-cu12==12.8.57
86
+ nvidia-cudnn-cu12==9.7.1.26
87
+ nvidia-cufft-cu12==11.3.3.41
88
+ nvidia-cufile-cu12==1.13.0.11
89
+ nvidia-curand-cu12==10.3.9.55
90
+ nvidia-cusolver-cu12==11.7.2.55
91
+ nvidia-cusparse-cu12==12.5.7.53
92
+ nvidia-cusparselt-cu12==0.6.3
93
+ nvidia-nccl-cu12==2.26.2
94
+ nvidia-nvjitlink-cu12==12.8.61
95
+ nvidia-nvtx-cu12==12.8.55
96
+ opencv-python==4.12.0.88
97
+ opencv-python-headless==4.12.0.88
98
+ packaging==25.0
99
+ parso==0.8.4
100
+ pexpect==4.9.0
101
+ pfzy==0.3.4
102
+ piexif==1.1.3
103
+ pillow==11.0.0
104
+ pixeloe==0.1.4
105
+ platformdirs==4.3.8
106
+ pooch==1.8.2
107
+ prompt_toolkit==3.0.51
108
+ propcache==0.3.2
109
+ psutil==7.0.0
110
+ ptyprocess==0.7.0
111
+ pure_eval==0.2.3
112
+ pycparser==2.22
113
+ pycryptodome==3.23.0
114
+ pydantic==2.11.7
115
+ pydantic-settings==2.10.1
116
+ pydantic_core==2.33.2
117
+ PyGithub==2.7.0
118
+ Pygments==2.19.2
119
+ PyJWT==2.10.1
120
+ PyMatting==1.1.14
121
+ PyNaCl==1.5.0
122
+ pyparsing==3.2.3
123
+ PySocks==1.7.1
124
+ python-dateutil==2.9.0.post0
125
+ python-dotenv==1.1.1
126
+ python-socks==2.7.1
127
+ PyWavelets==1.9.0
128
+ PyYAML==6.0.2
129
+ pyzmq==27.0.0
130
+ referencing==0.36.2
131
+ regex==2025.7.34
132
+ rembg==2.0.67
133
+ requests==2.32.4
134
+ rich==14.1.0
135
+ rpds-py==0.26.0
136
+ safetensors==0.5.3
137
+ sageattention @ file:///workspace/sageattention-2.1.1-cp312-cp312-linux_x86_64.whl#sha256=13a5e89433f26b8ced2c00c251bb24d76c4589c4f728bcb3adf753aed0257a1c
138
+ scikit-image==0.25.2
139
+ scipy==1.16.1
140
+ sentencepiece==0.2.0
141
+ setuptools==80.9.0
142
+ shellingham==1.5.4
143
+ simsimd==6.5.0
144
+ six==1.17.0
145
+ smmap==5.0.2
146
+ soundfile==0.13.1
147
+ soupsieve==2.7
148
+ spandrel==0.4.1
149
+ SQLAlchemy==2.0.42
150
+ stack-data==0.6.3
151
+ stringzilla==3.12.5
152
+ sympy==1.13.3
153
+ tifffile==2025.6.11
154
+ timm==1.0.19
155
+ tokenizers==0.21.4
156
+ toml==0.10.2
157
+ torch==2.7.0+cu128
158
+ torchaudio==2.7.0+cu128
159
+ torchsde==0.2.6
160
+ torchvision==0.22.0+cu128
161
+ tornado==6.5.1
162
+ tqdm==4.67.1
163
+ traitlets==5.14.3
164
+ trampoline==0.1.2
165
+ transformers==4.54.1
166
+ transparent-background==1.3.4
167
+ triton==3.3.0
168
+ typer==0.16.0
169
+ typing-inspection==0.4.1
170
+ typing_extensions==4.14.0
171
+ unpaddedbase64==2.1.0
172
+ urllib3==2.5.0
173
+ uv==0.8.4
174
+ wcwidth==0.2.13
175
+ wget==3.2
176
+ wheel==0.45.1
177
+ widgetsnbextension==4.0.14
178
+ yarl==1.20.1
.venv-backups/25343869/venv-main-2025-08-27-1100.txt ADDED
@@ -0,0 +1,178 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ aiofiles==24.1.0
2
+ aiohappyeyeballs==2.6.1
3
+ aiohttp==3.12.15
4
+ aiohttp_socks==0.10.1
5
+ aiosignal==1.4.0
6
+ albucore==0.0.24
7
+ albumentations==2.0.8
8
+ alembic==1.16.4
9
+ annotated-types==0.7.0
10
+ asttokens==3.0.0
11
+ attrs==25.3.0
12
+ av==15.0.0
13
+ beautifulsoup4==4.13.4
14
+ certifi==2025.6.15
15
+ cffi==1.17.1
16
+ chardet==5.2.0
17
+ charset-normalizer==3.4.2
18
+ click==8.2.1
19
+ color-matcher==0.6.0
20
+ colour-science==0.4.6
21
+ comfyui-embedded-docs==0.2.4
22
+ comfyui_frontend_package==1.23.4
23
+ comfyui_workflow_templates==0.1.41
24
+ comm==0.2.2
25
+ contourpy==1.3.3
26
+ cryptography==45.0.5
27
+ cycler==0.12.1
28
+ ddt==1.7.2
29
+ debugpy==1.8.14
30
+ decorator==5.2.1
31
+ docutils==0.22
32
+ easydict==1.13
33
+ einops==0.8.1
34
+ executing==2.2.0
35
+ filelock==3.18.0
36
+ fonttools==4.59.1
37
+ frozenlist==1.7.0
38
+ fsspec==2025.5.1
39
+ gdown==5.2.0
40
+ gitdb==4.0.12
41
+ GitPython==3.1.45
42
+ greenlet==3.2.3
43
+ h11==0.16.0
44
+ h2==4.2.0
45
+ hf-xet==1.1.5
46
+ hpack==4.1.0
47
+ huggingface-hub==0.34.3
48
+ hyperframe==6.1.0
49
+ idna==3.10
50
+ imageio==2.37.0
51
+ inquirerpy==0.3.4
52
+ ipykernel==6.29.5
53
+ ipython==9.3.0
54
+ ipython_pygments_lexers==1.1.1
55
+ ipywidgets==8.1.7
56
+ jedi==0.19.2
57
+ Jinja2==3.1.4
58
+ jsonschema==4.25.0
59
+ jsonschema-specifications==2025.4.1
60
+ jupyter_client==8.6.3
61
+ jupyter_core==5.8.1
62
+ jupyterlab_widgets==3.0.15
63
+ kiwisolver==1.4.9
64
+ kornia==0.8.1
65
+ kornia_rs==0.1.9
66
+ lazy_loader==0.4
67
+ llvmlite==0.44.0
68
+ Mako==1.3.10
69
+ markdown-it-py==3.0.0
70
+ MarkupSafe==2.1.5
71
+ matplotlib==3.10.5
72
+ matplotlib-inline==0.1.7
73
+ matrix-nio==0.25.2
74
+ mdurl==0.1.2
75
+ mpmath==1.3.0
76
+ mss==10.1.0
77
+ multidict==6.6.3
78
+ nest-asyncio==1.6.0
79
+ networkx==3.3
80
+ numba==0.61.2
81
+ numpy==2.1.2
82
+ nvidia-cublas-cu12==12.8.3.14
83
+ nvidia-cuda-cupti-cu12==12.8.57
84
+ nvidia-cuda-nvrtc-cu12==12.8.61
85
+ nvidia-cuda-runtime-cu12==12.8.57
86
+ nvidia-cudnn-cu12==9.7.1.26
87
+ nvidia-cufft-cu12==11.3.3.41
88
+ nvidia-cufile-cu12==1.13.0.11
89
+ nvidia-curand-cu12==10.3.9.55
90
+ nvidia-cusolver-cu12==11.7.2.55
91
+ nvidia-cusparse-cu12==12.5.7.53
92
+ nvidia-cusparselt-cu12==0.6.3
93
+ nvidia-nccl-cu12==2.26.2
94
+ nvidia-nvjitlink-cu12==12.8.61
95
+ nvidia-nvtx-cu12==12.8.55
96
+ opencv-python==4.12.0.88
97
+ opencv-python-headless==4.12.0.88
98
+ packaging==25.0
99
+ parso==0.8.4
100
+ pexpect==4.9.0
101
+ pfzy==0.3.4
102
+ piexif==1.1.3
103
+ pillow==11.0.0
104
+ pixeloe==0.1.4
105
+ platformdirs==4.3.8
106
+ pooch==1.8.2
107
+ prompt_toolkit==3.0.51
108
+ propcache==0.3.2
109
+ psutil==7.0.0
110
+ ptyprocess==0.7.0
111
+ pure_eval==0.2.3
112
+ pycparser==2.22
113
+ pycryptodome==3.23.0
114
+ pydantic==2.11.7
115
+ pydantic-settings==2.10.1
116
+ pydantic_core==2.33.2
117
+ PyGithub==2.7.0
118
+ Pygments==2.19.2
119
+ PyJWT==2.10.1
120
+ PyMatting==1.1.14
121
+ PyNaCl==1.5.0
122
+ pyparsing==3.2.3
123
+ PySocks==1.7.1
124
+ python-dateutil==2.9.0.post0
125
+ python-dotenv==1.1.1
126
+ python-socks==2.7.1
127
+ PyWavelets==1.9.0
128
+ PyYAML==6.0.2
129
+ pyzmq==27.0.0
130
+ referencing==0.36.2
131
+ regex==2025.7.34
132
+ rembg==2.0.67
133
+ requests==2.32.4
134
+ rich==14.1.0
135
+ rpds-py==0.26.0
136
+ safetensors==0.5.3
137
+ sageattention @ file:///workspace/sageattention-2.1.1-cp312-cp312-linux_x86_64.whl#sha256=13a5e89433f26b8ced2c00c251bb24d76c4589c4f728bcb3adf753aed0257a1c
138
+ scikit-image==0.25.2
139
+ scipy==1.16.1
140
+ sentencepiece==0.2.0
141
+ setuptools==80.9.0
142
+ shellingham==1.5.4
143
+ simsimd==6.5.0
144
+ six==1.17.0
145
+ smmap==5.0.2
146
+ soundfile==0.13.1
147
+ soupsieve==2.7
148
+ spandrel==0.4.1
149
+ SQLAlchemy==2.0.42
150
+ stack-data==0.6.3
151
+ stringzilla==3.12.5
152
+ sympy==1.13.3
153
+ tifffile==2025.6.11
154
+ timm==1.0.19
155
+ tokenizers==0.21.4
156
+ toml==0.10.2
157
+ torch==2.7.0+cu128
158
+ torchaudio==2.7.0+cu128
159
+ torchsde==0.2.6
160
+ torchvision==0.22.0+cu128
161
+ tornado==6.5.1
162
+ tqdm==4.67.1
163
+ traitlets==5.14.3
164
+ trampoline==0.1.2
165
+ transformers==4.54.1
166
+ transparent-background==1.3.4
167
+ triton==3.3.0
168
+ typer==0.16.0
169
+ typing-inspection==0.4.1
170
+ typing_extensions==4.14.0
171
+ unpaddedbase64==2.1.0
172
+ urllib3==2.5.0
173
+ uv==0.8.4
174
+ wcwidth==0.2.13
175
+ wget==3.2
176
+ wheel==0.45.1
177
+ widgetsnbextension==4.0.14
178
+ yarl==1.20.1
.venv-backups/25343869/venv-main-2025-08-27-1130.txt ADDED
@@ -0,0 +1,178 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ aiofiles==24.1.0
2
+ aiohappyeyeballs==2.6.1
3
+ aiohttp==3.12.15
4
+ aiohttp_socks==0.10.1
5
+ aiosignal==1.4.0
6
+ albucore==0.0.24
7
+ albumentations==2.0.8
8
+ alembic==1.16.4
9
+ annotated-types==0.7.0
10
+ asttokens==3.0.0
11
+ attrs==25.3.0
12
+ av==15.0.0
13
+ beautifulsoup4==4.13.4
14
+ certifi==2025.6.15
15
+ cffi==1.17.1
16
+ chardet==5.2.0
17
+ charset-normalizer==3.4.2
18
+ click==8.2.1
19
+ color-matcher==0.6.0
20
+ colour-science==0.4.6
21
+ comfyui-embedded-docs==0.2.4
22
+ comfyui_frontend_package==1.23.4
23
+ comfyui_workflow_templates==0.1.41
24
+ comm==0.2.2
25
+ contourpy==1.3.3
26
+ cryptography==45.0.5
27
+ cycler==0.12.1
28
+ ddt==1.7.2
29
+ debugpy==1.8.14
30
+ decorator==5.2.1
31
+ docutils==0.22
32
+ easydict==1.13
33
+ einops==0.8.1
34
+ executing==2.2.0
35
+ filelock==3.18.0
36
+ fonttools==4.59.1
37
+ frozenlist==1.7.0
38
+ fsspec==2025.5.1
39
+ gdown==5.2.0
40
+ gitdb==4.0.12
41
+ GitPython==3.1.45
42
+ greenlet==3.2.3
43
+ h11==0.16.0
44
+ h2==4.2.0
45
+ hf-xet==1.1.5
46
+ hpack==4.1.0
47
+ huggingface-hub==0.34.3
48
+ hyperframe==6.1.0
49
+ idna==3.10
50
+ imageio==2.37.0
51
+ inquirerpy==0.3.4
52
+ ipykernel==6.29.5
53
+ ipython==9.3.0
54
+ ipython_pygments_lexers==1.1.1
55
+ ipywidgets==8.1.7
56
+ jedi==0.19.2
57
+ Jinja2==3.1.4
58
+ jsonschema==4.25.0
59
+ jsonschema-specifications==2025.4.1
60
+ jupyter_client==8.6.3
61
+ jupyter_core==5.8.1
62
+ jupyterlab_widgets==3.0.15
63
+ kiwisolver==1.4.9
64
+ kornia==0.8.1
65
+ kornia_rs==0.1.9
66
+ lazy_loader==0.4
67
+ llvmlite==0.44.0
68
+ Mako==1.3.10
69
+ markdown-it-py==3.0.0
70
+ MarkupSafe==2.1.5
71
+ matplotlib==3.10.5
72
+ matplotlib-inline==0.1.7
73
+ matrix-nio==0.25.2
74
+ mdurl==0.1.2
75
+ mpmath==1.3.0
76
+ mss==10.1.0
77
+ multidict==6.6.3
78
+ nest-asyncio==1.6.0
79
+ networkx==3.3
80
+ numba==0.61.2
81
+ numpy==2.1.2
82
+ nvidia-cublas-cu12==12.8.3.14
83
+ nvidia-cuda-cupti-cu12==12.8.57
84
+ nvidia-cuda-nvrtc-cu12==12.8.61
85
+ nvidia-cuda-runtime-cu12==12.8.57
86
+ nvidia-cudnn-cu12==9.7.1.26
87
+ nvidia-cufft-cu12==11.3.3.41
88
+ nvidia-cufile-cu12==1.13.0.11
89
+ nvidia-curand-cu12==10.3.9.55
90
+ nvidia-cusolver-cu12==11.7.2.55
91
+ nvidia-cusparse-cu12==12.5.7.53
92
+ nvidia-cusparselt-cu12==0.6.3
93
+ nvidia-nccl-cu12==2.26.2
94
+ nvidia-nvjitlink-cu12==12.8.61
95
+ nvidia-nvtx-cu12==12.8.55
96
+ opencv-python==4.12.0.88
97
+ opencv-python-headless==4.12.0.88
98
+ packaging==25.0
99
+ parso==0.8.4
100
+ pexpect==4.9.0
101
+ pfzy==0.3.4
102
+ piexif==1.1.3
103
+ pillow==11.0.0
104
+ pixeloe==0.1.4
105
+ platformdirs==4.3.8
106
+ pooch==1.8.2
107
+ prompt_toolkit==3.0.51
108
+ propcache==0.3.2
109
+ psutil==7.0.0
110
+ ptyprocess==0.7.0
111
+ pure_eval==0.2.3
112
+ pycparser==2.22
113
+ pycryptodome==3.23.0
114
+ pydantic==2.11.7
115
+ pydantic-settings==2.10.1
116
+ pydantic_core==2.33.2
117
+ PyGithub==2.7.0
118
+ Pygments==2.19.2
119
+ PyJWT==2.10.1
120
+ PyMatting==1.1.14
121
+ PyNaCl==1.5.0
122
+ pyparsing==3.2.3
123
+ PySocks==1.7.1
124
+ python-dateutil==2.9.0.post0
125
+ python-dotenv==1.1.1
126
+ python-socks==2.7.1
127
+ PyWavelets==1.9.0
128
+ PyYAML==6.0.2
129
+ pyzmq==27.0.0
130
+ referencing==0.36.2
131
+ regex==2025.7.34
132
+ rembg==2.0.67
133
+ requests==2.32.4
134
+ rich==14.1.0
135
+ rpds-py==0.26.0
136
+ safetensors==0.5.3
137
+ sageattention @ file:///workspace/sageattention-2.1.1-cp312-cp312-linux_x86_64.whl#sha256=13a5e89433f26b8ced2c00c251bb24d76c4589c4f728bcb3adf753aed0257a1c
138
+ scikit-image==0.25.2
139
+ scipy==1.16.1
140
+ sentencepiece==0.2.0
141
+ setuptools==80.9.0
142
+ shellingham==1.5.4
143
+ simsimd==6.5.0
144
+ six==1.17.0
145
+ smmap==5.0.2
146
+ soundfile==0.13.1
147
+ soupsieve==2.7
148
+ spandrel==0.4.1
149
+ SQLAlchemy==2.0.42
150
+ stack-data==0.6.3
151
+ stringzilla==3.12.5
152
+ sympy==1.13.3
153
+ tifffile==2025.6.11
154
+ timm==1.0.19
155
+ tokenizers==0.21.4
156
+ toml==0.10.2
157
+ torch==2.7.0+cu128
158
+ torchaudio==2.7.0+cu128
159
+ torchsde==0.2.6
160
+ torchvision==0.22.0+cu128
161
+ tornado==6.5.1
162
+ tqdm==4.67.1
163
+ traitlets==5.14.3
164
+ trampoline==0.1.2
165
+ transformers==4.54.1
166
+ transparent-background==1.3.4
167
+ triton==3.3.0
168
+ typer==0.16.0
169
+ typing-inspection==0.4.1
170
+ typing_extensions==4.14.0
171
+ unpaddedbase64==2.1.0
172
+ urllib3==2.5.0
173
+ uv==0.8.4
174
+ wcwidth==0.2.13
175
+ wget==3.2
176
+ wheel==0.45.1
177
+ widgetsnbextension==4.0.14
178
+ yarl==1.20.1
.venv-backups/25343869/venv-main-2025-08-27-1200.txt ADDED
@@ -0,0 +1,178 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ aiofiles==24.1.0
2
+ aiohappyeyeballs==2.6.1
3
+ aiohttp==3.12.15
4
+ aiohttp_socks==0.10.1
5
+ aiosignal==1.4.0
6
+ albucore==0.0.24
7
+ albumentations==2.0.8
8
+ alembic==1.16.4
9
+ annotated-types==0.7.0
10
+ asttokens==3.0.0
11
+ attrs==25.3.0
12
+ av==15.0.0
13
+ beautifulsoup4==4.13.4
14
+ certifi==2025.6.15
15
+ cffi==1.17.1
16
+ chardet==5.2.0
17
+ charset-normalizer==3.4.2
18
+ click==8.2.1
19
+ color-matcher==0.6.0
20
+ colour-science==0.4.6
21
+ comfyui-embedded-docs==0.2.4
22
+ comfyui_frontend_package==1.23.4
23
+ comfyui_workflow_templates==0.1.41
24
+ comm==0.2.2
25
+ contourpy==1.3.3
26
+ cryptography==45.0.5
27
+ cycler==0.12.1
28
+ ddt==1.7.2
29
+ debugpy==1.8.14
30
+ decorator==5.2.1
31
+ docutils==0.22
32
+ easydict==1.13
33
+ einops==0.8.1
34
+ executing==2.2.0
35
+ filelock==3.18.0
36
+ fonttools==4.59.1
37
+ frozenlist==1.7.0
38
+ fsspec==2025.5.1
39
+ gdown==5.2.0
40
+ gitdb==4.0.12
41
+ GitPython==3.1.45
42
+ greenlet==3.2.3
43
+ h11==0.16.0
44
+ h2==4.2.0
45
+ hf-xet==1.1.5
46
+ hpack==4.1.0
47
+ huggingface-hub==0.34.3
48
+ hyperframe==6.1.0
49
+ idna==3.10
50
+ imageio==2.37.0
51
+ inquirerpy==0.3.4
52
+ ipykernel==6.29.5
53
+ ipython==9.3.0
54
+ ipython_pygments_lexers==1.1.1
55
+ ipywidgets==8.1.7
56
+ jedi==0.19.2
57
+ Jinja2==3.1.4
58
+ jsonschema==4.25.0
59
+ jsonschema-specifications==2025.4.1
60
+ jupyter_client==8.6.3
61
+ jupyter_core==5.8.1
62
+ jupyterlab_widgets==3.0.15
63
+ kiwisolver==1.4.9
64
+ kornia==0.8.1
65
+ kornia_rs==0.1.9
66
+ lazy_loader==0.4
67
+ llvmlite==0.44.0
68
+ Mako==1.3.10
69
+ markdown-it-py==3.0.0
70
+ MarkupSafe==2.1.5
71
+ matplotlib==3.10.5
72
+ matplotlib-inline==0.1.7
73
+ matrix-nio==0.25.2
74
+ mdurl==0.1.2
75
+ mpmath==1.3.0
76
+ mss==10.1.0
77
+ multidict==6.6.3
78
+ nest-asyncio==1.6.0
79
+ networkx==3.3
80
+ numba==0.61.2
81
+ numpy==2.1.2
82
+ nvidia-cublas-cu12==12.8.3.14
83
+ nvidia-cuda-cupti-cu12==12.8.57
84
+ nvidia-cuda-nvrtc-cu12==12.8.61
85
+ nvidia-cuda-runtime-cu12==12.8.57
86
+ nvidia-cudnn-cu12==9.7.1.26
87
+ nvidia-cufft-cu12==11.3.3.41
88
+ nvidia-cufile-cu12==1.13.0.11
89
+ nvidia-curand-cu12==10.3.9.55
90
+ nvidia-cusolver-cu12==11.7.2.55
91
+ nvidia-cusparse-cu12==12.5.7.53
92
+ nvidia-cusparselt-cu12==0.6.3
93
+ nvidia-nccl-cu12==2.26.2
94
+ nvidia-nvjitlink-cu12==12.8.61
95
+ nvidia-nvtx-cu12==12.8.55
96
+ opencv-python==4.12.0.88
97
+ opencv-python-headless==4.12.0.88
98
+ packaging==25.0
99
+ parso==0.8.4
100
+ pexpect==4.9.0
101
+ pfzy==0.3.4
102
+ piexif==1.1.3
103
+ pillow==11.0.0
104
+ pixeloe==0.1.4
105
+ platformdirs==4.3.8
106
+ pooch==1.8.2
107
+ prompt_toolkit==3.0.51
108
+ propcache==0.3.2
109
+ psutil==7.0.0
110
+ ptyprocess==0.7.0
111
+ pure_eval==0.2.3
112
+ pycparser==2.22
113
+ pycryptodome==3.23.0
114
+ pydantic==2.11.7
115
+ pydantic-settings==2.10.1
116
+ pydantic_core==2.33.2
117
+ PyGithub==2.7.0
118
+ Pygments==2.19.2
119
+ PyJWT==2.10.1
120
+ PyMatting==1.1.14
121
+ PyNaCl==1.5.0
122
+ pyparsing==3.2.3
123
+ PySocks==1.7.1
124
+ python-dateutil==2.9.0.post0
125
+ python-dotenv==1.1.1
126
+ python-socks==2.7.1
127
+ PyWavelets==1.9.0
128
+ PyYAML==6.0.2
129
+ pyzmq==27.0.0
130
+ referencing==0.36.2
131
+ regex==2025.7.34
132
+ rembg==2.0.67
133
+ requests==2.32.4
134
+ rich==14.1.0
135
+ rpds-py==0.26.0
136
+ safetensors==0.5.3
137
+ sageattention @ file:///workspace/sageattention-2.1.1-cp312-cp312-linux_x86_64.whl#sha256=13a5e89433f26b8ced2c00c251bb24d76c4589c4f728bcb3adf753aed0257a1c
138
+ scikit-image==0.25.2
139
+ scipy==1.16.1
140
+ sentencepiece==0.2.0
141
+ setuptools==80.9.0
142
+ shellingham==1.5.4
143
+ simsimd==6.5.0
144
+ six==1.17.0
145
+ smmap==5.0.2
146
+ soundfile==0.13.1
147
+ soupsieve==2.7
148
+ spandrel==0.4.1
149
+ SQLAlchemy==2.0.42
150
+ stack-data==0.6.3
151
+ stringzilla==3.12.5
152
+ sympy==1.13.3
153
+ tifffile==2025.6.11
154
+ timm==1.0.19
155
+ tokenizers==0.21.4
156
+ toml==0.10.2
157
+ torch==2.7.0+cu128
158
+ torchaudio==2.7.0+cu128
159
+ torchsde==0.2.6
160
+ torchvision==0.22.0+cu128
161
+ tornado==6.5.1
162
+ tqdm==4.67.1
163
+ traitlets==5.14.3
164
+ trampoline==0.1.2
165
+ transformers==4.54.1
166
+ transparent-background==1.3.4
167
+ triton==3.3.0
168
+ typer==0.16.0
169
+ typing-inspection==0.4.1
170
+ typing_extensions==4.14.0
171
+ unpaddedbase64==2.1.0
172
+ urllib3==2.5.0
173
+ uv==0.8.4
174
+ wcwidth==0.2.13
175
+ wget==3.2
176
+ wheel==0.45.1
177
+ widgetsnbextension==4.0.14
178
+ yarl==1.20.1
.venv-backups/25365439/backup.log ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [2025-08-27 18:44:14] Processing virtual environment: /venv/main
2
+ [2025-08-27 18:44:15] SUCCESS: Created backup at /workspace/.venv-backups/25365439/venv-main-2025-08-27-1844.txt
3
+ [2025-08-27 18:44:15] Backup process completed
4
+ [2025-08-27 19:00:01] Processing virtual environment: /venv/main
5
+ [2025-08-27 19:00:01] SUCCESS: Created backup at /workspace/.venv-backups/25365439/venv-main-2025-08-27-1900.txt
6
+ [2025-08-27 19:00:01] Backup process completed
7
+ [2025-08-27 19:30:01] Processing virtual environment: /venv/main
8
+ [2025-08-27 19:30:01] SUCCESS: Created backup at /workspace/.venv-backups/25365439/venv-main-2025-08-27-1930.txt
9
+ [2025-08-27 19:30:02] Backup process completed
10
+ [2025-08-27 20:00:01] Processing virtual environment: /venv/main
11
+ [2025-08-27 20:00:01] SUCCESS: Created backup at /workspace/.venv-backups/25365439/venv-main-2025-08-27-2000.txt
12
+ [2025-08-27 20:00:01] Backup process completed
13
+ [2025-08-27 20:30:01] Processing virtual environment: /venv/main
14
+ [2025-08-27 20:30:02] SUCCESS: Created backup at /workspace/.venv-backups/25365439/venv-main-2025-08-27-2030.txt
15
+ [2025-08-27 20:30:02] Backup process completed
16
+ [2025-08-28 07:30:01] Processing virtual environment: /venv/main
17
+ [2025-08-28 07:30:01] SUCCESS: Created backup at /workspace/.venv-backups/25365439/venv-main-2025-08-28-0730.txt
18
+ [2025-08-28 07:30:01] Backup process completed
19
+ [2025-08-28 08:00:01] Processing virtual environment: /venv/main
20
+ [2025-08-28 08:00:01] SUCCESS: Created backup at /workspace/.venv-backups/25365439/venv-main-2025-08-28-0800.txt
21
+ [2025-08-28 08:00:02] Backup process completed
22
+ [2025-08-28 08:30:01] Processing virtual environment: /venv/main
23
+ [2025-08-28 08:30:01] SUCCESS: Created backup at /workspace/.venv-backups/25365439/venv-main-2025-08-28-0830.txt
24
+ [2025-08-28 08:30:01] Backup process completed
25
+ [2025-08-28 09:00:01] Processing virtual environment: /venv/main
26
+ [2025-08-28 09:00:01] SUCCESS: Created backup at /workspace/.venv-backups/25365439/venv-main-2025-08-28-0900.txt
27
+ [2025-08-28 09:00:02] Backup process completed
28
+ [2025-08-28 09:30:01] Processing virtual environment: /venv/main
29
+ [2025-08-28 09:30:01] SUCCESS: Created backup at /workspace/.venv-backups/25365439/venv-main-2025-08-28-0930.txt
30
+ [2025-08-28 09:30:01] Backup process completed
31
+ [2025-08-28 11:30:01] Processing virtual environment: /venv/main
32
+ [2025-08-28 11:30:01] SUCCESS: Created backup at /workspace/.venv-backups/25365439/venv-main-2025-08-28-1130.txt
33
+ [2025-08-28 11:30:01] Backup process completed
34
+ [2025-08-28 12:00:01] Processing virtual environment: /venv/main
35
+ [2025-08-28 12:00:02] SUCCESS: Created backup at /workspace/.venv-backups/25365439/venv-main-2025-08-28-1200.txt
36
+ [2025-08-28 12:00:02] Backup process completed
37
+ [2025-08-28 12:30:01] Processing virtual environment: /venv/main
38
+ [2025-08-28 12:30:01] SUCCESS: Created backup at /workspace/.venv-backups/25365439/venv-main-2025-08-28-1230.txt
39
+ [2025-08-28 12:30:01] Backup process completed
40
+ [2025-08-28 13:00:01] Processing virtual environment: /venv/main
41
+ [2025-08-28 13:00:02] SUCCESS: Created backup at /workspace/.venv-backups/25365439/venv-main-2025-08-28-1300.txt
42
+ [2025-08-28 13:00:02] Backup process completed
43
+ [2025-08-28 13:30:01] Processing virtual environment: /venv/main
44
+ [2025-08-28 13:30:01] SUCCESS: Created backup at /workspace/.venv-backups/25365439/venv-main-2025-08-28-1330.txt
45
+ [2025-08-28 13:30:01] Backup process completed
46
+ [2025-08-29 12:30:01] Processing virtual environment: /venv/main
47
+ [2025-08-29 12:30:01] SUCCESS: Created backup at /workspace/.venv-backups/25365439/venv-main-2025-08-29-1230.txt
48
+ [2025-08-29 12:30:01] Backup process completed
49
+ [2025-08-29 16:30:01] Processing virtual environment: /venv/main
50
+ [2025-08-29 16:30:01] SUCCESS: Created backup at /workspace/.venv-backups/25365439/venv-main-2025-08-29-1630.txt
51
+ [2025-08-29 16:30:01] Backup process completed
.venv-backups/25365439/venv-main-2025-08-27-1844.txt ADDED
@@ -0,0 +1,165 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ aiofiles==24.1.0
2
+ aiohappyeyeballs==2.6.1
3
+ aiohttp==3.12.15
4
+ aiohttp_socks==0.10.1
5
+ aiosignal==1.4.0
6
+ albucore==0.0.24
7
+ albumentations==2.0.8
8
+ alembic==1.16.4
9
+ annotated-types==0.7.0
10
+ asttokens==3.0.0
11
+ attrs==25.3.0
12
+ av==15.0.0
13
+ beautifulsoup4==4.13.4
14
+ certifi==2025.6.15
15
+ cffi==1.17.1
16
+ chardet==5.2.0
17
+ charset-normalizer==3.4.2
18
+ click==8.2.1
19
+ colour-science==0.4.6
20
+ comfyui-embedded-docs==0.2.4
21
+ comfyui_frontend_package==1.23.4
22
+ comfyui_workflow_templates==0.1.41
23
+ comm==0.2.2
24
+ cryptography==45.0.5
25
+ debugpy==1.8.14
26
+ decorator==5.2.1
27
+ easydict==1.13
28
+ einops==0.8.1
29
+ executing==2.2.0
30
+ filelock==3.18.0
31
+ frozenlist==1.7.0
32
+ fsspec==2025.5.1
33
+ gdown==5.2.0
34
+ gitdb==4.0.12
35
+ GitPython==3.1.45
36
+ greenlet==3.2.3
37
+ h11==0.16.0
38
+ h2==4.2.0
39
+ hf-xet==1.1.5
40
+ hpack==4.1.0
41
+ huggingface-hub==0.34.3
42
+ hyperframe==6.1.0
43
+ idna==3.10
44
+ imageio==2.37.0
45
+ inquirerpy==0.3.4
46
+ ipykernel==6.29.5
47
+ ipython==9.3.0
48
+ ipython_pygments_lexers==1.1.1
49
+ ipywidgets==8.1.7
50
+ jedi==0.19.2
51
+ Jinja2==3.1.4
52
+ jsonschema==4.25.0
53
+ jsonschema-specifications==2025.4.1
54
+ jupyter_client==8.6.3
55
+ jupyter_core==5.8.1
56
+ jupyterlab_widgets==3.0.15
57
+ kornia==0.8.1
58
+ kornia_rs==0.1.9
59
+ lazy_loader==0.4
60
+ llvmlite==0.44.0
61
+ Mako==1.3.10
62
+ markdown-it-py==3.0.0
63
+ MarkupSafe==2.1.5
64
+ matplotlib-inline==0.1.7
65
+ matrix-nio==0.25.2
66
+ mdurl==0.1.2
67
+ mpmath==1.3.0
68
+ multidict==6.6.3
69
+ nest-asyncio==1.6.0
70
+ networkx==3.3
71
+ numba==0.61.2
72
+ numpy==2.1.2
73
+ nvidia-cublas-cu12==12.8.3.14
74
+ nvidia-cuda-cupti-cu12==12.8.57
75
+ nvidia-cuda-nvrtc-cu12==12.8.61
76
+ nvidia-cuda-runtime-cu12==12.8.57
77
+ nvidia-cudnn-cu12==9.7.1.26
78
+ nvidia-cufft-cu12==11.3.3.41
79
+ nvidia-cufile-cu12==1.13.0.11
80
+ nvidia-curand-cu12==10.3.9.55
81
+ nvidia-cusolver-cu12==11.7.2.55
82
+ nvidia-cusparse-cu12==12.5.7.53
83
+ nvidia-cusparselt-cu12==0.6.3
84
+ nvidia-nccl-cu12==2.26.2
85
+ nvidia-nvjitlink-cu12==12.8.61
86
+ nvidia-nvtx-cu12==12.8.55
87
+ opencv-python==4.12.0.88
88
+ opencv-python-headless==4.12.0.88
89
+ packaging==25.0
90
+ parso==0.8.4
91
+ pexpect==4.9.0
92
+ pfzy==0.3.4
93
+ pillow==11.0.0
94
+ pixeloe==0.1.4
95
+ platformdirs==4.3.8
96
+ pooch==1.8.2
97
+ prompt_toolkit==3.0.51
98
+ propcache==0.3.2
99
+ psutil==7.0.0
100
+ ptyprocess==0.7.0
101
+ pure_eval==0.2.3
102
+ pycparser==2.22
103
+ pycryptodome==3.23.0
104
+ pydantic==2.11.7
105
+ pydantic-settings==2.10.1
106
+ pydantic_core==2.33.2
107
+ PyGithub==2.7.0
108
+ Pygments==2.19.2
109
+ PyJWT==2.10.1
110
+ PyMatting==1.1.14
111
+ PyNaCl==1.5.0
112
+ PySocks==1.7.1
113
+ python-dateutil==2.9.0.post0
114
+ python-dotenv==1.1.1
115
+ python-socks==2.7.1
116
+ PyYAML==6.0.2
117
+ pyzmq==27.0.0
118
+ referencing==0.36.2
119
+ regex==2025.7.34
120
+ rembg==2.0.67
121
+ requests==2.32.4
122
+ rich==14.1.0
123
+ rpds-py==0.26.0
124
+ safetensors==0.5.3
125
+ scikit-image==0.25.2
126
+ scipy==1.16.1
127
+ sentencepiece==0.2.0
128
+ setuptools==80.9.0
129
+ shellingham==1.5.4
130
+ simsimd==6.5.0
131
+ six==1.17.0
132
+ smmap==5.0.2
133
+ soundfile==0.13.1
134
+ soupsieve==2.7
135
+ spandrel==0.4.1
136
+ SQLAlchemy==2.0.42
137
+ stack-data==0.6.3
138
+ stringzilla==3.12.5
139
+ sympy==1.13.3
140
+ tifffile==2025.6.11
141
+ timm==1.0.19
142
+ tokenizers==0.21.4
143
+ toml==0.10.2
144
+ torch==2.7.1+cu128
145
+ torchaudio==2.7.1+cu128
146
+ torchsde==0.2.6
147
+ torchvision==0.22.1+cu128
148
+ tornado==6.5.1
149
+ tqdm==4.67.1
150
+ traitlets==5.14.3
151
+ trampoline==0.1.2
152
+ transformers==4.54.1
153
+ transparent-background==1.3.4
154
+ triton==3.3.1
155
+ typer==0.16.0
156
+ typing-inspection==0.4.1
157
+ typing_extensions==4.14.0
158
+ unpaddedbase64==2.1.0
159
+ urllib3==2.5.0
160
+ uv==0.8.4
161
+ wcwidth==0.2.13
162
+ wget==3.2
163
+ wheel==0.45.1
164
+ widgetsnbextension==4.0.14
165
+ yarl==1.20.1
.venv-backups/25365439/venv-main-2025-08-27-1900.txt ADDED
@@ -0,0 +1,166 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ aiofiles==24.1.0
2
+ aiohappyeyeballs==2.6.1
3
+ aiohttp==3.12.15
4
+ aiohttp_socks==0.10.1
5
+ aiosignal==1.4.0
6
+ albucore==0.0.24
7
+ albumentations==2.0.8
8
+ alembic==1.16.4
9
+ annotated-types==0.7.0
10
+ asttokens==3.0.0
11
+ attrs==25.3.0
12
+ av==15.0.0
13
+ beautifulsoup4==4.13.4
14
+ certifi==2025.6.15
15
+ cffi==1.17.1
16
+ chardet==5.2.0
17
+ charset-normalizer==3.4.2
18
+ click==8.2.1
19
+ colour-science==0.4.6
20
+ comfyui-embedded-docs==0.2.4
21
+ comfyui_frontend_package==1.23.4
22
+ comfyui_workflow_templates==0.1.41
23
+ comm==0.2.2
24
+ cryptography==45.0.5
25
+ debugpy==1.8.14
26
+ decorator==5.2.1
27
+ easydict==1.13
28
+ einops==0.8.1
29
+ executing==2.2.0
30
+ filelock==3.18.0
31
+ frozenlist==1.7.0
32
+ fsspec==2025.5.1
33
+ gdown==5.2.0
34
+ gitdb==4.0.12
35
+ GitPython==3.1.45
36
+ greenlet==3.2.3
37
+ h11==0.16.0
38
+ h2==4.2.0
39
+ hf-xet==1.1.5
40
+ hpack==4.1.0
41
+ huggingface-hub==0.34.3
42
+ hyperframe==6.1.0
43
+ idna==3.10
44
+ imageio==2.37.0
45
+ inquirerpy==0.3.4
46
+ ipykernel==6.29.5
47
+ ipython==9.3.0
48
+ ipython_pygments_lexers==1.1.1
49
+ ipywidgets==8.1.7
50
+ jedi==0.19.2
51
+ Jinja2==3.1.4
52
+ jsonschema==4.25.0
53
+ jsonschema-specifications==2025.4.1
54
+ jupyter_client==8.6.3
55
+ jupyter_core==5.8.1
56
+ jupyterlab_widgets==3.0.15
57
+ kornia==0.8.1
58
+ kornia_rs==0.1.9
59
+ lazy_loader==0.4
60
+ llvmlite==0.44.0
61
+ Mako==1.3.10
62
+ markdown-it-py==3.0.0
63
+ MarkupSafe==2.1.5
64
+ matplotlib-inline==0.1.7
65
+ matrix-nio==0.25.2
66
+ mdurl==0.1.2
67
+ mpmath==1.3.0
68
+ multidict==6.6.3
69
+ nest-asyncio==1.6.0
70
+ networkx==3.3
71
+ numba==0.61.2
72
+ numpy==2.1.2
73
+ nvidia-cublas-cu12==12.8.3.14
74
+ nvidia-cuda-cupti-cu12==12.8.57
75
+ nvidia-cuda-nvrtc-cu12==12.8.61
76
+ nvidia-cuda-runtime-cu12==12.8.57
77
+ nvidia-cudnn-cu12==9.7.1.26
78
+ nvidia-cufft-cu12==11.3.3.41
79
+ nvidia-cufile-cu12==1.13.0.11
80
+ nvidia-curand-cu12==10.3.9.55
81
+ nvidia-cusolver-cu12==11.7.2.55
82
+ nvidia-cusparse-cu12==12.5.7.53
83
+ nvidia-cusparselt-cu12==0.6.3
84
+ nvidia-nccl-cu12==2.26.2
85
+ nvidia-nvjitlink-cu12==12.8.61
86
+ nvidia-nvtx-cu12==12.8.55
87
+ opencv-python==4.12.0.88
88
+ opencv-python-headless==4.12.0.88
89
+ packaging==25.0
90
+ parso==0.8.4
91
+ pexpect==4.9.0
92
+ pfzy==0.3.4
93
+ piexif==1.1.3
94
+ pillow==11.0.0
95
+ pixeloe==0.1.4
96
+ platformdirs==4.3.8
97
+ pooch==1.8.2
98
+ prompt_toolkit==3.0.51
99
+ propcache==0.3.2
100
+ psutil==7.0.0
101
+ ptyprocess==0.7.0
102
+ pure_eval==0.2.3
103
+ pycparser==2.22
104
+ pycryptodome==3.23.0
105
+ pydantic==2.11.7
106
+ pydantic-settings==2.10.1
107
+ pydantic_core==2.33.2
108
+ PyGithub==2.7.0
109
+ Pygments==2.19.2
110
+ PyJWT==2.10.1
111
+ PyMatting==1.1.14
112
+ PyNaCl==1.5.0
113
+ PySocks==1.7.1
114
+ python-dateutil==2.9.0.post0
115
+ python-dotenv==1.1.1
116
+ python-socks==2.7.1
117
+ PyYAML==6.0.2
118
+ pyzmq==27.0.0
119
+ referencing==0.36.2
120
+ regex==2025.7.34
121
+ rembg==2.0.67
122
+ requests==2.32.4
123
+ rich==14.1.0
124
+ rpds-py==0.26.0
125
+ safetensors==0.5.3
126
+ scikit-image==0.25.2
127
+ scipy==1.16.1
128
+ sentencepiece==0.2.0
129
+ setuptools==80.9.0
130
+ shellingham==1.5.4
131
+ simsimd==6.5.0
132
+ six==1.17.0
133
+ smmap==5.0.2
134
+ soundfile==0.13.1
135
+ soupsieve==2.7
136
+ spandrel==0.4.1
137
+ SQLAlchemy==2.0.42
138
+ stack-data==0.6.3
139
+ stringzilla==3.12.5
140
+ sympy==1.13.3
141
+ tifffile==2025.6.11
142
+ timm==1.0.19
143
+ tokenizers==0.21.4
144
+ toml==0.10.2
145
+ torch==2.7.1+cu128
146
+ torchaudio==2.7.1+cu128
147
+ torchsde==0.2.6
148
+ torchvision==0.22.1+cu128
149
+ tornado==6.5.1
150
+ tqdm==4.67.1
151
+ traitlets==5.14.3
152
+ trampoline==0.1.2
153
+ transformers==4.54.1
154
+ transparent-background==1.3.4
155
+ triton==3.3.1
156
+ typer==0.16.0
157
+ typing-inspection==0.4.1
158
+ typing_extensions==4.14.0
159
+ unpaddedbase64==2.1.0
160
+ urllib3==2.5.0
161
+ uv==0.8.4
162
+ wcwidth==0.2.13
163
+ wget==3.2
164
+ wheel==0.45.1
165
+ widgetsnbextension==4.0.14
166
+ yarl==1.20.1
.venv-backups/25365439/venv-main-2025-08-27-1930.txt ADDED
@@ -0,0 +1,173 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ aiofiles==24.1.0
2
+ aiohappyeyeballs==2.6.1
3
+ aiohttp==3.12.15
4
+ aiohttp_socks==0.10.1
5
+ aiosignal==1.4.0
6
+ albucore==0.0.24
7
+ albumentations==2.0.8
8
+ alembic==1.16.4
9
+ annotated-types==0.7.0
10
+ asttokens==3.0.0
11
+ attrs==25.3.0
12
+ av==15.0.0
13
+ beautifulsoup4==4.13.4
14
+ certifi==2025.6.15
15
+ cffi==1.17.1
16
+ chardet==5.2.0
17
+ charset-normalizer==3.4.2
18
+ click==8.2.1
19
+ colour-science==0.4.6
20
+ comfyui-embedded-docs==0.2.4
21
+ comfyui_frontend_package==1.23.4
22
+ comfyui_workflow_templates==0.1.41
23
+ comm==0.2.2
24
+ contourpy==1.3.3
25
+ cryptography==45.0.5
26
+ cycler==0.12.1
27
+ debugpy==1.8.14
28
+ decorator==5.2.1
29
+ easydict==1.13
30
+ einops==0.8.1
31
+ executing==2.2.0
32
+ filelock==3.18.0
33
+ fonttools==4.59.2
34
+ frozenlist==1.7.0
35
+ fsspec==2025.5.1
36
+ gdown==5.2.0
37
+ gitdb==4.0.12
38
+ GitPython==3.1.45
39
+ greenlet==3.2.3
40
+ h11==0.16.0
41
+ h2==4.2.0
42
+ hf-xet==1.1.5
43
+ hpack==4.1.0
44
+ huggingface-hub==0.34.3
45
+ hyperframe==6.1.0
46
+ idna==3.10
47
+ imageio==2.37.0
48
+ inquirerpy==0.3.4
49
+ ipykernel==6.29.5
50
+ ipython==9.3.0
51
+ ipython_pygments_lexers==1.1.1
52
+ ipywidgets==8.1.7
53
+ jedi==0.19.2
54
+ Jinja2==3.1.4
55
+ jsonschema==4.25.0
56
+ jsonschema-specifications==2025.4.1
57
+ jupyter_client==8.6.3
58
+ jupyter_core==5.8.1
59
+ jupyterlab_widgets==3.0.15
60
+ kiwisolver==1.4.9
61
+ kornia==0.8.1
62
+ kornia_rs==0.1.9
63
+ lazy_loader==0.4
64
+ llvmlite==0.44.0
65
+ Mako==1.3.10
66
+ markdown-it-py==3.0.0
67
+ MarkupSafe==2.1.5
68
+ matplotlib==3.10.5
69
+ matplotlib-inline==0.1.7
70
+ matrix-nio==0.25.2
71
+ mdurl==0.1.2
72
+ mpmath==1.3.0
73
+ multidict==6.6.3
74
+ nest-asyncio==1.6.0
75
+ networkx==3.3
76
+ numba==0.61.2
77
+ numpy==2.1.2
78
+ nvidia-cublas-cu12==12.8.3.14
79
+ nvidia-cuda-cupti-cu12==12.8.57
80
+ nvidia-cuda-nvrtc-cu12==12.8.61
81
+ nvidia-cuda-runtime-cu12==12.8.57
82
+ nvidia-cudnn-cu12==9.7.1.26
83
+ nvidia-cufft-cu12==11.3.3.41
84
+ nvidia-cufile-cu12==1.13.0.11
85
+ nvidia-curand-cu12==10.3.9.55
86
+ nvidia-cusolver-cu12==11.7.2.55
87
+ nvidia-cusparse-cu12==12.5.7.53
88
+ nvidia-cusparselt-cu12==0.6.3
89
+ nvidia-nccl-cu12==2.26.2
90
+ nvidia-nvjitlink-cu12==12.8.61
91
+ nvidia-nvtx-cu12==12.8.55
92
+ opencv-python==4.12.0.88
93
+ opencv-python-headless==4.12.0.88
94
+ packaging==25.0
95
+ parso==0.8.4
96
+ pexpect==4.9.0
97
+ pfzy==0.3.4
98
+ piexif==1.1.3
99
+ pillow==11.0.0
100
+ pixeloe==0.1.4
101
+ platformdirs==4.3.8
102
+ pooch==1.8.2
103
+ prompt_toolkit==3.0.51
104
+ propcache==0.3.2
105
+ psutil==7.0.0
106
+ ptyprocess==0.7.0
107
+ pure_eval==0.2.3
108
+ pycparser==2.22
109
+ pycryptodome==3.23.0
110
+ pydantic==2.11.7
111
+ pydantic-settings==2.10.1
112
+ pydantic_core==2.33.2
113
+ PyGithub==2.7.0
114
+ Pygments==2.19.2
115
+ PyJWT==2.10.1
116
+ PyMatting==1.1.14
117
+ PyNaCl==1.5.0
118
+ pyparsing==3.2.3
119
+ PySocks==1.7.1
120
+ python-dateutil==2.9.0.post0
121
+ python-dotenv==1.1.1
122
+ python-socks==2.7.1
123
+ PyWavelets==1.9.0
124
+ PyYAML==6.0.2
125
+ pyzmq==27.0.0
126
+ referencing==0.36.2
127
+ regex==2025.7.34
128
+ rembg==2.0.67
129
+ requests==2.32.4
130
+ rich==14.1.0
131
+ rpds-py==0.26.0
132
+ safetensors==0.5.3
133
+ scikit-image==0.25.2
134
+ scipy==1.16.1
135
+ sentencepiece==0.2.0
136
+ setuptools==80.9.0
137
+ shellingham==1.5.4
138
+ simsimd==6.5.0
139
+ six==1.17.0
140
+ smmap==5.0.2
141
+ soundfile==0.13.1
142
+ soupsieve==2.7
143
+ spandrel==0.4.1
144
+ SQLAlchemy==2.0.42
145
+ stack-data==0.6.3
146
+ stringzilla==3.12.5
147
+ sympy==1.13.3
148
+ tifffile==2025.6.11
149
+ timm==1.0.19
150
+ tokenizers==0.21.4
151
+ toml==0.10.2
152
+ torch==2.7.1+cu128
153
+ torchaudio==2.7.1+cu128
154
+ torchsde==0.2.6
155
+ torchvision==0.22.1+cu128
156
+ tornado==6.5.1
157
+ tqdm==4.67.1
158
+ traitlets==5.14.3
159
+ trampoline==0.1.2
160
+ transformers==4.54.1
161
+ transparent-background==1.3.4
162
+ triton==3.3.1
163
+ typer==0.16.0
164
+ typing-inspection==0.4.1
165
+ typing_extensions==4.14.0
166
+ unpaddedbase64==2.1.0
167
+ urllib3==2.5.0
168
+ uv==0.8.4
169
+ wcwidth==0.2.13
170
+ wget==3.2
171
+ wheel==0.45.1
172
+ widgetsnbextension==4.0.14
173
+ yarl==1.20.1
.venv-backups/25365439/venv-main-2025-08-27-2000.txt ADDED
@@ -0,0 +1,173 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ aiofiles==24.1.0
2
+ aiohappyeyeballs==2.6.1
3
+ aiohttp==3.12.15
4
+ aiohttp_socks==0.10.1
5
+ aiosignal==1.4.0
6
+ albucore==0.0.24
7
+ albumentations==2.0.8
8
+ alembic==1.16.4
9
+ annotated-types==0.7.0
10
+ asttokens==3.0.0
11
+ attrs==25.3.0
12
+ av==15.0.0
13
+ beautifulsoup4==4.13.4
14
+ certifi==2025.6.15
15
+ cffi==1.17.1
16
+ chardet==5.2.0
17
+ charset-normalizer==3.4.2
18
+ click==8.2.1
19
+ colour-science==0.4.6
20
+ comfyui-embedded-docs==0.2.4
21
+ comfyui_frontend_package==1.23.4
22
+ comfyui_workflow_templates==0.1.41
23
+ comm==0.2.2
24
+ contourpy==1.3.3
25
+ cryptography==45.0.5
26
+ cycler==0.12.1
27
+ debugpy==1.8.14
28
+ decorator==5.2.1
29
+ easydict==1.13
30
+ einops==0.8.1
31
+ executing==2.2.0
32
+ filelock==3.18.0
33
+ fonttools==4.59.2
34
+ frozenlist==1.7.0
35
+ fsspec==2025.5.1
36
+ gdown==5.2.0
37
+ gitdb==4.0.12
38
+ GitPython==3.1.45
39
+ greenlet==3.2.3
40
+ h11==0.16.0
41
+ h2==4.2.0
42
+ hf-xet==1.1.5
43
+ hpack==4.1.0
44
+ huggingface-hub==0.34.3
45
+ hyperframe==6.1.0
46
+ idna==3.10
47
+ imageio==2.37.0
48
+ inquirerpy==0.3.4
49
+ ipykernel==6.29.5
50
+ ipython==9.3.0
51
+ ipython_pygments_lexers==1.1.1
52
+ ipywidgets==8.1.7
53
+ jedi==0.19.2
54
+ Jinja2==3.1.4
55
+ jsonschema==4.25.0
56
+ jsonschema-specifications==2025.4.1
57
+ jupyter_client==8.6.3
58
+ jupyter_core==5.8.1
59
+ jupyterlab_widgets==3.0.15
60
+ kiwisolver==1.4.9
61
+ kornia==0.8.1
62
+ kornia_rs==0.1.9
63
+ lazy_loader==0.4
64
+ llvmlite==0.44.0
65
+ Mako==1.3.10
66
+ markdown-it-py==3.0.0
67
+ MarkupSafe==2.1.5
68
+ matplotlib==3.10.5
69
+ matplotlib-inline==0.1.7
70
+ matrix-nio==0.25.2
71
+ mdurl==0.1.2
72
+ mpmath==1.3.0
73
+ multidict==6.6.3
74
+ nest-asyncio==1.6.0
75
+ networkx==3.3
76
+ numba==0.61.2
77
+ numpy==2.1.2
78
+ nvidia-cublas-cu12==12.8.3.14
79
+ nvidia-cuda-cupti-cu12==12.8.57
80
+ nvidia-cuda-nvrtc-cu12==12.8.61
81
+ nvidia-cuda-runtime-cu12==12.8.57
82
+ nvidia-cudnn-cu12==9.7.1.26
83
+ nvidia-cufft-cu12==11.3.3.41
84
+ nvidia-cufile-cu12==1.13.0.11
85
+ nvidia-curand-cu12==10.3.9.55
86
+ nvidia-cusolver-cu12==11.7.2.55
87
+ nvidia-cusparse-cu12==12.5.7.53
88
+ nvidia-cusparselt-cu12==0.6.3
89
+ nvidia-nccl-cu12==2.26.2
90
+ nvidia-nvjitlink-cu12==12.8.61
91
+ nvidia-nvtx-cu12==12.8.55
92
+ opencv-python==4.12.0.88
93
+ opencv-python-headless==4.12.0.88
94
+ packaging==25.0
95
+ parso==0.8.4
96
+ pexpect==4.9.0
97
+ pfzy==0.3.4
98
+ piexif==1.1.3
99
+ pillow==11.0.0
100
+ pixeloe==0.1.4
101
+ platformdirs==4.3.8
102
+ pooch==1.8.2
103
+ prompt_toolkit==3.0.51
104
+ propcache==0.3.2
105
+ psutil==7.0.0
106
+ ptyprocess==0.7.0
107
+ pure_eval==0.2.3
108
+ pycparser==2.22
109
+ pycryptodome==3.23.0
110
+ pydantic==2.11.7
111
+ pydantic-settings==2.10.1
112
+ pydantic_core==2.33.2
113
+ PyGithub==2.7.0
114
+ Pygments==2.19.2
115
+ PyJWT==2.10.1
116
+ PyMatting==1.1.14
117
+ PyNaCl==1.5.0
118
+ pyparsing==3.2.3
119
+ PySocks==1.7.1
120
+ python-dateutil==2.9.0.post0
121
+ python-dotenv==1.1.1
122
+ python-socks==2.7.1
123
+ PyWavelets==1.9.0
124
+ PyYAML==6.0.2
125
+ pyzmq==27.0.0
126
+ referencing==0.36.2
127
+ regex==2025.7.34
128
+ rembg==2.0.67
129
+ requests==2.32.4
130
+ rich==14.1.0
131
+ rpds-py==0.26.0
132
+ safetensors==0.5.3
133
+ scikit-image==0.25.2
134
+ scipy==1.16.1
135
+ sentencepiece==0.2.0
136
+ setuptools==80.9.0
137
+ shellingham==1.5.4
138
+ simsimd==6.5.0
139
+ six==1.17.0
140
+ smmap==5.0.2
141
+ soundfile==0.13.1
142
+ soupsieve==2.7
143
+ spandrel==0.4.1
144
+ SQLAlchemy==2.0.42
145
+ stack-data==0.6.3
146
+ stringzilla==3.12.5
147
+ sympy==1.13.3
148
+ tifffile==2025.6.11
149
+ timm==1.0.19
150
+ tokenizers==0.21.4
151
+ toml==0.10.2
152
+ torch==2.7.1+cu128
153
+ torchaudio==2.7.1+cu128
154
+ torchsde==0.2.6
155
+ torchvision==0.22.1+cu128
156
+ tornado==6.5.1
157
+ tqdm==4.67.1
158
+ traitlets==5.14.3
159
+ trampoline==0.1.2
160
+ transformers==4.54.1
161
+ transparent-background==1.3.4
162
+ triton==3.3.1
163
+ typer==0.16.0
164
+ typing-inspection==0.4.1
165
+ typing_extensions==4.14.0
166
+ unpaddedbase64==2.1.0
167
+ urllib3==2.5.0
168
+ uv==0.8.4
169
+ wcwidth==0.2.13
170
+ wget==3.2
171
+ wheel==0.45.1
172
+ widgetsnbextension==4.0.14
173
+ yarl==1.20.1
.venv-backups/25365439/venv-main-2025-08-27-2030.txt ADDED
@@ -0,0 +1,173 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ aiofiles==24.1.0
2
+ aiohappyeyeballs==2.6.1
3
+ aiohttp==3.12.15
4
+ aiohttp_socks==0.10.1
5
+ aiosignal==1.4.0
6
+ albucore==0.0.24
7
+ albumentations==2.0.8
8
+ alembic==1.16.4
9
+ annotated-types==0.7.0
10
+ asttokens==3.0.0
11
+ attrs==25.3.0
12
+ av==15.0.0
13
+ beautifulsoup4==4.13.4
14
+ certifi==2025.6.15
15
+ cffi==1.17.1
16
+ chardet==5.2.0
17
+ charset-normalizer==3.4.2
18
+ click==8.2.1
19
+ colour-science==0.4.6
20
+ comfyui-embedded-docs==0.2.4
21
+ comfyui_frontend_package==1.23.4
22
+ comfyui_workflow_templates==0.1.41
23
+ comm==0.2.2
24
+ contourpy==1.3.3
25
+ cryptography==45.0.5
26
+ cycler==0.12.1
27
+ debugpy==1.8.14
28
+ decorator==5.2.1
29
+ easydict==1.13
30
+ einops==0.8.1
31
+ executing==2.2.0
32
+ filelock==3.18.0
33
+ fonttools==4.59.2
34
+ frozenlist==1.7.0
35
+ fsspec==2025.5.1
36
+ gdown==5.2.0
37
+ gitdb==4.0.12
38
+ GitPython==3.1.45
39
+ greenlet==3.2.3
40
+ h11==0.16.0
41
+ h2==4.2.0
42
+ hf-xet==1.1.5
43
+ hpack==4.1.0
44
+ huggingface-hub==0.34.3
45
+ hyperframe==6.1.0
46
+ idna==3.10
47
+ imageio==2.37.0
48
+ inquirerpy==0.3.4
49
+ ipykernel==6.29.5
50
+ ipython==9.3.0
51
+ ipython_pygments_lexers==1.1.1
52
+ ipywidgets==8.1.7
53
+ jedi==0.19.2
54
+ Jinja2==3.1.4
55
+ jsonschema==4.25.0
56
+ jsonschema-specifications==2025.4.1
57
+ jupyter_client==8.6.3
58
+ jupyter_core==5.8.1
59
+ jupyterlab_widgets==3.0.15
60
+ kiwisolver==1.4.9
61
+ kornia==0.8.1
62
+ kornia_rs==0.1.9
63
+ lazy_loader==0.4
64
+ llvmlite==0.44.0
65
+ Mako==1.3.10
66
+ markdown-it-py==3.0.0
67
+ MarkupSafe==2.1.5
68
+ matplotlib==3.10.5
69
+ matplotlib-inline==0.1.7
70
+ matrix-nio==0.25.2
71
+ mdurl==0.1.2
72
+ mpmath==1.3.0
73
+ multidict==6.6.3
74
+ nest-asyncio==1.6.0
75
+ networkx==3.3
76
+ numba==0.61.2
77
+ numpy==2.1.2
78
+ nvidia-cublas-cu12==12.8.3.14
79
+ nvidia-cuda-cupti-cu12==12.8.57
80
+ nvidia-cuda-nvrtc-cu12==12.8.61
81
+ nvidia-cuda-runtime-cu12==12.8.57
82
+ nvidia-cudnn-cu12==9.7.1.26
83
+ nvidia-cufft-cu12==11.3.3.41
84
+ nvidia-cufile-cu12==1.13.0.11
85
+ nvidia-curand-cu12==10.3.9.55
86
+ nvidia-cusolver-cu12==11.7.2.55
87
+ nvidia-cusparse-cu12==12.5.7.53
88
+ nvidia-cusparselt-cu12==0.6.3
89
+ nvidia-nccl-cu12==2.26.2
90
+ nvidia-nvjitlink-cu12==12.8.61
91
+ nvidia-nvtx-cu12==12.8.55
92
+ opencv-python==4.12.0.88
93
+ opencv-python-headless==4.12.0.88
94
+ packaging==25.0
95
+ parso==0.8.4
96
+ pexpect==4.9.0
97
+ pfzy==0.3.4
98
+ piexif==1.1.3
99
+ pillow==11.0.0
100
+ pixeloe==0.1.4
101
+ platformdirs==4.3.8
102
+ pooch==1.8.2
103
+ prompt_toolkit==3.0.51
104
+ propcache==0.3.2
105
+ psutil==7.0.0
106
+ ptyprocess==0.7.0
107
+ pure_eval==0.2.3
108
+ pycparser==2.22
109
+ pycryptodome==3.23.0
110
+ pydantic==2.11.7
111
+ pydantic-settings==2.10.1
112
+ pydantic_core==2.33.2
113
+ PyGithub==2.7.0
114
+ Pygments==2.19.2
115
+ PyJWT==2.10.1
116
+ PyMatting==1.1.14
117
+ PyNaCl==1.5.0
118
+ pyparsing==3.2.3
119
+ PySocks==1.7.1
120
+ python-dateutil==2.9.0.post0
121
+ python-dotenv==1.1.1
122
+ python-socks==2.7.1
123
+ PyWavelets==1.9.0
124
+ PyYAML==6.0.2
125
+ pyzmq==27.0.0
126
+ referencing==0.36.2
127
+ regex==2025.7.34
128
+ rembg==2.0.67
129
+ requests==2.32.4
130
+ rich==14.1.0
131
+ rpds-py==0.26.0
132
+ safetensors==0.5.3
133
+ scikit-image==0.25.2
134
+ scipy==1.16.1
135
+ sentencepiece==0.2.0
136
+ setuptools==80.9.0
137
+ shellingham==1.5.4
138
+ simsimd==6.5.0
139
+ six==1.17.0
140
+ smmap==5.0.2
141
+ soundfile==0.13.1
142
+ soupsieve==2.7
143
+ spandrel==0.4.1
144
+ SQLAlchemy==2.0.42
145
+ stack-data==0.6.3
146
+ stringzilla==3.12.5
147
+ sympy==1.13.3
148
+ tifffile==2025.6.11
149
+ timm==1.0.19
150
+ tokenizers==0.21.4
151
+ toml==0.10.2
152
+ torch==2.7.1+cu128
153
+ torchaudio==2.7.1+cu128
154
+ torchsde==0.2.6
155
+ torchvision==0.22.1+cu128
156
+ tornado==6.5.1
157
+ tqdm==4.67.1
158
+ traitlets==5.14.3
159
+ trampoline==0.1.2
160
+ transformers==4.54.1
161
+ transparent-background==1.3.4
162
+ triton==3.3.1
163
+ typer==0.16.0
164
+ typing-inspection==0.4.1
165
+ typing_extensions==4.14.0
166
+ unpaddedbase64==2.1.0
167
+ urllib3==2.5.0
168
+ uv==0.8.4
169
+ wcwidth==0.2.13
170
+ wget==3.2
171
+ wheel==0.45.1
172
+ widgetsnbextension==4.0.14
173
+ yarl==1.20.1
.venv-backups/25365439/venv-main-2025-08-28-0730.txt ADDED
@@ -0,0 +1,173 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ aiofiles==24.1.0
2
+ aiohappyeyeballs==2.6.1
3
+ aiohttp==3.12.15
4
+ aiohttp_socks==0.10.1
5
+ aiosignal==1.4.0
6
+ albucore==0.0.24
7
+ albumentations==2.0.8
8
+ alembic==1.16.4
9
+ annotated-types==0.7.0
10
+ asttokens==3.0.0
11
+ attrs==25.3.0
12
+ av==15.0.0
13
+ beautifulsoup4==4.13.4
14
+ certifi==2025.6.15
15
+ cffi==1.17.1
16
+ chardet==5.2.0
17
+ charset-normalizer==3.4.2
18
+ click==8.2.1
19
+ colour-science==0.4.6
20
+ comfyui-embedded-docs==0.2.4
21
+ comfyui_frontend_package==1.23.4
22
+ comfyui_workflow_templates==0.1.41
23
+ comm==0.2.2
24
+ contourpy==1.3.3
25
+ cryptography==45.0.5
26
+ cycler==0.12.1
27
+ debugpy==1.8.14
28
+ decorator==5.2.1
29
+ easydict==1.13
30
+ einops==0.8.1
31
+ executing==2.2.0
32
+ filelock==3.18.0
33
+ fonttools==4.59.2
34
+ frozenlist==1.7.0
35
+ fsspec==2025.5.1
36
+ gdown==5.2.0
37
+ gitdb==4.0.12
38
+ GitPython==3.1.45
39
+ greenlet==3.2.3
40
+ h11==0.16.0
41
+ h2==4.2.0
42
+ hf-xet==1.1.5
43
+ hpack==4.1.0
44
+ huggingface-hub==0.34.3
45
+ hyperframe==6.1.0
46
+ idna==3.10
47
+ imageio==2.37.0
48
+ inquirerpy==0.3.4
49
+ ipykernel==6.29.5
50
+ ipython==9.3.0
51
+ ipython_pygments_lexers==1.1.1
52
+ ipywidgets==8.1.7
53
+ jedi==0.19.2
54
+ Jinja2==3.1.4
55
+ jsonschema==4.25.0
56
+ jsonschema-specifications==2025.4.1
57
+ jupyter_client==8.6.3
58
+ jupyter_core==5.8.1
59
+ jupyterlab_widgets==3.0.15
60
+ kiwisolver==1.4.9
61
+ kornia==0.8.1
62
+ kornia_rs==0.1.9
63
+ lazy_loader==0.4
64
+ llvmlite==0.44.0
65
+ Mako==1.3.10
66
+ markdown-it-py==3.0.0
67
+ MarkupSafe==2.1.5
68
+ matplotlib==3.10.5
69
+ matplotlib-inline==0.1.7
70
+ matrix-nio==0.25.2
71
+ mdurl==0.1.2
72
+ mpmath==1.3.0
73
+ multidict==6.6.3
74
+ nest-asyncio==1.6.0
75
+ networkx==3.3
76
+ numba==0.61.2
77
+ numpy==2.1.2
78
+ nvidia-cublas-cu12==12.8.3.14
79
+ nvidia-cuda-cupti-cu12==12.8.57
80
+ nvidia-cuda-nvrtc-cu12==12.8.61
81
+ nvidia-cuda-runtime-cu12==12.8.57
82
+ nvidia-cudnn-cu12==9.7.1.26
83
+ nvidia-cufft-cu12==11.3.3.41
84
+ nvidia-cufile-cu12==1.13.0.11
85
+ nvidia-curand-cu12==10.3.9.55
86
+ nvidia-cusolver-cu12==11.7.2.55
87
+ nvidia-cusparse-cu12==12.5.7.53
88
+ nvidia-cusparselt-cu12==0.6.3
89
+ nvidia-nccl-cu12==2.26.2
90
+ nvidia-nvjitlink-cu12==12.8.61
91
+ nvidia-nvtx-cu12==12.8.55
92
+ opencv-python==4.12.0.88
93
+ opencv-python-headless==4.12.0.88
94
+ packaging==25.0
95
+ parso==0.8.4
96
+ pexpect==4.9.0
97
+ pfzy==0.3.4
98
+ piexif==1.1.3
99
+ pillow==11.0.0
100
+ pixeloe==0.1.4
101
+ platformdirs==4.3.8
102
+ pooch==1.8.2
103
+ prompt_toolkit==3.0.51
104
+ propcache==0.3.2
105
+ psutil==7.0.0
106
+ ptyprocess==0.7.0
107
+ pure_eval==0.2.3
108
+ pycparser==2.22
109
+ pycryptodome==3.23.0
110
+ pydantic==2.11.7
111
+ pydantic-settings==2.10.1
112
+ pydantic_core==2.33.2
113
+ PyGithub==2.7.0
114
+ Pygments==2.19.2
115
+ PyJWT==2.10.1
116
+ PyMatting==1.1.14
117
+ PyNaCl==1.5.0
118
+ pyparsing==3.2.3
119
+ PySocks==1.7.1
120
+ python-dateutil==2.9.0.post0
121
+ python-dotenv==1.1.1
122
+ python-socks==2.7.1
123
+ PyWavelets==1.9.0
124
+ PyYAML==6.0.2
125
+ pyzmq==27.0.0
126
+ referencing==0.36.2
127
+ regex==2025.7.34
128
+ rembg==2.0.67
129
+ requests==2.32.4
130
+ rich==14.1.0
131
+ rpds-py==0.26.0
132
+ safetensors==0.5.3
133
+ scikit-image==0.25.2
134
+ scipy==1.16.1
135
+ sentencepiece==0.2.0
136
+ setuptools==80.9.0
137
+ shellingham==1.5.4
138
+ simsimd==6.5.0
139
+ six==1.17.0
140
+ smmap==5.0.2
141
+ soundfile==0.13.1
142
+ soupsieve==2.7
143
+ spandrel==0.4.1
144
+ SQLAlchemy==2.0.42
145
+ stack-data==0.6.3
146
+ stringzilla==3.12.5
147
+ sympy==1.13.3
148
+ tifffile==2025.6.11
149
+ timm==1.0.19
150
+ tokenizers==0.21.4
151
+ toml==0.10.2
152
+ torch==2.7.1+cu128
153
+ torchaudio==2.7.1+cu128
154
+ torchsde==0.2.6
155
+ torchvision==0.22.1+cu128
156
+ tornado==6.5.1
157
+ tqdm==4.67.1
158
+ traitlets==5.14.3
159
+ trampoline==0.1.2
160
+ transformers==4.54.1
161
+ transparent-background==1.3.4
162
+ triton==3.3.1
163
+ typer==0.16.0
164
+ typing-inspection==0.4.1
165
+ typing_extensions==4.14.0
166
+ unpaddedbase64==2.1.0
167
+ urllib3==2.5.0
168
+ uv==0.8.4
169
+ wcwidth==0.2.13
170
+ wget==3.2
171
+ wheel==0.45.1
172
+ widgetsnbextension==4.0.14
173
+ yarl==1.20.1
.venv-backups/25365439/venv-main-2025-08-28-0800.txt ADDED
@@ -0,0 +1,173 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ aiofiles==24.1.0
2
+ aiohappyeyeballs==2.6.1
3
+ aiohttp==3.12.15
4
+ aiohttp_socks==0.10.1
5
+ aiosignal==1.4.0
6
+ albucore==0.0.24
7
+ albumentations==2.0.8
8
+ alembic==1.16.4
9
+ annotated-types==0.7.0
10
+ asttokens==3.0.0
11
+ attrs==25.3.0
12
+ av==15.0.0
13
+ beautifulsoup4==4.13.4
14
+ certifi==2025.6.15
15
+ cffi==1.17.1
16
+ chardet==5.2.0
17
+ charset-normalizer==3.4.2
18
+ click==8.2.1
19
+ colour-science==0.4.6
20
+ comfyui-embedded-docs==0.2.4
21
+ comfyui_frontend_package==1.23.4
22
+ comfyui_workflow_templates==0.1.41
23
+ comm==0.2.2
24
+ contourpy==1.3.3
25
+ cryptography==45.0.5
26
+ cycler==0.12.1
27
+ debugpy==1.8.14
28
+ decorator==5.2.1
29
+ easydict==1.13
30
+ einops==0.8.1
31
+ executing==2.2.0
32
+ filelock==3.18.0
33
+ fonttools==4.59.2
34
+ frozenlist==1.7.0
35
+ fsspec==2025.5.1
36
+ gdown==5.2.0
37
+ gitdb==4.0.12
38
+ GitPython==3.1.45
39
+ greenlet==3.2.3
40
+ h11==0.16.0
41
+ h2==4.2.0
42
+ hf-xet==1.1.5
43
+ hpack==4.1.0
44
+ huggingface-hub==0.34.3
45
+ hyperframe==6.1.0
46
+ idna==3.10
47
+ imageio==2.37.0
48
+ inquirerpy==0.3.4
49
+ ipykernel==6.29.5
50
+ ipython==9.3.0
51
+ ipython_pygments_lexers==1.1.1
52
+ ipywidgets==8.1.7
53
+ jedi==0.19.2
54
+ Jinja2==3.1.4
55
+ jsonschema==4.25.0
56
+ jsonschema-specifications==2025.4.1
57
+ jupyter_client==8.6.3
58
+ jupyter_core==5.8.1
59
+ jupyterlab_widgets==3.0.15
60
+ kiwisolver==1.4.9
61
+ kornia==0.8.1
62
+ kornia_rs==0.1.9
63
+ lazy_loader==0.4
64
+ llvmlite==0.44.0
65
+ Mako==1.3.10
66
+ markdown-it-py==3.0.0
67
+ MarkupSafe==2.1.5
68
+ matplotlib==3.10.5
69
+ matplotlib-inline==0.1.7
70
+ matrix-nio==0.25.2
71
+ mdurl==0.1.2
72
+ mpmath==1.3.0
73
+ multidict==6.6.3
74
+ nest-asyncio==1.6.0
75
+ networkx==3.3
76
+ numba==0.61.2
77
+ numpy==2.1.2
78
+ nvidia-cublas-cu12==12.8.3.14
79
+ nvidia-cuda-cupti-cu12==12.8.57
80
+ nvidia-cuda-nvrtc-cu12==12.8.61
81
+ nvidia-cuda-runtime-cu12==12.8.57
82
+ nvidia-cudnn-cu12==9.7.1.26
83
+ nvidia-cufft-cu12==11.3.3.41
84
+ nvidia-cufile-cu12==1.13.0.11
85
+ nvidia-curand-cu12==10.3.9.55
86
+ nvidia-cusolver-cu12==11.7.2.55
87
+ nvidia-cusparse-cu12==12.5.7.53
88
+ nvidia-cusparselt-cu12==0.6.3
89
+ nvidia-nccl-cu12==2.26.2
90
+ nvidia-nvjitlink-cu12==12.8.61
91
+ nvidia-nvtx-cu12==12.8.55
92
+ opencv-python==4.12.0.88
93
+ opencv-python-headless==4.12.0.88
94
+ packaging==25.0
95
+ parso==0.8.4
96
+ pexpect==4.9.0
97
+ pfzy==0.3.4
98
+ piexif==1.1.3
99
+ pillow==11.0.0
100
+ pixeloe==0.1.4
101
+ platformdirs==4.3.8
102
+ pooch==1.8.2
103
+ prompt_toolkit==3.0.51
104
+ propcache==0.3.2
105
+ psutil==7.0.0
106
+ ptyprocess==0.7.0
107
+ pure_eval==0.2.3
108
+ pycparser==2.22
109
+ pycryptodome==3.23.0
110
+ pydantic==2.11.7
111
+ pydantic-settings==2.10.1
112
+ pydantic_core==2.33.2
113
+ PyGithub==2.7.0
114
+ Pygments==2.19.2
115
+ PyJWT==2.10.1
116
+ PyMatting==1.1.14
117
+ PyNaCl==1.5.0
118
+ pyparsing==3.2.3
119
+ PySocks==1.7.1
120
+ python-dateutil==2.9.0.post0
121
+ python-dotenv==1.1.1
122
+ python-socks==2.7.1
123
+ PyWavelets==1.9.0
124
+ PyYAML==6.0.2
125
+ pyzmq==27.0.0
126
+ referencing==0.36.2
127
+ regex==2025.7.34
128
+ rembg==2.0.67
129
+ requests==2.32.4
130
+ rich==14.1.0
131
+ rpds-py==0.26.0
132
+ safetensors==0.5.3
133
+ scikit-image==0.25.2
134
+ scipy==1.16.1
135
+ sentencepiece==0.2.0
136
+ setuptools==80.9.0
137
+ shellingham==1.5.4
138
+ simsimd==6.5.0
139
+ six==1.17.0
140
+ smmap==5.0.2
141
+ soundfile==0.13.1
142
+ soupsieve==2.7
143
+ spandrel==0.4.1
144
+ SQLAlchemy==2.0.42
145
+ stack-data==0.6.3
146
+ stringzilla==3.12.5
147
+ sympy==1.13.3
148
+ tifffile==2025.6.11
149
+ timm==1.0.19
150
+ tokenizers==0.21.4
151
+ toml==0.10.2
152
+ torch==2.7.1+cu128
153
+ torchaudio==2.7.1+cu128
154
+ torchsde==0.2.6
155
+ torchvision==0.22.1+cu128
156
+ tornado==6.5.1
157
+ tqdm==4.67.1
158
+ traitlets==5.14.3
159
+ trampoline==0.1.2
160
+ transformers==4.54.1
161
+ transparent-background==1.3.4
162
+ triton==3.3.1
163
+ typer==0.16.0
164
+ typing-inspection==0.4.1
165
+ typing_extensions==4.14.0
166
+ unpaddedbase64==2.1.0
167
+ urllib3==2.5.0
168
+ uv==0.8.4
169
+ wcwidth==0.2.13
170
+ wget==3.2
171
+ wheel==0.45.1
172
+ widgetsnbextension==4.0.14
173
+ yarl==1.20.1
.venv-backups/25365439/venv-main-2025-08-28-0830.txt ADDED
@@ -0,0 +1,173 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ aiofiles==24.1.0
2
+ aiohappyeyeballs==2.6.1
3
+ aiohttp==3.12.15
4
+ aiohttp_socks==0.10.1
5
+ aiosignal==1.4.0
6
+ albucore==0.0.24
7
+ albumentations==2.0.8
8
+ alembic==1.16.4
9
+ annotated-types==0.7.0
10
+ asttokens==3.0.0
11
+ attrs==25.3.0
12
+ av==15.0.0
13
+ beautifulsoup4==4.13.4
14
+ certifi==2025.6.15
15
+ cffi==1.17.1
16
+ chardet==5.2.0
17
+ charset-normalizer==3.4.2
18
+ click==8.2.1
19
+ colour-science==0.4.6
20
+ comfyui-embedded-docs==0.2.4
21
+ comfyui_frontend_package==1.23.4
22
+ comfyui_workflow_templates==0.1.41
23
+ comm==0.2.2
24
+ contourpy==1.3.3
25
+ cryptography==45.0.5
26
+ cycler==0.12.1
27
+ debugpy==1.8.14
28
+ decorator==5.2.1
29
+ easydict==1.13
30
+ einops==0.8.1
31
+ executing==2.2.0
32
+ filelock==3.18.0
33
+ fonttools==4.59.2
34
+ frozenlist==1.7.0
35
+ fsspec==2025.5.1
36
+ gdown==5.2.0
37
+ gitdb==4.0.12
38
+ GitPython==3.1.45
39
+ greenlet==3.2.3
40
+ h11==0.16.0
41
+ h2==4.2.0
42
+ hf-xet==1.1.5
43
+ hpack==4.1.0
44
+ huggingface-hub==0.34.3
45
+ hyperframe==6.1.0
46
+ idna==3.10
47
+ imageio==2.37.0
48
+ inquirerpy==0.3.4
49
+ ipykernel==6.29.5
50
+ ipython==9.3.0
51
+ ipython_pygments_lexers==1.1.1
52
+ ipywidgets==8.1.7
53
+ jedi==0.19.2
54
+ Jinja2==3.1.4
55
+ jsonschema==4.25.0
56
+ jsonschema-specifications==2025.4.1
57
+ jupyter_client==8.6.3
58
+ jupyter_core==5.8.1
59
+ jupyterlab_widgets==3.0.15
60
+ kiwisolver==1.4.9
61
+ kornia==0.8.1
62
+ kornia_rs==0.1.9
63
+ lazy_loader==0.4
64
+ llvmlite==0.44.0
65
+ Mako==1.3.10
66
+ markdown-it-py==3.0.0
67
+ MarkupSafe==2.1.5
68
+ matplotlib==3.10.5
69
+ matplotlib-inline==0.1.7
70
+ matrix-nio==0.25.2
71
+ mdurl==0.1.2
72
+ mpmath==1.3.0
73
+ multidict==6.6.3
74
+ nest-asyncio==1.6.0
75
+ networkx==3.3
76
+ numba==0.61.2
77
+ numpy==2.1.2
78
+ nvidia-cublas-cu12==12.8.3.14
79
+ nvidia-cuda-cupti-cu12==12.8.57
80
+ nvidia-cuda-nvrtc-cu12==12.8.61
81
+ nvidia-cuda-runtime-cu12==12.8.57
82
+ nvidia-cudnn-cu12==9.7.1.26
83
+ nvidia-cufft-cu12==11.3.3.41
84
+ nvidia-cufile-cu12==1.13.0.11
85
+ nvidia-curand-cu12==10.3.9.55
86
+ nvidia-cusolver-cu12==11.7.2.55
87
+ nvidia-cusparse-cu12==12.5.7.53
88
+ nvidia-cusparselt-cu12==0.6.3
89
+ nvidia-nccl-cu12==2.26.2
90
+ nvidia-nvjitlink-cu12==12.8.61
91
+ nvidia-nvtx-cu12==12.8.55
92
+ opencv-python==4.12.0.88
93
+ opencv-python-headless==4.12.0.88
94
+ packaging==25.0
95
+ parso==0.8.4
96
+ pexpect==4.9.0
97
+ pfzy==0.3.4
98
+ piexif==1.1.3
99
+ pillow==11.0.0
100
+ pixeloe==0.1.4
101
+ platformdirs==4.3.8
102
+ pooch==1.8.2
103
+ prompt_toolkit==3.0.51
104
+ propcache==0.3.2
105
+ psutil==7.0.0
106
+ ptyprocess==0.7.0
107
+ pure_eval==0.2.3
108
+ pycparser==2.22
109
+ pycryptodome==3.23.0
110
+ pydantic==2.11.7
111
+ pydantic-settings==2.10.1
112
+ pydantic_core==2.33.2
113
+ PyGithub==2.7.0
114
+ Pygments==2.19.2
115
+ PyJWT==2.10.1
116
+ PyMatting==1.1.14
117
+ PyNaCl==1.5.0
118
+ pyparsing==3.2.3
119
+ PySocks==1.7.1
120
+ python-dateutil==2.9.0.post0
121
+ python-dotenv==1.1.1
122
+ python-socks==2.7.1
123
+ PyWavelets==1.9.0
124
+ PyYAML==6.0.2
125
+ pyzmq==27.0.0
126
+ referencing==0.36.2
127
+ regex==2025.7.34
128
+ rembg==2.0.67
129
+ requests==2.32.4
130
+ rich==14.1.0
131
+ rpds-py==0.26.0
132
+ safetensors==0.5.3
133
+ scikit-image==0.25.2
134
+ scipy==1.16.1
135
+ sentencepiece==0.2.0
136
+ setuptools==80.9.0
137
+ shellingham==1.5.4
138
+ simsimd==6.5.0
139
+ six==1.17.0
140
+ smmap==5.0.2
141
+ soundfile==0.13.1
142
+ soupsieve==2.7
143
+ spandrel==0.4.1
144
+ SQLAlchemy==2.0.42
145
+ stack-data==0.6.3
146
+ stringzilla==3.12.5
147
+ sympy==1.13.3
148
+ tifffile==2025.6.11
149
+ timm==1.0.19
150
+ tokenizers==0.21.4
151
+ toml==0.10.2
152
+ torch==2.7.1+cu128
153
+ torchaudio==2.7.1+cu128
154
+ torchsde==0.2.6
155
+ torchvision==0.22.1+cu128
156
+ tornado==6.5.1
157
+ tqdm==4.67.1
158
+ traitlets==5.14.3
159
+ trampoline==0.1.2
160
+ transformers==4.54.1
161
+ transparent-background==1.3.4
162
+ triton==3.3.1
163
+ typer==0.16.0
164
+ typing-inspection==0.4.1
165
+ typing_extensions==4.14.0
166
+ unpaddedbase64==2.1.0
167
+ urllib3==2.5.0
168
+ uv==0.8.4
169
+ wcwidth==0.2.13
170
+ wget==3.2
171
+ wheel==0.45.1
172
+ widgetsnbextension==4.0.14
173
+ yarl==1.20.1
.venv-backups/25365439/venv-main-2025-08-28-0930.txt ADDED
@@ -0,0 +1,173 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ aiofiles==24.1.0
2
+ aiohappyeyeballs==2.6.1
3
+ aiohttp==3.12.15
4
+ aiohttp_socks==0.10.1
5
+ aiosignal==1.4.0
6
+ albucore==0.0.24
7
+ albumentations==2.0.8
8
+ alembic==1.16.4
9
+ annotated-types==0.7.0
10
+ asttokens==3.0.0
11
+ attrs==25.3.0
12
+ av==15.0.0
13
+ beautifulsoup4==4.13.4
14
+ certifi==2025.6.15
15
+ cffi==1.17.1
16
+ chardet==5.2.0
17
+ charset-normalizer==3.4.2
18
+ click==8.2.1
19
+ colour-science==0.4.6
20
+ comfyui-embedded-docs==0.2.4
21
+ comfyui_frontend_package==1.23.4
22
+ comfyui_workflow_templates==0.1.41
23
+ comm==0.2.2
24
+ contourpy==1.3.3
25
+ cryptography==45.0.5
26
+ cycler==0.12.1
27
+ debugpy==1.8.14
28
+ decorator==5.2.1
29
+ easydict==1.13
30
+ einops==0.8.1
31
+ executing==2.2.0
32
+ filelock==3.18.0
33
+ fonttools==4.59.2
34
+ frozenlist==1.7.0
35
+ fsspec==2025.5.1
36
+ gdown==5.2.0
37
+ gitdb==4.0.12
38
+ GitPython==3.1.45
39
+ greenlet==3.2.3
40
+ h11==0.16.0
41
+ h2==4.2.0
42
+ hf-xet==1.1.5
43
+ hpack==4.1.0
44
+ huggingface-hub==0.34.3
45
+ hyperframe==6.1.0
46
+ idna==3.10
47
+ imageio==2.37.0
48
+ inquirerpy==0.3.4
49
+ ipykernel==6.29.5
50
+ ipython==9.3.0
51
+ ipython_pygments_lexers==1.1.1
52
+ ipywidgets==8.1.7
53
+ jedi==0.19.2
54
+ Jinja2==3.1.4
55
+ jsonschema==4.25.0
56
+ jsonschema-specifications==2025.4.1
57
+ jupyter_client==8.6.3
58
+ jupyter_core==5.8.1
59
+ jupyterlab_widgets==3.0.15
60
+ kiwisolver==1.4.9
61
+ kornia==0.8.1
62
+ kornia_rs==0.1.9
63
+ lazy_loader==0.4
64
+ llvmlite==0.44.0
65
+ Mako==1.3.10
66
+ markdown-it-py==3.0.0
67
+ MarkupSafe==2.1.5
68
+ matplotlib==3.10.5
69
+ matplotlib-inline==0.1.7
70
+ matrix-nio==0.25.2
71
+ mdurl==0.1.2
72
+ mpmath==1.3.0
73
+ multidict==6.6.3
74
+ nest-asyncio==1.6.0
75
+ networkx==3.3
76
+ numba==0.61.2
77
+ numpy==2.1.2
78
+ nvidia-cublas-cu12==12.8.3.14
79
+ nvidia-cuda-cupti-cu12==12.8.57
80
+ nvidia-cuda-nvrtc-cu12==12.8.61
81
+ nvidia-cuda-runtime-cu12==12.8.57
82
+ nvidia-cudnn-cu12==9.7.1.26
83
+ nvidia-cufft-cu12==11.3.3.41
84
+ nvidia-cufile-cu12==1.13.0.11
85
+ nvidia-curand-cu12==10.3.9.55
86
+ nvidia-cusolver-cu12==11.7.2.55
87
+ nvidia-cusparse-cu12==12.5.7.53
88
+ nvidia-cusparselt-cu12==0.6.3
89
+ nvidia-nccl-cu12==2.26.2
90
+ nvidia-nvjitlink-cu12==12.8.61
91
+ nvidia-nvtx-cu12==12.8.55
92
+ opencv-python==4.12.0.88
93
+ opencv-python-headless==4.12.0.88
94
+ packaging==25.0
95
+ parso==0.8.4
96
+ pexpect==4.9.0
97
+ pfzy==0.3.4
98
+ piexif==1.1.3
99
+ pillow==11.0.0
100
+ pixeloe==0.1.4
101
+ platformdirs==4.3.8
102
+ pooch==1.8.2
103
+ prompt_toolkit==3.0.51
104
+ propcache==0.3.2
105
+ psutil==7.0.0
106
+ ptyprocess==0.7.0
107
+ pure_eval==0.2.3
108
+ pycparser==2.22
109
+ pycryptodome==3.23.0
110
+ pydantic==2.11.7
111
+ pydantic-settings==2.10.1
112
+ pydantic_core==2.33.2
113
+ PyGithub==2.7.0
114
+ Pygments==2.19.2
115
+ PyJWT==2.10.1
116
+ PyMatting==1.1.14
117
+ PyNaCl==1.5.0
118
+ pyparsing==3.2.3
119
+ PySocks==1.7.1
120
+ python-dateutil==2.9.0.post0
121
+ python-dotenv==1.1.1
122
+ python-socks==2.7.1
123
+ PyWavelets==1.9.0
124
+ PyYAML==6.0.2
125
+ pyzmq==27.0.0
126
+ referencing==0.36.2
127
+ regex==2025.7.34
128
+ rembg==2.0.67
129
+ requests==2.32.4
130
+ rich==14.1.0
131
+ rpds-py==0.26.0
132
+ safetensors==0.5.3
133
+ scikit-image==0.25.2
134
+ scipy==1.16.1
135
+ sentencepiece==0.2.0
136
+ setuptools==80.9.0
137
+ shellingham==1.5.4
138
+ simsimd==6.5.0
139
+ six==1.17.0
140
+ smmap==5.0.2
141
+ soundfile==0.13.1
142
+ soupsieve==2.7
143
+ spandrel==0.4.1
144
+ SQLAlchemy==2.0.42
145
+ stack-data==0.6.3
146
+ stringzilla==3.12.5
147
+ sympy==1.13.3
148
+ tifffile==2025.6.11
149
+ timm==1.0.19
150
+ tokenizers==0.21.4
151
+ toml==0.10.2
152
+ torch==2.7.1+cu128
153
+ torchaudio==2.7.1+cu128
154
+ torchsde==0.2.6
155
+ torchvision==0.22.1+cu128
156
+ tornado==6.5.1
157
+ tqdm==4.67.1
158
+ traitlets==5.14.3
159
+ trampoline==0.1.2
160
+ transformers==4.54.1
161
+ transparent-background==1.3.4
162
+ triton==3.3.1
163
+ typer==0.16.0
164
+ typing-inspection==0.4.1
165
+ typing_extensions==4.14.0
166
+ unpaddedbase64==2.1.0
167
+ urllib3==2.5.0
168
+ uv==0.8.4
169
+ wcwidth==0.2.13
170
+ wget==3.2
171
+ wheel==0.45.1
172
+ widgetsnbextension==4.0.14
173
+ yarl==1.20.1
.venv-backups/25365439/venv-main-2025-08-28-1200.txt ADDED
@@ -0,0 +1,173 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ aiofiles==24.1.0
2
+ aiohappyeyeballs==2.6.1
3
+ aiohttp==3.12.15
4
+ aiohttp_socks==0.10.1
5
+ aiosignal==1.4.0
6
+ albucore==0.0.24
7
+ albumentations==2.0.8
8
+ alembic==1.16.4
9
+ annotated-types==0.7.0
10
+ asttokens==3.0.0
11
+ attrs==25.3.0
12
+ av==15.0.0
13
+ beautifulsoup4==4.13.4
14
+ certifi==2025.6.15
15
+ cffi==1.17.1
16
+ chardet==5.2.0
17
+ charset-normalizer==3.4.2
18
+ click==8.2.1
19
+ colour-science==0.4.6
20
+ comfyui-embedded-docs==0.2.4
21
+ comfyui_frontend_package==1.23.4
22
+ comfyui_workflow_templates==0.1.41
23
+ comm==0.2.2
24
+ contourpy==1.3.3
25
+ cryptography==45.0.5
26
+ cycler==0.12.1
27
+ debugpy==1.8.14
28
+ decorator==5.2.1
29
+ easydict==1.13
30
+ einops==0.8.1
31
+ executing==2.2.0
32
+ filelock==3.18.0
33
+ fonttools==4.59.2
34
+ frozenlist==1.7.0
35
+ fsspec==2025.5.1
36
+ gdown==5.2.0
37
+ gitdb==4.0.12
38
+ GitPython==3.1.45
39
+ greenlet==3.2.3
40
+ h11==0.16.0
41
+ h2==4.2.0
42
+ hf-xet==1.1.5
43
+ hpack==4.1.0
44
+ huggingface-hub==0.34.3
45
+ hyperframe==6.1.0
46
+ idna==3.10
47
+ imageio==2.37.0
48
+ inquirerpy==0.3.4
49
+ ipykernel==6.29.5
50
+ ipython==9.3.0
51
+ ipython_pygments_lexers==1.1.1
52
+ ipywidgets==8.1.7
53
+ jedi==0.19.2
54
+ Jinja2==3.1.4
55
+ jsonschema==4.25.0
56
+ jsonschema-specifications==2025.4.1
57
+ jupyter_client==8.6.3
58
+ jupyter_core==5.8.1
59
+ jupyterlab_widgets==3.0.15
60
+ kiwisolver==1.4.9
61
+ kornia==0.8.1
62
+ kornia_rs==0.1.9
63
+ lazy_loader==0.4
64
+ llvmlite==0.44.0
65
+ Mako==1.3.10
66
+ markdown-it-py==3.0.0
67
+ MarkupSafe==2.1.5
68
+ matplotlib==3.10.5
69
+ matplotlib-inline==0.1.7
70
+ matrix-nio==0.25.2
71
+ mdurl==0.1.2
72
+ mpmath==1.3.0
73
+ multidict==6.6.3
74
+ nest-asyncio==1.6.0
75
+ networkx==3.3
76
+ numba==0.61.2
77
+ numpy==2.1.2
78
+ nvidia-cublas-cu12==12.8.3.14
79
+ nvidia-cuda-cupti-cu12==12.8.57
80
+ nvidia-cuda-nvrtc-cu12==12.8.61
81
+ nvidia-cuda-runtime-cu12==12.8.57
82
+ nvidia-cudnn-cu12==9.7.1.26
83
+ nvidia-cufft-cu12==11.3.3.41
84
+ nvidia-cufile-cu12==1.13.0.11
85
+ nvidia-curand-cu12==10.3.9.55
86
+ nvidia-cusolver-cu12==11.7.2.55
87
+ nvidia-cusparse-cu12==12.5.7.53
88
+ nvidia-cusparselt-cu12==0.6.3
89
+ nvidia-nccl-cu12==2.26.2
90
+ nvidia-nvjitlink-cu12==12.8.61
91
+ nvidia-nvtx-cu12==12.8.55
92
+ opencv-python==4.12.0.88
93
+ opencv-python-headless==4.12.0.88
94
+ packaging==25.0
95
+ parso==0.8.4
96
+ pexpect==4.9.0
97
+ pfzy==0.3.4
98
+ piexif==1.1.3
99
+ pillow==11.0.0
100
+ pixeloe==0.1.4
101
+ platformdirs==4.3.8
102
+ pooch==1.8.2
103
+ prompt_toolkit==3.0.51
104
+ propcache==0.3.2
105
+ psutil==7.0.0
106
+ ptyprocess==0.7.0
107
+ pure_eval==0.2.3
108
+ pycparser==2.22
109
+ pycryptodome==3.23.0
110
+ pydantic==2.11.7
111
+ pydantic-settings==2.10.1
112
+ pydantic_core==2.33.2
113
+ PyGithub==2.7.0
114
+ Pygments==2.19.2
115
+ PyJWT==2.10.1
116
+ PyMatting==1.1.14
117
+ PyNaCl==1.5.0
118
+ pyparsing==3.2.3
119
+ PySocks==1.7.1
120
+ python-dateutil==2.9.0.post0
121
+ python-dotenv==1.1.1
122
+ python-socks==2.7.1
123
+ PyWavelets==1.9.0
124
+ PyYAML==6.0.2
125
+ pyzmq==27.0.0
126
+ referencing==0.36.2
127
+ regex==2025.7.34
128
+ rembg==2.0.67
129
+ requests==2.32.4
130
+ rich==14.1.0
131
+ rpds-py==0.26.0
132
+ safetensors==0.5.3
133
+ scikit-image==0.25.2
134
+ scipy==1.16.1
135
+ sentencepiece==0.2.0
136
+ setuptools==80.9.0
137
+ shellingham==1.5.4
138
+ simsimd==6.5.0
139
+ six==1.17.0
140
+ smmap==5.0.2
141
+ soundfile==0.13.1
142
+ soupsieve==2.7
143
+ spandrel==0.4.1
144
+ SQLAlchemy==2.0.42
145
+ stack-data==0.6.3
146
+ stringzilla==3.12.5
147
+ sympy==1.13.3
148
+ tifffile==2025.6.11
149
+ timm==1.0.19
150
+ tokenizers==0.21.4
151
+ toml==0.10.2
152
+ torch==2.7.1+cu128
153
+ torchaudio==2.7.1+cu128
154
+ torchsde==0.2.6
155
+ torchvision==0.22.1+cu128
156
+ tornado==6.5.1
157
+ tqdm==4.67.1
158
+ traitlets==5.14.3
159
+ trampoline==0.1.2
160
+ transformers==4.54.1
161
+ transparent-background==1.3.4
162
+ triton==3.3.1
163
+ typer==0.16.0
164
+ typing-inspection==0.4.1
165
+ typing_extensions==4.14.0
166
+ unpaddedbase64==2.1.0
167
+ urllib3==2.5.0
168
+ uv==0.8.4
169
+ wcwidth==0.2.13
170
+ wget==3.2
171
+ wheel==0.45.1
172
+ widgetsnbextension==4.0.14
173
+ yarl==1.20.1
.venv-backups/25365439/venv-main-2025-08-28-1230.txt ADDED
@@ -0,0 +1,173 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ aiofiles==24.1.0
2
+ aiohappyeyeballs==2.6.1
3
+ aiohttp==3.12.15
4
+ aiohttp_socks==0.10.1
5
+ aiosignal==1.4.0
6
+ albucore==0.0.24
7
+ albumentations==2.0.8
8
+ alembic==1.16.4
9
+ annotated-types==0.7.0
10
+ asttokens==3.0.0
11
+ attrs==25.3.0
12
+ av==15.0.0
13
+ beautifulsoup4==4.13.4
14
+ certifi==2025.6.15
15
+ cffi==1.17.1
16
+ chardet==5.2.0
17
+ charset-normalizer==3.4.2
18
+ click==8.2.1
19
+ colour-science==0.4.6
20
+ comfyui-embedded-docs==0.2.4
21
+ comfyui_frontend_package==1.23.4
22
+ comfyui_workflow_templates==0.1.41
23
+ comm==0.2.2
24
+ contourpy==1.3.3
25
+ cryptography==45.0.5
26
+ cycler==0.12.1
27
+ debugpy==1.8.14
28
+ decorator==5.2.1
29
+ easydict==1.13
30
+ einops==0.8.1
31
+ executing==2.2.0
32
+ filelock==3.18.0
33
+ fonttools==4.59.2
34
+ frozenlist==1.7.0
35
+ fsspec==2025.5.1
36
+ gdown==5.2.0
37
+ gitdb==4.0.12
38
+ GitPython==3.1.45
39
+ greenlet==3.2.3
40
+ h11==0.16.0
41
+ h2==4.2.0
42
+ hf-xet==1.1.5
43
+ hpack==4.1.0
44
+ huggingface-hub==0.34.3
45
+ hyperframe==6.1.0
46
+ idna==3.10
47
+ imageio==2.37.0
48
+ inquirerpy==0.3.4
49
+ ipykernel==6.29.5
50
+ ipython==9.3.0
51
+ ipython_pygments_lexers==1.1.1
52
+ ipywidgets==8.1.7
53
+ jedi==0.19.2
54
+ Jinja2==3.1.4
55
+ jsonschema==4.25.0
56
+ jsonschema-specifications==2025.4.1
57
+ jupyter_client==8.6.3
58
+ jupyter_core==5.8.1
59
+ jupyterlab_widgets==3.0.15
60
+ kiwisolver==1.4.9
61
+ kornia==0.8.1
62
+ kornia_rs==0.1.9
63
+ lazy_loader==0.4
64
+ llvmlite==0.44.0
65
+ Mako==1.3.10
66
+ markdown-it-py==3.0.0
67
+ MarkupSafe==2.1.5
68
+ matplotlib==3.10.5
69
+ matplotlib-inline==0.1.7
70
+ matrix-nio==0.25.2
71
+ mdurl==0.1.2
72
+ mpmath==1.3.0
73
+ multidict==6.6.3
74
+ nest-asyncio==1.6.0
75
+ networkx==3.3
76
+ numba==0.61.2
77
+ numpy==2.1.2
78
+ nvidia-cublas-cu12==12.8.3.14
79
+ nvidia-cuda-cupti-cu12==12.8.57
80
+ nvidia-cuda-nvrtc-cu12==12.8.61
81
+ nvidia-cuda-runtime-cu12==12.8.57
82
+ nvidia-cudnn-cu12==9.7.1.26
83
+ nvidia-cufft-cu12==11.3.3.41
84
+ nvidia-cufile-cu12==1.13.0.11
85
+ nvidia-curand-cu12==10.3.9.55
86
+ nvidia-cusolver-cu12==11.7.2.55
87
+ nvidia-cusparse-cu12==12.5.7.53
88
+ nvidia-cusparselt-cu12==0.6.3
89
+ nvidia-nccl-cu12==2.26.2
90
+ nvidia-nvjitlink-cu12==12.8.61
91
+ nvidia-nvtx-cu12==12.8.55
92
+ opencv-python==4.12.0.88
93
+ opencv-python-headless==4.12.0.88
94
+ packaging==25.0
95
+ parso==0.8.4
96
+ pexpect==4.9.0
97
+ pfzy==0.3.4
98
+ piexif==1.1.3
99
+ pillow==11.0.0
100
+ pixeloe==0.1.4
101
+ platformdirs==4.3.8
102
+ pooch==1.8.2
103
+ prompt_toolkit==3.0.51
104
+ propcache==0.3.2
105
+ psutil==7.0.0
106
+ ptyprocess==0.7.0
107
+ pure_eval==0.2.3
108
+ pycparser==2.22
109
+ pycryptodome==3.23.0
110
+ pydantic==2.11.7
111
+ pydantic-settings==2.10.1
112
+ pydantic_core==2.33.2
113
+ PyGithub==2.7.0
114
+ Pygments==2.19.2
115
+ PyJWT==2.10.1
116
+ PyMatting==1.1.14
117
+ PyNaCl==1.5.0
118
+ pyparsing==3.2.3
119
+ PySocks==1.7.1
120
+ python-dateutil==2.9.0.post0
121
+ python-dotenv==1.1.1
122
+ python-socks==2.7.1
123
+ PyWavelets==1.9.0
124
+ PyYAML==6.0.2
125
+ pyzmq==27.0.0
126
+ referencing==0.36.2
127
+ regex==2025.7.34
128
+ rembg==2.0.67
129
+ requests==2.32.4
130
+ rich==14.1.0
131
+ rpds-py==0.26.0
132
+ safetensors==0.5.3
133
+ scikit-image==0.25.2
134
+ scipy==1.16.1
135
+ sentencepiece==0.2.0
136
+ setuptools==80.9.0
137
+ shellingham==1.5.4
138
+ simsimd==6.5.0
139
+ six==1.17.0
140
+ smmap==5.0.2
141
+ soundfile==0.13.1
142
+ soupsieve==2.7
143
+ spandrel==0.4.1
144
+ SQLAlchemy==2.0.42
145
+ stack-data==0.6.3
146
+ stringzilla==3.12.5
147
+ sympy==1.13.3
148
+ tifffile==2025.6.11
149
+ timm==1.0.19
150
+ tokenizers==0.21.4
151
+ toml==0.10.2
152
+ torch==2.7.1+cu128
153
+ torchaudio==2.7.1+cu128
154
+ torchsde==0.2.6
155
+ torchvision==0.22.1+cu128
156
+ tornado==6.5.1
157
+ tqdm==4.67.1
158
+ traitlets==5.14.3
159
+ trampoline==0.1.2
160
+ transformers==4.54.1
161
+ transparent-background==1.3.4
162
+ triton==3.3.1
163
+ typer==0.16.0
164
+ typing-inspection==0.4.1
165
+ typing_extensions==4.14.0
166
+ unpaddedbase64==2.1.0
167
+ urllib3==2.5.0
168
+ uv==0.8.4
169
+ wcwidth==0.2.13
170
+ wget==3.2
171
+ wheel==0.45.1
172
+ widgetsnbextension==4.0.14
173
+ yarl==1.20.1
.venv-backups/25365439/venv-main-2025-08-29-1230.txt ADDED
@@ -0,0 +1,173 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ aiofiles==24.1.0
2
+ aiohappyeyeballs==2.6.1
3
+ aiohttp==3.12.15
4
+ aiohttp_socks==0.10.1
5
+ aiosignal==1.4.0
6
+ albucore==0.0.24
7
+ albumentations==2.0.8
8
+ alembic==1.16.4
9
+ annotated-types==0.7.0
10
+ asttokens==3.0.0
11
+ attrs==25.3.0
12
+ av==15.0.0
13
+ beautifulsoup4==4.13.4
14
+ certifi==2025.6.15
15
+ cffi==1.17.1
16
+ chardet==5.2.0
17
+ charset-normalizer==3.4.2
18
+ click==8.2.1
19
+ colour-science==0.4.6
20
+ comfyui-embedded-docs==0.2.4
21
+ comfyui_frontend_package==1.23.4
22
+ comfyui_workflow_templates==0.1.41
23
+ comm==0.2.2
24
+ contourpy==1.3.3
25
+ cryptography==45.0.5
26
+ cycler==0.12.1
27
+ debugpy==1.8.14
28
+ decorator==5.2.1
29
+ easydict==1.13
30
+ einops==0.8.1
31
+ executing==2.2.0
32
+ filelock==3.18.0
33
+ fonttools==4.59.2
34
+ frozenlist==1.7.0
35
+ fsspec==2025.5.1
36
+ gdown==5.2.0
37
+ gitdb==4.0.12
38
+ GitPython==3.1.45
39
+ greenlet==3.2.3
40
+ h11==0.16.0
41
+ h2==4.2.0
42
+ hf-xet==1.1.5
43
+ hpack==4.1.0
44
+ huggingface-hub==0.34.3
45
+ hyperframe==6.1.0
46
+ idna==3.10
47
+ imageio==2.37.0
48
+ inquirerpy==0.3.4
49
+ ipykernel==6.29.5
50
+ ipython==9.3.0
51
+ ipython_pygments_lexers==1.1.1
52
+ ipywidgets==8.1.7
53
+ jedi==0.19.2
54
+ Jinja2==3.1.4
55
+ jsonschema==4.25.0
56
+ jsonschema-specifications==2025.4.1
57
+ jupyter_client==8.6.3
58
+ jupyter_core==5.8.1
59
+ jupyterlab_widgets==3.0.15
60
+ kiwisolver==1.4.9
61
+ kornia==0.8.1
62
+ kornia_rs==0.1.9
63
+ lazy_loader==0.4
64
+ llvmlite==0.44.0
65
+ Mako==1.3.10
66
+ markdown-it-py==3.0.0
67
+ MarkupSafe==2.1.5
68
+ matplotlib==3.10.5
69
+ matplotlib-inline==0.1.7
70
+ matrix-nio==0.25.2
71
+ mdurl==0.1.2
72
+ mpmath==1.3.0
73
+ multidict==6.6.3
74
+ nest-asyncio==1.6.0
75
+ networkx==3.3
76
+ numba==0.61.2
77
+ numpy==2.1.2
78
+ nvidia-cublas-cu12==12.8.3.14
79
+ nvidia-cuda-cupti-cu12==12.8.57
80
+ nvidia-cuda-nvrtc-cu12==12.8.61
81
+ nvidia-cuda-runtime-cu12==12.8.57
82
+ nvidia-cudnn-cu12==9.7.1.26
83
+ nvidia-cufft-cu12==11.3.3.41
84
+ nvidia-cufile-cu12==1.13.0.11
85
+ nvidia-curand-cu12==10.3.9.55
86
+ nvidia-cusolver-cu12==11.7.2.55
87
+ nvidia-cusparse-cu12==12.5.7.53
88
+ nvidia-cusparselt-cu12==0.6.3
89
+ nvidia-nccl-cu12==2.26.2
90
+ nvidia-nvjitlink-cu12==12.8.61
91
+ nvidia-nvtx-cu12==12.8.55
92
+ opencv-python==4.12.0.88
93
+ opencv-python-headless==4.12.0.88
94
+ packaging==25.0
95
+ parso==0.8.4
96
+ pexpect==4.9.0
97
+ pfzy==0.3.4
98
+ piexif==1.1.3
99
+ pillow==11.0.0
100
+ pixeloe==0.1.4
101
+ platformdirs==4.3.8
102
+ pooch==1.8.2
103
+ prompt_toolkit==3.0.51
104
+ propcache==0.3.2
105
+ psutil==7.0.0
106
+ ptyprocess==0.7.0
107
+ pure_eval==0.2.3
108
+ pycparser==2.22
109
+ pycryptodome==3.23.0
110
+ pydantic==2.11.7
111
+ pydantic-settings==2.10.1
112
+ pydantic_core==2.33.2
113
+ PyGithub==2.7.0
114
+ Pygments==2.19.2
115
+ PyJWT==2.10.1
116
+ PyMatting==1.1.14
117
+ PyNaCl==1.5.0
118
+ pyparsing==3.2.3
119
+ PySocks==1.7.1
120
+ python-dateutil==2.9.0.post0
121
+ python-dotenv==1.1.1
122
+ python-socks==2.7.1
123
+ PyWavelets==1.9.0
124
+ PyYAML==6.0.2
125
+ pyzmq==27.0.0
126
+ referencing==0.36.2
127
+ regex==2025.7.34
128
+ rembg==2.0.67
129
+ requests==2.32.4
130
+ rich==14.1.0
131
+ rpds-py==0.26.0
132
+ safetensors==0.5.3
133
+ scikit-image==0.25.2
134
+ scipy==1.16.1
135
+ sentencepiece==0.2.0
136
+ setuptools==80.9.0
137
+ shellingham==1.5.4
138
+ simsimd==6.5.0
139
+ six==1.17.0
140
+ smmap==5.0.2
141
+ soundfile==0.13.1
142
+ soupsieve==2.7
143
+ spandrel==0.4.1
144
+ SQLAlchemy==2.0.42
145
+ stack-data==0.6.3
146
+ stringzilla==3.12.5
147
+ sympy==1.13.3
148
+ tifffile==2025.6.11
149
+ timm==1.0.19
150
+ tokenizers==0.21.4
151
+ toml==0.10.2
152
+ torch==2.7.1+cu128
153
+ torchaudio==2.7.1+cu128
154
+ torchsde==0.2.6
155
+ torchvision==0.22.1+cu128
156
+ tornado==6.5.1
157
+ tqdm==4.67.1
158
+ traitlets==5.14.3
159
+ trampoline==0.1.2
160
+ transformers==4.54.1
161
+ transparent-background==1.3.4
162
+ triton==3.3.1
163
+ typer==0.16.0
164
+ typing-inspection==0.4.1
165
+ typing_extensions==4.14.0
166
+ unpaddedbase64==2.1.0
167
+ urllib3==2.5.0
168
+ uv==0.8.4
169
+ wcwidth==0.2.13
170
+ wget==3.2
171
+ wheel==0.45.1
172
+ widgetsnbextension==4.0.14
173
+ yarl==1.20.1
.venv-backups/25365439/venv-main-2025-08-29-1630.txt ADDED
@@ -0,0 +1,173 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ aiofiles==24.1.0
2
+ aiohappyeyeballs==2.6.1
3
+ aiohttp==3.12.15
4
+ aiohttp_socks==0.10.1
5
+ aiosignal==1.4.0
6
+ albucore==0.0.24
7
+ albumentations==2.0.8
8
+ alembic==1.16.4
9
+ annotated-types==0.7.0
10
+ asttokens==3.0.0
11
+ attrs==25.3.0
12
+ av==15.0.0
13
+ beautifulsoup4==4.13.4
14
+ certifi==2025.6.15
15
+ cffi==1.17.1
16
+ chardet==5.2.0
17
+ charset-normalizer==3.4.2
18
+ click==8.2.1
19
+ colour-science==0.4.6
20
+ comfyui-embedded-docs==0.2.4
21
+ comfyui_frontend_package==1.23.4
22
+ comfyui_workflow_templates==0.1.41
23
+ comm==0.2.2
24
+ contourpy==1.3.3
25
+ cryptography==45.0.5
26
+ cycler==0.12.1
27
+ debugpy==1.8.14
28
+ decorator==5.2.1
29
+ easydict==1.13
30
+ einops==0.8.1
31
+ executing==2.2.0
32
+ filelock==3.18.0
33
+ fonttools==4.59.2
34
+ frozenlist==1.7.0
35
+ fsspec==2025.5.1
36
+ gdown==5.2.0
37
+ gitdb==4.0.12
38
+ GitPython==3.1.45
39
+ greenlet==3.2.3
40
+ h11==0.16.0
41
+ h2==4.2.0
42
+ hf-xet==1.1.5
43
+ hpack==4.1.0
44
+ huggingface-hub==0.34.3
45
+ hyperframe==6.1.0
46
+ idna==3.10
47
+ imageio==2.37.0
48
+ inquirerpy==0.3.4
49
+ ipykernel==6.29.5
50
+ ipython==9.3.0
51
+ ipython_pygments_lexers==1.1.1
52
+ ipywidgets==8.1.7
53
+ jedi==0.19.2
54
+ Jinja2==3.1.4
55
+ jsonschema==4.25.0
56
+ jsonschema-specifications==2025.4.1
57
+ jupyter_client==8.6.3
58
+ jupyter_core==5.8.1
59
+ jupyterlab_widgets==3.0.15
60
+ kiwisolver==1.4.9
61
+ kornia==0.8.1
62
+ kornia_rs==0.1.9
63
+ lazy_loader==0.4
64
+ llvmlite==0.44.0
65
+ Mako==1.3.10
66
+ markdown-it-py==3.0.0
67
+ MarkupSafe==2.1.5
68
+ matplotlib==3.10.5
69
+ matplotlib-inline==0.1.7
70
+ matrix-nio==0.25.2
71
+ mdurl==0.1.2
72
+ mpmath==1.3.0
73
+ multidict==6.6.3
74
+ nest-asyncio==1.6.0
75
+ networkx==3.3
76
+ numba==0.61.2
77
+ numpy==2.1.2
78
+ nvidia-cublas-cu12==12.8.3.14
79
+ nvidia-cuda-cupti-cu12==12.8.57
80
+ nvidia-cuda-nvrtc-cu12==12.8.61
81
+ nvidia-cuda-runtime-cu12==12.8.57
82
+ nvidia-cudnn-cu12==9.7.1.26
83
+ nvidia-cufft-cu12==11.3.3.41
84
+ nvidia-cufile-cu12==1.13.0.11
85
+ nvidia-curand-cu12==10.3.9.55
86
+ nvidia-cusolver-cu12==11.7.2.55
87
+ nvidia-cusparse-cu12==12.5.7.53
88
+ nvidia-cusparselt-cu12==0.6.3
89
+ nvidia-nccl-cu12==2.26.2
90
+ nvidia-nvjitlink-cu12==12.8.61
91
+ nvidia-nvtx-cu12==12.8.55
92
+ opencv-python==4.12.0.88
93
+ opencv-python-headless==4.12.0.88
94
+ packaging==25.0
95
+ parso==0.8.4
96
+ pexpect==4.9.0
97
+ pfzy==0.3.4
98
+ piexif==1.1.3
99
+ pillow==11.0.0
100
+ pixeloe==0.1.4
101
+ platformdirs==4.3.8
102
+ pooch==1.8.2
103
+ prompt_toolkit==3.0.51
104
+ propcache==0.3.2
105
+ psutil==7.0.0
106
+ ptyprocess==0.7.0
107
+ pure_eval==0.2.3
108
+ pycparser==2.22
109
+ pycryptodome==3.23.0
110
+ pydantic==2.11.7
111
+ pydantic-settings==2.10.1
112
+ pydantic_core==2.33.2
113
+ PyGithub==2.7.0
114
+ Pygments==2.19.2
115
+ PyJWT==2.10.1
116
+ PyMatting==1.1.14
117
+ PyNaCl==1.5.0
118
+ pyparsing==3.2.3
119
+ PySocks==1.7.1
120
+ python-dateutil==2.9.0.post0
121
+ python-dotenv==1.1.1
122
+ python-socks==2.7.1
123
+ PyWavelets==1.9.0
124
+ PyYAML==6.0.2
125
+ pyzmq==27.0.0
126
+ referencing==0.36.2
127
+ regex==2025.7.34
128
+ rembg==2.0.67
129
+ requests==2.32.4
130
+ rich==14.1.0
131
+ rpds-py==0.26.0
132
+ safetensors==0.5.3
133
+ scikit-image==0.25.2
134
+ scipy==1.16.1
135
+ sentencepiece==0.2.0
136
+ setuptools==80.9.0
137
+ shellingham==1.5.4
138
+ simsimd==6.5.0
139
+ six==1.17.0
140
+ smmap==5.0.2
141
+ soundfile==0.13.1
142
+ soupsieve==2.7
143
+ spandrel==0.4.1
144
+ SQLAlchemy==2.0.42
145
+ stack-data==0.6.3
146
+ stringzilla==3.12.5
147
+ sympy==1.13.3
148
+ tifffile==2025.6.11
149
+ timm==1.0.19
150
+ tokenizers==0.21.4
151
+ toml==0.10.2
152
+ torch==2.7.1+cu128
153
+ torchaudio==2.7.1+cu128
154
+ torchsde==0.2.6
155
+ torchvision==0.22.1+cu128
156
+ tornado==6.5.1
157
+ tqdm==4.67.1
158
+ traitlets==5.14.3
159
+ trampoline==0.1.2
160
+ transformers==4.54.1
161
+ transparent-background==1.3.4
162
+ triton==3.3.1
163
+ typer==0.16.0
164
+ typing-inspection==0.4.1
165
+ typing_extensions==4.14.0
166
+ unpaddedbase64==2.1.0
167
+ urllib3==2.5.0
168
+ uv==0.8.4
169
+ wcwidth==0.2.13
170
+ wget==3.2
171
+ wheel==0.45.1
172
+ widgetsnbextension==4.0.14
173
+ yarl==1.20.1
.venv-backups/25474989/venv-main-2025-08-30-1437.txt ADDED
@@ -0,0 +1,165 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ aiofiles==24.1.0
2
+ aiohappyeyeballs==2.6.1
3
+ aiohttp==3.12.15
4
+ aiohttp_socks==0.10.1
5
+ aiosignal==1.4.0
6
+ albucore==0.0.24
7
+ albumentations==2.0.8
8
+ alembic==1.16.4
9
+ annotated-types==0.7.0
10
+ asttokens==3.0.0
11
+ attrs==25.3.0
12
+ av==15.0.0
13
+ beautifulsoup4==4.13.4
14
+ certifi==2025.6.15
15
+ cffi==1.17.1
16
+ chardet==5.2.0
17
+ charset-normalizer==3.4.2
18
+ click==8.2.1
19
+ colour-science==0.4.6
20
+ comfyui-embedded-docs==0.2.4
21
+ comfyui_frontend_package==1.23.4
22
+ comfyui_workflow_templates==0.1.41
23
+ comm==0.2.2
24
+ cryptography==45.0.5
25
+ debugpy==1.8.14
26
+ decorator==5.2.1
27
+ easydict==1.13
28
+ einops==0.8.1
29
+ executing==2.2.0
30
+ filelock==3.18.0
31
+ frozenlist==1.7.0
32
+ fsspec==2025.5.1
33
+ gdown==5.2.0
34
+ gitdb==4.0.12
35
+ GitPython==3.1.45
36
+ greenlet==3.2.3
37
+ h11==0.16.0
38
+ h2==4.2.0
39
+ hf-xet==1.1.5
40
+ hpack==4.1.0
41
+ huggingface-hub==0.34.3
42
+ hyperframe==6.1.0
43
+ idna==3.10
44
+ imageio==2.37.0
45
+ inquirerpy==0.3.4
46
+ ipykernel==6.29.5
47
+ ipython==9.3.0
48
+ ipython_pygments_lexers==1.1.1
49
+ ipywidgets==8.1.7
50
+ jedi==0.19.2
51
+ Jinja2==3.1.4
52
+ jsonschema==4.25.0
53
+ jsonschema-specifications==2025.4.1
54
+ jupyter_client==8.6.3
55
+ jupyter_core==5.8.1
56
+ jupyterlab_widgets==3.0.15
57
+ kornia==0.8.1
58
+ kornia_rs==0.1.9
59
+ lazy_loader==0.4
60
+ llvmlite==0.44.0
61
+ Mako==1.3.10
62
+ markdown-it-py==3.0.0
63
+ MarkupSafe==2.1.5
64
+ matplotlib-inline==0.1.7
65
+ matrix-nio==0.25.2
66
+ mdurl==0.1.2
67
+ mpmath==1.3.0
68
+ multidict==6.6.3
69
+ nest-asyncio==1.6.0
70
+ networkx==3.3
71
+ numba==0.61.2
72
+ numpy==2.1.2
73
+ nvidia-cublas-cu12==12.8.3.14
74
+ nvidia-cuda-cupti-cu12==12.8.57
75
+ nvidia-cuda-nvrtc-cu12==12.8.61
76
+ nvidia-cuda-runtime-cu12==12.8.57
77
+ nvidia-cudnn-cu12==9.7.1.26
78
+ nvidia-cufft-cu12==11.3.3.41
79
+ nvidia-cufile-cu12==1.13.0.11
80
+ nvidia-curand-cu12==10.3.9.55
81
+ nvidia-cusolver-cu12==11.7.2.55
82
+ nvidia-cusparse-cu12==12.5.7.53
83
+ nvidia-cusparselt-cu12==0.6.3
84
+ nvidia-nccl-cu12==2.26.2
85
+ nvidia-nvjitlink-cu12==12.8.61
86
+ nvidia-nvtx-cu12==12.8.55
87
+ opencv-python==4.12.0.88
88
+ opencv-python-headless==4.12.0.88
89
+ packaging==25.0
90
+ parso==0.8.4
91
+ pexpect==4.9.0
92
+ pfzy==0.3.4
93
+ pillow==11.0.0
94
+ pixeloe==0.1.4
95
+ platformdirs==4.3.8
96
+ pooch==1.8.2
97
+ prompt_toolkit==3.0.51
98
+ propcache==0.3.2
99
+ psutil==7.0.0
100
+ ptyprocess==0.7.0
101
+ pure_eval==0.2.3
102
+ pycparser==2.22
103
+ pycryptodome==3.23.0
104
+ pydantic==2.11.7
105
+ pydantic-settings==2.10.1
106
+ pydantic_core==2.33.2
107
+ PyGithub==2.7.0
108
+ Pygments==2.19.2
109
+ PyJWT==2.10.1
110
+ PyMatting==1.1.14
111
+ PyNaCl==1.5.0
112
+ PySocks==1.7.1
113
+ python-dateutil==2.9.0.post0
114
+ python-dotenv==1.1.1
115
+ python-socks==2.7.1
116
+ PyYAML==6.0.2
117
+ pyzmq==27.0.0
118
+ referencing==0.36.2
119
+ regex==2025.7.34
120
+ rembg==2.0.67
121
+ requests==2.32.4
122
+ rich==14.1.0
123
+ rpds-py==0.26.0
124
+ safetensors==0.5.3
125
+ scikit-image==0.25.2
126
+ scipy==1.16.1
127
+ sentencepiece==0.2.0
128
+ setuptools==80.9.0
129
+ shellingham==1.5.4
130
+ simsimd==6.5.0
131
+ six==1.17.0
132
+ smmap==5.0.2
133
+ soundfile==0.13.1
134
+ soupsieve==2.7
135
+ spandrel==0.4.1
136
+ SQLAlchemy==2.0.42
137
+ stack-data==0.6.3
138
+ stringzilla==3.12.5
139
+ sympy==1.13.3
140
+ tifffile==2025.6.11
141
+ timm==1.0.19
142
+ tokenizers==0.21.4
143
+ toml==0.10.2
144
+ torch==2.7.1+cu128
145
+ torchaudio==2.7.1+cu128
146
+ torchsde==0.2.6
147
+ torchvision==0.22.1+cu128
148
+ tornado==6.5.1
149
+ tqdm==4.67.1
150
+ traitlets==5.14.3
151
+ trampoline==0.1.2
152
+ transformers==4.54.1
153
+ transparent-background==1.3.4
154
+ triton==3.3.1
155
+ typer==0.16.0
156
+ typing-inspection==0.4.1
157
+ typing_extensions==4.14.0
158
+ unpaddedbase64==2.1.0
159
+ urllib3==2.5.0
160
+ uv==0.8.4
161
+ wcwidth==0.2.13
162
+ wget==3.2
163
+ wheel==0.45.1
164
+ widgetsnbextension==4.0.14
165
+ yarl==1.20.1
ComfyUI/.gitattributes ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ /web/assets/** linguist-generated
2
+ /web/** linguist-vendored
ComfyUI/CODEOWNERS ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Admins
2
+ * @comfyanonymous
3
+
4
+ # Note: Github teams syntax cannot be used here as the repo is not owned by Comfy-Org.
5
+ # Inlined the team members for now.
6
+
7
+ # Maintainers
8
+ *.md @yoland68 @robinjhuang @webfiltered @pythongosssss @ltdrdata @Kosinkadink @christian-byrne
9
+ /tests/ @yoland68 @robinjhuang @webfiltered @pythongosssss @ltdrdata @Kosinkadink @christian-byrne
10
+ /tests-unit/ @yoland68 @robinjhuang @webfiltered @pythongosssss @ltdrdata @Kosinkadink @christian-byrne
11
+ /notebooks/ @yoland68 @robinjhuang @webfiltered @pythongosssss @ltdrdata @Kosinkadink @christian-byrne
12
+ /script_examples/ @yoland68 @robinjhuang @webfiltered @pythongosssss @ltdrdata @Kosinkadink @christian-byrne
13
+ /.github/ @yoland68 @robinjhuang @webfiltered @pythongosssss @ltdrdata @Kosinkadink @christian-byrne
14
+ /requirements.txt @yoland68 @robinjhuang @webfiltered @pythongosssss @ltdrdata @Kosinkadink @christian-byrne
15
+ /pyproject.toml @yoland68 @robinjhuang @webfiltered @pythongosssss @ltdrdata @Kosinkadink @christian-byrne
16
+
17
+ # Python web server
18
+ /api_server/ @yoland68 @robinjhuang @webfiltered @pythongosssss @ltdrdata @christian-byrne
19
+ /app/ @yoland68 @robinjhuang @webfiltered @pythongosssss @ltdrdata @christian-byrne
20
+ /utils/ @yoland68 @robinjhuang @webfiltered @pythongosssss @ltdrdata @christian-byrne
21
+
22
+ # Node developers
23
+ /comfy_extras/ @yoland68 @robinjhuang @pythongosssss @ltdrdata @Kosinkadink @webfiltered @christian-byrne
24
+ /comfy/comfy_types/ @yoland68 @robinjhuang @pythongosssss @ltdrdata @Kosinkadink @webfiltered @christian-byrne
ComfyUI/LICENSE ADDED
@@ -0,0 +1,674 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ GNU GENERAL PUBLIC LICENSE
2
+ Version 3, 29 June 2007
3
+
4
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
5
+ Everyone is permitted to copy and distribute verbatim copies
6
+ of this license document, but changing it is not allowed.
7
+
8
+ Preamble
9
+
10
+ The GNU General Public License is a free, copyleft license for
11
+ software and other kinds of works.
12
+
13
+ The licenses for most software and other practical works are designed
14
+ to take away your freedom to share and change the works. By contrast,
15
+ the GNU General Public License is intended to guarantee your freedom to
16
+ share and change all versions of a program--to make sure it remains free
17
+ software for all its users. We, the Free Software Foundation, use the
18
+ GNU General Public License for most of our software; it applies also to
19
+ any other work released this way by its authors. You can apply it to
20
+ your programs, too.
21
+
22
+ When we speak of free software, we are referring to freedom, not
23
+ price. Our General Public Licenses are designed to make sure that you
24
+ have the freedom to distribute copies of free software (and charge for
25
+ them if you wish), that you receive source code or can get it if you
26
+ want it, that you can change the software or use pieces of it in new
27
+ free programs, and that you know you can do these things.
28
+
29
+ To protect your rights, we need to prevent others from denying you
30
+ these rights or asking you to surrender the rights. Therefore, you have
31
+ certain responsibilities if you distribute copies of the software, or if
32
+ you modify it: responsibilities to respect the freedom of others.
33
+
34
+ For example, if you distribute copies of such a program, whether
35
+ gratis or for a fee, you must pass on to the recipients the same
36
+ freedoms that you received. You must make sure that they, too, receive
37
+ or can get the source code. And you must show them these terms so they
38
+ know their rights.
39
+
40
+ Developers that use the GNU GPL protect your rights with two steps:
41
+ (1) assert copyright on the software, and (2) offer you this License
42
+ giving you legal permission to copy, distribute and/or modify it.
43
+
44
+ For the developers' and authors' protection, the GPL clearly explains
45
+ that there is no warranty for this free software. For both users' and
46
+ authors' sake, the GPL requires that modified versions be marked as
47
+ changed, so that their problems will not be attributed erroneously to
48
+ authors of previous versions.
49
+
50
+ Some devices are designed to deny users access to install or run
51
+ modified versions of the software inside them, although the manufacturer
52
+ can do so. This is fundamentally incompatible with the aim of
53
+ protecting users' freedom to change the software. The systematic
54
+ pattern of such abuse occurs in the area of products for individuals to
55
+ use, which is precisely where it is most unacceptable. Therefore, we
56
+ have designed this version of the GPL to prohibit the practice for those
57
+ products. If such problems arise substantially in other domains, we
58
+ stand ready to extend this provision to those domains in future versions
59
+ of the GPL, as needed to protect the freedom of users.
60
+
61
+ Finally, every program is threatened constantly by software patents.
62
+ States should not allow patents to restrict development and use of
63
+ software on general-purpose computers, but in those that do, we wish to
64
+ avoid the special danger that patents applied to a free program could
65
+ make it effectively proprietary. To prevent this, the GPL assures that
66
+ patents cannot be used to render the program non-free.
67
+
68
+ The precise terms and conditions for copying, distribution and
69
+ modification follow.
70
+
71
+ TERMS AND CONDITIONS
72
+
73
+ 0. Definitions.
74
+
75
+ "This License" refers to version 3 of the GNU General Public License.
76
+
77
+ "Copyright" also means copyright-like laws that apply to other kinds of
78
+ works, such as semiconductor masks.
79
+
80
+ "The Program" refers to any copyrightable work licensed under this
81
+ License. Each licensee is addressed as "you". "Licensees" and
82
+ "recipients" may be individuals or organizations.
83
+
84
+ To "modify" a work means to copy from or adapt all or part of the work
85
+ in a fashion requiring copyright permission, other than the making of an
86
+ exact copy. The resulting work is called a "modified version" of the
87
+ earlier work or a work "based on" the earlier work.
88
+
89
+ A "covered work" means either the unmodified Program or a work based
90
+ on the Program.
91
+
92
+ To "propagate" a work means to do anything with it that, without
93
+ permission, would make you directly or secondarily liable for
94
+ infringement under applicable copyright law, except executing it on a
95
+ computer or modifying a private copy. Propagation includes copying,
96
+ distribution (with or without modification), making available to the
97
+ public, and in some countries other activities as well.
98
+
99
+ To "convey" a work means any kind of propagation that enables other
100
+ parties to make or receive copies. Mere interaction with a user through
101
+ a computer network, with no transfer of a copy, is not conveying.
102
+
103
+ An interactive user interface displays "Appropriate Legal Notices"
104
+ to the extent that it includes a convenient and prominently visible
105
+ feature that (1) displays an appropriate copyright notice, and (2)
106
+ tells the user that there is no warranty for the work (except to the
107
+ extent that warranties are provided), that licensees may convey the
108
+ work under this License, and how to view a copy of this License. If
109
+ the interface presents a list of user commands or options, such as a
110
+ menu, a prominent item in the list meets this criterion.
111
+
112
+ 1. Source Code.
113
+
114
+ The "source code" for a work means the preferred form of the work
115
+ for making modifications to it. "Object code" means any non-source
116
+ form of a work.
117
+
118
+ A "Standard Interface" means an interface that either is an official
119
+ standard defined by a recognized standards body, or, in the case of
120
+ interfaces specified for a particular programming language, one that
121
+ is widely used among developers working in that language.
122
+
123
+ The "System Libraries" of an executable work include anything, other
124
+ than the work as a whole, that (a) is included in the normal form of
125
+ packaging a Major Component, but which is not part of that Major
126
+ Component, and (b) serves only to enable use of the work with that
127
+ Major Component, or to implement a Standard Interface for which an
128
+ implementation is available to the public in source code form. A
129
+ "Major Component", in this context, means a major essential component
130
+ (kernel, window system, and so on) of the specific operating system
131
+ (if any) on which the executable work runs, or a compiler used to
132
+ produce the work, or an object code interpreter used to run it.
133
+
134
+ The "Corresponding Source" for a work in object code form means all
135
+ the source code needed to generate, install, and (for an executable
136
+ work) run the object code and to modify the work, including scripts to
137
+ control those activities. However, it does not include the work's
138
+ System Libraries, or general-purpose tools or generally available free
139
+ programs which are used unmodified in performing those activities but
140
+ which are not part of the work. For example, Corresponding Source
141
+ includes interface definition files associated with source files for
142
+ the work, and the source code for shared libraries and dynamically
143
+ linked subprograms that the work is specifically designed to require,
144
+ such as by intimate data communication or control flow between those
145
+ subprograms and other parts of the work.
146
+
147
+ The Corresponding Source need not include anything that users
148
+ can regenerate automatically from other parts of the Corresponding
149
+ Source.
150
+
151
+ The Corresponding Source for a work in source code form is that
152
+ same work.
153
+
154
+ 2. Basic Permissions.
155
+
156
+ All rights granted under this License are granted for the term of
157
+ copyright on the Program, and are irrevocable provided the stated
158
+ conditions are met. This License explicitly affirms your unlimited
159
+ permission to run the unmodified Program. The output from running a
160
+ covered work is covered by this License only if the output, given its
161
+ content, constitutes a covered work. This License acknowledges your
162
+ rights of fair use or other equivalent, as provided by copyright law.
163
+
164
+ You may make, run and propagate covered works that you do not
165
+ convey, without conditions so long as your license otherwise remains
166
+ in force. You may convey covered works to others for the sole purpose
167
+ of having them make modifications exclusively for you, or provide you
168
+ with facilities for running those works, provided that you comply with
169
+ the terms of this License in conveying all material for which you do
170
+ not control copyright. Those thus making or running the covered works
171
+ for you must do so exclusively on your behalf, under your direction
172
+ and control, on terms that prohibit them from making any copies of
173
+ your copyrighted material outside their relationship with you.
174
+
175
+ Conveying under any other circumstances is permitted solely under
176
+ the conditions stated below. Sublicensing is not allowed; section 10
177
+ makes it unnecessary.
178
+
179
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180
+
181
+ No covered work shall be deemed part of an effective technological
182
+ measure under any applicable law fulfilling obligations under article
183
+ 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184
+ similar laws prohibiting or restricting circumvention of such
185
+ measures.
186
+
187
+ When you convey a covered work, you waive any legal power to forbid
188
+ circumvention of technological measures to the extent such circumvention
189
+ is effected by exercising rights under this License with respect to
190
+ the covered work, and you disclaim any intention to limit operation or
191
+ modification of the work as a means of enforcing, against the work's
192
+ users, your or third parties' legal rights to forbid circumvention of
193
+ technological measures.
194
+
195
+ 4. Conveying Verbatim Copies.
196
+
197
+ You may convey verbatim copies of the Program's source code as you
198
+ receive it, in any medium, provided that you conspicuously and
199
+ appropriately publish on each copy an appropriate copyright notice;
200
+ keep intact all notices stating that this License and any
201
+ non-permissive terms added in accord with section 7 apply to the code;
202
+ keep intact all notices of the absence of any warranty; and give all
203
+ recipients a copy of this License along with the Program.
204
+
205
+ You may charge any price or no price for each copy that you convey,
206
+ and you may offer support or warranty protection for a fee.
207
+
208
+ 5. Conveying Modified Source Versions.
209
+
210
+ You may convey a work based on the Program, or the modifications to
211
+ produce it from the Program, in the form of source code under the
212
+ terms of section 4, provided that you also meet all of these conditions:
213
+
214
+ a) The work must carry prominent notices stating that you modified
215
+ it, and giving a relevant date.
216
+
217
+ b) The work must carry prominent notices stating that it is
218
+ released under this License and any conditions added under section
219
+ 7. This requirement modifies the requirement in section 4 to
220
+ "keep intact all notices".
221
+
222
+ c) You must license the entire work, as a whole, under this
223
+ License to anyone who comes into possession of a copy. This
224
+ License will therefore apply, along with any applicable section 7
225
+ additional terms, to the whole of the work, and all its parts,
226
+ regardless of how they are packaged. This License gives no
227
+ permission to license the work in any other way, but it does not
228
+ invalidate such permission if you have separately received it.
229
+
230
+ d) If the work has interactive user interfaces, each must display
231
+ Appropriate Legal Notices; however, if the Program has interactive
232
+ interfaces that do not display Appropriate Legal Notices, your
233
+ work need not make them do so.
234
+
235
+ A compilation of a covered work with other separate and independent
236
+ works, which are not by their nature extensions of the covered work,
237
+ and which are not combined with it such as to form a larger program,
238
+ in or on a volume of a storage or distribution medium, is called an
239
+ "aggregate" if the compilation and its resulting copyright are not
240
+ used to limit the access or legal rights of the compilation's users
241
+ beyond what the individual works permit. Inclusion of a covered work
242
+ in an aggregate does not cause this License to apply to the other
243
+ parts of the aggregate.
244
+
245
+ 6. Conveying Non-Source Forms.
246
+
247
+ You may convey a covered work in object code form under the terms
248
+ of sections 4 and 5, provided that you also convey the
249
+ machine-readable Corresponding Source under the terms of this License,
250
+ in one of these ways:
251
+
252
+ a) Convey the object code in, or embodied in, a physical product
253
+ (including a physical distribution medium), accompanied by the
254
+ Corresponding Source fixed on a durable physical medium
255
+ customarily used for software interchange.
256
+
257
+ b) Convey the object code in, or embodied in, a physical product
258
+ (including a physical distribution medium), accompanied by a
259
+ written offer, valid for at least three years and valid for as
260
+ long as you offer spare parts or customer support for that product
261
+ model, to give anyone who possesses the object code either (1) a
262
+ copy of the Corresponding Source for all the software in the
263
+ product that is covered by this License, on a durable physical
264
+ medium customarily used for software interchange, for a price no
265
+ more than your reasonable cost of physically performing this
266
+ conveying of source, or (2) access to copy the
267
+ Corresponding Source from a network server at no charge.
268
+
269
+ c) Convey individual copies of the object code with a copy of the
270
+ written offer to provide the Corresponding Source. This
271
+ alternative is allowed only occasionally and noncommercially, and
272
+ only if you received the object code with such an offer, in accord
273
+ with subsection 6b.
274
+
275
+ d) Convey the object code by offering access from a designated
276
+ place (gratis or for a charge), and offer equivalent access to the
277
+ Corresponding Source in the same way through the same place at no
278
+ further charge. You need not require recipients to copy the
279
+ Corresponding Source along with the object code. If the place to
280
+ copy the object code is a network server, the Corresponding Source
281
+ may be on a different server (operated by you or a third party)
282
+ that supports equivalent copying facilities, provided you maintain
283
+ clear directions next to the object code saying where to find the
284
+ Corresponding Source. Regardless of what server hosts the
285
+ Corresponding Source, you remain obligated to ensure that it is
286
+ available for as long as needed to satisfy these requirements.
287
+
288
+ e) Convey the object code using peer-to-peer transmission, provided
289
+ you inform other peers where the object code and Corresponding
290
+ Source of the work are being offered to the general public at no
291
+ charge under subsection 6d.
292
+
293
+ A separable portion of the object code, whose source code is excluded
294
+ from the Corresponding Source as a System Library, need not be
295
+ included in conveying the object code work.
296
+
297
+ A "User Product" is either (1) a "consumer product", which means any
298
+ tangible personal property which is normally used for personal, family,
299
+ or household purposes, or (2) anything designed or sold for incorporation
300
+ into a dwelling. In determining whether a product is a consumer product,
301
+ doubtful cases shall be resolved in favor of coverage. For a particular
302
+ product received by a particular user, "normally used" refers to a
303
+ typical or common use of that class of product, regardless of the status
304
+ of the particular user or of the way in which the particular user
305
+ actually uses, or expects or is expected to use, the product. A product
306
+ is a consumer product regardless of whether the product has substantial
307
+ commercial, industrial or non-consumer uses, unless such uses represent
308
+ the only significant mode of use of the product.
309
+
310
+ "Installation Information" for a User Product means any methods,
311
+ procedures, authorization keys, or other information required to install
312
+ and execute modified versions of a covered work in that User Product from
313
+ a modified version of its Corresponding Source. The information must
314
+ suffice to ensure that the continued functioning of the modified object
315
+ code is in no case prevented or interfered with solely because
316
+ modification has been made.
317
+
318
+ If you convey an object code work under this section in, or with, or
319
+ specifically for use in, a User Product, and the conveying occurs as
320
+ part of a transaction in which the right of possession and use of the
321
+ User Product is transferred to the recipient in perpetuity or for a
322
+ fixed term (regardless of how the transaction is characterized), the
323
+ Corresponding Source conveyed under this section must be accompanied
324
+ by the Installation Information. But this requirement does not apply
325
+ if neither you nor any third party retains the ability to install
326
+ modified object code on the User Product (for example, the work has
327
+ been installed in ROM).
328
+
329
+ The requirement to provide Installation Information does not include a
330
+ requirement to continue to provide support service, warranty, or updates
331
+ for a work that has been modified or installed by the recipient, or for
332
+ the User Product in which it has been modified or installed. Access to a
333
+ network may be denied when the modification itself materially and
334
+ adversely affects the operation of the network or violates the rules and
335
+ protocols for communication across the network.
336
+
337
+ Corresponding Source conveyed, and Installation Information provided,
338
+ in accord with this section must be in a format that is publicly
339
+ documented (and with an implementation available to the public in
340
+ source code form), and must require no special password or key for
341
+ unpacking, reading or copying.
342
+
343
+ 7. Additional Terms.
344
+
345
+ "Additional permissions" are terms that supplement the terms of this
346
+ License by making exceptions from one or more of its conditions.
347
+ Additional permissions that are applicable to the entire Program shall
348
+ be treated as though they were included in this License, to the extent
349
+ that they are valid under applicable law. If additional permissions
350
+ apply only to part of the Program, that part may be used separately
351
+ under those permissions, but the entire Program remains governed by
352
+ this License without regard to the additional permissions.
353
+
354
+ When you convey a copy of a covered work, you may at your option
355
+ remove any additional permissions from that copy, or from any part of
356
+ it. (Additional permissions may be written to require their own
357
+ removal in certain cases when you modify the work.) You may place
358
+ additional permissions on material, added by you to a covered work,
359
+ for which you have or can give appropriate copyright permission.
360
+
361
+ Notwithstanding any other provision of this License, for material you
362
+ add to a covered work, you may (if authorized by the copyright holders of
363
+ that material) supplement the terms of this License with terms:
364
+
365
+ a) Disclaiming warranty or limiting liability differently from the
366
+ terms of sections 15 and 16 of this License; or
367
+
368
+ b) Requiring preservation of specified reasonable legal notices or
369
+ author attributions in that material or in the Appropriate Legal
370
+ Notices displayed by works containing it; or
371
+
372
+ c) Prohibiting misrepresentation of the origin of that material, or
373
+ requiring that modified versions of such material be marked in
374
+ reasonable ways as different from the original version; or
375
+
376
+ d) Limiting the use for publicity purposes of names of licensors or
377
+ authors of the material; or
378
+
379
+ e) Declining to grant rights under trademark law for use of some
380
+ trade names, trademarks, or service marks; or
381
+
382
+ f) Requiring indemnification of licensors and authors of that
383
+ material by anyone who conveys the material (or modified versions of
384
+ it) with contractual assumptions of liability to the recipient, for
385
+ any liability that these contractual assumptions directly impose on
386
+ those licensors and authors.
387
+
388
+ All other non-permissive additional terms are considered "further
389
+ restrictions" within the meaning of section 10. If the Program as you
390
+ received it, or any part of it, contains a notice stating that it is
391
+ governed by this License along with a term that is a further
392
+ restriction, you may remove that term. If a license document contains
393
+ a further restriction but permits relicensing or conveying under this
394
+ License, you may add to a covered work material governed by the terms
395
+ of that license document, provided that the further restriction does
396
+ not survive such relicensing or conveying.
397
+
398
+ If you add terms to a covered work in accord with this section, you
399
+ must place, in the relevant source files, a statement of the
400
+ additional terms that apply to those files, or a notice indicating
401
+ where to find the applicable terms.
402
+
403
+ Additional terms, permissive or non-permissive, may be stated in the
404
+ form of a separately written license, or stated as exceptions;
405
+ the above requirements apply either way.
406
+
407
+ 8. Termination.
408
+
409
+ You may not propagate or modify a covered work except as expressly
410
+ provided under this License. Any attempt otherwise to propagate or
411
+ modify it is void, and will automatically terminate your rights under
412
+ this License (including any patent licenses granted under the third
413
+ paragraph of section 11).
414
+
415
+ However, if you cease all violation of this License, then your
416
+ license from a particular copyright holder is reinstated (a)
417
+ provisionally, unless and until the copyright holder explicitly and
418
+ finally terminates your license, and (b) permanently, if the copyright
419
+ holder fails to notify you of the violation by some reasonable means
420
+ prior to 60 days after the cessation.
421
+
422
+ Moreover, your license from a particular copyright holder is
423
+ reinstated permanently if the copyright holder notifies you of the
424
+ violation by some reasonable means, this is the first time you have
425
+ received notice of violation of this License (for any work) from that
426
+ copyright holder, and you cure the violation prior to 30 days after
427
+ your receipt of the notice.
428
+
429
+ Termination of your rights under this section does not terminate the
430
+ licenses of parties who have received copies or rights from you under
431
+ this License. If your rights have been terminated and not permanently
432
+ reinstated, you do not qualify to receive new licenses for the same
433
+ material under section 10.
434
+
435
+ 9. Acceptance Not Required for Having Copies.
436
+
437
+ You are not required to accept this License in order to receive or
438
+ run a copy of the Program. Ancillary propagation of a covered work
439
+ occurring solely as a consequence of using peer-to-peer transmission
440
+ to receive a copy likewise does not require acceptance. However,
441
+ nothing other than this License grants you permission to propagate or
442
+ modify any covered work. These actions infringe copyright if you do
443
+ not accept this License. Therefore, by modifying or propagating a
444
+ covered work, you indicate your acceptance of this License to do so.
445
+
446
+ 10. Automatic Licensing of Downstream Recipients.
447
+
448
+ Each time you convey a covered work, the recipient automatically
449
+ receives a license from the original licensors, to run, modify and
450
+ propagate that work, subject to this License. You are not responsible
451
+ for enforcing compliance by third parties with this License.
452
+
453
+ An "entity transaction" is a transaction transferring control of an
454
+ organization, or substantially all assets of one, or subdividing an
455
+ organization, or merging organizations. If propagation of a covered
456
+ work results from an entity transaction, each party to that
457
+ transaction who receives a copy of the work also receives whatever
458
+ licenses to the work the party's predecessor in interest had or could
459
+ give under the previous paragraph, plus a right to possession of the
460
+ Corresponding Source of the work from the predecessor in interest, if
461
+ the predecessor has it or can get it with reasonable efforts.
462
+
463
+ You may not impose any further restrictions on the exercise of the
464
+ rights granted or affirmed under this License. For example, you may
465
+ not impose a license fee, royalty, or other charge for exercise of
466
+ rights granted under this License, and you may not initiate litigation
467
+ (including a cross-claim or counterclaim in a lawsuit) alleging that
468
+ any patent claim is infringed by making, using, selling, offering for
469
+ sale, or importing the Program or any portion of it.
470
+
471
+ 11. Patents.
472
+
473
+ A "contributor" is a copyright holder who authorizes use under this
474
+ License of the Program or a work on which the Program is based. The
475
+ work thus licensed is called the contributor's "contributor version".
476
+
477
+ A contributor's "essential patent claims" are all patent claims
478
+ owned or controlled by the contributor, whether already acquired or
479
+ hereafter acquired, that would be infringed by some manner, permitted
480
+ by this License, of making, using, or selling its contributor version,
481
+ but do not include claims that would be infringed only as a
482
+ consequence of further modification of the contributor version. For
483
+ purposes of this definition, "control" includes the right to grant
484
+ patent sublicenses in a manner consistent with the requirements of
485
+ this License.
486
+
487
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
488
+ patent license under the contributor's essential patent claims, to
489
+ make, use, sell, offer for sale, import and otherwise run, modify and
490
+ propagate the contents of its contributor version.
491
+
492
+ In the following three paragraphs, a "patent license" is any express
493
+ agreement or commitment, however denominated, not to enforce a patent
494
+ (such as an express permission to practice a patent or covenant not to
495
+ sue for patent infringement). To "grant" such a patent license to a
496
+ party means to make such an agreement or commitment not to enforce a
497
+ patent against the party.
498
+
499
+ If you convey a covered work, knowingly relying on a patent license,
500
+ and the Corresponding Source of the work is not available for anyone
501
+ to copy, free of charge and under the terms of this License, through a
502
+ publicly available network server or other readily accessible means,
503
+ then you must either (1) cause the Corresponding Source to be so
504
+ available, or (2) arrange to deprive yourself of the benefit of the
505
+ patent license for this particular work, or (3) arrange, in a manner
506
+ consistent with the requirements of this License, to extend the patent
507
+ license to downstream recipients. "Knowingly relying" means you have
508
+ actual knowledge that, but for the patent license, your conveying the
509
+ covered work in a country, or your recipient's use of the covered work
510
+ in a country, would infringe one or more identifiable patents in that
511
+ country that you have reason to believe are valid.
512
+
513
+ If, pursuant to or in connection with a single transaction or
514
+ arrangement, you convey, or propagate by procuring conveyance of, a
515
+ covered work, and grant a patent license to some of the parties
516
+ receiving the covered work authorizing them to use, propagate, modify
517
+ or convey a specific copy of the covered work, then the patent license
518
+ you grant is automatically extended to all recipients of the covered
519
+ work and works based on it.
520
+
521
+ A patent license is "discriminatory" if it does not include within
522
+ the scope of its coverage, prohibits the exercise of, or is
523
+ conditioned on the non-exercise of one or more of the rights that are
524
+ specifically granted under this License. You may not convey a covered
525
+ work if you are a party to an arrangement with a third party that is
526
+ in the business of distributing software, under which you make payment
527
+ to the third party based on the extent of your activity of conveying
528
+ the work, and under which the third party grants, to any of the
529
+ parties who would receive the covered work from you, a discriminatory
530
+ patent license (a) in connection with copies of the covered work
531
+ conveyed by you (or copies made from those copies), or (b) primarily
532
+ for and in connection with specific products or compilations that
533
+ contain the covered work, unless you entered into that arrangement,
534
+ or that patent license was granted, prior to 28 March 2007.
535
+
536
+ Nothing in this License shall be construed as excluding or limiting
537
+ any implied license or other defenses to infringement that may
538
+ otherwise be available to you under applicable patent law.
539
+
540
+ 12. No Surrender of Others' Freedom.
541
+
542
+ If conditions are imposed on you (whether by court order, agreement or
543
+ otherwise) that contradict the conditions of this License, they do not
544
+ excuse you from the conditions of this License. If you cannot convey a
545
+ covered work so as to satisfy simultaneously your obligations under this
546
+ License and any other pertinent obligations, then as a consequence you may
547
+ not convey it at all. For example, if you agree to terms that obligate you
548
+ to collect a royalty for further conveying from those to whom you convey
549
+ the Program, the only way you could satisfy both those terms and this
550
+ License would be to refrain entirely from conveying the Program.
551
+
552
+ 13. Use with the GNU Affero General Public License.
553
+
554
+ Notwithstanding any other provision of this License, you have
555
+ permission to link or combine any covered work with a work licensed
556
+ under version 3 of the GNU Affero General Public License into a single
557
+ combined work, and to convey the resulting work. The terms of this
558
+ License will continue to apply to the part which is the covered work,
559
+ but the special requirements of the GNU Affero General Public License,
560
+ section 13, concerning interaction through a network will apply to the
561
+ combination as such.
562
+
563
+ 14. Revised Versions of this License.
564
+
565
+ The Free Software Foundation may publish revised and/or new versions of
566
+ the GNU General Public License from time to time. Such new versions will
567
+ be similar in spirit to the present version, but may differ in detail to
568
+ address new problems or concerns.
569
+
570
+ Each version is given a distinguishing version number. If the
571
+ Program specifies that a certain numbered version of the GNU General
572
+ Public License "or any later version" applies to it, you have the
573
+ option of following the terms and conditions either of that numbered
574
+ version or of any later version published by the Free Software
575
+ Foundation. If the Program does not specify a version number of the
576
+ GNU General Public License, you may choose any version ever published
577
+ by the Free Software Foundation.
578
+
579
+ If the Program specifies that a proxy can decide which future
580
+ versions of the GNU General Public License can be used, that proxy's
581
+ public statement of acceptance of a version permanently authorizes you
582
+ to choose that version for the Program.
583
+
584
+ Later license versions may give you additional or different
585
+ permissions. However, no additional obligations are imposed on any
586
+ author or copyright holder as a result of your choosing to follow a
587
+ later version.
588
+
589
+ 15. Disclaimer of Warranty.
590
+
591
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592
+ APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593
+ HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594
+ OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595
+ THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596
+ PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597
+ IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598
+ ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599
+
600
+ 16. Limitation of Liability.
601
+
602
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604
+ THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605
+ GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606
+ USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607
+ DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608
+ PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609
+ EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610
+ SUCH DAMAGES.
611
+
612
+ 17. Interpretation of Sections 15 and 16.
613
+
614
+ If the disclaimer of warranty and limitation of liability provided
615
+ above cannot be given local legal effect according to their terms,
616
+ reviewing courts shall apply local law that most closely approximates
617
+ an absolute waiver of all civil liability in connection with the
618
+ Program, unless a warranty or assumption of liability accompanies a
619
+ copy of the Program in return for a fee.
620
+
621
+ END OF TERMS AND CONDITIONS
622
+
623
+ How to Apply These Terms to Your New Programs
624
+
625
+ If you develop a new program, and you want it to be of the greatest
626
+ possible use to the public, the best way to achieve this is to make it
627
+ free software which everyone can redistribute and change under these terms.
628
+
629
+ To do so, attach the following notices to the program. It is safest
630
+ to attach them to the start of each source file to most effectively
631
+ state the exclusion of warranty; and each file should have at least
632
+ the "copyright" line and a pointer to where the full notice is found.
633
+
634
+ <one line to give the program's name and a brief idea of what it does.>
635
+ Copyright (C) <year> <name of author>
636
+
637
+ This program is free software: you can redistribute it and/or modify
638
+ it under the terms of the GNU General Public License as published by
639
+ the Free Software Foundation, either version 3 of the License, or
640
+ (at your option) any later version.
641
+
642
+ This program is distributed in the hope that it will be useful,
643
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
644
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645
+ GNU General Public License for more details.
646
+
647
+ You should have received a copy of the GNU General Public License
648
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
649
+
650
+ Also add information on how to contact you by electronic and paper mail.
651
+
652
+ If the program does terminal interaction, make it output a short
653
+ notice like this when it starts in an interactive mode:
654
+
655
+ <program> Copyright (C) <year> <name of author>
656
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657
+ This is free software, and you are welcome to redistribute it
658
+ under certain conditions; type `show c' for details.
659
+
660
+ The hypothetical commands `show w' and `show c' should show the appropriate
661
+ parts of the General Public License. Of course, your program's commands
662
+ might be different; for a GUI interface, you would use an "about box".
663
+
664
+ You should also get your employer (if you work as a programmer) or school,
665
+ if any, to sign a "copyright disclaimer" for the program, if necessary.
666
+ For more information on this, and how to apply and follow the GNU GPL, see
667
+ <https://www.gnu.org/licenses/>.
668
+
669
+ The GNU General Public License does not permit incorporating your program
670
+ into proprietary programs. If your program is a subroutine library, you
671
+ may consider it more useful to permit linking proprietary applications with
672
+ the library. If this is what you want to do, use the GNU Lesser General
673
+ Public License instead of this License. But first, please read
674
+ <https://www.gnu.org/licenses/why-not-lgpl.html>.
ComfyUI/README.md ADDED
@@ -0,0 +1,410 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div align="center">
2
+
3
+ # ComfyUI
4
+ **The most powerful and modular visual AI engine and application.**
5
+
6
+
7
+ [![Website][website-shield]][website-url]
8
+ [![Dynamic JSON Badge][discord-shield]][discord-url]
9
+ [![Twitter][twitter-shield]][twitter-url]
10
+ [![Matrix][matrix-shield]][matrix-url]
11
+ <br>
12
+ [![][github-release-shield]][github-release-link]
13
+ [![][github-release-date-shield]][github-release-link]
14
+ [![][github-downloads-shield]][github-downloads-link]
15
+ [![][github-downloads-latest-shield]][github-downloads-link]
16
+
17
+ [matrix-shield]: https://img.shields.io/badge/Matrix-000000?style=flat&logo=matrix&logoColor=white
18
+ [matrix-url]: https://app.element.io/#/room/%23comfyui_space%3Amatrix.org
19
+ [website-shield]: https://img.shields.io/badge/ComfyOrg-4285F4?style=flat
20
+ [website-url]: https://www.comfy.org/
21
+ <!-- Workaround to display total user from https://github.com/badges/shields/issues/4500#issuecomment-2060079995 -->
22
+ [discord-shield]: https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fdiscord.com%2Fapi%2Finvites%2Fcomfyorg%3Fwith_counts%3Dtrue&query=%24.approximate_member_count&logo=discord&logoColor=white&label=Discord&color=green&suffix=%20total
23
+ [discord-url]: https://www.comfy.org/discord
24
+ [twitter-shield]: https://img.shields.io/twitter/follow/ComfyUI
25
+ [twitter-url]: https://x.com/ComfyUI
26
+
27
+ [github-release-shield]: https://img.shields.io/github/v/release/comfyanonymous/ComfyUI?style=flat&sort=semver
28
+ [github-release-link]: https://github.com/comfyanonymous/ComfyUI/releases
29
+ [github-release-date-shield]: https://img.shields.io/github/release-date/comfyanonymous/ComfyUI?style=flat
30
+ [github-downloads-shield]: https://img.shields.io/github/downloads/comfyanonymous/ComfyUI/total?style=flat
31
+ [github-downloads-latest-shield]: https://img.shields.io/github/downloads/comfyanonymous/ComfyUI/latest/total?style=flat&label=downloads%40latest
32
+ [github-downloads-link]: https://github.com/comfyanonymous/ComfyUI/releases
33
+
34
+ ![ComfyUI Screenshot](https://github.com/user-attachments/assets/7ccaf2c1-9b72-41ae-9a89-5688c94b7abe)
35
+ </div>
36
+
37
+ ComfyUI lets you design and execute advanced stable diffusion pipelines using a graph/nodes/flowchart based interface. Available on Windows, Linux, and macOS.
38
+
39
+ ## Get Started
40
+
41
+ #### [Desktop Application](https://www.comfy.org/download)
42
+ - The easiest way to get started.
43
+ - Available on Windows & macOS.
44
+
45
+ #### [Windows Portable Package](#installing)
46
+ - Get the latest commits and completely portable.
47
+ - Available on Windows.
48
+
49
+ #### [Manual Install](#manual-install-windows-linux)
50
+ Supports all operating systems and GPU types (NVIDIA, AMD, Intel, Apple Silicon, Ascend).
51
+
52
+ ## [Examples](https://comfyanonymous.github.io/ComfyUI_examples/)
53
+ See what ComfyUI can do with the [example workflows](https://comfyanonymous.github.io/ComfyUI_examples/).
54
+
55
+ ## Features
56
+ - Nodes/graph/flowchart interface to experiment and create complex Stable Diffusion workflows without needing to code anything.
57
+ - Image Models
58
+ - SD1.x, SD2.x ([unCLIP](https://comfyanonymous.github.io/ComfyUI_examples/unclip/))
59
+ - [SDXL](https://comfyanonymous.github.io/ComfyUI_examples/sdxl/), [SDXL Turbo](https://comfyanonymous.github.io/ComfyUI_examples/sdturbo/)
60
+ - [Stable Cascade](https://comfyanonymous.github.io/ComfyUI_examples/stable_cascade/)
61
+ - [SD3 and SD3.5](https://comfyanonymous.github.io/ComfyUI_examples/sd3/)
62
+ - Pixart Alpha and Sigma
63
+ - [AuraFlow](https://comfyanonymous.github.io/ComfyUI_examples/aura_flow/)
64
+ - [HunyuanDiT](https://comfyanonymous.github.io/ComfyUI_examples/hunyuan_dit/)
65
+ - [Flux](https://comfyanonymous.github.io/ComfyUI_examples/flux/)
66
+ - [Lumina Image 2.0](https://comfyanonymous.github.io/ComfyUI_examples/lumina2/)
67
+ - [HiDream](https://comfyanonymous.github.io/ComfyUI_examples/hidream/)
68
+ - [Cosmos Predict2](https://comfyanonymous.github.io/ComfyUI_examples/cosmos_predict2/)
69
+ - Image Editing Models
70
+ - [Omnigen 2](https://comfyanonymous.github.io/ComfyUI_examples/omnigen/)
71
+ - [Flux Kontext](https://comfyanonymous.github.io/ComfyUI_examples/flux/#flux-kontext-image-editing-model)
72
+ - [HiDream E1.1](https://comfyanonymous.github.io/ComfyUI_examples/hidream/#hidream-e11)
73
+ - Video Models
74
+ - [Stable Video Diffusion](https://comfyanonymous.github.io/ComfyUI_examples/video/)
75
+ - [Mochi](https://comfyanonymous.github.io/ComfyUI_examples/mochi/)
76
+ - [LTX-Video](https://comfyanonymous.github.io/ComfyUI_examples/ltxv/)
77
+ - [Hunyuan Video](https://comfyanonymous.github.io/ComfyUI_examples/hunyuan_video/)
78
+ - [Nvidia Cosmos](https://comfyanonymous.github.io/ComfyUI_examples/cosmos/) and [Cosmos Predict2](https://comfyanonymous.github.io/ComfyUI_examples/cosmos_predict2/)
79
+ - [Wan 2.1](https://comfyanonymous.github.io/ComfyUI_examples/wan/)
80
+ - [Wan 2.2](https://comfyanonymous.github.io/ComfyUI_examples/wan22/)
81
+ - Audio Models
82
+ - [Stable Audio](https://comfyanonymous.github.io/ComfyUI_examples/audio/)
83
+ - [ACE Step](https://comfyanonymous.github.io/ComfyUI_examples/audio/)
84
+ - 3D Models
85
+ - [Hunyuan3D 2.0](https://docs.comfy.org/tutorials/3d/hunyuan3D-2)
86
+ - Asynchronous Queue system
87
+ - Many optimizations: Only re-executes the parts of the workflow that changes between executions.
88
+ - Smart memory management: can automatically run large models on GPUs with as low as 1GB vram with smart offloading.
89
+ - Works even if you don't have a GPU with: ```--cpu``` (slow)
90
+ - Can load ckpt and safetensors: All in one checkpoints or standalone diffusion models, VAEs and CLIP models.
91
+ - Safe loading of ckpt, pt, pth, etc.. files.
92
+ - Embeddings/Textual inversion
93
+ - [Loras (regular, locon and loha)](https://comfyanonymous.github.io/ComfyUI_examples/lora/)
94
+ - [Hypernetworks](https://comfyanonymous.github.io/ComfyUI_examples/hypernetworks/)
95
+ - Loading full workflows (with seeds) from generated PNG, WebP and FLAC files.
96
+ - Saving/Loading workflows as Json files.
97
+ - Nodes interface can be used to create complex workflows like one for [Hires fix](https://comfyanonymous.github.io/ComfyUI_examples/2_pass_txt2img/) or much more advanced ones.
98
+ - [Area Composition](https://comfyanonymous.github.io/ComfyUI_examples/area_composition/)
99
+ - [Inpainting](https://comfyanonymous.github.io/ComfyUI_examples/inpaint/) with both regular and inpainting models.
100
+ - [ControlNet and T2I-Adapter](https://comfyanonymous.github.io/ComfyUI_examples/controlnet/)
101
+ - [Upscale Models (ESRGAN, ESRGAN variants, SwinIR, Swin2SR, etc...)](https://comfyanonymous.github.io/ComfyUI_examples/upscale_models/)
102
+ - [GLIGEN](https://comfyanonymous.github.io/ComfyUI_examples/gligen/)
103
+ - [Model Merging](https://comfyanonymous.github.io/ComfyUI_examples/model_merging/)
104
+ - [LCM models and Loras](https://comfyanonymous.github.io/ComfyUI_examples/lcm/)
105
+ - Latent previews with [TAESD](#how-to-show-high-quality-previews)
106
+ - Works fully offline: core will never download anything unless you want to.
107
+ - Optional API nodes to use paid models from external providers through the online [Comfy API](https://docs.comfy.org/tutorials/api-nodes/overview).
108
+ - [Config file](extra_model_paths.yaml.example) to set the search paths for models.
109
+
110
+ Workflow examples can be found on the [Examples page](https://comfyanonymous.github.io/ComfyUI_examples/)
111
+
112
+ ## Release Process
113
+
114
+ ComfyUI follows a weekly release cycle every Friday, with three interconnected repositories:
115
+
116
+ 1. **[ComfyUI Core](https://github.com/comfyanonymous/ComfyUI)**
117
+ - Releases a new stable version (e.g., v0.7.0)
118
+ - Serves as the foundation for the desktop release
119
+
120
+ 2. **[ComfyUI Desktop](https://github.com/Comfy-Org/desktop)**
121
+ - Builds a new release using the latest stable core version
122
+
123
+ 3. **[ComfyUI Frontend](https://github.com/Comfy-Org/ComfyUI_frontend)**
124
+ - Weekly frontend updates are merged into the core repository
125
+ - Features are frozen for the upcoming core release
126
+ - Development continues for the next release cycle
127
+
128
+ ## Shortcuts
129
+
130
+ | Keybind | Explanation |
131
+ |------------------------------------|--------------------------------------------------------------------------------------------------------------------|
132
+ | `Ctrl` + `Enter` | Queue up current graph for generation |
133
+ | `Ctrl` + `Shift` + `Enter` | Queue up current graph as first for generation |
134
+ | `Ctrl` + `Alt` + `Enter` | Cancel current generation |
135
+ | `Ctrl` + `Z`/`Ctrl` + `Y` | Undo/Redo |
136
+ | `Ctrl` + `S` | Save workflow |
137
+ | `Ctrl` + `O` | Load workflow |
138
+ | `Ctrl` + `A` | Select all nodes |
139
+ | `Alt `+ `C` | Collapse/uncollapse selected nodes |
140
+ | `Ctrl` + `M` | Mute/unmute selected nodes |
141
+ | `Ctrl` + `B` | Bypass selected nodes (acts like the node was removed from the graph and the wires reconnected through) |
142
+ | `Delete`/`Backspace` | Delete selected nodes |
143
+ | `Ctrl` + `Backspace` | Delete the current graph |
144
+ | `Space` | Move the canvas around when held and moving the cursor |
145
+ | `Ctrl`/`Shift` + `Click` | Add clicked node to selection |
146
+ | `Ctrl` + `C`/`Ctrl` + `V` | Copy and paste selected nodes (without maintaining connections to outputs of unselected nodes) |
147
+ | `Ctrl` + `C`/`Ctrl` + `Shift` + `V` | Copy and paste selected nodes (maintaining connections from outputs of unselected nodes to inputs of pasted nodes) |
148
+ | `Shift` + `Drag` | Move multiple selected nodes at the same time |
149
+ | `Ctrl` + `D` | Load default graph |
150
+ | `Alt` + `+` | Canvas Zoom in |
151
+ | `Alt` + `-` | Canvas Zoom out |
152
+ | `Ctrl` + `Shift` + LMB + Vertical drag | Canvas Zoom in/out |
153
+ | `P` | Pin/Unpin selected nodes |
154
+ | `Ctrl` + `G` | Group selected nodes |
155
+ | `Q` | Toggle visibility of the queue |
156
+ | `H` | Toggle visibility of history |
157
+ | `R` | Refresh graph |
158
+ | `F` | Show/Hide menu |
159
+ | `.` | Fit view to selection (Whole graph when nothing is selected) |
160
+ | Double-Click LMB | Open node quick search palette |
161
+ | `Shift` + Drag | Move multiple wires at once |
162
+ | `Ctrl` + `Alt` + LMB | Disconnect all wires from clicked slot |
163
+
164
+ `Ctrl` can also be replaced with `Cmd` instead for macOS users
165
+
166
+ # Installing
167
+
168
+ ## Windows Portable
169
+
170
+ There is a portable standalone build for Windows that should work for running on Nvidia GPUs or for running on your CPU only on the [releases page](https://github.com/comfyanonymous/ComfyUI/releases).
171
+
172
+ ### [Direct link to download](https://github.com/comfyanonymous/ComfyUI/releases/latest/download/ComfyUI_windows_portable_nvidia.7z)
173
+
174
+ Simply download, extract with [7-Zip](https://7-zip.org) and run. Make sure you put your Stable Diffusion checkpoints/models (the huge ckpt/safetensors files) in: ComfyUI\models\checkpoints
175
+
176
+ If you have trouble extracting it, right click the file -> properties -> unblock
177
+
178
+ #### How do I share models between another UI and ComfyUI?
179
+
180
+ See the [Config file](extra_model_paths.yaml.example) to set the search paths for models. In the standalone windows build you can find this file in the ComfyUI directory. Rename this file to extra_model_paths.yaml and edit it with your favorite text editor.
181
+
182
+
183
+ ## [comfy-cli](https://docs.comfy.org/comfy-cli/getting-started)
184
+
185
+ You can install and start ComfyUI using comfy-cli:
186
+ ```bash
187
+ pip install comfy-cli
188
+ comfy install
189
+ ```
190
+
191
+ ## Manual Install (Windows, Linux)
192
+
193
+ python 3.13 is supported but using 3.12 is recommended because some custom nodes and their dependencies might not support it yet.
194
+
195
+ Git clone this repo.
196
+
197
+ Put your SD checkpoints (the huge ckpt/safetensors files) in: models/checkpoints
198
+
199
+ Put your VAE in: models/vae
200
+
201
+
202
+ ### AMD GPUs (Linux only)
203
+ AMD users can install rocm and pytorch with pip if you don't have it already installed, this is the command to install the stable version:
204
+
205
+ ```pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm6.3```
206
+
207
+ This is the command to install the nightly with ROCm 6.4 which might have some performance improvements:
208
+
209
+ ```pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/rocm6.4```
210
+
211
+ ### Intel GPUs (Windows and Linux)
212
+
213
+ (Option 1) Intel Arc GPU users can install native PyTorch with torch.xpu support using pip (currently available in PyTorch nightly builds). More information can be found [here](https://pytorch.org/docs/main/notes/get_start_xpu.html)
214
+
215
+ 1. To install PyTorch nightly, use the following command:
216
+
217
+ ```pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/xpu```
218
+
219
+ 2. Launch ComfyUI by running `python main.py`
220
+
221
+
222
+ (Option 2) Alternatively, Intel GPUs supported by Intel Extension for PyTorch (IPEX) can leverage IPEX for improved performance.
223
+
224
+ 1. For Intel® Arc™ A-Series Graphics utilizing IPEX, create a conda environment and use the commands below:
225
+
226
+ ```
227
+ conda install libuv
228
+ pip install torch==2.3.1.post0+cxx11.abi torchvision==0.18.1.post0+cxx11.abi torchaudio==2.3.1.post0+cxx11.abi intel-extension-for-pytorch==2.3.110.post0+xpu --extra-index-url https://pytorch-extension.intel.com/release-whl/stable/xpu/us/ --extra-index-url https://pytorch-extension.intel.com/release-whl/stable/xpu/cn/
229
+ ```
230
+
231
+ For other supported Intel GPUs with IPEX, visit [Installation](https://intel.github.io/intel-extension-for-pytorch/index.html#installation?platform=gpu) for more information.
232
+
233
+ Additional discussion and help can be found [here](https://github.com/comfyanonymous/ComfyUI/discussions/476).
234
+
235
+ ### NVIDIA
236
+
237
+ Nvidia users should install stable pytorch using this command:
238
+
239
+ ```pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu128```
240
+
241
+ This is the command to install pytorch nightly instead which might have performance improvements.
242
+
243
+ ```pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu129```
244
+
245
+ #### Troubleshooting
246
+
247
+ If you get the "Torch not compiled with CUDA enabled" error, uninstall torch with:
248
+
249
+ ```pip uninstall torch```
250
+
251
+ And install it again with the command above.
252
+
253
+ ### Dependencies
254
+
255
+ Install the dependencies by opening your terminal inside the ComfyUI folder and:
256
+
257
+ ```pip install -r requirements.txt```
258
+
259
+ After this you should have everything installed and can proceed to running ComfyUI.
260
+
261
+ ### Others:
262
+
263
+ #### Apple Mac silicon
264
+
265
+ You can install ComfyUI in Apple Mac silicon (M1 or M2) with any recent macOS version.
266
+
267
+ 1. Install pytorch nightly. For instructions, read the [Accelerated PyTorch training on Mac](https://developer.apple.com/metal/pytorch/) Apple Developer guide (make sure to install the latest pytorch nightly).
268
+ 1. Follow the [ComfyUI manual installation](#manual-install-windows-linux) instructions for Windows and Linux.
269
+ 1. Install the ComfyUI [dependencies](#dependencies). If you have another Stable Diffusion UI [you might be able to reuse the dependencies](#i-already-have-another-ui-for-stable-diffusion-installed-do-i-really-have-to-install-all-of-these-dependencies).
270
+ 1. Launch ComfyUI by running `python main.py`
271
+
272
+ > **Note**: Remember to add your models, VAE, LoRAs etc. to the corresponding Comfy folders, as discussed in [ComfyUI manual installation](#manual-install-windows-linux).
273
+
274
+ #### DirectML (AMD Cards on Windows)
275
+
276
+ This is very badly supported and is not recommended. There are some unofficial builds of pytorch ROCm on windows that exist that will give you a much better experience than this. This readme will be updated once official pytorch ROCm builds for windows come out.
277
+
278
+ ```pip install torch-directml``` Then you can launch ComfyUI with: ```python main.py --directml```
279
+
280
+ #### Ascend NPUs
281
+
282
+ For models compatible with Ascend Extension for PyTorch (torch_npu). To get started, ensure your environment meets the prerequisites outlined on the [installation](https://ascend.github.io/docs/sources/ascend/quick_install.html) page. Here's a step-by-step guide tailored to your platform and installation method:
283
+
284
+ 1. Begin by installing the recommended or newer kernel version for Linux as specified in the Installation page of torch-npu, if necessary.
285
+ 2. Proceed with the installation of Ascend Basekit, which includes the driver, firmware, and CANN, following the instructions provided for your specific platform.
286
+ 3. Next, install the necessary packages for torch-npu by adhering to the platform-specific instructions on the [Installation](https://ascend.github.io/docs/sources/pytorch/install.html#pytorch) page.
287
+ 4. Finally, adhere to the [ComfyUI manual installation](#manual-install-windows-linux) guide for Linux. Once all components are installed, you can run ComfyUI as described earlier.
288
+
289
+ #### Cambricon MLUs
290
+
291
+ For models compatible with Cambricon Extension for PyTorch (torch_mlu). Here's a step-by-step guide tailored to your platform and installation method:
292
+
293
+ 1. Install the Cambricon CNToolkit by adhering to the platform-specific instructions on the [Installation](https://www.cambricon.com/docs/sdk_1.15.0/cntoolkit_3.7.2/cntoolkit_install_3.7.2/index.html)
294
+ 2. Next, install the PyTorch(torch_mlu) following the instructions on the [Installation](https://www.cambricon.com/docs/sdk_1.15.0/cambricon_pytorch_1.17.0/user_guide_1.9/index.html)
295
+ 3. Launch ComfyUI by running `python main.py`
296
+
297
+ #### Iluvatar Corex
298
+
299
+ For models compatible with Iluvatar Extension for PyTorch. Here's a step-by-step guide tailored to your platform and installation method:
300
+
301
+ 1. Install the Iluvatar Corex Toolkit by adhering to the platform-specific instructions on the [Installation](https://support.iluvatar.com/#/DocumentCentre?id=1&nameCenter=2&productId=520117912052801536)
302
+ 2. Launch ComfyUI by running `python main.py`
303
+
304
+ # Running
305
+
306
+ ```python main.py```
307
+
308
+ ### For AMD cards not officially supported by ROCm
309
+
310
+ Try running it with this command if you have issues:
311
+
312
+ For 6700, 6600 and maybe other RDNA2 or older: ```HSA_OVERRIDE_GFX_VERSION=10.3.0 python main.py```
313
+
314
+ For AMD 7600 and maybe other RDNA3 cards: ```HSA_OVERRIDE_GFX_VERSION=11.0.0 python main.py```
315
+
316
+ ### AMD ROCm Tips
317
+
318
+ You can enable experimental memory efficient attention on recent pytorch in ComfyUI on some AMD GPUs using this command, it should already be enabled by default on RDNA3. If this improves speed for you on latest pytorch on your GPU please report it so that I can enable it by default.
319
+
320
+ ```TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1 python main.py --use-pytorch-cross-attention```
321
+
322
+ You can also try setting this env variable `PYTORCH_TUNABLEOP_ENABLED=1` which might speed things up at the cost of a very slow initial run.
323
+
324
+ # Notes
325
+
326
+ Only parts of the graph that have an output with all the correct inputs will be executed.
327
+
328
+ Only parts of the graph that change from each execution to the next will be executed, if you submit the same graph twice only the first will be executed. If you change the last part of the graph only the part you changed and the part that depends on it will be executed.
329
+
330
+ Dragging a generated png on the webpage or loading one will give you the full workflow including seeds that were used to create it.
331
+
332
+ You can use () to change emphasis of a word or phrase like: (good code:1.2) or (bad code:0.8). The default emphasis for () is 1.1. To use () characters in your actual prompt escape them like \\( or \\).
333
+
334
+ You can use {day|night}, for wildcard/dynamic prompts. With this syntax "{wild|card|test}" will be randomly replaced by either "wild", "card" or "test" by the frontend every time you queue the prompt. To use {} characters in your actual prompt escape them like: \\{ or \\}.
335
+
336
+ Dynamic prompts also support C-style comments, like `// comment` or `/* comment */`.
337
+
338
+ To use a textual inversion concepts/embeddings in a text prompt put them in the models/embeddings directory and use them in the CLIPTextEncode node like this (you can omit the .pt extension):
339
+
340
+ ```embedding:embedding_filename.pt```
341
+
342
+
343
+ ## How to show high-quality previews?
344
+
345
+ Use ```--preview-method auto``` to enable previews.
346
+
347
+ The default installation includes a fast latent preview method that's low-resolution. To enable higher-quality previews with [TAESD](https://github.com/madebyollin/taesd), download the [taesd_decoder.pth, taesdxl_decoder.pth, taesd3_decoder.pth and taef1_decoder.pth](https://github.com/madebyollin/taesd/) and place them in the `models/vae_approx` folder. Once they're installed, restart ComfyUI and launch it with `--preview-method taesd` to enable high-quality previews.
348
+
349
+ ## How to use TLS/SSL?
350
+ Generate a self-signed certificate (not appropriate for shared/production use) and key by running the command: `openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 3650 -nodes -subj "/C=XX/ST=StateName/L=CityName/O=CompanyName/OU=CompanySectionName/CN=CommonNameOrHostname"`
351
+
352
+ Use `--tls-keyfile key.pem --tls-certfile cert.pem` to enable TLS/SSL, the app will now be accessible with `https://...` instead of `http://...`.
353
+
354
+ > Note: Windows users can use [alexisrolland/docker-openssl](https://github.com/alexisrolland/docker-openssl) or one of the [3rd party binary distributions](https://wiki.openssl.org/index.php/Binaries) to run the command example above.
355
+ <br/><br/>If you use a container, note that the volume mount `-v` can be a relative path so `... -v ".\:/openssl-certs" ...` would create the key & cert files in the current directory of your command prompt or powershell terminal.
356
+
357
+ ## Support and dev channel
358
+
359
+ [Discord](https://comfy.org/discord): Try the #help or #feedback channels.
360
+
361
+ [Matrix space: #comfyui_space:matrix.org](https://app.element.io/#/room/%23comfyui_space%3Amatrix.org) (it's like discord but open source).
362
+
363
+ See also: [https://www.comfy.org/](https://www.comfy.org/)
364
+
365
+ ## Frontend Development
366
+
367
+ As of August 15, 2024, we have transitioned to a new frontend, which is now hosted in a separate repository: [ComfyUI Frontend](https://github.com/Comfy-Org/ComfyUI_frontend). This repository now hosts the compiled JS (from TS/Vue) under the `web/` directory.
368
+
369
+ ### Reporting Issues and Requesting Features
370
+
371
+ For any bugs, issues, or feature requests related to the frontend, please use the [ComfyUI Frontend repository](https://github.com/Comfy-Org/ComfyUI_frontend). This will help us manage and address frontend-specific concerns more efficiently.
372
+
373
+ ### Using the Latest Frontend
374
+
375
+ The new frontend is now the default for ComfyUI. However, please note:
376
+
377
+ 1. The frontend in the main ComfyUI repository is updated fortnightly.
378
+ 2. Daily releases are available in the separate frontend repository.
379
+
380
+ To use the most up-to-date frontend version:
381
+
382
+ 1. For the latest daily release, launch ComfyUI with this command line argument:
383
+
384
+ ```
385
+ --front-end-version Comfy-Org/ComfyUI_frontend@latest
386
+ ```
387
+
388
+ 2. For a specific version, replace `latest` with the desired version number:
389
+
390
+ ```
391
+ --front-end-version Comfy-Org/ComfyUI_frontend@1.2.2
392
+ ```
393
+
394
+ This approach allows you to easily switch between the stable fortnightly release and the cutting-edge daily updates, or even specific versions for testing purposes.
395
+
396
+ ### Accessing the Legacy Frontend
397
+
398
+ If you need to use the legacy frontend for any reason, you can access it using the following command line argument:
399
+
400
+ ```
401
+ --front-end-version Comfy-Org/ComfyUI_legacy_frontend@latest
402
+ ```
403
+
404
+ This will use a snapshot of the legacy frontend preserved in the [ComfyUI Legacy Frontend repository](https://github.com/Comfy-Org/ComfyUI_legacy_frontend).
405
+
406
+ # QA
407
+
408
+ ### Which GPU should I buy for this?
409
+
410
+ [See this page for some recommendations](https://github.com/comfyanonymous/ComfyUI/wiki/Which-GPU-should-I-buy-for-ComfyUI)
ComfyUI/alembic.ini ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # A generic, single database configuration.
2
+
3
+ [alembic]
4
+ # path to migration scripts
5
+ # Use forward slashes (/) also on windows to provide an os agnostic path
6
+ script_location = alembic_db
7
+
8
+ # template used to generate migration file names; The default value is %%(rev)s_%%(slug)s
9
+ # Uncomment the line below if you want the files to be prepended with date and time
10
+ # see https://alembic.sqlalchemy.org/en/latest/tutorial.html#editing-the-ini-file
11
+ # for all available tokens
12
+ # file_template = %%(year)d_%%(month).2d_%%(day).2d_%%(hour).2d%%(minute).2d-%%(rev)s_%%(slug)s
13
+
14
+ # sys.path path, will be prepended to sys.path if present.
15
+ # defaults to the current working directory.
16
+ prepend_sys_path = .
17
+
18
+ # timezone to use when rendering the date within the migration file
19
+ # as well as the filename.
20
+ # If specified, requires the python>=3.9 or backports.zoneinfo library and tzdata library.
21
+ # Any required deps can installed by adding `alembic[tz]` to the pip requirements
22
+ # string value is passed to ZoneInfo()
23
+ # leave blank for localtime
24
+ # timezone =
25
+
26
+ # max length of characters to apply to the "slug" field
27
+ # truncate_slug_length = 40
28
+
29
+ # set to 'true' to run the environment during
30
+ # the 'revision' command, regardless of autogenerate
31
+ # revision_environment = false
32
+
33
+ # set to 'true' to allow .pyc and .pyo files without
34
+ # a source .py file to be detected as revisions in the
35
+ # versions/ directory
36
+ # sourceless = false
37
+
38
+ # version location specification; This defaults
39
+ # to alembic_db/versions. When using multiple version
40
+ # directories, initial revisions must be specified with --version-path.
41
+ # The path separator used here should be the separator specified by "version_path_separator" below.
42
+ # version_locations = %(here)s/bar:%(here)s/bat:alembic_db/versions
43
+
44
+ # version path separator; As mentioned above, this is the character used to split
45
+ # version_locations. The default within new alembic.ini files is "os", which uses os.pathsep.
46
+ # If this key is omitted entirely, it falls back to the legacy behavior of splitting on spaces and/or commas.
47
+ # Valid values for version_path_separator are:
48
+ #
49
+ # version_path_separator = :
50
+ # version_path_separator = ;
51
+ # version_path_separator = space
52
+ # version_path_separator = newline
53
+ #
54
+ # Use os.pathsep. Default configuration used for new projects.
55
+ version_path_separator = os
56
+
57
+ # set to 'true' to search source files recursively
58
+ # in each "version_locations" directory
59
+ # new in Alembic version 1.10
60
+ # recursive_version_locations = false
61
+
62
+ # the output encoding used when revision files
63
+ # are written from script.py.mako
64
+ # output_encoding = utf-8
65
+
66
+ sqlalchemy.url = sqlite:///user/comfyui.db
67
+
68
+
69
+ [post_write_hooks]
70
+ # post_write_hooks defines scripts or Python functions that are run
71
+ # on newly generated revision scripts. See the documentation for further
72
+ # detail and examples
73
+
74
+ # format using "black" - use the console_scripts runner, against the "black" entrypoint
75
+ # hooks = black
76
+ # black.type = console_scripts
77
+ # black.entrypoint = black
78
+ # black.options = -l 79 REVISION_SCRIPT_FILENAME
79
+
80
+ # lint with attempts to fix using "ruff" - use the exec runner, execute a binary
81
+ # hooks = ruff
82
+ # ruff.type = exec
83
+ # ruff.executable = %(here)s/.venv/bin/ruff
84
+ # ruff.options = check --fix REVISION_SCRIPT_FILENAME
ComfyUI/comfyui_version.py ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ # This file is automatically generated by the build process when version is
2
+ # updated in pyproject.toml.
3
+ __version__ = "0.3.47"
ComfyUI/cuda_malloc.py ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import importlib.util
3
+ from comfy.cli_args import args
4
+ import subprocess
5
+
6
+ #Can't use pytorch to get the GPU names because the cuda malloc has to be set before the first import.
7
+ def get_gpu_names():
8
+ if os.name == 'nt':
9
+ import ctypes
10
+
11
+ # Define necessary C structures and types
12
+ class DISPLAY_DEVICEA(ctypes.Structure):
13
+ _fields_ = [
14
+ ('cb', ctypes.c_ulong),
15
+ ('DeviceName', ctypes.c_char * 32),
16
+ ('DeviceString', ctypes.c_char * 128),
17
+ ('StateFlags', ctypes.c_ulong),
18
+ ('DeviceID', ctypes.c_char * 128),
19
+ ('DeviceKey', ctypes.c_char * 128)
20
+ ]
21
+
22
+ # Load user32.dll
23
+ user32 = ctypes.windll.user32
24
+
25
+ # Call EnumDisplayDevicesA
26
+ def enum_display_devices():
27
+ device_info = DISPLAY_DEVICEA()
28
+ device_info.cb = ctypes.sizeof(device_info)
29
+ device_index = 0
30
+ gpu_names = set()
31
+
32
+ while user32.EnumDisplayDevicesA(None, device_index, ctypes.byref(device_info), 0):
33
+ device_index += 1
34
+ gpu_names.add(device_info.DeviceString.decode('utf-8'))
35
+ return gpu_names
36
+ return enum_display_devices()
37
+ else:
38
+ gpu_names = set()
39
+ out = subprocess.check_output(['nvidia-smi', '-L'])
40
+ for l in out.split(b'\n'):
41
+ if len(l) > 0:
42
+ gpu_names.add(l.decode('utf-8').split(' (UUID')[0])
43
+ return gpu_names
44
+
45
+ blacklist = {"GeForce GTX TITAN X", "GeForce GTX 980", "GeForce GTX 970", "GeForce GTX 960", "GeForce GTX 950", "GeForce 945M",
46
+ "GeForce 940M", "GeForce 930M", "GeForce 920M", "GeForce 910M", "GeForce GTX 750", "GeForce GTX 745", "Quadro K620",
47
+ "Quadro K1200", "Quadro K2200", "Quadro M500", "Quadro M520", "Quadro M600", "Quadro M620", "Quadro M1000",
48
+ "Quadro M1200", "Quadro M2000", "Quadro M2200", "Quadro M3000", "Quadro M4000", "Quadro M5000", "Quadro M5500", "Quadro M6000",
49
+ "GeForce MX110", "GeForce MX130", "GeForce 830M", "GeForce 840M", "GeForce GTX 850M", "GeForce GTX 860M",
50
+ "GeForce GTX 1650", "GeForce GTX 1630", "Tesla M4", "Tesla M6", "Tesla M10", "Tesla M40", "Tesla M60"
51
+ }
52
+
53
+ def cuda_malloc_supported():
54
+ try:
55
+ names = get_gpu_names()
56
+ except:
57
+ names = set()
58
+ for x in names:
59
+ if "NVIDIA" in x:
60
+ for b in blacklist:
61
+ if b in x:
62
+ return False
63
+ return True
64
+
65
+
66
+ if not args.cuda_malloc:
67
+ try:
68
+ version = ""
69
+ torch_spec = importlib.util.find_spec("torch")
70
+ for folder in torch_spec.submodule_search_locations:
71
+ ver_file = os.path.join(folder, "version.py")
72
+ if os.path.isfile(ver_file):
73
+ spec = importlib.util.spec_from_file_location("torch_version_import", ver_file)
74
+ module = importlib.util.module_from_spec(spec)
75
+ spec.loader.exec_module(module)
76
+ version = module.__version__
77
+
78
+ if int(version[0]) >= 2 and "+cu" in version: #enable by default for torch version 2.0 and up only on cuda torch
79
+ args.cuda_malloc = cuda_malloc_supported()
80
+ except:
81
+ pass
82
+
83
+
84
+ if args.cuda_malloc and not args.disable_cuda_malloc:
85
+ env_var = os.environ.get('PYTORCH_CUDA_ALLOC_CONF', None)
86
+ if env_var is None:
87
+ env_var = "backend:cudaMallocAsync"
88
+ else:
89
+ env_var += ",backend:cudaMallocAsync"
90
+
91
+ os.environ['PYTORCH_CUDA_ALLOC_CONF'] = env_var
ComfyUI/download.py ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from huggingface_hub import hf_hub_download, login
2
+
3
+ # Model repo + filename
4
+ repo_id = "mihaiciorobitca/wan2.2_t2v_low_noise_14B_fp8_scaled"
5
+ filename = "wan2.2_t2v_low_noise_14B_fp8_scaled.safetensors" # adjust if the repo has different file names
6
+
7
+ # Download to a local path (ComfyUI checkpoints folder)
8
+ local_path = hf_hub_download(
9
+ repo_id=repo_id,
10
+ filename=filename,
11
+ cache_dir="~/ComfyUI/models/diffusion_models" # change if needed
12
+ )
13
+
14
+ print(f"✅ Downloaded: {local_path}")
ComfyUI/execution.py ADDED
@@ -0,0 +1,1147 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import copy
2
+ import heapq
3
+ import inspect
4
+ import logging
5
+ import sys
6
+ import threading
7
+ import time
8
+ import traceback
9
+ from enum import Enum
10
+ from typing import List, Literal, NamedTuple, Optional
11
+ import asyncio
12
+
13
+ import torch
14
+
15
+ import comfy.model_management
16
+ import nodes
17
+ from comfy_execution.caching import (
18
+ BasicCache,
19
+ CacheKeySetID,
20
+ CacheKeySetInputSignature,
21
+ DependencyAwareCache,
22
+ HierarchicalCache,
23
+ LRUCache,
24
+ )
25
+ from comfy_execution.graph import (
26
+ DynamicPrompt,
27
+ ExecutionBlocker,
28
+ ExecutionList,
29
+ get_input_info,
30
+ )
31
+ from comfy_execution.graph_utils import GraphBuilder, is_link
32
+ from comfy_execution.validation import validate_node_input
33
+ from comfy_execution.progress import get_progress_state, reset_progress_state, add_progress_handler, WebUIProgressHandler
34
+ from comfy_execution.utils import CurrentNodeContext
35
+
36
+
37
+ class ExecutionResult(Enum):
38
+ SUCCESS = 0
39
+ FAILURE = 1
40
+ PENDING = 2
41
+
42
+ class DuplicateNodeError(Exception):
43
+ pass
44
+
45
+ class IsChangedCache:
46
+ def __init__(self, prompt_id: str, dynprompt: DynamicPrompt, outputs_cache: BasicCache):
47
+ self.prompt_id = prompt_id
48
+ self.dynprompt = dynprompt
49
+ self.outputs_cache = outputs_cache
50
+ self.is_changed = {}
51
+
52
+ async def get(self, node_id):
53
+ if node_id in self.is_changed:
54
+ return self.is_changed[node_id]
55
+
56
+ node = self.dynprompt.get_node(node_id)
57
+ class_type = node["class_type"]
58
+ class_def = nodes.NODE_CLASS_MAPPINGS[class_type]
59
+ if not hasattr(class_def, "IS_CHANGED"):
60
+ self.is_changed[node_id] = False
61
+ return self.is_changed[node_id]
62
+
63
+ if "is_changed" in node:
64
+ self.is_changed[node_id] = node["is_changed"]
65
+ return self.is_changed[node_id]
66
+
67
+ # Intentionally do not use cached outputs here. We only want constants in IS_CHANGED
68
+ input_data_all, _ = get_input_data(node["inputs"], class_def, node_id, None)
69
+ try:
70
+ is_changed = await _async_map_node_over_list(self.prompt_id, node_id, class_def, input_data_all, "IS_CHANGED")
71
+ is_changed = await resolve_map_node_over_list_results(is_changed)
72
+ node["is_changed"] = [None if isinstance(x, ExecutionBlocker) else x for x in is_changed]
73
+ except Exception as e:
74
+ logging.warning("WARNING: {}".format(e))
75
+ node["is_changed"] = float("NaN")
76
+ finally:
77
+ self.is_changed[node_id] = node["is_changed"]
78
+ return self.is_changed[node_id]
79
+
80
+
81
+ class CacheType(Enum):
82
+ CLASSIC = 0
83
+ LRU = 1
84
+ DEPENDENCY_AWARE = 2
85
+
86
+
87
+ class CacheSet:
88
+ def __init__(self, cache_type=None, cache_size=None):
89
+ if cache_type == CacheType.DEPENDENCY_AWARE:
90
+ self.init_dependency_aware_cache()
91
+ logging.info("Disabling intermediate node cache.")
92
+ elif cache_type == CacheType.LRU:
93
+ if cache_size is None:
94
+ cache_size = 0
95
+ self.init_lru_cache(cache_size)
96
+ logging.info("Using LRU cache")
97
+ else:
98
+ self.init_classic_cache()
99
+
100
+ self.all = [self.outputs, self.ui, self.objects]
101
+
102
+ # Performs like the old cache -- dump data ASAP
103
+ def init_classic_cache(self):
104
+ self.outputs = HierarchicalCache(CacheKeySetInputSignature)
105
+ self.ui = HierarchicalCache(CacheKeySetInputSignature)
106
+ self.objects = HierarchicalCache(CacheKeySetID)
107
+
108
+ def init_lru_cache(self, cache_size):
109
+ self.outputs = LRUCache(CacheKeySetInputSignature, max_size=cache_size)
110
+ self.ui = LRUCache(CacheKeySetInputSignature, max_size=cache_size)
111
+ self.objects = HierarchicalCache(CacheKeySetID)
112
+
113
+ # only hold cached items while the decendents have not executed
114
+ def init_dependency_aware_cache(self):
115
+ self.outputs = DependencyAwareCache(CacheKeySetInputSignature)
116
+ self.ui = DependencyAwareCache(CacheKeySetInputSignature)
117
+ self.objects = DependencyAwareCache(CacheKeySetID)
118
+
119
+ def recursive_debug_dump(self):
120
+ result = {
121
+ "outputs": self.outputs.recursive_debug_dump(),
122
+ "ui": self.ui.recursive_debug_dump(),
123
+ }
124
+ return result
125
+
126
+ SENSITIVE_EXTRA_DATA_KEYS = ("auth_token_comfy_org", "api_key_comfy_org")
127
+
128
+ def get_input_data(inputs, class_def, unique_id, outputs=None, dynprompt=None, extra_data={}):
129
+ valid_inputs = class_def.INPUT_TYPES()
130
+ input_data_all = {}
131
+ missing_keys = {}
132
+ for x in inputs:
133
+ input_data = inputs[x]
134
+ _, input_category, input_info = get_input_info(class_def, x, valid_inputs)
135
+ def mark_missing():
136
+ missing_keys[x] = True
137
+ input_data_all[x] = (None,)
138
+ if is_link(input_data) and (not input_info or not input_info.get("rawLink", False)):
139
+ input_unique_id = input_data[0]
140
+ output_index = input_data[1]
141
+ if outputs is None:
142
+ mark_missing()
143
+ continue # This might be a lazily-evaluated input
144
+ cached_output = outputs.get(input_unique_id)
145
+ if cached_output is None:
146
+ mark_missing()
147
+ continue
148
+ if output_index >= len(cached_output):
149
+ mark_missing()
150
+ continue
151
+ obj = cached_output[output_index]
152
+ input_data_all[x] = obj
153
+ elif input_category is not None:
154
+ input_data_all[x] = [input_data]
155
+
156
+ if "hidden" in valid_inputs:
157
+ h = valid_inputs["hidden"]
158
+ for x in h:
159
+ if h[x] == "PROMPT":
160
+ input_data_all[x] = [dynprompt.get_original_prompt() if dynprompt is not None else {}]
161
+ if h[x] == "DYNPROMPT":
162
+ input_data_all[x] = [dynprompt]
163
+ if h[x] == "EXTRA_PNGINFO":
164
+ input_data_all[x] = [extra_data.get('extra_pnginfo', None)]
165
+ if h[x] == "UNIQUE_ID":
166
+ input_data_all[x] = [unique_id]
167
+ if h[x] == "AUTH_TOKEN_COMFY_ORG":
168
+ input_data_all[x] = [extra_data.get("auth_token_comfy_org", None)]
169
+ if h[x] == "API_KEY_COMFY_ORG":
170
+ input_data_all[x] = [extra_data.get("api_key_comfy_org", None)]
171
+ return input_data_all, missing_keys
172
+
173
+ map_node_over_list = None #Don't hook this please
174
+
175
+ async def resolve_map_node_over_list_results(results):
176
+ remaining = [x for x in results if isinstance(x, asyncio.Task) and not x.done()]
177
+ if len(remaining) == 0:
178
+ return [x.result() if isinstance(x, asyncio.Task) else x for x in results]
179
+ else:
180
+ done, pending = await asyncio.wait(remaining)
181
+ for task in done:
182
+ exc = task.exception()
183
+ if exc is not None:
184
+ raise exc
185
+ return [x.result() if isinstance(x, asyncio.Task) else x for x in results]
186
+
187
+ async def _async_map_node_over_list(prompt_id, unique_id, obj, input_data_all, func, allow_interrupt=False, execution_block_cb=None, pre_execute_cb=None):
188
+ # check if node wants the lists
189
+ input_is_list = getattr(obj, "INPUT_IS_LIST", False)
190
+
191
+ if len(input_data_all) == 0:
192
+ max_len_input = 0
193
+ else:
194
+ max_len_input = max(len(x) for x in input_data_all.values())
195
+
196
+ # get a slice of inputs, repeat last input when list isn't long enough
197
+ def slice_dict(d, i):
198
+ return {k: v[i if len(v) > i else -1] for k, v in d.items()}
199
+
200
+ results = []
201
+ async def process_inputs(inputs, index=None, input_is_list=False):
202
+ if allow_interrupt:
203
+ nodes.before_node_execution()
204
+ execution_block = None
205
+ for k, v in inputs.items():
206
+ if input_is_list:
207
+ for e in v:
208
+ if isinstance(e, ExecutionBlocker):
209
+ v = e
210
+ break
211
+ if isinstance(v, ExecutionBlocker):
212
+ execution_block = execution_block_cb(v) if execution_block_cb else v
213
+ break
214
+ if execution_block is None:
215
+ if pre_execute_cb is not None and index is not None:
216
+ pre_execute_cb(index)
217
+ f = getattr(obj, func)
218
+ if inspect.iscoroutinefunction(f):
219
+ async def async_wrapper(f, prompt_id, unique_id, list_index, args):
220
+ with CurrentNodeContext(prompt_id, unique_id, list_index):
221
+ return await f(**args)
222
+ task = asyncio.create_task(async_wrapper(f, prompt_id, unique_id, index, args=inputs))
223
+ # Give the task a chance to execute without yielding
224
+ await asyncio.sleep(0)
225
+ if task.done():
226
+ result = task.result()
227
+ results.append(result)
228
+ else:
229
+ results.append(task)
230
+ else:
231
+ with CurrentNodeContext(prompt_id, unique_id, index):
232
+ result = f(**inputs)
233
+ results.append(result)
234
+ else:
235
+ results.append(execution_block)
236
+
237
+ if input_is_list:
238
+ await process_inputs(input_data_all, 0, input_is_list=input_is_list)
239
+ elif max_len_input == 0:
240
+ await process_inputs({})
241
+ else:
242
+ for i in range(max_len_input):
243
+ input_dict = slice_dict(input_data_all, i)
244
+ await process_inputs(input_dict, i)
245
+ return results
246
+
247
+
248
+ def merge_result_data(results, obj):
249
+ # check which outputs need concatenating
250
+ output = []
251
+ output_is_list = [False] * len(results[0])
252
+ if hasattr(obj, "OUTPUT_IS_LIST"):
253
+ output_is_list = obj.OUTPUT_IS_LIST
254
+
255
+ # merge node execution results
256
+ for i, is_list in zip(range(len(results[0])), output_is_list):
257
+ if is_list:
258
+ value = []
259
+ for o in results:
260
+ if isinstance(o[i], ExecutionBlocker):
261
+ value.append(o[i])
262
+ else:
263
+ value.extend(o[i])
264
+ output.append(value)
265
+ else:
266
+ output.append([o[i] for o in results])
267
+ return output
268
+
269
+ async def get_output_data(prompt_id, unique_id, obj, input_data_all, execution_block_cb=None, pre_execute_cb=None):
270
+ return_values = await _async_map_node_over_list(prompt_id, unique_id, obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
271
+ has_pending_task = any(isinstance(r, asyncio.Task) and not r.done() for r in return_values)
272
+ if has_pending_task:
273
+ return return_values, {}, False, has_pending_task
274
+ output, ui, has_subgraph = get_output_from_returns(return_values, obj)
275
+ return output, ui, has_subgraph, False
276
+
277
+ def get_output_from_returns(return_values, obj):
278
+ results = []
279
+ uis = []
280
+ subgraph_results = []
281
+ has_subgraph = False
282
+ for i in range(len(return_values)):
283
+ r = return_values[i]
284
+ if isinstance(r, dict):
285
+ if 'ui' in r:
286
+ uis.append(r['ui'])
287
+ if 'expand' in r:
288
+ # Perform an expansion, but do not append results
289
+ has_subgraph = True
290
+ new_graph = r['expand']
291
+ result = r.get("result", None)
292
+ if isinstance(result, ExecutionBlocker):
293
+ result = tuple([result] * len(obj.RETURN_TYPES))
294
+ subgraph_results.append((new_graph, result))
295
+ elif 'result' in r:
296
+ result = r.get("result", None)
297
+ if isinstance(result, ExecutionBlocker):
298
+ result = tuple([result] * len(obj.RETURN_TYPES))
299
+ results.append(result)
300
+ subgraph_results.append((None, result))
301
+ else:
302
+ if isinstance(r, ExecutionBlocker):
303
+ r = tuple([r] * len(obj.RETURN_TYPES))
304
+ results.append(r)
305
+ subgraph_results.append((None, r))
306
+
307
+ if has_subgraph:
308
+ output = subgraph_results
309
+ elif len(results) > 0:
310
+ output = merge_result_data(results, obj)
311
+ else:
312
+ output = []
313
+ ui = dict()
314
+ # TODO: Think there's an existing bug here
315
+ # If we're performing a subgraph expansion, we probably shouldn't be returning UI values yet.
316
+ # They'll get cached without the completed subgraphs. It's an edge case and I'm not aware of
317
+ # any nodes that use both subgraph expansion and custom UI outputs, but might be a problem in the future.
318
+ if len(uis) > 0:
319
+ ui = {k: [y for x in uis for y in x[k]] for k in uis[0].keys()}
320
+ return output, ui, has_subgraph
321
+
322
+ def format_value(x):
323
+ if x is None:
324
+ return None
325
+ elif isinstance(x, (int, float, bool, str)):
326
+ return x
327
+ else:
328
+ return str(x)
329
+
330
+ async def execute(server, dynprompt, caches, current_item, extra_data, executed, prompt_id, execution_list, pending_subgraph_results, pending_async_nodes):
331
+ unique_id = current_item
332
+ real_node_id = dynprompt.get_real_node_id(unique_id)
333
+ display_node_id = dynprompt.get_display_node_id(unique_id)
334
+ parent_node_id = dynprompt.get_parent_node_id(unique_id)
335
+ inputs = dynprompt.get_node(unique_id)['inputs']
336
+ class_type = dynprompt.get_node(unique_id)['class_type']
337
+ class_def = nodes.NODE_CLASS_MAPPINGS[class_type]
338
+ if caches.outputs.get(unique_id) is not None:
339
+ if server.client_id is not None:
340
+ cached_output = caches.ui.get(unique_id) or {}
341
+ server.send_sync("executed", { "node": unique_id, "display_node": display_node_id, "output": cached_output.get("output",None), "prompt_id": prompt_id }, server.client_id)
342
+ get_progress_state().finish_progress(unique_id)
343
+ return (ExecutionResult.SUCCESS, None, None)
344
+
345
+ input_data_all = None
346
+ try:
347
+ if unique_id in pending_async_nodes:
348
+ results = []
349
+ for r in pending_async_nodes[unique_id]:
350
+ if isinstance(r, asyncio.Task):
351
+ try:
352
+ results.append(r.result())
353
+ except Exception as ex:
354
+ # An async task failed - propagate the exception up
355
+ del pending_async_nodes[unique_id]
356
+ raise ex
357
+ else:
358
+ results.append(r)
359
+ del pending_async_nodes[unique_id]
360
+ output_data, output_ui, has_subgraph = get_output_from_returns(results, class_def)
361
+ elif unique_id in pending_subgraph_results:
362
+ cached_results = pending_subgraph_results[unique_id]
363
+ resolved_outputs = []
364
+ for is_subgraph, result in cached_results:
365
+ if not is_subgraph:
366
+ resolved_outputs.append(result)
367
+ else:
368
+ resolved_output = []
369
+ for r in result:
370
+ if is_link(r):
371
+ source_node, source_output = r[0], r[1]
372
+ node_output = caches.outputs.get(source_node)[source_output]
373
+ for o in node_output:
374
+ resolved_output.append(o)
375
+
376
+ else:
377
+ resolved_output.append(r)
378
+ resolved_outputs.append(tuple(resolved_output))
379
+ output_data = merge_result_data(resolved_outputs, class_def)
380
+ output_ui = []
381
+ has_subgraph = False
382
+ else:
383
+ get_progress_state().start_progress(unique_id)
384
+ input_data_all, missing_keys = get_input_data(inputs, class_def, unique_id, caches.outputs, dynprompt, extra_data)
385
+ if server.client_id is not None:
386
+ server.last_node_id = display_node_id
387
+ server.send_sync("executing", { "node": unique_id, "display_node": display_node_id, "prompt_id": prompt_id }, server.client_id)
388
+
389
+ obj = caches.objects.get(unique_id)
390
+ if obj is None:
391
+ obj = class_def()
392
+ caches.objects.set(unique_id, obj)
393
+
394
+ if hasattr(obj, "check_lazy_status"):
395
+ required_inputs = await _async_map_node_over_list(prompt_id, unique_id, obj, input_data_all, "check_lazy_status", allow_interrupt=True)
396
+ required_inputs = await resolve_map_node_over_list_results(required_inputs)
397
+ required_inputs = set(sum([r for r in required_inputs if isinstance(r,list)], []))
398
+ required_inputs = [x for x in required_inputs if isinstance(x,str) and (
399
+ x not in input_data_all or x in missing_keys
400
+ )]
401
+ if len(required_inputs) > 0:
402
+ for i in required_inputs:
403
+ execution_list.make_input_strong_link(unique_id, i)
404
+ return (ExecutionResult.PENDING, None, None)
405
+
406
+ def execution_block_cb(block):
407
+ if block.message is not None:
408
+ mes = {
409
+ "prompt_id": prompt_id,
410
+ "node_id": unique_id,
411
+ "node_type": class_type,
412
+ "executed": list(executed),
413
+
414
+ "exception_message": f"Execution Blocked: {block.message}",
415
+ "exception_type": "ExecutionBlocked",
416
+ "traceback": [],
417
+ "current_inputs": [],
418
+ "current_outputs": [],
419
+ }
420
+ server.send_sync("execution_error", mes, server.client_id)
421
+ return ExecutionBlocker(None)
422
+ else:
423
+ return block
424
+ def pre_execute_cb(call_index):
425
+ # TODO - How to handle this with async functions without contextvars (which requires Python 3.12)?
426
+ GraphBuilder.set_default_prefix(unique_id, call_index, 0)
427
+ output_data, output_ui, has_subgraph, has_pending_tasks = await get_output_data(prompt_id, unique_id, obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
428
+ if has_pending_tasks:
429
+ pending_async_nodes[unique_id] = output_data
430
+ unblock = execution_list.add_external_block(unique_id)
431
+ async def await_completion():
432
+ tasks = [x for x in output_data if isinstance(x, asyncio.Task)]
433
+ await asyncio.gather(*tasks, return_exceptions=True)
434
+ unblock()
435
+ asyncio.create_task(await_completion())
436
+ return (ExecutionResult.PENDING, None, None)
437
+ if len(output_ui) > 0:
438
+ caches.ui.set(unique_id, {
439
+ "meta": {
440
+ "node_id": unique_id,
441
+ "display_node": display_node_id,
442
+ "parent_node": parent_node_id,
443
+ "real_node_id": real_node_id,
444
+ },
445
+ "output": output_ui
446
+ })
447
+ if server.client_id is not None:
448
+ server.send_sync("executed", { "node": unique_id, "display_node": display_node_id, "output": output_ui, "prompt_id": prompt_id }, server.client_id)
449
+ if has_subgraph:
450
+ cached_outputs = []
451
+ new_node_ids = []
452
+ new_output_ids = []
453
+ new_output_links = []
454
+ for i in range(len(output_data)):
455
+ new_graph, node_outputs = output_data[i]
456
+ if new_graph is None:
457
+ cached_outputs.append((False, node_outputs))
458
+ else:
459
+ # Check for conflicts
460
+ for node_id in new_graph.keys():
461
+ if dynprompt.has_node(node_id):
462
+ raise DuplicateNodeError(f"Attempt to add duplicate node {node_id}. Ensure node ids are unique and deterministic or use graph_utils.GraphBuilder.")
463
+ for node_id, node_info in new_graph.items():
464
+ new_node_ids.append(node_id)
465
+ display_id = node_info.get("override_display_id", unique_id)
466
+ dynprompt.add_ephemeral_node(node_id, node_info, unique_id, display_id)
467
+ # Figure out if the newly created node is an output node
468
+ class_type = node_info["class_type"]
469
+ class_def = nodes.NODE_CLASS_MAPPINGS[class_type]
470
+ if hasattr(class_def, 'OUTPUT_NODE') and class_def.OUTPUT_NODE == True:
471
+ new_output_ids.append(node_id)
472
+ for i in range(len(node_outputs)):
473
+ if is_link(node_outputs[i]):
474
+ from_node_id, from_socket = node_outputs[i][0], node_outputs[i][1]
475
+ new_output_links.append((from_node_id, from_socket))
476
+ cached_outputs.append((True, node_outputs))
477
+ new_node_ids = set(new_node_ids)
478
+ for cache in caches.all:
479
+ subcache = await cache.ensure_subcache_for(unique_id, new_node_ids)
480
+ subcache.clean_unused()
481
+ for node_id in new_output_ids:
482
+ execution_list.add_node(node_id)
483
+ for link in new_output_links:
484
+ execution_list.add_strong_link(link[0], link[1], unique_id)
485
+ pending_subgraph_results[unique_id] = cached_outputs
486
+ return (ExecutionResult.PENDING, None, None)
487
+ caches.outputs.set(unique_id, output_data)
488
+ except comfy.model_management.InterruptProcessingException as iex:
489
+ logging.info("Processing interrupted")
490
+
491
+ # skip formatting inputs/outputs
492
+ error_details = {
493
+ "node_id": real_node_id,
494
+ }
495
+
496
+ return (ExecutionResult.FAILURE, error_details, iex)
497
+ except Exception as ex:
498
+ typ, _, tb = sys.exc_info()
499
+ exception_type = full_type_name(typ)
500
+ input_data_formatted = {}
501
+ if input_data_all is not None:
502
+ input_data_formatted = {}
503
+ for name, inputs in input_data_all.items():
504
+ input_data_formatted[name] = [format_value(x) for x in inputs]
505
+
506
+ logging.error(f"!!! Exception during processing !!! {ex}")
507
+ logging.error(traceback.format_exc())
508
+ tips = ""
509
+
510
+ if isinstance(ex, comfy.model_management.OOM_EXCEPTION):
511
+ tips = "This error means you ran out of memory on your GPU.\n\nTIPS: If the workflow worked before you might have accidentally set the batch_size to a large number."
512
+ logging.error("Got an OOM, unloading all loaded models.")
513
+ comfy.model_management.unload_all_models()
514
+
515
+ error_details = {
516
+ "node_id": real_node_id,
517
+ "exception_message": "{}\n{}".format(ex, tips),
518
+ "exception_type": exception_type,
519
+ "traceback": traceback.format_tb(tb),
520
+ "current_inputs": input_data_formatted
521
+ }
522
+
523
+ return (ExecutionResult.FAILURE, error_details, ex)
524
+
525
+ get_progress_state().finish_progress(unique_id)
526
+ executed.add(unique_id)
527
+
528
+ return (ExecutionResult.SUCCESS, None, None)
529
+
530
+ class PromptExecutor:
531
+ def __init__(self, server, cache_type=False, cache_size=None):
532
+ self.cache_size = cache_size
533
+ self.cache_type = cache_type
534
+ self.server = server
535
+ self.reset()
536
+
537
+ def reset(self):
538
+ self.caches = CacheSet(cache_type=self.cache_type, cache_size=self.cache_size)
539
+ self.status_messages = []
540
+ self.success = True
541
+
542
+ def add_message(self, event, data: dict, broadcast: bool):
543
+ data = {
544
+ **data,
545
+ "timestamp": int(time.time() * 1000),
546
+ }
547
+ self.status_messages.append((event, data))
548
+ if self.server.client_id is not None or broadcast:
549
+ self.server.send_sync(event, data, self.server.client_id)
550
+
551
+ def handle_execution_error(self, prompt_id, prompt, current_outputs, executed, error, ex):
552
+ node_id = error["node_id"]
553
+ class_type = prompt[node_id]["class_type"]
554
+
555
+ # First, send back the status to the frontend depending
556
+ # on the exception type
557
+ if isinstance(ex, comfy.model_management.InterruptProcessingException):
558
+ mes = {
559
+ "prompt_id": prompt_id,
560
+ "node_id": node_id,
561
+ "node_type": class_type,
562
+ "executed": list(executed),
563
+ }
564
+ self.add_message("execution_interrupted", mes, broadcast=True)
565
+ else:
566
+ mes = {
567
+ "prompt_id": prompt_id,
568
+ "node_id": node_id,
569
+ "node_type": class_type,
570
+ "executed": list(executed),
571
+ "exception_message": error["exception_message"],
572
+ "exception_type": error["exception_type"],
573
+ "traceback": error["traceback"],
574
+ "current_inputs": error["current_inputs"],
575
+ "current_outputs": list(current_outputs),
576
+ }
577
+ self.add_message("execution_error", mes, broadcast=False)
578
+
579
+ def execute(self, prompt, prompt_id, extra_data={}, execute_outputs=[]):
580
+ asyncio_loop = asyncio.new_event_loop()
581
+ asyncio.set_event_loop(asyncio_loop)
582
+ asyncio.run(self.execute_async(prompt, prompt_id, extra_data, execute_outputs))
583
+
584
+ async def execute_async(self, prompt, prompt_id, extra_data={}, execute_outputs=[]):
585
+ nodes.interrupt_processing(False)
586
+
587
+ if "client_id" in extra_data:
588
+ self.server.client_id = extra_data["client_id"]
589
+ else:
590
+ self.server.client_id = None
591
+
592
+ self.status_messages = []
593
+ self.add_message("execution_start", { "prompt_id": prompt_id}, broadcast=False)
594
+
595
+ with torch.inference_mode():
596
+ dynamic_prompt = DynamicPrompt(prompt)
597
+ reset_progress_state(prompt_id, dynamic_prompt)
598
+ add_progress_handler(WebUIProgressHandler(self.server))
599
+ is_changed_cache = IsChangedCache(prompt_id, dynamic_prompt, self.caches.outputs)
600
+ for cache in self.caches.all:
601
+ await cache.set_prompt(dynamic_prompt, prompt.keys(), is_changed_cache)
602
+ cache.clean_unused()
603
+
604
+ cached_nodes = []
605
+ for node_id in prompt:
606
+ if self.caches.outputs.get(node_id) is not None:
607
+ cached_nodes.append(node_id)
608
+
609
+ comfy.model_management.cleanup_models_gc()
610
+ self.add_message("execution_cached",
611
+ { "nodes": cached_nodes, "prompt_id": prompt_id},
612
+ broadcast=False)
613
+ pending_subgraph_results = {}
614
+ pending_async_nodes = {} # TODO - Unify this with pending_subgraph_results
615
+ executed = set()
616
+ execution_list = ExecutionList(dynamic_prompt, self.caches.outputs)
617
+ current_outputs = self.caches.outputs.all_node_ids()
618
+ for node_id in list(execute_outputs):
619
+ execution_list.add_node(node_id)
620
+
621
+ while not execution_list.is_empty():
622
+ node_id, error, ex = await execution_list.stage_node_execution()
623
+ if error is not None:
624
+ self.handle_execution_error(prompt_id, dynamic_prompt.original_prompt, current_outputs, executed, error, ex)
625
+ break
626
+
627
+ assert node_id is not None, "Node ID should not be None at this point"
628
+ result, error, ex = await execute(self.server, dynamic_prompt, self.caches, node_id, extra_data, executed, prompt_id, execution_list, pending_subgraph_results, pending_async_nodes)
629
+ self.success = result != ExecutionResult.FAILURE
630
+ if result == ExecutionResult.FAILURE:
631
+ self.handle_execution_error(prompt_id, dynamic_prompt.original_prompt, current_outputs, executed, error, ex)
632
+ break
633
+ elif result == ExecutionResult.PENDING:
634
+ execution_list.unstage_node_execution()
635
+ else: # result == ExecutionResult.SUCCESS:
636
+ execution_list.complete_node_execution()
637
+ else:
638
+ # Only execute when the while-loop ends without break
639
+ self.add_message("execution_success", { "prompt_id": prompt_id }, broadcast=False)
640
+
641
+ ui_outputs = {}
642
+ meta_outputs = {}
643
+ all_node_ids = self.caches.ui.all_node_ids()
644
+ for node_id in all_node_ids:
645
+ ui_info = self.caches.ui.get(node_id)
646
+ if ui_info is not None:
647
+ ui_outputs[node_id] = ui_info["output"]
648
+ meta_outputs[node_id] = ui_info["meta"]
649
+ self.history_result = {
650
+ "outputs": ui_outputs,
651
+ "meta": meta_outputs,
652
+ }
653
+ self.server.last_node_id = None
654
+ if comfy.model_management.DISABLE_SMART_MEMORY:
655
+ comfy.model_management.unload_all_models()
656
+
657
+
658
+ async def validate_inputs(prompt_id, prompt, item, validated):
659
+ unique_id = item
660
+ if unique_id in validated:
661
+ return validated[unique_id]
662
+
663
+ inputs = prompt[unique_id]['inputs']
664
+ class_type = prompt[unique_id]['class_type']
665
+ obj_class = nodes.NODE_CLASS_MAPPINGS[class_type]
666
+
667
+ class_inputs = obj_class.INPUT_TYPES()
668
+ valid_inputs = set(class_inputs.get('required',{})).union(set(class_inputs.get('optional',{})))
669
+
670
+ errors = []
671
+ valid = True
672
+
673
+ validate_function_inputs = []
674
+ validate_has_kwargs = False
675
+ if hasattr(obj_class, "VALIDATE_INPUTS"):
676
+ argspec = inspect.getfullargspec(obj_class.VALIDATE_INPUTS)
677
+ validate_function_inputs = argspec.args
678
+ validate_has_kwargs = argspec.varkw is not None
679
+ received_types = {}
680
+
681
+ for x in valid_inputs:
682
+ input_type, input_category, extra_info = get_input_info(obj_class, x, class_inputs)
683
+ assert extra_info is not None
684
+ if x not in inputs:
685
+ if input_category == "required":
686
+ error = {
687
+ "type": "required_input_missing",
688
+ "message": "Required input is missing",
689
+ "details": f"{x}",
690
+ "extra_info": {
691
+ "input_name": x
692
+ }
693
+ }
694
+ errors.append(error)
695
+ continue
696
+
697
+ val = inputs[x]
698
+ info = (input_type, extra_info)
699
+ if isinstance(val, list):
700
+ if len(val) != 2:
701
+ error = {
702
+ "type": "bad_linked_input",
703
+ "message": "Bad linked input, must be a length-2 list of [node_id, slot_index]",
704
+ "details": f"{x}",
705
+ "extra_info": {
706
+ "input_name": x,
707
+ "input_config": info,
708
+ "received_value": val
709
+ }
710
+ }
711
+ errors.append(error)
712
+ continue
713
+
714
+ o_id = val[0]
715
+ o_class_type = prompt[o_id]['class_type']
716
+ r = nodes.NODE_CLASS_MAPPINGS[o_class_type].RETURN_TYPES
717
+ received_type = r[val[1]]
718
+ received_types[x] = received_type
719
+ if 'input_types' not in validate_function_inputs and not validate_node_input(received_type, input_type):
720
+ details = f"{x}, received_type({received_type}) mismatch input_type({input_type})"
721
+ error = {
722
+ "type": "return_type_mismatch",
723
+ "message": "Return type mismatch between linked nodes",
724
+ "details": details,
725
+ "extra_info": {
726
+ "input_name": x,
727
+ "input_config": info,
728
+ "received_type": received_type,
729
+ "linked_node": val
730
+ }
731
+ }
732
+ errors.append(error)
733
+ continue
734
+ try:
735
+ r = await validate_inputs(prompt_id, prompt, o_id, validated)
736
+ if r[0] is False:
737
+ # `r` will be set in `validated[o_id]` already
738
+ valid = False
739
+ continue
740
+ except Exception as ex:
741
+ typ, _, tb = sys.exc_info()
742
+ valid = False
743
+ exception_type = full_type_name(typ)
744
+ reasons = [{
745
+ "type": "exception_during_inner_validation",
746
+ "message": "Exception when validating inner node",
747
+ "details": str(ex),
748
+ "extra_info": {
749
+ "input_name": x,
750
+ "input_config": info,
751
+ "exception_message": str(ex),
752
+ "exception_type": exception_type,
753
+ "traceback": traceback.format_tb(tb),
754
+ "linked_node": val
755
+ }
756
+ }]
757
+ validated[o_id] = (False, reasons, o_id)
758
+ continue
759
+ else:
760
+ try:
761
+ # Unwraps values wrapped in __value__ key. This is used to pass
762
+ # list widget value to execution, as by default list value is
763
+ # reserved to represent the connection between nodes.
764
+ if isinstance(val, dict) and "__value__" in val:
765
+ val = val["__value__"]
766
+ inputs[x] = val
767
+
768
+ if input_type == "INT":
769
+ val = int(val)
770
+ inputs[x] = val
771
+ if input_type == "FLOAT":
772
+ val = float(val)
773
+ inputs[x] = val
774
+ if input_type == "STRING":
775
+ val = str(val)
776
+ inputs[x] = val
777
+ if input_type == "BOOLEAN":
778
+ val = bool(val)
779
+ inputs[x] = val
780
+ except Exception as ex:
781
+ error = {
782
+ "type": "invalid_input_type",
783
+ "message": f"Failed to convert an input value to a {input_type} value",
784
+ "details": f"{x}, {val}, {ex}",
785
+ "extra_info": {
786
+ "input_name": x,
787
+ "input_config": info,
788
+ "received_value": val,
789
+ "exception_message": str(ex)
790
+ }
791
+ }
792
+ errors.append(error)
793
+ continue
794
+
795
+ if x not in validate_function_inputs and not validate_has_kwargs:
796
+ if "min" in extra_info and val < extra_info["min"]:
797
+ error = {
798
+ "type": "value_smaller_than_min",
799
+ "message": "Value {} smaller than min of {}".format(val, extra_info["min"]),
800
+ "details": f"{x}",
801
+ "extra_info": {
802
+ "input_name": x,
803
+ "input_config": info,
804
+ "received_value": val,
805
+ }
806
+ }
807
+ errors.append(error)
808
+ continue
809
+ if "max" in extra_info and val > extra_info["max"]:
810
+ error = {
811
+ "type": "value_bigger_than_max",
812
+ "message": "Value {} bigger than max of {}".format(val, extra_info["max"]),
813
+ "details": f"{x}",
814
+ "extra_info": {
815
+ "input_name": x,
816
+ "input_config": info,
817
+ "received_value": val,
818
+ }
819
+ }
820
+ errors.append(error)
821
+ continue
822
+
823
+ if isinstance(input_type, list):
824
+ combo_options = input_type
825
+ if val not in combo_options:
826
+ input_config = info
827
+ list_info = ""
828
+
829
+ # Don't send back gigantic lists like if they're lots of
830
+ # scanned model filepaths
831
+ if len(combo_options) > 20:
832
+ list_info = f"(list of length {len(combo_options)})"
833
+ input_config = None
834
+ else:
835
+ list_info = str(combo_options)
836
+
837
+ error = {
838
+ "type": "value_not_in_list",
839
+ "message": "Value not in list",
840
+ "details": f"{x}: '{val}' not in {list_info}",
841
+ "extra_info": {
842
+ "input_name": x,
843
+ "input_config": input_config,
844
+ "received_value": val,
845
+ }
846
+ }
847
+ errors.append(error)
848
+ continue
849
+
850
+ if len(validate_function_inputs) > 0 or validate_has_kwargs:
851
+ input_data_all, _ = get_input_data(inputs, obj_class, unique_id)
852
+ input_filtered = {}
853
+ for x in input_data_all:
854
+ if x in validate_function_inputs or validate_has_kwargs:
855
+ input_filtered[x] = input_data_all[x]
856
+ if 'input_types' in validate_function_inputs:
857
+ input_filtered['input_types'] = [received_types]
858
+
859
+ #ret = obj_class.VALIDATE_INPUTS(**input_filtered)
860
+ ret = await _async_map_node_over_list(prompt_id, unique_id, obj_class, input_filtered, "VALIDATE_INPUTS")
861
+ ret = await resolve_map_node_over_list_results(ret)
862
+ for x in input_filtered:
863
+ for i, r in enumerate(ret):
864
+ if r is not True and not isinstance(r, ExecutionBlocker):
865
+ details = f"{x}"
866
+ if r is not False:
867
+ details += f" - {str(r)}"
868
+
869
+ error = {
870
+ "type": "custom_validation_failed",
871
+ "message": "Custom validation failed for node",
872
+ "details": details,
873
+ "extra_info": {
874
+ "input_name": x,
875
+ }
876
+ }
877
+ errors.append(error)
878
+ continue
879
+
880
+ if len(errors) > 0 or valid is not True:
881
+ ret = (False, errors, unique_id)
882
+ else:
883
+ ret = (True, [], unique_id)
884
+
885
+ validated[unique_id] = ret
886
+ return ret
887
+
888
+ def full_type_name(klass):
889
+ module = klass.__module__
890
+ if module == 'builtins':
891
+ return klass.__qualname__
892
+ return module + '.' + klass.__qualname__
893
+
894
+ async def validate_prompt(prompt_id, prompt):
895
+ outputs = set()
896
+ for x in prompt:
897
+ if 'class_type' not in prompt[x]:
898
+ error = {
899
+ "type": "invalid_prompt",
900
+ "message": "Cannot execute because a node is missing the class_type property.",
901
+ "details": f"Node ID '#{x}'",
902
+ "extra_info": {}
903
+ }
904
+ return (False, error, [], {})
905
+
906
+ class_type = prompt[x]['class_type']
907
+ class_ = nodes.NODE_CLASS_MAPPINGS.get(class_type, None)
908
+ if class_ is None:
909
+ error = {
910
+ "type": "invalid_prompt",
911
+ "message": f"Cannot execute because node {class_type} does not exist.",
912
+ "details": f"Node ID '#{x}'",
913
+ "extra_info": {}
914
+ }
915
+ return (False, error, [], {})
916
+
917
+ if hasattr(class_, 'OUTPUT_NODE') and class_.OUTPUT_NODE is True:
918
+ outputs.add(x)
919
+
920
+ if len(outputs) == 0:
921
+ error = {
922
+ "type": "prompt_no_outputs",
923
+ "message": "Prompt has no outputs",
924
+ "details": "",
925
+ "extra_info": {}
926
+ }
927
+ return (False, error, [], {})
928
+
929
+ good_outputs = set()
930
+ errors = []
931
+ node_errors = {}
932
+ validated = {}
933
+ for o in outputs:
934
+ valid = False
935
+ reasons = []
936
+ try:
937
+ m = await validate_inputs(prompt_id, prompt, o, validated)
938
+ valid = m[0]
939
+ reasons = m[1]
940
+ except Exception as ex:
941
+ typ, _, tb = sys.exc_info()
942
+ valid = False
943
+ exception_type = full_type_name(typ)
944
+ reasons = [{
945
+ "type": "exception_during_validation",
946
+ "message": "Exception when validating node",
947
+ "details": str(ex),
948
+ "extra_info": {
949
+ "exception_type": exception_type,
950
+ "traceback": traceback.format_tb(tb)
951
+ }
952
+ }]
953
+ validated[o] = (False, reasons, o)
954
+
955
+ if valid is True:
956
+ good_outputs.add(o)
957
+ else:
958
+ logging.error(f"Failed to validate prompt for output {o}:")
959
+ if len(reasons) > 0:
960
+ logging.error("* (prompt):")
961
+ for reason in reasons:
962
+ logging.error(f" - {reason['message']}: {reason['details']}")
963
+ errors += [(o, reasons)]
964
+ for node_id, result in validated.items():
965
+ valid = result[0]
966
+ reasons = result[1]
967
+ # If a node upstream has errors, the nodes downstream will also
968
+ # be reported as invalid, but there will be no errors attached.
969
+ # So don't return those nodes as having errors in the response.
970
+ if valid is not True and len(reasons) > 0:
971
+ if node_id not in node_errors:
972
+ class_type = prompt[node_id]['class_type']
973
+ node_errors[node_id] = {
974
+ "errors": reasons,
975
+ "dependent_outputs": [],
976
+ "class_type": class_type
977
+ }
978
+ logging.error(f"* {class_type} {node_id}:")
979
+ for reason in reasons:
980
+ logging.error(f" - {reason['message']}: {reason['details']}")
981
+ node_errors[node_id]["dependent_outputs"].append(o)
982
+ logging.error("Output will be ignored")
983
+
984
+ if len(good_outputs) == 0:
985
+ errors_list = []
986
+ for o, errors in errors:
987
+ for error in errors:
988
+ errors_list.append(f"{error['message']}: {error['details']}")
989
+ errors_list = "\n".join(errors_list)
990
+
991
+ error = {
992
+ "type": "prompt_outputs_failed_validation",
993
+ "message": "Prompt outputs failed validation",
994
+ "details": errors_list,
995
+ "extra_info": {}
996
+ }
997
+
998
+ return (False, error, list(good_outputs), node_errors)
999
+
1000
+ return (True, None, list(good_outputs), node_errors)
1001
+
1002
+ MAXIMUM_HISTORY_SIZE = 10000
1003
+
1004
+ class PromptQueue:
1005
+ def __init__(self, server):
1006
+ self.server = server
1007
+ self.mutex = threading.RLock()
1008
+ self.not_empty = threading.Condition(self.mutex)
1009
+ self.task_counter = 0
1010
+ self.queue = []
1011
+ self.currently_running = {}
1012
+ self.history = {}
1013
+ self.flags = {}
1014
+
1015
+ def put(self, item):
1016
+ with self.mutex:
1017
+ heapq.heappush(self.queue, item)
1018
+ self.server.queue_updated()
1019
+ self.not_empty.notify()
1020
+
1021
+ def get(self, timeout=None):
1022
+ with self.not_empty:
1023
+ while len(self.queue) == 0:
1024
+ self.not_empty.wait(timeout=timeout)
1025
+ if timeout is not None and len(self.queue) == 0:
1026
+ return None
1027
+ item = heapq.heappop(self.queue)
1028
+ i = self.task_counter
1029
+ self.currently_running[i] = copy.deepcopy(item)
1030
+ self.task_counter += 1
1031
+ self.server.queue_updated()
1032
+ return (item, i)
1033
+
1034
+ class ExecutionStatus(NamedTuple):
1035
+ status_str: Literal['success', 'error']
1036
+ completed: bool
1037
+ messages: List[str]
1038
+
1039
+ def task_done(self, item_id, history_result,
1040
+ status: Optional['PromptQueue.ExecutionStatus']):
1041
+ with self.mutex:
1042
+ prompt = self.currently_running.pop(item_id)
1043
+ if len(self.history) > MAXIMUM_HISTORY_SIZE:
1044
+ self.history.pop(next(iter(self.history)))
1045
+
1046
+ status_dict: Optional[dict] = None
1047
+ if status is not None:
1048
+ status_dict = copy.deepcopy(status._asdict())
1049
+
1050
+ # Remove sensitive data from extra_data before storing in history
1051
+ for sensitive_val in SENSITIVE_EXTRA_DATA_KEYS:
1052
+ if sensitive_val in prompt[3]:
1053
+ prompt[3].pop(sensitive_val)
1054
+
1055
+ self.history[prompt[1]] = {
1056
+ "prompt": prompt,
1057
+ "outputs": {},
1058
+ 'status': status_dict,
1059
+ }
1060
+ self.history[prompt[1]].update(history_result)
1061
+ self.server.queue_updated()
1062
+
1063
+ # Note: slow
1064
+ def get_current_queue(self):
1065
+ with self.mutex:
1066
+ out = []
1067
+ for x in self.currently_running.values():
1068
+ out += [x]
1069
+ return (out, copy.deepcopy(self.queue))
1070
+
1071
+ # read-safe as long as queue items are immutable
1072
+ def get_current_queue_volatile(self):
1073
+ with self.mutex:
1074
+ running = [x for x in self.currently_running.values()]
1075
+ queued = copy.copy(self.queue)
1076
+ return (running, queued)
1077
+
1078
+ def get_tasks_remaining(self):
1079
+ with self.mutex:
1080
+ return len(self.queue) + len(self.currently_running)
1081
+
1082
+ def wipe_queue(self):
1083
+ with self.mutex:
1084
+ self.queue = []
1085
+ self.server.queue_updated()
1086
+
1087
+ def delete_queue_item(self, function):
1088
+ with self.mutex:
1089
+ for x in range(len(self.queue)):
1090
+ if function(self.queue[x]):
1091
+ if len(self.queue) == 1:
1092
+ self.wipe_queue()
1093
+ else:
1094
+ self.queue.pop(x)
1095
+ heapq.heapify(self.queue)
1096
+ self.server.queue_updated()
1097
+ return True
1098
+ return False
1099
+
1100
+ def get_history(self, prompt_id=None, max_items=None, offset=-1, map_function=None):
1101
+ with self.mutex:
1102
+ if prompt_id is None:
1103
+ out = {}
1104
+ i = 0
1105
+ if offset < 0 and max_items is not None:
1106
+ offset = len(self.history) - max_items
1107
+ for k in self.history:
1108
+ if i >= offset:
1109
+ p = self.history[k]
1110
+ if map_function is not None:
1111
+ p = map_function(p)
1112
+ out[k] = p
1113
+ if max_items is not None and len(out) >= max_items:
1114
+ break
1115
+ i += 1
1116
+ return out
1117
+ elif prompt_id in self.history:
1118
+ p = self.history[prompt_id]
1119
+ if map_function is None:
1120
+ p = copy.deepcopy(p)
1121
+ else:
1122
+ p = map_function(p)
1123
+ return {prompt_id: p}
1124
+ else:
1125
+ return {}
1126
+
1127
+ def wipe_history(self):
1128
+ with self.mutex:
1129
+ self.history = {}
1130
+
1131
+ def delete_history_item(self, id_to_delete):
1132
+ with self.mutex:
1133
+ self.history.pop(id_to_delete, None)
1134
+
1135
+ def set_flag(self, name, data):
1136
+ with self.mutex:
1137
+ self.flags[name] = data
1138
+ self.not_empty.notify()
1139
+
1140
+ def get_flags(self, reset=True):
1141
+ with self.mutex:
1142
+ if reset:
1143
+ ret = self.flags
1144
+ self.flags = {}
1145
+ return ret
1146
+ else:
1147
+ return self.flags.copy()
ComfyUI/extra_model_paths.yaml.example ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #Rename this to extra_model_paths.yaml and ComfyUI will load it
2
+
3
+
4
+ #config for a1111 ui
5
+ #all you have to do is change the base_path to where yours is installed
6
+ a111:
7
+ base_path: path/to/stable-diffusion-webui/
8
+
9
+ checkpoints: models/Stable-diffusion
10
+ configs: models/Stable-diffusion
11
+ vae: models/VAE
12
+ loras: |
13
+ models/Lora
14
+ models/LyCORIS
15
+ upscale_models: |
16
+ models/ESRGAN
17
+ models/RealESRGAN
18
+ models/SwinIR
19
+ embeddings: embeddings
20
+ hypernetworks: models/hypernetworks
21
+ controlnet: models/ControlNet
22
+
23
+ #config for comfyui
24
+ #your base path should be either an existing comfy install or a central folder where you store all of your models, loras, etc.
25
+
26
+ #comfyui:
27
+ # base_path: path/to/comfyui/
28
+ # # You can use is_default to mark that these folders should be listed first, and used as the default dirs for eg downloads
29
+ # #is_default: true
30
+ # checkpoints: models/checkpoints/
31
+ # clip: models/clip/
32
+ # clip_vision: models/clip_vision/
33
+ # configs: models/configs/
34
+ # controlnet: models/controlnet/
35
+ # diffusion_models: |
36
+ # models/diffusion_models
37
+ # models/unet
38
+ # embeddings: models/embeddings/
39
+ # loras: models/loras/
40
+ # upscale_models: models/upscale_models/
41
+ # vae: models/vae/
42
+
43
+ #other_ui:
44
+ # base_path: path/to/ui
45
+ # checkpoints: models/checkpoints
46
+ # gligen: models/gligen
47
+ # custom_nodes: path/custom_nodes
ComfyUI/folder_paths.py ADDED
@@ -0,0 +1,425 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import annotations
2
+
3
+ import os
4
+ import time
5
+ import mimetypes
6
+ import logging
7
+ from typing import Literal, List
8
+ from collections.abc import Collection
9
+
10
+ from comfy.cli_args import args
11
+
12
+ supported_pt_extensions: set[str] = {'.ckpt', '.pt', '.pt2', '.bin', '.pth', '.safetensors', '.pkl', '.sft'}
13
+
14
+ folder_names_and_paths: dict[str, tuple[list[str], set[str]]] = {}
15
+
16
+ # --base-directory - Resets all default paths configured in folder_paths with a new base path
17
+ if args.base_directory:
18
+ base_path = os.path.abspath(args.base_directory)
19
+ else:
20
+ base_path = os.path.dirname(os.path.realpath(__file__))
21
+
22
+ models_dir = os.path.join(base_path, "models")
23
+ folder_names_and_paths["checkpoints"] = ([os.path.join(models_dir, "checkpoints")], supported_pt_extensions)
24
+ folder_names_and_paths["configs"] = ([os.path.join(models_dir, "configs")], [".yaml"])
25
+
26
+ folder_names_and_paths["loras"] = ([os.path.join(models_dir, "loras")], supported_pt_extensions)
27
+ folder_names_and_paths["vae"] = ([os.path.join(models_dir, "vae")], supported_pt_extensions)
28
+ folder_names_and_paths["text_encoders"] = ([os.path.join(models_dir, "text_encoders"), os.path.join(models_dir, "clip")], supported_pt_extensions)
29
+ folder_names_and_paths["diffusion_models"] = ([os.path.join(models_dir, "unet"), os.path.join(models_dir, "diffusion_models")], supported_pt_extensions)
30
+ folder_names_and_paths["clip_vision"] = ([os.path.join(models_dir, "clip_vision")], supported_pt_extensions)
31
+ folder_names_and_paths["style_models"] = ([os.path.join(models_dir, "style_models")], supported_pt_extensions)
32
+ folder_names_and_paths["embeddings"] = ([os.path.join(models_dir, "embeddings")], supported_pt_extensions)
33
+ folder_names_and_paths["diffusers"] = ([os.path.join(models_dir, "diffusers")], ["folder"])
34
+ folder_names_and_paths["vae_approx"] = ([os.path.join(models_dir, "vae_approx")], supported_pt_extensions)
35
+
36
+ folder_names_and_paths["controlnet"] = ([os.path.join(models_dir, "controlnet"), os.path.join(models_dir, "t2i_adapter")], supported_pt_extensions)
37
+ folder_names_and_paths["gligen"] = ([os.path.join(models_dir, "gligen")], supported_pt_extensions)
38
+
39
+ folder_names_and_paths["upscale_models"] = ([os.path.join(models_dir, "upscale_models")], supported_pt_extensions)
40
+
41
+ folder_names_and_paths["custom_nodes"] = ([os.path.join(base_path, "custom_nodes")], set())
42
+
43
+ folder_names_and_paths["hypernetworks"] = ([os.path.join(models_dir, "hypernetworks")], supported_pt_extensions)
44
+
45
+ folder_names_and_paths["photomaker"] = ([os.path.join(models_dir, "photomaker")], supported_pt_extensions)
46
+
47
+ folder_names_and_paths["classifiers"] = ([os.path.join(models_dir, "classifiers")], {""})
48
+
49
+ output_directory = os.path.join(base_path, "output")
50
+ temp_directory = os.path.join(base_path, "temp")
51
+ input_directory = os.path.join(base_path, "input")
52
+ user_directory = os.path.join(base_path, "user")
53
+
54
+ filename_list_cache: dict[str, tuple[list[str], dict[str, float], float]] = {}
55
+
56
+ class CacheHelper:
57
+ """
58
+ Helper class for managing file list cache data.
59
+ """
60
+ def __init__(self):
61
+ self.cache: dict[str, tuple[list[str], dict[str, float], float]] = {}
62
+ self.active = False
63
+
64
+ def get(self, key: str, default=None) -> tuple[list[str], dict[str, float], float]:
65
+ if not self.active:
66
+ return default
67
+ return self.cache.get(key, default)
68
+
69
+ def set(self, key: str, value: tuple[list[str], dict[str, float], float]) -> None:
70
+ if self.active:
71
+ self.cache[key] = value
72
+
73
+ def clear(self):
74
+ self.cache.clear()
75
+
76
+ def __enter__(self):
77
+ self.active = True
78
+ return self
79
+
80
+ def __exit__(self, exc_type, exc_value, traceback):
81
+ self.active = False
82
+ self.clear()
83
+
84
+ cache_helper = CacheHelper()
85
+
86
+ extension_mimetypes_cache = {
87
+ "webp" : "image",
88
+ "fbx" : "model",
89
+ }
90
+
91
+ def map_legacy(folder_name: str) -> str:
92
+ legacy = {"unet": "diffusion_models",
93
+ "clip": "text_encoders"}
94
+ return legacy.get(folder_name, folder_name)
95
+
96
+ if not os.path.exists(input_directory):
97
+ try:
98
+ os.makedirs(input_directory)
99
+ except:
100
+ logging.error("Failed to create input directory")
101
+
102
+ def set_output_directory(output_dir: str) -> None:
103
+ global output_directory
104
+ output_directory = output_dir
105
+
106
+ def set_temp_directory(temp_dir: str) -> None:
107
+ global temp_directory
108
+ temp_directory = temp_dir
109
+
110
+ def set_input_directory(input_dir: str) -> None:
111
+ global input_directory
112
+ input_directory = input_dir
113
+
114
+ def get_output_directory() -> str:
115
+ global output_directory
116
+ return output_directory
117
+
118
+ def get_temp_directory() -> str:
119
+ global temp_directory
120
+ return temp_directory
121
+
122
+ def get_input_directory() -> str:
123
+ global input_directory
124
+ return input_directory
125
+
126
+ def get_user_directory() -> str:
127
+ return user_directory
128
+
129
+ def set_user_directory(user_dir: str) -> None:
130
+ global user_directory
131
+ user_directory = user_dir
132
+
133
+
134
+ #NOTE: used in http server so don't put folders that should not be accessed remotely
135
+ def get_directory_by_type(type_name: str) -> str | None:
136
+ if type_name == "output":
137
+ return get_output_directory()
138
+ if type_name == "temp":
139
+ return get_temp_directory()
140
+ if type_name == "input":
141
+ return get_input_directory()
142
+ return None
143
+
144
+ def filter_files_content_types(files: list[str], content_types: List[Literal["image", "video", "audio", "model"]]) -> list[str]:
145
+ """
146
+ Example:
147
+ files = os.listdir(folder_paths.get_input_directory())
148
+ videos = filter_files_content_types(files, ["video"])
149
+
150
+ Note:
151
+ - 'model' in MIME context refers to 3D models, not files containing trained weights and parameters
152
+ """
153
+ global extension_mimetypes_cache
154
+ result = []
155
+ for file in files:
156
+ extension = file.split('.')[-1]
157
+ if extension not in extension_mimetypes_cache:
158
+ mime_type, _ = mimetypes.guess_type(file, strict=False)
159
+ if not mime_type:
160
+ continue
161
+ content_type = mime_type.split('/')[0]
162
+ extension_mimetypes_cache[extension] = content_type
163
+ else:
164
+ content_type = extension_mimetypes_cache[extension]
165
+
166
+ if content_type in content_types:
167
+ result.append(file)
168
+ return result
169
+
170
+ # determine base_dir rely on annotation if name is 'filename.ext [annotation]' format
171
+ # otherwise use default_path as base_dir
172
+ def annotated_filepath(name: str) -> tuple[str, str | None]:
173
+ if name.endswith("[output]"):
174
+ base_dir = get_output_directory()
175
+ name = name[:-9]
176
+ elif name.endswith("[input]"):
177
+ base_dir = get_input_directory()
178
+ name = name[:-8]
179
+ elif name.endswith("[temp]"):
180
+ base_dir = get_temp_directory()
181
+ name = name[:-7]
182
+ else:
183
+ return name, None
184
+
185
+ return name, base_dir
186
+
187
+
188
+ def get_annotated_filepath(name: str, default_dir: str | None=None) -> str:
189
+ name, base_dir = annotated_filepath(name)
190
+
191
+ if base_dir is None:
192
+ if default_dir is not None:
193
+ base_dir = default_dir
194
+ else:
195
+ base_dir = get_input_directory() # fallback path
196
+
197
+ return os.path.join(base_dir, name)
198
+
199
+
200
+ def exists_annotated_filepath(name) -> bool:
201
+ name, base_dir = annotated_filepath(name)
202
+
203
+ if base_dir is None:
204
+ base_dir = get_input_directory() # fallback path
205
+
206
+ filepath = os.path.join(base_dir, name)
207
+ return os.path.exists(filepath)
208
+
209
+
210
+ def add_model_folder_path(folder_name: str, full_folder_path: str, is_default: bool = False) -> None:
211
+ global folder_names_and_paths
212
+ folder_name = map_legacy(folder_name)
213
+ if folder_name in folder_names_and_paths:
214
+ paths, _exts = folder_names_and_paths[folder_name]
215
+ if full_folder_path in paths:
216
+ if is_default and paths[0] != full_folder_path:
217
+ # If the path to the folder is not the first in the list, move it to the beginning.
218
+ paths.remove(full_folder_path)
219
+ paths.insert(0, full_folder_path)
220
+ else:
221
+ if is_default:
222
+ paths.insert(0, full_folder_path)
223
+ else:
224
+ paths.append(full_folder_path)
225
+ else:
226
+ folder_names_and_paths[folder_name] = ([full_folder_path], set())
227
+
228
+ def get_folder_paths(folder_name: str) -> list[str]:
229
+ folder_name = map_legacy(folder_name)
230
+ return folder_names_and_paths[folder_name][0][:]
231
+
232
+ def recursive_search(directory: str, excluded_dir_names: list[str] | None=None) -> tuple[list[str], dict[str, float]]:
233
+ if not os.path.isdir(directory):
234
+ return [], {}
235
+
236
+ if excluded_dir_names is None:
237
+ excluded_dir_names = []
238
+
239
+ result = []
240
+ dirs = {}
241
+
242
+ # Attempt to add the initial directory to dirs with error handling
243
+ try:
244
+ dirs[directory] = os.path.getmtime(directory)
245
+ except FileNotFoundError:
246
+ logging.warning(f"Warning: Unable to access {directory}. Skipping this path.")
247
+
248
+ logging.debug("recursive file list on directory {}".format(directory))
249
+ dirpath: str
250
+ subdirs: list[str]
251
+ filenames: list[str]
252
+
253
+ for dirpath, subdirs, filenames in os.walk(directory, followlinks=True, topdown=True):
254
+ subdirs[:] = [d for d in subdirs if d not in excluded_dir_names]
255
+ for file_name in filenames:
256
+ try:
257
+ relative_path = os.path.relpath(os.path.join(dirpath, file_name), directory)
258
+ result.append(relative_path)
259
+ except:
260
+ logging.warning(f"Warning: Unable to access {file_name}. Skipping this file.")
261
+ continue
262
+
263
+ for d in subdirs:
264
+ path: str = os.path.join(dirpath, d)
265
+ try:
266
+ dirs[path] = os.path.getmtime(path)
267
+ except FileNotFoundError:
268
+ logging.warning(f"Warning: Unable to access {path}. Skipping this path.")
269
+ continue
270
+ logging.debug("found {} files".format(len(result)))
271
+ return result, dirs
272
+
273
+ def filter_files_extensions(files: Collection[str], extensions: Collection[str]) -> list[str]:
274
+ return sorted(list(filter(lambda a: os.path.splitext(a)[-1].lower() in extensions or len(extensions) == 0, files)))
275
+
276
+
277
+
278
+ def get_full_path(folder_name: str, filename: str) -> str | None:
279
+ """
280
+ Get the full path of a file in a folder, has to be a file
281
+ """
282
+ global folder_names_and_paths
283
+ folder_name = map_legacy(folder_name)
284
+ if folder_name not in folder_names_and_paths:
285
+ return None
286
+ folders = folder_names_and_paths[folder_name]
287
+ filename = os.path.relpath(os.path.join("/", filename), "/")
288
+ for x in folders[0]:
289
+ full_path = os.path.join(x, filename)
290
+ if os.path.isfile(full_path):
291
+ return full_path
292
+ elif os.path.islink(full_path):
293
+ logging.warning("WARNING path {} exists but doesn't link anywhere, skipping.".format(full_path))
294
+
295
+ return None
296
+
297
+
298
+ def get_full_path_or_raise(folder_name: str, filename: str) -> str:
299
+ """
300
+ Get the full path of a file in a folder, has to be a file
301
+ """
302
+ full_path = get_full_path(folder_name, filename)
303
+ if full_path is None:
304
+ raise FileNotFoundError(f"Model in folder '{folder_name}' with filename '{filename}' not found.")
305
+ return full_path
306
+
307
+
308
+ def get_filename_list_(folder_name: str) -> tuple[list[str], dict[str, float], float]:
309
+ folder_name = map_legacy(folder_name)
310
+ global folder_names_and_paths
311
+ output_list = set()
312
+ folders = folder_names_and_paths[folder_name]
313
+ output_folders = {}
314
+ for x in folders[0]:
315
+ files, folders_all = recursive_search(x, excluded_dir_names=[".git"])
316
+ output_list.update(filter_files_extensions(files, folders[1]))
317
+ output_folders = {**output_folders, **folders_all}
318
+
319
+ return sorted(list(output_list)), output_folders, time.perf_counter()
320
+
321
+ def cached_filename_list_(folder_name: str) -> tuple[list[str], dict[str, float], float] | None:
322
+ strong_cache = cache_helper.get(folder_name)
323
+ if strong_cache is not None:
324
+ return strong_cache
325
+
326
+ global filename_list_cache
327
+ global folder_names_and_paths
328
+ folder_name = map_legacy(folder_name)
329
+ if folder_name not in filename_list_cache:
330
+ return None
331
+ out = filename_list_cache[folder_name]
332
+
333
+ for x in out[1]:
334
+ time_modified = out[1][x]
335
+ folder = x
336
+ if os.path.getmtime(folder) != time_modified:
337
+ return None
338
+
339
+ folders = folder_names_and_paths[folder_name]
340
+ for x in folders[0]:
341
+ if os.path.isdir(x):
342
+ if x not in out[1]:
343
+ return None
344
+
345
+ return out
346
+
347
+ def get_filename_list(folder_name: str) -> list[str]:
348
+ folder_name = map_legacy(folder_name)
349
+ out = cached_filename_list_(folder_name)
350
+ if out is None:
351
+ out = get_filename_list_(folder_name)
352
+ global filename_list_cache
353
+ filename_list_cache[folder_name] = out
354
+ cache_helper.set(folder_name, out)
355
+ return list(out[0])
356
+
357
+ def get_save_image_path(filename_prefix: str, output_dir: str, image_width=0, image_height=0) -> tuple[str, str, int, str, str]:
358
+ def map_filename(filename: str) -> tuple[int, str]:
359
+ prefix_len = len(os.path.basename(filename_prefix))
360
+ prefix = filename[:prefix_len + 1]
361
+ try:
362
+ digits = int(filename[prefix_len + 1:].split('_')[0])
363
+ except:
364
+ digits = 0
365
+ return digits, prefix
366
+
367
+ def compute_vars(input: str, image_width: int, image_height: int) -> str:
368
+ input = input.replace("%width%", str(image_width))
369
+ input = input.replace("%height%", str(image_height))
370
+ now = time.localtime()
371
+ input = input.replace("%year%", str(now.tm_year))
372
+ input = input.replace("%month%", str(now.tm_mon).zfill(2))
373
+ input = input.replace("%day%", str(now.tm_mday).zfill(2))
374
+ input = input.replace("%hour%", str(now.tm_hour).zfill(2))
375
+ input = input.replace("%minute%", str(now.tm_min).zfill(2))
376
+ input = input.replace("%second%", str(now.tm_sec).zfill(2))
377
+ return input
378
+
379
+ if "%" in filename_prefix:
380
+ filename_prefix = compute_vars(filename_prefix, image_width, image_height)
381
+
382
+ subfolder = os.path.dirname(os.path.normpath(filename_prefix))
383
+ filename = os.path.basename(os.path.normpath(filename_prefix))
384
+
385
+ full_output_folder = os.path.join(output_dir, subfolder)
386
+
387
+ if os.path.commonpath((output_dir, os.path.abspath(full_output_folder))) != output_dir:
388
+ err = "**** ERROR: Saving image outside the output folder is not allowed." + \
389
+ "\n full_output_folder: " + os.path.abspath(full_output_folder) + \
390
+ "\n output_dir: " + output_dir + \
391
+ "\n commonpath: " + os.path.commonpath((output_dir, os.path.abspath(full_output_folder)))
392
+ logging.error(err)
393
+ raise Exception(err)
394
+
395
+ try:
396
+ counter = max(filter(lambda a: os.path.normcase(a[1][:-1]) == os.path.normcase(filename) and a[1][-1] == "_", map(map_filename, os.listdir(full_output_folder))))[0] + 1
397
+ except ValueError:
398
+ counter = 1
399
+ except FileNotFoundError:
400
+ os.makedirs(full_output_folder, exist_ok=True)
401
+ counter = 1
402
+ return full_output_folder, filename, counter, subfolder, filename_prefix
403
+
404
+ def get_input_subfolders() -> list[str]:
405
+ """Returns a list of all subfolder paths in the input directory, recursively.
406
+
407
+ Returns:
408
+ List of folder paths relative to the input directory, excluding the root directory
409
+ """
410
+ input_dir = get_input_directory()
411
+ folders = []
412
+
413
+ try:
414
+ if not os.path.exists(input_dir):
415
+ return []
416
+
417
+ for root, dirs, _ in os.walk(input_dir):
418
+ rel_path = os.path.relpath(root, input_dir)
419
+ if rel_path != ".": # Only include non-root directories
420
+ # Normalize path separators to forward slashes
421
+ folders.append(rel_path.replace(os.sep, '/'))
422
+
423
+ return sorted(folders)
424
+ except FileNotFoundError:
425
+ return []
ComfyUI/hook_breaker_ac10a0.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Prevent custom nodes from hooking anything important
2
+ import comfy.model_management
3
+
4
+ HOOK_BREAK = [(comfy.model_management, "cast_to")]
5
+
6
+
7
+ SAVED_FUNCTIONS = []
8
+
9
+
10
+ def save_functions():
11
+ for f in HOOK_BREAK:
12
+ SAVED_FUNCTIONS.append((f[0], f[1], getattr(f[0], f[1])))
13
+
14
+
15
+ def restore_functions():
16
+ for f in SAVED_FUNCTIONS:
17
+ setattr(f[0], f[1], f[2])
ComfyUI/latent_preview.py ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import torch
2
+ from PIL import Image
3
+ from comfy.cli_args import args, LatentPreviewMethod
4
+ from comfy.taesd.taesd import TAESD
5
+ import comfy.model_management
6
+ import folder_paths
7
+ import comfy.utils
8
+ import logging
9
+
10
+ MAX_PREVIEW_RESOLUTION = args.preview_size
11
+
12
+ def preview_to_image(latent_image):
13
+ latents_ubyte = (((latent_image + 1.0) / 2.0).clamp(0, 1) # change scale from -1..1 to 0..1
14
+ .mul(0xFF) # to 0..255
15
+ )
16
+ if comfy.model_management.directml_enabled:
17
+ latents_ubyte = latents_ubyte.to(dtype=torch.uint8)
18
+ latents_ubyte = latents_ubyte.to(device="cpu", dtype=torch.uint8, non_blocking=comfy.model_management.device_supports_non_blocking(latent_image.device))
19
+
20
+ return Image.fromarray(latents_ubyte.numpy())
21
+
22
+ class LatentPreviewer:
23
+ def decode_latent_to_preview(self, x0):
24
+ pass
25
+
26
+ def decode_latent_to_preview_image(self, preview_format, x0):
27
+ preview_image = self.decode_latent_to_preview(x0)
28
+ return ("JPEG", preview_image, MAX_PREVIEW_RESOLUTION)
29
+
30
+ class TAESDPreviewerImpl(LatentPreviewer):
31
+ def __init__(self, taesd):
32
+ self.taesd = taesd
33
+
34
+ def decode_latent_to_preview(self, x0):
35
+ x_sample = self.taesd.decode(x0[:1])[0].movedim(0, 2)
36
+ return preview_to_image(x_sample)
37
+
38
+
39
+ class Latent2RGBPreviewer(LatentPreviewer):
40
+ def __init__(self, latent_rgb_factors, latent_rgb_factors_bias=None):
41
+ self.latent_rgb_factors = torch.tensor(latent_rgb_factors, device="cpu").transpose(0, 1)
42
+ self.latent_rgb_factors_bias = None
43
+ if latent_rgb_factors_bias is not None:
44
+ self.latent_rgb_factors_bias = torch.tensor(latent_rgb_factors_bias, device="cpu")
45
+
46
+ def decode_latent_to_preview(self, x0):
47
+ self.latent_rgb_factors = self.latent_rgb_factors.to(dtype=x0.dtype, device=x0.device)
48
+ if self.latent_rgb_factors_bias is not None:
49
+ self.latent_rgb_factors_bias = self.latent_rgb_factors_bias.to(dtype=x0.dtype, device=x0.device)
50
+
51
+ if x0.ndim == 5:
52
+ x0 = x0[0, :, 0]
53
+ else:
54
+ x0 = x0[0]
55
+
56
+ latent_image = torch.nn.functional.linear(x0.movedim(0, -1), self.latent_rgb_factors, bias=self.latent_rgb_factors_bias)
57
+ # latent_image = x0[0].permute(1, 2, 0) @ self.latent_rgb_factors
58
+
59
+ return preview_to_image(latent_image)
60
+
61
+
62
+ def get_previewer(device, latent_format):
63
+ previewer = None
64
+ method = args.preview_method
65
+ if method != LatentPreviewMethod.NoPreviews:
66
+ # TODO previewer methods
67
+ taesd_decoder_path = None
68
+ if latent_format.taesd_decoder_name is not None:
69
+ taesd_decoder_path = next(
70
+ (fn for fn in folder_paths.get_filename_list("vae_approx")
71
+ if fn.startswith(latent_format.taesd_decoder_name)),
72
+ ""
73
+ )
74
+ taesd_decoder_path = folder_paths.get_full_path("vae_approx", taesd_decoder_path)
75
+
76
+ if method == LatentPreviewMethod.Auto:
77
+ method = LatentPreviewMethod.Latent2RGB
78
+
79
+ if method == LatentPreviewMethod.TAESD:
80
+ if taesd_decoder_path:
81
+ taesd = TAESD(None, taesd_decoder_path, latent_channels=latent_format.latent_channels).to(device)
82
+ previewer = TAESDPreviewerImpl(taesd)
83
+ else:
84
+ logging.warning("Warning: TAESD previews enabled, but could not find models/vae_approx/{}".format(latent_format.taesd_decoder_name))
85
+
86
+ if previewer is None:
87
+ if latent_format.latent_rgb_factors is not None:
88
+ previewer = Latent2RGBPreviewer(latent_format.latent_rgb_factors, latent_format.latent_rgb_factors_bias)
89
+ return previewer
90
+
91
+ def prepare_callback(model, steps, x0_output_dict=None):
92
+ preview_format = "JPEG"
93
+ if preview_format not in ["JPEG", "PNG"]:
94
+ preview_format = "JPEG"
95
+
96
+ previewer = get_previewer(model.load_device, model.model.latent_format)
97
+
98
+ pbar = comfy.utils.ProgressBar(steps)
99
+ def callback(step, x0, x, total_steps):
100
+ if x0_output_dict is not None:
101
+ x0_output_dict["x0"] = x0
102
+
103
+ preview_bytes = None
104
+ if previewer:
105
+ preview_bytes = previewer.decode_latent_to_preview_image(preview_format, x0)
106
+ pbar.update_absolute(step + 1, total_steps, preview_bytes)
107
+ return callback
108
+
ComfyUI/main.py ADDED
@@ -0,0 +1,369 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import comfy.options
2
+ comfy.options.enable_args_parsing()
3
+
4
+ import os
5
+ import importlib.util
6
+ import folder_paths
7
+ import time
8
+ from comfy.cli_args import args
9
+ from app.logger import setup_logger
10
+ import itertools
11
+ import utils.extra_config
12
+ import logging
13
+ import sys
14
+ from comfy_execution.progress import get_progress_state
15
+ from comfy_execution.utils import get_executing_context
16
+ from comfy_api import feature_flags
17
+
18
+ if __name__ == "__main__":
19
+ #NOTE: These do not do anything on core ComfyUI, they are for custom nodes.
20
+ os.environ['HF_HUB_DISABLE_TELEMETRY'] = '1'
21
+ os.environ['DO_NOT_TRACK'] = '1'
22
+
23
+ setup_logger(log_level=args.verbose, use_stdout=args.log_stdout)
24
+
25
+ def apply_custom_paths():
26
+ # extra model paths
27
+ extra_model_paths_config_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "extra_model_paths.yaml")
28
+ if os.path.isfile(extra_model_paths_config_path):
29
+ utils.extra_config.load_extra_path_config(extra_model_paths_config_path)
30
+
31
+ if args.extra_model_paths_config:
32
+ for config_path in itertools.chain(*args.extra_model_paths_config):
33
+ utils.extra_config.load_extra_path_config(config_path)
34
+
35
+ # --output-directory, --input-directory, --user-directory
36
+ if args.output_directory:
37
+ output_dir = os.path.abspath(args.output_directory)
38
+ logging.info(f"Setting output directory to: {output_dir}")
39
+ folder_paths.set_output_directory(output_dir)
40
+
41
+ # These are the default folders that checkpoints, clip and vae models will be saved to when using CheckpointSave, etc.. nodes
42
+ folder_paths.add_model_folder_path("checkpoints", os.path.join(folder_paths.get_output_directory(), "checkpoints"))
43
+ folder_paths.add_model_folder_path("clip", os.path.join(folder_paths.get_output_directory(), "clip"))
44
+ folder_paths.add_model_folder_path("vae", os.path.join(folder_paths.get_output_directory(), "vae"))
45
+ folder_paths.add_model_folder_path("diffusion_models",
46
+ os.path.join(folder_paths.get_output_directory(), "diffusion_models"))
47
+ folder_paths.add_model_folder_path("loras", os.path.join(folder_paths.get_output_directory(), "loras"))
48
+
49
+ if args.input_directory:
50
+ input_dir = os.path.abspath(args.input_directory)
51
+ logging.info(f"Setting input directory to: {input_dir}")
52
+ folder_paths.set_input_directory(input_dir)
53
+
54
+ if args.user_directory:
55
+ user_dir = os.path.abspath(args.user_directory)
56
+ logging.info(f"Setting user directory to: {user_dir}")
57
+ folder_paths.set_user_directory(user_dir)
58
+
59
+
60
+ def execute_prestartup_script():
61
+ if args.disable_all_custom_nodes and len(args.whitelist_custom_nodes) == 0:
62
+ return
63
+
64
+ def execute_script(script_path):
65
+ module_name = os.path.splitext(script_path)[0]
66
+ try:
67
+ spec = importlib.util.spec_from_file_location(module_name, script_path)
68
+ module = importlib.util.module_from_spec(spec)
69
+ spec.loader.exec_module(module)
70
+ return True
71
+ except Exception as e:
72
+ logging.error(f"Failed to execute startup-script: {script_path} / {e}")
73
+ return False
74
+
75
+ node_paths = folder_paths.get_folder_paths("custom_nodes")
76
+ for custom_node_path in node_paths:
77
+ possible_modules = os.listdir(custom_node_path)
78
+ node_prestartup_times = []
79
+
80
+ for possible_module in possible_modules:
81
+ module_path = os.path.join(custom_node_path, possible_module)
82
+ if os.path.isfile(module_path) or module_path.endswith(".disabled") or module_path == "__pycache__":
83
+ continue
84
+
85
+ script_path = os.path.join(module_path, "prestartup_script.py")
86
+ if os.path.exists(script_path):
87
+ if args.disable_all_custom_nodes and possible_module not in args.whitelist_custom_nodes:
88
+ logging.info(f"Prestartup Skipping {possible_module} due to disable_all_custom_nodes and whitelist_custom_nodes")
89
+ continue
90
+ time_before = time.perf_counter()
91
+ success = execute_script(script_path)
92
+ node_prestartup_times.append((time.perf_counter() - time_before, module_path, success))
93
+ if len(node_prestartup_times) > 0:
94
+ logging.info("\nPrestartup times for custom nodes:")
95
+ for n in sorted(node_prestartup_times):
96
+ if n[2]:
97
+ import_message = ""
98
+ else:
99
+ import_message = " (PRESTARTUP FAILED)"
100
+ logging.info("{:6.1f} seconds{}: {}".format(n[0], import_message, n[1]))
101
+ logging.info("")
102
+
103
+ apply_custom_paths()
104
+ execute_prestartup_script()
105
+
106
+
107
+ # Main code
108
+ import asyncio
109
+ import shutil
110
+ import threading
111
+ import gc
112
+
113
+
114
+ if os.name == "nt":
115
+ logging.getLogger("xformers").addFilter(lambda record: 'A matching Triton is not available' not in record.getMessage())
116
+
117
+ if __name__ == "__main__":
118
+ if args.default_device is not None:
119
+ default_dev = args.default_device
120
+ devices = list(range(32))
121
+ devices.remove(default_dev)
122
+ devices.insert(0, default_dev)
123
+ devices = ','.join(map(str, devices))
124
+ os.environ['CUDA_VISIBLE_DEVICES'] = str(devices)
125
+ os.environ['HIP_VISIBLE_DEVICES'] = str(devices)
126
+
127
+ if args.cuda_device is not None:
128
+ os.environ['CUDA_VISIBLE_DEVICES'] = str(args.cuda_device)
129
+ os.environ['HIP_VISIBLE_DEVICES'] = str(args.cuda_device)
130
+ logging.info("Set cuda device to: {}".format(args.cuda_device))
131
+
132
+ if args.oneapi_device_selector is not None:
133
+ os.environ['ONEAPI_DEVICE_SELECTOR'] = args.oneapi_device_selector
134
+ logging.info("Set oneapi device selector to: {}".format(args.oneapi_device_selector))
135
+
136
+ if args.deterministic:
137
+ if 'CUBLAS_WORKSPACE_CONFIG' not in os.environ:
138
+ os.environ['CUBLAS_WORKSPACE_CONFIG'] = ":4096:8"
139
+
140
+ import cuda_malloc
141
+
142
+ if 'torch' in sys.modules:
143
+ logging.warning("WARNING: Potential Error in code: Torch already imported, torch should never be imported before this point.")
144
+
145
+ import comfy.utils
146
+
147
+ import execution
148
+ import server
149
+ from protocol import BinaryEventTypes
150
+ import nodes
151
+ import comfy.model_management
152
+ import comfyui_version
153
+ import app.logger
154
+ import hook_breaker_ac10a0
155
+
156
+ def cuda_malloc_warning():
157
+ device = comfy.model_management.get_torch_device()
158
+ device_name = comfy.model_management.get_torch_device_name(device)
159
+ cuda_malloc_warning = False
160
+ if "cudaMallocAsync" in device_name:
161
+ for b in cuda_malloc.blacklist:
162
+ if b in device_name:
163
+ cuda_malloc_warning = True
164
+ if cuda_malloc_warning:
165
+ logging.warning("\nWARNING: this card most likely does not support cuda-malloc, if you get \"CUDA error\" please run ComfyUI with: --disable-cuda-malloc\n")
166
+
167
+
168
+ def prompt_worker(q, server_instance):
169
+ current_time: float = 0.0
170
+ cache_type = execution.CacheType.CLASSIC
171
+ if args.cache_lru > 0:
172
+ cache_type = execution.CacheType.LRU
173
+ elif args.cache_none:
174
+ cache_type = execution.CacheType.DEPENDENCY_AWARE
175
+
176
+ e = execution.PromptExecutor(server_instance, cache_type=cache_type, cache_size=args.cache_lru)
177
+ last_gc_collect = 0
178
+ need_gc = False
179
+ gc_collect_interval = 10.0
180
+
181
+ while True:
182
+ timeout = 1000.0
183
+ if need_gc:
184
+ timeout = max(gc_collect_interval - (current_time - last_gc_collect), 0.0)
185
+
186
+ queue_item = q.get(timeout=timeout)
187
+ if queue_item is not None:
188
+ item, item_id = queue_item
189
+ execution_start_time = time.perf_counter()
190
+ prompt_id = item[1]
191
+ server_instance.last_prompt_id = prompt_id
192
+
193
+ e.execute(item[2], prompt_id, item[3], item[4])
194
+ need_gc = True
195
+ q.task_done(item_id,
196
+ e.history_result,
197
+ status=execution.PromptQueue.ExecutionStatus(
198
+ status_str='success' if e.success else 'error',
199
+ completed=e.success,
200
+ messages=e.status_messages))
201
+ if server_instance.client_id is not None:
202
+ server_instance.send_sync("executing", {"node": None, "prompt_id": prompt_id}, server_instance.client_id)
203
+
204
+ current_time = time.perf_counter()
205
+ execution_time = current_time - execution_start_time
206
+
207
+ # Log Time in a more readable way after 10 minutes
208
+ if execution_time > 600:
209
+ execution_time = time.strftime("%H:%M:%S", time.gmtime(execution_time))
210
+ logging.info(f"Prompt executed in {execution_time}")
211
+ else:
212
+ logging.info("Prompt executed in {:.2f} seconds".format(execution_time))
213
+
214
+ flags = q.get_flags()
215
+ free_memory = flags.get("free_memory", False)
216
+
217
+ if flags.get("unload_models", free_memory):
218
+ comfy.model_management.unload_all_models()
219
+ need_gc = True
220
+ last_gc_collect = 0
221
+
222
+ if free_memory:
223
+ e.reset()
224
+ need_gc = True
225
+ last_gc_collect = 0
226
+
227
+ if need_gc:
228
+ current_time = time.perf_counter()
229
+ if (current_time - last_gc_collect) > gc_collect_interval:
230
+ gc.collect()
231
+ comfy.model_management.soft_empty_cache()
232
+ last_gc_collect = current_time
233
+ need_gc = False
234
+ hook_breaker_ac10a0.restore_functions()
235
+
236
+
237
+ async def run(server_instance, address='', port=8188, verbose=True, call_on_start=None):
238
+ addresses = []
239
+ for addr in address.split(","):
240
+ addresses.append((addr, port))
241
+ await asyncio.gather(
242
+ server_instance.start_multi_address(addresses, call_on_start, verbose), server_instance.publish_loop()
243
+ )
244
+
245
+ def hijack_progress(server_instance):
246
+ def hook(value, total, preview_image, prompt_id=None, node_id=None):
247
+ executing_context = get_executing_context()
248
+ if prompt_id is None and executing_context is not None:
249
+ prompt_id = executing_context.prompt_id
250
+ if node_id is None and executing_context is not None:
251
+ node_id = executing_context.node_id
252
+ comfy.model_management.throw_exception_if_processing_interrupted()
253
+ if prompt_id is None:
254
+ prompt_id = server_instance.last_prompt_id
255
+ if node_id is None:
256
+ node_id = server_instance.last_node_id
257
+ progress = {"value": value, "max": total, "prompt_id": prompt_id, "node": node_id}
258
+ get_progress_state().update_progress(node_id, value, total, preview_image)
259
+
260
+ server_instance.send_sync("progress", progress, server_instance.client_id)
261
+ if preview_image is not None:
262
+ # Only send old method if client doesn't support preview metadata
263
+ if not feature_flags.supports_feature(
264
+ server_instance.sockets_metadata,
265
+ server_instance.client_id,
266
+ "supports_preview_metadata",
267
+ ):
268
+ server_instance.send_sync(
269
+ BinaryEventTypes.UNENCODED_PREVIEW_IMAGE,
270
+ preview_image,
271
+ server_instance.client_id,
272
+ )
273
+
274
+ comfy.utils.set_progress_bar_global_hook(hook)
275
+
276
+
277
+ def cleanup_temp():
278
+ temp_dir = folder_paths.get_temp_directory()
279
+ if os.path.exists(temp_dir):
280
+ shutil.rmtree(temp_dir, ignore_errors=True)
281
+
282
+
283
+ def setup_database():
284
+ try:
285
+ from app.database.db import init_db, dependencies_available
286
+ if dependencies_available():
287
+ init_db()
288
+ except Exception as e:
289
+ logging.error(f"Failed to initialize database. Please ensure you have installed the latest requirements. If the error persists, please report this as in future the database will be required: {e}")
290
+
291
+
292
+ def start_comfyui(asyncio_loop=None):
293
+ """
294
+ Starts the ComfyUI server using the provided asyncio event loop or creates a new one.
295
+ Returns the event loop, server instance, and a function to start the server asynchronously.
296
+ """
297
+ if args.temp_directory:
298
+ temp_dir = os.path.join(os.path.abspath(args.temp_directory), "temp")
299
+ logging.info(f"Setting temp directory to: {temp_dir}")
300
+ folder_paths.set_temp_directory(temp_dir)
301
+ cleanup_temp()
302
+
303
+ if args.windows_standalone_build:
304
+ try:
305
+ import new_updater
306
+ new_updater.update_windows_updater()
307
+ except:
308
+ pass
309
+
310
+ if not asyncio_loop:
311
+ asyncio_loop = asyncio.new_event_loop()
312
+ asyncio.set_event_loop(asyncio_loop)
313
+ prompt_server = server.PromptServer(asyncio_loop)
314
+
315
+ hook_breaker_ac10a0.save_functions()
316
+ nodes.init_extra_nodes(
317
+ init_custom_nodes=(not args.disable_all_custom_nodes) or len(args.whitelist_custom_nodes) > 0,
318
+ init_api_nodes=not args.disable_api_nodes
319
+ )
320
+ hook_breaker_ac10a0.restore_functions()
321
+
322
+ cuda_malloc_warning()
323
+ setup_database()
324
+
325
+ prompt_server.add_routes()
326
+ hijack_progress(prompt_server)
327
+
328
+ threading.Thread(target=prompt_worker, daemon=True, args=(prompt_server.prompt_queue, prompt_server,)).start()
329
+
330
+ if args.quick_test_for_ci:
331
+ exit(0)
332
+
333
+ os.makedirs(folder_paths.get_temp_directory(), exist_ok=True)
334
+ call_on_start = None
335
+ if args.auto_launch:
336
+ def startup_server(scheme, address, port):
337
+ import webbrowser
338
+ if os.name == 'nt' and address == '0.0.0.0':
339
+ address = '127.0.0.1'
340
+ if ':' in address:
341
+ address = "[{}]".format(address)
342
+ webbrowser.open(f"{scheme}://{address}:{port}")
343
+ call_on_start = startup_server
344
+
345
+ async def start_all():
346
+ await prompt_server.setup()
347
+ await run(prompt_server, address=args.listen, port=args.port, verbose=not args.dont_print_server, call_on_start=call_on_start)
348
+
349
+ # Returning these so that other code can integrate with the ComfyUI loop and server
350
+ return asyncio_loop, prompt_server, start_all
351
+
352
+
353
+ if __name__ == "__main__":
354
+ # Running directly, just start ComfyUI.
355
+ logging.info("Python version: {}".format(sys.version))
356
+ logging.info("ComfyUI version: {}".format(comfyui_version.__version__))
357
+
358
+ if sys.version_info.major == 3 and sys.version_info.minor < 10:
359
+ logging.warning("WARNING: You are using a python version older than 3.10, please upgrade to a newer one. 3.12 and above is recommended.")
360
+
361
+ event_loop, _, start_all_func = start_comfyui()
362
+ try:
363
+ x = start_all_func()
364
+ app.logger.print_startup_warnings()
365
+ event_loop.run_until_complete(x)
366
+ except KeyboardInterrupt:
367
+ logging.info("\nStopped server")
368
+
369
+ cleanup_temp()
ComfyUI/new_updater.py ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import shutil
3
+
4
+ base_path = os.path.dirname(os.path.realpath(__file__))
5
+
6
+
7
+ def update_windows_updater():
8
+ top_path = os.path.dirname(base_path)
9
+ updater_path = os.path.join(base_path, ".ci/update_windows/update.py")
10
+ bat_path = os.path.join(base_path, ".ci/update_windows/update_comfyui.bat")
11
+
12
+ dest_updater_path = os.path.join(top_path, "update/update.py")
13
+ dest_bat_path = os.path.join(top_path, "update/update_comfyui.bat")
14
+ dest_bat_deps_path = os.path.join(top_path, "update/update_comfyui_and_python_dependencies.bat")
15
+
16
+ try:
17
+ with open(dest_bat_path, 'rb') as f:
18
+ contents = f.read()
19
+ except:
20
+ return
21
+
22
+ if not contents.startswith(b"..\\python_embeded\\python.exe .\\update.py"):
23
+ return
24
+
25
+ shutil.copy(updater_path, dest_updater_path)
26
+ try:
27
+ with open(dest_bat_deps_path, 'rb') as f:
28
+ contents = f.read()
29
+ contents = contents.replace(b'..\\python_embeded\\python.exe .\\update.py ..\\ComfyUI\\', b'call update_comfyui.bat nopause')
30
+ with open(dest_bat_deps_path, 'wb') as f:
31
+ f.write(contents)
32
+ except:
33
+ pass
34
+ shutil.copy(bat_path, dest_bat_path)
35
+ print("Updated the windows standalone package updater.") # noqa: T201
ComfyUI/node_helpers.py ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import hashlib
2
+ import torch
3
+
4
+ from comfy.cli_args import args
5
+
6
+ from PIL import ImageFile, UnidentifiedImageError
7
+
8
+ def conditioning_set_values(conditioning, values={}, append=False):
9
+ c = []
10
+ for t in conditioning:
11
+ n = [t[0], t[1].copy()]
12
+ for k in values:
13
+ val = values[k]
14
+ if append:
15
+ old_val = n[1].get(k, None)
16
+ if old_val is not None:
17
+ val = old_val + val
18
+
19
+ n[1][k] = val
20
+ c.append(n)
21
+
22
+ return c
23
+
24
+ def pillow(fn, arg):
25
+ prev_value = None
26
+ try:
27
+ x = fn(arg)
28
+ except (OSError, UnidentifiedImageError, ValueError): #PIL issues #4472 and #2445, also fixes ComfyUI issue #3416
29
+ prev_value = ImageFile.LOAD_TRUNCATED_IMAGES
30
+ ImageFile.LOAD_TRUNCATED_IMAGES = True
31
+ x = fn(arg)
32
+ finally:
33
+ if prev_value is not None:
34
+ ImageFile.LOAD_TRUNCATED_IMAGES = prev_value
35
+ return x
36
+
37
+ def hasher():
38
+ hashfuncs = {
39
+ "md5": hashlib.md5,
40
+ "sha1": hashlib.sha1,
41
+ "sha256": hashlib.sha256,
42
+ "sha512": hashlib.sha512
43
+ }
44
+ return hashfuncs[args.default_hashing_function]
45
+
46
+ def string_to_torch_dtype(string):
47
+ if string == "fp32":
48
+ return torch.float32
49
+ if string == "fp16":
50
+ return torch.float16
51
+ if string == "bf16":
52
+ return torch.bfloat16
53
+
54
+ def image_alpha_fix(destination, source):
55
+ if destination.shape[-1] < source.shape[-1]:
56
+ source = source[...,:destination.shape[-1]]
57
+ elif destination.shape[-1] > source.shape[-1]:
58
+ destination = torch.nn.functional.pad(destination, (0, 1))
59
+ destination[..., -1] = 1.0
60
+ return destination, source
ComfyUI/nodes.py ADDED
@@ -0,0 +1,2363 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import annotations
2
+ import torch
3
+
4
+ import os
5
+ import sys
6
+ import json
7
+ import hashlib
8
+ import traceback
9
+ import math
10
+ import time
11
+ import random
12
+ import logging
13
+
14
+ from PIL import Image, ImageOps, ImageSequence
15
+ from PIL.PngImagePlugin import PngInfo
16
+
17
+ import numpy as np
18
+ import safetensors.torch
19
+
20
+ sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__)), "comfy"))
21
+
22
+ import comfy.diffusers_load
23
+ import comfy.samplers
24
+ import comfy.sample
25
+ import comfy.sd
26
+ import comfy.utils
27
+ import comfy.controlnet
28
+ from comfy.comfy_types import IO, ComfyNodeABC, InputTypeDict, FileLocator
29
+
30
+ import comfy.clip_vision
31
+
32
+ import comfy.model_management
33
+ from comfy.cli_args import args
34
+
35
+ import importlib
36
+
37
+ import folder_paths
38
+ import latent_preview
39
+ import node_helpers
40
+
41
+ def before_node_execution():
42
+ comfy.model_management.throw_exception_if_processing_interrupted()
43
+
44
+ def interrupt_processing(value=True):
45
+ comfy.model_management.interrupt_current_processing(value)
46
+
47
+ MAX_RESOLUTION=16384
48
+
49
+ class CLIPTextEncode(ComfyNodeABC):
50
+ @classmethod
51
+ def INPUT_TYPES(s) -> InputTypeDict:
52
+ return {
53
+ "required": {
54
+ "text": (IO.STRING, {"multiline": True, "dynamicPrompts": True, "tooltip": "The text to be encoded."}),
55
+ "clip": (IO.CLIP, {"tooltip": "The CLIP model used for encoding the text."})
56
+ }
57
+ }
58
+ RETURN_TYPES = (IO.CONDITIONING,)
59
+ OUTPUT_TOOLTIPS = ("A conditioning containing the embedded text used to guide the diffusion model.",)
60
+ FUNCTION = "encode"
61
+
62
+ CATEGORY = "conditioning"
63
+ DESCRIPTION = "Encodes a text prompt using a CLIP model into an embedding that can be used to guide the diffusion model towards generating specific images."
64
+
65
+ def encode(self, clip, text):
66
+ if clip is None:
67
+ raise RuntimeError("ERROR: clip input is invalid: None\n\nIf the clip is from a checkpoint loader node your checkpoint does not contain a valid clip or text encoder model.")
68
+ tokens = clip.tokenize(text)
69
+ return (clip.encode_from_tokens_scheduled(tokens), )
70
+
71
+
72
+ class ConditioningCombine:
73
+ @classmethod
74
+ def INPUT_TYPES(s):
75
+ return {"required": {"conditioning_1": ("CONDITIONING", ), "conditioning_2": ("CONDITIONING", )}}
76
+ RETURN_TYPES = ("CONDITIONING",)
77
+ FUNCTION = "combine"
78
+
79
+ CATEGORY = "conditioning"
80
+
81
+ def combine(self, conditioning_1, conditioning_2):
82
+ return (conditioning_1 + conditioning_2, )
83
+
84
+ class ConditioningAverage :
85
+ @classmethod
86
+ def INPUT_TYPES(s):
87
+ return {"required": {"conditioning_to": ("CONDITIONING", ), "conditioning_from": ("CONDITIONING", ),
88
+ "conditioning_to_strength": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 1.0, "step": 0.01})
89
+ }}
90
+ RETURN_TYPES = ("CONDITIONING",)
91
+ FUNCTION = "addWeighted"
92
+
93
+ CATEGORY = "conditioning"
94
+
95
+ def addWeighted(self, conditioning_to, conditioning_from, conditioning_to_strength):
96
+ out = []
97
+
98
+ if len(conditioning_from) > 1:
99
+ logging.warning("Warning: ConditioningAverage conditioning_from contains more than 1 cond, only the first one will actually be applied to conditioning_to.")
100
+
101
+ cond_from = conditioning_from[0][0]
102
+ pooled_output_from = conditioning_from[0][1].get("pooled_output", None)
103
+
104
+ for i in range(len(conditioning_to)):
105
+ t1 = conditioning_to[i][0]
106
+ pooled_output_to = conditioning_to[i][1].get("pooled_output", pooled_output_from)
107
+ t0 = cond_from[:,:t1.shape[1]]
108
+ if t0.shape[1] < t1.shape[1]:
109
+ t0 = torch.cat([t0] + [torch.zeros((1, (t1.shape[1] - t0.shape[1]), t1.shape[2]))], dim=1)
110
+
111
+ tw = torch.mul(t1, conditioning_to_strength) + torch.mul(t0, (1.0 - conditioning_to_strength))
112
+ t_to = conditioning_to[i][1].copy()
113
+ if pooled_output_from is not None and pooled_output_to is not None:
114
+ t_to["pooled_output"] = torch.mul(pooled_output_to, conditioning_to_strength) + torch.mul(pooled_output_from, (1.0 - conditioning_to_strength))
115
+ elif pooled_output_from is not None:
116
+ t_to["pooled_output"] = pooled_output_from
117
+
118
+ n = [tw, t_to]
119
+ out.append(n)
120
+ return (out, )
121
+
122
+ class ConditioningConcat:
123
+ @classmethod
124
+ def INPUT_TYPES(s):
125
+ return {"required": {
126
+ "conditioning_to": ("CONDITIONING",),
127
+ "conditioning_from": ("CONDITIONING",),
128
+ }}
129
+ RETURN_TYPES = ("CONDITIONING",)
130
+ FUNCTION = "concat"
131
+
132
+ CATEGORY = "conditioning"
133
+
134
+ def concat(self, conditioning_to, conditioning_from):
135
+ out = []
136
+
137
+ if len(conditioning_from) > 1:
138
+ logging.warning("Warning: ConditioningConcat conditioning_from contains more than 1 cond, only the first one will actually be applied to conditioning_to.")
139
+
140
+ cond_from = conditioning_from[0][0]
141
+
142
+ for i in range(len(conditioning_to)):
143
+ t1 = conditioning_to[i][0]
144
+ tw = torch.cat((t1, cond_from),1)
145
+ n = [tw, conditioning_to[i][1].copy()]
146
+ out.append(n)
147
+
148
+ return (out, )
149
+
150
+ class ConditioningSetArea:
151
+ @classmethod
152
+ def INPUT_TYPES(s):
153
+ return {"required": {"conditioning": ("CONDITIONING", ),
154
+ "width": ("INT", {"default": 64, "min": 64, "max": MAX_RESOLUTION, "step": 8}),
155
+ "height": ("INT", {"default": 64, "min": 64, "max": MAX_RESOLUTION, "step": 8}),
156
+ "x": ("INT", {"default": 0, "min": 0, "max": MAX_RESOLUTION, "step": 8}),
157
+ "y": ("INT", {"default": 0, "min": 0, "max": MAX_RESOLUTION, "step": 8}),
158
+ "strength": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 10.0, "step": 0.01}),
159
+ }}
160
+ RETURN_TYPES = ("CONDITIONING",)
161
+ FUNCTION = "append"
162
+
163
+ CATEGORY = "conditioning"
164
+
165
+ def append(self, conditioning, width, height, x, y, strength):
166
+ c = node_helpers.conditioning_set_values(conditioning, {"area": (height // 8, width // 8, y // 8, x // 8),
167
+ "strength": strength,
168
+ "set_area_to_bounds": False})
169
+ return (c, )
170
+
171
+ class ConditioningSetAreaPercentage:
172
+ @classmethod
173
+ def INPUT_TYPES(s):
174
+ return {"required": {"conditioning": ("CONDITIONING", ),
175
+ "width": ("FLOAT", {"default": 1.0, "min": 0, "max": 1.0, "step": 0.01}),
176
+ "height": ("FLOAT", {"default": 1.0, "min": 0, "max": 1.0, "step": 0.01}),
177
+ "x": ("FLOAT", {"default": 0, "min": 0, "max": 1.0, "step": 0.01}),
178
+ "y": ("FLOAT", {"default": 0, "min": 0, "max": 1.0, "step": 0.01}),
179
+ "strength": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 10.0, "step": 0.01}),
180
+ }}
181
+ RETURN_TYPES = ("CONDITIONING",)
182
+ FUNCTION = "append"
183
+
184
+ CATEGORY = "conditioning"
185
+
186
+ def append(self, conditioning, width, height, x, y, strength):
187
+ c = node_helpers.conditioning_set_values(conditioning, {"area": ("percentage", height, width, y, x),
188
+ "strength": strength,
189
+ "set_area_to_bounds": False})
190
+ return (c, )
191
+
192
+ class ConditioningSetAreaStrength:
193
+ @classmethod
194
+ def INPUT_TYPES(s):
195
+ return {"required": {"conditioning": ("CONDITIONING", ),
196
+ "strength": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 10.0, "step": 0.01}),
197
+ }}
198
+ RETURN_TYPES = ("CONDITIONING",)
199
+ FUNCTION = "append"
200
+
201
+ CATEGORY = "conditioning"
202
+
203
+ def append(self, conditioning, strength):
204
+ c = node_helpers.conditioning_set_values(conditioning, {"strength": strength})
205
+ return (c, )
206
+
207
+
208
+ class ConditioningSetMask:
209
+ @classmethod
210
+ def INPUT_TYPES(s):
211
+ return {"required": {"conditioning": ("CONDITIONING", ),
212
+ "mask": ("MASK", ),
213
+ "strength": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 10.0, "step": 0.01}),
214
+ "set_cond_area": (["default", "mask bounds"],),
215
+ }}
216
+ RETURN_TYPES = ("CONDITIONING",)
217
+ FUNCTION = "append"
218
+
219
+ CATEGORY = "conditioning"
220
+
221
+ def append(self, conditioning, mask, set_cond_area, strength):
222
+ set_area_to_bounds = False
223
+ if set_cond_area != "default":
224
+ set_area_to_bounds = True
225
+ if len(mask.shape) < 3:
226
+ mask = mask.unsqueeze(0)
227
+
228
+ c = node_helpers.conditioning_set_values(conditioning, {"mask": mask,
229
+ "set_area_to_bounds": set_area_to_bounds,
230
+ "mask_strength": strength})
231
+ return (c, )
232
+
233
+ class ConditioningZeroOut:
234
+ @classmethod
235
+ def INPUT_TYPES(s):
236
+ return {"required": {"conditioning": ("CONDITIONING", )}}
237
+ RETURN_TYPES = ("CONDITIONING",)
238
+ FUNCTION = "zero_out"
239
+
240
+ CATEGORY = "advanced/conditioning"
241
+
242
+ def zero_out(self, conditioning):
243
+ c = []
244
+ for t in conditioning:
245
+ d = t[1].copy()
246
+ pooled_output = d.get("pooled_output", None)
247
+ if pooled_output is not None:
248
+ d["pooled_output"] = torch.zeros_like(pooled_output)
249
+ conditioning_lyrics = d.get("conditioning_lyrics", None)
250
+ if conditioning_lyrics is not None:
251
+ d["conditioning_lyrics"] = torch.zeros_like(conditioning_lyrics)
252
+ n = [torch.zeros_like(t[0]), d]
253
+ c.append(n)
254
+ return (c, )
255
+
256
+ class ConditioningSetTimestepRange:
257
+ @classmethod
258
+ def INPUT_TYPES(s):
259
+ return {"required": {"conditioning": ("CONDITIONING", ),
260
+ "start": ("FLOAT", {"default": 0.0, "min": 0.0, "max": 1.0, "step": 0.001}),
261
+ "end": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 1.0, "step": 0.001})
262
+ }}
263
+ RETURN_TYPES = ("CONDITIONING",)
264
+ FUNCTION = "set_range"
265
+
266
+ CATEGORY = "advanced/conditioning"
267
+
268
+ def set_range(self, conditioning, start, end):
269
+ c = node_helpers.conditioning_set_values(conditioning, {"start_percent": start,
270
+ "end_percent": end})
271
+ return (c, )
272
+
273
+ class VAEDecode:
274
+ @classmethod
275
+ def INPUT_TYPES(s):
276
+ return {
277
+ "required": {
278
+ "samples": ("LATENT", {"tooltip": "The latent to be decoded."}),
279
+ "vae": ("VAE", {"tooltip": "The VAE model used for decoding the latent."})
280
+ }
281
+ }
282
+ RETURN_TYPES = ("IMAGE",)
283
+ OUTPUT_TOOLTIPS = ("The decoded image.",)
284
+ FUNCTION = "decode"
285
+
286
+ CATEGORY = "latent"
287
+ DESCRIPTION = "Decodes latent images back into pixel space images."
288
+
289
+ def decode(self, vae, samples):
290
+ images = vae.decode(samples["samples"])
291
+ if len(images.shape) == 5: #Combine batches
292
+ images = images.reshape(-1, images.shape[-3], images.shape[-2], images.shape[-1])
293
+ return (images, )
294
+
295
+ class VAEDecodeTiled:
296
+ @classmethod
297
+ def INPUT_TYPES(s):
298
+ return {"required": {"samples": ("LATENT", ), "vae": ("VAE", ),
299
+ "tile_size": ("INT", {"default": 512, "min": 64, "max": 4096, "step": 32}),
300
+ "overlap": ("INT", {"default": 64, "min": 0, "max": 4096, "step": 32}),
301
+ "temporal_size": ("INT", {"default": 64, "min": 8, "max": 4096, "step": 4, "tooltip": "Only used for video VAEs: Amount of frames to decode at a time."}),
302
+ "temporal_overlap": ("INT", {"default": 8, "min": 4, "max": 4096, "step": 4, "tooltip": "Only used for video VAEs: Amount of frames to overlap."}),
303
+ }}
304
+ RETURN_TYPES = ("IMAGE",)
305
+ FUNCTION = "decode"
306
+
307
+ CATEGORY = "_for_testing"
308
+
309
+ def decode(self, vae, samples, tile_size, overlap=64, temporal_size=64, temporal_overlap=8):
310
+ if tile_size < overlap * 4:
311
+ overlap = tile_size // 4
312
+ if temporal_size < temporal_overlap * 2:
313
+ temporal_overlap = temporal_overlap // 2
314
+ temporal_compression = vae.temporal_compression_decode()
315
+ if temporal_compression is not None:
316
+ temporal_size = max(2, temporal_size // temporal_compression)
317
+ temporal_overlap = max(1, min(temporal_size // 2, temporal_overlap // temporal_compression))
318
+ else:
319
+ temporal_size = None
320
+ temporal_overlap = None
321
+
322
+ compression = vae.spacial_compression_decode()
323
+ images = vae.decode_tiled(samples["samples"], tile_x=tile_size // compression, tile_y=tile_size // compression, overlap=overlap // compression, tile_t=temporal_size, overlap_t=temporal_overlap)
324
+ if len(images.shape) == 5: #Combine batches
325
+ images = images.reshape(-1, images.shape[-3], images.shape[-2], images.shape[-1])
326
+ return (images, )
327
+
328
+ class VAEEncode:
329
+ @classmethod
330
+ def INPUT_TYPES(s):
331
+ return {"required": { "pixels": ("IMAGE", ), "vae": ("VAE", )}}
332
+ RETURN_TYPES = ("LATENT",)
333
+ FUNCTION = "encode"
334
+
335
+ CATEGORY = "latent"
336
+
337
+ def encode(self, vae, pixels):
338
+ t = vae.encode(pixels[:,:,:,:3])
339
+ return ({"samples":t}, )
340
+
341
+ class VAEEncodeTiled:
342
+ @classmethod
343
+ def INPUT_TYPES(s):
344
+ return {"required": {"pixels": ("IMAGE", ), "vae": ("VAE", ),
345
+ "tile_size": ("INT", {"default": 512, "min": 64, "max": 4096, "step": 64}),
346
+ "overlap": ("INT", {"default": 64, "min": 0, "max": 4096, "step": 32}),
347
+ "temporal_size": ("INT", {"default": 64, "min": 8, "max": 4096, "step": 4, "tooltip": "Only used for video VAEs: Amount of frames to encode at a time."}),
348
+ "temporal_overlap": ("INT", {"default": 8, "min": 4, "max": 4096, "step": 4, "tooltip": "Only used for video VAEs: Amount of frames to overlap."}),
349
+ }}
350
+ RETURN_TYPES = ("LATENT",)
351
+ FUNCTION = "encode"
352
+
353
+ CATEGORY = "_for_testing"
354
+
355
+ def encode(self, vae, pixels, tile_size, overlap, temporal_size=64, temporal_overlap=8):
356
+ t = vae.encode_tiled(pixels[:,:,:,:3], tile_x=tile_size, tile_y=tile_size, overlap=overlap, tile_t=temporal_size, overlap_t=temporal_overlap)
357
+ return ({"samples": t}, )
358
+
359
+ class VAEEncodeForInpaint:
360
+ @classmethod
361
+ def INPUT_TYPES(s):
362
+ return {"required": { "pixels": ("IMAGE", ), "vae": ("VAE", ), "mask": ("MASK", ), "grow_mask_by": ("INT", {"default": 6, "min": 0, "max": 64, "step": 1}),}}
363
+ RETURN_TYPES = ("LATENT",)
364
+ FUNCTION = "encode"
365
+
366
+ CATEGORY = "latent/inpaint"
367
+
368
+ def encode(self, vae, pixels, mask, grow_mask_by=6):
369
+ x = (pixels.shape[1] // vae.downscale_ratio) * vae.downscale_ratio
370
+ y = (pixels.shape[2] // vae.downscale_ratio) * vae.downscale_ratio
371
+ mask = torch.nn.functional.interpolate(mask.reshape((-1, 1, mask.shape[-2], mask.shape[-1])), size=(pixels.shape[1], pixels.shape[2]), mode="bilinear")
372
+
373
+ pixels = pixels.clone()
374
+ if pixels.shape[1] != x or pixels.shape[2] != y:
375
+ x_offset = (pixels.shape[1] % vae.downscale_ratio) // 2
376
+ y_offset = (pixels.shape[2] % vae.downscale_ratio) // 2
377
+ pixels = pixels[:,x_offset:x + x_offset, y_offset:y + y_offset,:]
378
+ mask = mask[:,:,x_offset:x + x_offset, y_offset:y + y_offset]
379
+
380
+ #grow mask by a few pixels to keep things seamless in latent space
381
+ if grow_mask_by == 0:
382
+ mask_erosion = mask
383
+ else:
384
+ kernel_tensor = torch.ones((1, 1, grow_mask_by, grow_mask_by))
385
+ padding = math.ceil((grow_mask_by - 1) / 2)
386
+
387
+ mask_erosion = torch.clamp(torch.nn.functional.conv2d(mask.round(), kernel_tensor, padding=padding), 0, 1)
388
+
389
+ m = (1.0 - mask.round()).squeeze(1)
390
+ for i in range(3):
391
+ pixels[:,:,:,i] -= 0.5
392
+ pixels[:,:,:,i] *= m
393
+ pixels[:,:,:,i] += 0.5
394
+ t = vae.encode(pixels)
395
+
396
+ return ({"samples":t, "noise_mask": (mask_erosion[:,:,:x,:y].round())}, )
397
+
398
+
399
+ class InpaintModelConditioning:
400
+ @classmethod
401
+ def INPUT_TYPES(s):
402
+ return {"required": {"positive": ("CONDITIONING", ),
403
+ "negative": ("CONDITIONING", ),
404
+ "vae": ("VAE", ),
405
+ "pixels": ("IMAGE", ),
406
+ "mask": ("MASK", ),
407
+ "noise_mask": ("BOOLEAN", {"default": True, "tooltip": "Add a noise mask to the latent so sampling will only happen within the mask. Might improve results or completely break things depending on the model."}),
408
+ }}
409
+
410
+ RETURN_TYPES = ("CONDITIONING","CONDITIONING","LATENT")
411
+ RETURN_NAMES = ("positive", "negative", "latent")
412
+ FUNCTION = "encode"
413
+
414
+ CATEGORY = "conditioning/inpaint"
415
+
416
+ def encode(self, positive, negative, pixels, vae, mask, noise_mask=True):
417
+ x = (pixels.shape[1] // 8) * 8
418
+ y = (pixels.shape[2] // 8) * 8
419
+ mask = torch.nn.functional.interpolate(mask.reshape((-1, 1, mask.shape[-2], mask.shape[-1])), size=(pixels.shape[1], pixels.shape[2]), mode="bilinear")
420
+
421
+ orig_pixels = pixels
422
+ pixels = orig_pixels.clone()
423
+ if pixels.shape[1] != x or pixels.shape[2] != y:
424
+ x_offset = (pixels.shape[1] % 8) // 2
425
+ y_offset = (pixels.shape[2] % 8) // 2
426
+ pixels = pixels[:,x_offset:x + x_offset, y_offset:y + y_offset,:]
427
+ mask = mask[:,:,x_offset:x + x_offset, y_offset:y + y_offset]
428
+
429
+ m = (1.0 - mask.round()).squeeze(1)
430
+ for i in range(3):
431
+ pixels[:,:,:,i] -= 0.5
432
+ pixels[:,:,:,i] *= m
433
+ pixels[:,:,:,i] += 0.5
434
+ concat_latent = vae.encode(pixels)
435
+ orig_latent = vae.encode(orig_pixels)
436
+
437
+ out_latent = {}
438
+
439
+ out_latent["samples"] = orig_latent
440
+ if noise_mask:
441
+ out_latent["noise_mask"] = mask
442
+
443
+ out = []
444
+ for conditioning in [positive, negative]:
445
+ c = node_helpers.conditioning_set_values(conditioning, {"concat_latent_image": concat_latent,
446
+ "concat_mask": mask})
447
+ out.append(c)
448
+ return (out[0], out[1], out_latent)
449
+
450
+
451
+ class SaveLatent:
452
+ def __init__(self):
453
+ self.output_dir = folder_paths.get_output_directory()
454
+
455
+ @classmethod
456
+ def INPUT_TYPES(s):
457
+ return {"required": { "samples": ("LATENT", ),
458
+ "filename_prefix": ("STRING", {"default": "latents/ComfyUI"})},
459
+ "hidden": {"prompt": "PROMPT", "extra_pnginfo": "EXTRA_PNGINFO"},
460
+ }
461
+ RETURN_TYPES = ()
462
+ FUNCTION = "save"
463
+
464
+ OUTPUT_NODE = True
465
+
466
+ CATEGORY = "_for_testing"
467
+
468
+ def save(self, samples, filename_prefix="ComfyUI", prompt=None, extra_pnginfo=None):
469
+ full_output_folder, filename, counter, subfolder, filename_prefix = folder_paths.get_save_image_path(filename_prefix, self.output_dir)
470
+
471
+ # support save metadata for latent sharing
472
+ prompt_info = ""
473
+ if prompt is not None:
474
+ prompt_info = json.dumps(prompt)
475
+
476
+ metadata = None
477
+ if not args.disable_metadata:
478
+ metadata = {"prompt": prompt_info}
479
+ if extra_pnginfo is not None:
480
+ for x in extra_pnginfo:
481
+ metadata[x] = json.dumps(extra_pnginfo[x])
482
+
483
+ file = f"{filename}_{counter:05}_.latent"
484
+
485
+ results: list[FileLocator] = []
486
+ results.append({
487
+ "filename": file,
488
+ "subfolder": subfolder,
489
+ "type": "output"
490
+ })
491
+
492
+ file = os.path.join(full_output_folder, file)
493
+
494
+ output = {}
495
+ output["latent_tensor"] = samples["samples"].contiguous()
496
+ output["latent_format_version_0"] = torch.tensor([])
497
+
498
+ comfy.utils.save_torch_file(output, file, metadata=metadata)
499
+ return { "ui": { "latents": results } }
500
+
501
+
502
+ class LoadLatent:
503
+ @classmethod
504
+ def INPUT_TYPES(s):
505
+ input_dir = folder_paths.get_input_directory()
506
+ files = [f for f in os.listdir(input_dir) if os.path.isfile(os.path.join(input_dir, f)) and f.endswith(".latent")]
507
+ return {"required": {"latent": [sorted(files), ]}, }
508
+
509
+ CATEGORY = "_for_testing"
510
+
511
+ RETURN_TYPES = ("LATENT", )
512
+ FUNCTION = "load"
513
+
514
+ def load(self, latent):
515
+ latent_path = folder_paths.get_annotated_filepath(latent)
516
+ latent = safetensors.torch.load_file(latent_path, device="cpu")
517
+ multiplier = 1.0
518
+ if "latent_format_version_0" not in latent:
519
+ multiplier = 1.0 / 0.18215
520
+ samples = {"samples": latent["latent_tensor"].float() * multiplier}
521
+ return (samples, )
522
+
523
+ @classmethod
524
+ def IS_CHANGED(s, latent):
525
+ image_path = folder_paths.get_annotated_filepath(latent)
526
+ m = hashlib.sha256()
527
+ with open(image_path, 'rb') as f:
528
+ m.update(f.read())
529
+ return m.digest().hex()
530
+
531
+ @classmethod
532
+ def VALIDATE_INPUTS(s, latent):
533
+ if not folder_paths.exists_annotated_filepath(latent):
534
+ return "Invalid latent file: {}".format(latent)
535
+ return True
536
+
537
+
538
+ class CheckpointLoader:
539
+ @classmethod
540
+ def INPUT_TYPES(s):
541
+ return {"required": { "config_name": (folder_paths.get_filename_list("configs"), ),
542
+ "ckpt_name": (folder_paths.get_filename_list("checkpoints"), )}}
543
+ RETURN_TYPES = ("MODEL", "CLIP", "VAE")
544
+ FUNCTION = "load_checkpoint"
545
+
546
+ CATEGORY = "advanced/loaders"
547
+ DEPRECATED = True
548
+
549
+ def load_checkpoint(self, config_name, ckpt_name):
550
+ config_path = folder_paths.get_full_path("configs", config_name)
551
+ ckpt_path = folder_paths.get_full_path_or_raise("checkpoints", ckpt_name)
552
+ return comfy.sd.load_checkpoint(config_path, ckpt_path, output_vae=True, output_clip=True, embedding_directory=folder_paths.get_folder_paths("embeddings"))
553
+
554
+ class CheckpointLoaderSimple:
555
+ @classmethod
556
+ def INPUT_TYPES(s):
557
+ return {
558
+ "required": {
559
+ "ckpt_name": (folder_paths.get_filename_list("checkpoints"), {"tooltip": "The name of the checkpoint (model) to load."}),
560
+ }
561
+ }
562
+ RETURN_TYPES = ("MODEL", "CLIP", "VAE")
563
+ OUTPUT_TOOLTIPS = ("The model used for denoising latents.",
564
+ "The CLIP model used for encoding text prompts.",
565
+ "The VAE model used for encoding and decoding images to and from latent space.")
566
+ FUNCTION = "load_checkpoint"
567
+
568
+ CATEGORY = "loaders"
569
+ DESCRIPTION = "Loads a diffusion model checkpoint, diffusion models are used to denoise latents."
570
+
571
+ def load_checkpoint(self, ckpt_name):
572
+ ckpt_path = folder_paths.get_full_path_or_raise("checkpoints", ckpt_name)
573
+ out = comfy.sd.load_checkpoint_guess_config(ckpt_path, output_vae=True, output_clip=True, embedding_directory=folder_paths.get_folder_paths("embeddings"))
574
+ return out[:3]
575
+
576
+ class DiffusersLoader:
577
+ @classmethod
578
+ def INPUT_TYPES(cls):
579
+ paths = []
580
+ for search_path in folder_paths.get_folder_paths("diffusers"):
581
+ if os.path.exists(search_path):
582
+ for root, subdir, files in os.walk(search_path, followlinks=True):
583
+ if "model_index.json" in files:
584
+ paths.append(os.path.relpath(root, start=search_path))
585
+
586
+ return {"required": {"model_path": (paths,), }}
587
+ RETURN_TYPES = ("MODEL", "CLIP", "VAE")
588
+ FUNCTION = "load_checkpoint"
589
+
590
+ CATEGORY = "advanced/loaders/deprecated"
591
+
592
+ def load_checkpoint(self, model_path, output_vae=True, output_clip=True):
593
+ for search_path in folder_paths.get_folder_paths("diffusers"):
594
+ if os.path.exists(search_path):
595
+ path = os.path.join(search_path, model_path)
596
+ if os.path.exists(path):
597
+ model_path = path
598
+ break
599
+
600
+ return comfy.diffusers_load.load_diffusers(model_path, output_vae=output_vae, output_clip=output_clip, embedding_directory=folder_paths.get_folder_paths("embeddings"))
601
+
602
+
603
+ class unCLIPCheckpointLoader:
604
+ @classmethod
605
+ def INPUT_TYPES(s):
606
+ return {"required": { "ckpt_name": (folder_paths.get_filename_list("checkpoints"), ),
607
+ }}
608
+ RETURN_TYPES = ("MODEL", "CLIP", "VAE", "CLIP_VISION")
609
+ FUNCTION = "load_checkpoint"
610
+
611
+ CATEGORY = "loaders"
612
+
613
+ def load_checkpoint(self, ckpt_name, output_vae=True, output_clip=True):
614
+ ckpt_path = folder_paths.get_full_path_or_raise("checkpoints", ckpt_name)
615
+ out = comfy.sd.load_checkpoint_guess_config(ckpt_path, output_vae=True, output_clip=True, output_clipvision=True, embedding_directory=folder_paths.get_folder_paths("embeddings"))
616
+ return out
617
+
618
+ class CLIPSetLastLayer:
619
+ @classmethod
620
+ def INPUT_TYPES(s):
621
+ return {"required": { "clip": ("CLIP", ),
622
+ "stop_at_clip_layer": ("INT", {"default": -1, "min": -24, "max": -1, "step": 1}),
623
+ }}
624
+ RETURN_TYPES = ("CLIP",)
625
+ FUNCTION = "set_last_layer"
626
+
627
+ CATEGORY = "conditioning"
628
+
629
+ def set_last_layer(self, clip, stop_at_clip_layer):
630
+ clip = clip.clone()
631
+ clip.clip_layer(stop_at_clip_layer)
632
+ return (clip,)
633
+
634
+ class LoraLoader:
635
+ def __init__(self):
636
+ self.loaded_lora = None
637
+
638
+ @classmethod
639
+ def INPUT_TYPES(s):
640
+ return {
641
+ "required": {
642
+ "model": ("MODEL", {"tooltip": "The diffusion model the LoRA will be applied to."}),
643
+ "clip": ("CLIP", {"tooltip": "The CLIP model the LoRA will be applied to."}),
644
+ "lora_name": (folder_paths.get_filename_list("loras"), {"tooltip": "The name of the LoRA."}),
645
+ "strength_model": ("FLOAT", {"default": 1.0, "min": -100.0, "max": 100.0, "step": 0.01, "tooltip": "How strongly to modify the diffusion model. This value can be negative."}),
646
+ "strength_clip": ("FLOAT", {"default": 1.0, "min": -100.0, "max": 100.0, "step": 0.01, "tooltip": "How strongly to modify the CLIP model. This value can be negative."}),
647
+ }
648
+ }
649
+
650
+ RETURN_TYPES = ("MODEL", "CLIP")
651
+ OUTPUT_TOOLTIPS = ("The modified diffusion model.", "The modified CLIP model.")
652
+ FUNCTION = "load_lora"
653
+
654
+ CATEGORY = "loaders"
655
+ DESCRIPTION = "LoRAs are used to modify diffusion and CLIP models, altering the way in which latents are denoised such as applying styles. Multiple LoRA nodes can be linked together."
656
+
657
+ def load_lora(self, model, clip, lora_name, strength_model, strength_clip):
658
+ if strength_model == 0 and strength_clip == 0:
659
+ return (model, clip)
660
+
661
+ lora_path = folder_paths.get_full_path_or_raise("loras", lora_name)
662
+ lora = None
663
+ if self.loaded_lora is not None:
664
+ if self.loaded_lora[0] == lora_path:
665
+ lora = self.loaded_lora[1]
666
+ else:
667
+ self.loaded_lora = None
668
+
669
+ if lora is None:
670
+ lora = comfy.utils.load_torch_file(lora_path, safe_load=True)
671
+ self.loaded_lora = (lora_path, lora)
672
+
673
+ model_lora, clip_lora = comfy.sd.load_lora_for_models(model, clip, lora, strength_model, strength_clip)
674
+ return (model_lora, clip_lora)
675
+
676
+ class LoraLoaderModelOnly(LoraLoader):
677
+ @classmethod
678
+ def INPUT_TYPES(s):
679
+ return {"required": { "model": ("MODEL",),
680
+ "lora_name": (folder_paths.get_filename_list("loras"), ),
681
+ "strength_model": ("FLOAT", {"default": 1.0, "min": -100.0, "max": 100.0, "step": 0.01}),
682
+ }}
683
+ RETURN_TYPES = ("MODEL",)
684
+ FUNCTION = "load_lora_model_only"
685
+
686
+ def load_lora_model_only(self, model, lora_name, strength_model):
687
+ return (self.load_lora(model, None, lora_name, strength_model, 0)[0],)
688
+
689
+ class VAELoader:
690
+ @staticmethod
691
+ def vae_list():
692
+ vaes = folder_paths.get_filename_list("vae")
693
+ approx_vaes = folder_paths.get_filename_list("vae_approx")
694
+ sdxl_taesd_enc = False
695
+ sdxl_taesd_dec = False
696
+ sd1_taesd_enc = False
697
+ sd1_taesd_dec = False
698
+ sd3_taesd_enc = False
699
+ sd3_taesd_dec = False
700
+ f1_taesd_enc = False
701
+ f1_taesd_dec = False
702
+
703
+ for v in approx_vaes:
704
+ if v.startswith("taesd_decoder."):
705
+ sd1_taesd_dec = True
706
+ elif v.startswith("taesd_encoder."):
707
+ sd1_taesd_enc = True
708
+ elif v.startswith("taesdxl_decoder."):
709
+ sdxl_taesd_dec = True
710
+ elif v.startswith("taesdxl_encoder."):
711
+ sdxl_taesd_enc = True
712
+ elif v.startswith("taesd3_decoder."):
713
+ sd3_taesd_dec = True
714
+ elif v.startswith("taesd3_encoder."):
715
+ sd3_taesd_enc = True
716
+ elif v.startswith("taef1_encoder."):
717
+ f1_taesd_dec = True
718
+ elif v.startswith("taef1_decoder."):
719
+ f1_taesd_enc = True
720
+ if sd1_taesd_dec and sd1_taesd_enc:
721
+ vaes.append("taesd")
722
+ if sdxl_taesd_dec and sdxl_taesd_enc:
723
+ vaes.append("taesdxl")
724
+ if sd3_taesd_dec and sd3_taesd_enc:
725
+ vaes.append("taesd3")
726
+ if f1_taesd_dec and f1_taesd_enc:
727
+ vaes.append("taef1")
728
+ return vaes
729
+
730
+ @staticmethod
731
+ def load_taesd(name):
732
+ sd = {}
733
+ approx_vaes = folder_paths.get_filename_list("vae_approx")
734
+
735
+ encoder = next(filter(lambda a: a.startswith("{}_encoder.".format(name)), approx_vaes))
736
+ decoder = next(filter(lambda a: a.startswith("{}_decoder.".format(name)), approx_vaes))
737
+
738
+ enc = comfy.utils.load_torch_file(folder_paths.get_full_path_or_raise("vae_approx", encoder))
739
+ for k in enc:
740
+ sd["taesd_encoder.{}".format(k)] = enc[k]
741
+
742
+ dec = comfy.utils.load_torch_file(folder_paths.get_full_path_or_raise("vae_approx", decoder))
743
+ for k in dec:
744
+ sd["taesd_decoder.{}".format(k)] = dec[k]
745
+
746
+ if name == "taesd":
747
+ sd["vae_scale"] = torch.tensor(0.18215)
748
+ sd["vae_shift"] = torch.tensor(0.0)
749
+ elif name == "taesdxl":
750
+ sd["vae_scale"] = torch.tensor(0.13025)
751
+ sd["vae_shift"] = torch.tensor(0.0)
752
+ elif name == "taesd3":
753
+ sd["vae_scale"] = torch.tensor(1.5305)
754
+ sd["vae_shift"] = torch.tensor(0.0609)
755
+ elif name == "taef1":
756
+ sd["vae_scale"] = torch.tensor(0.3611)
757
+ sd["vae_shift"] = torch.tensor(0.1159)
758
+ return sd
759
+
760
+ @classmethod
761
+ def INPUT_TYPES(s):
762
+ return {"required": { "vae_name": (s.vae_list(), )}}
763
+ RETURN_TYPES = ("VAE",)
764
+ FUNCTION = "load_vae"
765
+
766
+ CATEGORY = "loaders"
767
+
768
+ #TODO: scale factor?
769
+ def load_vae(self, vae_name):
770
+ if vae_name in ["taesd", "taesdxl", "taesd3", "taef1"]:
771
+ sd = self.load_taesd(vae_name)
772
+ else:
773
+ vae_path = folder_paths.get_full_path_or_raise("vae", vae_name)
774
+ sd = comfy.utils.load_torch_file(vae_path)
775
+ vae = comfy.sd.VAE(sd=sd)
776
+ vae.throw_exception_if_invalid()
777
+ return (vae,)
778
+
779
+ class ControlNetLoader:
780
+ @classmethod
781
+ def INPUT_TYPES(s):
782
+ return {"required": { "control_net_name": (folder_paths.get_filename_list("controlnet"), )}}
783
+
784
+ RETURN_TYPES = ("CONTROL_NET",)
785
+ FUNCTION = "load_controlnet"
786
+
787
+ CATEGORY = "loaders"
788
+
789
+ def load_controlnet(self, control_net_name):
790
+ controlnet_path = folder_paths.get_full_path_or_raise("controlnet", control_net_name)
791
+ controlnet = comfy.controlnet.load_controlnet(controlnet_path)
792
+ if controlnet is None:
793
+ raise RuntimeError("ERROR: controlnet file is invalid and does not contain a valid controlnet model.")
794
+ return (controlnet,)
795
+
796
+ class DiffControlNetLoader:
797
+ @classmethod
798
+ def INPUT_TYPES(s):
799
+ return {"required": { "model": ("MODEL",),
800
+ "control_net_name": (folder_paths.get_filename_list("controlnet"), )}}
801
+
802
+ RETURN_TYPES = ("CONTROL_NET",)
803
+ FUNCTION = "load_controlnet"
804
+
805
+ CATEGORY = "loaders"
806
+
807
+ def load_controlnet(self, model, control_net_name):
808
+ controlnet_path = folder_paths.get_full_path_or_raise("controlnet", control_net_name)
809
+ controlnet = comfy.controlnet.load_controlnet(controlnet_path, model)
810
+ return (controlnet,)
811
+
812
+
813
+ class ControlNetApply:
814
+ @classmethod
815
+ def INPUT_TYPES(s):
816
+ return {"required": {"conditioning": ("CONDITIONING", ),
817
+ "control_net": ("CONTROL_NET", ),
818
+ "image": ("IMAGE", ),
819
+ "strength": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 10.0, "step": 0.01})
820
+ }}
821
+ RETURN_TYPES = ("CONDITIONING",)
822
+ FUNCTION = "apply_controlnet"
823
+
824
+ DEPRECATED = True
825
+ CATEGORY = "conditioning/controlnet"
826
+
827
+ def apply_controlnet(self, conditioning, control_net, image, strength):
828
+ if strength == 0:
829
+ return (conditioning, )
830
+
831
+ c = []
832
+ control_hint = image.movedim(-1,1)
833
+ for t in conditioning:
834
+ n = [t[0], t[1].copy()]
835
+ c_net = control_net.copy().set_cond_hint(control_hint, strength)
836
+ if 'control' in t[1]:
837
+ c_net.set_previous_controlnet(t[1]['control'])
838
+ n[1]['control'] = c_net
839
+ n[1]['control_apply_to_uncond'] = True
840
+ c.append(n)
841
+ return (c, )
842
+
843
+
844
+ class ControlNetApplyAdvanced:
845
+ @classmethod
846
+ def INPUT_TYPES(s):
847
+ return {"required": {"positive": ("CONDITIONING", ),
848
+ "negative": ("CONDITIONING", ),
849
+ "control_net": ("CONTROL_NET", ),
850
+ "image": ("IMAGE", ),
851
+ "strength": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 10.0, "step": 0.01}),
852
+ "start_percent": ("FLOAT", {"default": 0.0, "min": 0.0, "max": 1.0, "step": 0.001}),
853
+ "end_percent": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 1.0, "step": 0.001})
854
+ },
855
+ "optional": {"vae": ("VAE", ),
856
+ }
857
+ }
858
+
859
+ RETURN_TYPES = ("CONDITIONING","CONDITIONING")
860
+ RETURN_NAMES = ("positive", "negative")
861
+ FUNCTION = "apply_controlnet"
862
+
863
+ CATEGORY = "conditioning/controlnet"
864
+
865
+ def apply_controlnet(self, positive, negative, control_net, image, strength, start_percent, end_percent, vae=None, extra_concat=[]):
866
+ if strength == 0:
867
+ return (positive, negative)
868
+
869
+ control_hint = image.movedim(-1,1)
870
+ cnets = {}
871
+
872
+ out = []
873
+ for conditioning in [positive, negative]:
874
+ c = []
875
+ for t in conditioning:
876
+ d = t[1].copy()
877
+
878
+ prev_cnet = d.get('control', None)
879
+ if prev_cnet in cnets:
880
+ c_net = cnets[prev_cnet]
881
+ else:
882
+ c_net = control_net.copy().set_cond_hint(control_hint, strength, (start_percent, end_percent), vae=vae, extra_concat=extra_concat)
883
+ c_net.set_previous_controlnet(prev_cnet)
884
+ cnets[prev_cnet] = c_net
885
+
886
+ d['control'] = c_net
887
+ d['control_apply_to_uncond'] = False
888
+ n = [t[0], d]
889
+ c.append(n)
890
+ out.append(c)
891
+ return (out[0], out[1])
892
+
893
+
894
+ class UNETLoader:
895
+ @classmethod
896
+ def INPUT_TYPES(s):
897
+ return {"required": { "unet_name": (folder_paths.get_filename_list("diffusion_models"), ),
898
+ "weight_dtype": (["default", "fp8_e4m3fn", "fp8_e4m3fn_fast", "fp8_e5m2"],)
899
+ }}
900
+ RETURN_TYPES = ("MODEL",)
901
+ FUNCTION = "load_unet"
902
+
903
+ CATEGORY = "advanced/loaders"
904
+
905
+ def load_unet(self, unet_name, weight_dtype):
906
+ model_options = {}
907
+ if weight_dtype == "fp8_e4m3fn":
908
+ model_options["dtype"] = torch.float8_e4m3fn
909
+ elif weight_dtype == "fp8_e4m3fn_fast":
910
+ model_options["dtype"] = torch.float8_e4m3fn
911
+ model_options["fp8_optimizations"] = True
912
+ elif weight_dtype == "fp8_e5m2":
913
+ model_options["dtype"] = torch.float8_e5m2
914
+
915
+ unet_path = folder_paths.get_full_path_or_raise("diffusion_models", unet_name)
916
+ model = comfy.sd.load_diffusion_model(unet_path, model_options=model_options)
917
+ return (model,)
918
+
919
+ class CLIPLoader:
920
+ @classmethod
921
+ def INPUT_TYPES(s):
922
+ return {"required": { "clip_name": (folder_paths.get_filename_list("text_encoders"), ),
923
+ "type": (["stable_diffusion", "stable_cascade", "sd3", "stable_audio", "mochi", "ltxv", "pixart", "cosmos", "lumina2", "wan", "hidream", "chroma", "ace", "omnigen2"], ),
924
+ },
925
+ "optional": {
926
+ "device": (["default", "cpu"], {"advanced": True}),
927
+ }}
928
+ RETURN_TYPES = ("CLIP",)
929
+ FUNCTION = "load_clip"
930
+
931
+ CATEGORY = "advanced/loaders"
932
+
933
+ DESCRIPTION = "[Recipes]\n\nstable_diffusion: clip-l\nstable_cascade: clip-g\nsd3: t5 xxl/ clip-g / clip-l\nstable_audio: t5 base\nmochi: t5 xxl\ncosmos: old t5 xxl\nlumina2: gemma 2 2B\nwan: umt5 xxl\n hidream: llama-3.1 (Recommend) or t5\nomnigen2: qwen vl 2.5 3B"
934
+
935
+ def load_clip(self, clip_name, type="stable_diffusion", device="default"):
936
+ clip_type = getattr(comfy.sd.CLIPType, type.upper(), comfy.sd.CLIPType.STABLE_DIFFUSION)
937
+
938
+ model_options = {}
939
+ if device == "cpu":
940
+ model_options["load_device"] = model_options["offload_device"] = torch.device("cpu")
941
+
942
+ clip_path = folder_paths.get_full_path_or_raise("text_encoders", clip_name)
943
+ clip = comfy.sd.load_clip(ckpt_paths=[clip_path], embedding_directory=folder_paths.get_folder_paths("embeddings"), clip_type=clip_type, model_options=model_options)
944
+ return (clip,)
945
+
946
+ class DualCLIPLoader:
947
+ @classmethod
948
+ def INPUT_TYPES(s):
949
+ return {"required": { "clip_name1": (folder_paths.get_filename_list("text_encoders"), ),
950
+ "clip_name2": (folder_paths.get_filename_list("text_encoders"), ),
951
+ "type": (["sdxl", "sd3", "flux", "hunyuan_video", "hidream"], ),
952
+ },
953
+ "optional": {
954
+ "device": (["default", "cpu"], {"advanced": True}),
955
+ }}
956
+ RETURN_TYPES = ("CLIP",)
957
+ FUNCTION = "load_clip"
958
+
959
+ CATEGORY = "advanced/loaders"
960
+
961
+ DESCRIPTION = "[Recipes]\n\nsdxl: clip-l, clip-g\nsd3: clip-l, clip-g / clip-l, t5 / clip-g, t5\nflux: clip-l, t5\nhidream: at least one of t5 or llama, recommended t5 and llama"
962
+
963
+ def load_clip(self, clip_name1, clip_name2, type, device="default"):
964
+ clip_type = getattr(comfy.sd.CLIPType, type.upper(), comfy.sd.CLIPType.STABLE_DIFFUSION)
965
+
966
+ clip_path1 = folder_paths.get_full_path_or_raise("text_encoders", clip_name1)
967
+ clip_path2 = folder_paths.get_full_path_or_raise("text_encoders", clip_name2)
968
+
969
+ model_options = {}
970
+ if device == "cpu":
971
+ model_options["load_device"] = model_options["offload_device"] = torch.device("cpu")
972
+
973
+ clip = comfy.sd.load_clip(ckpt_paths=[clip_path1, clip_path2], embedding_directory=folder_paths.get_folder_paths("embeddings"), clip_type=clip_type, model_options=model_options)
974
+ return (clip,)
975
+
976
+ class CLIPVisionLoader:
977
+ @classmethod
978
+ def INPUT_TYPES(s):
979
+ return {"required": { "clip_name": (folder_paths.get_filename_list("clip_vision"), ),
980
+ }}
981
+ RETURN_TYPES = ("CLIP_VISION",)
982
+ FUNCTION = "load_clip"
983
+
984
+ CATEGORY = "loaders"
985
+
986
+ def load_clip(self, clip_name):
987
+ clip_path = folder_paths.get_full_path_or_raise("clip_vision", clip_name)
988
+ clip_vision = comfy.clip_vision.load(clip_path)
989
+ if clip_vision is None:
990
+ raise RuntimeError("ERROR: clip vision file is invalid and does not contain a valid vision model.")
991
+ return (clip_vision,)
992
+
993
+ class CLIPVisionEncode:
994
+ @classmethod
995
+ def INPUT_TYPES(s):
996
+ return {"required": { "clip_vision": ("CLIP_VISION",),
997
+ "image": ("IMAGE",),
998
+ "crop": (["center", "none"],)
999
+ }}
1000
+ RETURN_TYPES = ("CLIP_VISION_OUTPUT",)
1001
+ FUNCTION = "encode"
1002
+
1003
+ CATEGORY = "conditioning"
1004
+
1005
+ def encode(self, clip_vision, image, crop):
1006
+ crop_image = True
1007
+ if crop != "center":
1008
+ crop_image = False
1009
+ output = clip_vision.encode_image(image, crop=crop_image)
1010
+ return (output,)
1011
+
1012
+ class StyleModelLoader:
1013
+ @classmethod
1014
+ def INPUT_TYPES(s):
1015
+ return {"required": { "style_model_name": (folder_paths.get_filename_list("style_models"), )}}
1016
+
1017
+ RETURN_TYPES = ("STYLE_MODEL",)
1018
+ FUNCTION = "load_style_model"
1019
+
1020
+ CATEGORY = "loaders"
1021
+
1022
+ def load_style_model(self, style_model_name):
1023
+ style_model_path = folder_paths.get_full_path_or_raise("style_models", style_model_name)
1024
+ style_model = comfy.sd.load_style_model(style_model_path)
1025
+ return (style_model,)
1026
+
1027
+
1028
+ class StyleModelApply:
1029
+ @classmethod
1030
+ def INPUT_TYPES(s):
1031
+ return {"required": {"conditioning": ("CONDITIONING", ),
1032
+ "style_model": ("STYLE_MODEL", ),
1033
+ "clip_vision_output": ("CLIP_VISION_OUTPUT", ),
1034
+ "strength": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 10.0, "step": 0.001}),
1035
+ "strength_type": (["multiply", "attn_bias"], ),
1036
+ }}
1037
+ RETURN_TYPES = ("CONDITIONING",)
1038
+ FUNCTION = "apply_stylemodel"
1039
+
1040
+ CATEGORY = "conditioning/style_model"
1041
+
1042
+ def apply_stylemodel(self, conditioning, style_model, clip_vision_output, strength, strength_type):
1043
+ cond = style_model.get_cond(clip_vision_output).flatten(start_dim=0, end_dim=1).unsqueeze(dim=0)
1044
+ if strength_type == "multiply":
1045
+ cond *= strength
1046
+
1047
+ n = cond.shape[1]
1048
+ c_out = []
1049
+ for t in conditioning:
1050
+ (txt, keys) = t
1051
+ keys = keys.copy()
1052
+ # even if the strength is 1.0 (i.e, no change), if there's already a mask, we have to add to it
1053
+ if "attention_mask" in keys or (strength_type == "attn_bias" and strength != 1.0):
1054
+ # math.log raises an error if the argument is zero
1055
+ # torch.log returns -inf, which is what we want
1056
+ attn_bias = torch.log(torch.Tensor([strength if strength_type == "attn_bias" else 1.0]))
1057
+ # get the size of the mask image
1058
+ mask_ref_size = keys.get("attention_mask_img_shape", (1, 1))
1059
+ n_ref = mask_ref_size[0] * mask_ref_size[1]
1060
+ n_txt = txt.shape[1]
1061
+ # grab the existing mask
1062
+ mask = keys.get("attention_mask", None)
1063
+ # create a default mask if it doesn't exist
1064
+ if mask is None:
1065
+ mask = torch.zeros((txt.shape[0], n_txt + n_ref, n_txt + n_ref), dtype=torch.float16)
1066
+ # convert the mask dtype, because it might be boolean
1067
+ # we want it to be interpreted as a bias
1068
+ if mask.dtype == torch.bool:
1069
+ # log(True) = log(1) = 0
1070
+ # log(False) = log(0) = -inf
1071
+ mask = torch.log(mask.to(dtype=torch.float16))
1072
+ # now we make the mask bigger to add space for our new tokens
1073
+ new_mask = torch.zeros((txt.shape[0], n_txt + n + n_ref, n_txt + n + n_ref), dtype=torch.float16)
1074
+ # copy over the old mask, in quandrants
1075
+ new_mask[:, :n_txt, :n_txt] = mask[:, :n_txt, :n_txt]
1076
+ new_mask[:, :n_txt, n_txt+n:] = mask[:, :n_txt, n_txt:]
1077
+ new_mask[:, n_txt+n:, :n_txt] = mask[:, n_txt:, :n_txt]
1078
+ new_mask[:, n_txt+n:, n_txt+n:] = mask[:, n_txt:, n_txt:]
1079
+ # now fill in the attention bias to our redux tokens
1080
+ new_mask[:, :n_txt, n_txt:n_txt+n] = attn_bias
1081
+ new_mask[:, n_txt+n:, n_txt:n_txt+n] = attn_bias
1082
+ keys["attention_mask"] = new_mask.to(txt.device)
1083
+ keys["attention_mask_img_shape"] = mask_ref_size
1084
+
1085
+ c_out.append([torch.cat((txt, cond), dim=1), keys])
1086
+
1087
+ return (c_out,)
1088
+
1089
+ class unCLIPConditioning:
1090
+ @classmethod
1091
+ def INPUT_TYPES(s):
1092
+ return {"required": {"conditioning": ("CONDITIONING", ),
1093
+ "clip_vision_output": ("CLIP_VISION_OUTPUT", ),
1094
+ "strength": ("FLOAT", {"default": 1.0, "min": -10.0, "max": 10.0, "step": 0.01}),
1095
+ "noise_augmentation": ("FLOAT", {"default": 0.0, "min": 0.0, "max": 1.0, "step": 0.01}),
1096
+ }}
1097
+ RETURN_TYPES = ("CONDITIONING",)
1098
+ FUNCTION = "apply_adm"
1099
+
1100
+ CATEGORY = "conditioning"
1101
+
1102
+ def apply_adm(self, conditioning, clip_vision_output, strength, noise_augmentation):
1103
+ if strength == 0:
1104
+ return (conditioning, )
1105
+
1106
+ c = node_helpers.conditioning_set_values(conditioning, {"unclip_conditioning": [{"clip_vision_output": clip_vision_output, "strength": strength, "noise_augmentation": noise_augmentation}]}, append=True)
1107
+ return (c, )
1108
+
1109
+ class GLIGENLoader:
1110
+ @classmethod
1111
+ def INPUT_TYPES(s):
1112
+ return {"required": { "gligen_name": (folder_paths.get_filename_list("gligen"), )}}
1113
+
1114
+ RETURN_TYPES = ("GLIGEN",)
1115
+ FUNCTION = "load_gligen"
1116
+
1117
+ CATEGORY = "loaders"
1118
+
1119
+ def load_gligen(self, gligen_name):
1120
+ gligen_path = folder_paths.get_full_path_or_raise("gligen", gligen_name)
1121
+ gligen = comfy.sd.load_gligen(gligen_path)
1122
+ return (gligen,)
1123
+
1124
+ class GLIGENTextBoxApply:
1125
+ @classmethod
1126
+ def INPUT_TYPES(s):
1127
+ return {"required": {"conditioning_to": ("CONDITIONING", ),
1128
+ "clip": ("CLIP", ),
1129
+ "gligen_textbox_model": ("GLIGEN", ),
1130
+ "text": ("STRING", {"multiline": True, "dynamicPrompts": True}),
1131
+ "width": ("INT", {"default": 64, "min": 8, "max": MAX_RESOLUTION, "step": 8}),
1132
+ "height": ("INT", {"default": 64, "min": 8, "max": MAX_RESOLUTION, "step": 8}),
1133
+ "x": ("INT", {"default": 0, "min": 0, "max": MAX_RESOLUTION, "step": 8}),
1134
+ "y": ("INT", {"default": 0, "min": 0, "max": MAX_RESOLUTION, "step": 8}),
1135
+ }}
1136
+ RETURN_TYPES = ("CONDITIONING",)
1137
+ FUNCTION = "append"
1138
+
1139
+ CATEGORY = "conditioning/gligen"
1140
+
1141
+ def append(self, conditioning_to, clip, gligen_textbox_model, text, width, height, x, y):
1142
+ c = []
1143
+ cond, cond_pooled = clip.encode_from_tokens(clip.tokenize(text), return_pooled="unprojected")
1144
+ for t in conditioning_to:
1145
+ n = [t[0], t[1].copy()]
1146
+ position_params = [(cond_pooled, height // 8, width // 8, y // 8, x // 8)]
1147
+ prev = []
1148
+ if "gligen" in n[1]:
1149
+ prev = n[1]['gligen'][2]
1150
+
1151
+ n[1]['gligen'] = ("position", gligen_textbox_model, prev + position_params)
1152
+ c.append(n)
1153
+ return (c, )
1154
+
1155
+ class EmptyLatentImage:
1156
+ def __init__(self):
1157
+ self.device = comfy.model_management.intermediate_device()
1158
+
1159
+ @classmethod
1160
+ def INPUT_TYPES(s):
1161
+ return {
1162
+ "required": {
1163
+ "width": ("INT", {"default": 512, "min": 16, "max": MAX_RESOLUTION, "step": 8, "tooltip": "The width of the latent images in pixels."}),
1164
+ "height": ("INT", {"default": 512, "min": 16, "max": MAX_RESOLUTION, "step": 8, "tooltip": "The height of the latent images in pixels."}),
1165
+ "batch_size": ("INT", {"default": 1, "min": 1, "max": 4096, "tooltip": "The number of latent images in the batch."})
1166
+ }
1167
+ }
1168
+ RETURN_TYPES = ("LATENT",)
1169
+ OUTPUT_TOOLTIPS = ("The empty latent image batch.",)
1170
+ FUNCTION = "generate"
1171
+
1172
+ CATEGORY = "latent"
1173
+ DESCRIPTION = "Create a new batch of empty latent images to be denoised via sampling."
1174
+
1175
+ def generate(self, width, height, batch_size=1):
1176
+ latent = torch.zeros([batch_size, 4, height // 8, width // 8], device=self.device)
1177
+ return ({"samples":latent}, )
1178
+
1179
+
1180
+ class LatentFromBatch:
1181
+ @classmethod
1182
+ def INPUT_TYPES(s):
1183
+ return {"required": { "samples": ("LATENT",),
1184
+ "batch_index": ("INT", {"default": 0, "min": 0, "max": 63}),
1185
+ "length": ("INT", {"default": 1, "min": 1, "max": 64}),
1186
+ }}
1187
+ RETURN_TYPES = ("LATENT",)
1188
+ FUNCTION = "frombatch"
1189
+
1190
+ CATEGORY = "latent/batch"
1191
+
1192
+ def frombatch(self, samples, batch_index, length):
1193
+ s = samples.copy()
1194
+ s_in = samples["samples"]
1195
+ batch_index = min(s_in.shape[0] - 1, batch_index)
1196
+ length = min(s_in.shape[0] - batch_index, length)
1197
+ s["samples"] = s_in[batch_index:batch_index + length].clone()
1198
+ if "noise_mask" in samples:
1199
+ masks = samples["noise_mask"]
1200
+ if masks.shape[0] == 1:
1201
+ s["noise_mask"] = masks.clone()
1202
+ else:
1203
+ if masks.shape[0] < s_in.shape[0]:
1204
+ masks = masks.repeat(math.ceil(s_in.shape[0] / masks.shape[0]), 1, 1, 1)[:s_in.shape[0]]
1205
+ s["noise_mask"] = masks[batch_index:batch_index + length].clone()
1206
+ if "batch_index" not in s:
1207
+ s["batch_index"] = [x for x in range(batch_index, batch_index+length)]
1208
+ else:
1209
+ s["batch_index"] = samples["batch_index"][batch_index:batch_index + length]
1210
+ return (s,)
1211
+
1212
+ class RepeatLatentBatch:
1213
+ @classmethod
1214
+ def INPUT_TYPES(s):
1215
+ return {"required": { "samples": ("LATENT",),
1216
+ "amount": ("INT", {"default": 1, "min": 1, "max": 64}),
1217
+ }}
1218
+ RETURN_TYPES = ("LATENT",)
1219
+ FUNCTION = "repeat"
1220
+
1221
+ CATEGORY = "latent/batch"
1222
+
1223
+ def repeat(self, samples, amount):
1224
+ s = samples.copy()
1225
+ s_in = samples["samples"]
1226
+
1227
+ s["samples"] = s_in.repeat((amount, 1,1,1))
1228
+ if "noise_mask" in samples and samples["noise_mask"].shape[0] > 1:
1229
+ masks = samples["noise_mask"]
1230
+ if masks.shape[0] < s_in.shape[0]:
1231
+ masks = masks.repeat(math.ceil(s_in.shape[0] / masks.shape[0]), 1, 1, 1)[:s_in.shape[0]]
1232
+ s["noise_mask"] = samples["noise_mask"].repeat((amount, 1,1,1))
1233
+ if "batch_index" in s:
1234
+ offset = max(s["batch_index"]) - min(s["batch_index"]) + 1
1235
+ s["batch_index"] = s["batch_index"] + [x + (i * offset) for i in range(1, amount) for x in s["batch_index"]]
1236
+ return (s,)
1237
+
1238
+ class LatentUpscale:
1239
+ upscale_methods = ["nearest-exact", "bilinear", "area", "bicubic", "bislerp"]
1240
+ crop_methods = ["disabled", "center"]
1241
+
1242
+ @classmethod
1243
+ def INPUT_TYPES(s):
1244
+ return {"required": { "samples": ("LATENT",), "upscale_method": (s.upscale_methods,),
1245
+ "width": ("INT", {"default": 512, "min": 0, "max": MAX_RESOLUTION, "step": 8}),
1246
+ "height": ("INT", {"default": 512, "min": 0, "max": MAX_RESOLUTION, "step": 8}),
1247
+ "crop": (s.crop_methods,)}}
1248
+ RETURN_TYPES = ("LATENT",)
1249
+ FUNCTION = "upscale"
1250
+
1251
+ CATEGORY = "latent"
1252
+
1253
+ def upscale(self, samples, upscale_method, width, height, crop):
1254
+ if width == 0 and height == 0:
1255
+ s = samples
1256
+ else:
1257
+ s = samples.copy()
1258
+
1259
+ if width == 0:
1260
+ height = max(64, height)
1261
+ width = max(64, round(samples["samples"].shape[-1] * height / samples["samples"].shape[-2]))
1262
+ elif height == 0:
1263
+ width = max(64, width)
1264
+ height = max(64, round(samples["samples"].shape[-2] * width / samples["samples"].shape[-1]))
1265
+ else:
1266
+ width = max(64, width)
1267
+ height = max(64, height)
1268
+
1269
+ s["samples"] = comfy.utils.common_upscale(samples["samples"], width // 8, height // 8, upscale_method, crop)
1270
+ return (s,)
1271
+
1272
+ class LatentUpscaleBy:
1273
+ upscale_methods = ["nearest-exact", "bilinear", "area", "bicubic", "bislerp"]
1274
+
1275
+ @classmethod
1276
+ def INPUT_TYPES(s):
1277
+ return {"required": { "samples": ("LATENT",), "upscale_method": (s.upscale_methods,),
1278
+ "scale_by": ("FLOAT", {"default": 1.5, "min": 0.01, "max": 8.0, "step": 0.01}),}}
1279
+ RETURN_TYPES = ("LATENT",)
1280
+ FUNCTION = "upscale"
1281
+
1282
+ CATEGORY = "latent"
1283
+
1284
+ def upscale(self, samples, upscale_method, scale_by):
1285
+ s = samples.copy()
1286
+ width = round(samples["samples"].shape[-1] * scale_by)
1287
+ height = round(samples["samples"].shape[-2] * scale_by)
1288
+ s["samples"] = comfy.utils.common_upscale(samples["samples"], width, height, upscale_method, "disabled")
1289
+ return (s,)
1290
+
1291
+ class LatentRotate:
1292
+ @classmethod
1293
+ def INPUT_TYPES(s):
1294
+ return {"required": { "samples": ("LATENT",),
1295
+ "rotation": (["none", "90 degrees", "180 degrees", "270 degrees"],),
1296
+ }}
1297
+ RETURN_TYPES = ("LATENT",)
1298
+ FUNCTION = "rotate"
1299
+
1300
+ CATEGORY = "latent/transform"
1301
+
1302
+ def rotate(self, samples, rotation):
1303
+ s = samples.copy()
1304
+ rotate_by = 0
1305
+ if rotation.startswith("90"):
1306
+ rotate_by = 1
1307
+ elif rotation.startswith("180"):
1308
+ rotate_by = 2
1309
+ elif rotation.startswith("270"):
1310
+ rotate_by = 3
1311
+
1312
+ s["samples"] = torch.rot90(samples["samples"], k=rotate_by, dims=[3, 2])
1313
+ return (s,)
1314
+
1315
+ class LatentFlip:
1316
+ @classmethod
1317
+ def INPUT_TYPES(s):
1318
+ return {"required": { "samples": ("LATENT",),
1319
+ "flip_method": (["x-axis: vertically", "y-axis: horizontally"],),
1320
+ }}
1321
+ RETURN_TYPES = ("LATENT",)
1322
+ FUNCTION = "flip"
1323
+
1324
+ CATEGORY = "latent/transform"
1325
+
1326
+ def flip(self, samples, flip_method):
1327
+ s = samples.copy()
1328
+ if flip_method.startswith("x"):
1329
+ s["samples"] = torch.flip(samples["samples"], dims=[2])
1330
+ elif flip_method.startswith("y"):
1331
+ s["samples"] = torch.flip(samples["samples"], dims=[3])
1332
+
1333
+ return (s,)
1334
+
1335
+ class LatentComposite:
1336
+ @classmethod
1337
+ def INPUT_TYPES(s):
1338
+ return {"required": { "samples_to": ("LATENT",),
1339
+ "samples_from": ("LATENT",),
1340
+ "x": ("INT", {"default": 0, "min": 0, "max": MAX_RESOLUTION, "step": 8}),
1341
+ "y": ("INT", {"default": 0, "min": 0, "max": MAX_RESOLUTION, "step": 8}),
1342
+ "feather": ("INT", {"default": 0, "min": 0, "max": MAX_RESOLUTION, "step": 8}),
1343
+ }}
1344
+ RETURN_TYPES = ("LATENT",)
1345
+ FUNCTION = "composite"
1346
+
1347
+ CATEGORY = "latent"
1348
+
1349
+ def composite(self, samples_to, samples_from, x, y, composite_method="normal", feather=0):
1350
+ x = x // 8
1351
+ y = y // 8
1352
+ feather = feather // 8
1353
+ samples_out = samples_to.copy()
1354
+ s = samples_to["samples"].clone()
1355
+ samples_to = samples_to["samples"]
1356
+ samples_from = samples_from["samples"]
1357
+ if feather == 0:
1358
+ s[:,:,y:y+samples_from.shape[2],x:x+samples_from.shape[3]] = samples_from[:,:,:samples_to.shape[2] - y, :samples_to.shape[3] - x]
1359
+ else:
1360
+ samples_from = samples_from[:,:,:samples_to.shape[2] - y, :samples_to.shape[3] - x]
1361
+ mask = torch.ones_like(samples_from)
1362
+ for t in range(feather):
1363
+ if y != 0:
1364
+ mask[:,:,t:1+t,:] *= ((1.0/feather) * (t + 1))
1365
+
1366
+ if y + samples_from.shape[2] < samples_to.shape[2]:
1367
+ mask[:,:,mask.shape[2] -1 -t: mask.shape[2]-t,:] *= ((1.0/feather) * (t + 1))
1368
+ if x != 0:
1369
+ mask[:,:,:,t:1+t] *= ((1.0/feather) * (t + 1))
1370
+ if x + samples_from.shape[3] < samples_to.shape[3]:
1371
+ mask[:,:,:,mask.shape[3]- 1 - t: mask.shape[3]- t] *= ((1.0/feather) * (t + 1))
1372
+ rev_mask = torch.ones_like(mask) - mask
1373
+ s[:,:,y:y+samples_from.shape[2],x:x+samples_from.shape[3]] = samples_from[:,:,:samples_to.shape[2] - y, :samples_to.shape[3] - x] * mask + s[:,:,y:y+samples_from.shape[2],x:x+samples_from.shape[3]] * rev_mask
1374
+ samples_out["samples"] = s
1375
+ return (samples_out,)
1376
+
1377
+ class LatentBlend:
1378
+ @classmethod
1379
+ def INPUT_TYPES(s):
1380
+ return {"required": {
1381
+ "samples1": ("LATENT",),
1382
+ "samples2": ("LATENT",),
1383
+ "blend_factor": ("FLOAT", {
1384
+ "default": 0.5,
1385
+ "min": 0,
1386
+ "max": 1,
1387
+ "step": 0.01
1388
+ }),
1389
+ }}
1390
+
1391
+ RETURN_TYPES = ("LATENT",)
1392
+ FUNCTION = "blend"
1393
+
1394
+ CATEGORY = "_for_testing"
1395
+
1396
+ def blend(self, samples1, samples2, blend_factor:float, blend_mode: str="normal"):
1397
+
1398
+ samples_out = samples1.copy()
1399
+ samples1 = samples1["samples"]
1400
+ samples2 = samples2["samples"]
1401
+
1402
+ if samples1.shape != samples2.shape:
1403
+ samples2.permute(0, 3, 1, 2)
1404
+ samples2 = comfy.utils.common_upscale(samples2, samples1.shape[3], samples1.shape[2], 'bicubic', crop='center')
1405
+ samples2.permute(0, 2, 3, 1)
1406
+
1407
+ samples_blended = self.blend_mode(samples1, samples2, blend_mode)
1408
+ samples_blended = samples1 * blend_factor + samples_blended * (1 - blend_factor)
1409
+ samples_out["samples"] = samples_blended
1410
+ return (samples_out,)
1411
+
1412
+ def blend_mode(self, img1, img2, mode):
1413
+ if mode == "normal":
1414
+ return img2
1415
+ else:
1416
+ raise ValueError(f"Unsupported blend mode: {mode}")
1417
+
1418
+ class LatentCrop:
1419
+ @classmethod
1420
+ def INPUT_TYPES(s):
1421
+ return {"required": { "samples": ("LATENT",),
1422
+ "width": ("INT", {"default": 512, "min": 64, "max": MAX_RESOLUTION, "step": 8}),
1423
+ "height": ("INT", {"default": 512, "min": 64, "max": MAX_RESOLUTION, "step": 8}),
1424
+ "x": ("INT", {"default": 0, "min": 0, "max": MAX_RESOLUTION, "step": 8}),
1425
+ "y": ("INT", {"default": 0, "min": 0, "max": MAX_RESOLUTION, "step": 8}),
1426
+ }}
1427
+ RETURN_TYPES = ("LATENT",)
1428
+ FUNCTION = "crop"
1429
+
1430
+ CATEGORY = "latent/transform"
1431
+
1432
+ def crop(self, samples, width, height, x, y):
1433
+ s = samples.copy()
1434
+ samples = samples['samples']
1435
+ x = x // 8
1436
+ y = y // 8
1437
+
1438
+ #enfonce minimum size of 64
1439
+ if x > (samples.shape[3] - 8):
1440
+ x = samples.shape[3] - 8
1441
+ if y > (samples.shape[2] - 8):
1442
+ y = samples.shape[2] - 8
1443
+
1444
+ new_height = height // 8
1445
+ new_width = width // 8
1446
+ to_x = new_width + x
1447
+ to_y = new_height + y
1448
+ s['samples'] = samples[:,:,y:to_y, x:to_x]
1449
+ return (s,)
1450
+
1451
+ class SetLatentNoiseMask:
1452
+ @classmethod
1453
+ def INPUT_TYPES(s):
1454
+ return {"required": { "samples": ("LATENT",),
1455
+ "mask": ("MASK",),
1456
+ }}
1457
+ RETURN_TYPES = ("LATENT",)
1458
+ FUNCTION = "set_mask"
1459
+
1460
+ CATEGORY = "latent/inpaint"
1461
+
1462
+ def set_mask(self, samples, mask):
1463
+ s = samples.copy()
1464
+ s["noise_mask"] = mask.reshape((-1, 1, mask.shape[-2], mask.shape[-1]))
1465
+ return (s,)
1466
+
1467
+ def common_ksampler(model, seed, steps, cfg, sampler_name, scheduler, positive, negative, latent, denoise=1.0, disable_noise=False, start_step=None, last_step=None, force_full_denoise=False):
1468
+ latent_image = latent["samples"]
1469
+ latent_image = comfy.sample.fix_empty_latent_channels(model, latent_image)
1470
+
1471
+ if disable_noise:
1472
+ noise = torch.zeros(latent_image.size(), dtype=latent_image.dtype, layout=latent_image.layout, device="cpu")
1473
+ else:
1474
+ batch_inds = latent["batch_index"] if "batch_index" in latent else None
1475
+ noise = comfy.sample.prepare_noise(latent_image, seed, batch_inds)
1476
+
1477
+ noise_mask = None
1478
+ if "noise_mask" in latent:
1479
+ noise_mask = latent["noise_mask"]
1480
+
1481
+ callback = latent_preview.prepare_callback(model, steps)
1482
+ disable_pbar = not comfy.utils.PROGRESS_BAR_ENABLED
1483
+ samples = comfy.sample.sample(model, noise, steps, cfg, sampler_name, scheduler, positive, negative, latent_image,
1484
+ denoise=denoise, disable_noise=disable_noise, start_step=start_step, last_step=last_step,
1485
+ force_full_denoise=force_full_denoise, noise_mask=noise_mask, callback=callback, disable_pbar=disable_pbar, seed=seed)
1486
+ out = latent.copy()
1487
+ out["samples"] = samples
1488
+ return (out, )
1489
+
1490
+ class KSampler:
1491
+ @classmethod
1492
+ def INPUT_TYPES(s):
1493
+ return {
1494
+ "required": {
1495
+ "model": ("MODEL", {"tooltip": "The model used for denoising the input latent."}),
1496
+ "seed": ("INT", {"default": 0, "min": 0, "max": 0xffffffffffffffff, "control_after_generate": True, "tooltip": "The random seed used for creating the noise."}),
1497
+ "steps": ("INT", {"default": 20, "min": 1, "max": 10000, "tooltip": "The number of steps used in the denoising process."}),
1498
+ "cfg": ("FLOAT", {"default": 8.0, "min": 0.0, "max": 100.0, "step":0.1, "round": 0.01, "tooltip": "The Classifier-Free Guidance scale balances creativity and adherence to the prompt. Higher values result in images more closely matching the prompt however too high values will negatively impact quality."}),
1499
+ "sampler_name": (comfy.samplers.KSampler.SAMPLERS, {"tooltip": "The algorithm used when sampling, this can affect the quality, speed, and style of the generated output."}),
1500
+ "scheduler": (comfy.samplers.KSampler.SCHEDULERS, {"tooltip": "The scheduler controls how noise is gradually removed to form the image."}),
1501
+ "positive": ("CONDITIONING", {"tooltip": "The conditioning describing the attributes you want to include in the image."}),
1502
+ "negative": ("CONDITIONING", {"tooltip": "The conditioning describing the attributes you want to exclude from the image."}),
1503
+ "latent_image": ("LATENT", {"tooltip": "The latent image to denoise."}),
1504
+ "denoise": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 1.0, "step": 0.01, "tooltip": "The amount of denoising applied, lower values will maintain the structure of the initial image allowing for image to image sampling."}),
1505
+ }
1506
+ }
1507
+
1508
+ RETURN_TYPES = ("LATENT",)
1509
+ OUTPUT_TOOLTIPS = ("The denoised latent.",)
1510
+ FUNCTION = "sample"
1511
+
1512
+ CATEGORY = "sampling"
1513
+ DESCRIPTION = "Uses the provided model, positive and negative conditioning to denoise the latent image."
1514
+
1515
+ def sample(self, model, seed, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, denoise=1.0):
1516
+ return common_ksampler(model, seed, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, denoise=denoise)
1517
+
1518
+ class KSamplerAdvanced:
1519
+ @classmethod
1520
+ def INPUT_TYPES(s):
1521
+ return {"required":
1522
+ {"model": ("MODEL",),
1523
+ "add_noise": (["enable", "disable"], ),
1524
+ "noise_seed": ("INT", {"default": 0, "min": 0, "max": 0xffffffffffffffff, "control_after_generate": True}),
1525
+ "steps": ("INT", {"default": 20, "min": 1, "max": 10000}),
1526
+ "cfg": ("FLOAT", {"default": 8.0, "min": 0.0, "max": 100.0, "step":0.1, "round": 0.01}),
1527
+ "sampler_name": (comfy.samplers.KSampler.SAMPLERS, ),
1528
+ "scheduler": (comfy.samplers.KSampler.SCHEDULERS, ),
1529
+ "positive": ("CONDITIONING", ),
1530
+ "negative": ("CONDITIONING", ),
1531
+ "latent_image": ("LATENT", ),
1532
+ "start_at_step": ("INT", {"default": 0, "min": 0, "max": 10000}),
1533
+ "end_at_step": ("INT", {"default": 10000, "min": 0, "max": 10000}),
1534
+ "return_with_leftover_noise": (["disable", "enable"], ),
1535
+ }
1536
+ }
1537
+
1538
+ RETURN_TYPES = ("LATENT",)
1539
+ FUNCTION = "sample"
1540
+
1541
+ CATEGORY = "sampling"
1542
+
1543
+ def sample(self, model, add_noise, noise_seed, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, start_at_step, end_at_step, return_with_leftover_noise, denoise=1.0):
1544
+ force_full_denoise = True
1545
+ if return_with_leftover_noise == "enable":
1546
+ force_full_denoise = False
1547
+ disable_noise = False
1548
+ if add_noise == "disable":
1549
+ disable_noise = True
1550
+ return common_ksampler(model, noise_seed, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, denoise=denoise, disable_noise=disable_noise, start_step=start_at_step, last_step=end_at_step, force_full_denoise=force_full_denoise)
1551
+
1552
+ class SaveImage:
1553
+ def __init__(self):
1554
+ self.output_dir = folder_paths.get_output_directory()
1555
+ self.type = "output"
1556
+ self.prefix_append = ""
1557
+ self.compress_level = 4
1558
+
1559
+ @classmethod
1560
+ def INPUT_TYPES(s):
1561
+ return {
1562
+ "required": {
1563
+ "images": ("IMAGE", {"tooltip": "The images to save."}),
1564
+ "filename_prefix": ("STRING", {"default": "ComfyUI", "tooltip": "The prefix for the file to save. This may include formatting information such as %date:yyyy-MM-dd% or %Empty Latent Image.width% to include values from nodes."})
1565
+ },
1566
+ "hidden": {
1567
+ "prompt": "PROMPT", "extra_pnginfo": "EXTRA_PNGINFO"
1568
+ },
1569
+ }
1570
+
1571
+ RETURN_TYPES = ()
1572
+ FUNCTION = "save_images"
1573
+
1574
+ OUTPUT_NODE = True
1575
+
1576
+ CATEGORY = "image"
1577
+ DESCRIPTION = "Saves the input images to your ComfyUI output directory."
1578
+
1579
+ def save_images(self, images, filename_prefix="ComfyUI", prompt=None, extra_pnginfo=None):
1580
+ filename_prefix += self.prefix_append
1581
+ full_output_folder, filename, counter, subfolder, filename_prefix = folder_paths.get_save_image_path(filename_prefix, self.output_dir, images[0].shape[1], images[0].shape[0])
1582
+ results = list()
1583
+ for (batch_number, image) in enumerate(images):
1584
+ i = 255. * image.cpu().numpy()
1585
+ img = Image.fromarray(np.clip(i, 0, 255).astype(np.uint8))
1586
+ metadata = None
1587
+ if not args.disable_metadata:
1588
+ metadata = PngInfo()
1589
+ if prompt is not None:
1590
+ metadata.add_text("prompt", json.dumps(prompt))
1591
+ if extra_pnginfo is not None:
1592
+ for x in extra_pnginfo:
1593
+ metadata.add_text(x, json.dumps(extra_pnginfo[x]))
1594
+
1595
+ filename_with_batch_num = filename.replace("%batch_num%", str(batch_number))
1596
+ file = f"{filename_with_batch_num}_{counter:05}_.png"
1597
+ img.save(os.path.join(full_output_folder, file), pnginfo=metadata, compress_level=self.compress_level)
1598
+ results.append({
1599
+ "filename": file,
1600
+ "subfolder": subfolder,
1601
+ "type": self.type
1602
+ })
1603
+ counter += 1
1604
+
1605
+ return { "ui": { "images": results } }
1606
+
1607
+ class PreviewImage(SaveImage):
1608
+ def __init__(self):
1609
+ self.output_dir = folder_paths.get_temp_directory()
1610
+ self.type = "temp"
1611
+ self.prefix_append = "_temp_" + ''.join(random.choice("abcdefghijklmnopqrstupvxyz") for x in range(5))
1612
+ self.compress_level = 1
1613
+
1614
+ @classmethod
1615
+ def INPUT_TYPES(s):
1616
+ return {"required":
1617
+ {"images": ("IMAGE", ), },
1618
+ "hidden": {"prompt": "PROMPT", "extra_pnginfo": "EXTRA_PNGINFO"},
1619
+ }
1620
+
1621
+ class LoadImage:
1622
+ @classmethod
1623
+ def INPUT_TYPES(s):
1624
+ input_dir = folder_paths.get_input_directory()
1625
+ files = [f for f in os.listdir(input_dir) if os.path.isfile(os.path.join(input_dir, f))]
1626
+ files = folder_paths.filter_files_content_types(files, ["image"])
1627
+ return {"required":
1628
+ {"image": (sorted(files), {"image_upload": True})},
1629
+ }
1630
+
1631
+ CATEGORY = "image"
1632
+
1633
+ RETURN_TYPES = ("IMAGE", "MASK")
1634
+ FUNCTION = "load_image"
1635
+ def load_image(self, image):
1636
+ image_path = folder_paths.get_annotated_filepath(image)
1637
+
1638
+ img = node_helpers.pillow(Image.open, image_path)
1639
+
1640
+ output_images = []
1641
+ output_masks = []
1642
+ w, h = None, None
1643
+
1644
+ excluded_formats = ['MPO']
1645
+
1646
+ for i in ImageSequence.Iterator(img):
1647
+ i = node_helpers.pillow(ImageOps.exif_transpose, i)
1648
+
1649
+ if i.mode == 'I':
1650
+ i = i.point(lambda i: i * (1 / 255))
1651
+ image = i.convert("RGB")
1652
+
1653
+ if len(output_images) == 0:
1654
+ w = image.size[0]
1655
+ h = image.size[1]
1656
+
1657
+ if image.size[0] != w or image.size[1] != h:
1658
+ continue
1659
+
1660
+ image = np.array(image).astype(np.float32) / 255.0
1661
+ image = torch.from_numpy(image)[None,]
1662
+ if 'A' in i.getbands():
1663
+ mask = np.array(i.getchannel('A')).astype(np.float32) / 255.0
1664
+ mask = 1. - torch.from_numpy(mask)
1665
+ elif i.mode == 'P' and 'transparency' in i.info:
1666
+ mask = np.array(i.convert('RGBA').getchannel('A')).astype(np.float32) / 255.0
1667
+ mask = 1. - torch.from_numpy(mask)
1668
+ else:
1669
+ mask = torch.zeros((64,64), dtype=torch.float32, device="cpu")
1670
+ output_images.append(image)
1671
+ output_masks.append(mask.unsqueeze(0))
1672
+
1673
+ if len(output_images) > 1 and img.format not in excluded_formats:
1674
+ output_image = torch.cat(output_images, dim=0)
1675
+ output_mask = torch.cat(output_masks, dim=0)
1676
+ else:
1677
+ output_image = output_images[0]
1678
+ output_mask = output_masks[0]
1679
+
1680
+ return (output_image, output_mask)
1681
+
1682
+ @classmethod
1683
+ def IS_CHANGED(s, image):
1684
+ image_path = folder_paths.get_annotated_filepath(image)
1685
+ m = hashlib.sha256()
1686
+ with open(image_path, 'rb') as f:
1687
+ m.update(f.read())
1688
+ return m.digest().hex()
1689
+
1690
+ @classmethod
1691
+ def VALIDATE_INPUTS(s, image):
1692
+ if not folder_paths.exists_annotated_filepath(image):
1693
+ return "Invalid image file: {}".format(image)
1694
+
1695
+ return True
1696
+
1697
+ class LoadImageMask:
1698
+ _color_channels = ["alpha", "red", "green", "blue"]
1699
+ @classmethod
1700
+ def INPUT_TYPES(s):
1701
+ input_dir = folder_paths.get_input_directory()
1702
+ files = [f for f in os.listdir(input_dir) if os.path.isfile(os.path.join(input_dir, f))]
1703
+ return {"required":
1704
+ {"image": (sorted(files), {"image_upload": True}),
1705
+ "channel": (s._color_channels, ), }
1706
+ }
1707
+
1708
+ CATEGORY = "mask"
1709
+
1710
+ RETURN_TYPES = ("MASK",)
1711
+ FUNCTION = "load_image"
1712
+ def load_image(self, image, channel):
1713
+ image_path = folder_paths.get_annotated_filepath(image)
1714
+ i = node_helpers.pillow(Image.open, image_path)
1715
+ i = node_helpers.pillow(ImageOps.exif_transpose, i)
1716
+ if i.getbands() != ("R", "G", "B", "A"):
1717
+ if i.mode == 'I':
1718
+ i = i.point(lambda i: i * (1 / 255))
1719
+ i = i.convert("RGBA")
1720
+ mask = None
1721
+ c = channel[0].upper()
1722
+ if c in i.getbands():
1723
+ mask = np.array(i.getchannel(c)).astype(np.float32) / 255.0
1724
+ mask = torch.from_numpy(mask)
1725
+ if c == 'A':
1726
+ mask = 1. - mask
1727
+ else:
1728
+ mask = torch.zeros((64,64), dtype=torch.float32, device="cpu")
1729
+ return (mask.unsqueeze(0),)
1730
+
1731
+ @classmethod
1732
+ def IS_CHANGED(s, image, channel):
1733
+ image_path = folder_paths.get_annotated_filepath(image)
1734
+ m = hashlib.sha256()
1735
+ with open(image_path, 'rb') as f:
1736
+ m.update(f.read())
1737
+ return m.digest().hex()
1738
+
1739
+ @classmethod
1740
+ def VALIDATE_INPUTS(s, image):
1741
+ if not folder_paths.exists_annotated_filepath(image):
1742
+ return "Invalid image file: {}".format(image)
1743
+
1744
+ return True
1745
+
1746
+
1747
+ class LoadImageOutput(LoadImage):
1748
+ @classmethod
1749
+ def INPUT_TYPES(s):
1750
+ return {
1751
+ "required": {
1752
+ "image": ("COMBO", {
1753
+ "image_upload": True,
1754
+ "image_folder": "output",
1755
+ "remote": {
1756
+ "route": "/internal/files/output",
1757
+ "refresh_button": True,
1758
+ "control_after_refresh": "first",
1759
+ },
1760
+ }),
1761
+ }
1762
+ }
1763
+
1764
+ DESCRIPTION = "Load an image from the output folder. When the refresh button is clicked, the node will update the image list and automatically select the first image, allowing for easy iteration."
1765
+ EXPERIMENTAL = True
1766
+ FUNCTION = "load_image"
1767
+
1768
+
1769
+ class ImageScale:
1770
+ upscale_methods = ["nearest-exact", "bilinear", "area", "bicubic", "lanczos"]
1771
+ crop_methods = ["disabled", "center"]
1772
+
1773
+ @classmethod
1774
+ def INPUT_TYPES(s):
1775
+ return {"required": { "image": ("IMAGE",), "upscale_method": (s.upscale_methods,),
1776
+ "width": ("INT", {"default": 512, "min": 0, "max": MAX_RESOLUTION, "step": 1}),
1777
+ "height": ("INT", {"default": 512, "min": 0, "max": MAX_RESOLUTION, "step": 1}),
1778
+ "crop": (s.crop_methods,)}}
1779
+ RETURN_TYPES = ("IMAGE",)
1780
+ FUNCTION = "upscale"
1781
+
1782
+ CATEGORY = "image/upscaling"
1783
+
1784
+ def upscale(self, image, upscale_method, width, height, crop):
1785
+ if width == 0 and height == 0:
1786
+ s = image
1787
+ else:
1788
+ samples = image.movedim(-1,1)
1789
+
1790
+ if width == 0:
1791
+ width = max(1, round(samples.shape[3] * height / samples.shape[2]))
1792
+ elif height == 0:
1793
+ height = max(1, round(samples.shape[2] * width / samples.shape[3]))
1794
+
1795
+ s = comfy.utils.common_upscale(samples, width, height, upscale_method, crop)
1796
+ s = s.movedim(1,-1)
1797
+ return (s,)
1798
+
1799
+ class ImageScaleBy:
1800
+ upscale_methods = ["nearest-exact", "bilinear", "area", "bicubic", "lanczos"]
1801
+
1802
+ @classmethod
1803
+ def INPUT_TYPES(s):
1804
+ return {"required": { "image": ("IMAGE",), "upscale_method": (s.upscale_methods,),
1805
+ "scale_by": ("FLOAT", {"default": 1.0, "min": 0.01, "max": 8.0, "step": 0.01}),}}
1806
+ RETURN_TYPES = ("IMAGE",)
1807
+ FUNCTION = "upscale"
1808
+
1809
+ CATEGORY = "image/upscaling"
1810
+
1811
+ def upscale(self, image, upscale_method, scale_by):
1812
+ samples = image.movedim(-1,1)
1813
+ width = round(samples.shape[3] * scale_by)
1814
+ height = round(samples.shape[2] * scale_by)
1815
+ s = comfy.utils.common_upscale(samples, width, height, upscale_method, "disabled")
1816
+ s = s.movedim(1,-1)
1817
+ return (s,)
1818
+
1819
+ class ImageInvert:
1820
+
1821
+ @classmethod
1822
+ def INPUT_TYPES(s):
1823
+ return {"required": { "image": ("IMAGE",)}}
1824
+
1825
+ RETURN_TYPES = ("IMAGE",)
1826
+ FUNCTION = "invert"
1827
+
1828
+ CATEGORY = "image"
1829
+
1830
+ def invert(self, image):
1831
+ s = 1.0 - image
1832
+ return (s,)
1833
+
1834
+ class ImageBatch:
1835
+
1836
+ @classmethod
1837
+ def INPUT_TYPES(s):
1838
+ return {"required": { "image1": ("IMAGE",), "image2": ("IMAGE",)}}
1839
+
1840
+ RETURN_TYPES = ("IMAGE",)
1841
+ FUNCTION = "batch"
1842
+
1843
+ CATEGORY = "image"
1844
+
1845
+ def batch(self, image1, image2):
1846
+ if image1.shape[1:] != image2.shape[1:]:
1847
+ image2 = comfy.utils.common_upscale(image2.movedim(-1,1), image1.shape[2], image1.shape[1], "bilinear", "center").movedim(1,-1)
1848
+ s = torch.cat((image1, image2), dim=0)
1849
+ return (s,)
1850
+
1851
+ class EmptyImage:
1852
+ def __init__(self, device="cpu"):
1853
+ self.device = device
1854
+
1855
+ @classmethod
1856
+ def INPUT_TYPES(s):
1857
+ return {"required": { "width": ("INT", {"default": 512, "min": 1, "max": MAX_RESOLUTION, "step": 1}),
1858
+ "height": ("INT", {"default": 512, "min": 1, "max": MAX_RESOLUTION, "step": 1}),
1859
+ "batch_size": ("INT", {"default": 1, "min": 1, "max": 4096}),
1860
+ "color": ("INT", {"default": 0, "min": 0, "max": 0xFFFFFF, "step": 1, "display": "color"}),
1861
+ }}
1862
+ RETURN_TYPES = ("IMAGE",)
1863
+ FUNCTION = "generate"
1864
+
1865
+ CATEGORY = "image"
1866
+
1867
+ def generate(self, width, height, batch_size=1, color=0):
1868
+ r = torch.full([batch_size, height, width, 1], ((color >> 16) & 0xFF) / 0xFF)
1869
+ g = torch.full([batch_size, height, width, 1], ((color >> 8) & 0xFF) / 0xFF)
1870
+ b = torch.full([batch_size, height, width, 1], ((color) & 0xFF) / 0xFF)
1871
+ return (torch.cat((r, g, b), dim=-1), )
1872
+
1873
+ class ImagePadForOutpaint:
1874
+
1875
+ @classmethod
1876
+ def INPUT_TYPES(s):
1877
+ return {
1878
+ "required": {
1879
+ "image": ("IMAGE",),
1880
+ "left": ("INT", {"default": 0, "min": 0, "max": MAX_RESOLUTION, "step": 8}),
1881
+ "top": ("INT", {"default": 0, "min": 0, "max": MAX_RESOLUTION, "step": 8}),
1882
+ "right": ("INT", {"default": 0, "min": 0, "max": MAX_RESOLUTION, "step": 8}),
1883
+ "bottom": ("INT", {"default": 0, "min": 0, "max": MAX_RESOLUTION, "step": 8}),
1884
+ "feathering": ("INT", {"default": 40, "min": 0, "max": MAX_RESOLUTION, "step": 1}),
1885
+ }
1886
+ }
1887
+
1888
+ RETURN_TYPES = ("IMAGE", "MASK")
1889
+ FUNCTION = "expand_image"
1890
+
1891
+ CATEGORY = "image"
1892
+
1893
+ def expand_image(self, image, left, top, right, bottom, feathering):
1894
+ d1, d2, d3, d4 = image.size()
1895
+
1896
+ new_image = torch.ones(
1897
+ (d1, d2 + top + bottom, d3 + left + right, d4),
1898
+ dtype=torch.float32,
1899
+ ) * 0.5
1900
+
1901
+ new_image[:, top:top + d2, left:left + d3, :] = image
1902
+
1903
+ mask = torch.ones(
1904
+ (d2 + top + bottom, d3 + left + right),
1905
+ dtype=torch.float32,
1906
+ )
1907
+
1908
+ t = torch.zeros(
1909
+ (d2, d3),
1910
+ dtype=torch.float32
1911
+ )
1912
+
1913
+ if feathering > 0 and feathering * 2 < d2 and feathering * 2 < d3:
1914
+
1915
+ for i in range(d2):
1916
+ for j in range(d3):
1917
+ dt = i if top != 0 else d2
1918
+ db = d2 - i if bottom != 0 else d2
1919
+
1920
+ dl = j if left != 0 else d3
1921
+ dr = d3 - j if right != 0 else d3
1922
+
1923
+ d = min(dt, db, dl, dr)
1924
+
1925
+ if d >= feathering:
1926
+ continue
1927
+
1928
+ v = (feathering - d) / feathering
1929
+
1930
+ t[i, j] = v * v
1931
+
1932
+ mask[top:top + d2, left:left + d3] = t
1933
+
1934
+ return (new_image, mask.unsqueeze(0))
1935
+
1936
+
1937
+ NODE_CLASS_MAPPINGS = {
1938
+ "KSampler": KSampler,
1939
+ "CheckpointLoaderSimple": CheckpointLoaderSimple,
1940
+ "CLIPTextEncode": CLIPTextEncode,
1941
+ "CLIPSetLastLayer": CLIPSetLastLayer,
1942
+ "VAEDecode": VAEDecode,
1943
+ "VAEEncode": VAEEncode,
1944
+ "VAEEncodeForInpaint": VAEEncodeForInpaint,
1945
+ "VAELoader": VAELoader,
1946
+ "EmptyLatentImage": EmptyLatentImage,
1947
+ "LatentUpscale": LatentUpscale,
1948
+ "LatentUpscaleBy": LatentUpscaleBy,
1949
+ "LatentFromBatch": LatentFromBatch,
1950
+ "RepeatLatentBatch": RepeatLatentBatch,
1951
+ "SaveImage": SaveImage,
1952
+ "PreviewImage": PreviewImage,
1953
+ "LoadImage": LoadImage,
1954
+ "LoadImageMask": LoadImageMask,
1955
+ "LoadImageOutput": LoadImageOutput,
1956
+ "ImageScale": ImageScale,
1957
+ "ImageScaleBy": ImageScaleBy,
1958
+ "ImageInvert": ImageInvert,
1959
+ "ImageBatch": ImageBatch,
1960
+ "ImagePadForOutpaint": ImagePadForOutpaint,
1961
+ "EmptyImage": EmptyImage,
1962
+ "ConditioningAverage": ConditioningAverage ,
1963
+ "ConditioningCombine": ConditioningCombine,
1964
+ "ConditioningConcat": ConditioningConcat,
1965
+ "ConditioningSetArea": ConditioningSetArea,
1966
+ "ConditioningSetAreaPercentage": ConditioningSetAreaPercentage,
1967
+ "ConditioningSetAreaStrength": ConditioningSetAreaStrength,
1968
+ "ConditioningSetMask": ConditioningSetMask,
1969
+ "KSamplerAdvanced": KSamplerAdvanced,
1970
+ "SetLatentNoiseMask": SetLatentNoiseMask,
1971
+ "LatentComposite": LatentComposite,
1972
+ "LatentBlend": LatentBlend,
1973
+ "LatentRotate": LatentRotate,
1974
+ "LatentFlip": LatentFlip,
1975
+ "LatentCrop": LatentCrop,
1976
+ "LoraLoader": LoraLoader,
1977
+ "CLIPLoader": CLIPLoader,
1978
+ "UNETLoader": UNETLoader,
1979
+ "DualCLIPLoader": DualCLIPLoader,
1980
+ "CLIPVisionEncode": CLIPVisionEncode,
1981
+ "StyleModelApply": StyleModelApply,
1982
+ "unCLIPConditioning": unCLIPConditioning,
1983
+ "ControlNetApply": ControlNetApply,
1984
+ "ControlNetApplyAdvanced": ControlNetApplyAdvanced,
1985
+ "ControlNetLoader": ControlNetLoader,
1986
+ "DiffControlNetLoader": DiffControlNetLoader,
1987
+ "StyleModelLoader": StyleModelLoader,
1988
+ "CLIPVisionLoader": CLIPVisionLoader,
1989
+ "VAEDecodeTiled": VAEDecodeTiled,
1990
+ "VAEEncodeTiled": VAEEncodeTiled,
1991
+ "unCLIPCheckpointLoader": unCLIPCheckpointLoader,
1992
+ "GLIGENLoader": GLIGENLoader,
1993
+ "GLIGENTextBoxApply": GLIGENTextBoxApply,
1994
+ "InpaintModelConditioning": InpaintModelConditioning,
1995
+
1996
+ "CheckpointLoader": CheckpointLoader,
1997
+ "DiffusersLoader": DiffusersLoader,
1998
+
1999
+ "LoadLatent": LoadLatent,
2000
+ "SaveLatent": SaveLatent,
2001
+
2002
+ "ConditioningZeroOut": ConditioningZeroOut,
2003
+ "ConditioningSetTimestepRange": ConditioningSetTimestepRange,
2004
+ "LoraLoaderModelOnly": LoraLoaderModelOnly,
2005
+ }
2006
+
2007
+ NODE_DISPLAY_NAME_MAPPINGS = {
2008
+ # Sampling
2009
+ "KSampler": "KSampler",
2010
+ "KSamplerAdvanced": "KSampler (Advanced)",
2011
+ # Loaders
2012
+ "CheckpointLoader": "Load Checkpoint With Config (DEPRECATED)",
2013
+ "CheckpointLoaderSimple": "Load Checkpoint",
2014
+ "VAELoader": "Load VAE",
2015
+ "LoraLoader": "Load LoRA",
2016
+ "CLIPLoader": "Load CLIP",
2017
+ "ControlNetLoader": "Load ControlNet Model",
2018
+ "DiffControlNetLoader": "Load ControlNet Model (diff)",
2019
+ "StyleModelLoader": "Load Style Model",
2020
+ "CLIPVisionLoader": "Load CLIP Vision",
2021
+ "UpscaleModelLoader": "Load Upscale Model",
2022
+ "UNETLoader": "Load Diffusion Model",
2023
+ # Conditioning
2024
+ "CLIPVisionEncode": "CLIP Vision Encode",
2025
+ "StyleModelApply": "Apply Style Model",
2026
+ "CLIPTextEncode": "CLIP Text Encode (Prompt)",
2027
+ "CLIPSetLastLayer": "CLIP Set Last Layer",
2028
+ "ConditioningCombine": "Conditioning (Combine)",
2029
+ "ConditioningAverage ": "Conditioning (Average)",
2030
+ "ConditioningConcat": "Conditioning (Concat)",
2031
+ "ConditioningSetArea": "Conditioning (Set Area)",
2032
+ "ConditioningSetAreaPercentage": "Conditioning (Set Area with Percentage)",
2033
+ "ConditioningSetMask": "Conditioning (Set Mask)",
2034
+ "ControlNetApply": "Apply ControlNet (OLD)",
2035
+ "ControlNetApplyAdvanced": "Apply ControlNet",
2036
+ # Latent
2037
+ "VAEEncodeForInpaint": "VAE Encode (for Inpainting)",
2038
+ "SetLatentNoiseMask": "Set Latent Noise Mask",
2039
+ "VAEDecode": "VAE Decode",
2040
+ "VAEEncode": "VAE Encode",
2041
+ "LatentRotate": "Rotate Latent",
2042
+ "LatentFlip": "Flip Latent",
2043
+ "LatentCrop": "Crop Latent",
2044
+ "EmptyLatentImage": "Empty Latent Image",
2045
+ "LatentUpscale": "Upscale Latent",
2046
+ "LatentUpscaleBy": "Upscale Latent By",
2047
+ "LatentComposite": "Latent Composite",
2048
+ "LatentBlend": "Latent Blend",
2049
+ "LatentFromBatch" : "Latent From Batch",
2050
+ "RepeatLatentBatch": "Repeat Latent Batch",
2051
+ # Image
2052
+ "SaveImage": "Save Image",
2053
+ "PreviewImage": "Preview Image",
2054
+ "LoadImage": "Load Image",
2055
+ "LoadImageMask": "Load Image (as Mask)",
2056
+ "LoadImageOutput": "Load Image (from Outputs)",
2057
+ "ImageScale": "Upscale Image",
2058
+ "ImageScaleBy": "Upscale Image By",
2059
+ "ImageUpscaleWithModel": "Upscale Image (using Model)",
2060
+ "ImageInvert": "Invert Image",
2061
+ "ImagePadForOutpaint": "Pad Image for Outpainting",
2062
+ "ImageBatch": "Batch Images",
2063
+ "ImageCrop": "Image Crop",
2064
+ "ImageStitch": "Image Stitch",
2065
+ "ImageBlend": "Image Blend",
2066
+ "ImageBlur": "Image Blur",
2067
+ "ImageQuantize": "Image Quantize",
2068
+ "ImageSharpen": "Image Sharpen",
2069
+ "ImageScaleToTotalPixels": "Scale Image to Total Pixels",
2070
+ "GetImageSize": "Get Image Size",
2071
+ # _for_testing
2072
+ "VAEDecodeTiled": "VAE Decode (Tiled)",
2073
+ "VAEEncodeTiled": "VAE Encode (Tiled)",
2074
+ }
2075
+
2076
+ EXTENSION_WEB_DIRS = {}
2077
+
2078
+ # Dictionary of successfully loaded module names and associated directories.
2079
+ LOADED_MODULE_DIRS = {}
2080
+
2081
+
2082
+ def get_module_name(module_path: str) -> str:
2083
+ """
2084
+ Returns the module name based on the given module path.
2085
+ Examples:
2086
+ get_module_name("C:/Users/username/ComfyUI/custom_nodes/my_custom_node.py") -> "my_custom_node"
2087
+ get_module_name("C:/Users/username/ComfyUI/custom_nodes/my_custom_node") -> "my_custom_node"
2088
+ get_module_name("C:/Users/username/ComfyUI/custom_nodes/my_custom_node/") -> "my_custom_node"
2089
+ get_module_name("C:/Users/username/ComfyUI/custom_nodes/my_custom_node/__init__.py") -> "my_custom_node"
2090
+ get_module_name("C:/Users/username/ComfyUI/custom_nodes/my_custom_node/__init__") -> "my_custom_node"
2091
+ get_module_name("C:/Users/username/ComfyUI/custom_nodes/my_custom_node/__init__/") -> "my_custom_node"
2092
+ get_module_name("C:/Users/username/ComfyUI/custom_nodes/my_custom_node.disabled") -> "custom_nodes
2093
+ Args:
2094
+ module_path (str): The path of the module.
2095
+ Returns:
2096
+ str: The module name.
2097
+ """
2098
+ base_path = os.path.basename(module_path)
2099
+ if os.path.isfile(module_path):
2100
+ base_path = os.path.splitext(base_path)[0]
2101
+ return base_path
2102
+
2103
+
2104
+ def load_custom_node(module_path: str, ignore=set(), module_parent="custom_nodes") -> bool:
2105
+ module_name = get_module_name(module_path)
2106
+ if os.path.isfile(module_path):
2107
+ sp = os.path.splitext(module_path)
2108
+ module_name = sp[0]
2109
+ sys_module_name = module_name
2110
+ elif os.path.isdir(module_path):
2111
+ sys_module_name = module_path.replace(".", "_x_")
2112
+
2113
+ try:
2114
+ logging.debug("Trying to load custom node {}".format(module_path))
2115
+ if os.path.isfile(module_path):
2116
+ module_spec = importlib.util.spec_from_file_location(sys_module_name, module_path)
2117
+ module_dir = os.path.split(module_path)[0]
2118
+ else:
2119
+ module_spec = importlib.util.spec_from_file_location(sys_module_name, os.path.join(module_path, "__init__.py"))
2120
+ module_dir = module_path
2121
+
2122
+ module = importlib.util.module_from_spec(module_spec)
2123
+ sys.modules[sys_module_name] = module
2124
+ module_spec.loader.exec_module(module)
2125
+
2126
+ LOADED_MODULE_DIRS[module_name] = os.path.abspath(module_dir)
2127
+
2128
+ try:
2129
+ from comfy_config import config_parser
2130
+
2131
+ project_config = config_parser.extract_node_configuration(module_path)
2132
+
2133
+ web_dir_name = project_config.tool_comfy.web
2134
+
2135
+ if web_dir_name:
2136
+ web_dir_path = os.path.join(module_path, web_dir_name)
2137
+
2138
+ if os.path.isdir(web_dir_path):
2139
+ project_name = project_config.project.name
2140
+
2141
+ EXTENSION_WEB_DIRS[project_name] = web_dir_path
2142
+
2143
+ logging.info("Automatically register web folder {} for {}".format(web_dir_name, project_name))
2144
+ except Exception as e:
2145
+ logging.warning(f"Unable to parse pyproject.toml due to lack dependency pydantic-settings, please run 'pip install -r requirements.txt': {e}")
2146
+
2147
+ if hasattr(module, "WEB_DIRECTORY") and getattr(module, "WEB_DIRECTORY") is not None:
2148
+ web_dir = os.path.abspath(os.path.join(module_dir, getattr(module, "WEB_DIRECTORY")))
2149
+ if os.path.isdir(web_dir):
2150
+ EXTENSION_WEB_DIRS[module_name] = web_dir
2151
+
2152
+ if hasattr(module, "NODE_CLASS_MAPPINGS") and getattr(module, "NODE_CLASS_MAPPINGS") is not None:
2153
+ for name, node_cls in module.NODE_CLASS_MAPPINGS.items():
2154
+ if name not in ignore:
2155
+ NODE_CLASS_MAPPINGS[name] = node_cls
2156
+ node_cls.RELATIVE_PYTHON_MODULE = "{}.{}".format(module_parent, get_module_name(module_path))
2157
+ if hasattr(module, "NODE_DISPLAY_NAME_MAPPINGS") and getattr(module, "NODE_DISPLAY_NAME_MAPPINGS") is not None:
2158
+ NODE_DISPLAY_NAME_MAPPINGS.update(module.NODE_DISPLAY_NAME_MAPPINGS)
2159
+ return True
2160
+ else:
2161
+ logging.warning(f"Skip {module_path} module for custom nodes due to the lack of NODE_CLASS_MAPPINGS.")
2162
+ return False
2163
+ except Exception as e:
2164
+ logging.warning(traceback.format_exc())
2165
+ logging.warning(f"Cannot import {module_path} module for custom nodes: {e}")
2166
+ return False
2167
+
2168
+ def init_external_custom_nodes():
2169
+ """
2170
+ Initializes the external custom nodes.
2171
+
2172
+ This function loads custom nodes from the specified folder paths and imports them into the application.
2173
+ It measures the import times for each custom node and logs the results.
2174
+
2175
+ Returns:
2176
+ None
2177
+ """
2178
+ base_node_names = set(NODE_CLASS_MAPPINGS.keys())
2179
+ node_paths = folder_paths.get_folder_paths("custom_nodes")
2180
+ node_import_times = []
2181
+ for custom_node_path in node_paths:
2182
+ possible_modules = os.listdir(os.path.realpath(custom_node_path))
2183
+ if "__pycache__" in possible_modules:
2184
+ possible_modules.remove("__pycache__")
2185
+
2186
+ for possible_module in possible_modules:
2187
+ module_path = os.path.join(custom_node_path, possible_module)
2188
+ if os.path.isfile(module_path) and os.path.splitext(module_path)[1] != ".py": continue
2189
+ if module_path.endswith(".disabled"): continue
2190
+ if args.disable_all_custom_nodes and possible_module not in args.whitelist_custom_nodes:
2191
+ logging.info(f"Skipping {possible_module} due to disable_all_custom_nodes and whitelist_custom_nodes")
2192
+ continue
2193
+ time_before = time.perf_counter()
2194
+ success = load_custom_node(module_path, base_node_names, module_parent="custom_nodes")
2195
+ node_import_times.append((time.perf_counter() - time_before, module_path, success))
2196
+
2197
+ if len(node_import_times) > 0:
2198
+ logging.info("\nImport times for custom nodes:")
2199
+ for n in sorted(node_import_times):
2200
+ if n[2]:
2201
+ import_message = ""
2202
+ else:
2203
+ import_message = " (IMPORT FAILED)"
2204
+ logging.info("{:6.1f} seconds{}: {}".format(n[0], import_message, n[1]))
2205
+ logging.info("")
2206
+
2207
+ def init_builtin_extra_nodes():
2208
+ """
2209
+ Initializes the built-in extra nodes in ComfyUI.
2210
+
2211
+ This function loads the extra node files located in the "comfy_extras" directory and imports them into ComfyUI.
2212
+ If any of the extra node files fail to import, a warning message is logged.
2213
+
2214
+ Returns:
2215
+ None
2216
+ """
2217
+ extras_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), "comfy_extras")
2218
+ extras_files = [
2219
+ "nodes_latent.py",
2220
+ "nodes_hypernetwork.py",
2221
+ "nodes_upscale_model.py",
2222
+ "nodes_post_processing.py",
2223
+ "nodes_mask.py",
2224
+ "nodes_compositing.py",
2225
+ "nodes_rebatch.py",
2226
+ "nodes_model_merging.py",
2227
+ "nodes_tomesd.py",
2228
+ "nodes_clip_sdxl.py",
2229
+ "nodes_canny.py",
2230
+ "nodes_freelunch.py",
2231
+ "nodes_custom_sampler.py",
2232
+ "nodes_hypertile.py",
2233
+ "nodes_model_advanced.py",
2234
+ "nodes_model_downscale.py",
2235
+ "nodes_images.py",
2236
+ "nodes_video_model.py",
2237
+ "nodes_train.py",
2238
+ "nodes_sag.py",
2239
+ "nodes_perpneg.py",
2240
+ "nodes_stable3d.py",
2241
+ "nodes_sdupscale.py",
2242
+ "nodes_photomaker.py",
2243
+ "nodes_pixart.py",
2244
+ "nodes_cond.py",
2245
+ "nodes_morphology.py",
2246
+ "nodes_stable_cascade.py",
2247
+ "nodes_differential_diffusion.py",
2248
+ "nodes_ip2p.py",
2249
+ "nodes_model_merging_model_specific.py",
2250
+ "nodes_pag.py",
2251
+ "nodes_align_your_steps.py",
2252
+ "nodes_attention_multiply.py",
2253
+ "nodes_advanced_samplers.py",
2254
+ "nodes_webcam.py",
2255
+ "nodes_audio.py",
2256
+ "nodes_sd3.py",
2257
+ "nodes_gits.py",
2258
+ "nodes_controlnet.py",
2259
+ "nodes_hunyuan.py",
2260
+ "nodes_flux.py",
2261
+ "nodes_lora_extract.py",
2262
+ "nodes_torch_compile.py",
2263
+ "nodes_mochi.py",
2264
+ "nodes_slg.py",
2265
+ "nodes_mahiro.py",
2266
+ "nodes_lt.py",
2267
+ "nodes_hooks.py",
2268
+ "nodes_load_3d.py",
2269
+ "nodes_cosmos.py",
2270
+ "nodes_video.py",
2271
+ "nodes_lumina2.py",
2272
+ "nodes_wan.py",
2273
+ "nodes_lotus.py",
2274
+ "nodes_hunyuan3d.py",
2275
+ "nodes_primitive.py",
2276
+ "nodes_cfg.py",
2277
+ "nodes_optimalsteps.py",
2278
+ "nodes_hidream.py",
2279
+ "nodes_fresca.py",
2280
+ "nodes_apg.py",
2281
+ "nodes_preview_any.py",
2282
+ "nodes_ace.py",
2283
+ "nodes_string.py",
2284
+ "nodes_camera_trajectory.py",
2285
+ "nodes_edit_model.py",
2286
+ "nodes_tcfg.py"
2287
+ ]
2288
+
2289
+ import_failed = []
2290
+ for node_file in extras_files:
2291
+ if not load_custom_node(os.path.join(extras_dir, node_file), module_parent="comfy_extras"):
2292
+ import_failed.append(node_file)
2293
+
2294
+ return import_failed
2295
+
2296
+
2297
+ def init_builtin_api_nodes():
2298
+ api_nodes_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), "comfy_api_nodes")
2299
+ api_nodes_files = [
2300
+ "nodes_ideogram.py",
2301
+ "nodes_openai.py",
2302
+ "nodes_minimax.py",
2303
+ "nodes_veo2.py",
2304
+ "nodes_kling.py",
2305
+ "nodes_bfl.py",
2306
+ "nodes_luma.py",
2307
+ "nodes_recraft.py",
2308
+ "nodes_pixverse.py",
2309
+ "nodes_stability.py",
2310
+ "nodes_pika.py",
2311
+ "nodes_runway.py",
2312
+ "nodes_tripo.py",
2313
+ "nodes_moonvalley.py",
2314
+ "nodes_rodin.py",
2315
+ "nodes_gemini.py",
2316
+ ]
2317
+
2318
+ if not load_custom_node(os.path.join(api_nodes_dir, "canary.py"), module_parent="comfy_api_nodes"):
2319
+ return api_nodes_files
2320
+
2321
+ import_failed = []
2322
+ for node_file in api_nodes_files:
2323
+ if not load_custom_node(os.path.join(api_nodes_dir, node_file), module_parent="comfy_api_nodes"):
2324
+ import_failed.append(node_file)
2325
+
2326
+ return import_failed
2327
+
2328
+
2329
+ def init_extra_nodes(init_custom_nodes=True, init_api_nodes=True):
2330
+ import_failed = init_builtin_extra_nodes()
2331
+
2332
+ import_failed_api = []
2333
+ if init_api_nodes:
2334
+ import_failed_api = init_builtin_api_nodes()
2335
+
2336
+ if init_custom_nodes:
2337
+ init_external_custom_nodes()
2338
+ else:
2339
+ logging.info("Skipping loading of custom nodes")
2340
+
2341
+ if len(import_failed_api) > 0:
2342
+ logging.warning("WARNING: some comfy_api_nodes/ nodes did not import correctly. This may be because they are missing some dependencies.\n")
2343
+ for node in import_failed_api:
2344
+ logging.warning("IMPORT FAILED: {}".format(node))
2345
+ logging.warning("\nThis issue might be caused by new missing dependencies added the last time you updated ComfyUI.")
2346
+ if args.windows_standalone_build:
2347
+ logging.warning("Please run the update script: update/update_comfyui.bat")
2348
+ else:
2349
+ logging.warning("Please do a: pip install -r requirements.txt")
2350
+ logging.warning("")
2351
+
2352
+ if len(import_failed) > 0:
2353
+ logging.warning("WARNING: some comfy_extras/ nodes did not import correctly. This may be because they are missing some dependencies.\n")
2354
+ for node in import_failed:
2355
+ logging.warning("IMPORT FAILED: {}".format(node))
2356
+ logging.warning("\nThis issue might be caused by new missing dependencies added the last time you updated ComfyUI.")
2357
+ if args.windows_standalone_build:
2358
+ logging.warning("Please run the update script: update/update_comfyui.bat")
2359
+ else:
2360
+ logging.warning("Please do a: pip install -r requirements.txt")
2361
+ logging.warning("")
2362
+
2363
+ return import_failed
ComfyUI/protocol.py ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+
2
+ class BinaryEventTypes:
3
+ PREVIEW_IMAGE = 1
4
+ UNENCODED_PREVIEW_IMAGE = 2
5
+ TEXT = 3
6
+ PREVIEW_IMAGE_WITH_METADATA = 4
7
+
ComfyUI/pyproject.toml ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [project]
2
+ name = "ComfyUI"
3
+ version = "0.3.47"
4
+ readme = "README.md"
5
+ license = { file = "LICENSE" }
6
+ requires-python = ">=3.9"
7
+
8
+ [project.urls]
9
+ homepage = "https://www.comfy.org/"
10
+ repository = "https://github.com/comfyanonymous/ComfyUI"
11
+ documentation = "https://docs.comfy.org/"
12
+
13
+ [tool.ruff]
14
+ lint.select = [
15
+ "N805", # invalid-first-argument-name-for-method
16
+ "S307", # suspicious-eval-usage
17
+ "S102", # exec
18
+ "T", # print-usage
19
+ "W",
20
+ # The "F" series in Ruff stands for "Pyflakes" rules, which catch various Python syntax errors and undefined names.
21
+ # See all rules here: https://docs.astral.sh/ruff/rules/#pyflakes-f
22
+ "F",
23
+ ]
24
+ exclude = ["*.ipynb"]
ComfyUI/pytest.ini ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ [pytest]
2
+ markers =
3
+ inference: mark as inference test (deselect with '-m "not inference"')
4
+ execution: mark as execution test (deselect with '-m "not execution"')
5
+ testpaths =
6
+ tests
7
+ tests-unit
8
+ addopts = -s
9
+ pythonpath = .
ComfyUI/requirements.txt ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ comfyui-frontend-package==1.23.4
2
+ comfyui-workflow-templates==0.1.41
3
+ comfyui-embedded-docs==0.2.4
4
+ torch
5
+ torchsde
6
+ torchvision
7
+ torchaudio
8
+ numpy>=1.25.0
9
+ einops
10
+ transformers>=4.37.2
11
+ tokenizers>=0.13.3
12
+ sentencepiece
13
+ safetensors>=0.4.2
14
+ aiohttp>=3.11.8
15
+ yarl>=1.18.0
16
+ pyyaml
17
+ Pillow
18
+ scipy
19
+ tqdm
20
+ psutil
21
+ alembic
22
+ SQLAlchemy
23
+
24
+ #non essential dependencies:
25
+ kornia>=0.7.1
26
+ spandrel
27
+ soundfile
28
+ av>=14.2.0
29
+ pydantic~=2.0
30
+ pydantic-settings~=2.0
ComfyUI/server.py ADDED
@@ -0,0 +1,977 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import sys
3
+ import asyncio
4
+ import traceback
5
+
6
+ import nodes
7
+ import folder_paths
8
+ import execution
9
+ import uuid
10
+ import urllib
11
+ import json
12
+ import glob
13
+ import struct
14
+ import ssl
15
+ import socket
16
+ import ipaddress
17
+ from PIL import Image, ImageOps
18
+ from PIL.PngImagePlugin import PngInfo
19
+ from io import BytesIO
20
+
21
+ import aiohttp
22
+ from aiohttp import web
23
+ import logging
24
+
25
+ import mimetypes
26
+ from comfy.cli_args import args
27
+ import comfy.utils
28
+ import comfy.model_management
29
+ from comfy_api import feature_flags
30
+ import node_helpers
31
+ from comfyui_version import __version__
32
+ from app.frontend_management import FrontendManager
33
+
34
+ from app.user_manager import UserManager
35
+ from app.model_manager import ModelFileManager
36
+ from app.custom_node_manager import CustomNodeManager
37
+ from typing import Optional, Union
38
+ from api_server.routes.internal.internal_routes import InternalRoutes
39
+ from protocol import BinaryEventTypes
40
+
41
+ async def send_socket_catch_exception(function, message):
42
+ try:
43
+ await function(message)
44
+ except (aiohttp.ClientError, aiohttp.ClientPayloadError, ConnectionResetError, BrokenPipeError, ConnectionError) as err:
45
+ logging.warning("send error: {}".format(err))
46
+
47
+ @web.middleware
48
+ async def cache_control(request: web.Request, handler):
49
+ response: web.Response = await handler(request)
50
+ if request.path.endswith('.js') or request.path.endswith('.css') or request.path.endswith('index.json'):
51
+ response.headers.setdefault('Cache-Control', 'no-cache')
52
+ return response
53
+
54
+
55
+ @web.middleware
56
+ async def compress_body(request: web.Request, handler):
57
+ accept_encoding = request.headers.get("Accept-Encoding", "")
58
+ response: web.Response = await handler(request)
59
+ if not isinstance(response, web.Response):
60
+ return response
61
+ if response.content_type not in ["application/json", "text/plain"]:
62
+ return response
63
+ if response.body and "gzip" in accept_encoding:
64
+ response.enable_compression()
65
+ return response
66
+
67
+
68
+ def create_cors_middleware(allowed_origin: str):
69
+ @web.middleware
70
+ async def cors_middleware(request: web.Request, handler):
71
+ if request.method == "OPTIONS":
72
+ # Pre-flight request. Reply successfully:
73
+ response = web.Response()
74
+ else:
75
+ response = await handler(request)
76
+
77
+ response.headers['Access-Control-Allow-Origin'] = allowed_origin
78
+ response.headers['Access-Control-Allow-Methods'] = 'POST, GET, DELETE, PUT, OPTIONS'
79
+ response.headers['Access-Control-Allow-Headers'] = 'Content-Type, Authorization'
80
+ response.headers['Access-Control-Allow-Credentials'] = 'true'
81
+ return response
82
+
83
+ return cors_middleware
84
+
85
+ def is_loopback(host):
86
+ if host is None:
87
+ return False
88
+ try:
89
+ if ipaddress.ip_address(host).is_loopback:
90
+ return True
91
+ else:
92
+ return False
93
+ except:
94
+ pass
95
+
96
+ loopback = False
97
+ for family in (socket.AF_INET, socket.AF_INET6):
98
+ try:
99
+ r = socket.getaddrinfo(host, None, family, socket.SOCK_STREAM)
100
+ for family, _, _, _, sockaddr in r:
101
+ if not ipaddress.ip_address(sockaddr[0]).is_loopback:
102
+ return loopback
103
+ else:
104
+ loopback = True
105
+ except socket.gaierror:
106
+ pass
107
+
108
+ return loopback
109
+
110
+
111
+ def create_origin_only_middleware():
112
+ @web.middleware
113
+ async def origin_only_middleware(request: web.Request, handler):
114
+ #this code is used to prevent the case where a random website can queue comfy workflows by making a POST to 127.0.0.1 which browsers don't prevent for some dumb reason.
115
+ #in that case the Host and Origin hostnames won't match
116
+ #I know the proper fix would be to add a cookie but this should take care of the problem in the meantime
117
+ if 'Host' in request.headers and 'Origin' in request.headers:
118
+ host = request.headers['Host']
119
+ origin = request.headers['Origin']
120
+ host_domain = host.lower()
121
+ parsed = urllib.parse.urlparse(origin)
122
+ origin_domain = parsed.netloc.lower()
123
+ host_domain_parsed = urllib.parse.urlsplit('//' + host_domain)
124
+
125
+ #limit the check to when the host domain is localhost, this makes it slightly less safe but should still prevent the exploit
126
+ loopback = is_loopback(host_domain_parsed.hostname)
127
+
128
+ if parsed.port is None: #if origin doesn't have a port strip it from the host to handle weird browsers, same for host
129
+ host_domain = host_domain_parsed.hostname
130
+ if host_domain_parsed.port is None:
131
+ origin_domain = parsed.hostname
132
+
133
+ if loopback and host_domain is not None and origin_domain is not None and len(host_domain) > 0 and len(origin_domain) > 0:
134
+ if host_domain != origin_domain:
135
+ logging.warning("WARNING: request with non matching host and origin {} != {}, returning 403".format(host_domain, origin_domain))
136
+ return web.Response(status=403)
137
+
138
+ if request.method == "OPTIONS":
139
+ response = web.Response()
140
+ else:
141
+ response = await handler(request)
142
+
143
+ return response
144
+
145
+ return origin_only_middleware
146
+
147
+ class PromptServer():
148
+ def __init__(self, loop):
149
+ PromptServer.instance = self
150
+
151
+ mimetypes.init()
152
+ mimetypes.add_type('application/javascript; charset=utf-8', '.js')
153
+ mimetypes.add_type('image/webp', '.webp')
154
+
155
+ self.user_manager = UserManager()
156
+ self.model_file_manager = ModelFileManager()
157
+ self.custom_node_manager = CustomNodeManager()
158
+ self.internal_routes = InternalRoutes(self)
159
+ self.supports = ["custom_nodes_from_web"]
160
+ self.prompt_queue = execution.PromptQueue(self)
161
+ self.loop = loop
162
+ self.messages = asyncio.Queue()
163
+ self.client_session:Optional[aiohttp.ClientSession] = None
164
+ self.number = 0
165
+
166
+ middlewares = [cache_control]
167
+ if args.enable_compress_response_body:
168
+ middlewares.append(compress_body)
169
+
170
+ if args.enable_cors_header:
171
+ middlewares.append(create_cors_middleware(args.enable_cors_header))
172
+ else:
173
+ middlewares.append(create_origin_only_middleware())
174
+
175
+ max_upload_size = round(args.max_upload_size * 1024 * 1024)
176
+ self.app = web.Application(client_max_size=max_upload_size, middlewares=middlewares)
177
+ self.sockets = dict()
178
+ self.sockets_metadata = dict()
179
+ self.web_root = (
180
+ FrontendManager.init_frontend(args.front_end_version)
181
+ if args.front_end_root is None
182
+ else args.front_end_root
183
+ )
184
+ logging.info(f"[Prompt Server] web root: {self.web_root}")
185
+ routes = web.RouteTableDef()
186
+ self.routes = routes
187
+ self.last_node_id = None
188
+ self.client_id = None
189
+
190
+ self.on_prompt_handlers = []
191
+
192
+ @routes.get('/ws')
193
+ async def websocket_handler(request):
194
+ ws = web.WebSocketResponse()
195
+ await ws.prepare(request)
196
+ sid = request.rel_url.query.get('clientId', '')
197
+ if sid:
198
+ # Reusing existing session, remove old
199
+ self.sockets.pop(sid, None)
200
+ else:
201
+ sid = uuid.uuid4().hex
202
+
203
+ # Store WebSocket for backward compatibility
204
+ self.sockets[sid] = ws
205
+ # Store metadata separately
206
+ self.sockets_metadata[sid] = {"feature_flags": {}}
207
+
208
+ try:
209
+ # Send initial state to the new client
210
+ await self.send("status", {"status": self.get_queue_info(), "sid": sid}, sid)
211
+ # On reconnect if we are the currently executing client send the current node
212
+ if self.client_id == sid and self.last_node_id is not None:
213
+ await self.send("executing", { "node": self.last_node_id }, sid)
214
+
215
+ # Flag to track if we've received the first message
216
+ first_message = True
217
+
218
+ async for msg in ws:
219
+ if msg.type == aiohttp.WSMsgType.ERROR:
220
+ logging.warning('ws connection closed with exception %s' % ws.exception())
221
+ elif msg.type == aiohttp.WSMsgType.TEXT:
222
+ try:
223
+ data = json.loads(msg.data)
224
+ # Check if first message is feature flags
225
+ if first_message and data.get("type") == "feature_flags":
226
+ # Store client feature flags
227
+ client_flags = data.get("data", {})
228
+ self.sockets_metadata[sid]["feature_flags"] = client_flags
229
+
230
+ # Send server feature flags in response
231
+ await self.send(
232
+ "feature_flags",
233
+ feature_flags.get_server_features(),
234
+ sid,
235
+ )
236
+
237
+ logging.info(
238
+ f"Feature flags negotiated for client {sid}: {client_flags}"
239
+ )
240
+ first_message = False
241
+ except json.JSONDecodeError:
242
+ logging.warning(
243
+ f"Invalid JSON received from client {sid}: {msg.data}"
244
+ )
245
+ except Exception as e:
246
+ logging.error(f"Error processing WebSocket message: {e}")
247
+ finally:
248
+ self.sockets.pop(sid, None)
249
+ self.sockets_metadata.pop(sid, None)
250
+ return ws
251
+
252
+ @routes.get("/")
253
+ async def get_root(request):
254
+ response = web.FileResponse(os.path.join(self.web_root, "index.html"))
255
+ response.headers['Cache-Control'] = 'no-cache'
256
+ response.headers["Pragma"] = "no-cache"
257
+ response.headers["Expires"] = "0"
258
+ return response
259
+
260
+ @routes.get("/embeddings")
261
+ def get_embeddings(request):
262
+ embeddings = folder_paths.get_filename_list("embeddings")
263
+ return web.json_response(list(map(lambda a: os.path.splitext(a)[0], embeddings)))
264
+
265
+ @routes.get("/models")
266
+ def list_model_types(request):
267
+ model_types = list(folder_paths.folder_names_and_paths.keys())
268
+
269
+ return web.json_response(model_types)
270
+
271
+ @routes.get("/models/{folder}")
272
+ async def get_models(request):
273
+ folder = request.match_info.get("folder", None)
274
+ if not folder in folder_paths.folder_names_and_paths:
275
+ return web.Response(status=404)
276
+ files = folder_paths.get_filename_list(folder)
277
+ return web.json_response(files)
278
+
279
+ @routes.get("/extensions")
280
+ async def get_extensions(request):
281
+ files = glob.glob(os.path.join(
282
+ glob.escape(self.web_root), 'extensions/**/*.js'), recursive=True)
283
+
284
+ extensions = list(map(lambda f: "/" + os.path.relpath(f, self.web_root).replace("\\", "/"), files))
285
+
286
+ for name, dir in nodes.EXTENSION_WEB_DIRS.items():
287
+ files = glob.glob(os.path.join(glob.escape(dir), '**/*.js'), recursive=True)
288
+ extensions.extend(list(map(lambda f: "/extensions/" + urllib.parse.quote(
289
+ name) + "/" + os.path.relpath(f, dir).replace("\\", "/"), files)))
290
+
291
+ return web.json_response(extensions)
292
+
293
+ def get_dir_by_type(dir_type):
294
+ if dir_type is None:
295
+ dir_type = "input"
296
+
297
+ if dir_type == "input":
298
+ type_dir = folder_paths.get_input_directory()
299
+ elif dir_type == "temp":
300
+ type_dir = folder_paths.get_temp_directory()
301
+ elif dir_type == "output":
302
+ type_dir = folder_paths.get_output_directory()
303
+
304
+ return type_dir, dir_type
305
+
306
+ def compare_image_hash(filepath, image):
307
+ hasher = node_helpers.hasher()
308
+
309
+ # function to compare hashes of two images to see if it already exists, fix to #3465
310
+ if os.path.exists(filepath):
311
+ a = hasher()
312
+ b = hasher()
313
+ with open(filepath, "rb") as f:
314
+ a.update(f.read())
315
+ b.update(image.file.read())
316
+ image.file.seek(0)
317
+ return a.hexdigest() == b.hexdigest()
318
+ return False
319
+
320
+ def image_upload(post, image_save_function=None):
321
+ image = post.get("image")
322
+ overwrite = post.get("overwrite")
323
+ image_is_duplicate = False
324
+
325
+ image_upload_type = post.get("type")
326
+ upload_dir, image_upload_type = get_dir_by_type(image_upload_type)
327
+
328
+ if image and image.file:
329
+ filename = image.filename
330
+ if not filename:
331
+ return web.Response(status=400)
332
+
333
+ subfolder = post.get("subfolder", "")
334
+ full_output_folder = os.path.join(upload_dir, os.path.normpath(subfolder))
335
+ filepath = os.path.abspath(os.path.join(full_output_folder, filename))
336
+
337
+ if os.path.commonpath((upload_dir, filepath)) != upload_dir:
338
+ return web.Response(status=400)
339
+
340
+ if not os.path.exists(full_output_folder):
341
+ os.makedirs(full_output_folder)
342
+
343
+ split = os.path.splitext(filename)
344
+
345
+ if overwrite is not None and (overwrite == "true" or overwrite == "1"):
346
+ pass
347
+ else:
348
+ i = 1
349
+ while os.path.exists(filepath):
350
+ if compare_image_hash(filepath, image): #compare hash to prevent saving of duplicates with same name, fix for #3465
351
+ image_is_duplicate = True
352
+ break
353
+ filename = f"{split[0]} ({i}){split[1]}"
354
+ filepath = os.path.join(full_output_folder, filename)
355
+ i += 1
356
+
357
+ if not image_is_duplicate:
358
+ if image_save_function is not None:
359
+ image_save_function(image, post, filepath)
360
+ else:
361
+ with open(filepath, "wb") as f:
362
+ f.write(image.file.read())
363
+
364
+ return web.json_response({"name" : filename, "subfolder": subfolder, "type": image_upload_type})
365
+ else:
366
+ return web.Response(status=400)
367
+
368
+ @routes.post("/upload/image")
369
+ async def upload_image(request):
370
+ post = await request.post()
371
+ return image_upload(post)
372
+
373
+
374
+ @routes.post("/upload/mask")
375
+ async def upload_mask(request):
376
+ post = await request.post()
377
+
378
+ def image_save_function(image, post, filepath):
379
+ original_ref = json.loads(post.get("original_ref"))
380
+ filename, output_dir = folder_paths.annotated_filepath(original_ref['filename'])
381
+
382
+ if not filename:
383
+ return web.Response(status=400)
384
+
385
+ # validation for security: prevent accessing arbitrary path
386
+ if filename[0] == '/' or '..' in filename:
387
+ return web.Response(status=400)
388
+
389
+ if output_dir is None:
390
+ type = original_ref.get("type", "output")
391
+ output_dir = folder_paths.get_directory_by_type(type)
392
+
393
+ if output_dir is None:
394
+ return web.Response(status=400)
395
+
396
+ if original_ref.get("subfolder", "") != "":
397
+ full_output_dir = os.path.join(output_dir, original_ref["subfolder"])
398
+ if os.path.commonpath((os.path.abspath(full_output_dir), output_dir)) != output_dir:
399
+ return web.Response(status=403)
400
+ output_dir = full_output_dir
401
+
402
+ file = os.path.join(output_dir, filename)
403
+
404
+ if os.path.isfile(file):
405
+ with Image.open(file) as original_pil:
406
+ metadata = PngInfo()
407
+ if hasattr(original_pil,'text'):
408
+ for key in original_pil.text:
409
+ metadata.add_text(key, original_pil.text[key])
410
+ original_pil = original_pil.convert('RGBA')
411
+ mask_pil = Image.open(image.file).convert('RGBA')
412
+
413
+ # alpha copy
414
+ new_alpha = mask_pil.getchannel('A')
415
+ original_pil.putalpha(new_alpha)
416
+ original_pil.save(filepath, compress_level=4, pnginfo=metadata)
417
+
418
+ return image_upload(post, image_save_function)
419
+
420
+ @routes.get("/view")
421
+ async def view_image(request):
422
+ if "filename" in request.rel_url.query:
423
+ filename = request.rel_url.query["filename"]
424
+ filename, output_dir = folder_paths.annotated_filepath(filename)
425
+
426
+ if not filename:
427
+ return web.Response(status=400)
428
+
429
+ # validation for security: prevent accessing arbitrary path
430
+ if filename[0] == '/' or '..' in filename:
431
+ return web.Response(status=400)
432
+
433
+ if output_dir is None:
434
+ type = request.rel_url.query.get("type", "output")
435
+ output_dir = folder_paths.get_directory_by_type(type)
436
+
437
+ if output_dir is None:
438
+ return web.Response(status=400)
439
+
440
+ if "subfolder" in request.rel_url.query:
441
+ full_output_dir = os.path.join(output_dir, request.rel_url.query["subfolder"])
442
+ if os.path.commonpath((os.path.abspath(full_output_dir), output_dir)) != output_dir:
443
+ return web.Response(status=403)
444
+ output_dir = full_output_dir
445
+
446
+ filename = os.path.basename(filename)
447
+ file = os.path.join(output_dir, filename)
448
+
449
+ if os.path.isfile(file):
450
+ if 'preview' in request.rel_url.query:
451
+ with Image.open(file) as img:
452
+ preview_info = request.rel_url.query['preview'].split(';')
453
+ image_format = preview_info[0]
454
+ if image_format not in ['webp', 'jpeg'] or 'a' in request.rel_url.query.get('channel', ''):
455
+ image_format = 'webp'
456
+
457
+ quality = 90
458
+ if preview_info[-1].isdigit():
459
+ quality = int(preview_info[-1])
460
+
461
+ buffer = BytesIO()
462
+ if image_format in ['jpeg'] or request.rel_url.query.get('channel', '') == 'rgb':
463
+ img = img.convert("RGB")
464
+ img.save(buffer, format=image_format, quality=quality)
465
+ buffer.seek(0)
466
+
467
+ return web.Response(body=buffer.read(), content_type=f'image/{image_format}',
468
+ headers={"Content-Disposition": f"filename=\"{filename}\""})
469
+
470
+ if 'channel' not in request.rel_url.query:
471
+ channel = 'rgba'
472
+ else:
473
+ channel = request.rel_url.query["channel"]
474
+
475
+ if channel == 'rgb':
476
+ with Image.open(file) as img:
477
+ if img.mode == "RGBA":
478
+ r, g, b, a = img.split()
479
+ new_img = Image.merge('RGB', (r, g, b))
480
+ else:
481
+ new_img = img.convert("RGB")
482
+
483
+ buffer = BytesIO()
484
+ new_img.save(buffer, format='PNG')
485
+ buffer.seek(0)
486
+
487
+ return web.Response(body=buffer.read(), content_type='image/png',
488
+ headers={"Content-Disposition": f"filename=\"{filename}\""})
489
+
490
+ elif channel == 'a':
491
+ with Image.open(file) as img:
492
+ if img.mode == "RGBA":
493
+ _, _, _, a = img.split()
494
+ else:
495
+ a = Image.new('L', img.size, 255)
496
+
497
+ # alpha img
498
+ alpha_img = Image.new('RGBA', img.size)
499
+ alpha_img.putalpha(a)
500
+ alpha_buffer = BytesIO()
501
+ alpha_img.save(alpha_buffer, format='PNG')
502
+ alpha_buffer.seek(0)
503
+
504
+ return web.Response(body=alpha_buffer.read(), content_type='image/png',
505
+ headers={"Content-Disposition": f"filename=\"{filename}\""})
506
+ else:
507
+ # Get content type from mimetype, defaulting to 'application/octet-stream'
508
+ content_type = mimetypes.guess_type(filename)[0] or 'application/octet-stream'
509
+
510
+ # For security, force certain mimetypes to download instead of display
511
+ if content_type in {'text/html', 'text/html-sandboxed', 'application/xhtml+xml', 'text/javascript', 'text/css'}:
512
+ content_type = 'application/octet-stream' # Forces download
513
+
514
+ return web.FileResponse(
515
+ file,
516
+ headers={
517
+ "Content-Disposition": f"filename=\"{filename}\"",
518
+ "Content-Type": content_type
519
+ }
520
+ )
521
+
522
+ return web.Response(status=404)
523
+
524
+ @routes.get("/view_metadata/{folder_name}")
525
+ async def view_metadata(request):
526
+ folder_name = request.match_info.get("folder_name", None)
527
+ if folder_name is None:
528
+ return web.Response(status=404)
529
+ if not "filename" in request.rel_url.query:
530
+ return web.Response(status=404)
531
+
532
+ filename = request.rel_url.query["filename"]
533
+ if not filename.endswith(".safetensors"):
534
+ return web.Response(status=404)
535
+
536
+ safetensors_path = folder_paths.get_full_path(folder_name, filename)
537
+ if safetensors_path is None:
538
+ return web.Response(status=404)
539
+ out = comfy.utils.safetensors_header(safetensors_path, max_size=1024*1024)
540
+ if out is None:
541
+ return web.Response(status=404)
542
+ dt = json.loads(out)
543
+ if not "__metadata__" in dt:
544
+ return web.Response(status=404)
545
+ return web.json_response(dt["__metadata__"])
546
+
547
+ @routes.get("/system_stats")
548
+ async def system_stats(request):
549
+ device = comfy.model_management.get_torch_device()
550
+ device_name = comfy.model_management.get_torch_device_name(device)
551
+ cpu_device = comfy.model_management.torch.device("cpu")
552
+ ram_total = comfy.model_management.get_total_memory(cpu_device)
553
+ ram_free = comfy.model_management.get_free_memory(cpu_device)
554
+ vram_total, torch_vram_total = comfy.model_management.get_total_memory(device, torch_total_too=True)
555
+ vram_free, torch_vram_free = comfy.model_management.get_free_memory(device, torch_free_too=True)
556
+ required_frontend_version = FrontendManager.get_required_frontend_version()
557
+
558
+ system_stats = {
559
+ "system": {
560
+ "os": os.name,
561
+ "ram_total": ram_total,
562
+ "ram_free": ram_free,
563
+ "comfyui_version": __version__,
564
+ "required_frontend_version": required_frontend_version,
565
+ "python_version": sys.version,
566
+ "pytorch_version": comfy.model_management.torch_version,
567
+ "embedded_python": os.path.split(os.path.split(sys.executable)[0])[1] == "python_embeded",
568
+ "argv": sys.argv
569
+ },
570
+ "devices": [
571
+ {
572
+ "name": device_name,
573
+ "type": device.type,
574
+ "index": device.index,
575
+ "vram_total": vram_total,
576
+ "vram_free": vram_free,
577
+ "torch_vram_total": torch_vram_total,
578
+ "torch_vram_free": torch_vram_free,
579
+ }
580
+ ]
581
+ }
582
+ return web.json_response(system_stats)
583
+
584
+ @routes.get("/features")
585
+ async def get_features(request):
586
+ return web.json_response(feature_flags.get_server_features())
587
+
588
+ @routes.get("/prompt")
589
+ async def get_prompt(request):
590
+ return web.json_response(self.get_queue_info())
591
+
592
+ def node_info(node_class):
593
+ obj_class = nodes.NODE_CLASS_MAPPINGS[node_class]
594
+ info = {}
595
+ info['input'] = obj_class.INPUT_TYPES()
596
+ info['input_order'] = {key: list(value.keys()) for (key, value) in obj_class.INPUT_TYPES().items()}
597
+ info['output'] = obj_class.RETURN_TYPES
598
+ info['output_is_list'] = obj_class.OUTPUT_IS_LIST if hasattr(obj_class, 'OUTPUT_IS_LIST') else [False] * len(obj_class.RETURN_TYPES)
599
+ info['output_name'] = obj_class.RETURN_NAMES if hasattr(obj_class, 'RETURN_NAMES') else info['output']
600
+ info['name'] = node_class
601
+ info['display_name'] = nodes.NODE_DISPLAY_NAME_MAPPINGS[node_class] if node_class in nodes.NODE_DISPLAY_NAME_MAPPINGS.keys() else node_class
602
+ info['description'] = obj_class.DESCRIPTION if hasattr(obj_class,'DESCRIPTION') else ''
603
+ info['python_module'] = getattr(obj_class, "RELATIVE_PYTHON_MODULE", "nodes")
604
+ info['category'] = 'sd'
605
+ if hasattr(obj_class, 'OUTPUT_NODE') and obj_class.OUTPUT_NODE == True:
606
+ info['output_node'] = True
607
+ else:
608
+ info['output_node'] = False
609
+
610
+ if hasattr(obj_class, 'CATEGORY'):
611
+ info['category'] = obj_class.CATEGORY
612
+
613
+ if hasattr(obj_class, 'OUTPUT_TOOLTIPS'):
614
+ info['output_tooltips'] = obj_class.OUTPUT_TOOLTIPS
615
+
616
+ if getattr(obj_class, "DEPRECATED", False):
617
+ info['deprecated'] = True
618
+ if getattr(obj_class, "EXPERIMENTAL", False):
619
+ info['experimental'] = True
620
+
621
+ if hasattr(obj_class, 'API_NODE'):
622
+ info['api_node'] = obj_class.API_NODE
623
+ return info
624
+
625
+ @routes.get("/object_info")
626
+ async def get_object_info(request):
627
+ with folder_paths.cache_helper:
628
+ out = {}
629
+ for x in nodes.NODE_CLASS_MAPPINGS:
630
+ try:
631
+ out[x] = node_info(x)
632
+ except Exception:
633
+ logging.error(f"[ERROR] An error occurred while retrieving information for the '{x}' node.")
634
+ logging.error(traceback.format_exc())
635
+ return web.json_response(out)
636
+
637
+ @routes.get("/object_info/{node_class}")
638
+ async def get_object_info_node(request):
639
+ node_class = request.match_info.get("node_class", None)
640
+ out = {}
641
+ if (node_class is not None) and (node_class in nodes.NODE_CLASS_MAPPINGS):
642
+ out[node_class] = node_info(node_class)
643
+ return web.json_response(out)
644
+
645
+ @routes.get("/history")
646
+ async def get_history(request):
647
+ max_items = request.rel_url.query.get("max_items", None)
648
+ if max_items is not None:
649
+ max_items = int(max_items)
650
+ return web.json_response(self.prompt_queue.get_history(max_items=max_items))
651
+
652
+ @routes.get("/history/{prompt_id}")
653
+ async def get_history_prompt_id(request):
654
+ prompt_id = request.match_info.get("prompt_id", None)
655
+ return web.json_response(self.prompt_queue.get_history(prompt_id=prompt_id))
656
+
657
+ @routes.get("/queue")
658
+ async def get_queue(request):
659
+ queue_info = {}
660
+ current_queue = self.prompt_queue.get_current_queue_volatile()
661
+ queue_info['queue_running'] = current_queue[0]
662
+ queue_info['queue_pending'] = current_queue[1]
663
+ return web.json_response(queue_info)
664
+
665
+ @routes.post("/prompt")
666
+ async def post_prompt(request):
667
+ logging.info("got prompt")
668
+ json_data = await request.json()
669
+ json_data = self.trigger_on_prompt(json_data)
670
+
671
+ if "number" in json_data:
672
+ number = float(json_data['number'])
673
+ else:
674
+ number = self.number
675
+ if "front" in json_data:
676
+ if json_data['front']:
677
+ number = -number
678
+
679
+ self.number += 1
680
+
681
+ if "prompt" in json_data:
682
+ prompt = json_data["prompt"]
683
+ prompt_id = str(json_data.get("prompt_id", uuid.uuid4()))
684
+ valid = await execution.validate_prompt(prompt_id, prompt)
685
+ extra_data = {}
686
+ if "extra_data" in json_data:
687
+ extra_data = json_data["extra_data"]
688
+
689
+ if "client_id" in json_data:
690
+ extra_data["client_id"] = json_data["client_id"]
691
+ if valid[0]:
692
+ outputs_to_execute = valid[2]
693
+ self.prompt_queue.put((number, prompt_id, prompt, extra_data, outputs_to_execute))
694
+ response = {"prompt_id": prompt_id, "number": number, "node_errors": valid[3]}
695
+ return web.json_response(response)
696
+ else:
697
+ logging.warning("invalid prompt: {}".format(valid[1]))
698
+ return web.json_response({"error": valid[1], "node_errors": valid[3]}, status=400)
699
+ else:
700
+ error = {
701
+ "type": "no_prompt",
702
+ "message": "No prompt provided",
703
+ "details": "No prompt provided",
704
+ "extra_info": {}
705
+ }
706
+ return web.json_response({"error": error, "node_errors": {}}, status=400)
707
+
708
+ @routes.post("/queue")
709
+ async def post_queue(request):
710
+ json_data = await request.json()
711
+ if "clear" in json_data:
712
+ if json_data["clear"]:
713
+ self.prompt_queue.wipe_queue()
714
+ if "delete" in json_data:
715
+ to_delete = json_data['delete']
716
+ for id_to_delete in to_delete:
717
+ delete_func = lambda a: a[1] == id_to_delete
718
+ self.prompt_queue.delete_queue_item(delete_func)
719
+
720
+ return web.Response(status=200)
721
+
722
+ @routes.post("/interrupt")
723
+ async def post_interrupt(request):
724
+ nodes.interrupt_processing()
725
+ return web.Response(status=200)
726
+
727
+ @routes.post("/free")
728
+ async def post_free(request):
729
+ json_data = await request.json()
730
+ unload_models = json_data.get("unload_models", False)
731
+ free_memory = json_data.get("free_memory", False)
732
+ if unload_models:
733
+ self.prompt_queue.set_flag("unload_models", unload_models)
734
+ if free_memory:
735
+ self.prompt_queue.set_flag("free_memory", free_memory)
736
+ return web.Response(status=200)
737
+
738
+ @routes.post("/history")
739
+ async def post_history(request):
740
+ json_data = await request.json()
741
+ if "clear" in json_data:
742
+ if json_data["clear"]:
743
+ self.prompt_queue.wipe_history()
744
+ if "delete" in json_data:
745
+ to_delete = json_data['delete']
746
+ for id_to_delete in to_delete:
747
+ self.prompt_queue.delete_history_item(id_to_delete)
748
+
749
+ return web.Response(status=200)
750
+
751
+ async def setup(self):
752
+ timeout = aiohttp.ClientTimeout(total=None) # no timeout
753
+ self.client_session = aiohttp.ClientSession(timeout=timeout)
754
+
755
+ def add_routes(self):
756
+ self.user_manager.add_routes(self.routes)
757
+ self.model_file_manager.add_routes(self.routes)
758
+ self.custom_node_manager.add_routes(self.routes, self.app, nodes.LOADED_MODULE_DIRS.items())
759
+ self.app.add_subapp('/internal', self.internal_routes.get_app())
760
+
761
+ # Prefix every route with /api for easier matching for delegation.
762
+ # This is very useful for frontend dev server, which need to forward
763
+ # everything except serving of static files.
764
+ # Currently both the old endpoints without prefix and new endpoints with
765
+ # prefix are supported.
766
+ api_routes = web.RouteTableDef()
767
+ for route in self.routes:
768
+ # Custom nodes might add extra static routes. Only process non-static
769
+ # routes to add /api prefix.
770
+ if isinstance(route, web.RouteDef):
771
+ api_routes.route(route.method, "/api" + route.path)(route.handler, **route.kwargs)
772
+ self.app.add_routes(api_routes)
773
+ self.app.add_routes(self.routes)
774
+
775
+ # Add routes from web extensions.
776
+ for name, dir in nodes.EXTENSION_WEB_DIRS.items():
777
+ self.app.add_routes([web.static('/extensions/' + name, dir)])
778
+
779
+ workflow_templates_path = FrontendManager.templates_path()
780
+ if workflow_templates_path:
781
+ self.app.add_routes([
782
+ web.static('/templates', workflow_templates_path)
783
+ ])
784
+
785
+ # Serve embedded documentation from the package
786
+ embedded_docs_path = FrontendManager.embedded_docs_path()
787
+ if embedded_docs_path:
788
+ self.app.add_routes([
789
+ web.static('/docs', embedded_docs_path)
790
+ ])
791
+
792
+ self.app.add_routes([
793
+ web.static('/', self.web_root),
794
+ ])
795
+
796
+ def get_queue_info(self):
797
+ prompt_info = {}
798
+ exec_info = {}
799
+ exec_info['queue_remaining'] = self.prompt_queue.get_tasks_remaining()
800
+ prompt_info['exec_info'] = exec_info
801
+ return prompt_info
802
+
803
+ async def send(self, event, data, sid=None):
804
+ if event == BinaryEventTypes.UNENCODED_PREVIEW_IMAGE:
805
+ await self.send_image(data, sid=sid)
806
+ elif event == BinaryEventTypes.PREVIEW_IMAGE_WITH_METADATA:
807
+ # data is (preview_image, metadata)
808
+ preview_image, metadata = data
809
+ await self.send_image_with_metadata(preview_image, metadata, sid=sid)
810
+ elif isinstance(data, (bytes, bytearray)):
811
+ await self.send_bytes(event, data, sid)
812
+ else:
813
+ await self.send_json(event, data, sid)
814
+
815
+ def encode_bytes(self, event, data):
816
+ if not isinstance(event, int):
817
+ raise RuntimeError(f"Binary event types must be integers, got {event}")
818
+
819
+ packed = struct.pack(">I", event)
820
+ message = bytearray(packed)
821
+ message.extend(data)
822
+ return message
823
+
824
+ async def send_image(self, image_data, sid=None):
825
+ image_type = image_data[0]
826
+ image = image_data[1]
827
+ max_size = image_data[2]
828
+ if max_size is not None:
829
+ if hasattr(Image, 'Resampling'):
830
+ resampling = Image.Resampling.BILINEAR
831
+ else:
832
+ resampling = Image.Resampling.LANCZOS
833
+
834
+ image = ImageOps.contain(image, (max_size, max_size), resampling)
835
+ type_num = 1
836
+ if image_type == "JPEG":
837
+ type_num = 1
838
+ elif image_type == "PNG":
839
+ type_num = 2
840
+
841
+ bytesIO = BytesIO()
842
+ header = struct.pack(">I", type_num)
843
+ bytesIO.write(header)
844
+ image.save(bytesIO, format=image_type, quality=95, compress_level=1)
845
+ preview_bytes = bytesIO.getvalue()
846
+ await self.send_bytes(BinaryEventTypes.PREVIEW_IMAGE, preview_bytes, sid=sid)
847
+
848
+ async def send_image_with_metadata(self, image_data, metadata=None, sid=None):
849
+ image_type = image_data[0]
850
+ image = image_data[1]
851
+ max_size = image_data[2]
852
+ if max_size is not None:
853
+ if hasattr(Image, 'Resampling'):
854
+ resampling = Image.Resampling.BILINEAR
855
+ else:
856
+ resampling = Image.Resampling.LANCZOS
857
+
858
+ image = ImageOps.contain(image, (max_size, max_size), resampling)
859
+
860
+ mimetype = "image/png" if image_type == "PNG" else "image/jpeg"
861
+
862
+ # Prepare metadata
863
+ if metadata is None:
864
+ metadata = {}
865
+ metadata["image_type"] = mimetype
866
+
867
+ # Serialize metadata as JSON
868
+ import json
869
+ metadata_json = json.dumps(metadata).encode('utf-8')
870
+ metadata_length = len(metadata_json)
871
+
872
+ # Prepare image data
873
+ bytesIO = BytesIO()
874
+ image.save(bytesIO, format=image_type, quality=95, compress_level=1)
875
+ image_bytes = bytesIO.getvalue()
876
+
877
+ # Combine metadata and image
878
+ combined_data = bytearray()
879
+ combined_data.extend(struct.pack(">I", metadata_length))
880
+ combined_data.extend(metadata_json)
881
+ combined_data.extend(image_bytes)
882
+
883
+ await self.send_bytes(BinaryEventTypes.PREVIEW_IMAGE_WITH_METADATA, combined_data, sid=sid)
884
+
885
+ async def send_bytes(self, event, data, sid=None):
886
+ message = self.encode_bytes(event, data)
887
+
888
+ if sid is None:
889
+ sockets = list(self.sockets.values())
890
+ for ws in sockets:
891
+ await send_socket_catch_exception(ws.send_bytes, message)
892
+ elif sid in self.sockets:
893
+ await send_socket_catch_exception(self.sockets[sid].send_bytes, message)
894
+
895
+ async def send_json(self, event, data, sid=None):
896
+ message = {"type": event, "data": data}
897
+
898
+ if sid is None:
899
+ sockets = list(self.sockets.values())
900
+ for ws in sockets:
901
+ await send_socket_catch_exception(ws.send_json, message)
902
+ elif sid in self.sockets:
903
+ await send_socket_catch_exception(self.sockets[sid].send_json, message)
904
+
905
+ def send_sync(self, event, data, sid=None):
906
+ self.loop.call_soon_threadsafe(
907
+ self.messages.put_nowait, (event, data, sid))
908
+
909
+ def queue_updated(self):
910
+ self.send_sync("status", { "status": self.get_queue_info() })
911
+
912
+ async def publish_loop(self):
913
+ while True:
914
+ msg = await self.messages.get()
915
+ await self.send(*msg)
916
+
917
+ async def start(self, address, port, verbose=True, call_on_start=None):
918
+ await self.start_multi_address([(address, port)], call_on_start=call_on_start)
919
+
920
+ async def start_multi_address(self, addresses, call_on_start=None, verbose=True):
921
+ runner = web.AppRunner(self.app, access_log=None)
922
+ await runner.setup()
923
+ ssl_ctx = None
924
+ scheme = "http"
925
+ if args.tls_keyfile and args.tls_certfile:
926
+ ssl_ctx = ssl.SSLContext(protocol=ssl.PROTOCOL_TLS_SERVER, verify_mode=ssl.CERT_NONE)
927
+ ssl_ctx.load_cert_chain(certfile=args.tls_certfile,
928
+ keyfile=args.tls_keyfile)
929
+ scheme = "https"
930
+
931
+ if verbose:
932
+ logging.info("Starting server\n")
933
+ for addr in addresses:
934
+ address = addr[0]
935
+ port = addr[1]
936
+ site = web.TCPSite(runner, address, port, ssl_context=ssl_ctx)
937
+ await site.start()
938
+
939
+ if not hasattr(self, 'address'):
940
+ self.address = address #TODO: remove this
941
+ self.port = port
942
+
943
+ if ':' in address:
944
+ address_print = "[{}]".format(address)
945
+ else:
946
+ address_print = address
947
+
948
+ if verbose:
949
+ logging.info("To see the GUI go to: {}://{}:{}".format(scheme, address_print, port))
950
+
951
+ if call_on_start is not None:
952
+ call_on_start(scheme, self.address, self.port)
953
+
954
+ def add_on_prompt_handler(self, handler):
955
+ self.on_prompt_handlers.append(handler)
956
+
957
+ def trigger_on_prompt(self, json_data):
958
+ for handler in self.on_prompt_handlers:
959
+ try:
960
+ json_data = handler(json_data)
961
+ except Exception:
962
+ logging.warning("[ERROR] An error occurred during the on_prompt_handler processing")
963
+ logging.warning(traceback.format_exc())
964
+
965
+ return json_data
966
+
967
+ def send_progress_text(
968
+ self, text: Union[bytes, bytearray, str], node_id: str, sid=None
969
+ ):
970
+ if isinstance(text, str):
971
+ text = text.encode("utf-8")
972
+ node_id_bytes = str(node_id).encode("utf-8")
973
+
974
+ # Pack the node_id length as a 4-byte unsigned integer, followed by the node_id bytes
975
+ message = struct.pack(">I", len(node_id_bytes)) + node_id_bytes + text
976
+
977
+ self.send_sync(BinaryEventTypes.TEXT, message, sid)