Outimus commited on
Commit
f4ee4c3
1 Parent(s): 07b5e97

Upload 19 files

Browse files
.gitignore ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ __pycache__/
2
+ .tmp
LICENSE.txt 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>.
README.md ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ComfyUI Manager
2
+
3
+ # Installation
4
+
5
+ 1. cd custom_nodes
6
+ 2. git clone https://github.com/ltdrdata/ComfyUI-Manager.git
7
+ 3. Restart ComfyUI
8
+
9
+ # Changes
10
+ * **0.12** Better installation support for Windows.
11
+ * **0.9** Support keyword search in installer menu.
12
+ * **V0.7.1** Bug fix for the issue where updates were not being applied on Windows.
13
+ * **For those who have been using versions 0.6, please perform a manual git pull in the custom_nodes/ComfyUI-Manager directory.**
14
+ * **V0.7** To address the issue of a slow list refresh, separate the fetch update and update check processes.
15
+ * **V0.6** Support extension installation for missing nodes.
16
+ * **V0.5** Removed external git program dependencies.
17
+
18
+
19
+ # How To Use
20
+
21
+ 1. Click "Manager" button on main menu
22
+
23
+ ![mainmenu](misc/main.png)
24
+
25
+
26
+ 2. If you click on 'Install Custom Nodes' or 'Install Models', an installer dialog will open.
27
+ ![menu](misc/menu.png)
28
+
29
+ * When the 'Use local DB' feature is enabled, the application will utilize the data stored locally on your device, rather than retrieving node/model information over the internet
30
+
31
+ * The ```Fetch Updates``` menu retrieves update data for custom nodes locally. Actual updates are applied by clicking the ```Update``` button in the ```Install Custom Nodes``` menu.
32
+
33
+ 3. Click 'Install' or 'Try Install' button.
34
+
35
+ ![node-install-dialog](misc/custom-nodes.png)
36
+
37
+ ![model-install-dialog](misc/models.png)
38
+
39
+ * Installed: This item is already installed.
40
+ * Install: Clicking this button will install the item.
41
+ * Try Install: This is a custom node of which installation information cannot be confirmed. Click the button to try installing it.
42
+
43
+
44
+ # Custom node support guide
45
+
46
+ * Currently, the system operates by cloning the git repository and sequentially installing the dependencies listed in requirements.txt using pip, followed by invoking the install.py script. In the future, we plan to discuss and determine the specifications for supporting custom nodes.
47
+
48
+ * Please submit a pull request to update either the custom-node-list.json or model-list.json file.
49
+
50
+ * The scanner currently provides a detection function for missing nodes, which is capable of detecting nodes described by the following two patterns.
51
+
52
+ ```
53
+ NODE_CLASS_MAPPINGS = {
54
+ "ExecutionSwitch": ExecutionSwitch,
55
+ "ExecutionBlocker": ExecutionBlocker,
56
+ ...
57
+ }
58
+
59
+ NODE_CLASS_MAPPINGS.update({
60
+ "UniFormer-SemSegPreprocessor": Uniformer_SemSegPreprocessor,
61
+ "SemSegPreprocessor": Uniformer_SemSegPreprocessor,
62
+ })
63
+ ```
64
+
65
+
66
+
67
+
68
+ # Support of missing nodes installation
69
+
70
+ ![missing-menu](misc/missing-menu.png)
71
+
72
+ * When you click on the ```Install Custom Nodes (missing)``` button in the menu, it displays a list of extension nodes that contain nodes not currently present in the workflow.
73
+
74
+ ![missing-list](misc/missing-list.png)
75
+
76
+ * Currently, support is not available for custom nodes that can only be downloaded through civitai.
77
+
78
+
79
+
80
+
81
+
82
+ # TODO: Unconventional form of custom node list
83
+
84
+ * https://github.com/hlky/AIT
85
+ * https://github.com/bmad4ever/ComfyUI-Bmad-Custom-Nodes
86
+ * https://github.com/diontimmer/Sample-Diffusion-ComfyUI-Extension
87
+ * https://github.com/shadownetdev1/comfyui-addons
88
+
89
+
90
+ # Roadmap
91
+
92
+ * installation from git url
93
+ * 3rd party repository
94
+ * category/keyword filter
95
+ * Specification of custom nodes
96
+ * Specification scanner
97
+ * Search extension by node name
98
+ * Automatic recognition of missing custom nodes
99
+ * Automatic installation suggestion of missing custom nodes
100
+ * workflow downloader
101
+
102
+ # Disclaimer
103
+
104
+ * This extension simply provides the convenience of installing custom nodes and does not guarantee their proper functioning.
__init__.py ADDED
@@ -0,0 +1,816 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import shutil
2
+ import folder_paths
3
+ import os, sys
4
+ import subprocess
5
+
6
+ try:
7
+ import git
8
+ except:
9
+ my_path = os.path.dirname(__file__)
10
+ requirements_path = os.path.join(my_path, "requirements.txt")
11
+ subprocess.check_call([sys.executable, '-m', 'pip', 'install', '-r', requirements_path])
12
+ import git
13
+
14
+ sys.path.append('../..')
15
+
16
+ from torchvision.datasets.utils import download_url
17
+
18
+ # ensure .js
19
+ print("### Loading: ComfyUI-Manager (V0.12)")
20
+
21
+ comfy_ui_revision = "Unknown"
22
+
23
+ comfy_path = os.path.dirname(folder_paths.__file__)
24
+ custom_nodes_path = os.path.join(comfy_path, 'custom_nodes')
25
+ js_path = os.path.join(comfy_path, "web", "extensions")
26
+
27
+ comfyui_manager_path = os.path.dirname(__file__)
28
+ local_db_model = os.path.join(comfyui_manager_path, "model-list.json")
29
+ local_db_alter = os.path.join(comfyui_manager_path, "alter-list.json")
30
+ local_db_custom_node_list = os.path.join(comfyui_manager_path, "custom-node-list.json")
31
+ local_db_extension_node_mappings = os.path.join(comfyui_manager_path, "extension-node-map.json")
32
+ git_script_path = os.path.join(os.path.dirname(__file__), "git_helper.py")
33
+
34
+ startup_script_path = os.path.join(comfyui_manager_path, "startup-scripts")
35
+
36
+
37
+ def try_install_script(url, repo_path, install_cmd):
38
+ if platform.system() == "Windows" and comfy_ui_revision >= 1152:
39
+ if not os.path.exists(startup_script_path):
40
+ os.makedirs(startup_script_path)
41
+
42
+ script_path = os.path.join(startup_script_path, "install-scripts.txt")
43
+ with open(script_path, "a") as file:
44
+ obj = [repo_path] + install_cmd
45
+ file.write(f"{obj}\n")
46
+
47
+ return True
48
+ else:
49
+ code = subprocess.run(install_cmd, cwd=repo_path)
50
+
51
+ if platform.system() == "Windows":
52
+ try:
53
+ if int(comfy_ui_revision) < 1152:
54
+ print("\n\n###################################################################")
55
+ print(f"[WARN] ComfyUI-Manager: Your ComfyUI version ({comfy_ui_revision}) is too old. Please update to the latest version.")
56
+ print(f"[WARN] The extension installation feature may not work properly in the current installed ComfyUI version on Windows environment.")
57
+ print("###################################################################\n\n")
58
+ except:
59
+ pass
60
+
61
+ if code.returncode != 0:
62
+ print(f"install script failed: {url}")
63
+ return False
64
+
65
+ def print_comfyui_version():
66
+ global comfy_ui_revision
67
+ try:
68
+ repo = git.Repo(os.path.dirname(folder_paths.__file__))
69
+
70
+ comfy_ui_revision = len(list(repo.iter_commits('HEAD')))
71
+ current_branch = repo.active_branch.name
72
+ git_hash = repo.head.commit.hexsha
73
+
74
+ try:
75
+ if int(comfy_ui_revision) < 1148:
76
+ print(f"\n\n## [WARN] ComfyUI-Manager: Your ComfyUI version ({comfy_ui_revision}) is too old. Please update to the latest version. ##\n\n")
77
+ except:
78
+ pass
79
+
80
+ if current_branch == "master":
81
+ print(f"### ComfyUI Revision: {comfy_ui_revision} [{git_hash[:8]}]")
82
+ else:
83
+ print(f"### ComfyUI Revision: {comfy_ui_revision} on '{current_branch}' [{git_hash[:8]}]")
84
+ except:
85
+ print("### ComfyUI Revision: UNKNOWN (The currently installed ComfyUI is not a Git repository)")
86
+
87
+
88
+ print_comfyui_version()
89
+
90
+
91
+ # use subprocess to avoid file system lock by git (Windows)
92
+ def __win_check_git_update(path, do_fetch=False):
93
+ if do_fetch:
94
+ command = [sys.executable, git_script_path, "--fetch", path]
95
+ else:
96
+ command = [sys.executable, git_script_path, "--check", path]
97
+
98
+ process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
99
+ output, _ = process.communicate()
100
+ output = output.decode('utf-8').strip()
101
+
102
+ if "CUSTOM NODE CHECK: True" in output:
103
+ process.wait()
104
+ return True
105
+ else:
106
+ process.wait()
107
+ return False
108
+
109
+
110
+ def __win_check_git_pull(path):
111
+ command = [sys.executable, git_script_path, "--pull", path]
112
+ process = subprocess.Popen(command)
113
+ process.wait()
114
+
115
+
116
+ def git_repo_has_updates(path, do_fetch=False):
117
+ # Check if the path is a git repository
118
+ if not os.path.exists(os.path.join(path, '.git')):
119
+ raise ValueError('Not a git repository')
120
+
121
+ if platform.system() == "Windows":
122
+ return __win_check_git_update(path, do_fetch)
123
+ else:
124
+ # Fetch the latest commits from the remote repository
125
+ repo = git.Repo(path)
126
+
127
+ current_branch = repo.active_branch
128
+ branch_name = current_branch.name
129
+
130
+ remote_name = 'origin'
131
+ remote = repo.remote(name=remote_name)
132
+
133
+ if do_fetch:
134
+ remote.fetch()
135
+
136
+ # Get the current commit hash and the commit hash of the remote branch
137
+ commit_hash = repo.head.commit.hexsha
138
+ remote_commit_hash = repo.refs[f'{remote_name}/{branch_name}'].object.hexsha
139
+
140
+ # Compare the commit hashes to determine if the local repository is behind the remote repository
141
+ if commit_hash != remote_commit_hash:
142
+ # Get the commit dates
143
+ commit_date = repo.head.commit.committed_datetime
144
+ remote_commit_date = repo.refs[f'{remote_name}/{branch_name}'].object.committed_datetime
145
+
146
+ # Compare the commit dates to determine if the local repository is behind the remote repository
147
+ if commit_date < remote_commit_date:
148
+ return True
149
+
150
+ return False
151
+
152
+
153
+ def git_pull(path):
154
+ # Check if the path is a git repository
155
+ if not os.path.exists(os.path.join(path, '.git')):
156
+ raise ValueError('Not a git repository')
157
+
158
+ # Pull the latest changes from the remote repository
159
+ if platform.system() == "Windows":
160
+ return __win_check_git_pull(path)
161
+ else:
162
+ repo = git.Repo(path)
163
+ origin = repo.remote(name='origin')
164
+ origin.pull()
165
+ repo.git.submodule('update', '--init', '--recursive')
166
+
167
+ repo.close()
168
+
169
+ return True
170
+
171
+
172
+ async def get_data(uri):
173
+ print(f"FECTH DATA from: {uri}")
174
+ if uri.startswith("http"):
175
+ async with aiohttp.ClientSession() as session:
176
+ async with session.get(uri) as resp:
177
+ json_text = await resp.text()
178
+ else:
179
+ with open(uri, "r") as f:
180
+ json_text = f.read()
181
+
182
+ json_obj = json.loads(json_text)
183
+ return json_obj
184
+
185
+
186
+ def setup_js():
187
+ # remove garbage
188
+ old_js_path = os.path.join(comfy_path, "web", "extensions", "core", "comfyui-manager.js")
189
+ if os.path.exists(old_js_path):
190
+ os.remove(old_js_path)
191
+
192
+ # setup js
193
+ js_dest_path = os.path.join(js_path, "comfyui-manager")
194
+ if not os.path.exists(js_dest_path):
195
+ os.makedirs(js_dest_path)
196
+ js_src_path = os.path.join(comfyui_manager_path, "js", "comfyui-manager.js")
197
+ shutil.copy(js_src_path, js_dest_path)
198
+
199
+ setup_js()
200
+
201
+
202
+ # Expand Server api
203
+
204
+ import server
205
+ from aiohttp import web
206
+ import aiohttp
207
+ import json
208
+ import zipfile
209
+ import urllib.request
210
+
211
+
212
+ def get_model_path(data):
213
+ if data['save_path'] != 'default':
214
+ base_model = os.path.join(folder_paths.models_dir, data['save_path'])
215
+ else:
216
+ model_type = data['type']
217
+ if model_type == "checkpoints":
218
+ base_model = folder_paths.folder_names_and_paths["checkpoints"][0][0]
219
+ elif model_type == "unclip":
220
+ base_model = folder_paths.folder_names_and_paths["checkpoints"][0][0]
221
+ elif model_type == "VAE":
222
+ base_model = folder_paths.folder_names_and_paths["vae"][0][0]
223
+ elif model_type == "lora":
224
+ base_model = folder_paths.folder_names_and_paths["loras"][0][0]
225
+ elif model_type == "T2I-Adapter":
226
+ base_model = folder_paths.folder_names_and_paths["controlnet"][0][0]
227
+ elif model_type == "T2I-Style":
228
+ base_model = folder_paths.folder_names_and_paths["controlnet"][0][0]
229
+ elif model_type == "controlnet":
230
+ base_model = folder_paths.folder_names_and_paths["controlnet"][0][0]
231
+ elif model_type == "clip_vision":
232
+ base_model = folder_paths.folder_names_and_paths["clip_vision"][0][0]
233
+ elif model_type == "gligen":
234
+ base_model = folder_paths.folder_names_and_paths["gligen"][0][0]
235
+ elif model_type == "upscale":
236
+ base_model = folder_paths.folder_names_and_paths["upscale_models"][0][0]
237
+ elif model_type == "embeddings":
238
+ base_model = folder_paths.folder_names_and_paths["embeddings"][0][0]
239
+ else:
240
+ base_model = None
241
+
242
+ return os.path.join(base_model, data['filename'])
243
+
244
+
245
+ def check_a_custom_node_installed(item, do_fetch=False):
246
+ item['installed'] = 'None'
247
+
248
+ if item['install_type'] == 'git-clone' and len(item['files']) == 1:
249
+ dir_name = os.path.splitext(os.path.basename(item['files'][0]))[0].replace(".git", "")
250
+ dir_path = os.path.join(custom_nodes_path, dir_name)
251
+ if os.path.exists(dir_path):
252
+ try:
253
+ if git_repo_has_updates(dir_path, do_fetch):
254
+ item['installed'] = 'Update'
255
+ else:
256
+ item['installed'] = 'True'
257
+ except:
258
+ item['installed'] = 'True'
259
+
260
+ elif os.path.exists(dir_path + ".disabled"):
261
+ item['installed'] = 'Disabled'
262
+
263
+ else:
264
+ item['installed'] = 'False'
265
+
266
+ elif item['install_type'] == 'copy' and len(item['files']) == 1:
267
+ dir_name = os.path.basename(item['files'][0])
268
+ base_path = custom_nodes_path if item['files'][0].endswith('.py') else js_path
269
+ file_path = os.path.join(base_path, dir_name)
270
+ if os.path.exists(file_path):
271
+ item['installed'] = 'True'
272
+ elif os.path.exists(file_path + ".disabled"):
273
+ item['installed'] = 'Disabled'
274
+ else:
275
+ item['installed'] = 'False'
276
+
277
+
278
+ def check_custom_nodes_installed(json_obj, do_fetch=False):
279
+ for item in json_obj['custom_nodes']:
280
+ check_a_custom_node_installed(item, do_fetch)
281
+
282
+
283
+ @server.PromptServer.instance.routes.get("/customnode/getmappings")
284
+ async def fetch_customnode_mappings(request):
285
+ if request.rel_url.query["mode"] == "local":
286
+ uri = local_db_extension_node_mappings
287
+ else:
288
+ uri = 'https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/extension-node-map.json'
289
+
290
+ json_obj = await get_data(uri)
291
+
292
+ return web.json_response(json_obj, content_type='application/json')
293
+
294
+
295
+ @server.PromptServer.instance.routes.get("/customnode/fetch_updates")
296
+ async def fetch_updates(request):
297
+ try:
298
+ if request.rel_url.query["mode"] == "local":
299
+ uri = local_db_custom_node_list
300
+ else:
301
+ uri = 'https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/custom-node-list.json'
302
+
303
+ json_obj = await get_data(uri)
304
+ check_custom_nodes_installed(json_obj, True)
305
+
306
+ update_exists = any('custom_nodes' in json_obj and 'installed' in node and node['installed'] == 'Update' for node in
307
+ json_obj['custom_nodes'])
308
+
309
+ if update_exists:
310
+ return web.Response(status=201)
311
+
312
+ return web.Response(status=200)
313
+ except:
314
+ return web.Response(status=400)
315
+
316
+
317
+ @server.PromptServer.instance.routes.get("/customnode/getlist")
318
+ async def fetch_customnode_list(request):
319
+ if request.rel_url.query["mode"] == "local":
320
+ uri = local_db_custom_node_list
321
+ else:
322
+ uri = 'https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/custom-node-list.json'
323
+
324
+ json_obj = await get_data(uri)
325
+ check_custom_nodes_installed(json_obj, False)
326
+
327
+ return web.json_response(json_obj, content_type='application/json')
328
+
329
+
330
+ @server.PromptServer.instance.routes.get("/alternatives/getlist")
331
+ async def fetch_alternatives_list(request):
332
+ if request.rel_url.query["mode"] == "local":
333
+ uri1 = local_db_alter
334
+ uri2 = local_db_custom_node_list
335
+ else:
336
+ uri1 = 'https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/alter-list.json'
337
+ uri2 = 'https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/custom-node-list.json'
338
+
339
+ alter_json = await get_data(uri1)
340
+ custom_node_json = await get_data(uri2)
341
+
342
+ fileurl_to_custom_node = {}
343
+ for item in custom_node_json['custom_nodes']:
344
+ for fileurl in item['files']:
345
+ fileurl_to_custom_node[fileurl] = item
346
+
347
+ for item in alter_json['items']:
348
+ fileurl = item['id']
349
+ if fileurl in fileurl_to_custom_node:
350
+ custom_node = fileurl_to_custom_node[fileurl]
351
+ check_a_custom_node_installed(custom_node)
352
+ item['custom_node'] = custom_node
353
+
354
+ return web.json_response(alter_json, content_type='application/json')
355
+
356
+
357
+ def check_model_installed(json_obj):
358
+ for item in json_obj['models']:
359
+ item['installed'] = 'None'
360
+
361
+ model_path = get_model_path(item)
362
+
363
+ if model_path is not None:
364
+ if os.path.exists(model_path):
365
+ item['installed'] = 'True'
366
+ else:
367
+ item['installed'] = 'False'
368
+
369
+
370
+ @server.PromptServer.instance.routes.get("/externalmodel/getlist")
371
+ async def fetch_externalmodel_list(request):
372
+ if request.rel_url.query["mode"] == "local":
373
+ uri = local_db_model
374
+ else:
375
+ uri = 'https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/model-list.json'
376
+
377
+ json_obj = await get_data(uri)
378
+ check_model_installed(json_obj)
379
+
380
+ return web.json_response(json_obj, content_type='application/json')
381
+
382
+
383
+ def unzip_install(files):
384
+ temp_filename = 'manager-temp.zip'
385
+ for url in files:
386
+ try:
387
+ headers = {
388
+ 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3'}
389
+
390
+ req = urllib.request.Request(url, headers=headers)
391
+ response = urllib.request.urlopen(req)
392
+ data = response.read()
393
+
394
+ with open(temp_filename, 'wb') as f:
395
+ f.write(data)
396
+
397
+ with zipfile.ZipFile(temp_filename, 'r') as zip_ref:
398
+ zip_ref.extractall(custom_nodes_path)
399
+
400
+ os.remove(temp_filename)
401
+ except Exception as e:
402
+ print(f"Install(unzip) error: {url} / {e}")
403
+ return False
404
+
405
+ print("Installation was successful.")
406
+ return True
407
+
408
+
409
+ def download_url_with_agent(url, save_path):
410
+ try:
411
+ headers = {
412
+ 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3'}
413
+
414
+ req = urllib.request.Request(url, headers=headers)
415
+ response = urllib.request.urlopen(req)
416
+ data = response.read()
417
+
418
+ if not os.path.exists(os.path.dirname(save_path)):
419
+ os.makedirs(os.path.dirname(save_path))
420
+
421
+ with open(save_path, 'wb') as f:
422
+ f.write(data)
423
+
424
+ except Exception as e:
425
+ print(f"Download error: {url} / {e}")
426
+ return False
427
+
428
+ print("Installation was successful.")
429
+ return True
430
+
431
+
432
+ def copy_install(files, js_path_name=None):
433
+ for url in files:
434
+ try:
435
+ if url.endswith(".py"):
436
+ download_url(url, custom_nodes_path)
437
+ else:
438
+ path = os.path.join(js_path, js_path_name) if js_path_name is not None else js_path
439
+ if not os.path.exists(path):
440
+ os.makedirs(path)
441
+ download_url(url, path)
442
+
443
+ except Exception as e:
444
+ print(f"Install(copy) error: {url} / {e}")
445
+ return False
446
+
447
+ print("Installation was successful.")
448
+ return True
449
+
450
+
451
+ def copy_uninstall(files, js_path_name=None):
452
+ for url in files:
453
+ dir_name = os.path.basename(url)
454
+ base_path = custom_nodes_path if url.endswith('.py') else os.path.join(js_path, js_path_name)
455
+ file_path = os.path.join(base_path, dir_name)
456
+
457
+ try:
458
+ if os.path.exists(file_path):
459
+ os.remove(file_path)
460
+ elif os.path.exists(file_path + ".disabled"):
461
+ os.remove(file_path + ".disabled")
462
+ except Exception as e:
463
+ print(f"Uninstall(copy) error: {url} / {e}")
464
+ return False
465
+
466
+ print("Uninstallation was successful.")
467
+ return True
468
+
469
+
470
+ def copy_set_active(files, is_disable, js_path_name=None):
471
+ if is_disable:
472
+ action_name = "Disable"
473
+ else:
474
+ action_name = "Enable"
475
+
476
+ for url in files:
477
+ dir_name = os.path.basename(url)
478
+ base_path = custom_nodes_path if url.endswith('.py') else os.path.join(js_path, js_path_name)
479
+ file_path = os.path.join(base_path, dir_name)
480
+
481
+ try:
482
+ if is_disable:
483
+ current_name = file_path
484
+ new_name = file_path + ".disabled"
485
+ else:
486
+ current_name = file_path + ".disabled"
487
+ new_name = file_path
488
+
489
+ os.rename(current_name, new_name)
490
+
491
+ except Exception as e:
492
+ print(f"{action_name}(copy) error: {url} / {e}")
493
+
494
+ return False
495
+
496
+ print(f"{action_name} was successful.")
497
+ return True
498
+
499
+
500
+ def execute_install_script(url, repo_path):
501
+ install_script_path = os.path.join(repo_path, "install.py")
502
+ requirements_path = os.path.join(repo_path, "requirements.txt")
503
+
504
+ if os.path.exists(requirements_path):
505
+ print(f"Install: pip packages")
506
+ install_cmd = [sys.executable, "-m", "pip", "install", "-r", "requirements.txt"]
507
+ try_install_script(url, repo_path, install_cmd)
508
+
509
+ if os.path.exists(install_script_path):
510
+ print(f"Install: install script")
511
+ install_cmd = [sys.executable, "install.py"]
512
+ try_install_script(url, repo_path, install_cmd)
513
+
514
+ return True
515
+
516
+
517
+ def gitclone_install(files):
518
+ print(f"install: {files}")
519
+ for url in files:
520
+ try:
521
+ print(f"Download: git clone '{url}'")
522
+ repo_name = os.path.splitext(os.path.basename(url))[0]
523
+ repo_path = os.path.join(custom_nodes_path, repo_name)
524
+
525
+ # Clone the repository from the remote URL
526
+ if platform.system() == 'Windows':
527
+ process = subprocess.Popen([sys.executable, git_script_path, "--clone", custom_nodes_path, url])
528
+ process.wait()
529
+ else:
530
+ repo = git.Repo.clone_from(url, repo_path, recursive=True)
531
+ repo.git.clear_cache()
532
+ repo.close()
533
+
534
+ if not execute_install_script(url, repo_path):
535
+ return False
536
+
537
+ except Exception as e:
538
+ print(f"Install(git-clone) error: {url} / {e}")
539
+ return False
540
+
541
+ print("Installation was successful.")
542
+ return True
543
+
544
+
545
+ import platform
546
+ import subprocess
547
+ import time
548
+
549
+
550
+ def rmtree(path):
551
+ retry_count = 3
552
+
553
+ while True:
554
+ try:
555
+ retry_count -= 1
556
+
557
+ if platform.system() == "Windows":
558
+ subprocess.check_call(['attrib', '-R', path + '\\*', '/S'])
559
+ shutil.rmtree(path)
560
+
561
+ return True
562
+
563
+ except Exception as ex:
564
+ print(f"ex: {ex}")
565
+ time.sleep(3)
566
+
567
+ if retry_count < 0:
568
+ raise ex
569
+
570
+ print(f"Uninstall retry({retry_count})")
571
+
572
+
573
+ def gitclone_uninstall(files):
574
+ import shutil
575
+ import os
576
+
577
+ print(f"uninstall: {files}")
578
+ for url in files:
579
+ try:
580
+ dir_name = os.path.splitext(os.path.basename(url))[0].replace(".git", "")
581
+ dir_path = os.path.join(custom_nodes_path, dir_name)
582
+
583
+ # safey check
584
+ if dir_path == '/' or dir_path[1:] == ":/" or dir_path == '':
585
+ print(f"Uninstall(git-clone) error: invalid path '{dir_path}' for '{url}'")
586
+ return False
587
+
588
+ install_script_path = os.path.join(dir_path, "uninstall.py")
589
+ if os.path.exists(install_script_path):
590
+ uninstall_cmd = [sys.executable, "uninstall.py"]
591
+ code = subprocess.run(uninstall_cmd, cwd=dir_path)
592
+
593
+ if code.returncode != 0:
594
+ print(f"An error occurred during the execution of the uninstall.py script. Only the '{dir_path}' will be deleted.")
595
+
596
+ if os.path.exists(dir_path):
597
+ rmtree(dir_path)
598
+ elif os.path.exists(dir_path + ".disabled"):
599
+ rmtree(dir_path + ".disabled")
600
+ except Exception as e:
601
+ print(f"Uninstall(git-clone) error: {url} / {e}")
602
+ return False
603
+
604
+ print("Uninstallation was successful.")
605
+ return True
606
+
607
+
608
+ def gitclone_set_active(files, is_disable):
609
+ import os
610
+
611
+ if is_disable:
612
+ action_name = "Disable"
613
+ else:
614
+ action_name = "Enable"
615
+
616
+ print(f"{action_name}: {files}")
617
+ for url in files:
618
+ try:
619
+ dir_name = os.path.splitext(os.path.basename(url))[0].replace(".git", "")
620
+ dir_path = os.path.join(custom_nodes_path, dir_name)
621
+
622
+ # safey check
623
+ if dir_path == '/' or dir_path[1:] == ":/" or dir_path == '':
624
+ print(f"{action_name}(git-clone) error: invalid path '{dir_path}' for '{url}'")
625
+ return False
626
+
627
+ if is_disable:
628
+ current_path = dir_path
629
+ new_path = dir_path + ".disabled"
630
+ else:
631
+ current_path = dir_path + ".disabled"
632
+ new_path = dir_path
633
+
634
+ os.rename(current_path, new_path)
635
+
636
+ except Exception as e:
637
+ print(f"{action_name}(git-clone) error: {url} / {e}")
638
+ return False
639
+
640
+ print(f"{action_name} was successful.")
641
+ return True
642
+
643
+
644
+ def gitclone_update(files):
645
+ import os
646
+
647
+ print(f"Update: {files}")
648
+ for url in files:
649
+ try:
650
+ repo_name = os.path.splitext(os.path.basename(url))[0].replace(".git", "")
651
+ repo_path = os.path.join(custom_nodes_path, repo_name)
652
+ git_pull(repo_path)
653
+
654
+ if not execute_install_script(url, repo_path):
655
+ return False
656
+
657
+ except Exception as e:
658
+ print(f"Update(git-clone) error: {url} / {e}")
659
+ return False
660
+
661
+ print("Update was successful.")
662
+ return True
663
+
664
+
665
+ @server.PromptServer.instance.routes.post("/customnode/install")
666
+ async def install_custom_node(request):
667
+ json_data = await request.json()
668
+
669
+ install_type = json_data['install_type']
670
+
671
+ print(f"Install custom node '{json_data['title']}'")
672
+
673
+ res = False
674
+
675
+ if install_type == "unzip":
676
+ res = unzip_install(json_data['files'])
677
+
678
+ if install_type == "copy":
679
+ js_path_name = json_data['js_path'] if 'js_path' in json_data else None
680
+ res = copy_install(json_data['files'], js_path_name)
681
+
682
+ elif install_type == "git-clone":
683
+ res = gitclone_install(json_data['files'])
684
+
685
+ if res:
686
+ print(f"After restarting ComfyUI, please refresh the browser.")
687
+ return web.json_response({}, content_type='application/json')
688
+
689
+ return web.Response(status=400)
690
+
691
+
692
+ @server.PromptServer.instance.routes.post("/customnode/uninstall")
693
+ async def install_custom_node(request):
694
+ json_data = await request.json()
695
+
696
+ install_type = json_data['install_type']
697
+
698
+ print(f"Uninstall custom node '{json_data['title']}'")
699
+
700
+ res = False
701
+
702
+ if install_type == "copy":
703
+ js_path_name = json_data['js_path'] if 'js_path' in json_data else None
704
+ res = copy_uninstall(json_data['files'], js_path_name)
705
+
706
+ elif install_type == "git-clone":
707
+ res = gitclone_uninstall(json_data['files'])
708
+
709
+ if res:
710
+ print(f"After restarting ComfyUI, please refresh the browser.")
711
+ return web.json_response({}, content_type='application/json')
712
+
713
+ return web.Response(status=400)
714
+
715
+
716
+ @server.PromptServer.instance.routes.post("/customnode/update")
717
+ async def install_custom_node(request):
718
+ json_data = await request.json()
719
+
720
+ install_type = json_data['install_type']
721
+
722
+ print(f"Update custom node '{json_data['title']}'")
723
+
724
+ res = False
725
+
726
+ if install_type == "git-clone":
727
+ res = gitclone_update(json_data['files'])
728
+
729
+ if res:
730
+ print(f"After restarting ComfyUI, please refresh the browser.")
731
+ return web.json_response({}, content_type='application/json')
732
+
733
+ return web.Response(status=400)
734
+
735
+
736
+ @server.PromptServer.instance.routes.get("/comfyui_manager/update_comfyui")
737
+ async def install_custom_node(request):
738
+ print(f"Update ComfyUI")
739
+
740
+ try:
741
+ repo_path = os.path.dirname(folder_paths.__file__)
742
+
743
+ if not os.path.exists(os.path.join(repo_path, '.git')):
744
+ print(f"ComfyUI update fail: The installed ComfyUI does not have a Git repository.")
745
+ return web.Response(status=400)
746
+
747
+ # version check
748
+ repo = git.Repo(repo_path)
749
+
750
+ current_branch = repo.active_branch
751
+ branch_name = current_branch.name
752
+
753
+ remote_name = 'origin'
754
+ remote = repo.remote(name=remote_name)
755
+ remote.fetch()
756
+
757
+ commit_hash = repo.head.commit.hexsha
758
+ remote_commit_hash = repo.refs[f'{remote_name}/{branch_name}'].object.hexsha
759
+
760
+ if commit_hash != remote_commit_hash:
761
+ git_pull(repo_path)
762
+ execute_install_script("ComfyUI", repo_path)
763
+ return web.Response(status=201)
764
+ else:
765
+ return web.Response(status=200)
766
+ except Exception as e:
767
+ print(f"ComfyUI update fail: {e}")
768
+ pass
769
+
770
+ return web.Response(status=400)
771
+
772
+
773
+ @server.PromptServer.instance.routes.post("/customnode/toggle_active")
774
+ async def install_custom_node(request):
775
+ json_data = await request.json()
776
+
777
+ install_type = json_data['install_type']
778
+ is_disabled = json_data['installed'] == "Disabled"
779
+
780
+ print(f"Update custom node '{json_data['title']}'")
781
+
782
+ res = False
783
+
784
+ if install_type == "git-clone":
785
+ res = gitclone_set_active(json_data['files'], not is_disabled)
786
+ elif install_type == "copy":
787
+ res = copy_set_active(json_data['files'], not is_disabled)
788
+
789
+ if res:
790
+ return web.json_response({}, content_type='application/json')
791
+
792
+ return web.Response(status=400)
793
+
794
+
795
+ @server.PromptServer.instance.routes.post("/model/install")
796
+ async def install_model(request):
797
+ json_data = await request.json()
798
+
799
+ model_path = get_model_path(json_data)
800
+
801
+ res = False
802
+
803
+ if model_path is not None:
804
+ print(f"Install model '{json_data['name']}' into '{model_path}'")
805
+ res = download_url_with_agent(json_data['url'], model_path)
806
+ else:
807
+ print(f"Model installation error: invalid model type - {json_data['type']}")
808
+
809
+ if res:
810
+ return web.json_response({}, content_type='application/json')
811
+
812
+ return web.Response(status=400)
813
+
814
+
815
+ NODE_CLASS_MAPPINGS = {}
816
+ __all__ = ['NODE_CLASS_MAPPINGS']
alter-list.json ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "items": [
3
+ {
4
+ "id":"https://github.com/Fannovel16/comfy_controlnet_preprocessors",
5
+ "tags":"controlnet",
6
+ "description": "This extension provides preprocessor nodes for using controlnet."
7
+ },
8
+ {
9
+ "id":"https://github.com/comfyanonymous/ComfyUI_experiments/raw/master/sampler_tonemap.py",
10
+ "tags":"Dynamic Thresholding, DT, CFG",
11
+ "description": "Increasing the CFG prevents the degradation of color accuracy."
12
+ },
13
+ {
14
+ "id":"https://github.com/ltdrdata/ComfyUI-Impact-Pack",
15
+ "tags":"ddetailer, adetailer, ddsd, DD, loopback scaler, prompt, wildcard",
16
+ "description": "To implement the feature of automatically detecting faces and enhancing details, various detection nodes and detailers provided by the Impact Pack can be applied. Similarly to Loopback Scaler, it also provides various custom workflows that can apply Ksampler while gradually scaling up."
17
+ },
18
+ {
19
+ "id":"https://github.com/biegert/ComfyUI-CLIPSeg/raw/main/custom_nodes/clipseg.py",
20
+ "tags":"ddsd",
21
+ "description": "This extension provides a feature that generates segment masks on an image using a text prompt. When used in conjunction with Impact Pack, it enables applications such as DDSD."
22
+ },
23
+ {
24
+ "id":"https://github.com/BadCafeCode/masquerade-nodes-comfyui",
25
+ "tags":"ddetailer",
26
+ "description": "This extension provides a way to recognize and enhance masks for faces similar to Impact Pack."
27
+ },
28
+ {
29
+ "id":"https://github.com/BlenderNeko/ComfyUI_Cutoff",
30
+ "tags":"cutoff",
31
+ "description": "By using this extension, prompts like 'blue hair' can be prevented from interfering with other prompts by blocking the attribute 'blue' from being used in prompts other than 'hair'."
32
+ },
33
+ {
34
+ "id":"https://github.com/BlenderNeko/ComfyUI_ADV_CLIP_emb",
35
+ "tags":"prompt, weight",
36
+ "description": "There are differences in the processing methods of prompts, such as weighting and scheduling, between A1111 and ComfyUI. With this extension, various settings can be used to implement prompt processing methods similar to A1111. As this feature is also integrated into ComfyUI Cutoff, please download the Cutoff extension if you plan to use it in conjunction with Cutoff."
37
+ },
38
+ {
39
+ "id":"https://github.com/shiimizu/ComfyUI_smZNodes",
40
+ "tags":"prompt, weight",
41
+ "description": "There are differences in the processing methods of prompts, such as weighting and scheduling, between A1111 and ComfyUI. This extension helps to reproduce the same embedding as A1111."
42
+ },
43
+ {
44
+ "id":"https://github.com/BlenderNeko/ComfyUI_Noise",
45
+ "tags":"img2img alt, random",
46
+ "description": "The extension provides an unsampler that reverses the sampling process, allowing for a function similar to img2img alt to be implemented. Furthermore, ComfyUI uses CPU's Random instead of GPU's Random for better reproducibility compared to A1111. This extension provides the ability to use GPU's Random for Latent Noise. However, since GPU's Random may vary depending on the GPU model, reproducibility on different devices cannot be guaranteed."
47
+ },
48
+ {
49
+ "id":"https://github.com/lilly1987/ComfyUI_node_Lilly",
50
+ "tags":"prompt, wildcard",
51
+ "description": "This extension provides features such as a wildcard function that randomly selects prompts belonging to a category and the ability to directly load lora from prompts."
52
+ },
53
+ {
54
+ "id":"https://github.com/Davemane42/ComfyUI_Dave_CustomNode",
55
+ "tags":"latent couple",
56
+ "description": "ComfyUI already provides the ability to composite latents by default. However, this extension makes it more convenient to use by visualizing the composite area."
57
+ },
58
+ {
59
+ "id":"https://github.com/LEv145/images-grid-comfy-plugin",
60
+ "tags":"X/Y Plot",
61
+ "description": "This tool provides a viewer node that allows for checking multiple outputs in a grid, similar to the X/Y Plot extension."
62
+ },
63
+ {
64
+ "id":"https://github.com/gamert/ComfyUI_tagger",
65
+ "tags":"deepbooru, clip interrogation",
66
+ "description": "This extension generates clip text by taking an image as input and using the Deepbooru model."
67
+ },
68
+ {
69
+ "id":"https://github.com/szhublox/ambw_comfyui",
70
+ "tags":"supermerger",
71
+ "description": "This node takes two models, merges individual blocks together at various ratios, and automatically rates each merge, keeping the ratio with the highest score. "
72
+ },
73
+ {
74
+ "id":"https://github.com/ltdrdata/ComfyUI-tomeSD-installer",
75
+ "tags":"tomesd",
76
+ "description": "This extension is a ComfyUI wrapper for 'tomesd' that improves generation speed through token merging. <B>Note:In vanilla ComfyUI, the TomePatchModel node is provided as a built-in feature.</B>"
77
+ },
78
+ {
79
+ "id":"https://github.com/ssitu/ComfyUI_UltimateSDUpscale",
80
+ "tags":"upscaler, Ultimate SD Upscale",
81
+ "description": "ComfyUI nodes for the Ultimate Stable Diffusion Upscale script by Coyote-A. Uses the same script used in the A1111 extension to hopefully replicate images generated using the A1111 webui."
82
+ },
83
+ {
84
+ "id":"https://github.com/dawangraoming/ComfyUI_ksampler_gpu/raw/main/ksampler_gpu.py",
85
+ "tags":"random, noise",
86
+ "description": "A1111 provides KSampler that uses GPU-based random noise. This extension offers KSampler utilizing GPU-based random noise."
87
+ },
88
+ {
89
+ "id":"https://github.com/space-nuko/nui-suite",
90
+ "tags":"prompt, dynamic prompt",
91
+ "description": "This extension provides nodes with the functionality of dynamic prompts."
92
+ }
93
+ ]
94
+ }
custom-node-list.json ADDED
@@ -0,0 +1,752 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "custom_nodes": [
3
+ {
4
+ "author": "Dr.Lt.Data",
5
+ "title": "ComfyUI-Manager",
6
+ "reference": "https://github.com/ltdrdata/ComfyUI-Manager",
7
+ "files": [
8
+ "https://github.com/ltdrdata/ComfyUI-Manager"
9
+ ],
10
+ "install_type": "git-clone",
11
+ "description": "ComfyUI-Manager itself is also a custom node."
12
+ },
13
+ {
14
+ "author": "Dr.Lt.Data",
15
+ "title": "ComfyUI Impact Pack",
16
+ "reference": "https://github.com/ltdrdata/ComfyUI-Impact-Pack",
17
+ "files": [
18
+ "https://github.com/ltdrdata/ComfyUI-Impact-Pack"
19
+ ],
20
+ "install_type": "git-clone",
21
+ "description": "This extension offers various detector nodes and detailer nodes that allow you to configure a workflow that automatically enhances facial details. And provide iterative upscaler."
22
+ },
23
+ {
24
+ "author": "comfyanonymous",
25
+ "title": "ComfyUI_experiments/sampler_tonemap",
26
+ "reference": "https://github.com/comfyanonymous/ComfyUI_experiments",
27
+ "files": [
28
+ "https://github.com/comfyanonymous/ComfyUI_experiments/raw/master/sampler_tonemap.py"
29
+ ],
30
+ "install_type": "copy",
31
+ "description": "ModelSamplerTonemapNoiseTest a node that makes the sampler use a simple tonemapping algorithm to tonemap the noise. It will let you use higher CFG without breaking the image. To using higher CFG lower the multiplier value. Similar to Dynamic Thresholding extension of A1111."
32
+ },
33
+ {
34
+ "author": "comfyanonymous",
35
+ "title": "ComfyUI_experiments/sampler_rescalecfg",
36
+ "reference": "https://github.com/comfyanonymous/ComfyUI_experiments",
37
+ "files": [
38
+ "https://github.com/comfyanonymous/ComfyUI_experiments/raw/master/sampler_rescalecfg.py"
39
+ ],
40
+ "install_type": "copy",
41
+ "description": "RescaleClassifierFreeGuidance improves the problem of images being degraded by high CFG.To using higher CFG lower the multiplier value. Similar to Dynamic Thresholding extension of A1111. (<a href='https://arxiv.org/abs/2305.08891'/>reference paper</a>)"
42
+ },
43
+ {
44
+ "author": "comfyanonymous",
45
+ "title": "ComfyUI_experiments/advanced_model_merging",
46
+ "reference": "https://github.com/comfyanonymous/ComfyUI_experiments",
47
+ "files": [
48
+ "https://github.com/comfyanonymous/ComfyUI_experiments/raw/master/advanced_model_merging.py"
49
+ ],
50
+ "install_type": "copy",
51
+ "description": "This provides a detailed model merge feature based on block weight. ModelMergeBlock, in vanilla ComfyUI, allows for adjusting the ratios of input/middle/output layers, but this node provides ratio adjustments for all blocks within each layer."
52
+ },
53
+ {
54
+ "author": "Fannovel16",
55
+ "title": "ControlNet Preprocessors",
56
+ "reference": "https://github.com/Fannovel16/comfy_controlnet_preprocessors",
57
+ "files": [
58
+ "https://github.com/Fannovel16/comfy_controlnet_preprocessors"
59
+ ],
60
+ "install_type": "git-clone",
61
+ "description": "ControlNet Preprocessors. (To use this extension, you need to download the required model file from <B>Install Models</B>)"
62
+ },
63
+ {
64
+ "author": "Fannovel16",
65
+ "title": "comfy_video",
66
+ "reference": "https://github.com/Fannovel16/comfy_video",
67
+ "files": [
68
+ "https://github.com/Fannovel16/comfy_video"
69
+ ],
70
+ "install_type": "git-clone",
71
+ "description": "Video_Frame_Extractor, Save_Frame_To_Folder, Simple_Frame_Folder_To_Video."
72
+ },
73
+ {
74
+ "author": "biegert",
75
+ "title": "CLIPSeg",
76
+ "reference": "https://github.com/biegert/ComfyUI-CLIPSeg",
77
+ "files": [
78
+ "https://github.com/biegert/ComfyUI-CLIPSeg/raw/main/custom_nodes/clipseg.py"
79
+ ],
80
+ "install_type": "copy",
81
+ "description": "The CLIPSeg node generates a binary mask for a given input image and text prompt."
82
+ },
83
+ {
84
+ "author": "BlenderNeko",
85
+ "title": "ComfyUI Cutoff",
86
+ "reference": "https://github.com/BlenderNeko/ComfyUI_Cutoff",
87
+ "files": [
88
+ "https://github.com/BlenderNeko/ComfyUI_Cutoff"
89
+ ],
90
+ "install_type": "git-clone",
91
+ "description": "These custom nodes provides features that allow for better control over the effects of the text prompt."
92
+ },
93
+ {
94
+ "author": "BlenderNeko",
95
+ "title": "Advanced CLIP Text Encode",
96
+ "reference": "https://github.com/BlenderNeko/ComfyUI_ADV_CLIP_emb",
97
+ "files": [
98
+ "https://github.com/BlenderNeko/ComfyUI_ADV_CLIP_emb"
99
+ ],
100
+ "install_type": "git-clone",
101
+ "description": "Advanced CLIP Text Encode (if you need A1111 like prompt. you need this. But Cutoff node includes this feature, already.)"
102
+ },
103
+ {
104
+ "author": "BlenderNeko",
105
+ "title": "ComfyUI Noise",
106
+ "reference": "https://github.com/BlenderNeko/ComfyUI_Noise",
107
+ "files": [
108
+ "https://github.com/BlenderNeko/ComfyUI_Noise"
109
+ ],
110
+ "install_type": "git-clone",
111
+ "description": "This extension contains 6 nodes for ComfyUI that allows for more control and flexibility over the noise."
112
+ },
113
+ {
114
+ "author": "BlenderNeko",
115
+ "title": "Tiled sampling for ComfyUI",
116
+ "reference": "https://github.com/BlenderNeko/ComfyUI_TiledKSampler",
117
+ "files": [
118
+ "https://github.com/BlenderNeko/ComfyUI_TiledKSampler"
119
+ ],
120
+ "install_type": "git-clone",
121
+ "description": "This extension contains a tiled sampler for ComfyUI. It allows for denoising larger images by splitting it up into smaller tiles and denoising these. It tries to minimize any seams for showing up in the end result by gradually denoising all tiles one step at the time and randomizing tile positions for every step."
122
+ },
123
+ {
124
+ "author": "BlenderNeko",
125
+ "title": "(WIP) SeeCoder",
126
+ "reference": "https://github.com/BlenderNeko/ComfyUI_SeeCoder",
127
+ "files": [
128
+ "https://github.com/BlenderNeko/ComfyUI_SeeCoder"
129
+ ],
130
+ "install_type": "git-clone",
131
+ "description": "It provides the capability to generate CLIP from an image input, unlike unCLIP, which works in all models. (To use this extension, you need to download the required model file from <B>Install Models</B>)"
132
+ },
133
+ {
134
+ "author": "LucianoCirino",
135
+ "title": "Efficiency Nodes for ComfyUI",
136
+ "reference": "https://github.com/LucianoCirino/efficiency-nodes-comfyui",
137
+ "files": [
138
+ "https://github.com/LucianoCirino/efficiency-nodes-comfyui"
139
+ ],
140
+ "install_type": "git-clone",
141
+ "description": "A collection of ComfyUI custom nodes to help streamline workflows and reduce total node count."
142
+ },
143
+ {
144
+ "author": "Derfuu",
145
+ "title": "Derfuu_ComfyUI_ModdedNodes",
146
+ "reference": "https://github.com/Derfuu/Derfuu_ComfyUI_ModdedNodes",
147
+ "files": [
148
+ "https://github.com/Derfuu/Derfuu_ComfyUI_ModdedNodes"
149
+ ],
150
+ "install_type": "git-clone",
151
+ "description": "Automate calculation depending on image sizes or something you want."
152
+ },
153
+ {
154
+ "author": "paulo-coronado",
155
+ "title": "comfy_clip_blip_node",
156
+ "reference": "https://github.com/paulo-coronado/comfy_clip_blip_node",
157
+ "files": [
158
+ "https://github.com/paulo-coronado/comfy_clip_blip_node"
159
+ ],
160
+ "install_type": "git-clone",
161
+ "apt_dependency": [
162
+ "rustc",
163
+ "cargo"
164
+ ],
165
+ "description": "CLIPTextEncodeBLIP: This custom node provides a CLIP Encoder that is capable of receiving images as input."
166
+ },
167
+ {
168
+ "author": "Davemane42",
169
+ "title": "Visual Area Conditioning / Latent composition",
170
+ "reference": "https://github.com/Davemane42/ComfyUI_Dave_CustomNode",
171
+ "files": [
172
+ "https://github.com/Davemane42/ComfyUI_Dave_CustomNode"
173
+ ],
174
+ "install_type": "git-clone",
175
+ "description": "This tool provides custom nodes that allow visualization and configuration of area conditioning and latent composite."
176
+ },
177
+ {
178
+ "author": "WASasquatch",
179
+ "title": "WAS Node Suite",
180
+ "reference": "https://github.com/WASasquatch/was-node-suite-comfyui",
181
+ "files": [
182
+ "https://github.com/WASasquatch/was-node-suite-comfyui"
183
+ ],
184
+ "install_type": "git-clone",
185
+ "description": "A node suite for ComfyUI with many new nodes, such as image processing, text processing, and more."
186
+ },
187
+ {
188
+ "author": "omar92",
189
+ "title": "Quality of life Suit:V2",
190
+ "reference": "https://github.com/omar92/ComfyUI-QualityOfLifeSuit_Omar92",
191
+ "files": [
192
+ "https://github.com/omar92/ComfyUI-QualityOfLifeSuit_Omar92"
193
+ ],
194
+ "install_type": "git-clone",
195
+ "description": "openAI suite, String suite, Latent Tools, Image Tools: These custom nodes provide expanded functionality for image and string processing, latent processing, as well as the ability to interface with models such as ChatGPT/DallE-2."
196
+ },
197
+ {
198
+ "author": "lilly1987",
199
+ "title": "simple wildcard for ComfyUI",
200
+ "reference": "https://github.com/lilly1987/ComfyUI_node_Lilly",
201
+ "files": [
202
+ "https://github.com/lilly1987/ComfyUI_node_Lilly"
203
+ ],
204
+ "install_type": "git-clone",
205
+ "description": "These custom nodes provides a feature to insert arbitrary inputs through wildcards in the prompt. Additionally, this tool provides features that help simplify workflows, such as VAELoaderDecoder and SimplerSample."
206
+ },
207
+ {
208
+ "author": "sylym",
209
+ "title": "Vid2vid",
210
+ "reference": "https://github.com/sylym/comfy_vid2vid",
211
+ "files": [
212
+ "https://github.com/sylym/comfy_vid2vid"
213
+ ],
214
+ "install_type": "git-clone",
215
+ "description": "A node suite for ComfyUI that allows you to load image sequence and generate new image sequence with different styles or content."
216
+ },
217
+ {
218
+ "author": "EllangoK",
219
+ "title": "ComfyUI-post-processing-nodes",
220
+ "reference": "https://github.com/EllangoK/ComfyUI-post-processing-nodes",
221
+ "files": [
222
+ "https://github.com/EllangoK/ComfyUI-post-processing-nodes"
223
+ ],
224
+ "install_type": "git-clone",
225
+ "description": "A collection of post processing nodes for ComfyUI, simply download this repo and drag."
226
+ },
227
+ {
228
+ "author": "LEv145",
229
+ "title": "ImagesGrid",
230
+ "reference": "https://github.com/LEv145/images-grid-comfy-plugin",
231
+ "files": [
232
+ "https://github.com/LEv145/images-grid-comfy-plugin"
233
+ ],
234
+ "install_type": "git-clone",
235
+ "description": "This tool provides a viewer node that allows for checking multiple outputs in a grid, similar to the X/Y Plot extension."
236
+ },
237
+ {
238
+ "author": "diontimmer",
239
+ "title": "ComfyUI-Vextra-Nodes",
240
+ "reference": "https://github.com/diontimmer/ComfyUI-Vextra-Nodes",
241
+ "files": [
242
+ "https://github.com/diontimmer/ComfyUI-Vextra-Nodes"
243
+ ],
244
+ "install_type": "git-clone",
245
+ "description": "Nodes: Pixel Sort, Swap Color Mode, Solid Color, Glitch This, Add Text To Image, Play Sound, Prettify Prompt, Generate Noise, Flatten Colors"
246
+ },
247
+ {
248
+ "author": "hnmr293",
249
+ "title": "ComfyUI-nodes-hnmr",
250
+ "reference": "https://github.com/hnmr293/ComfyUI-nodes-hnmr",
251
+ "files": [
252
+ "https://github.com/hnmr293/ComfyUI-nodes-hnmr"
253
+ ],
254
+ "install_type": "git-clone",
255
+ "description": "Provide various custom nodes for Latent, Sampling, Model, Loader, Image, Text"
256
+ },
257
+ {
258
+ "author": "BadCafeCode",
259
+ "title": "Masquerade Nodes",
260
+ "reference": "https://github.com/BadCafeCode/masquerade-nodes-comfyui",
261
+ "files": [
262
+ "https://github.com/BadCafeCode/masquerade-nodes-comfyui"
263
+ ],
264
+ "install_type": "git-clone",
265
+ "description": "This is a node pack for ComfyUI, primarily dealing with masks."
266
+ },
267
+ {
268
+ "author": "guoyk93",
269
+ "title": "y.k.'s ComfyUI node suite",
270
+ "reference": "https://github.com/guoyk93/yk-node-suite-comfyui",
271
+ "files": [
272
+ "https://github.com/guoyk93/yk-node-suite-comfyui"
273
+ ],
274
+ "install_type": "git-clone",
275
+ "description": "Nodes: YKImagePadForOutpaint, YKMaskToImage"
276
+ },
277
+ {
278
+ "author": "Jcd1230",
279
+ "title": "Rembg Background Removal Node for ComfyUI",
280
+ "reference": "https://github.com/Jcd1230/rembg-comfyui-node",
281
+ "files": [
282
+ "https://github.com/Jcd1230/rembg-comfyui-node"
283
+ ],
284
+ "install_type": "git-clone",
285
+ "description": "Nodes: Image Remove Background (rembg)"
286
+ },
287
+ {
288
+ "author": "gamert",
289
+ "title": "ComfyUI_tagger",
290
+ "reference": "https://github.com/gamert/ComfyUI_tagger",
291
+ "files": [
292
+ "https://github.com/gamert/ComfyUI_tagger"
293
+ ],
294
+ "install_type": "git-clone",
295
+ "description": "Nodes: CLIPTextEncodeTaggerDD, ImageTaggerDD"
296
+ },
297
+ {
298
+ "author": "YinBailiang",
299
+ "title": "MergeBlockWeighted_fo_ComfyUI",
300
+ "reference": "https://github.com/YinBailiang/MergeBlockWeighted_fo_ComfyUI",
301
+ "files": [
302
+ "https://github.com/YinBailiang/MergeBlockWeighted_fo_ComfyUI"
303
+ ],
304
+ "install_type": "git-clone",
305
+ "description": "Nodes: MergeBlockWeighted"
306
+ },
307
+ {
308
+ "author": "trojblue",
309
+ "title": "trNodes",
310
+ "reference": "https://github.com/trojblue/trNodes",
311
+ "files": [
312
+ "https://github.com/trojblue/trNodes"
313
+ ],
314
+ "install_type": "git-clone",
315
+ "description": "Nodes: image_layering, color_correction, model_router"
316
+ },
317
+ {
318
+ "author": "szhublox",
319
+ "title": "Auto-MBW",
320
+ "reference": "https://github.com/szhublox/ambw_comfyui",
321
+ "files": [
322
+ "https://github.com/szhublox/ambw_comfyui"
323
+ ],
324
+ "install_type": "git-clone",
325
+ "description": "Auto-MBW for ComfyUI loosely based on sdweb-auto-MBW. Nodes: auto merge block weighted"
326
+ },
327
+ {
328
+ "author": "city96",
329
+ "title": "ComfyUI_NetDist",
330
+ "reference": "https://github.com/city96/ComfyUI_NetDist",
331
+ "files": [
332
+ "https://github.com/city96/ComfyUI_NetDist"
333
+ ],
334
+ "install_type": "git-clone",
335
+ "description": "Run ComfyUI workflows on multiple local GPUs/networked machines. Nodes: Remote images, Local Remote control"
336
+ },
337
+ {
338
+ "author": "Kaharos94",
339
+ "title": "ComfyUI-Saveaswebp",
340
+ "reference": "https://github.com/Kaharos94/ComfyUI-Saveaswebp",
341
+ "files": [
342
+ "https://github.com/Kaharos94/ComfyUI-Saveaswebp"
343
+ ],
344
+ "install_type": "git-clone",
345
+ "description": "Save a picture as Webp file in Comfy + Workflow loading"
346
+ },
347
+ {
348
+ "author": "chenbaiyujason",
349
+ "title": "sc-node-comfyui",
350
+ "reference": "https://github.com/chenbaiyujason/sc-node-comfyui",
351
+ "files": [
352
+ "https://github.com/chenbaiyujason/sc-node-comfyui"
353
+ ],
354
+ "install_type": "git-clone",
355
+ "description": "Nodes for GPT interaction and text manipulation"
356
+ },
357
+ {
358
+ "author": "SLAPaper",
359
+ "title": "ComfyUI-Image-Selector",
360
+ "reference": "https://github.com/SLAPaper/ComfyUI-Image-Selector",
361
+ "files": [
362
+ "https://github.com/SLAPaper/ComfyUI-Image-Selector"
363
+ ],
364
+ "install_type": "git-clone",
365
+ "description": "A custom node for ComfyUI, which can select one or some of images from a batch."
366
+ },
367
+ {
368
+ "author": "flyingshutter",
369
+ "title": "As_ComfyUI_CustomNodes",
370
+ "reference": "https://github.com/flyingshutter/As_ComfyUI_CustomNodes",
371
+ "files": [
372
+ "https://github.com/flyingshutter/As_ComfyUI_CustomNodes"
373
+ ],
374
+ "install_type": "git-clone",
375
+ "description": "Manipulation nodes for Image, Latent"
376
+ },
377
+ {
378
+ "author": "Zuellni",
379
+ "title": "Zuellni/ComfyUI-Custom-Nodes",
380
+ "reference": "https://github.com/Zuellni/ComfyUI-Custom-Nodes",
381
+ "files": [
382
+ "https://github.com/Zuellni/ComfyUI-Custom-Nodes"
383
+ ],
384
+ "install_type": "git-clone",
385
+ "description": "Nodes: DeepFloyd, Filter, Select, Save, Decode, Encode, Repeat, Noise, Noise"
386
+ },
387
+ {
388
+ "author": "AlekPet",
389
+ "title": "AlekPet/ComfyUI_Custom_Nodes_AlekPet",
390
+ "reference": "https://github.com/AlekPet/ComfyUI_Custom_Nodes_AlekPet",
391
+ "files": [
392
+ "https://github.com/AlekPet/ComfyUI_Custom_Nodes_AlekPet"
393
+ ],
394
+ "install_type": "git-clone",
395
+ "description": "Nodes: PoseNode, TranslateCLIPTextEncodeNode"
396
+ },
397
+ {
398
+ "author": "pythongosssss",
399
+ "title": "ComfyUI WD 1.4 Tagger",
400
+ "reference": "https://github.com/pythongosssss/ComfyUI-WD14-Tagger",
401
+ "files": [
402
+ "https://github.com/pythongosssss/ComfyUI-WD14-Tagger"
403
+ ],
404
+ "install_type": "git-clone",
405
+ "description": "A ComfyUI extension allowing the interrogation of booru tags from images."
406
+ },
407
+ {
408
+ "author": "strimmlarn",
409
+ "title": "ComfyUI_Strimmlarns_aesthetic_score",
410
+ "reference": "https://github.com/strimmlarn/ComfyUI_Strimmlarns_aesthetic_score",
411
+ "js_path": "strimmlarn",
412
+ "files": [
413
+ "https://github.com/strimmlarn/ComfyUI_Strimmlarns_aesthetic_score"
414
+ ],
415
+ "install_type": "git-clone",
416
+ "description": "Nodes: CalculateAestheticScore, LoadAesteticModel, AesthetlcScoreSorter, ScoreToNumber"
417
+ },
418
+ {
419
+ "author": "tinyterra",
420
+ "title": "tinyterraNodes",
421
+ "reference": "https://github.com/tinyterra/ComfyUI_tinyterraNodes",
422
+ "files": [
423
+ "https://github.com/TinyTerra/ComfyUI_tinyterraNodes.git"
424
+ ],
425
+ "install_type": "git-clone",
426
+ "nodename_pattern": "^ttN ",
427
+ "description": "Nodes: pipeLoader, pipeKSampler, assorted pipe utils, imageOutput, imageRemBG, 3x TXT Loader MultiConcat, +more"
428
+ },
429
+ {
430
+ "author": "Jordach",
431
+ "title": "comfy-plasma",
432
+ "reference": "https://github.com/Jordach/comfy-plasma",
433
+ "files": [
434
+ "https://github.com/Jordach/comfy-plasma"
435
+ ],
436
+ "install_type": "git-clone",
437
+ "description": "Nodes: Plasma Noise, Random Noise, Greyscale Noise, Pink Noise, Brown Noise, Plasma KSampler"
438
+ },
439
+ {
440
+ "author": "bvhari",
441
+ "title": "ImageProcessing",
442
+ "reference": "https://github.com/bvhari/ComfyUI_ImageProcessing",
443
+ "files": [
444
+ "https://github.com/bvhari/ComfyUI_ImageProcessing"
445
+ ],
446
+ "install_type": "git-clone",
447
+ "description": "ComfyUI custom nodes to apply various image processing techniques."
448
+ },
449
+ {
450
+ "author": "bvhari",
451
+ "title": "LatentToRGB",
452
+ "reference": "https://github.com/bvhari/ComfyUI_LatentToRGB",
453
+ "files": [
454
+ "https://github.com/bvhari/ComfyUI_LatentToRGB"
455
+ ],
456
+ "install_type": "git-clone",
457
+ "description": "ComfyUI custom node to convert latent to RGB."
458
+ },
459
+ {
460
+ "author": "ssitu",
461
+ "title": "UltimateSDUpscale",
462
+ "reference": "https://github.com/ssitu/ComfyUI_UltimateSDUpscale",
463
+ "files": [
464
+ "https://github.com/ssitu/ComfyUI_UltimateSDUpscale"
465
+ ],
466
+ "install_type": "git-clone",
467
+ "description": "ComfyUI nodes for the Ultimate Stable Diffusion Upscale script by Coyote-A."
468
+ },
469
+ {
470
+ "author": "ssitu",
471
+ "title": "NestedNodeBuilder",
472
+ "reference": "https://github.com/ssitu/ComfyUI_NestedNodeBuilder",
473
+ "files": [
474
+ "https://github.com/ssitu/ComfyUI_NestedNodeBuilder"
475
+ ],
476
+ "install_type": "git-clone",
477
+ "description": "This extension provides the ability to combine multiple nodes into a single node."
478
+ },
479
+ {
480
+ "author": "ssitu",
481
+ "title": "Restart Sampling",
482
+ "reference": "https://github.com/ssitu/ComfyUI_restart_sampling",
483
+ "files": [
484
+ "https://github.com/ssitu/ComfyUI_restart_sampling"
485
+ ],
486
+ "install_type": "git-clone",
487
+ "description": "Unofficial ComfyUI nodes for restart sampling based on the paper 'Restart Sampling for Improving Generative Processes' <a href='https://arxiv.org/abs/2306.14878'>[paper]</a> <a href='https://github.com/Newbeeer/diffusion_restart_sampling'>[repo]</a>"
488
+ },
489
+ {
490
+ "author": "space-nuko",
491
+ "title": "Disco Diffusion",
492
+ "reference": "https://github.com/space-nuko/ComfyUI-Disco-Diffusion",
493
+ "files": [
494
+ "https://github.com/space-nuko/ComfyUI-Disco-Diffusion"
495
+ ],
496
+ "install_type": "git-clone",
497
+ "description": "Modularized version of Disco Diffusion for use with ComfyUI."
498
+ },
499
+ {
500
+ "author": "space-nuko",
501
+ "title": "OpenPose Editor",
502
+ "reference": "https://github.com/space-nuko/ComfyUI-OpenPose-Editor",
503
+ "files": [
504
+ "https://github.com/space-nuko/ComfyUI-OpenPose-Editor"
505
+ ],
506
+ "install_type": "git-clone",
507
+ "description": "A port of the openpose-editor extension for stable-diffusion-webui. NOTE: Requires <a href='https://github.com/comfyanonymous/ComfyUI/pull/711'>this ComfyUI patch</a> to work correctly"
508
+ },
509
+ {
510
+ "author": "space-nuko",
511
+ "title": "nui suite",
512
+ "reference": "https://github.com/space-nuko/nui-suite",
513
+ "files": [
514
+ "https://github.com/space-nuko/nui-suite"
515
+ ],
516
+ "install_type": "git-clone",
517
+ "description": "NODES: Dynamic Prompts Text Encode, Feeling Lucky Text Encode, Output String"
518
+ },
519
+ {
520
+ "author": "Nourepide",
521
+ "title": "Allor Plugin",
522
+ "reference": "https://github.com/Nourepide/ComfyUI-Allor",
523
+ "files": [
524
+ "https://github.com/Nourepide/ComfyUI-Allor"
525
+ ],
526
+ "install_type": "git-clone",
527
+ "description": "Allor is a plugin for ComfyUI with an emphasis on transparency and performance."
528
+ },
529
+ {
530
+ "author": "pythongosssss",
531
+ "title": "pythongosssss/ComfyUI-Custom-Scripts",
532
+ "reference": "https://github.com/pythongosssss/ComfyUI-Custom-Scripts",
533
+ "files": [
534
+ "https://github.com/pythongosssss/ComfyUI-Custom-Scripts"
535
+ ],
536
+ "install_type": "git-clone",
537
+ "description": "This extension provides: Auto Arrange Graph, Workflow SVG, Favicon Status, Image Feed, Latent Upscale By, Lock Nodes & Groups, Lora Subfolders, Preset Text, Show Text, Touch Support, Link Render Mode, Locking, Node Finder, Quick Nodes, Show Image On Menu, Show Text, Workflow Managements, Custom Widget Default Values"
538
+ },
539
+ {
540
+ "author": "melMass",
541
+ "title": "MTB Nodes",
542
+ "reference": "https://github.com/melMass/comfy_mtb",
543
+ "files": [
544
+ "https://github.com/melMass/comfy_mtb"
545
+ ],
546
+ "nodename_pattern": "\\(mtb\\)$",
547
+ "install_type": "git-clone",
548
+ "description": "NODES: Latent Lerp, Int To Number, Bounding Box, Crop, Uncrop, ImageBlur, Denoise, ImageCompare, RGV to HSV, HSV to RGB, Color Correct, Modulo, Deglaze Image, Smart Step, ..."
549
+ },
550
+ {
551
+ "author": "xXAdonesXx",
552
+ "title": "NodeGPT",
553
+ "reference": "https://github.com/xXAdonesXx/NodeGPT",
554
+ "files": [
555
+ "https://github.com/xXAdonesXx/NodeGPT/raw/main/Textnode.py"
556
+ ],
557
+ "install_type": "copy",
558
+ "description": "ComfyUI Extension Nodes for Automated Text Generation."
559
+ },
560
+ {
561
+ "author": "asd417",
562
+ "title": "CheckpointTomeLoader",
563
+ "reference": "https://github.com/asd417/tomeSD_for_Comfy",
564
+ "files": [
565
+ "https://github.com/ltdrdata/ComfyUI-tomeSD-installer"
566
+ ],
567
+ "install_type": "git-clone",
568
+ "description": "tomeSD(https://github.com/dbolya/tomesd) applied to ComfyUI stable diffusion UI using custom node. <B>Note:In vanilla ComfyUI, the TomePatchModel node is provided as a built-in feature.</B>"
569
+ },
570
+ {
571
+ "author": "RockOfFire",
572
+ "title": "ComfyUI_Comfyroll_CustomNodes",
573
+ "reference": "https://github.com/RockOfFire/ComfyUI_Comfyroll_CustomNodes",
574
+ "files": [
575
+ "https://github.com/RockOfFire/ComfyUI_Comfyroll_CustomNodes"
576
+ ],
577
+ "install_type": "git-clone",
578
+ "description": "These nodes were made for use in the Comfyroll Template Workflows."
579
+ },
580
+ {
581
+ "author": "bmad4ever",
582
+ "title": "ComfyUI-Bmad-DirtyUndoRedo",
583
+ "reference": "https://github.com/bmad4ever/ComfyUI-Bmad-DirtyUndoRedo",
584
+ "files": [
585
+ "https://github.com/bmad4ever/ComfyUI-Bmad-DirtyUndoRedo"
586
+ ],
587
+ "install_type": "git-clone",
588
+ "description": "ComfyUI extension that adds undo (and redo) functionality."
589
+ },
590
+ {
591
+ "author": "FizzleDorf",
592
+ "title": "FizzNodes",
593
+ "reference": "https://github.com/FizzleDorf/ComfyUI_FizzNodes",
594
+ "files": [
595
+ "https://github.com/FizzleDorf/ComfyUI_FizzNodes"
596
+ ],
597
+ "install_type": "git-clone",
598
+ "description": "Custom animation and utility nodes for Comfyui."
599
+ },
600
+ {
601
+ "author": "filipemeneses",
602
+ "title": "Pixelization",
603
+ "reference": "https://github.com/filipemeneses/comfy_pixelization",
604
+ "files": [
605
+ "https://github.com/filipemeneses/comfy_pixelization"
606
+ ],
607
+ "install_type": "git-clone",
608
+ "description": "ComfyUI node that pixelizes images."
609
+ },
610
+ {
611
+ "author": "lcolok",
612
+ "title": "LogicAI",
613
+ "reference": "https://github.com/lcolok/ComfyUI-LogicAI",
614
+ "files": [
615
+ "https://github.com/lcolok/ComfyUI-LogicAI"
616
+ ],
617
+ "install_type": "git-clone",
618
+ "description": "NODES: GroundingDINO"
619
+ },
620
+ {
621
+ "author": "shiimizu",
622
+ "title": "smZNodes",
623
+ "reference": "https://github.com/shiimizu/ComfyUI_smZNodes",
624
+ "files": [
625
+ "https://github.com/shiimizu/ComfyUI_smZNodes"
626
+ ],
627
+ "install_type": "git-clone",
628
+ "description": "NODES: CLIP Text Encode++. Achieve identical embeddings from stable-diffusion-webui for ComfyUI."
629
+ },
630
+ {
631
+ "author": "ZaneA",
632
+ "title": "ImageReward",
633
+ "reference": "https://github.com/ZaneA/ComfyUI-ImageReward",
634
+ "files": [
635
+ "https://github.com/ZaneA/ComfyUI-ImageReward"
636
+ ],
637
+ "install_type": "git-clone",
638
+ "description": "NODES: ImageRewardLoader, ImageRewardScore"
639
+ },
640
+ {
641
+ "author": "taabata",
642
+ "title": "Syrian Falcon Nodes",
643
+ "reference": "https://github.com/taabata/Comfy_Syrian_Falcon_Nodes",
644
+ "files": [
645
+ "https://github.com/taabata/Comfy_Syrian_Falcon_Nodes/raw/main/SyrianFalconNodes.py"
646
+ ],
647
+ "install_type": "copy",
648
+ "description": "Nodes:Prompt editing, Word as Image"
649
+ },
650
+ {
651
+ "author": "ailex000",
652
+ "title": "Image Gallery",
653
+ "reference": "https://github.com/ailex000/ComfyUI-Extensions",
654
+ "js_path": "image-gallery",
655
+ "files": [
656
+ "https://github.com/ailex000/ComfyUI-Extensions/raw/main/image-gallery/imageGallery.js"
657
+ ],
658
+ "install_type": "copy",
659
+ "description": "Custom javascript extensions for better UX for ComfyUI. Supported nodes: PreviewImage, SaveImage. Double click on image to open."
660
+ },
661
+ {
662
+ "author": "rock-land",
663
+ "title": "graphNavigator",
664
+ "reference": "https://github.com/rock-land/graphNavigator",
665
+ "js_path": "graphNavigator",
666
+ "files": [
667
+ "https://github.com/rock-land/graphNavigator/raw/main/graphNavigator/graphNavigator.js"
668
+ ],
669
+ "install_type": "copy",
670
+ "description": "ComfyUI Web Extension for saving views and navigating graphs."
671
+ },
672
+ {
673
+ "author": "diffus3",
674
+ "title": "diffus3/ComfyUI-extensions",
675
+ "reference": "https://github.com/diffus3/ComfyUI-extensions",
676
+ "js_path": "diffus3",
677
+ "files": [
678
+ "https://github.com/diffus3/ComfyUI-extensions/raw/main/multiReroute/multireroute.js",
679
+ "https://github.com/diffus3/ComfyUI-extensions/raw/main/setget/setget.js"
680
+ ],
681
+ "install_type": "copy",
682
+ "description": "Extensions: subgraph, setget, multiReroute"
683
+ },
684
+ {
685
+ "author": "m957ymj75urz",
686
+ "title": "m957ymj75urz/ComfyUI-Custom-Nodes",
687
+ "reference": "https://github.com/m957ymj75urz/ComfyUI-Custom-Nodes",
688
+ "js_path": "m957ymj75urz",
689
+ "files": [
690
+ "https://github.com/m957ymj75urz/ComfyUI-Custom-Nodes/raw/main/clip-text-encode-split/clip_text_encode_split.py",
691
+ "https://github.com/m957ymj75urz/ComfyUI-Custom-Nodes/raw/main/colors/colors.js"
692
+ ],
693
+ "install_type": "copy",
694
+ "description": "Nodes: RawText, RawTextCLIPEncode, RawTextCombine, RawTextReplace, Extension: m957ymj75urz.colors"
695
+ },
696
+ {
697
+ "author": "Bikecicle",
698
+ "title": "Waveform Extensions",
699
+ "reference": "https://github.com/Bikecicle/ComfyUI-Waveform-Extensions",
700
+ "files": [
701
+ "https://github.com/Bikecicle/ComfyUI-Waveform-Extensions/raw/main/EXT_AudioManipulation.py",
702
+ "https://github.com/Bikecicle/ComfyUI-Waveform-Extensions/raw/main/EXT_VariationUtils.py"
703
+ ],
704
+ "install_type": "copy",
705
+ "description": "Some additional audio utilites for use on top of Sample Diffusion ComfyUI Extension"
706
+ },
707
+ {
708
+ "author": "dawangraoming",
709
+ "title": "KSampler GPU",
710
+ "reference": "https://github.com/dawangraoming/ComfyUI_ksampler_gpu",
711
+ "files": [
712
+ "https://github.com/dawangraoming/ComfyUI_ksampler_gpu/raw/main/ksampler_gpu.py"
713
+ ],
714
+ "install_type": "copy",
715
+ "description": "KSampler is provided, based on GPU random noise"
716
+ },
717
+ {
718
+ "author": "theally",
719
+ "title": "TheAlly's Custom Nodes",
720
+ "reference": "https://civitai.com/models/19625?modelVersionId=23296",
721
+ "files": [
722
+ "https://civitai.com/api/download/models/25114",
723
+ "https://civitai.com/api/download/models/24679",
724
+ "https://civitai.com/api/download/models/24154",
725
+ "https://civitai.com/api/download/models/23884",
726
+ "https://civitai.com/api/download/models/23649",
727
+ "https://civitai.com/api/download/models/23467",
728
+ "https://civitai.com/api/download/models/23296"
729
+ ],
730
+ "install_type": "unzip",
731
+ "description": "Custom nodes for ComfyUI by TheAlly."
732
+ },
733
+ {
734
+ "author": "xss",
735
+ "title": "Custom Nodes by xss",
736
+ "reference": "https://civitai.com/models/24869/comfyui-custom-nodes-by-xss",
737
+ "files": [
738
+ "https://civitai.com/api/download/models/32717",
739
+ "https://civitai.com/api/download/models/47776",
740
+ "https://civitai.com/api/download/models/29772",
741
+ "https://civitai.com/api/download/models/31618",
742
+ "https://civitai.com/api/download/models/31591",
743
+ "https://civitai.com/api/download/models/29773",
744
+ "https://civitai.com/api/download/models/29774",
745
+ "https://civitai.com/api/download/models/29755",
746
+ "https://civitai.com/api/download/models/29750"
747
+ ],
748
+ "install_type": "unzip",
749
+ "description": "Various image processing nodes."
750
+ }
751
+ ]
752
+ }
extension-node-map.json ADDED
@@ -0,0 +1,938 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "https://github.com/BadCafeCode/masquerade-nodes-comfyui": [
3
+ "Blur",
4
+ "Change Channel Count",
5
+ "Combine Masks",
6
+ "Constant Mask",
7
+ "Convert Color Space",
8
+ "Create QR Code",
9
+ "Create Rect Mask",
10
+ "Cut By Mask",
11
+ "Get Image Size",
12
+ "Image To Mask",
13
+ "Make Image Batch",
14
+ "Mask By Text",
15
+ "Mask Morphology",
16
+ "Mask To Region",
17
+ "MasqueradeIncrementer",
18
+ "Mix Color By Mask",
19
+ "Mix Images By Mask",
20
+ "Paste By Mask",
21
+ "Prune By Mask",
22
+ "Separate Mask Components",
23
+ "Unary Image Op",
24
+ "Unary Mask Op"
25
+ ],
26
+ "https://github.com/BlenderNeko/ComfyUI_ADV_CLIP_emb": [
27
+ "BNK_AddCLIPSDXLParams",
28
+ "BNK_AddCLIPSDXLRParams",
29
+ "BNK_CLIPTextEncodeAdvanced",
30
+ "BNK_CLIPTextEncodeSDXLAdvanced"
31
+ ],
32
+ "https://github.com/BlenderNeko/ComfyUI_Cutoff": [
33
+ "BNK_CutoffBasePrompt",
34
+ "BNK_CutoffRegionsToConditioning",
35
+ "BNK_CutoffRegionsToConditioning_ADV",
36
+ "BNK_CutoffSetRegions"
37
+ ],
38
+ "https://github.com/BlenderNeko/ComfyUI_Noise": [
39
+ "BNK_DuplicateBatchIndex",
40
+ "BNK_GetSigma",
41
+ "BNK_InjectNoise",
42
+ "BNK_NoisyLatentImage",
43
+ "BNK_SlerpLatent",
44
+ "BNK_Unsampler"
45
+ ],
46
+ "https://github.com/BlenderNeko/ComfyUI_SeeCoder": [
47
+ "ConcatConditioning",
48
+ "SEECoderImageEncode"
49
+ ],
50
+ "https://github.com/BlenderNeko/ComfyUI_TiledKSampler": [
51
+ "BNK_TiledKSampler",
52
+ "BNK_TiledKSamplerAdvanced"
53
+ ],
54
+ "https://github.com/Davemane42/ComfyUI_Dave_CustomNode": [
55
+ "ABGRemover",
56
+ "ConditioningStretch",
57
+ "ConditioningUpscale",
58
+ "MultiAreaConditioning",
59
+ "MultiLatentComposite"
60
+ ],
61
+ "https://github.com/Derfuu/Derfuu_ComfyUI_ModdedNodes": [
62
+ "ABSNode_DF",
63
+ "Absolute value",
64
+ "Ceil",
65
+ "CeilNode_DF",
66
+ "Conditioning area scale by ratio",
67
+ "ConditioningSetArea with tuples",
68
+ "ConditioningSetAreaEXT_DF",
69
+ "ConditioningSetArea_DF",
70
+ "CosNode_DF",
71
+ "Cosines",
72
+ "Divide",
73
+ "DivideNode_DF",
74
+ "EmptyLatentImage_DF",
75
+ "Float",
76
+ "Float debug print",
77
+ "Float2Tuple_DF",
78
+ "FloatDebugPrint_DF",
79
+ "FloatNode_DF",
80
+ "Floor",
81
+ "FloorNode_DF",
82
+ "Get image size",
83
+ "Get latent size",
84
+ "GetImageSize_DF",
85
+ "GetLatentSize_DF",
86
+ "Image scale by ratio",
87
+ "Image scale to side",
88
+ "ImageScale_Ratio_DF",
89
+ "ImageScale_Side_DF",
90
+ "Int debug print",
91
+ "Int to float",
92
+ "Int to tuple",
93
+ "Int2Float_DF",
94
+ "IntDebugPrint_DF",
95
+ "Integer",
96
+ "IntegerNode_DF",
97
+ "Latent Scale by ratio",
98
+ "Latent Scale to side",
99
+ "LatentComposite with tuples",
100
+ "LatentScale_Ratio_DF",
101
+ "LatentScale_Side_DF",
102
+ "MultilineStringNode_DF",
103
+ "Multiply",
104
+ "MultiplyNode_DF",
105
+ "PowNode_DF",
106
+ "Power",
107
+ "Random",
108
+ "RandomFloat_DF",
109
+ "SinNode_DF",
110
+ "Sinus",
111
+ "SqrtNode_DF",
112
+ "Square root",
113
+ "String debug print",
114
+ "StringNode_DF",
115
+ "Subtract",
116
+ "SubtractNode_DF",
117
+ "Sum",
118
+ "SumNode_DF",
119
+ "TanNode_DF",
120
+ "Tangent",
121
+ "Text",
122
+ "Text box",
123
+ "Tuple",
124
+ "Tuple debug print",
125
+ "Tuple swap",
126
+ "Tuple to floats",
127
+ "Tuple to ints",
128
+ "Tuple2Float_DF",
129
+ "TupleDebugPrint_DF",
130
+ "TupleNode_DF"
131
+ ],
132
+ "https://github.com/EllangoK/ComfyUI-post-processing-nodes": [
133
+ "ArithmeticBlend",
134
+ "AsciiArt",
135
+ "Blend",
136
+ "Blur",
137
+ "CannyEdgeMask",
138
+ "ChromaticAberration",
139
+ "ColorCorrect",
140
+ "ColorTint",
141
+ "Dissolve",
142
+ "Dither",
143
+ "DodgeAndBurn",
144
+ "FilmGrain",
145
+ "Glow",
146
+ "HSVThresholdMask",
147
+ "KMeansQuantize",
148
+ "KuwaharaBlur",
149
+ "Parabolize",
150
+ "PencilSketch",
151
+ "PixelSort",
152
+ "Pixelize",
153
+ "Quantize",
154
+ "Sharpen",
155
+ "SineWave",
156
+ "Solarize",
157
+ "Vignette"
158
+ ],
159
+ "https://github.com/Fannovel16/comfy_controlnet_preprocessors": [
160
+ "AnimeLineArtPreprocessor",
161
+ "BAE-NormalMapPreprocessor",
162
+ "BinaryPreprocessor",
163
+ "CannyEdgePreprocessor",
164
+ "ColorPreprocessor",
165
+ "FakeScribblePreprocessor",
166
+ "HEDPreprocessor",
167
+ "InpaintPreprocessor",
168
+ "LeReS-DepthMapPreprocessor",
169
+ "LineArtPreprocessor",
170
+ "M-LSDPreprocessor",
171
+ "Manga2Anime-LineArtPreprocessor",
172
+ "MediaPipe-FaceMeshPreprocessor",
173
+ "MediaPipe-HandPosePreprocessor",
174
+ "MiDaS-DepthMapPreprocessor",
175
+ "MiDaS-NormalMapPreprocessor",
176
+ "OneFormer-ADE20K-SemSegPreprocessor",
177
+ "OneFormer-COCO-SemSegPreprocessor",
178
+ "OpenposePreprocessor",
179
+ "PiDiNetPreprocessor",
180
+ "ScribblePreprocessor",
181
+ "SemSegPreprocessor",
182
+ "TilePreprocessor",
183
+ "UniFormer-SemSegPreprocessor",
184
+ "Zoe-DepthMapPreprocessor"
185
+ ],
186
+ "https://github.com/Fannovel16/comfy_video": [
187
+ "Save Frame To Folder",
188
+ "Simple Frame Folder To Video",
189
+ "Video Frame Extractor"
190
+ ],
191
+ "https://github.com/FizzleDorf/ComfyUI_FizzNodes": [
192
+ "AbsCosWave",
193
+ "AbsSinWave",
194
+ "CosWave",
195
+ "InvCosWave",
196
+ "InvSinWave",
197
+ "Lerp",
198
+ "PromptSchedule",
199
+ "PromptScheduleGLIGEN",
200
+ "PromptScheduleNodeFlow",
201
+ "PromptScheduleNodeFlowEnd",
202
+ "SawtoothWave",
203
+ "SinWave",
204
+ "SquareWave",
205
+ "TriangleWave",
206
+ "ValueSchedule"
207
+ ],
208
+ "https://github.com/Jcd1230/rembg-comfyui-node": [
209
+ "Image Remove Background (rembg)"
210
+ ],
211
+ "https://github.com/Jordach/comfy-plasma": [
212
+ "JDC_BrownNoise",
213
+ "JDC_Contrast",
214
+ "JDC_GreyNoise",
215
+ "JDC_PinkNoise",
216
+ "JDC_Plasma",
217
+ "JDC_PlasmaSampler",
218
+ "JDC_PowerImage",
219
+ "JDC_RandNoise"
220
+ ],
221
+ "https://github.com/Kaharos94/ComfyUI-Saveaswebp": [
222
+ "Save_as_webp"
223
+ ],
224
+ "https://github.com/LEv145/images-grid-comfy-plugin": [
225
+ "GridAnnotation",
226
+ "ImageCombine",
227
+ "ImagesGridByColumns",
228
+ "ImagesGridByRows",
229
+ "LatentCombine"
230
+ ],
231
+ "https://github.com/LucianoCirino/efficiency-nodes-comfyui": [
232
+ "Efficient Loader",
233
+ "Evaluate Floats",
234
+ "Evaluate Integers",
235
+ "Evaluate Strings",
236
+ "Image Overlay",
237
+ "Join XY Inputs of Same Type",
238
+ "KSampler (Efficient)",
239
+ "Manual XY Entry Info",
240
+ "Simple Eval Examples",
241
+ "XY Input: CFG Scale",
242
+ "XY Input: Checkpoint",
243
+ "XY Input: Clip Skip",
244
+ "XY Input: Denoise",
245
+ "XY Input: LoRA",
246
+ "XY Input: LoRA (Advanced)",
247
+ "XY Input: Manual XY Entry",
248
+ "XY Input: Negative Prompt S/R",
249
+ "XY Input: Positive Prompt S/R",
250
+ "XY Input: Sampler",
251
+ "XY Input: Scheduler",
252
+ "XY Input: Seeds++ Batch",
253
+ "XY Input: Steps",
254
+ "XY Input: VAE",
255
+ "XY Plot"
256
+ ],
257
+ "https://github.com/Nourepide/ComfyUI-Allor": [
258
+ "AlphaChanelAdd",
259
+ "AlphaChanelAddByMask",
260
+ "AlphaChanelAsMask",
261
+ "AlphaChanelRemove",
262
+ "AlphaChanelRestore",
263
+ "ClipClamp",
264
+ "ClipVisionClamp",
265
+ "ClipVisionOutputClamp",
266
+ "ConditioningClamp",
267
+ "ControlNetClamp",
268
+ "GligenClamp",
269
+ "ImageBatchFork",
270
+ "ImageBatchGet",
271
+ "ImageBatchJoin",
272
+ "ImageBatchRemove",
273
+ "ImageClamp",
274
+ "ImageCompositeAbsolute",
275
+ "ImageCompositeAbsoluteByContainer",
276
+ "ImageCompositeRelative",
277
+ "ImageCompositeRelativeByContainer",
278
+ "ImageContainer",
279
+ "ImageContainerInheritanceAdd",
280
+ "ImageContainerInheritanceMax",
281
+ "ImageContainerInheritanceScale",
282
+ "ImageContainerInheritanceSum",
283
+ "ImageDrawArc",
284
+ "ImageDrawArcByContainer",
285
+ "ImageDrawChord",
286
+ "ImageDrawChordByContainer",
287
+ "ImageDrawEllipse",
288
+ "ImageDrawEllipseByContainer",
289
+ "ImageDrawLine",
290
+ "ImageDrawLineByContainer",
291
+ "ImageDrawPieslice",
292
+ "ImageDrawPiesliceByContainer",
293
+ "ImageDrawPolygon",
294
+ "ImageDrawRectangle",
295
+ "ImageDrawRectangleByContainer",
296
+ "ImageDrawRectangleRounded",
297
+ "ImageDrawRectangleRoundedByContainer",
298
+ "ImageEffectsAdjustment",
299
+ "ImageEffectsGrayscale",
300
+ "ImageEffectsLensBokeh",
301
+ "ImageEffectsLensChromaticAberration",
302
+ "ImageEffectsLensOpticAxis",
303
+ "ImageEffectsLensVignette",
304
+ "ImageEffectsLensZoomBurst",
305
+ "ImageEffectsNegative",
306
+ "ImageEffectsSepia",
307
+ "ImageFilterBilateralBlur",
308
+ "ImageFilterBlur",
309
+ "ImageFilterBoxBlur",
310
+ "ImageFilterContour",
311
+ "ImageFilterDetail",
312
+ "ImageFilterEdgeEnhance",
313
+ "ImageFilterEdgeEnhanceMore",
314
+ "ImageFilterEmboss",
315
+ "ImageFilterFindEdges",
316
+ "ImageFilterGaussianBlur",
317
+ "ImageFilterGaussianBlurAdvanced",
318
+ "ImageFilterMax",
319
+ "ImageFilterMedianBlur",
320
+ "ImageFilterMin",
321
+ "ImageFilterMode",
322
+ "ImageFilterRank",
323
+ "ImageFilterSharpen",
324
+ "ImageFilterSmooth",
325
+ "ImageFilterSmoothMore",
326
+ "ImageFilterStackBlur",
327
+ "ImageSegmentation",
328
+ "ImageSegmentationCustom",
329
+ "ImageSegmentationCustomAdvanced",
330
+ "ImageText",
331
+ "ImageTextMultiline",
332
+ "ImageTextMultilineOutlined",
333
+ "ImageTextOutlined",
334
+ "ImageTransformCropAbsolute",
335
+ "ImageTransformCropCorners",
336
+ "ImageTransformCropRelative",
337
+ "ImageTransformPaddingAbsolute",
338
+ "ImageTransformPaddingRelative",
339
+ "ImageTransformResizeAbsolute",
340
+ "ImageTransformResizeRelative",
341
+ "ImageTransformRotate",
342
+ "ImageTransformTranspose",
343
+ "LatentClamp",
344
+ "MaskClamp",
345
+ "ModelClamp",
346
+ "StyleModelClamp",
347
+ "UpscaleModelClamp",
348
+ "VaeClamp"
349
+ ],
350
+ "https://github.com/RockOfFire/ComfyUI_Comfyroll_CustomNodes": [
351
+ "CR Apply ControlNet",
352
+ "CR Aspect Ratio",
353
+ "CR Clip Input Switch",
354
+ "CR Color Tint",
355
+ "CR Conditioning Input Switch",
356
+ "CR ControlNet Input Switch",
357
+ "CR Image Input Switch",
358
+ "CR Image Input Switch (4 way)",
359
+ "CR Image Output",
360
+ "CR Image Pipe Edit",
361
+ "CR Image Pipe In",
362
+ "CR Image Pipe Out",
363
+ "CR Image Size",
364
+ "CR Integer Multiple",
365
+ "CR Latent Input Switch",
366
+ "CR Load LoRA",
367
+ "CR Model Input Switch",
368
+ "CR Module Input",
369
+ "CR Module Output",
370
+ "CR Module Pipe Loader",
371
+ "CR Pipe Switch",
372
+ "CR Seed to Int"
373
+ ],
374
+ "https://github.com/SLAPaper/ComfyUI-Image-Selector": [
375
+ "ImageDuplicator",
376
+ "ImageSelector",
377
+ "LatentDuplicator",
378
+ "LatentSelector"
379
+ ],
380
+ "https://github.com/TinyTerra/ComfyUI_tinyterraNodes.git": [
381
+ "ttN busIN",
382
+ "ttN busOUT",
383
+ "ttN concat",
384
+ "ttN debugInput",
385
+ "ttN float",
386
+ "ttN hiresfixScale",
387
+ "ttN imageOutput",
388
+ "ttN imageREMBG",
389
+ "ttN int",
390
+ "ttN pipe2BASIC",
391
+ "ttN pipe2DETAILER",
392
+ "ttN pipeEDIT",
393
+ "ttN pipeIN",
394
+ "ttN pipeKSampler",
395
+ "ttN pipeLoader",
396
+ "ttN pipeOUT",
397
+ "ttN seed",
398
+ "ttN seedDebug",
399
+ "ttN text",
400
+ "ttN text3BOX_3WAYconcat",
401
+ "ttN text7BOX_concat",
402
+ "ttN textDebug",
403
+ "ttN xyPlot"
404
+ ],
405
+ "https://github.com/WASasquatch/was-node-suite-comfyui": [
406
+ "BLIP Analyze Image",
407
+ "BLIP Model Loader",
408
+ "Blend Latents",
409
+ "Bounded Image Blend",
410
+ "Bounded Image Blend with Mask",
411
+ "Bounded Image Crop",
412
+ "Bounded Image Crop with Mask",
413
+ "CLIP Input Switch",
414
+ "CLIP Vision Input Switch",
415
+ "CLIPSeg Batch Masking",
416
+ "CLIPSeg Masking",
417
+ "CLIPSeg Model Loader",
418
+ "CLIPTextEncode (BlenderNeko Advanced + NSP)",
419
+ "CLIPTextEncode (NSP)",
420
+ "Cache Node",
421
+ "Checkpoint Loader",
422
+ "Checkpoint Loader (Simple)",
423
+ "Conditioning Input Switch",
424
+ "Constant Number",
425
+ "Control Net Model Input Switch",
426
+ "Convert Masks to Images",
427
+ "Create Grid Image",
428
+ "Create Morph Image",
429
+ "Create Morph Image from Path",
430
+ "Create Video from Path",
431
+ "Debug Number to Console",
432
+ "Dictionary to Console",
433
+ "Diffusers Hub Model Down-Loader",
434
+ "Diffusers Model Loader",
435
+ "Export API",
436
+ "Image Analyze",
437
+ "Image Batch",
438
+ "Image Blank",
439
+ "Image Blend",
440
+ "Image Blend by Mask",
441
+ "Image Blending Mode",
442
+ "Image Bloom Filter",
443
+ "Image Bounds",
444
+ "Image Canny Filter",
445
+ "Image Chromatic Aberration",
446
+ "Image Color Palette",
447
+ "Image Crop Face",
448
+ "Image Crop Location",
449
+ "Image Crop Square Location",
450
+ "Image Displacement Warp",
451
+ "Image Dragan Photography Filter",
452
+ "Image Edge Detection Filter",
453
+ "Image Film Grain",
454
+ "Image Filter Adjustments",
455
+ "Image Flip",
456
+ "Image Generate Gradient",
457
+ "Image Gradient Map",
458
+ "Image High Pass Filter",
459
+ "Image History Loader",
460
+ "Image Input Switch",
461
+ "Image Levels Adjustment",
462
+ "Image Load",
463
+ "Image Median Filter",
464
+ "Image Mix RGB Channels",
465
+ "Image Monitor Effects Filter",
466
+ "Image Nova Filter",
467
+ "Image Padding",
468
+ "Image Paste Crop",
469
+ "Image Paste Crop by Location",
470
+ "Image Paste Face",
471
+ "Image Perlin Noise",
472
+ "Image Perlin Power Fractal",
473
+ "Image Pixelate",
474
+ "Image Power Noise",
475
+ "Image Rembg (Remove Background)",
476
+ "Image Remove Background (Alpha)",
477
+ "Image Remove Color",
478
+ "Image Resize",
479
+ "Image Rotate",
480
+ "Image Rotate Hue",
481
+ "Image SSAO (Ambient Occlusion)",
482
+ "Image SSDO (Direct Occlusion)",
483
+ "Image Save",
484
+ "Image Seamless Texture",
485
+ "Image Select Channel",
486
+ "Image Select Color",
487
+ "Image Shadows and Highlights",
488
+ "Image Size to Number",
489
+ "Image Stitch",
490
+ "Image Style Filter",
491
+ "Image Threshold",
492
+ "Image Tiled",
493
+ "Image Transpose",
494
+ "Image Voronoi Noise Filter",
495
+ "Image fDOF Filter",
496
+ "Image to Latent Mask",
497
+ "Image to Noise",
498
+ "Image to Seed",
499
+ "Inset Image Bounds",
500
+ "Integer place counter",
501
+ "KSampler (WAS)",
502
+ "KSampler Cycle",
503
+ "LangSAM Masking",
504
+ "LangSAM Model Loader",
505
+ "Latent Input Switch",
506
+ "Latent Noise Injection",
507
+ "Latent Size to Number",
508
+ "Latent Upscale by Factor (WAS)",
509
+ "Load Cache",
510
+ "Load Image Batch",
511
+ "Load Lora",
512
+ "Load Text File",
513
+ "Logic Boolean",
514
+ "Lora Loader",
515
+ "Mask Arbitrary Region",
516
+ "Mask Batch",
517
+ "Mask Batch to Mask",
518
+ "Mask Ceiling Region",
519
+ "Mask Crop Dominant Region",
520
+ "Mask Crop Minority Region",
521
+ "Mask Crop Region",
522
+ "Mask Dilate Region",
523
+ "Mask Dominant Region",
524
+ "Mask Erode Region",
525
+ "Mask Fill Holes",
526
+ "Mask Floor Region",
527
+ "Mask Gaussian Region",
528
+ "Mask Invert",
529
+ "Mask Minority Region",
530
+ "Mask Paste Region",
531
+ "Mask Smooth Region",
532
+ "Mask Threshold Region",
533
+ "Masks Add",
534
+ "Masks Combine Batch",
535
+ "Masks Combine Regions",
536
+ "Masks Subtract",
537
+ "MiDaS Depth Approximation",
538
+ "MiDaS Mask Image",
539
+ "MiDaS Model Loader",
540
+ "Model Input Switch",
541
+ "Number Input Condition",
542
+ "Number Input Switch",
543
+ "Number Multiple Of",
544
+ "Number Operation",
545
+ "Number PI",
546
+ "Number to Float",
547
+ "Number to Int",
548
+ "Number to Seed",
549
+ "Number to String",
550
+ "Number to Text",
551
+ "Prompt Styles Selector",
552
+ "Random Number",
553
+ "SAM Image Mask",
554
+ "SAM Model Loader",
555
+ "SAM Parameters",
556
+ "SAM Parameters Combine",
557
+ "Samples Passthrough (Stat System)",
558
+ "Save Text File",
559
+ "Seed",
560
+ "String to Text",
561
+ "Tensor Batch to Image",
562
+ "Text Add Token by Input",
563
+ "Text Add Tokens",
564
+ "Text Compare",
565
+ "Text Concatenate",
566
+ "Text Dictionary Update",
567
+ "Text File History Loader",
568
+ "Text Find and Replace",
569
+ "Text Find and Replace Input",
570
+ "Text Find and Replace by Dictionary",
571
+ "Text Input Switch",
572
+ "Text List",
573
+ "Text List Concatenate",
574
+ "Text Load Line From File",
575
+ "Text Multiline",
576
+ "Text Parse A1111 Embeddings",
577
+ "Text Parse Noodle Soup Prompts",
578
+ "Text Parse Tokens",
579
+ "Text Random Line",
580
+ "Text Random Prompt",
581
+ "Text String",
582
+ "Text to Conditioning",
583
+ "Text to Console",
584
+ "Text to Number",
585
+ "Text to String",
586
+ "True Random.org Number Generator",
587
+ "Upscale Model Loader",
588
+ "Upscale Model Switch",
589
+ "VAE Input Switch",
590
+ "Video Dump Frames",
591
+ "Write to GIF",
592
+ "Write to Video",
593
+ "unCLIP Checkpoint Loader"
594
+ ],
595
+ "https://github.com/YinBailiang/MergeBlockWeighted_fo_ComfyUI": [
596
+ "MergeBlockWeighted"
597
+ ],
598
+ "https://github.com/ZaneA/ComfyUI-ImageReward": [
599
+ "ImageRewardLoader",
600
+ "ImageRewardScore"
601
+ ],
602
+ "https://github.com/biegert/ComfyUI-CLIPSeg/raw/main/custom_nodes/clipseg.py": [
603
+ "CLIPSeg",
604
+ "CombineSegMasks"
605
+ ],
606
+ "https://github.com/bvhari/ComfyUI_ImageProcessing": [
607
+ "BilateralFilter",
608
+ "Brightness",
609
+ "Gamma",
610
+ "Hue",
611
+ "Saturation",
612
+ "SigmoidCorrection",
613
+ "UnsharpMask"
614
+ ],
615
+ "https://github.com/bvhari/ComfyUI_LatentToRGB": [
616
+ "LatentToRGB"
617
+ ],
618
+ "https://github.com/chenbaiyujason/sc-node-comfyui": [
619
+ "8 Combine Text String",
620
+ "Builder Text String",
621
+ "Clean Gradio",
622
+ "Combine GPT Prompt",
623
+ "Combine Text String",
624
+ "Get Gradio",
625
+ "Multiple Combine GPT Prompt",
626
+ "Multiple Post to GPT",
627
+ "Multiple Text String",
628
+ "One GPT Builder",
629
+ "One Post to GPT",
630
+ "Out Gradio",
631
+ "Prompt Preview",
632
+ "SCSCCLIPTextEncode",
633
+ "SCSearch and Replace",
634
+ "SCText to Console",
635
+ "Single Text String",
636
+ "String to ASCII",
637
+ "Verb One Post to GPT"
638
+ ],
639
+ "https://github.com/city96/ComfyUI_NetDist": [
640
+ "FetchRemote",
641
+ "QueueRemote"
642
+ ],
643
+ "https://github.com/comfyanonymous/ComfyUI_experiments/raw/master/advanced_model_merging.py": [
644
+ "ModelMergeBlockNumber"
645
+ ],
646
+ "https://github.com/comfyanonymous/ComfyUI_experiments/raw/master/sampler_rescalecfg.py": [
647
+ "RescaleClassifierFreeGuidanceTest"
648
+ ],
649
+ "https://github.com/comfyanonymous/ComfyUI_experiments/raw/master/sampler_tonemap.py": [
650
+ "ModelSamplerTonemapNoiseTest"
651
+ ],
652
+ "https://github.com/dawangraoming/ComfyUI_ksampler_gpu/raw/main/ksampler_gpu.py": [
653
+ "KSamplerAdvancedGPU",
654
+ "KSamplerGPU"
655
+ ],
656
+ "https://github.com/diontimmer/ComfyUI-Vextra-Nodes": [
657
+ "Add Text To Image",
658
+ "Apply Instagram Filter",
659
+ "Create Solid Color",
660
+ "Flatten Colors",
661
+ "Generate Noise Image",
662
+ "GlitchThis Effect",
663
+ "Hue Rotation",
664
+ "Load Picture Index",
665
+ "Pixel Sort",
666
+ "Play Sound At Execution",
667
+ "Prettify Prompt Using distilgpt2",
668
+ "Swap Color Mode"
669
+ ],
670
+ "https://github.com/filipemeneses/comfy_pixelization": [
671
+ "Pixelization"
672
+ ],
673
+ "https://github.com/flyingshutter/As_ComfyUI_CustomNodes": [
674
+ "BatchIndex_AS",
675
+ "ImageMixMasked_As",
676
+ "ImageToMask_AS",
677
+ "Increment_AS",
678
+ "Int2Any_AS",
679
+ "LatentAdd_AS",
680
+ "LatentMixMasked_As",
681
+ "LatentMix_AS",
682
+ "LatentToImages_AS",
683
+ "LoadLatent_AS",
684
+ "MapRange_AS",
685
+ "MaskToImage_AS",
686
+ "Math_AS",
687
+ "Number2Float_AS",
688
+ "Number2Int_AS",
689
+ "Number_AS",
690
+ "SaveLatent_AS",
691
+ "TextToImage_AS"
692
+ ],
693
+ "https://github.com/gamert/ComfyUI_tagger": [
694
+ "CLIPTextEncodeTaggerDD",
695
+ "ImageTaggerDD",
696
+ "LoadImage_Tagger",
697
+ "PromptDD"
698
+ ],
699
+ "https://github.com/guoyk93/yk-node-suite-comfyui": [
700
+ "YKImagePadForOutpaint",
701
+ "YKMaskToImage"
702
+ ],
703
+ "https://github.com/lilly1987/ComfyUI_node_Lilly": [
704
+ "CheckpointLoaderSimpleText",
705
+ "LoraLoaderText",
706
+ "LoraLoaderTextRandom",
707
+ "Random_Sampler",
708
+ "VAELoaderDecode"
709
+ ],
710
+ "https://github.com/ltdrdata/ComfyUI-Impact-Pack": [
711
+ "BasicPipeToDetailerPipe",
712
+ "BboxDetectorCombined",
713
+ "BboxDetectorCombined_v2",
714
+ "BboxDetectorForEach",
715
+ "BboxDetectorSEGS",
716
+ "BitwiseAndMask",
717
+ "BitwiseAndMaskForEach",
718
+ "CLIPSegDetectorProvider",
719
+ "CfgScheduleHookProvider",
720
+ "CombineRegionalPrompts",
721
+ "DenoiseScheduleHookProvider",
722
+ "DetailerForEach",
723
+ "DetailerForEachDebug",
724
+ "DetailerForEachDebugPipe",
725
+ "DetailerForEachPipe",
726
+ "DetailerPipeToBasicPipe",
727
+ "EditBasicPipe",
728
+ "EditDetailerPipe",
729
+ "EmptySegs",
730
+ "FaceDetailer",
731
+ "FaceDetailerPipe",
732
+ "FromBasicPipe",
733
+ "FromDetailerPipe",
734
+ "ImageMaskSwitch",
735
+ "ImageReceiver",
736
+ "ImageSender",
737
+ "ImpactLogger",
738
+ "ImpactWildcardProcessor",
739
+ "IterativeImageUpscale",
740
+ "IterativeLatentUpscale",
741
+ "KSamplerAdvancedProvider",
742
+ "KSamplerProvider",
743
+ "LatentPixelScale",
744
+ "LatentReceiver",
745
+ "LatentSender",
746
+ "LatentSwitch",
747
+ "LoadConditioning",
748
+ "MMDetDetectorProvider",
749
+ "MMDetLoader",
750
+ "MaskPainter",
751
+ "MaskToSEGS",
752
+ "ONNXDetectorProvider",
753
+ "ONNXDetectorSEGS",
754
+ "PixelKSampleHookCombine",
755
+ "PixelKSampleUpscalerProvider",
756
+ "PixelKSampleUpscalerProviderPipe",
757
+ "PixelTiledKSampleUpscalerProvider",
758
+ "PixelTiledKSampleUpscalerProviderPipe",
759
+ "PreviewBridge",
760
+ "RegionalPrompt",
761
+ "RegionalSampler",
762
+ "SAMDetectorCombined",
763
+ "SAMLoader",
764
+ "SEGEdit",
765
+ "SEGPick",
766
+ "SEGSDetailer",
767
+ "SEGSPaste",
768
+ "SEGSPreview",
769
+ "SEGSSwitch",
770
+ "SEGSToImageList",
771
+ "SaveConditioning",
772
+ "SegmDetectorCombined",
773
+ "SegmDetectorCombined_v2",
774
+ "SegmDetectorForEach",
775
+ "SegmDetectorSEGS",
776
+ "Segs & Mask",
777
+ "SegsMaskCombine",
778
+ "SegsToCombinedMask",
779
+ "SubtractMask",
780
+ "SubtractMaskForEach",
781
+ "TiledKSamplerProvider",
782
+ "ToBasicPipe",
783
+ "ToBinaryMask",
784
+ "ToDetailerPipe",
785
+ "TwoAdvancedSamplersForMask",
786
+ "TwoSamplersForMask",
787
+ "TwoSamplersForMaskUpscalerProvider",
788
+ "TwoSamplersForMaskUpscalerProviderPipe"
789
+ ],
790
+ "https://github.com/ltdrdata/ComfyUI-tomeSD-installer": [
791
+ "CheckpointTomeLoader",
792
+ "TestNode"
793
+ ],
794
+ "https://github.com/m957ymj75urz/ComfyUI-Custom-Nodes/raw/main/clip-text-encode-split/clip_text_encode_split.py": [
795
+ "RawText",
796
+ "RawTextCombine",
797
+ "RawTextEncode",
798
+ "RawTextReplace"
799
+ ],
800
+ "https://github.com/omar92/ComfyUI-QualityOfLifeSuit_Omar92": [
801
+ "CLIPStringEncode _O",
802
+ "Chat completion _O",
803
+ "ChatGPT Simple _O",
804
+ "ChatGPT _O",
805
+ "ChatGPT compact _O",
806
+ "Chat_Completion _O",
807
+ "Chat_Message _O",
808
+ "Chat_Message_fromString _O",
809
+ "Concat Text _O",
810
+ "ConcatRandomNSP_O",
811
+ "Debug String _O",
812
+ "Debug Text _O",
813
+ "Debug Text route _O",
814
+ "Edit_image _O",
815
+ "Equation1param _O",
816
+ "Equation2params _O",
817
+ "GetImage_(Width&Height) _O",
818
+ "GetLatent_(Width&Height) _O",
819
+ "ImageScaleFactor _O",
820
+ "ImageScaleFactorSimple _O",
821
+ "LatentUpscaleFactor _O",
822
+ "LatentUpscaleFactorSimple _O",
823
+ "LatentUpscaleMultiply",
824
+ "Note _O",
825
+ "RandomNSP _O",
826
+ "Replace Text _O",
827
+ "String _O",
828
+ "Text _O",
829
+ "Text2Image _O",
830
+ "Trim Text _O",
831
+ "VAEDecodeParallel _O",
832
+ "combine_chat_messages _O",
833
+ "compine_chat_messages _O",
834
+ "concat Strings _O",
835
+ "create image _O",
836
+ "create_image _O",
837
+ "debug Completeion _O",
838
+ "debug messages_O",
839
+ "float _O",
840
+ "floatToInt _O",
841
+ "floatToText _O",
842
+ "int _O",
843
+ "intToFloat _O",
844
+ "load_openAI _O",
845
+ "replace String _O",
846
+ "replace String advanced _O",
847
+ "saveTextToFile _O",
848
+ "seed _O",
849
+ "selectLatentFromBatch _O",
850
+ "string2Image _O",
851
+ "trim String _O",
852
+ "variation_image _O"
853
+ ],
854
+ "https://github.com/paulo-coronado/comfy_clip_blip_node": [
855
+ "CLIPTextEncodeBLIP",
856
+ "CLIPTextEncodeBLIP-2",
857
+ "Example"
858
+ ],
859
+ "https://github.com/pythongosssss/ComfyUI-Custom-Scripts": [
860
+ "ConstrainImage|pysssss",
861
+ "ShowText|pysssss",
862
+ "StringFunction|pysssss"
863
+ ],
864
+ "https://github.com/pythongosssss/ComfyUI-WD14-Tagger": [
865
+ "WD14Tagger|pysssss"
866
+ ],
867
+ "https://github.com/shiimizu/ComfyUI_smZNodes": [
868
+ "smZ CLIPTextEncode"
869
+ ],
870
+ "https://github.com/space-nuko/ComfyUI-Disco-Diffusion": [
871
+ "DiscoDiffusion_DiscoDiffusion",
872
+ "DiscoDiffusion_DiscoDiffusionExtraSettings",
873
+ "DiscoDiffusion_GuidedDiffusionLoader",
874
+ "DiscoDiffusion_OpenAICLIPLoader"
875
+ ],
876
+ "https://github.com/space-nuko/ComfyUI-OpenPose-Editor": [
877
+ "Nui.OpenPoseEditor"
878
+ ],
879
+ "https://github.com/space-nuko/nui-suite": [
880
+ "Nui.DynamicPromptsTextGen",
881
+ "Nui.FeelingLuckyTextGen",
882
+ "Nui.OutputString"
883
+ ],
884
+ "https://github.com/ssitu/ComfyUI_UltimateSDUpscale": [
885
+ "UltimateSDUpscale",
886
+ "UltimateSDUpscaleNoUpscale"
887
+ ],
888
+ "https://github.com/ssitu/ComfyUI_restart_sampling": [
889
+ "KRestartSampler"
890
+ ],
891
+ "https://github.com/strimmlarn/ComfyUI_Strimmlarns_aesthetic_score": [
892
+ "AesthetlcScoreSorter",
893
+ "CalculateAestheticScore",
894
+ "LoadAesteticModel",
895
+ "ScoreToNumber"
896
+ ],
897
+ "https://github.com/sylym/comfy_vid2vid": [
898
+ "CheckpointLoaderSimpleSequence",
899
+ "DdimInversionSequence",
900
+ "KSamplerSequence",
901
+ "LoadImageMaskSequence",
902
+ "LoadImageSequence",
903
+ "LoraLoaderSequence",
904
+ "SetLatentNoiseSequence",
905
+ "TrainUnetSequence",
906
+ "VAEEncodeForInpaintSequence"
907
+ ],
908
+ "https://github.com/szhublox/ambw_comfyui": [
909
+ "Auto Merge Block Weighted"
910
+ ],
911
+ "https://github.com/taabata/Comfy_Syrian_Falcon_Nodes/raw/main/SyrianFalconNodes.py": [
912
+ "CompositeImage",
913
+ "KSamplerAdvancedCustom",
914
+ "LoopBack",
915
+ "QRGenerate",
916
+ "WordAsImage"
917
+ ],
918
+ "https://github.com/trojblue/trNodes": [
919
+ "JpgConvertNode",
920
+ "trColorCorrection",
921
+ "trLayering",
922
+ "trRouter",
923
+ "trRouterLonger"
924
+ ],
925
+ "https://github.com/xXAdonesXx/NodeGPT/raw/main/Textnode.py": [
926
+ "CombineInput",
927
+ "CostumeAgent_1",
928
+ "CostumeAgent_2",
929
+ "CostumeMaster_1",
930
+ "Image_generation_Conditioning",
931
+ "Memory_Excel",
932
+ "Model_1",
933
+ "TextCombine",
934
+ "TextGenerator",
935
+ "TextInput",
936
+ "TextOutput"
937
+ ]
938
+ }
git_helper.py ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import sys
2
+ import os
3
+ import git
4
+
5
+ def gitclone(custom_nodes_path, url):
6
+ repo_name = os.path.splitext(os.path.basename(url))[0]
7
+ repo_path = os.path.join(custom_nodes_path, repo_name)
8
+
9
+ # Clone the repository from the remote URL
10
+ repo = git.Repo.clone_from(url, repo_path, recursive=True)
11
+ repo.git.clear_cache()
12
+ repo.close()
13
+
14
+ def gitcheck(path, do_fetch=False):
15
+ # Fetch the latest commits from the remote repository
16
+ repo = git.Repo(path)
17
+
18
+ current_branch = repo.active_branch
19
+ branch_name = current_branch.name
20
+
21
+ remote_name = 'origin'
22
+ remote = repo.remote(name=remote_name)
23
+
24
+ if do_fetch:
25
+ remote.fetch()
26
+
27
+ # Get the current commit hash and the commit hash of the remote branch
28
+ commit_hash = repo.head.commit.hexsha
29
+ remote_commit_hash = repo.refs[f'{remote_name}/{branch_name}'].object.hexsha
30
+
31
+ # Compare the commit hashes to determine if the local repository is behind the remote repository
32
+ if commit_hash != remote_commit_hash:
33
+ # Get the commit dates
34
+ commit_date = repo.head.commit.committed_datetime
35
+ remote_commit_date = repo.refs[f'{remote_name}/{branch_name}'].object.committed_datetime
36
+
37
+ # Compare the commit dates to determine if the local repository is behind the remote repository
38
+ if commit_date < remote_commit_date:
39
+ print("CUSTOM NODE CHECK: True")
40
+ else:
41
+ print("CUSTOM NODE CHECK: False")
42
+
43
+ def gitpull(path):
44
+ # Check if the path is a git repository
45
+ if not os.path.exists(os.path.join(path, '.git')):
46
+ raise ValueError('Not a git repository')
47
+
48
+ # Pull the latest changes from the remote repository
49
+ repo = git.Repo(path)
50
+ origin = repo.remote(name='origin')
51
+ origin.pull()
52
+ repo.git.submodule('update', '--init', '--recursive')
53
+
54
+ repo.close()
55
+
56
+ try:
57
+ if sys.argv[1] == "--clone":
58
+ gitclone(sys.argv[2], sys.argv[3])
59
+ elif sys.argv[1] == "--check":
60
+ gitcheck(sys.argv[2], False)
61
+ elif sys.argv[1] == "--fetch":
62
+ gitcheck(sys.argv[2], True)
63
+ elif sys.argv[1] == "--pull":
64
+ gitpull(sys.argv[2])
65
+ exit(0)
66
+ except:
67
+ exit(-1)
68
+
69
+
js/comfyui-manager.js ADDED
@@ -0,0 +1,1444 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { app } from "/scripts/app.js";
2
+ import { ComfyDialog, $el } from "/scripts/ui.js";
3
+ import {ComfyWidgets} from "../../scripts/widgets.js";
4
+
5
+ var update_comfyui_button = null;
6
+ var fetch_updates_button = null;
7
+
8
+ async function getCustomnodeMappings() {
9
+ var mode = "url";
10
+ if(ManagerMenuDialog.instance.local_mode_checkbox.checked)
11
+ mode = "local";
12
+
13
+ const response = await fetch(`/customnode/getmappings?mode=${mode}`);
14
+
15
+ const data = await response.json();
16
+ return data;
17
+ }
18
+
19
+ async function getUnresolvedNodesInComponent() {
20
+ try {
21
+ var mode = "url";
22
+ if(ManagerMenuDialog.instance.local_mode_checkbox.checked)
23
+ mode = "local";
24
+
25
+ const response = await fetch(`/component/get_unresolved`);
26
+
27
+ const data = await response.json();
28
+ return data.nodes;
29
+ }
30
+ catch {
31
+ return [];
32
+ }
33
+ }
34
+
35
+ async function getCustomNodes() {
36
+ var mode = "url";
37
+ if(ManagerMenuDialog.instance.local_mode_checkbox.checked)
38
+ mode = "local";
39
+
40
+ const response = await fetch(`/customnode/getlist?mode=${mode}`);
41
+
42
+ const data = await response.json();
43
+ return data;
44
+ }
45
+
46
+ async function getAlterList() {
47
+ var mode = "url";
48
+ if(ManagerMenuDialog.instance.local_mode_checkbox.checked)
49
+ mode = "local";
50
+
51
+ const response = await fetch(`/alternatives/getlist?mode=${mode}`);
52
+
53
+ const data = await response.json();
54
+ return data;
55
+ }
56
+
57
+ async function getModelList() {
58
+ var mode = "url";
59
+ if(ManagerMenuDialog.instance.local_mode_checkbox.checked)
60
+ mode = "local";
61
+
62
+ const response = await fetch(`/externalmodel/getlist?mode=${mode}`);
63
+
64
+ const data = await response.json();
65
+ return data;
66
+ }
67
+
68
+ async function install_custom_node(target, caller, mode) {
69
+ if(caller) {
70
+ caller.startInstall(target);
71
+
72
+ try {
73
+ const response = await fetch(`/customnode/${mode}`, {
74
+ method: 'POST',
75
+ headers: { 'Content-Type': 'application/json' },
76
+ body: JSON.stringify(target)
77
+ });
78
+
79
+ if(response.status == 400) {
80
+ app.ui.dialog.show(`${mode} failed: ${target.title}`);
81
+ app.ui.dialog.element.style.zIndex = 9999;
82
+ return false;
83
+ }
84
+
85
+ const status = await response.json();
86
+ app.ui.dialog.close();
87
+ target.installed = 'True';
88
+ return true;
89
+ }
90
+ catch(exception) {
91
+ app.ui.dialog.show(`${mode} failed: ${target.title} / ${exception}`);
92
+ app.ui.dialog.element.style.zIndex = 9999;
93
+ return false;
94
+ }
95
+ finally {
96
+ await caller.invalidateControl();
97
+ caller.updateMessage('<BR>To apply the installed/disabled/enabled custom node, please restart ComfyUI.');
98
+ }
99
+ }
100
+ }
101
+
102
+ async function updateComfyUI() {
103
+ update_comfyui_button.innerText = "Updating ComfyUI...";
104
+ update_comfyui_button.disabled = true;
105
+
106
+ try {
107
+ const response = await fetch('/comfyui_manager/update_comfyui');
108
+
109
+ if(response.status == 400) {
110
+ app.ui.dialog.show('Failed to update ComfyUI');
111
+ app.ui.dialog.element.style.zIndex = 9999;
112
+ return false;
113
+ }
114
+
115
+ if(response.status == 201) {
116
+ app.ui.dialog.show('ComfyUI has been successfully updated.');
117
+ app.ui.dialog.element.style.zIndex = 9999;
118
+ }
119
+ else {
120
+ app.ui.dialog.show('ComfyUI is already up to date with the latest version.');
121
+ app.ui.dialog.element.style.zIndex = 9999;
122
+ }
123
+
124
+ return true;
125
+ }
126
+ catch(exception) {
127
+ app.ui.dialog.show(`Failed to update ComfyUI / ${exception}`);
128
+ app.ui.dialog.element.style.zIndex = 9999;
129
+ return false;
130
+ }
131
+ finally {
132
+ update_comfyui_button.disabled = false;
133
+ update_comfyui_button.innerText = "Update ComfyUI";
134
+ }
135
+ }
136
+
137
+ async function fetchUpdates() {
138
+ fetch_updates_button.innerText = "Fetching updates...";
139
+ fetch_updates_button.disabled = true;
140
+
141
+ try {
142
+ var mode = "url";
143
+ if(ManagerMenuDialog.instance.local_mode_checkbox.checked)
144
+ mode = "local";
145
+
146
+ const response = await fetch(`/customnode/fetch_updates?mode=${mode}`);
147
+
148
+ if(response.status == 400) {
149
+ app.ui.dialog.show('Failed to fetch updates.');
150
+ app.ui.dialog.element.style.zIndex = 9999;
151
+ return false;
152
+ }
153
+
154
+ if(response.status == 201) {
155
+ app.ui.dialog.show('There is an updated extension available.');
156
+ app.ui.dialog.element.style.zIndex = 9999;
157
+ }
158
+ else {
159
+ app.ui.dialog.show('All extensions are already up-to-date with the latest versions.');
160
+ app.ui.dialog.element.style.zIndex = 9999;
161
+ }
162
+
163
+ return true;
164
+ }
165
+ catch(exception) {
166
+ app.ui.dialog.show(`Failed to update ComfyUI / ${exception}`);
167
+ app.ui.dialog.element.style.zIndex = 9999;
168
+ return false;
169
+ }
170
+ finally {
171
+ fetch_updates_button.disabled = false;
172
+ fetch_updates_button.innerText = "Fetch Updates";
173
+ }
174
+ }
175
+
176
+ async function install_model(target) {
177
+ if(ModelInstaller.instance) {
178
+ ModelInstaller.instance.startInstall(target);
179
+
180
+ try {
181
+ const response = await fetch('/model/install', {
182
+ method: 'POST',
183
+ headers: { 'Content-Type': 'application/json' },
184
+ body: JSON.stringify(target)
185
+ });
186
+
187
+ const status = await response.json();
188
+ app.ui.dialog.close();
189
+ target.installed = 'True';
190
+ return true;
191
+ }
192
+ catch(exception) {
193
+ app.ui.dialog.show(`Install failed: ${target.title} / ${exception}`);
194
+ app.ui.dialog.element.style.zIndex = 9999;
195
+ return false;
196
+ }
197
+ finally {
198
+ await ModelInstaller.instance.invalidateControl();
199
+ ModelInstaller.instance.updateMessage("<BR>To apply the installed model, please click the 'Refresh' button on the main menu.");
200
+ }
201
+ }
202
+ }
203
+
204
+
205
+ // -----
206
+ class CustomNodesInstaller extends ComfyDialog {
207
+ static instance = null;
208
+
209
+ install_buttons = [];
210
+ message_box = null;
211
+ data = null;
212
+
213
+ clear() {
214
+ this.install_buttons = [];
215
+ this.message_box = null;
216
+ this.data = null;
217
+ }
218
+
219
+ constructor() {
220
+ super();
221
+ this.search_keyword = '';
222
+ this.element = $el("div.comfy-modal", { parent: document.body }, []);
223
+ }
224
+
225
+ startInstall(target) {
226
+ const self = CustomNodesInstaller.instance;
227
+
228
+ self.updateMessage(`<BR><font color="green">Installing '${target.title}'</font>`);
229
+
230
+ for(let i in self.install_buttons) {
231
+ self.install_buttons[i].disabled = true;
232
+ self.install_buttons[i].style.backgroundColor = 'gray';
233
+ }
234
+ }
235
+
236
+ apply_searchbox(data) {
237
+ let keyword = this.search_box.value.toLowerCase();
238
+ for(let i in this.grid_rows) {
239
+ let data = this.grid_rows[i].data;
240
+ let content = data.author.toLowerCase() + data.description.toLowerCase() + data.title.toLowerCase();
241
+
242
+ if(this.filter && this.filter != '*') {
243
+ if(this.filter != data.installed) {
244
+ this.grid_rows[i].control.style.display = 'none';
245
+ continue;
246
+ }
247
+ }
248
+
249
+ if(keyword == "")
250
+ this.grid_rows[i].control.style.display = null;
251
+ else if(content.includes(keyword)) {
252
+ this.grid_rows[i].control.style.display = null;
253
+ }
254
+ else {
255
+ this.grid_rows[i].control.style.display = 'none';
256
+ }
257
+ }
258
+ }
259
+
260
+ async filter_missing_node(data) {
261
+ const mappings = await getCustomnodeMappings();
262
+
263
+
264
+ // build regex->url map
265
+ const regex_to_url = [];
266
+ for (let i in data) {
267
+ if(data[i]['nodename_pattern']) {
268
+ let item = {regex: new RegExp(data[i].nodename_pattern), url: data[i].files[0]};
269
+ regex_to_url.push(item);
270
+ }
271
+ }
272
+
273
+ // build name->url map
274
+ const name_to_url = {};
275
+ for (const url in mappings) {
276
+ const names = mappings[url];
277
+ for(const name in names) {
278
+ name_to_url[names[name]] = url;
279
+ }
280
+ }
281
+
282
+ const registered_nodes = new Set();
283
+ for (let i in LiteGraph.registered_node_types) {
284
+ registered_nodes.add(LiteGraph.registered_node_types[i].type);
285
+ }
286
+
287
+ const missing_nodes = new Set();
288
+ const nodes = app.graph.serialize().nodes;
289
+ for (let i in nodes) {
290
+ const node_type = nodes[i].type;
291
+ if (!registered_nodes.has(node_type)) {
292
+ const url = name_to_url[node_type];
293
+ if(url)
294
+ missing_nodes.add(url);
295
+ else {
296
+ for(let j in regex_to_url) {
297
+ if(regex_to_url[j].regex.test(node_type)) {
298
+ missing_nodes.add(regex_to_url[j].url);
299
+ }
300
+ }
301
+ }
302
+ }
303
+ }
304
+
305
+ let unresolved_nodes = await getUnresolvedNodesInComponent();
306
+ for (let i in unresolved_nodes) {
307
+ let node_type = unresolved_nodes[i];
308
+ const url = name_to_url[node_type];
309
+ if(url)
310
+ missing_nodes.add(url);
311
+ }
312
+
313
+ return data.filter(node => node.files.some(file => missing_nodes.has(file)));
314
+ }
315
+
316
+ async invalidateControl() {
317
+ this.clear();
318
+
319
+ // splash
320
+ while (this.element.children.length) {
321
+ this.element.removeChild(this.element.children[0]);
322
+ }
323
+
324
+ const msg = $el('div', {id:'custom-message'},
325
+ [$el('br'),
326
+ 'The custom node DB is currently being updated, and updates to custom nodes are being checked for.',
327
+ $el('br'),
328
+ 'NOTE: Update only checks for extensions that have been fetched.',
329
+ $el('br')]);
330
+ msg.style.height = '100px';
331
+ msg.style.verticalAlign = 'middle';
332
+ this.element.appendChild(msg);
333
+
334
+ // invalidate
335
+ this.data = (await getCustomNodes()).custom_nodes;
336
+
337
+ if(this.is_missing_node_mode)
338
+ this.data = await this.filter_missing_node(this.data);
339
+
340
+ this.element.removeChild(msg);
341
+
342
+ while (this.element.children.length) {
343
+ this.element.removeChild(this.element.children[0]);
344
+ }
345
+
346
+ this.createHeaderControls();
347
+ await this.createGrid();
348
+ this.apply_searchbox(this.data);
349
+ this.createBottomControls();
350
+ }
351
+
352
+ updateMessage(msg) {
353
+ this.message_box.innerHTML = msg;
354
+ }
355
+
356
+ async createGrid() {
357
+ var grid = document.createElement('table');
358
+ grid.setAttribute('id', 'custom-nodes-grid');
359
+
360
+ grid.style.position = "relative";
361
+ grid.style.display = "inline-block";
362
+ grid.style.width = "100%"
363
+
364
+ var headerRow = document.createElement('tr');
365
+ var header1 = document.createElement('th');
366
+ header1.innerHTML = '&nbsp;&nbsp;ID&nbsp;&nbsp;';
367
+ header1.style.width = "20px";
368
+ var header2 = document.createElement('th');
369
+ header2.innerHTML = 'Author';
370
+ header2.style.width = "150px";
371
+ var header3 = document.createElement('th');
372
+ header3.innerHTML = 'Name';
373
+ header3.style.width = "200px";
374
+ var header4 = document.createElement('th');
375
+ header4.innerHTML = 'Description';
376
+ header4.style.width = "500px";
377
+ var header5 = document.createElement('th');
378
+ header5.innerHTML = 'Install';
379
+ header5.style.width = "130px";
380
+ headerRow.appendChild(header1);
381
+ headerRow.appendChild(header2);
382
+ headerRow.appendChild(header3);
383
+ headerRow.appendChild(header4);
384
+ headerRow.appendChild(header5);
385
+
386
+ headerRow.style.backgroundColor = "Black";
387
+ headerRow.style.color = "White";
388
+ headerRow.style.textAlign = "center";
389
+ headerRow.style.width = "100%";
390
+ headerRow.style.padding = "0";
391
+ grid.appendChild(headerRow);
392
+
393
+ this.grid_rows = {};
394
+
395
+ if(this.data)
396
+ for (var i = 0; i < this.data.length; i++) {
397
+ const data = this.data[i];
398
+ var dataRow = document.createElement('tr');
399
+ var data1 = document.createElement('td');
400
+ data1.style.textAlign = "center";
401
+ data1.innerHTML = i+1;
402
+ var data2 = document.createElement('td');
403
+ data2.style.maxWidth = "100px";
404
+ data2.textContent = ` ${data.author}`;
405
+ data2.style.whiteSpace = "nowrap";
406
+ data2.style.overflow = "hidden";
407
+ data2.style.textOverflow = "ellipsis";
408
+ var data3 = document.createElement('td');
409
+ data3.style.maxWidth = "200px";
410
+ data3.style.wordWrap = "break-word";
411
+ data3.innerHTML = `&nbsp;<a href=${data.reference} target="_blank"><font color="skyblue"><b>${data.title}</b></font></a>`;
412
+ var data4 = document.createElement('td');
413
+ data4.innerHTML = data.description;
414
+ var data5 = document.createElement('td');
415
+ data5.style.textAlign = "center";
416
+
417
+ var installBtn = document.createElement('button');
418
+ var installBtn2 = null;
419
+ var installBtn3 = null;
420
+
421
+ this.install_buttons.push(installBtn);
422
+
423
+ switch(data.installed) {
424
+ case 'Disabled':
425
+ installBtn3 = document.createElement('button');
426
+ installBtn3.innerHTML = 'Enable';
427
+ installBtn3.style.backgroundColor = 'blue';
428
+ installBtn3.style.color = 'white';
429
+ this.install_buttons.push(installBtn3);
430
+
431
+ installBtn.innerHTML = 'Uninstall';
432
+ installBtn.style.backgroundColor = 'red';
433
+ break;
434
+ case 'Update':
435
+ installBtn2 = document.createElement('button');
436
+ installBtn2.innerHTML = 'Update';
437
+ installBtn2.style.backgroundColor = 'blue';
438
+ installBtn2.style.color = 'white';
439
+ this.install_buttons.push(installBtn2);
440
+
441
+ installBtn3 = document.createElement('button');
442
+ installBtn3.innerHTML = 'Disable';
443
+ installBtn3.style.backgroundColor = 'MediumSlateBlue';
444
+ installBtn3.style.color = 'white';
445
+ this.install_buttons.push(installBtn3);
446
+
447
+ installBtn.innerHTML = 'Uninstall';
448
+ installBtn.style.backgroundColor = 'red';
449
+ break;
450
+ case 'True':
451
+ installBtn3 = document.createElement('button');
452
+ installBtn3.innerHTML = 'Disable';
453
+ installBtn3.style.backgroundColor = 'MediumSlateBlue';
454
+ installBtn3.style.color = 'white';
455
+ this.install_buttons.push(installBtn3);
456
+
457
+ installBtn.innerHTML = 'Uninstall';
458
+ installBtn.style.backgroundColor = 'red';
459
+ break;
460
+ case 'False':
461
+ installBtn.innerHTML = 'Install';
462
+ installBtn.style.backgroundColor = 'black';
463
+ installBtn.style.color = 'white';
464
+ break;
465
+ default:
466
+ installBtn.innerHTML = 'Try Install';
467
+ installBtn.style.backgroundColor = 'Gray';
468
+ installBtn.style.color = 'white';
469
+ }
470
+
471
+ if(installBtn2 != null) {
472
+ installBtn2.style.width = "120px";
473
+ installBtn2.addEventListener('click', function() {
474
+ install_custom_node(data, CustomNodesInstaller.instance, 'update');
475
+ });
476
+
477
+ data5.appendChild(installBtn2);
478
+ }
479
+
480
+ if(installBtn3 != null) {
481
+ installBtn3.style.width = "120px";
482
+ installBtn3.addEventListener('click', function() {
483
+ install_custom_node(data, CustomNodesInstaller.instance, 'toggle_active');
484
+ });
485
+
486
+ data5.appendChild(installBtn3);
487
+ }
488
+
489
+ installBtn.style.width = "120px";
490
+ installBtn.addEventListener('click', function() {
491
+ if(this.innerHTML == 'Uninstall') {
492
+ if (confirm(`Are you sure uninstall ${data.title}?`)) {
493
+ install_custom_node(data, CustomNodesInstaller.instance, 'uninstall');
494
+ }
495
+ }
496
+ else {
497
+ install_custom_node(data, CustomNodesInstaller.instance, 'install');
498
+ }
499
+ });
500
+
501
+ data5.appendChild(installBtn);
502
+
503
+ dataRow.style.backgroundColor = "var(--bg-color)";
504
+ dataRow.style.color = "var(--fg-color)";
505
+ dataRow.style.textAlign = "left";
506
+
507
+ dataRow.appendChild(data1);
508
+ dataRow.appendChild(data2);
509
+ dataRow.appendChild(data3);
510
+ dataRow.appendChild(data4);
511
+ dataRow.appendChild(data5);
512
+ grid.appendChild(dataRow);
513
+
514
+ this.grid_rows[i] = {data:data, control:dataRow};
515
+ }
516
+
517
+ const panel = document.createElement('div');
518
+ panel.style.height = "400px";
519
+ panel.style.width = "1000px";
520
+ panel.style.overflowY = "scroll";
521
+
522
+ panel.appendChild(grid);
523
+ this.element.appendChild(panel);
524
+ }
525
+
526
+ createFilterCombo() {
527
+ let combo = document.createElement("select");
528
+
529
+ combo.style.cssFloat = "left";
530
+ combo.style.fontSize = "14px";
531
+ combo.style.padding = "4px";
532
+ combo.style.background = "black";
533
+ combo.style.marginLeft = "2px";
534
+ combo.style.width = "199px";
535
+ combo.id = `combo-manger-filter`;
536
+ combo.style.borderRadius = "15px";
537
+
538
+ let items =
539
+ [
540
+ { value:'*', text:'Filter: all' },
541
+ { value:'Disabled', text:'Filter: disabled' },
542
+ { value:'Update', text:'Filter: update' },
543
+ { value:'True', text:'Filter: installed' },
544
+ { value:'False', text:'Filter: not-installed' },
545
+ ];
546
+
547
+ items.forEach(item => {
548
+ const option = document.createElement("option");
549
+ option.value = item.value;
550
+ option.text = item.text;
551
+ combo.appendChild(option);
552
+ });
553
+
554
+ let self = this;
555
+ combo.addEventListener('change', function(event) {
556
+ self.filter = event.target.value;
557
+ self.apply_searchbox();
558
+ });
559
+
560
+ return combo;
561
+ }
562
+
563
+ createHeaderControls() {
564
+ let self = this;
565
+ this.search_box = $el('input', {type:'text', id:'manager-customnode-search-box', placeholder:'input search keyword', value:this.search_keyword}, []);
566
+ this.search_box.style.height = "25px";
567
+ this.search_box.onkeydown = (event) => {
568
+ if (event.key === 'Enter') {
569
+ self.search_keyword = self.search_box.value;
570
+ self.apply_searchbox();
571
+ }
572
+ if (event.key === 'Escape') {
573
+ self.search_keyword = self.search_box.value;
574
+ self.apply_searchbox();
575
+ }
576
+ };
577
+
578
+
579
+ let search_button = document.createElement("button");
580
+ search_button.innerHTML = "Search";
581
+ search_button.onclick = () => {
582
+ self.search_keyword = self.search_box.value;
583
+ self.apply_searchbox();
584
+ };
585
+ search_button.style.display = "inline-block";
586
+
587
+ let filter_control = this.createFilterCombo();
588
+ filter_control.style.display = "inline-block";
589
+
590
+ let cell = $el('td', {width:'100%'}, [filter_control, this.search_box, ' ', search_button]);
591
+ let search_control = $el('table', {width:'100%'},
592
+ [
593
+ $el('tr', {}, [cell])
594
+ ]
595
+ );
596
+
597
+ cell.style.textAlign = "right";
598
+
599
+ this.element.appendChild(search_control);
600
+ }
601
+
602
+ async createBottomControls() {
603
+ let close_button = document.createElement("button");
604
+ close_button.innerHTML = "Close";
605
+ close_button.onclick = () => { this.close(); }
606
+ close_button.style.display = "inline-block";
607
+
608
+ this.message_box = $el('div', {id:'custom-installer-message'}, [$el('br'), '']);
609
+ this.message_box.style.height = '60px';
610
+ this.message_box.style.verticalAlign = 'middle';
611
+
612
+ this.element.appendChild(this.message_box);
613
+ this.element.appendChild(close_button);
614
+ }
615
+
616
+ async show(is_missing_node_mode) {
617
+ this.is_missing_node_mode = is_missing_node_mode;
618
+ try {
619
+ this.invalidateControl();
620
+
621
+ this.element.style.display = "block";
622
+ }
623
+ catch(exception) {
624
+ app.ui.dialog.show(`Failed to get custom node list. / ${exception}`);
625
+ }
626
+ }
627
+ }
628
+
629
+ // -----
630
+ class AlternativesInstaller extends ComfyDialog {
631
+ static instance = null;
632
+
633
+ install_buttons = [];
634
+ message_box = null;
635
+ data = null;
636
+
637
+ clear() {
638
+ this.install_buttons = [];
639
+ this.message_box = null;
640
+ this.data = null;
641
+ }
642
+
643
+ constructor() {
644
+ super();
645
+ this.search_keyword = '';
646
+ this.element = $el("div.comfy-modal", { parent: document.body }, []);
647
+ }
648
+
649
+ startInstall(target) {
650
+ const self = AlternativesInstaller.instance;
651
+
652
+ self.updateMessage(`<BR><font color="green">Installing '${target.title}'</font>`);
653
+
654
+ for(let i in self.install_buttons) {
655
+ self.install_buttons[i].disabled = true;
656
+ self.install_buttons[i].style.backgroundColor = 'gray';
657
+ }
658
+ }
659
+
660
+ apply_searchbox(data) {
661
+ let keyword = this.search_box.value.toLowerCase();
662
+ for(let i in this.grid_rows) {
663
+ let data1 = this.grid_rows[i].data;
664
+ let data2 = data1.custom_node;
665
+ let content = data1.tags.toLowerCase() + data1.description.toLowerCase() + data2.author.toLowerCase() + data2.description.toLowerCase() + data2.title.toLowerCase();
666
+
667
+ if(this.filter && this.filter != '*') {
668
+ if(this.filter != data2.installed) {
669
+ this.grid_rows[i].control.style.display = 'none';
670
+ continue;
671
+ }
672
+ }
673
+
674
+ if(keyword == "")
675
+ this.grid_rows[i].control.style.display = null;
676
+ else if(content.includes(keyword)) {
677
+ this.grid_rows[i].control.style.display = null;
678
+ }
679
+ else {
680
+ this.grid_rows[i].control.style.display = 'none';
681
+ }
682
+ }
683
+ }
684
+
685
+ async invalidateControl() {
686
+ this.clear();
687
+
688
+ // splash
689
+ while (this.element.children.length) {
690
+ this.element.removeChild(this.element.children[0]);
691
+ }
692
+
693
+ const msg = $el('div', {id:'custom-message'},
694
+ [$el('br'),
695
+ 'The custom node DB is currently being updated, and updates to custom nodes are being checked for.',
696
+ $el('br'),
697
+ 'NOTE: Update only checks for extensions that have been fetched.',
698
+ $el('br')]);
699
+ msg.style.height = '100px';
700
+ msg.style.verticalAlign = 'middle';
701
+ this.element.appendChild(msg);
702
+
703
+ // invalidate
704
+ this.data = (await getAlterList()).items;
705
+
706
+ this.element.removeChild(msg);
707
+
708
+ while (this.element.children.length) {
709
+ this.element.removeChild(this.element.children[0]);
710
+ }
711
+
712
+ this.createHeaderControls();
713
+ await this.createGrid();
714
+ this.apply_searchbox(this.data);
715
+ this.createBottomControls();
716
+ }
717
+
718
+ updateMessage(msg) {
719
+ this.message_box.innerHTML = msg;
720
+ }
721
+
722
+ async createGrid() {
723
+ var grid = document.createElement('table');
724
+ grid.setAttribute('id', 'alternatives-grid');
725
+
726
+ grid.style.position = "relative";
727
+ grid.style.display = "inline-block";
728
+ grid.style.width = "100%"
729
+
730
+ var headerRow = document.createElement('tr');
731
+ var header1 = document.createElement('th');
732
+ header1.innerHTML = '&nbsp;&nbsp;ID&nbsp;&nbsp;';
733
+ header1.style.width = "20px";
734
+ var header2 = document.createElement('th');
735
+ header2.innerHTML = 'Tags';
736
+ header2.style.width = "200px";
737
+ var header3 = document.createElement('th');
738
+ header3.innerHTML = 'Author';
739
+ header3.style.width = "150px";
740
+ var header4 = document.createElement('th');
741
+ header4.innerHTML = 'Title';
742
+ header4.style.width = "200px";
743
+ var header5 = document.createElement('th');
744
+ header5.innerHTML = 'Description';
745
+ header5.style.width = "500px";
746
+ var header6 = document.createElement('th');
747
+ header6.innerHTML = 'Install';
748
+ header6.style.width = "130px";
749
+ headerRow.appendChild(header1);
750
+ headerRow.appendChild(header2);
751
+ headerRow.appendChild(header3);
752
+ headerRow.appendChild(header4);
753
+ headerRow.appendChild(header5);
754
+ headerRow.appendChild(header6);
755
+
756
+ headerRow.style.backgroundColor = "Black";
757
+ headerRow.style.color = "White";
758
+ headerRow.style.textAlign = "center";
759
+ headerRow.style.width = "100%";
760
+ headerRow.style.padding = "0";
761
+ grid.appendChild(headerRow);
762
+
763
+ this.grid_rows = {};
764
+
765
+ if(this.data)
766
+ for (var i = 0; i < this.data.length; i++) {
767
+ const data = this.data[i];
768
+ var dataRow = document.createElement('tr');
769
+ var data1 = document.createElement('td');
770
+ data1.style.textAlign = "center";
771
+ data1.innerHTML = i+1;
772
+ var data2 = document.createElement('td');
773
+ data2.innerHTML = `&nbsp;${data.tags}`;
774
+ var data3 = document.createElement('td');
775
+ var data4 = document.createElement('td');
776
+ if(data.custom_node) {
777
+ data3.innerHTML = `&nbsp;${data.custom_node.author}`;
778
+ data4.innerHTML = `&nbsp;<a href=${data.custom_node.reference} target="_blank"><font color="skyblue"><b>${data.custom_node.title}</b></font></a>`;
779
+ }
780
+ else {
781
+ data3.innerHTML = `&nbsp;Unknown`;
782
+ data4.innerHTML = `&nbsp;Unknown`;
783
+ }
784
+ var data5 = document.createElement('td');
785
+ data5.innerHTML = data.description;
786
+ var data6 = document.createElement('td');
787
+ data6.style.textAlign = "center";
788
+
789
+ if(data.custom_node) {
790
+ var installBtn = document.createElement('button');
791
+ var installBtn2 = null;
792
+ var installBtn3 = null;
793
+
794
+ this.install_buttons.push(installBtn);
795
+
796
+ switch(data.custom_node.installed) {
797
+ case 'Disabled':
798
+ installBtn3 = document.createElement('button');
799
+ installBtn3.innerHTML = 'Enable';
800
+ installBtn3.style.backgroundColor = 'blue';
801
+ installBtn3.style.color = 'white';
802
+ this.install_buttons.push(installBtn3);
803
+
804
+ installBtn.innerHTML = 'Uninstall';
805
+ installBtn.style.backgroundColor = 'red';
806
+ installBtn.style.color = 'white';
807
+ break;
808
+ case 'Update':
809
+ installBtn2 = document.createElement('button');
810
+ installBtn2.innerHTML = 'Update';
811
+ installBtn2.style.backgroundColor = 'blue';
812
+ installBtn2.style.color = 'white';
813
+ this.install_buttons.push(installBtn2);
814
+
815
+ installBtn3 = document.createElement('button');
816
+ installBtn3.innerHTML = 'Disable';
817
+ installBtn3.style.backgroundColor = 'MediumSlateBlue';
818
+ installBtn3.style.color = 'white';
819
+ this.install_buttons.push(installBtn3);
820
+
821
+ installBtn.innerHTML = 'Uninstall';
822
+ installBtn.style.backgroundColor = 'red';
823
+ installBtn.style.color = 'white';
824
+ break;
825
+ case 'True':
826
+ installBtn3 = document.createElement('button');
827
+ installBtn3.innerHTML = 'Disable';
828
+ installBtn3.style.backgroundColor = 'MediumSlateBlue';
829
+ installBtn3.style.color = 'white';
830
+ this.install_buttons.push(installBtn3);
831
+
832
+ installBtn.innerHTML = 'Uninstall';
833
+ installBtn.style.backgroundColor = 'red';
834
+ installBtn.style.color = 'white';
835
+ break;
836
+ case 'False':
837
+ installBtn.innerHTML = 'Install';
838
+ installBtn.style.backgroundColor = 'black';
839
+ installBtn.style.color = 'white';
840
+ break;
841
+ default:
842
+ installBtn.innerHTML = 'Try Install';
843
+ installBtn.style.backgroundColor = 'Gray';
844
+ installBtn.style.color = 'white';
845
+ }
846
+
847
+ if(installBtn2 != null) {
848
+ installBtn2.style.width = "120px";
849
+ installBtn2.addEventListener('click', function() {
850
+ install_custom_node(data.custom_node, AlternativesInstaller.instance, 'update');
851
+ });
852
+
853
+ data6.appendChild(installBtn2);
854
+ }
855
+
856
+ if(installBtn3 != null) {
857
+ installBtn3.style.width = "120px";
858
+ installBtn3.addEventListener('click', function() {
859
+ install_custom_node(data, CustomNodesInstaller.instance, 'toggle_active');
860
+ });
861
+
862
+ data6.appendChild(installBtn3);
863
+ }
864
+
865
+
866
+ installBtn.style.width = "120px";
867
+ installBtn.addEventListener('click', function() {
868
+ if(this.innerHTML == 'Uninstall') {
869
+ if (confirm(`Are you sure uninstall ${data.title}?`)) {
870
+ install_custom_node(data.custom_node, AlternativesInstaller.instance, 'uninstall');
871
+ }
872
+ }
873
+ else {
874
+ install_custom_node(data.custom_node, AlternativesInstaller.instance, 'install');
875
+ }
876
+ });
877
+
878
+ data6.appendChild(installBtn);
879
+ }
880
+
881
+ dataRow.style.backgroundColor = "var(--bg-color)";
882
+ dataRow.style.color = "var(--fg-color)";
883
+ dataRow.style.textAlign = "left";
884
+
885
+ dataRow.appendChild(data1);
886
+ dataRow.appendChild(data2);
887
+ dataRow.appendChild(data3);
888
+ dataRow.appendChild(data4);
889
+ dataRow.appendChild(data5);
890
+ dataRow.appendChild(data6);
891
+ grid.appendChild(dataRow);
892
+
893
+ this.grid_rows[i] = {data:data, control:dataRow};
894
+ }
895
+
896
+ const panel = document.createElement('div');
897
+ panel.style.height = "400px";
898
+ panel.style.width = "1000px";
899
+ panel.style.overflowY = "scroll";
900
+
901
+ panel.appendChild(grid);
902
+ this.element.appendChild(panel);
903
+ }
904
+
905
+ createFilterCombo() {
906
+ let combo = document.createElement("select");
907
+
908
+ combo.style.cssFloat = "left";
909
+ combo.style.fontSize = "14px";
910
+ combo.style.padding = "4px";
911
+ combo.style.background = "black";
912
+ combo.style.marginLeft = "2px";
913
+ combo.style.width = "199px";
914
+ combo.id = `combo-manger-filter`;
915
+ combo.style.borderRadius = "15px";
916
+
917
+ let items =
918
+ [
919
+ { value:'*', text:'Filter: all' },
920
+ { value:'Disabled', text:'Filter: disabled' },
921
+ { value:'Update', text:'Filter: update' },
922
+ { value:'True', text:'Filter: installed' },
923
+ { value:'False', text:'Filter: not-installed' },
924
+ ];
925
+
926
+ items.forEach(item => {
927
+ const option = document.createElement("option");
928
+ option.value = item.value;
929
+ option.text = item.text;
930
+ combo.appendChild(option);
931
+ });
932
+
933
+ let self = this;
934
+ combo.addEventListener('change', function(event) {
935
+ self.filter = event.target.value;
936
+ self.apply_searchbox();
937
+ });
938
+
939
+ return combo;
940
+ }
941
+
942
+ createHeaderControls() {
943
+ let self = this;
944
+ this.search_box = $el('input', {type:'text', id:'manager-alternode-search-box', placeholder:'input search keyword', value:this.search_keyword}, []);
945
+ this.search_box.style.height = "25px";
946
+ this.search_box.onkeydown = (event) => {
947
+ if (event.key === 'Enter') {
948
+ self.search_keyword = self.search_box.value;
949
+ self.apply_searchbox();
950
+ }
951
+ if (event.key === 'Escape') {
952
+ self.search_keyword = self.search_box.value;
953
+ self.apply_searchbox();
954
+ }
955
+ };
956
+
957
+ let search_button = document.createElement("button");
958
+ search_button.innerHTML = "Search";
959
+ search_button.onclick = () => {
960
+ self.search_keyword = self.search_box.value;
961
+ self.apply_searchbox();
962
+ };
963
+ search_button.style.display = "inline-block";
964
+
965
+ let filter_control = this.createFilterCombo();
966
+ filter_control.style.display = "inline-block";
967
+
968
+ let cell = $el('td', {width:'100%'}, [filter_control, this.search_box, ' ', search_button]);
969
+ let search_control = $el('table', {width:'100%'},
970
+ [
971
+ $el('tr', {}, [cell])
972
+ ]
973
+ );
974
+
975
+ cell.style.textAlign = "right";
976
+ this.element.appendChild(search_control);
977
+ }
978
+
979
+ async createBottomControls() {
980
+ var close_button = document.createElement("button");
981
+ close_button.innerHTML = "Close";
982
+ close_button.onclick = () => { this.close(); }
983
+ close_button.style.display = "inline-block";
984
+
985
+ this.message_box = $el('div', {id:'alternatives-installer-message'}, [$el('br'), '']);
986
+ this.message_box.style.height = '60px';
987
+ this.message_box.style.verticalAlign = 'middle';
988
+
989
+ this.element.appendChild(this.message_box);
990
+ this.element.appendChild(close_button);
991
+ }
992
+
993
+ async show() {
994
+ try {
995
+ this.invalidateControl();
996
+ this.element.style.display = "block";
997
+ }
998
+ catch(exception) {
999
+ app.ui.dialog.show(`Failed to get alternatives list. / ${exception}`);
1000
+ console.error(exception);
1001
+ }
1002
+ }
1003
+ }
1004
+
1005
+
1006
+ // -----------
1007
+ class ModelInstaller extends ComfyDialog {
1008
+ static instance = null;
1009
+
1010
+ install_buttons = [];
1011
+ message_box = null;
1012
+ data = null;
1013
+
1014
+ clear() {
1015
+ this.install_buttons = [];
1016
+ this.message_box = null;
1017
+ this.data = null;
1018
+ }
1019
+
1020
+ constructor() {
1021
+ super();
1022
+ this.search_keyword = '';
1023
+ this.element = $el("div.comfy-modal", { parent: document.body }, []);
1024
+ }
1025
+
1026
+ createControls() {
1027
+ return [
1028
+ $el("button", {
1029
+ type: "button",
1030
+ textContent: "Close",
1031
+ onclick: () => { this.close(); }
1032
+ })
1033
+ ];
1034
+ }
1035
+
1036
+ startInstall(target) {
1037
+ const self = ModelInstaller.instance;
1038
+
1039
+ self.updateMessage(`<BR><font color="green">Installing '${target.name}'</font>`);
1040
+
1041
+ for(let i in self.install_buttons) {
1042
+ self.install_buttons[i].disabled = true;
1043
+ self.install_buttons[i].style.backgroundColor = 'gray';
1044
+ }
1045
+ }
1046
+
1047
+ apply_searchbox(data) {
1048
+ let keyword = this.search_box.value.toLowerCase();
1049
+ for(let i in this.grid_rows) {
1050
+ let data = this.grid_rows[i].data;
1051
+ let content = data.name.toLowerCase() + data.type.toLowerCase() + data.base.toLowerCase() + data.description.toLowerCase();
1052
+
1053
+ if(this.filter && this.filter != '*') {
1054
+ if(this.filter != data.installed) {
1055
+ this.grid_rows[i].control.style.display = 'none';
1056
+ continue;
1057
+ }
1058
+ }
1059
+
1060
+ if(keyword == "")
1061
+ this.grid_rows[i].control.style.display = null;
1062
+ else if(content.includes(keyword)) {
1063
+ this.grid_rows[i].control.style.display = null;
1064
+ }
1065
+ else {
1066
+ this.grid_rows[i].control.style.display = 'none';
1067
+ }
1068
+ }
1069
+ }
1070
+
1071
+ async invalidateControl() {
1072
+ this.clear();
1073
+ this.data = (await getModelList()).models;
1074
+
1075
+ while (this.element.children.length) {
1076
+ this.element.removeChild(this.element.children[0]);
1077
+ }
1078
+
1079
+ await this.createHeaderControls();
1080
+
1081
+ if(this.search_keyword) {
1082
+ this.search_box.value = this.search_keyword;
1083
+ }
1084
+
1085
+ await this.createGrid();
1086
+ await this.createBottomControls();
1087
+
1088
+ this.apply_searchbox(this.data);
1089
+ }
1090
+
1091
+ updateMessage(msg) {
1092
+ this.message_box.innerHTML = msg;
1093
+ }
1094
+
1095
+ async createGrid(models_json) {
1096
+ var grid = document.createElement('table');
1097
+ grid.setAttribute('id', 'external-models-grid');
1098
+
1099
+ grid.style.position = "relative";
1100
+ grid.style.display = "inline-block";
1101
+ grid.style.width = "100%"
1102
+
1103
+ var headerRow = document.createElement('tr');
1104
+ var header1 = document.createElement('th');
1105
+ header1.innerHTML = '&nbsp;&nbsp;ID&nbsp;&nbsp;';
1106
+ header1.style.width = "20px";
1107
+ var header2 = document.createElement('th');
1108
+ header2.innerHTML = 'Type';
1109
+ header2.style.width = "100px";
1110
+ var header3 = document.createElement('th');
1111
+ header3.innerHTML = 'Base';
1112
+ header3.style.width = "50px";
1113
+ var header4 = document.createElement('th');
1114
+ header4.innerHTML = 'Name';
1115
+ header4.style.width = "200px";
1116
+ var header5 = document.createElement('th');
1117
+ header5.innerHTML = 'Filename';
1118
+ header5.style.width = "250px";
1119
+ header5.style.tableLayout = "fixed";
1120
+ var header6 = document.createElement('th');
1121
+ header6.innerHTML = 'description';
1122
+ header6.style.width = "380px";
1123
+ var header_down = document.createElement('th');
1124
+ header_down.innerHTML = 'Download';
1125
+ header_down.style.width = "50px";
1126
+
1127
+ headerRow.appendChild(header1);
1128
+ headerRow.appendChild(header2);
1129
+ headerRow.appendChild(header3);
1130
+ headerRow.appendChild(header4);
1131
+ headerRow.appendChild(header5);
1132
+ headerRow.appendChild(header6);
1133
+ headerRow.appendChild(header_down);
1134
+
1135
+ headerRow.style.backgroundColor = "Black";
1136
+ headerRow.style.color = "White";
1137
+ headerRow.style.textAlign = "center";
1138
+ headerRow.style.width = "100%";
1139
+ headerRow.style.padding = "0";
1140
+ grid.appendChild(headerRow);
1141
+
1142
+ this.grid_rows = {};
1143
+
1144
+ if(this.data)
1145
+ for (var i = 0; i < this.data.length; i++) {
1146
+ const data = this.data[i];
1147
+ var dataRow = document.createElement('tr');
1148
+ var data1 = document.createElement('td');
1149
+ data1.style.textAlign = "center";
1150
+ data1.innerHTML = i+1;
1151
+ var data2 = document.createElement('td');
1152
+ data2.innerHTML = `&nbsp;${data.type}`;
1153
+ var data3 = document.createElement('td');
1154
+ data3.innerHTML = `&nbsp;${data.base}`;
1155
+ var data4 = document.createElement('td');
1156
+ data4.innerHTML = `&nbsp;<a href=${data.reference} target="_blank"><font color="skyblue"><b>${data.name}</b></font></a>`;
1157
+ var data5 = document.createElement('td');
1158
+ data5.innerHTML = `&nbsp;${data.filename}`;
1159
+ data5.style.wordBreak = "break-all";
1160
+ var data6 = document.createElement('td');
1161
+ data6.innerHTML = data.description;
1162
+ data6.style.wordBreak = "break-all";
1163
+ var data_install = document.createElement('td');
1164
+ var installBtn = document.createElement('button');
1165
+ data_install.style.textAlign = "center";
1166
+
1167
+ installBtn.innerHTML = 'Install';
1168
+ this.install_buttons.push(installBtn);
1169
+
1170
+ switch(data.installed) {
1171
+ case 'True':
1172
+ installBtn.innerHTML = 'Installed';
1173
+ installBtn.style.backgroundColor = 'green';
1174
+ installBtn.style.color = 'white';
1175
+ installBtn.disabled = true;
1176
+ break;
1177
+ default:
1178
+ installBtn.innerHTML = 'Install';
1179
+ installBtn.style.backgroundColor = 'black';
1180
+ installBtn.style.color = 'white';
1181
+ break;
1182
+ }
1183
+
1184
+ installBtn.style.width = "100px";
1185
+
1186
+ installBtn.addEventListener('click', function() {
1187
+ install_model(data);
1188
+ });
1189
+
1190
+ data_install.appendChild(installBtn);
1191
+
1192
+ dataRow.style.backgroundColor = "var(--bg-color)";
1193
+ dataRow.style.color = "var(--fg-color)";
1194
+ dataRow.style.textAlign = "left";
1195
+
1196
+ dataRow.appendChild(data1);
1197
+ dataRow.appendChild(data2);
1198
+ dataRow.appendChild(data3);
1199
+ dataRow.appendChild(data4);
1200
+ dataRow.appendChild(data5);
1201
+ dataRow.appendChild(data6);
1202
+ dataRow.appendChild(data_install);
1203
+ grid.appendChild(dataRow);
1204
+
1205
+ this.grid_rows[i] = {data:data, control:dataRow};
1206
+ }
1207
+
1208
+ const panel = document.createElement('div');
1209
+ panel.style.height = "400px";
1210
+ panel.style.width = "1050px";
1211
+ panel.style.overflowY = "scroll";
1212
+
1213
+ panel.appendChild(grid);
1214
+ this.element.appendChild(panel);
1215
+ }
1216
+
1217
+ createFilterCombo() {
1218
+ let combo = document.createElement("select");
1219
+
1220
+ combo.style.cssFloat = "left";
1221
+ combo.style.fontSize = "14px";
1222
+ combo.style.padding = "4px";
1223
+ combo.style.background = "black";
1224
+ combo.style.marginLeft = "2px";
1225
+ combo.style.width = "199px";
1226
+ combo.id = `combo-manger-filter`;
1227
+ combo.style.borderRadius = "15px";
1228
+
1229
+ let items =
1230
+ [
1231
+ { value:'*', text:'Filter: all' },
1232
+ { value:'True', text:'Filter: installed' },
1233
+ { value:'False', text:'Filter: not-installed' },
1234
+ ];
1235
+
1236
+ items.forEach(item => {
1237
+ const option = document.createElement("option");
1238
+ option.value = item.value;
1239
+ option.text = item.text;
1240
+ combo.appendChild(option);
1241
+ });
1242
+
1243
+ let self = this;
1244
+ combo.addEventListener('change', function(event) {
1245
+ self.filter = event.target.value;
1246
+ self.apply_searchbox();
1247
+ });
1248
+
1249
+ return combo;
1250
+ }
1251
+
1252
+ createHeaderControls() {
1253
+ let self = this;
1254
+ this.search_box = $el('input', {type:'text', id:'manager-model-search-box', placeholder:'input search keyword', value:this.search_keyword}, []);
1255
+ this.search_box.style.height = "25px";
1256
+ this.search_box.onkeydown = (event) => {
1257
+ if (event.key === 'Enter') {
1258
+ self.search_keyword = self.search_box.value;
1259
+ self.apply_searchbox();
1260
+ }
1261
+ if (event.key === 'Escape') {
1262
+ self.search_keyword = self.search_box.value;
1263
+ self.apply_searchbox();
1264
+ }
1265
+ };
1266
+
1267
+ let search_button = document.createElement("button");
1268
+ search_button.innerHTML = "Search";
1269
+ search_button.onclick = () => {
1270
+ self.search_keyword = self.search_box.value;
1271
+ self.apply_searchbox();
1272
+ };
1273
+ search_button.style.display = "inline-block";
1274
+
1275
+ let filter_control = this.createFilterCombo();
1276
+ filter_control.style.display = "inline-block";
1277
+
1278
+ let cell = $el('td', {width:'100%'}, [filter_control, this.search_box, ' ', search_button]);
1279
+ let search_control = $el('table', {width:'100%'},
1280
+ [
1281
+ $el('tr', {}, [cell])
1282
+ ]
1283
+ );
1284
+
1285
+ cell.style.textAlign = "right";
1286
+ this.element.appendChild(search_control);
1287
+ }
1288
+
1289
+ async createBottomControls() {
1290
+ var close_button = document.createElement("button");
1291
+ close_button.innerHTML = "Close";
1292
+ close_button.onclick = () => { this.close(); }
1293
+ close_button.style.display = "inline-block";
1294
+
1295
+ this.message_box = $el('div', {id:'custom-download-message'}, [$el('br'), '']);
1296
+ this.message_box.style.height = '60px';
1297
+ this.message_box.style.verticalAlign = 'middle';
1298
+
1299
+ this.element.appendChild(this.message_box);
1300
+ this.element.appendChild(close_button);
1301
+ }
1302
+
1303
+ async show() {
1304
+ try {
1305
+ this.invalidateControl();
1306
+ this.element.style.display = "block";
1307
+ }
1308
+ catch(exception) {
1309
+ app.ui.dialog.show(`Failed to get external model list. / ${exception}`);
1310
+ }
1311
+ }
1312
+ }
1313
+
1314
+
1315
+ // -----------
1316
+ class ManagerMenuDialog extends ComfyDialog {
1317
+ static instance = null;
1318
+ local_mode_checkbox = null;
1319
+
1320
+ createButtons() {
1321
+ this.local_mode_checkbox = $el("input",{type:'checkbox', id:"use_local_db"},[])
1322
+ const checkbox_text = $el("label",{},[" Use local DB"])
1323
+ checkbox_text.style.color = "var(--fg-color)"
1324
+
1325
+ update_comfyui_button =
1326
+ $el("button", {
1327
+ type: "button",
1328
+ textContent: "Update ComfyUI",
1329
+ onclick:
1330
+ () => updateComfyUI()
1331
+ });
1332
+
1333
+ fetch_updates_button =
1334
+ $el("button", {
1335
+ type: "button",
1336
+ textContent: "Fetch Updates",
1337
+ onclick:
1338
+ () => fetchUpdates()
1339
+ });
1340
+
1341
+ const res =
1342
+ [
1343
+ $el("tr.td", {width:"100%"}, [$el("font", {size:6, color:"white"}, [`ComfyUI Manager Menu`])]),
1344
+ $el("br", {}, []),
1345
+ $el("div", {}, [this.local_mode_checkbox, checkbox_text]),
1346
+ $el("br", {}, []),
1347
+ $el("button", {
1348
+ type: "button",
1349
+ textContent: "Install Custom Nodes",
1350
+ onclick:
1351
+ () => {
1352
+ if(!CustomNodesInstaller.instance)
1353
+ CustomNodesInstaller.instance = new CustomNodesInstaller(app);
1354
+ CustomNodesInstaller.instance.show(false);
1355
+ }
1356
+ }),
1357
+
1358
+ $el("button", {
1359
+ type: "button",
1360
+ textContent: "Install Missing Custom Nodes",
1361
+ onclick:
1362
+ () => {
1363
+ if(!CustomNodesInstaller.instance)
1364
+ CustomNodesInstaller.instance = new CustomNodesInstaller(app);
1365
+ CustomNodesInstaller.instance.show(true);
1366
+ }
1367
+ }),
1368
+
1369
+ $el("button", {
1370
+ type: "button",
1371
+ textContent: "Install Models",
1372
+ onclick:
1373
+ () => {
1374
+ if(!ModelInstaller.instance)
1375
+ ModelInstaller.instance = new ModelInstaller(app);
1376
+ ModelInstaller.instance.show();
1377
+ }
1378
+ }),
1379
+
1380
+ $el("br", {}, []),
1381
+ update_comfyui_button,
1382
+ fetch_updates_button,
1383
+
1384
+ $el("br", {}, []),
1385
+ $el("button", {
1386
+ type: "button",
1387
+ textContent: "Alternatives of A1111",
1388
+ onclick:
1389
+ () => {
1390
+ if(!AlternativesInstaller.instance)
1391
+ AlternativesInstaller.instance = new AlternativesInstaller(app);
1392
+ AlternativesInstaller.instance.show();
1393
+ }
1394
+ }),
1395
+
1396
+ $el("br", {}, []),
1397
+ $el("button", {
1398
+ type: "button",
1399
+ textContent: "Close",
1400
+ onclick: () => this.close(),
1401
+ }),
1402
+ $el("br", {}, []),
1403
+ ];
1404
+
1405
+ res[0].style.backgroundColor = "black";
1406
+ res[0].style.textAlign = "center";
1407
+ res[0].style.height = "45px";
1408
+ return res;
1409
+ }
1410
+
1411
+ constructor() {
1412
+ super();
1413
+ this.element = $el("div.comfy-modal", { parent: document.body },
1414
+ [ $el("div.comfy-modal-content",
1415
+ [...this.createButtons()]),
1416
+ ]);
1417
+ }
1418
+
1419
+ show() {
1420
+ this.element.style.display = "block";
1421
+ }
1422
+ }
1423
+
1424
+ app.registerExtension({
1425
+ name: "Comfy.ManagerMenu",
1426
+
1427
+ async setup() {
1428
+ const menu = document.querySelector(".comfy-menu");
1429
+ const separator = document.createElement("hr");
1430
+
1431
+ separator.style.margin = "20px 0";
1432
+ separator.style.width = "100%";
1433
+ menu.append(separator);
1434
+
1435
+ const managerButton = document.createElement("button");
1436
+ managerButton.textContent = "Manager";
1437
+ managerButton.onclick = () => {
1438
+ if(!ManagerMenuDialog.instance)
1439
+ ManagerMenuDialog.instance = new ManagerMenuDialog();
1440
+ ManagerMenuDialog.instance.show();
1441
+ }
1442
+ menu.append(managerButton);
1443
+ }
1444
+ });
misc/custom-nodes.png ADDED
misc/main.png ADDED
misc/menu.png ADDED
misc/missing-list.png ADDED
misc/missing-menu.png ADDED
misc/models.png ADDED
model-list.json ADDED
@@ -0,0 +1,574 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "models": [
3
+ {
4
+ "name": "TAESDXL Decoder",
5
+ "type": "VAE",
6
+ "base": "TAESD",
7
+ "save_path": "vae_approx",
8
+ "description": "(SDXL Verison) To view the preview in high quality while running samples in ComfyUI, you will need this model.",
9
+ "reference": "https://github.com/madebyollin/taesd",
10
+ "filename": "taesdxl_decoder.pth",
11
+ "url": "https://github.com/madebyollin/taesd/raw/main/taesdxl_decoder.pth"
12
+ },
13
+ {
14
+ "name": "TAESDXL Encoder",
15
+ "type": "VAE",
16
+ "base": "TAESD",
17
+ "save_path": "vae_approx",
18
+ "description": "(SDXL Verison) To view the preview in high quality while running samples in ComfyUI, you will need this model.",
19
+ "reference": "https://github.com/madebyollin/taesd",
20
+ "filename": "taesdxl_encoder.pth",
21
+ "url": "https://github.com/madebyollin/taesd/raw/main/taesdxl_encoder.pth"
22
+ },
23
+ {
24
+ "name": "TAESD Decoder",
25
+ "type": "VAE",
26
+ "base": "TAESD",
27
+ "save_path": "vae_approx",
28
+ "description": "To view the preview in high quality while running samples in ComfyUI, you will need this model.",
29
+ "reference": "https://github.com/madebyollin/taesd",
30
+ "filename": "taesd_decoder.pth",
31
+ "url": "https://github.com/madebyollin/taesd/raw/main/taesd_decoder.pth"
32
+ },
33
+ {
34
+ "name": "TAESD Encoder",
35
+ "type": "VAE",
36
+ "base": "TAESD",
37
+ "save_path": "vae_approx",
38
+ "description": "To view the preview in high quality while running samples in ComfyUI, you will need this model.",
39
+ "reference": "https://github.com/madebyollin/taesd",
40
+ "filename": "taesd_encoder.pth",
41
+ "url": "https://github.com/madebyollin/taesd/raw/main/taesd_encoder.pth"
42
+ },
43
+ {
44
+ "name": "RealESRGAN x2",
45
+ "type": "upscale",
46
+ "base": "upscale",
47
+ "save_path": "default",
48
+ "description": "RealESRGAN x2 upscaler model",
49
+ "reference": "https://huggingface.co/sberbank-ai/Real-ESRGAN",
50
+ "filename": "RealESRGAN_x2.pth",
51
+ "url": "https://huggingface.co/sberbank-ai/Real-ESRGAN/resolve/main/RealESRGAN_x2.pth"
52
+ },
53
+ {
54
+ "name": "RealESRGAN x4",
55
+ "type": "upscale",
56
+ "base": "upscale",
57
+ "save_path": "default",
58
+ "description": "RealESRGAN x4 upscaler model",
59
+ "reference": "https://huggingface.co/sberbank-ai/Real-ESRGAN",
60
+ "filename": "RealESRGAN_x4.pth",
61
+ "url": "https://huggingface.co/sberbank-ai/Real-ESRGAN/resolve/main/RealESRGAN_x4.pth"
62
+ },
63
+ {
64
+ "name": "4x-UltraSharp",
65
+ "type": "upscale",
66
+ "base": "upscale",
67
+ "save_path": "default",
68
+ "description": "4x-UltraSharp upscaler model",
69
+ "reference": "https://upscale.wiki/wiki/Model_Database",
70
+ "filename": "4x-UltraSharp.pth",
71
+ "url": "https://huggingface.co/datasets/Kizi-Art/Upscale/resolve/fa98e357882a23b8e7928957a39462fbfaee1af5/4x-UltraSharp.pth"
72
+ },
73
+ {
74
+ "name": "negative_hand Negative Embedding",
75
+ "type": "embeddings",
76
+ "base": "SD1.5",
77
+ "save_path": "default",
78
+ "description": "If you use this embedding with negatives, you can solve the issue of damaging your hands.",
79
+ "reference": "https://civitai.com/models/56519/negativehand-negative-embedding",
80
+ "filename": "negative_hand-neg.pt",
81
+ "url": "https://civitai.com/api/download/models/60938"
82
+ },
83
+ {
84
+ "name": "bad_prompt Negative Embedding",
85
+ "type": "embeddings",
86
+ "base": "SD1.5",
87
+ "save_path": "default",
88
+ "description": "The idea behind this embedding was to somehow train the negative prompt as an embedding, thus unifying the basis of the negative prompt into one word or embedding.",
89
+ "reference": "https://civitai.com/models/55700/badprompt-negative-embedding",
90
+ "filename": "bad_prompt_version2-neg.pt",
91
+ "url": "https://civitai.com/api/download/models/60095"
92
+ },
93
+ {
94
+ "name": "Deep Negative V1.75",
95
+ "type": "embeddings",
96
+ "base": "SD1.5",
97
+ "save_path": "default",
98
+ "description": "These embedding learn what disgusting compositions and color patterns are, including faulty human anatomy, offensive color schemes, upside-down spatial structures, and more. Placing it in the negative can go a long way to avoiding these things.",
99
+ "reference": "https://civitai.com/models/4629/deep-negative-v1x",
100
+ "filename": "ng_deepnegative_v1_75t.pt",
101
+ "url": "https://civitai.com/api/download/models/5637"
102
+ },
103
+ {
104
+ "name": "EasyNegative",
105
+ "type": "embeddings",
106
+ "base": "SD1.5",
107
+ "save_path": "default",
108
+ "description": "This embedding should be used in your NEGATIVE prompt. Adjust the strength as desired (seems to scale well without any distortions), the strength required may vary based on positive and negative prompts.",
109
+ "reference": "https://civitai.com/models/7808/easynegative",
110
+ "filename": "easynegative.safetensors",
111
+ "url": "https://civitai.com/api/download/models/9208"
112
+ },
113
+ {
114
+ "name": "v1-5-pruned-emaonly.ckpt",
115
+ "type": "checkpoints",
116
+ "base": "SD1.5",
117
+ "save_path": "default",
118
+ "description": "Stable Diffusion 1.5 base model",
119
+ "reference": "https://huggingface.co/runwayml/stable-diffusion-v1-5",
120
+ "filename": "v1-5-pruned-emaonly.ckpt",
121
+ "url": "https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.ckpt"
122
+ },
123
+ {
124
+ "name": "v2-1_512-ema-pruned.safetensors",
125
+ "type": "checkpoints",
126
+ "base": "SD2",
127
+ "save_path": "default",
128
+ "description": "Stable Diffusion 2 base model (512)",
129
+ "reference": "https://huggingface.co/stabilityai/stable-diffusion-2-1-base",
130
+ "filename": "v2-1_512-ema-pruned.safetensors",
131
+ "url": "https://huggingface.co/stabilityai/stable-diffusion-2-1-base/resolve/main/v2-1_512-ema-pruned.safetensors"
132
+ },
133
+ {
134
+ "name": "v2-1_768-ema-pruned.safetensors",
135
+ "type": "checkpoints",
136
+ "base": "SD2",
137
+ "save_path": "default",
138
+ "description": "Stable Diffusion 2 base model (768)",
139
+ "reference": "https://huggingface.co/stabilityai/stable-diffusion-2-1",
140
+ "filename": "v2-1_768-ema-pruned.safetensors",
141
+ "url": "https://huggingface.co/stabilityai/stable-diffusion-2-1/resolve/main/v2-1_768-ema-pruned.safetensors"
142
+ },
143
+ {
144
+ "name": "AbyssOrangeMix2 (hard)",
145
+ "type": "checkpoints",
146
+ "base": "SD1.5",
147
+ "save_path": "default",
148
+ "description": "AbyssOrangeMix2 - hard version (anime style)",
149
+ "reference": "https://huggingface.co/WarriorMama777/OrangeMixs",
150
+ "filename": "AbyssOrangeMix2_hard.safetensors",
151
+ "url": "https://huggingface.co/WarriorMama777/OrangeMixs/resolve/main/Models/AbyssOrangeMix2/AbyssOrangeMix2_hard.safetensors"
152
+ },
153
+ {
154
+ "name": "AbyssOrangeMix3 A1",
155
+ "type": "checkpoints",
156
+ "base": "SD1.5",
157
+ "save_path": "default",
158
+ "description": "AbyssOrangeMix3 - A1 (anime style)",
159
+ "reference": "https://huggingface.co/WarriorMama777/OrangeMixs",
160
+ "filename": "AOM3A1_orangemixs.safetensors",
161
+ "url": "https://huggingface.co/WarriorMama777/OrangeMixs/resolve/main/Models/AbyssOrangeMix3/AOM3A1_orangemixs.safetensors"
162
+ },
163
+ {
164
+ "name": "AbyssOrangeMix3 A3",
165
+ "type": "checkpoints",
166
+ "base": "SD1.5",
167
+ "save_path": "default",
168
+ "description": "AbyssOrangeMix - A3 (anime style)",
169
+ "reference": "https://huggingface.co/WarriorMama777/OrangeMixs",
170
+ "filename": "AOM3A3_orangemixs.safetensors",
171
+ "url": "https://huggingface.co/WarriorMama777/OrangeMixs/resolve/main/Models/AbyssOrangeMix3/AOM3A3_orangemixs.safetensors"
172
+ },
173
+ {
174
+ "name": "Anything v3 (fp16; pruned)",
175
+ "type": "checkpoints",
176
+ "base": "SD1.5",
177
+ "save_path": "default",
178
+ "description": "Anything v3 (anime style)",
179
+ "reference": "https://huggingface.co/Linaqruf/anything-v3.0",
180
+ "filename": "anything-v3-fp16-pruned.safetensors",
181
+ "url": "https://huggingface.co/Linaqruf/anything-v3.0/resolve/main/anything-v3-fp16-pruned.safetensors"
182
+ },
183
+ {
184
+ "name": "Waifu Diffusion 1.5 (fp16)",
185
+ "type": "checkpoints",
186
+ "base": "SD2.1",
187
+ "save_path": "default",
188
+ "description": "Waifu Diffusion 1.5",
189
+ "reference": "ttps://huggingface.co/waifu-diffusion/wd-1-5-beta2",
190
+ "filename": "wd-1-5-beta2-fp16.safetensors",
191
+ "url": "https://huggingface.co/waifu-diffusion/wd-1-5-beta2/resolve/main/checkpoints/wd-1-5-beta2-fp16.safetensors"
192
+ },
193
+ {
194
+ "name": "illuminatiDiffusionV1_v11 unCLIP model",
195
+ "type": "unclip",
196
+ "base": "SD2.1",
197
+ "save_path": "default",
198
+ "description": "Mix model (SD2.1 unCLIP + illuminatiDiffusionV1_v11)",
199
+ "reference": "https://huggingface.co/comfyanonymous/illuminatiDiffusionV1_v11_unCLIP",
200
+ "filename": "illuminatiDiffusionV1_v11-unclip-h-fp16.safetensors",
201
+ "url": "https://huggingface.co/comfyanonymous/illuminatiDiffusionV1_v11_unCLIP/resolve/main/illuminatiDiffusionV1_v11-unclip-h-fp16.safetensors"
202
+ },
203
+ {
204
+ "name": "Waifu Diffusion 1.5 unCLIP model",
205
+ "type": "unclip",
206
+ "base": "SD2.1",
207
+ "save_path": "default",
208
+ "description": "Mix model (SD2.1 unCLIP + Waifu Diffusion 1.5)",
209
+ "reference": "https://huggingface.co/comfyanonymous/wd-1.5-beta2_unCLIP",
210
+ "filename": "wd-1-5-beta2-aesthetic-unclip-h-fp16.safetensors",
211
+ "url": "https://huggingface.co/comfyanonymous/wd-1.5-beta2_unCLIP/resolve/main/wd-1-5-beta2-aesthetic-unclip-h-fp16.safetensors"
212
+ },
213
+ {
214
+ "name": "vae-ft-mse-840000-ema-pruned",
215
+ "type": "VAE",
216
+ "base": "VAE",
217
+ "save_path": "default",
218
+ "description": "vae-ft-mse-840000-ema-pruned",
219
+ "reference": "https://huggingface.co/stabilityai/sd-vae-ft-mse-original",
220
+ "filename": "vae-ft-mse-840000-ema-pruned.safetensors",
221
+ "url": "https://huggingface.co/stabilityai/sd-vae-ft-mse-original/resolve/main/vae-ft-mse-840000-ema-pruned.safetensors"
222
+ },
223
+ {
224
+ "name": "orangemix.vae",
225
+ "type": "VAE",
226
+ "base": "VAE",
227
+ "save_path": "default",
228
+ "description": "orangemix vae model",
229
+ "reference": "https://huggingface.co/WarriorMama777/OrangeMixs",
230
+ "filename": "orangemix.vae.pt",
231
+ "url": "https://huggingface.co/WarriorMama777/OrangeMixs/resolve/main/VAEs/orangemix.vae.pt"
232
+ },
233
+ {
234
+ "name": "kl-f8-anime2",
235
+ "type": "VAE",
236
+ "base": "VAE",
237
+ "save_path": "default",
238
+ "description": "kl-f8-anime2 vae model",
239
+ "reference": "https://huggingface.co/hakurei/waifu-diffusion-v1-4",
240
+ "filename": "kl-f8-anime2.ckpt",
241
+ "url": "https://huggingface.co/hakurei/waifu-diffusion-v1-4/resolve/main/vae/kl-f8-anime2.ckpt"
242
+ },
243
+ {
244
+ "name": "Theovercomer8's Contrast Fix (SD2.1)",
245
+ "type": "lora",
246
+ "base": "SD2.1",
247
+ "save_path": "default",
248
+ "description": "LORA: Theovercomer8's Contrast Fix (SD2.1)",
249
+ "reference": "https://civitai.com/models/8765/theovercomer8s-contrast-fix-sd15sd21-768",
250
+ "filename": "theovercomer8sContrastFix_sd21768.safetensors",
251
+ "url": "https://civitai.com/api/download/models/10350"
252
+ },
253
+ {
254
+ "name": "Theovercomer8's Contrast Fix (SD1.5)",
255
+ "type": "lora",
256
+ "base": "SD1.5",
257
+ "save_path": "default",
258
+ "description": "LORA: Theovercomer8's Contrast Fix (SD1.5)",
259
+ "reference": "https://civitai.com/models/8765/theovercomer8s-contrast-fix-sd15sd21-768",
260
+ "filename": "theovercomer8sContrastFix_sd15.safetensors",
261
+ "url": "https://civitai.com/api/download/models/10638"
262
+ },
263
+ {
264
+ "name": "T2I-Adapter (depth)",
265
+ "type": "T2I-Adapter",
266
+ "base": "SD1.5",
267
+ "save_path": "default",
268
+ "description": "ControlNet T2I-Adapter for depth",
269
+ "reference": "https://huggingface.co/TencentARC/T2I-Adapter",
270
+ "filename": "t2iadapter_depth_sd14v1.pth",
271
+ "url": "https://huggingface.co/TencentARC/T2I-Adapter/resolve/main/models/t2iadapter_depth_sd14v1.pth"
272
+ },
273
+ {
274
+ "name": "T2I-Adapter (seg)",
275
+ "type": "T2I-Adapter",
276
+ "base": "SD1.5",
277
+ "save_path": "default",
278
+ "description": "ControlNet T2I-Adapter for seg",
279
+ "reference": "https://huggingface.co/TencentARC/T2I-Adapter",
280
+ "filename": "t2iadapter_seg_sd14v1.pth",
281
+ "url": "https://huggingface.co/TencentARC/T2I-Adapter/resolve/main/models/t2iadapter_seg_sd14v1.pth"
282
+ },
283
+ {
284
+ "name": "T2I-Adapter (sketch)",
285
+ "type": "T2I-Adapter",
286
+ "base": "SD1.5",
287
+ "save_path": "default",
288
+ "description": "ControlNet T2I-Adapter for sketch",
289
+ "reference": "https://huggingface.co/TencentARC/T2I-Adapter",
290
+ "filename": "t2iadapter_sketch_sd14v1.pth",
291
+ "url": "https://huggingface.co/TencentARC/T2I-Adapter/resolve/main/models/t2iadapter_sketch_sd14v1.pth"
292
+ },
293
+ {
294
+ "name": "T2I-Adapter (keypose)",
295
+ "type": "T2I-Adapter",
296
+ "base": "SD1.5",
297
+ "save_path": "default",
298
+ "description": "ControlNet T2I-Adapter for keypose",
299
+ "reference": "https://huggingface.co/TencentARC/T2I-Adapter",
300
+ "filename": "t2iadapter_keypose_sd14v1.pth",
301
+ "url": "https://huggingface.co/TencentARC/T2I-Adapter/resolve/main/models/t2iadapter_keypose_sd14v1.pth"
302
+ },
303
+ {
304
+ "name": "T2I-Adapter (openpose)",
305
+ "type": "T2I-Adapter",
306
+ "base": "SD1.5",
307
+ "save_path": "default",
308
+ "description": "ControlNet T2I-Adapter for openpose",
309
+ "reference": "https://huggingface.co/TencentARC/T2I-Adapter",
310
+ "filename": "t2iadapter_openpose_sd14v1.pth",
311
+ "url": "https://huggingface.co/TencentARC/T2I-Adapter/resolve/main/models/t2iadapter_openpose_sd14v1.pth"
312
+ },
313
+ {
314
+ "name": "T2I-Adapter (color)",
315
+ "type": "T2I-Adapter",
316
+ "base": "SD1.5",
317
+ "save_path": "default",
318
+ "description": "ControlNet T2I-Adapter for color",
319
+ "reference": "https://huggingface.co/TencentARC/T2I-Adapter",
320
+ "filename": "t2iadapter_color_sd14v1.pth",
321
+ "url": "https://huggingface.co/TencentARC/T2I-Adapter/resolve/main/models/t2iadapter_color_sd14v1.pth"
322
+ },
323
+ {
324
+ "name": "T2I-Adapter (canny)",
325
+ "type": "T2I-Adapter",
326
+ "base": "SD1.5",
327
+ "save_path": "default",
328
+ "description": "ControlNet T2I-Adapter for canny",
329
+ "reference": "https://huggingface.co/TencentARC/T2I-Adapter",
330
+ "filename": "t2iadapter_canny_sd14v1.pth",
331
+ "url": "https://huggingface.co/TencentARC/T2I-Adapter/resolve/main/models/t2iadapter_canny_sd14v1.pth"
332
+ },
333
+ {
334
+ "name": "T2I-Style model",
335
+ "type": "T2I-Style",
336
+ "base": "SD1.5",
337
+ "save_path": "default",
338
+ "description": "ControlNet T2I-Adapter style model. Need to download CLIPVision model.",
339
+ "reference": "https://huggingface.co/TencentARC/T2I-Adapter",
340
+ "filename": "t2iadapter_style_sd14v1.pth",
341
+ "url": "https://huggingface.co/TencentARC/T2I-Adapter/resolve/main/models/t2iadapter_style_sd14v1.pth"
342
+ },
343
+ {
344
+ "name": "CLIPVision model",
345
+ "type": "clip_vision",
346
+ "base": "SD1.5",
347
+ "save_path": "default",
348
+ "description": "CLIPVision model (needed for styles model)",
349
+ "reference": "https://huggingface.co/openai/clip-vit-large-patch14",
350
+ "filename": "pytorch_model.bin",
351
+ "url": "https://huggingface.co/openai/clip-vit-large-patch14/resolve/main/pytorch_model.bin"
352
+ },
353
+ {
354
+ "name": "ControlNet-v1-1 (ip2p; fp16)",
355
+ "type": "controlnet",
356
+ "base": "SD1.5",
357
+ "save_path": "default",
358
+ "description": "Safetensors/FP16 versions of the new ControlNet-v1-1 checkpoints (ip2p)",
359
+ "reference": "https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors",
360
+ "filename": "control_v11e_sd15_ip2p_fp16.safetensors",
361
+ "url": "https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11e_sd15_ip2p_fp16.safetensors"
362
+ },
363
+ {
364
+ "name": "ControlNet-v1-1 (shuffle; fp16)",
365
+ "type": "controlnet",
366
+ "base": "SD1.5",
367
+ "save_path": "default",
368
+ "description": "Safetensors/FP16 versions of the new ControlNet-v1-1 checkpoints (shuffle)",
369
+ "reference": "https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors",
370
+ "filename": "control_v11e_sd15_shuffle_fp16.safetensors",
371
+ "url": "https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11e_sd15_shuffle_fp16.safetensors"
372
+ },
373
+ {
374
+ "name": "ControlNet-v1-1 (canny; fp16)",
375
+ "type": "controlnet",
376
+ "base": "SD1.5",
377
+ "save_path": "default",
378
+ "description": "Safetensors/FP16 versions of the new ControlNet-v1-1 checkpoints (canny)",
379
+ "reference": "https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors",
380
+ "filename": "control_v11p_sd15_canny_fp16.safetensors",
381
+ "url": "https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11p_sd15_canny_fp16.safetensors"
382
+ },
383
+ {
384
+ "name": "ControlNet-v1-1 (depth; fp16)",
385
+ "type": "controlnet",
386
+ "base": "SD1.5",
387
+ "save_path": "default",
388
+ "description": "Safetensors/FP16 versions of the new ControlNet-v1-1 checkpoints (depth)",
389
+ "reference": "https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors",
390
+ "filename": "control_v11f1p_sd15_depth_fp16.safetensors",
391
+ "url": "https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11f1p_sd15_depth_fp16.safetensors"
392
+ },
393
+ {
394
+ "name": "ControlNet-v1-1 (inpaint; fp16)",
395
+ "type": "controlnet",
396
+ "base": "SD1.5",
397
+ "save_path": "default",
398
+ "description": "Safetensors/FP16 versions of the new ControlNet-v1-1 checkpoints (inpaint)",
399
+ "reference": "https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors",
400
+ "filename": "control_v11p_sd15_inpaint_fp16.safetensors",
401
+ "url": "https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11p_sd15_inpaint_fp16.safetensors"
402
+ },
403
+ {
404
+ "name": "ControlNet-v1-1 (lineart; fp16)",
405
+ "type": "controlnet",
406
+ "base": "SD1.5",
407
+ "save_path": "default",
408
+ "description": "Safetensors/FP16 versions of the new ControlNet-v1-1 checkpoints (lineart)",
409
+ "reference": "https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors",
410
+ "filename": "control_v11p_sd15_lineart_fp16.safetensors",
411
+ "url": "https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11p_sd15_lineart_fp16.safetensors"
412
+ },
413
+ {
414
+ "name": "ControlNet-v1-1 (mlsd; fp16)",
415
+ "type": "controlnet",
416
+ "base": "SD1.5",
417
+ "save_path": "default",
418
+ "description": "Safetensors/FP16 versions of the new ControlNet-v1-1 checkpoints (mlsd)",
419
+ "reference": "https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors",
420
+ "filename": "control_v11p_sd15_mlsd_fp16.safetensors",
421
+ "url": "https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11p_sd15_mlsd_fp16.safetensors"
422
+ },
423
+ {
424
+ "name": "ControlNet-v1-1 (normalbae; fp16)",
425
+ "type": "controlnet",
426
+ "base": "SD1.5",
427
+ "save_path": "default",
428
+ "description": "Safetensors/FP16 versions of the new ControlNet-v1-1 checkpoints (normalbae)",
429
+ "reference": "https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors",
430
+ "filename": "control_v11p_sd15_normalbae_fp16.safetensors",
431
+ "url": "https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11p_sd15_normalbae_fp16.safetensors"
432
+ },
433
+ {
434
+ "name": "ControlNet-v1-1 (openpose; fp16)",
435
+ "type": "controlnet",
436
+ "base": "SD1.5",
437
+ "save_path": "default",
438
+ "description": "Safetensors/FP16 versions of the new ControlNet-v1-1 checkpoints (openpose)",
439
+ "reference": "https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors",
440
+ "filename": "control_v11p_sd15_openpose_fp16.safetensors",
441
+ "url": "https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11p_sd15_openpose_fp16.safetensors"
442
+ },
443
+ {
444
+ "name": "ControlNet-v1-1 (scribble; fp16)",
445
+ "type": "controlnet",
446
+ "base": "SD1.5",
447
+ "save_path": "default",
448
+ "description": "Safetensors/FP16 versions of the new ControlNet-v1-1 checkpoints (scribble)",
449
+ "reference": "https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors",
450
+ "filename": "control_v11p_sd15_scribble_fp16.safetensors",
451
+ "url": "https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11p_sd15_scribble_fp16.safetensors"
452
+ },
453
+ {
454
+ "name": "ControlNet-v1-1 (seg; fp16)",
455
+ "type": "controlnet",
456
+ "base": "SD1.5",
457
+ "save_path": "default",
458
+ "description": "Safetensors/FP16 versions of the new ControlNet-v1-1 checkpoints (seg)",
459
+ "reference": "https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors",
460
+ "filename": "control_v11p_sd15_seg_fp16.safetensors",
461
+ "url": "https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11p_sd15_seg_fp16.safetensors"
462
+ },
463
+ {
464
+ "name": "ControlNet-v1-1 (softedge; fp16)",
465
+ "type": "controlnet",
466
+ "base": "SD1.5",
467
+ "save_path": "default",
468
+ "description": "Safetensors/FP16 versions of the new ControlNet-v1-1 checkpoints (softedge)",
469
+ "reference": "https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors",
470
+ "filename": "control_v11p_sd15_softedge_fp16.safetensors",
471
+ "url": "https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11p_sd15_softedge_fp16.safetensors"
472
+ },
473
+ {
474
+ "name": "ControlNet-v1-1 (anime; fp16)",
475
+ "type": "controlnet",
476
+ "base": "SD1.5",
477
+ "save_path": "default",
478
+ "description": "Safetensors/FP16 versions of the new ControlNet-v1-1 checkpoints (anime)",
479
+ "reference": "https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors",
480
+ "filename": "control_v11p_sd15s2_lineart_anime_fp16.safetensors",
481
+ "url": "https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11p_sd15s2_lineart_anime_fp16.safetensors"
482
+ },
483
+ {
484
+ "name": "ControlNet-v1-1 (tile; fp16; v11u)",
485
+ "type": "controlnet",
486
+ "base": "SD1.5",
487
+ "save_path": "default",
488
+ "description": "Safetensors/FP16 versions of the new ControlNet-v1-1 checkpoints (tile) / v11u",
489
+ "reference": "https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors",
490
+ "filename": "control_v11u_sd15_tile_fp16.safetensors",
491
+ "url": "https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11u_sd15_tile_fp16.safetensors"
492
+ },
493
+ {
494
+ "name": "ControlNet-v1-1 (tile; fp16; v11f1e)",
495
+ "type": "controlnet",
496
+ "base": "SD1.5",
497
+ "save_path": "default",
498
+ "description": "Safetensors/FP16 versions of the new ControlNet-v1-1 checkpoints (tile) / v11f1e<BR>You need to this model for <B>Tiled Resample</B>",
499
+ "reference": "https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors",
500
+ "filename": "control_v11f1e_sd15_tile_fp16.safetensors",
501
+ "url": "https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11f1e_sd15_tile_fp16.safetensors"
502
+ },
503
+ {
504
+ "name": "GLIGEN textbox (fp16; pruned)",
505
+ "type": "gligen",
506
+ "base": "SD1.5",
507
+ "save_path": "default",
508
+ "description": "GLIGEN textbox model",
509
+ "reference": "https://huggingface.co/comfyanonymous/GLIGEN_pruned_safetensors",
510
+ "filename": "gligen_sd14_textbox_pruned_fp16.safetensors",
511
+ "url": "https://huggingface.co/comfyanonymous/GLIGEN_pruned_safetensors/resolve/main/gligen_sd14_textbox_pruned_fp16.safetensors"
512
+ },
513
+ {
514
+ "name": "ViT-H SAM model",
515
+ "type": "sam",
516
+ "base": "SAM",
517
+ "save_path": "sams",
518
+ "description": "Segmenty Anything SAM model (ViT-H)",
519
+ "reference": "https://github.com/facebookresearch/segment-anything#model-checkpoints",
520
+ "filename": "sam_vit_h_4b8939.pth",
521
+ "url": "https://dl.fbaipublicfiles.com/segment_anything/sam_vit_h_4b8939.pth"
522
+ },
523
+ {
524
+ "name": "ViT-L SAM model",
525
+ "type": "sam",
526
+ "base": "SAM",
527
+ "save_path": "sams",
528
+ "description": "Segmenty Anything SAM model (ViT-L)",
529
+ "reference": "https://github.com/facebookresearch/segment-anything#model-checkpoints",
530
+ "filename": "sam_vit_l_0b3195.pth",
531
+ "url": "https://dl.fbaipublicfiles.com/segment_anything/sam_vit_l_0b3195.pth"
532
+ },
533
+ {
534
+ "name": "ViT-B SAM model",
535
+ "type": "sam",
536
+ "base": "SAM",
537
+ "save_path": "sams",
538
+ "description": "Segmenty Anything SAM model (ViT-B)",
539
+ "reference": "https://github.com/facebookresearch/segment-anything#model-checkpoints",
540
+ "filename": "sam_vit_b_01ec64.pth",
541
+ "url": "https://dl.fbaipublicfiles.com/segment_anything/sam_vit_b_01ec64.pth"
542
+ },
543
+ {
544
+ "name": "seecoder v1.0",
545
+ "type": "seecoder",
546
+ "base": "SEECODER",
547
+ "save_path": "seecoders",
548
+ "description": "SeeCoder model",
549
+ "reference": "https://huggingface.co/shi-labs/prompt-free-diffusion/tree/main/pretrained/pfd/seecoder",
550
+ "filename": "seecoder-v1-0.safetensors",
551
+ "url": "https://huggingface.co/shi-labs/prompt-free-diffusion/resolve/main/pretrained/pfd/seecoder/seecoder-v1-0.safetensors"
552
+ },
553
+ {
554
+ "name": "seecoder pa v1.0",
555
+ "type": "seecoder",
556
+ "base": "SEECODER",
557
+ "save_path": "seecoders",
558
+ "description": "SeeCoder model",
559
+ "reference": "https://huggingface.co/shi-labs/prompt-free-diffusion/tree/main/pretrained/pfd/seecoder",
560
+ "filename": "seecoder-pa-v1-0.safetensors",
561
+ "url": "https://huggingface.co/shi-labs/prompt-free-diffusion/resolve/main/pretrained/pfd/seecoder/seecoder-pa-v1-0.safetensors"
562
+ },
563
+ {
564
+ "name": "seecoder anime v1.0",
565
+ "type": "seecoder",
566
+ "base": "SEECODER",
567
+ "save_path": "seecoders",
568
+ "description": "SeeCoder model",
569
+ "reference": "https://huggingface.co/shi-labs/prompt-free-diffusion/tree/main/pretrained/pfd/seecoder",
570
+ "filename": "seecoder-anime-v1-0.safetensors",
571
+ "url": "https://huggingface.co/shi-labs/prompt-free-diffusion/resolve/main/pretrained/pfd/seecoder/seecoder-anime-v1-0.safetensors"
572
+ }
573
+ ]
574
+ }
prestartup_script.py ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import subprocess
3
+
4
+ script_list_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "startup-scripts", "install-scripts.txt")
5
+
6
+ # Check if script_list_path exists
7
+ if os.path.exists(script_list_path):
8
+ print("\n#######################################################################")
9
+ print("[ComfyUI-Manager] Starting dependency installation for the extension\n")
10
+
11
+ executed = set()
12
+ # Read each line from the file and convert it to a list using eval
13
+ with open(script_list_path, 'r') as file:
14
+ for line in file:
15
+ if line in executed:
16
+ continue
17
+
18
+ executed.add(line)
19
+
20
+ try:
21
+ script = eval(line)
22
+ print(f"\n## Install dependency for '{script[0]}'")
23
+ code = subprocess.run(script[1:], cwd=script[0])
24
+
25
+ if code.returncode != 0:
26
+ print(f"install script failed: {script[0]}")
27
+ except Exception as e:
28
+ print(f"[ERROR] Failed to install: {line} / {e}")
29
+
30
+
31
+ # Remove the script_list_path file
32
+ if os.path.exists(script_list_path):
33
+ os.remove(script_list_path)
34
+
35
+ print("\n[ComfyUI-Manager] Dependency installation completed.")
36
+ print("#######################################################################\n")
37
+
requirements.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ GitPython
scanner.py ADDED
@@ -0,0 +1,214 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import re
2
+ import os
3
+ import json
4
+ from git import Repo
5
+ from torchvision.datasets.utils import download_url
6
+
7
+
8
+ def scan_in_file(filename):
9
+ try:
10
+ with open(filename, encoding='utf-8') as file:
11
+ code = file.read()
12
+ except UnicodeDecodeError:
13
+ with open(filename, encoding='cp949') as file:
14
+ code = file.read()
15
+
16
+ pattern = r"NODE_CLASS_MAPPINGS\s*=\s*{([^}]*)}"
17
+ regex = re.compile(pattern, re.MULTILINE | re.DOTALL)
18
+
19
+ nodes = set()
20
+ class_dict = {}
21
+
22
+ pattern2 = r'NODE_CLASS_MAPPINGS\["(.*?)"\]'
23
+ keys = re.findall(pattern2, code)
24
+ for key in keys:
25
+ nodes.add(key)
26
+
27
+ matches = regex.findall(code)
28
+ for match in matches:
29
+ dict_text = match
30
+
31
+ key_value_pairs = re.findall(r"\"([^\"]*)\"\s*:\s*([^,\n]*)", dict_text)
32
+ for key, value in key_value_pairs:
33
+ class_dict[key] = value.strip()
34
+
35
+ for key, value in class_dict.items():
36
+ nodes.add(key)
37
+
38
+ update_pattern = r"NODE_CLASS_MAPPINGS.update\s*\({([^}]*)}\)"
39
+ update_match = re.search(update_pattern, code)
40
+ if update_match:
41
+ update_dict_text = update_match.group(1)
42
+ update_key_value_pairs = re.findall(r"\"([^\"]*)\"\s*:\s*([^,\n]*)", update_dict_text)
43
+ for key, value in update_key_value_pairs:
44
+ class_dict[key] = value.strip()
45
+ nodes.add(key)
46
+
47
+ return nodes
48
+
49
+ def get_py_file_paths(dirname):
50
+ file_paths = []
51
+
52
+ for root, dirs, files in os.walk(dirname):
53
+ if ".git" in root or "__pycache__" in root:
54
+ continue
55
+
56
+ for file in files:
57
+ if file.endswith(".py"):
58
+ file_path = os.path.join(root, file)
59
+ file_paths.append(file_path)
60
+
61
+ return file_paths
62
+
63
+
64
+ def get_nodes(target_dir):
65
+ py_files = []
66
+ directories = []
67
+
68
+ for item in os.listdir(target_dir):
69
+ if ".git" in item or "__pycache__" in item:
70
+ continue
71
+
72
+ path = os.path.abspath(os.path.join(target_dir, item))
73
+
74
+ if os.path.isfile(path) and item.endswith(".py"):
75
+ py_files.append(path)
76
+ elif os.path.isdir(path):
77
+ directories.append(path)
78
+
79
+ return py_files, directories
80
+
81
+
82
+ def get_git_urls_from_json(json_file):
83
+ with open(json_file) as file:
84
+ data = json.load(file)
85
+
86
+ custom_nodes = data.get('custom_nodes', [])
87
+ git_clone_files = []
88
+ for node in custom_nodes:
89
+ if node.get('install_type') == 'git-clone':
90
+ files = node.get('files', [])
91
+ if files:
92
+ git_clone_files.append(files[0])
93
+
94
+ return git_clone_files
95
+
96
+
97
+ def get_py_urls_from_json(json_file):
98
+ with open(json_file) as file:
99
+ data = json.load(file)
100
+
101
+ custom_nodes = data.get('custom_nodes', [])
102
+ py_files = []
103
+ for node in custom_nodes:
104
+ if node.get('install_type') == 'copy':
105
+ files = node.get('files', [])
106
+ if files:
107
+ py_files.append(files[0])
108
+
109
+ return py_files
110
+
111
+
112
+ def clone_or_pull_git_repository(git_url):
113
+ repo_name = git_url.split("/")[-1].split(".")[0]
114
+ repo_dir = os.path.join(os.getcwd(), ".tmp", repo_name)
115
+
116
+ if os.path.exists(repo_dir):
117
+ try:
118
+ repo = Repo(repo_dir)
119
+ origin = repo.remote(name="origin")
120
+ origin.pull()
121
+ repo.git.submodule('update', '--init', '--recursive')
122
+ print(f"Pulling {repo_name}...")
123
+ except Exception as e:
124
+ print(f"Pulling {repo_name} failed: {e}")
125
+ else:
126
+ try:
127
+ repo = Repo.clone_from(git_url, repo_dir, recursive=True)
128
+ print(f"Cloning {repo_name}...")
129
+ except Exception as e:
130
+ print(f"Cloning {repo_name} failed: {e}")
131
+
132
+
133
+ def update_custom_nodes():
134
+ tmp_dir = os.path.join(os.getcwd(), ".tmp")
135
+ if not os.path.exists(tmp_dir):
136
+ os.makedirs(tmp_dir)
137
+
138
+ node_info = {}
139
+
140
+ git_urls = get_git_urls_from_json('custom-node-list.json')
141
+
142
+ for url in git_urls:
143
+ name = os.path.basename(url)
144
+ if name.endswith(".git"):
145
+ name = name[:-4]
146
+
147
+ node_info[name] = url
148
+ clone_or_pull_git_repository(url)
149
+
150
+ py_urls = get_py_urls_from_json('custom-node-list.json')
151
+
152
+ for url in py_urls:
153
+ name = os.path.basename(url)
154
+ if name.endswith(".py"):
155
+ node_info[name] = url
156
+
157
+ try:
158
+ download_url(url, ".tmp")
159
+ except:
160
+ print(f"[ERROR] Cannot download '{url}'")
161
+
162
+ return node_info
163
+
164
+
165
+ def gen_json(node_info):
166
+ node_files, node_dirs = get_nodes(".tmp")
167
+
168
+ data = {}
169
+ for dirname in node_dirs:
170
+ py_files = get_py_file_paths(dirname)
171
+
172
+ nodes = set()
173
+ for py in py_files:
174
+ nodes.update(scan_in_file(py))
175
+
176
+ dirname = os.path.basename(dirname)
177
+
178
+ if len(nodes) > 0:
179
+ nodes = list(nodes)
180
+ nodes.sort()
181
+
182
+ if dirname in node_info:
183
+ git_url = node_info[dirname]
184
+ data[git_url] = nodes
185
+ else:
186
+ print(f"WARN: {dirname} is removed from custom-node-list.json")
187
+
188
+ for file in node_files:
189
+ nodes = scan_in_file(file)
190
+
191
+ if len(nodes) > 0:
192
+ nodes = list(nodes)
193
+ nodes.sort()
194
+
195
+ file = os.path.basename(file)
196
+
197
+ if file in node_info:
198
+ url = node_info[file]
199
+ data[url] = nodes
200
+ else:
201
+ print(f"Missing info: {url}")
202
+
203
+ json_path = f"extension-node-map.json"
204
+ with open(json_path, "w") as file:
205
+ json.dump(data, file, indent=4, sort_keys=True)
206
+
207
+
208
+ print("### ComfyUI Manager Node Scanner ###")
209
+
210
+ print("\n# Updating extensions\n")
211
+ updated_node_info = update_custom_nodes()
212
+
213
+ print("\n# 'extension-node-map.json' file is generated.\n")
214
+ gen_json(updated_node_info)