Added ComfyUI Manager

This commit is contained in:
DivineSpring 2024-07-14 15:39:31 +03:00 committed by GitHub
parent a4a36cb1c7
commit 8353f61fe9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
83 changed files with 76540 additions and 0 deletions

View File

@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.

View File

@ -0,0 +1,415 @@
# ComfyUI Manager
**ComfyUI-Manager** is an extension designed to enhance the usability of [ComfyUI](https://github.com/comfyanonymous/ComfyUI). It offers management functions to **install, remove, disable, and enable** various custom nodes of ComfyUI. Furthermore, this extension provides a hub feature and convenience functions to access a wide range of information within ComfyUI.
![menu](misc/menu.jpg)
## NOTICE
* V2.37 Show a ✅ mark to accounts that have been active on GitHub for more than six months.
* V2.33 Security policy is applied.
* V2.21 [cm-cli](docs/en/cm-cli.md) tool is added.
* V2.18 to V2.18.3 is not functioning due to a severe bug. Users on these versions are advised to promptly update to V2.18.4. Please navigate to the `ComfyUI/custom_nodes/ComfyUI-Manager` directory and execute `git pull` to update.
* You can see whole nodes info on [ComfyUI Nodes Info](https://ltdrdata.github.io/) page.
## Installation
### Installation[method1] (General installation method: ComfyUI-Manager only)
To install ComfyUI-Manager in addition to an existing installation of ComfyUI, you can follow the following steps:
1. goto `ComfyUI/custom_nodes` dir in terminal(cmd)
2. `git clone https://github.com/ltdrdata/ComfyUI-Manager.git`
3. Restart ComfyUI
### Installation[method2] (Installation for portable ComfyUI version: ComfyUI-Manager only)
1. install git
- https://git-scm.com/download/win
- standalone version
- select option: use windows default console window
2. Download [scripts/install-manager-for-portable-version.bat](https://github.com/ltdrdata/ComfyUI-Manager/raw/main/scripts/install-manager-for-portable-version.bat) into installed `"ComfyUI_windows_portable"` directory
3. double click `install-manager-for-portable-version.bat` batch file
![portable-install](misc/portable-install.png)
### Installation[method3] (Installation through comfy-cli: install ComfyUI and ComfyUI-Manager at once.)
> RECOMMENDED: comfy-cli provides various features to manage ComfyUI from the CLI.
* **prerequisite: python 3, git**
Windows:
```commandline
python -m venv venv
venv\Scripts\activate
pip install comfy-cli
comfy install
```
Linux/OSX:
```commandline
python -m venv venv
. venv/bin/activate
pip install comfy-cli
comfy install
```
### Installation[method4] (Installation for linux+venv: ComfyUI + ComfyUI-Manager)
To install ComfyUI with ComfyUI-Manager on Linux using a venv environment, you can follow these steps:
* **prerequisite: python-is-python3, python3-venv, git**
1. Download [scripts/install-comfyui-venv-linux.sh](https://github.com/ltdrdata/ComfyUI-Manager/raw/main/scripts/install-comfyui-venv-linux.sh) into empty install directory
- ComfyUI will be installed in the subdirectory of the specified directory, and the directory will contain the generated executable script.
2. `chmod +x install-comfyui-venv-linux.sh`
3. `./install-comfyui-venv-linux.sh`
### Installation Precautions
* **DO**: `ComfyUI-Manager` files must be accurately located in the path `ComfyUI/custom_nodes/ComfyUI-Manager`
* Installing in a compressed file format is not recommended.
* **DON'T**: Decompress directly into the `ComfyUI/custom_nodes` location, resulting in the Manager contents like `__init__.py` being placed directly in that directory.
* You have to remove all ComfyUI-Manager files from `ComfyUI/custom_nodes`
* **DON'T**: In a form where decompression occurs in a path such as `ComfyUI/custom_nodes/ComfyUI-Manager/ComfyUI-Manager`.
* You have to move `ComfyUI/custom_nodes/ComfyUI-Manager/ComfyUI-Manager` to `ComfyUI/custom_nodes/ComfyUI-Manager`
* **DON'T**: In a form where decompression occurs in a path such as `ComfyUI/custom_nodes/ComfyUI-Manager-main`.
* In such cases, `ComfyUI-Manager` may operate, but it won't be recognized within `ComfyUI-Manager`, and updates cannot be performed. It also poses the risk of duplicate installations.
* You have to rename `ComfyUI/custom_nodes/ComfyUI-Manager-main` to `ComfyUI/custom_nodes/ComfyUI-Manager`
You can execute ComfyUI by running either `./run_gpu.sh` or `./run_cpu.sh` depending on your system configuration.
## Colab Notebook
This repository provides Colab notebooks that allow you to install and use ComfyUI, including ComfyUI-Manager. To use ComfyUI, [click on this link](https://colab.research.google.com/github/ltdrdata/ComfyUI-Manager/blob/main/notebooks/comfyui_colab_with_manager.ipynb).
* Support for installing ComfyUI
* Support for basic installation of ComfyUI-Manager
* Support for automatically installing dependencies of custom nodes upon restarting Colab notebooks.
## Changes
* **2.38** `Install Custom Nodes` menu is changed to `Custom Nodes Manager`.
* **2.21** [cm-cli](docs/en/cm-cli.md) tool is added.
* **2.4** Copy the connections of the nearest node by double-clicking.
* **2.2.3** Support Components System
* **0.29** Add `Update all` feature
* **0.25** support db channel
* You can directly modify the db channel settings in the `config.ini` file.
* If you want to maintain a new DB channel, please modify the `channels.list` and submit a PR.
* **0.23** support multiple selection
* **0.18.1** `skip update check` feature added.
* A feature that allows quickly opening windows in environments where update checks take a long time.
* **0.17.1** Bug fix for the issue where enable/disable of the web extension was not working. Compatibility patch for StableSwarmUI.
* Requires latest version of ComfyUI (Revision: 1240)
* **0.17** Support preview method setting feature.
* **0.14** Support robust update.
* **0.13** Support additional 'pip' section for install spec.
* **0.12** Better installation support for Windows.
* **0.9** Support keyword search in installer menu.
* **V0.7.1** Bug fix for the issue where updates were not being applied on Windows.
* **For those who have been using versions 0.6, please perform a manual git pull in the custom_nodes/ComfyUI-Manager directory.**
* **V0.7** To address the issue of a slow list refresh, separate the fetch update and update check processes.
* **V0.6** Support extension installation for missing nodes.
* **V0.5** Removed external git program dependencies.
## How To Use
1. Click "Manager" button on main menu
![mainmenu](misc/main.jpg)
2. If you click on 'Install Custom Nodes' or 'Install Models', an installer dialog will open.
![menu](misc/menu.jpg)
* There are three DB modes: `DB: Channel (1day cache)`, `DB: Local`, and `DB: Channel (remote)`.
* `Channel (1day cache)` utilizes Channel cache information with a validity period of one day to quickly display the list.
* This information will be updated when there is no cache, when the cache expires, or when external information is retrieved through the Channel (remote).
* Whenever you start ComfyUI anew, this mode is always set as the **default** mode.
* `Local` uses information stored locally in ComfyUI-Manager.
* This information will be updated only when you update ComfyUI-Manager.
* For custom node developers, they should use this mode when registering their nodes in `custom-node-list.json` and testing them.
* `Channel (remote)` retrieves information from the remote channel, always displaying the latest list.
* In cases where retrieval is not possible due to network errors, it will forcibly use local information.
* 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.
3. Click 'Install' or 'Try Install' button.
![node-install-dialog](misc/custom-nodes.jpg)
![model-install-dialog](misc/models.png)
* Installed: This item is already installed.
* Install: Clicking this button will install the item.
* Try Install: This is a custom node of which installation information cannot be confirmed. Click the button to try installing it.
* If a red background `Channel` indicator appears at the top, it means it is not the default channel. Since the amount of information held is different from the default channel, many custom nodes may not appear in this channel state.
* Channel settings have a broad impact, affecting not only the node list but also all functions like "Update all."
* Conflicted Nodes with a yellow background show a list of nodes conflicting with other extensions in the respective extension. This issue needs to be addressed by the developer, and users should be aware that due to these conflicts, some nodes may not function correctly and may need to be installed accordingly.
4. If you set the `Badge:` item in the menu as `Badge: Nickname`, `Badge: Nickname (hide built-in)`, `Badge: #ID Nickname`, `Badge: #ID Nickname (hide built-in)` the information badge will be displayed on the node.
* When selecting (hide built-in), it hides the 🦊 icon, which signifies built-in nodes.
* Nodes without any indication on the badge are custom nodes that Manager cannot recognize.
* `Badge: Nickname` displays the nickname of custom nodes, while `Badge: #ID Nickname` also includes the internal ID of the node.
![model-install-dialog](misc/nickname.jpg)
5. Share
![menu](misc/main.jpg) ![share](misc/share.jpg)
* You can share the workflow by clicking the Share button at the bottom of the main menu or selecting Share Output from the Context Menu of the Image node.
* Currently, it supports sharing via [https://comfyworkflows.com/](https://comfyworkflows.com/),
[https://openart.ai](https://openart.ai/workflows/dev), [https://youml.com](https://youml.com)
as well as through the Matrix channel.
![menu](misc/share-setting.jpg)
* Through the Share settings in the Manager menu, you can configure the behavior of the Share button in the Main menu or Share Ouput button on Context Menu.
* `None`: hide from Main menu
* `All`: Show a dialog where the user can select a title for sharing.
## Snapshot-Manager
* When you press `Save snapshot` or use `Update All` on `Manager Menu`, the current installation status snapshot is saved.
* Snapshot file dir: `ComfyUI-Manager/snapshots`
* You can rename snapshot file.
* Press the "Restore" button to revert to the installation status of the respective snapshot.
* However, for custom nodes not managed by Git, snapshot support is incomplete.
* When you press `Restore`, it will take effect on the next ComfyUI startup.
* The selected snapshot file is saved in `ComfyUI-Manager/startup-scripts/restore-snapshot.json`, and upon restarting ComfyUI, the snapshot is applied and then deleted.
![model-install-dialog](misc/snapshot.jpg)
## cm-cli: command line tools for power user
* A tool is provided that allows you to use the features of ComfyUI-Manager without running ComfyUI.
* For more details, please refer to the [cm-cli documentation](docs/en/cm-cli.md).
## How to register your custom node into ComfyUI-Manager
* Add an entry to `custom-node-list.json` located in the root of ComfyUI-Manager and submit a Pull Request.
* NOTE: Before submitting the PR after making changes, please check `Use local DB` and ensure that the extension list loads without any issues in the `Install custom nodes` dialog. Occasionally, missing or extra commas can lead to JSON syntax errors.
* The remaining JSON will be updated through scripts in the future, so you don't need to worry about it.
## Custom node support guide
* 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.
* Please submit a pull request to update either the custom-node-list.json or model-list.json file.
* The scanner currently provides a detection function for missing nodes, which is capable of detecting nodes described by the following two patterns.
* Or you can provide manually `node_list.json` file.
```
NODE_CLASS_MAPPINGS = {
"ExecutionSwitch": ExecutionSwitch,
"ExecutionBlocker": ExecutionBlocker,
...
}
NODE_CLASS_MAPPINGS.update({
"UniFormer-SemSegPreprocessor": Uniformer_SemSegPreprocessor,
"SemSegPreprocessor": Uniformer_SemSegPreprocessor,
})
```
* When you write a docstring in the header of the .py file for the Node as follows, it will be used for managing the database in the Manager.
* Currently, only the `nickname` is being used, but other parts will also be utilized in the future.
* The `nickname` will be the name displayed on the badge of the node.
* If there is no `nickname`, it will be truncated to 20 characters from the arbitrarily written title and used.
```
"""
@author: Dr.Lt.Data
@title: Impact Pack
@nickname: Impact Pack
@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.
"""
```
* **Special purpose files** (optional)
* `node_list.json` - When your custom nodes pattern of NODE_CLASS_MAPPINGS is not conventional, it is used to manually provide a list of nodes for reference. ([example](https://github.com/melMass/comfy_mtb/raw/main/node_list.json))
* `requirements.txt` - When installing, this pip requirements will be installed automatically
* `install.py` - When installing, it is automatically called
* `uninstall.py` - When uninstalling, it is automatically called
* `disable.py` - When disabled, it is automatically called
* When installing a custom node setup `.js` file, it is recommended to write this script for disabling.
* `enable.py` - When enabled, it is automatically called
* **All scripts are executed from the root path of the corresponding custom node.**
## Component Sharing
* **Copy & Paste**
* [Demo Page](https://ltdrdata.github.io/component-demo/)
* When pasting a component from the clipboard, it supports text in the following JSON format. (text/plain)
```
{
"kind": "ComfyUI Components",
"timestamp": <current timestamp>,
"components":
{
<component name>: <component nodedata>
}
}
```
* `<current timestamp>` Ensure that the timestamp is always unique.
* "components" should have the same structure as the content of the file stored in ComfyUI-Manager/components.
* `<component name>`: The name should be in the format `<prefix>::<node name>`.
* `<compnent nodeata>`: In the nodedata of the group node.
* `<version>`: Only two formats are allowed: `major.minor.patch` or `major.minor`. (e.g. `1.0`, `2.2.1`)
* `<datetime>`: Saved time
* `<packname>`: If the packname is not empty, the category becomes packname/workflow, and it is saved in the <packname>.pack file in ComfyUI-Manager/components.
* `<category>`: If there is neither a category nor a packname, it is saved in the components category.
```
"version":"1.0",
"datetime": 1705390656516,
"packname": "mypack",
"category": "util/pipe",
```
* **Drag & Drop**
* Dragging and dropping a `.pack` or `.json` file will add the corresponding components.
* Example pack: [Impact.pack](misc/Impact.pack)
* Dragging and dropping or pasting a single component will add a node. However, when adding multiple components, nodes will not be added.
## Support of missing nodes installation
![missing-menu](misc/missing-menu.jpg)
* When you click on the ```Install Missing Custom Nodes``` button in the menu, it displays a list of extension nodes that contain nodes not currently present in the workflow.
![missing-list](misc/missing-list.jpg)
## Additional Feature
* Logging to file feature
* This feature is enabled by default and can be disabled by setting `file_logging = False` in the `config.ini`.
* Fix node(recreate): When right-clicking on a node and selecting `Fix node (recreate)`, you can recreate the node. The widget's values are reset, while the connections maintain those with the same names.
* It is used to correct errors in nodes of old workflows created before, which are incompatible with the version changes of custom nodes.
* Double-Click Node Title: You can set the double click behavior of nodes in the ComfyUI-Manager menu.
* `Copy All Connections`, `Copy Input Connections`: Double-clicking a node copies the connections of the nearest node.
* This action targets the nearest node within a straight-line distance of 1000 pixels from the center of the node.
* In the case of `Copy All Connections`, it duplicates existing outputs, but since it does not allow duplicate connections, the existing output connections of the original node are disconnected.
* This feature copies only the input and output that match the names.
* `Possible Input Connections`: It connects all outputs that match the closest type within the specified range.
* This connection links to the closest outputs among the nodes located on the left side of the target node.
* `Possible(left) + Copy(right)`: When you Double-Click on the left half of the title, it operates as `Possible Input Connections`, and when you Double-Click on the right half, it operates as `Copy All Connections`.
* Prevent downgrade of specific packages
* List the package names in the `downgrade_blacklist` section of the `config.ini` file, separating them with commas.
* e.g
```
downgrade_blacklist = diffusers, kornia
```
* Custom pip mapping
* When you create the `pip_overrides.json` file, it changes the installation of specific pip packages to installations defined by the user.
* Please refer to the `pip_overrides.json.template` file.
* Use `aria2` as downloader
* [howto](docs/en/use_aria2.md)
## Scanner
When you run the `scan.sh` script:
* It updates the `extension-node-map.json`.
* To do this, it pulls or clones the custom nodes listed in `custom-node-list.json` into `~/.tmp/default`.
* To skip this step, add the `--skip-update` option.
* If you want to specify a different path instead of `~/.tmp/default`, run `python scanner.py [path]` directly instead of `scan.sh`.
* It updates the `github-stats.json`.
* This uses the GitHub API, so set your token with `export GITHUB_TOKEN=your_token_here` to avoid quickly reaching the rate limit and malfunctioning.
* To skip this step, add the `--skip-update-stat` option.
* The `--skip-all` option applies both `--skip-update` and `--skip-stat-update`.
## Troubleshooting
* If your `git.exe` is installed in a specific location other than system git, please install ComfyUI-Manager and run ComfyUI. Then, specify the path including the file name in `git_exe = ` in the ComfyUI-Manager/config.ini file that is generated.
* If updating ComfyUI-Manager itself fails, please go to the **ComfyUI-Manager** directory and execute the command `git update-ref refs/remotes/origin/main a361cc1 && git fetch --all && git pull`.
* Alternatively, download the update-fix.py script from [update-fix.py](https://github.com/ltdrdata/ComfyUI-Manager/raw/main/scripts/update-fix.py) and place it in the ComfyUI-Manager directory. Then, run it using your Python command.
For the portable version, use `..\..\..\python_embeded\python.exe update-fix.py`.
* For cases where nodes like `PreviewTextNode` from `ComfyUI_Custom_Nodes_AlekPet` are only supported as front-end nodes, we currently do not provide missing nodes for them.
* Currently, `vid2vid` is not being updated, causing compatibility issues.
* If you encounter the error message `Overlapped Object has pending operation at deallocation on Comfyui Manager load` under Windows
* Edit `config.ini` file: add `windows_selector_event_loop_policy = True`
* if `SSL: CERTIFICATE_VERIFY_FAILED` error is occured.
* Edit `config.ini` file: add `bypass_ssl = True`
## Security policy
* Edit `config.ini` file: add `security_level = <LEVEL>`
* `strong`
* doesn't allow `high` and `middle` level risky feature
* `normal`
* doesn't allow `high` level risky feature if `--listen` is specified and not starts with `127.`
* `middle` level risky feature is available
* `weak`
* all feature is available
* `high` level risky features
* `Install via git url`, `pip install`
* Installation of custom nodes registered not in the `default channel`.
* Display terminal log
* `middle` level risky features
* Uninstall/Update/Fix custom nodes
* Installation of custom nodes registered in the `default channel`.
* Restore/Remove Snapshot
* Restart
* `low` level risky features
* Update ComfyUI
## TODO: Unconventional form of custom node list
* https://github.com/diontimmer/Sample-Diffusion-ComfyUI-Extension
* https://github.com/senshilabs/NINJA-plugin
* https://github.com/MockbaTheBorg/Nodes
* https://github.com/StartHua/Comfyui_GPT_Story
* https://github.com/NielsGercama/comfyui_customsampling
* https://github.com/wrightdaniel2017/ComfyUI-VideoLipSync
* https://github.com/bxdsjs/ComfyUI-Image-preprocessing
* https://github.com/SMUELDigital/ComfyUI-ONSET
* https://github.com/SimithWang/comfyui-renameImages
* https://github.com/icefairy64/comfyui-model-tilt
* https://github.com/andrewharp/ComfyUI-EasyNodes
* https://github.com/SimithWang/comfyui-renameImages
* https://github.com/Tcheko243/ComfyUI-Photographer-Alpha7-Nodes
* https://github.com/Limbicnation/ComfyUINodeToolbox
## Roadmap
- [x] System displaying information about failed custom nodes import.
- [x] Guide for missing nodes in ComfyUI vanilla nodes.
- [x] Collision checking system for nodes with the same ID across extensions.
- [x] Template sharing system. (-> Component system based on Group Nodes)
- [x] 3rd party API system.
- [ ] Auto migration for custom nodes with changed structures.
- [ ] Version control feature for nodes.
- [ ] List of currently used custom nodes.
- [x] Download support multiple model download.
- [x] Model download via url.
- [x] List sorting (custom nodes).
- [x] List sorting (model).
- [ ] Provides description of node.
# Disclaimer
* This extension simply provides the convenience of installing custom nodes and does not guarantee their proper functioning.
## Credit
ComfyUI/[ComfyUI](https://github.com/comfyanonymous/ComfyUI) - A powerful and modular stable diffusion GUI.
**And, for all ComfyUI custom node developers**

View File

@ -0,0 +1,15 @@
import os
cli_mode_flag = os.path.join(os.path.dirname(__file__), '.enable-cli-only-mode')
if not os.path.exists(cli_mode_flag):
from .glob import manager_server
WEB_DIRECTORY = "js"
else:
print(f"\n[ComfyUI-Manager] !! cli-only-mode is enabled !!\n")
NODE_CLASS_MAPPINGS = {}
__all__ = ['NODE_CLASS_MAPPINGS']

View File

@ -0,0 +1,224 @@
{
"items": [
{
"id":"https://github.com/Fannovel16/comfyui_controlnet_aux",
"tags":"controlnet",
"description": "This extension provides preprocessor nodes for using controlnet."
},
{
"id":"https://github.com/comfyanonymous/ComfyUI_experiments",
"tags":"Dynamic Thresholding, DT, CFG, controlnet, reference only",
"description": "This experimental nodes contains a 'Reference Only' node and a 'ModelSamplerTonemapNoiseTest' node corresponding to the 'Dynamic Threshold'."
},
{
"id":"https://github.com/ltdrdata/ComfyUI-Impact-Pack",
"tags":"ddetailer, adetailer, ddsd, DD, loopback scaler, prompt, wildcard, dynamic prompt",
"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."
},
{
"id":"https://github.com/ltdrdata/ComfyUI-Inspire-Pack",
"tags":"lora block weight, effective block analyzer, lbw, variation seed",
"description": "The Inspire Pack provides the functionality of Lora Block Weight, Variation Seed."
},
{
"id":"https://github.com/biegert/ComfyUI-CLIPSeg/raw/main/custom_nodes/clipseg.py",
"tags":"ddsd",
"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."
},
{
"id":"https://github.com/BadCafeCode/masquerade-nodes-comfyui",
"tags":"ddetailer",
"description": "This extension is a less feature-rich and well-maintained alternative to Impact Pack, but it has fewer dependencies and may be easier to install on abnormal configurations. The author recommends trying Impact Pack first."
},
{
"id":"https://github.com/BlenderNeko/ComfyUI_Cutoff",
"tags":"cutoff",
"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'."
},
{
"id":"https://github.com/BlenderNeko/ComfyUI_ADV_CLIP_emb",
"tags":"prompt, weight",
"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."
},
{
"id":"https://github.com/shiimizu/ComfyUI_smZNodes",
"tags":"prompt, weight",
"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."
},
{
"id":"https://github.com/BlenderNeko/ComfyUI_Noise",
"tags":"img2img alt, random",
"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."
},
{
"id":"https://github.com/BlenderNeko/ComfyUI_SeeCoder",
"tags":"seecoder, prompt-free-diffusion",
"description": "The extension provides seecoder feature."
},
{
"id":"https://github.com/lilly1987/ComfyUI_node_Lilly",
"tags":"prompt, wildcard",
"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."
},
{
"id":"https://github.com/Davemane42/ComfyUI_Dave_CustomNode",
"tags":"latent couple",
"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."
},
{
"id":"https://github.com/LEv145/images-grid-comfy-plugin",
"tags":"X/Y Plot",
"description": "This tool provides a viewer node that allows for checking multiple outputs in a grid, similar to the X/Y Plot extension."
},
{
"id":"https://github.com/pythongosssss/ComfyUI-WD14-Tagger",
"tags":"deepbooru, clip interrogation",
"description": "This extension generates clip text by taking an image as input and using the Deepbooru model."
},
{
"id":"https://github.com/szhublox/ambw_comfyui",
"tags":"supermerger",
"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. "
},
{
"id":"https://github.com/ssitu/ComfyUI_UltimateSDUpscale",
"tags":"upscaler, Ultimate SD Upscale",
"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."
},
{
"id":"https://github.com/dawangraoming/ComfyUI_ksampler_gpu/raw/main/ksampler_gpu.py",
"tags":"random, noise",
"description": "A1111 provides KSampler that uses GPU-based random noise. This extension offers KSampler utilizing GPU-based random noise."
},
{
"id":"https://github.com/space-nuko/nui-suite",
"tags":"prompt, dynamic prompt",
"description": "This extension provides nodes with the functionality of dynamic prompts."
},
{
"id":"https://github.com/melMass/comfy_mtb",
"tags":"roop",
"description": "This extension provides bunch of nodes including roop"
},
{
"id":"https://github.com/ssitu/ComfyUI_roop",
"tags":"roop",
"description": "This extension provides nodes for the roop A1111 webui script."
},
{
"id":"https://github.com/asagi4/comfyui-prompt-control",
"tags":"prompt, prompt editing",
"description": "This extension provides the ability to use prompts like \n\n**a [large::0.1] [cat|dog:0.05] [<lora:somelora:0.5:0.6>::0.5] [in a park:in space:0.4]**\n\n"
},
{
"id":"https://github.com/adieyal/comfyui-dynamicprompts",
"tags":"prompt, dynamic prompt",
"description": "This extension is a port of sd-dynamic-prompt to ComfyUI."
},
{
"id":"https://github.com/kwaroran/abg-comfyui",
"tags":"abg, background remover",
"description": "A Anime Background Remover node for comfyui, based on this hf space, works same as AGB extention in automatic1111."
},
{
"id":"https://github.com/Gourieff/comfyui-reactor-node",
"tags":"reactor, sd-webui-roop-nsfw",
"description": "This is a ported version of ComfyUI for the sd-webui-roop-nsfw extension."
},
{
"id":"https://github.com/laksjdjf/cgem156-ComfyUI",
"tags":"regional prompt, latent couple, prompt",
"description": "This custom nodes provide a functionality similar to regional prompts, offering couple features at the attention level."
},
{
"id":"https://github.com/FizzleDorf/ComfyUI_FizzNodes",
"tags":"deforum",
"description": "This custom nodes provide functionality that assists in animation creation, similar to deforum."
},
{
"id":"https://github.com/seanlynch/comfyui-optical-flow",
"tags":"deforum, vid2vid",
"description": "This custom nodes provide functionality that assists in animation creation, similar to deforum."
},
{
"id":"https://github.com/ssitu/ComfyUI_fabric",
"tags":"fabric",
"description": "Similar to sd-webui-fabric, this custom nodes provide the functionality of [a/FABRIC](https://github.com/sd-fabric/fabric)."
},
{
"id":"https://github.com/Zuellni/ComfyUI-ExLlama",
"tags":"ExLlama, prompt, language model",
"description": "Similar to text-generation-webui, this custom nodes provide the functionality of [a/exllama](https://github.com/turboderp/exllama)."
},
{
"id":"https://github.com/spinagon/ComfyUI-seamless-tiling",
"tags":"tiling",
"description": "ComfyUI node for generating seamless textures Replicates 'Tiling' option from A1111"
},
{
"id":"https://github.com/laksjdjf/cd-tuner_negpip-ComfyUI",
"tags":"cd-tuner, negpip",
"description": "This extension is a port of the [a/sd-webui-cd-tuner](https://github.com/hako-mikan/sd-webui-cd-tuner)(a.k.a. CD(color/Detail) Tuner )and [a/sd-webui-negpip](https://github.com/hako-mikan/sd-webui-negpip)(a.k.a. NegPiP) extensions of A1111 to ComfyUI."
},
{
"id":"https://github.com/mcmonkeyprojects/sd-dynamic-thresholding",
"tags":"DT, dynamic thresholding",
"description": "This custom node is a port of the Dynamic Thresholding extension from A1111 to make it available for use in ComfyUI."
},
{
"id":"https://github.com/hhhzzyang/Comfyui_Lama",
"tags":"lama, inpainting anything",
"description": "This extension provides custom nodes developed based on [a/LaMa](https://github.com/advimman/lama) and [a/Inpainting anything](https://github.com/geekyutao/Inpaint-Anything)."
},
{
"id":"https://github.com/mlinmg/ComfyUI-LaMA-Preprocessor",
"tags":"lama",
"description": "This extension provides custom nodes for [a/LaMa](https://github.com/advimman/lama) functionality."
},
{
"id":"https://github.com/Haoming02/comfyui-diffusion-cg",
"tags":"diffusion-cg",
"description": "This extension provides custom nodes for [a/SD Webui Diffusion Color Grading](https://github.com/Haoming02/sd-webui-diffusion-cg) functionality."
},
{
"id":"https://github.com/asagi4/ComfyUI-CADS",
"tags":"diffusion-cg",
"description": "This extension provides custom nodes for [a/sd-webui-cads](https://github.com/v0xie/sd-webui-cads) functionality."
},
{
"id":"https://git.mmaker.moe/mmaker/sd-webui-color-enhance",
"tags":"color-enhance",
"description": "This extension supports both A1111 and ComfyUI simultaneously."
},
{
"id":"https://github.com/shiimizu/ComfyUI-TiledDiffusion",
"tags":"multidiffusion",
"description": "This extension provides custom nodes for [a/Mixture of Diffusers](https://github.com/albarji/mixture-of-diffusers) and [a/MultiDiffusion](https://github.com/omerbt/MultiDiffusion)"
},
{
"id":"https://github.com/abyz22/image_control",
"tags":"BMAB",
"description": "This extension provides some alternative functionalities of the [a/sd-webui-bmab](https://github.com/portu-sim/sd-webui-bmab) extension."
},
{
"id":"https://github.com/blepping/ComfyUI-sonar",
"tags":"sonar",
"description": "This extension provides some alternative functionalities of the [a/stable-diffusion-webui-sonar](https://github.com/Kahsolt/stable-diffusion-webui-sonar) extension."
},
{
"id":"https://github.com/AIFSH/ComfyUI-RVC",
"tags":"sonar",
"description": "a comfyui custom node for [a/Retrieval-based-Voice-Conversion-WebUI](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git), you can Voice-Conversion in comfyui now!"
},
{
"id":"https://github.com/portu-sim/comfyui-bmab",
"tags":"bmab",
"description": "a comfyui custom node for [a/sd-webui-bmab](https://github.com/portu-sim/sd-webui-bmab)"
},
{
"id":"https://github.com/ThereforeGames/ComfyUI-Unprompted",
"tags":"unprompted",
"description": "This extension is a port of [a/unprompted](https://github.com/ThereforeGames/unprompted)"
}
]
}

View File

@ -0,0 +1,6 @@
default::https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main
recent::https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/node_db/new
legacy::https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/node_db/legacy
forked::https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/node_db/forked
dev::https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/node_db/dev
tutorial::https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/node_db/tutorial

View File

@ -0,0 +1,21 @@
@echo off
python json-checker.py "custom-node-list.json"
python json-checker.py "model-list.json"
python json-checker.py "alter-list.json"
python json-checker.py "extension-node-map.json"
python json-checker.py "node_db\new\custom-node-list.json"
python json-checker.py "node_db\new\model-list.json"
python json-checker.py "node_db\new\extension-node-map.json"
python json-checker.py "node_db\dev\custom-node-list.json"
python json-checker.py "node_db\dev\model-list.json"
python json-checker.py "node_db\dev\extension-node-map.json"
python json-checker.py "node_db\tutorial\custom-node-list.json"
python json-checker.py "node_db\tutorial\model-list.json"
python json-checker.py "node_db\tutorial\extension-node-map.json"
python json-checker.py "node_db\legacy\custom-node-list.json"
python json-checker.py "node_db\legacy\model-list.json"
python json-checker.py "node_db\legacy\extension-node-map.json"
python json-checker.py "node_db\forked\custom-node-list.json"
python json-checker.py "node_db\forked\model-list.json"
python json-checker.py "node_db\forked\extension-node-map.json"

View File

@ -0,0 +1,42 @@
#!/bin/bash
echo
echo CHECK1
files=(
"custom-node-list.json"
"model-list.json"
"alter-list.json"
"extension-node-map.json"
"github-stats.json"
"node_db/new/custom-node-list.json"
"node_db/new/model-list.json"
"node_db/new/extension-node-map.json"
"node_db/dev/custom-node-list.json"
"node_db/dev/model-list.json"
"node_db/dev/extension-node-map.json"
"node_db/tutorial/custom-node-list.json"
"node_db/tutorial/model-list.json"
"node_db/tutorial/extension-node-map.json"
"node_db/legacy/custom-node-list.json"
"node_db/legacy/model-list.json"
"node_db/legacy/extension-node-map.json"
"node_db/forked/custom-node-list.json"
"node_db/forked/model-list.json"
"node_db/forked/extension-node-map.json"
)
for file in "${files[@]}"; do
python json-checker.py "$file"
done
echo
echo CHECK2
find ~/.tmp/default -name "*.py" -print0 | xargs -0 grep "crypto"
echo
echo CHECK3
find ~/.tmp/default -name "requirements.txt" | xargs grep "^\s*https\\?:"
find ~/.tmp/default -name "requirements.txt" | xargs grep "\.whl"
echo

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,146 @@
# `cm-cli`: ComfyUI-Manager CLI
`cm-cli` is a tool that allows you to use various functions of ComfyUI-Manager from the command line without launching ComfyUI.
```
-= ComfyUI-Manager CLI (V2.24) =-
python cm-cli.py [OPTIONS]
OPTIONS:
[install|reinstall|uninstall|update|disable|enable|fix] node_name ... ?[--channel <channel name>] ?[--mode [remote|local|cache]]
[update|disable|enable|fix] all ?[--channel <channel name>] ?[--mode [remote|local|cache]]
[simple-show|show] [installed|enabled|not-installed|disabled|all|snapshot|snapshot-list] ?[--channel <channel name>] ?[--mode [remote|local|cache]]
save-snapshot ?[--output <snapshot .json/.yaml>]
restore-snapshot <snapshot .json/.yaml> ?[--pip-non-url] ?[--pip-non-local-url] ?[--pip-local-url]
cli-only-mode [enable|disable]
restore-dependencies
clear
```
## How To Use?
* You can execute it via `python cm-cli.py`.
* For example, if you want to update all custom nodes:
* In the ComfyUI-Manager directory, you can execute the command `python cm-cli.py update all`.
* If running from the ComfyUI directory, you can specify the path to cm-cli.py like this: `python custom_nodes/ComfyUI-Manager/cm-cli.py update all`.
## Prerequisite
* It must be run in the same Python environment as the one running ComfyUI.
* If using a venv, you must run it with the venv activated.
* If using a portable version, and you are in the directory with the run_nvidia_gpu.bat file, you should execute the command as follows:
`.\python_embeded\python.exe ComfyUI\custom_nodes\ComfyUI-Manager\cm-cli.py update all`
* The path for ComfyUI can be set with the COMFYUI_PATH environment variable. If omitted, a warning message will appear, and the path will be set relative to the installed location of ComfyUI-Manager:
```
WARN: The `COMFYUI_PATH` environment variable is not set. Assuming `custom_nodes/ComfyUI-Manager/../../` as the ComfyUI path.
```
## Features
### 1. --channel, --mode
* For viewing information and managing custom nodes, you can set the information database through --channel and --mode.
* For instance, executing the command `python cm-cli.py update all --channel recent --mode remote` will operate based on the latest information from remote rather than local data embedded in the current ComfyUI-Manager repo and will only target the list in the recent channel.
* --channel, --mode are only available with the commands `simple-show, show, install, uninstall, update, disable, enable, fix`.
### 2. Viewing Management Information
`[simple-show|show] [installed|enabled|not-installed|disabled|all|snapshot|snapshot-list] ?[--channel <channel name>] ?[--mode [remote|local|cache]]`
* `[show|simple-show]` - `show` provides detailed information, while `simple-show` displays information more simply.
Executing a command like `python cm-cli.py show installed` will display detailed information about the installed custom nodes.
```
-= ComfyUI-Manager CLI (V2.24) =-
FETCH DATA from: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/custom-node-list.json
[ ENABLED ] ComfyUI-Manager (author: Dr.Lt.Data)
[ ENABLED ] ComfyUI-Impact-Pack (author: Dr.Lt.Data)
[ ENABLED ] ComfyUI-Inspire-Pack (author: Dr.Lt.Data)
[ ENABLED ] ComfyUI_experiments (author: comfyanonymous)
[ ENABLED ] ComfyUI-SAI_API (author: Stability-AI)
[ ENABLED ] stability-ComfyUI-nodes (author: Stability-AI)
[ ENABLED ] comfyui_controlnet_aux (author: Fannovel16)
[ ENABLED ] ComfyUI-Frame-Interpolation (author: Fannovel16)
[ DISABLED ] ComfyUI-Loopchain (author: Fannovel16)
```
Using a command like `python cm-cli.py simple-show installed` will simply display information about the installed custom nodes.
```
-= ComfyUI-Manager CLI (V2.24) =-
FETCH DATA from: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/custom-node-list.json
ComfyUI-Manager
ComfyUI-Impact-Pack
ComfyUI-Inspire-Pack
ComfyUI_experiments
ComfyUI-SAI_API
stability-ComfyUI-nodes
comfyui_controlnet_aux
ComfyUI-Frame-Interpolation
ComfyUI-Loopchain
```
`[installed|enabled|not-installed|disabled|all|snapshot|snapshot-list]`
* `enabled`, `disabled`: Shows nodes that have been enabled or disabled among the installed custom nodes.
* `installed`: Shows all nodes that have been installed, regardless of whether they are enabled or disabled.
* `not-installed`: Shows a list of custom nodes that have not been installed.
* `all`: Shows a list of all custom nodes.
* `snapshot`: Displays snapshot information of the currently installed custom nodes. When viewed with `show`, it is displayed in JSON format, and with `simple-show`, it is displayed simply, along with the commit hash.
* `snapshot-list`: Shows a list of snapshot files stored in ComfyUI-Manager/snapshots.
### 3. Managing Custom Nodes
`[install|reinstall|uninstall|update|disable|enable|fix] node_name ... ?[--channel <channel name>] ?[--mode [remote|local|cache]]`
* You can apply management functions by listing the names of custom nodes, such as `python cm-cli.py install ComfyUI-Impact-Pack ComfyUI-Inspire-Pack ComfyUI_experiments`.
* The names of the custom nodes are as shown by `show` and are the names of the git repositories.
(Plans are to update the use of nicknames in the future.)
`[update|disable|enable|fix] all ?[--channel <channel name>] ?[--mode [remote|local|cache]]`
* The `update, disable, enable, fix` functions can be specified for all.
* Detailed Operations
* `install`: Installs the specified custom nodes.
* `reinstall`: Removes and then reinstalls the specified custom nodes.
* `uninstall`: Uninstalls the specified custom nodes.
* `update`: Updates the specified custom nodes.
* `disable`: Disables the specified custom nodes.
* `enable`: Enables the specified custom nodes.
* `fix`: Attempts to fix dependencies for the specified custom nodes.
### 4. Snapshot Management
* `python cm-cli.py save-snapshot [--output <snapshot .json/.yaml>]`: Saves the current snapshot.
* With `--output`, you can save a file in .yaml format to any specified path.
* `python cm-cli.py restore-snapshot <snapshot .json/.yaml>`: Restores to the specified snapshot.
* If a file exists at the snapshot path, that snapshot is loaded.
* If no file exists at the snapshot path, it is implicitly assumed to be in ComfyUI-Manager/snapshots.
* `--pip-non-url`: Restore for pip packages registered on PyPI.
* `--pip-non-local-url`: Restore for pip packages registered at web URLs.
* `--pip-local-url`: Restore for pip packages specified by local paths.
### 5. CLI Only Mode
You can set whether to use ComfyUI-Manager solely via CLI.
`cli-only-mode [enable|disable]`
* This mode can be used if you want to restrict the use of ComfyUI-Manager through the GUI for security or policy reasons.
* When CLI only mode is enabled, ComfyUI-Manager is loaded in a very restricted state, the internal web API is disabled, and the Manager button is not displayed in the main menu.
### 6. Dependency Restoration
`restore-dependencies`
* This command can be used if custom nodes are installed under the `ComfyUI/custom_nodes` path but their dependencies are not installed.
* It is useful when starting a new cloud instance, like colab, where dependencies need to be reinstalled and installation scripts re-executed.
* It can also be utilized if ComfyUI is reinstalled and only the custom_nodes path has been backed up and restored.
### 7. Clear
In the GUI, installations, updates, or snapshot restorations are scheduled to execute the next time ComfyUI is launched. The `clear` command clears this scheduled state, ensuring no pre-execution actions are applied.

View File

@ -0,0 +1,40 @@
# Use `aria2` as downloader
Two environment variables are needed to use `aria2` as the downloader.
```bash
export COMFYUI_MANAGER_ARIA2_SERVER=http://127.0.0.1:6800
export COMFYUI_MANAGER_ARIA2_SECRET=__YOU_MUST_CHANGE_IT__
```
An example `docker-compose.yml`
```yaml
services:
aria2:
container_name: aria2
image: p3terx/aria2-pro
environment:
- PUID=1000
- PGID=1000
- UMASK_SET=022
- RPC_SECRET=__YOU_MUST_CHANGE_IT__
- RPC_PORT=5080
- DISK_CACHE=64M
- IPV6_MODE=false
- UPDATE_TRACKERS=false
- CUSTOM_TRACKER_URL=
volumes:
- ./config:/config
- ./downloads:/downloads
- ~/ComfyUI/models:/models
- ~/ComfyUI/custom_nodes:/custom_nodes
ports:
- 6800:6800
restart: unless-stopped
logging:
driver: json-file
options:
max-size: 1m
```

View File

@ -0,0 +1,149 @@
# `cm-cli`: ComfyUI-Manager CLI
`cm-cli` 는 ComfyUI를 실행시키지 않고 command line에서 ComfyUI-Manager의 여러가지 기능을 사용할 수 있도록 도와주는 도구입니다.
```
-= ComfyUI-Manager CLI (V2.24) =-
python cm-cli.py [OPTIONS]
OPTIONS:
[install|reinstall|uninstall|update|disable|enable|fix] node_name ... ?[--channel <channel name>] ?[--mode [remote|local|cache]]
[update|disable|enable|fix] all ?[--channel <channel name>] ?[--mode [remote|local|cache]]
[simple-show|show] [installed|enabled|not-installed|disabled|all|snapshot|snapshot-list] ?[--channel <channel name>] ?[--mode [remote|local|cache]]
save-snapshot ?[--output <snapshot .json/.yaml>]
restore-snapshot <snapshot .json/.yaml> ?[--pip-non-url] ?[--pip-non-local-url] ?[--pip-local-url]
cli-only-mode [enable|disable]
restore-dependencies
clear
```
## How To Use?
* `python cm-cli.py` 를 통해서 실행 시킬 수 있습니다.
* 예를 들어 custom node를 모두 업데이트 하고 싶다면
* ComfyUI-Manager경로 에서 `python cm-cli.py update all` 를 command를 실행할 수 있습니다.
* ComfyUI 경로에서 실행한다면, `python custom_nodes/ComfyUI-Manager/cm-cli.py update all` 와 같이 cm-cli.py 의 경로를 지정할 수도 있습니다.
## Prerequisite
* ComfyUI 를 실행하는 python과 동일한 python 환경에서 실행해야 합니다.
* venv를 사용할 경우 해당 venv를 activate 한 상태에서 실행해야 합니다.
* portable 버전을 사용할 경우 run_nvidia_gpu.bat 파일이 있는 경로인 경우, 다음과 같은 방식으로 코맨드를 실행해야 합니다.
`.\python_embeded\python.exe ComfyUI\custom_nodes\ComfyUI-Manager\cm-cli.py update all`
* ComfyUI 의 경로는 COMFYUI_PATH 환경 변수로 설정할 수 있습니다. 만약 생략할 경우 다음과 같은 경고 메시지가 나타나며, ComfyUI-Manager가 설치된 경로를 기준으로 상대 경로로 설정됩니다.
```
WARN: The `COMFYUI_PATH` environment variable is not set. Assuming `custom_nodes/ComfyUI-Manager/../../` as the ComfyUI path.
```
## Features
### 1. --channel, --mode
* 정보 보기 기능과 커스텀 노드 관리 기능의 경우는 --channel과 --mode를 통해 정보 DB를 설정할 수 있습니다.
* 예들 들어 `python cm-cli.py update all --channel recent --mode remote`와 같은 command를 실행할 경우, 현재 ComfyUI-Manager repo에 내장된 로컬의 정보가 아닌 remote의 최신 정보를 기준으로 동작하며, recent channel에 있는 목록을 대상으로만 동작합니다.
* --channel, --mode 는 `simple-show, show, install, uninstall, update, disable, enable, fix` command에서만 사용 가능합니다.
### 2. 관리 정보 보기
`[simple-show|show] [installed|enabled|not-installed|disabled|all|snapshot|snapshot-list] ?[--channel <channel name>] ?[--mode [remote|local|cache]]`
* `[show|simple-show]` - `show`는 상세하게 정보를 보여주며, `simple-show`는 간단하게 정보를 보여줍니다.
`python cm-cli.py show installed` 와 같은 코맨드를 실행하면 설치된 커스텀 노드의 정보를 상세하게 보여줍니다.
```
-= ComfyUI-Manager CLI (V2.24) =-
FETCH DATA from: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/custom-node-list.json
[ ENABLED ] ComfyUI-Manager (author: Dr.Lt.Data)
[ ENABLED ] ComfyUI-Impact-Pack (author: Dr.Lt.Data)
[ ENABLED ] ComfyUI-Inspire-Pack (author: Dr.Lt.Data)
[ ENABLED ] ComfyUI_experiments (author: comfyanonymous)
[ ENABLED ] ComfyUI-SAI_API (author: Stability-AI)
[ ENABLED ] stability-ComfyUI-nodes (author: Stability-AI)
[ ENABLED ] comfyui_controlnet_aux (author: Fannovel16)
[ ENABLED ] ComfyUI-Frame-Interpolation (author: Fannovel16)
[ DISABLED ] ComfyUI-Loopchain (author: Fannovel16)
```
`python cm-cli.py simple-show installed` 와 같은 코맨드를 이용해서 설치된 커스텀 노드의 정보를 간단하게 보여줍니다.
```
-= ComfyUI-Manager CLI (V2.24) =-
FETCH DATA from: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/custom-node-list.json
ComfyUI-Manager
ComfyUI-Impact-Pack
ComfyUI-Inspire-Pack
ComfyUI_experiments
ComfyUI-SAI_API
stability-ComfyUI-nodes
comfyui_controlnet_aux
ComfyUI-Frame-Interpolation
ComfyUI-Loopchain
```
* `[installed|enabled|not-installed|disabled|all|snapshot|snapshot-list]`
* `enabled`, `disabled`: 설치된 커스텀 노드들 중 enable 되었거나, disable된 노드들을 보여줍니다.
* `installed`: enable, disable 여부와 상관없이 설치된 모든 노드를 보여줍니다
* `not-installed`: 설치되지 않은 커스텀 노드의 목록을 보여줍니다.
* `all`: 모든 커스텀 노드의 목록을 보여줍니다.
* `snapshot`: 현재 설치된 커스텀 노드의 snapshot 정보를 보여줍니다. `show`롤 통해서 볼 경우는 json 출력 형태로 보여주며, `simple-show`를 통해서 볼 경우는 간단하게, 커밋 해시와 함께 보여줍니다.
* `snapshot-list`: ComfyUI-Manager/snapshots 에 저장된 snapshot 파일의 목록을 보여줍니다.
### 3. 커스텀 노드 관리 하기
`[install|reinstall|uninstall|update|disable|enable|fix] node_name ... ?[--channel <channel name>] ?[--mode [remote|local|cache]]`
* `python cm-cli.py install ComfyUI-Impact-Pack ComfyUI-Inspire-Pack ComfyUI_experiments` 와 같이 커스텀 노드의 이름을 나열해서 관리 기능을 적용할 수 있습니다.
* 커스텀 노드의 이름은 `show`를 했을 때 보여주는 이름이며, git repository의 이름입니다.
(추후 nickname 을 사용가능하돌고 업데이트 할 예정입니다.)
`[update|disable|enable|fix] all ?[--channel <channel name>] ?[--mode [remote|local|cache]]`
* `update, disable, enable, fix` 기능은 all 로 지정 가능합니다.
* 세부 동작
* `install`: 지정된 커스텀 노드들을 설치합니다
* `reinstall`: 지정된 커스텀 노드를 삭제하고 재설치 합니다.
* `uninstall`: 지정된 커스텀 노드들을 삭제합니다.
* `update`: 지정된 커스텀 노드들을 업데이트합니다.
* `disable`: 지정된 커스텀 노드들을 비활성화합니다.
* `enable`: 지정된 커스텀 노드들을 활성화합니다.
* `fix`: 지정된 커스텀 노드의 의존성을 고치기 위한 시도를 합니다.
### 4. 스냅샷 관리 기능
* `python cm-cli.py save-snapshot ?[--output <snapshot .json/.yaml>]`: 현재의 snapshot을 저장합니다.
* --output 으로 임의의 경로에 .yaml 파일과 format으로 저장할 수 있습니다.
* `python cm-cli.py restore-snapshot <snapshot .json/.yaml>`: 지정된 snapshot으로 복구합니다.
* snapshot 경로에 파일이 존재하는 경우 해당 snapshot을 로드합니다.
* snapshot 경로에 파일이 존재하지 않는 경우 묵시적으로, ComfyUI-Manager/snapshots 에 있다고 가정합니다.
* `--pip-non-url`: PyPI 에 등록된 pip 패키지들에 대해서 복구를 수행
* `--pip-non-local-url`: web URL에 등록된 pip 패키지들에 대해서 복구를 수행
* `--pip-local-url`: local 경로를 지정하고 있는 pip 패키지들에 대해서 복구를 수행
### 5. CLI only mode
ComfyUI-Manager를 CLI로만 사용할 것인지를 설정할 수 있습니다.
`cli-only-mode [enable|disable]`
* security 혹은 policy 의 이유로 GUI 를 통한 ComfyUI-Manager 사용을 제한하고 싶은 경우 이 모드를 사용할 수 있습니다.
* CLI only mode를 적용할 경우 ComfyUI-Manager 가 매우 제한된 상태로 로드되어, 내부적으로 제공하는 web API가 비활성화 되며, 메인 메뉴에서도 Manager 버튼이 표시되지 않습니다.
### 6. 의존성 설치
`restore-dependencies`
* `ComfyUI/custom_nodes` 하위 경로에 커스텀 노드들이 설치되어 있긴 하지만, 의존성이 설치되지 않은 경우 사용할 수 있습니다.
* colab 과 같이 cloud instance를 새로 시작하는 경우 의존성 재설치 및 설치 스크립트가 재실행 되어야 하는 경우 사용합니다.
* ComfyUI을 재설치할 경우, custom_nodes 경로만 백업했다가 재설치 할 경우 활용 가능합니다.
### 7. clear
GUI에서 install, update를 하거나 snapshot 을 restore하는 경우 예약을 통해서 다음번 ComfyUI를 실행할 경우 실행되는 구조입니다. `clear` 는 이런 예약 상태를 clear해서, 아무런 사전 실행이 적용되지 않도록 합니다.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,426 @@
import subprocess
import sys
import os
import traceback
import git
import configparser
import re
import json
import yaml
from torchvision.datasets.utils import download_url
from tqdm.auto import tqdm
from git.remote import RemoteProgress
config_path = os.path.join(os.path.dirname(__file__), "config.ini")
nodelist_path = os.path.join(os.path.dirname(__file__), "custom-node-list.json")
working_directory = os.getcwd()
if os.path.basename(working_directory) != 'custom_nodes':
print(f"WARN: This script should be executed in custom_nodes dir")
print(f"DBG: INFO {working_directory}")
print(f"DBG: INFO {sys.argv}")
# exit(-1)
class GitProgress(RemoteProgress):
def __init__(self):
super().__init__()
self.pbar = tqdm(ascii=True)
def update(self, op_code, cur_count, max_count=None, message=''):
self.pbar.total = max_count
self.pbar.n = cur_count
self.pbar.pos = 0
self.pbar.refresh()
def gitclone(custom_nodes_path, url, target_hash=None):
repo_name = os.path.splitext(os.path.basename(url))[0]
repo_path = os.path.join(custom_nodes_path, repo_name)
# Clone the repository from the remote URL
repo = git.Repo.clone_from(url, repo_path, recursive=True, progress=GitProgress())
if target_hash is not None:
print(f"CHECKOUT: {repo_name} [{target_hash}]")
repo.git.checkout(target_hash)
repo.git.clear_cache()
repo.close()
def gitcheck(path, do_fetch=False):
try:
# Fetch the latest commits from the remote repository
repo = git.Repo(path)
if repo.head.is_detached:
print("CUSTOM NODE CHECK: True")
return
current_branch = repo.active_branch
branch_name = current_branch.name
remote_name = current_branch.tracking_branch().remote_name
remote = repo.remote(name=remote_name)
if do_fetch:
remote.fetch()
# Get the current commit hash and the commit hash of the remote branch
commit_hash = repo.head.commit.hexsha
remote_commit_hash = repo.refs[f'{remote_name}/{branch_name}'].object.hexsha
# Compare the commit hashes to determine if the local repository is behind the remote repository
if commit_hash != remote_commit_hash:
# Get the commit dates
commit_date = repo.head.commit.committed_datetime
remote_commit_date = repo.refs[f'{remote_name}/{branch_name}'].object.committed_datetime
# Compare the commit dates to determine if the local repository is behind the remote repository
if commit_date < remote_commit_date:
print("CUSTOM NODE CHECK: True")
else:
print("CUSTOM NODE CHECK: False")
except Exception as e:
print(e)
print("CUSTOM NODE CHECK: Error")
def switch_to_default_branch(repo):
show_result = repo.git.remote("show", "origin")
matches = re.search(r"\s*HEAD branch:\s*(.*)", show_result)
if matches:
default_branch = matches.group(1)
repo.git.checkout(default_branch)
def gitpull(path):
# Check if the path is a git repository
if not os.path.exists(os.path.join(path, '.git')):
raise ValueError('Not a git repository')
# Pull the latest changes from the remote repository
repo = git.Repo(path)
if repo.is_dirty():
repo.git.stash()
commit_hash = repo.head.commit.hexsha
try:
if repo.head.is_detached:
switch_to_default_branch(repo)
current_branch = repo.active_branch
branch_name = current_branch.name
remote_name = current_branch.tracking_branch().remote_name
remote = repo.remote(name=remote_name)
remote.fetch()
remote_commit_hash = repo.refs[f'{remote_name}/{branch_name}'].object.hexsha
if commit_hash == remote_commit_hash:
print("CUSTOM NODE PULL: None") # there is no update
repo.close()
return
remote.pull()
repo.git.submodule('update', '--init', '--recursive')
new_commit_hash = repo.head.commit.hexsha
if commit_hash != new_commit_hash:
print("CUSTOM NODE PULL: Success") # update success
else:
print("CUSTOM NODE PULL: Fail") # update fail
except Exception as e:
print(e)
print("CUSTOM NODE PULL: Fail") # unknown git error
repo.close()
def checkout_comfyui_hash(target_hash):
repo_path = os.path.abspath(os.path.join(working_directory, '..')) # ComfyUI dir
repo = git.Repo(repo_path)
commit_hash = repo.head.commit.hexsha
if commit_hash != target_hash:
try:
print(f"CHECKOUT: ComfyUI [{target_hash}]")
repo.git.checkout(target_hash)
except git.GitCommandError as e:
print(f"Error checking out the ComfyUI: {str(e)}")
def checkout_custom_node_hash(git_custom_node_infos):
repo_name_to_url = {}
for url in git_custom_node_infos.keys():
repo_name = url.split('/')[-1]
if repo_name.endswith('.git'):
repo_name = repo_name[:-4]
repo_name_to_url[repo_name] = url
for path in os.listdir(working_directory):
if path.endswith("ComfyUI-Manager"):
continue
fullpath = os.path.join(working_directory, path)
if os.path.isdir(fullpath):
is_disabled = path.endswith(".disabled")
try:
git_dir = os.path.join(fullpath, '.git')
if not os.path.exists(git_dir):
continue
need_checkout = False
repo_name = os.path.basename(fullpath)
if repo_name.endswith('.disabled'):
repo_name = repo_name[:-9]
if repo_name not in repo_name_to_url:
if not is_disabled:
# should be disabled
print(f"DISABLE: {repo_name}")
new_path = fullpath + ".disabled"
os.rename(fullpath, new_path)
need_checkout = False
else:
item = git_custom_node_infos[repo_name_to_url[repo_name]]
if item['disabled'] and is_disabled:
pass
elif item['disabled'] and not is_disabled:
# disable
print(f"DISABLE: {repo_name}")
new_path = fullpath + ".disabled"
os.rename(fullpath, new_path)
elif not item['disabled'] and is_disabled:
# enable
print(f"ENABLE: {repo_name}")
new_path = fullpath[:-9]
os.rename(fullpath, new_path)
fullpath = new_path
need_checkout = True
else:
need_checkout = True
if need_checkout:
repo = git.Repo(fullpath)
commit_hash = repo.head.commit.hexsha
if commit_hash != item['hash']:
print(f"CHECKOUT: {repo_name} [{item['hash']}]")
repo.git.checkout(item['hash'])
except Exception:
print(f"Failed to restore snapshots for the custom node '{path}'")
# clone missing
for k, v in git_custom_node_infos.items():
if not v['disabled']:
repo_name = k.split('/')[-1]
if repo_name.endswith('.git'):
repo_name = repo_name[:-4]
path = os.path.join(working_directory, repo_name)
if not os.path.exists(path):
print(f"CLONE: {path}")
gitclone(working_directory, k, v['hash'])
def invalidate_custom_node_file(file_custom_node_infos):
global nodelist_path
enabled_set = set()
for item in file_custom_node_infos:
if not item['disabled']:
enabled_set.add(item['filename'])
for path in os.listdir(working_directory):
fullpath = os.path.join(working_directory, path)
if not os.path.isdir(fullpath) and fullpath.endswith('.py'):
if path not in enabled_set:
print(f"DISABLE: {path}")
new_path = fullpath+'.disabled'
os.rename(fullpath, new_path)
elif not os.path.isdir(fullpath) and fullpath.endswith('.py.disabled'):
path = path[:-9]
if path in enabled_set:
print(f"ENABLE: {path}")
new_path = fullpath[:-9]
os.rename(fullpath, new_path)
# download missing: just support for 'copy' style
py_to_url = {}
with open(nodelist_path, 'r', encoding="UTF-8") as json_file:
info = json.load(json_file)
for item in info['custom_nodes']:
if item['install_type'] == 'copy':
for url in item['files']:
if url.endswith('.py'):
py = url.split('/')[-1]
py_to_url[py] = url
for item in file_custom_node_infos:
filename = item['filename']
if not item['disabled']:
target_path = os.path.join(working_directory, filename)
if not os.path.exists(target_path) and filename in py_to_url:
url = py_to_url[filename]
print(f"DOWNLOAD: {filename}")
download_url(url, working_directory)
def apply_snapshot(target):
try:
path = os.path.join(os.path.dirname(__file__), 'snapshots', f"{target}")
if os.path.exists(path):
if not target.endswith('.json') and not target.endswith('.yaml'):
print(f"Snapshot file not found: `{path}`")
print("APPLY SNAPSHOT: False")
return None
with open(path, 'r', encoding="UTF-8") as snapshot_file:
if target.endswith('.json'):
info = json.load(snapshot_file)
elif target.endswith('.yaml'):
info = yaml.load(snapshot_file, Loader=yaml.SafeLoader)
info = info['custom_nodes']
else:
# impossible case
print("APPLY SNAPSHOT: False")
return None
comfyui_hash = info['comfyui']
git_custom_node_infos = info['git_custom_nodes']
file_custom_node_infos = info['file_custom_nodes']
checkout_comfyui_hash(comfyui_hash)
checkout_custom_node_hash(git_custom_node_infos)
invalidate_custom_node_file(file_custom_node_infos)
print("APPLY SNAPSHOT: True")
if 'pips' in info:
return info['pips']
else:
return None
print(f"Snapshot file not found: `{path}`")
print("APPLY SNAPSHOT: False")
return None
except Exception as e:
print(e)
traceback.print_exc()
print("APPLY SNAPSHOT: False")
return None
def restore_pip_snapshot(pips, options):
non_url = []
local_url = []
non_local_url = []
for k, v in pips.items():
if v == "":
non_url.append(k)
else:
if v.startswith('file:'):
local_url.append(v)
else:
non_local_url.append(v)
failed = []
if '--pip-non-url' in options:
# try all at once
res = 1
try:
res = subprocess.check_call([sys.executable, '-m', 'pip', 'install'] + non_url)
except:
pass
# fallback
if res != 0:
for x in non_url:
res = 1
try:
res = subprocess.check_call([sys.executable, '-m', 'pip', 'install', x])
except:
pass
if res != 0:
failed.append(x)
if '--pip-non-local-url' in options:
for x in non_local_url:
res = 1
try:
res = subprocess.check_call([sys.executable, '-m', 'pip', 'install', x])
except:
pass
if res != 0:
failed.append(x)
if '--pip-local-url' in options:
for x in local_url:
res = 1
try:
res = subprocess.check_call([sys.executable, '-m', 'pip', 'install', x])
except:
pass
if res != 0:
failed.append(x)
print(f"Installation failed for pip packages: {failed}")
def setup_environment():
config = configparser.ConfigParser()
config.read(config_path)
if 'default' in config and 'git_exe' in config['default'] and config['default']['git_exe'] != '':
git.Git().update_environment(GIT_PYTHON_GIT_EXECUTABLE=config['default']['git_exe'])
setup_environment()
try:
if sys.argv[1] == "--clone":
gitclone(sys.argv[2], sys.argv[3])
elif sys.argv[1] == "--check":
gitcheck(sys.argv[2], False)
elif sys.argv[1] == "--fetch":
gitcheck(sys.argv[2], True)
elif sys.argv[1] == "--pull":
gitpull(sys.argv[2])
elif sys.argv[1] == "--apply-snapshot":
options = set()
for x in sys.argv:
if x in ['--pip-non-url', '--pip-local-url', '--pip-non-local-url']:
options.add(x)
pips = apply_snapshot(sys.argv[2])
if pips and len(options) > 0:
restore_pip_snapshot(pips, options)
sys.exit(0)
except Exception as e:
print(e)
sys.exit(-1)

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,112 @@
import traceback
#
# Global Var
#
# Usage:
# import cm_global
# cm_global.variables['comfyui.revision'] = 1832
# print(f"log mode: {cm_global.variables['logger.enabled']}")
#
variables = {}
#
# Global API
#
# Usage:
# [register API]
# import cm_global
#
# def api_hello(msg):
# print(f"hello: {msg}")
# return msg
#
# cm_global.register_api('hello', api_hello)
#
# [use API]
# import cm_global
#
# test = cm_global.try_call(api='hello', msg='an example')
# print(f"'{test}' is returned")
#
APIs = {}
def register_api(k, f):
global APIs
APIs[k] = f
def try_call(**kwargs):
if 'api' in kwargs:
api_name = kwargs['api']
try:
api = APIs.get(api_name)
if api is not None:
del kwargs['api']
return api(**kwargs)
else:
print(f"WARN: The '{kwargs['api']}' API has not been registered.")
except Exception as e:
print(f"ERROR: An exception occurred while calling the '{api_name}' API.")
raise e
else:
return None
#
# Extension Info
#
# Usage:
# import cm_global
#
# cm_global.extension_infos['my_extension'] = {'version': [0, 1], 'name': 'me', 'description': 'example extension', }
#
extension_infos = {}
on_extension_registered_handlers = {}
def register_extension(extension_name, v):
global extension_infos
global on_extension_registered_handlers
extension_infos[extension_name] = v
if extension_name in on_extension_registered_handlers:
for k, f in on_extension_registered_handlers[extension_name]:
try:
f(extension_name, v)
except Exception:
print(f"[ERROR] '{k}' on_extension_registered_handlers")
traceback.print_exc()
del on_extension_registered_handlers[extension_name]
def add_on_extension_registered(k, extension_name, f):
global on_extension_registered_handlers
if extension_name in extension_infos:
try:
v = extension_infos[extension_name]
f(extension_name, v)
except Exception:
print(f"[ERROR] '{k}' on_extension_registered_handler")
traceback.print_exc()
else:
if extension_name not in on_extension_registered_handlers:
on_extension_registered_handlers[extension_name] = []
on_extension_registered_handlers[extension_name].append((k, f))
def add_on_revision_detected(k, f):
if 'comfyui.revision' in variables:
try:
f(variables['comfyui.revision'])
except Exception:
print(f"[ERROR] '{k}' on_revision_detected_handler")
traceback.print_exc()
else:
variables['cm.on_revision_detected_handler'].append((k, f))

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,70 @@
import os
from urllib.parse import urlparse
aria2 = os.getenv('COMFYUI_MANAGER_ARIA2_SERVER')
HF_ENDPOINT = os.getenv('HF_ENDPOINT')
if aria2 is not None:
secret = os.getenv('COMFYUI_MANAGER_ARIA2_SECRET')
url = urlparse(aria2)
port = url.port
host = url.scheme + '://' + url.hostname
import aria2p
aria2 = aria2p.API(aria2p.Client(host=host, port=port, secret=secret))
def download_url(model_url: str, model_dir: str, filename: str):
if aria2:
return aria2_download_url(model_url, model_dir, filename)
else:
from torchvision.datasets.utils import download_url as torchvision_download_url
return torchvision_download_url(model_url, model_dir, filename)
def aria2_find_task(dir: str, filename: str):
target = os.path.join(dir, filename)
downloads = aria2.get_downloads()
for download in downloads:
for file in download.files:
if file.is_metadata:
continue
if str(file.path) == target:
return download
def aria2_download_url(model_url: str, model_dir: str, filename: str):
import manager_core as core
import tqdm
import time
if model_dir.startswith(core.comfy_path):
model_dir = model_dir[len(core.comfy_path) :]
if HF_ENDPOINT:
model_url = model_url.replace('https://huggingface.co', HF_ENDPOINT)
download_dir = model_dir if model_dir.startswith('/') else os.path.join('/models', model_dir)
download = aria2_find_task(download_dir, filename)
if download is None:
options = {'dir': download_dir, 'out': filename}
download = aria2.add(model_url, options)[0]
if download.is_active:
with tqdm.tqdm(
total=download.total_length,
bar_format='{l_bar}{bar}{r_bar}',
desc=filename,
unit='B',
unit_scale=True,
) as progress_bar:
while download.is_active:
if progress_bar.total == 0 and download.total_length != 0:
progress_bar.reset(download.total_length)
progress_bar.update(download.completed_length - progress_bar.n)
time.sleep(1)
download.update()

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,63 @@
try:
from distutils.version import StrictVersion
except:
print(f"[ComfyUI-Manager] 'distutils' package not found. Activating fallback mode for compatibility.")
class StrictVersion:
def __init__(self, version_string):
self.version_string = version_string
self.major = 0
self.minor = 0
self.patch = 0
self.pre_release = None
self.parse_version_string()
def parse_version_string(self):
parts = self.version_string.split('.')
if not parts:
raise ValueError("Version string must not be empty")
self.major = int(parts[0])
self.minor = int(parts[1]) if len(parts) > 1 else 0
self.patch = int(parts[2]) if len(parts) > 2 else 0
# Handling pre-release versions if present
if len(parts) > 3:
self.pre_release = parts[3]
def __str__(self):
version = f"{self.major}.{self.minor}.{self.patch}"
if self.pre_release:
version += f"-{self.pre_release}"
return version
def __eq__(self, other):
return (self.major, self.minor, self.patch, self.pre_release) == \
(other.major, other.minor, other.patch, other.pre_release)
def __lt__(self, other):
if (self.major, self.minor, self.patch) == (other.major, other.minor, other.patch):
return self.pre_release_compare(self.pre_release, other.pre_release) < 0
return (self.major, self.minor, self.patch) < (other.major, other.minor, other.patch)
@staticmethod
def pre_release_compare(pre1, pre2):
if pre1 == pre2:
return 0
if pre1 is None:
return 1
if pre2 is None:
return -1
return -1 if pre1 < pre2 else 1
def __le__(self, other):
return self == other or self < other
def __gt__(self, other):
return not self <= other
def __ge__(self, other):
return not self < other
def __ne__(self, other):
return not self == other

View File

@ -0,0 +1,80 @@
import sys
import subprocess
import os
def security_check():
print("[START] Security scan")
custom_nodes_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..'))
comfyui_path = os.path.abspath(os.path.join(custom_nodes_path, '..'))
guide = {
"ComfyUI_LLMVISION": """
0.Remove ComfyUI\\custom_nodes\\ComfyUI_LLMVISION.
1.Remove pip packages: openai-1.16.3.dist-info, anthropic-0.21.4.dist-info, openai-1.30.2.dist-info, anthropic-0.26.1.dist-info, %LocalAppData%\\rundll64.exe
(For portable versions, it is recommended to reinstall. If you are using a venv, it is advised to recreate the venv.)
2.Remove these files in your system: lib/browser/admin.py, Cadmino.py, Fadmino.py, VISION-D.exe, BeamNG.UI.exe
3.Check your Windows registry for the key listed above and remove it.
(HKEY_CURRENT_USER\\Software\\OpenAICLI)
4.Run a malware scanner.
5.Change all of your passwords, everywhere.
(Reinstall OS is recommended.)
\n
Detailed information: https://old.reddit.com/r/comfyui/comments/1dbls5n/psa_if_youve_used_the_comfyui_llmvision_node_from/
""",
"lolMiner": """
1. Remove pip packages: lolMiner*
2. Remove files: lolMiner*, 4G_Ethash_Linux_Readme.txt, mine* in ComfyUI dir.
(Reinstall ComfyUI is recommended.)
"""
}
node_blacklist = {"ComfyUI_LLMVISION": "ComfyUI_LLMVISION"}
pip_blacklist = {"AppleBotzz": "ComfyUI_LLMVISION"}
file_blacklist = {
"ComfyUI_LLMVISION": ["%LocalAppData%\\rundll64.exe"],
"lolMiner": [os.path.join(comfyui_path, 'lolMiner')]
}
installed_pips = subprocess.check_output([sys.executable, '-m', "pip", "freeze"], text=True)
detected = set()
for k, v in node_blacklist.items():
if os.path.exists(os.path.join(custom_nodes_path, k)):
print(f"[SECURITY ALERT] custom node '{k}' is dangerous.")
detected.add(v)
for k, v in pip_blacklist.items():
if k in installed_pips:
detected.add(v)
break
for k, v in file_blacklist.items():
for x in v:
if os.path.exists(os.path.expandvars(x)):
detected.add(k)
break
if len(detected) > 0:
for line in installed_pips.split('\n'):
for k, v in pip_blacklist.items():
if k in line:
print(f"[SECURITY ALERT] '{line}' is dangerous.")
print("\n########################################################################")
print(" Malware has been detected, forcibly terminating ComfyUI execution.")
print("########################################################################\n")
for x in detected:
print(f"\n======== TARGET: {x} =========")
print(f"\nTODO:")
print(guide.get(x))
exit(-1)
print("[DONE] Security scan")

View File

@ -0,0 +1,63 @@
import { api } from "../../scripts/api.js";
import { app } from "../../scripts/app.js";
import { sleep } from "./common.js";
async function tryInstallCustomNode(event) {
let msg = '-= [ComfyUI Manager] extension installation request =-\n\n';
msg += `The '${event.detail.sender}' extension requires the installation of the '${event.detail.title}' extension. `;
if(event.detail.target.installed == 'Disabled') {
msg += 'However, the extension is currently disabled. Would you like to enable it and reboot?'
}
else if(event.detail.target.installed == 'True') {
msg += 'However, it seems that the extension is in an import-fail state or is not compatible with the current version. Please address this issue.';
}
else {
msg += `Would you like to install it and reboot?`;
}
msg += `\n\nRequest message:\n${event.detail.msg}`;
if(event.detail.target.installed == 'True') {
alert(msg);
return;
}
let res = confirm(msg);
if(res) {
if(event.detail.target.installed == 'Disabled') {
const response = await api.fetchApi(`/customnode/toggle_active`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(event.detail.target)
});
}
else {
await sleep(300);
app.ui.dialog.show(`Installing... '${event.detail.target.title}'`);
const response = await api.fetchApi(`/customnode/install`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(event.detail.target)
});
if(response.status == 403) {
show_message('This action is not allowed with this security level configuration.');
return false;
}
}
let response = await api.fetchApi("/manager/reboot");
if(response.status == 403) {
show_message('This action is not allowed with this security level configuration.');
return false;
}
await sleep(300);
app.ui.dialog.show(`Rebooting...`);
}
}
api.addEventListener("cm-api-try-install-customnode", tryInstallCustomNode);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,892 @@
import { app } from "../../scripts/app.js";
import { $el, ComfyDialog } from "../../scripts/ui.js";
const env = "prod";
let DEFAULT_HOMEPAGE_URL = "https://copus.io";
let API_ENDPOINT = "https://api.client.prod.copus.io/copus-client";
if (env !== "prod") {
API_ENDPOINT = "https://api.dev.copus.io/copus-client";
DEFAULT_HOMEPAGE_URL = "https://test.copus.io";
}
const style = `
.copus-share-dialog a {
color: #f8f8f8;
}
.copus-share-dialog a:hover {
color: #007bff;
}
.output_label {
border: 5px solid transparent;
}
.output_label:hover {
border: 5px solid #59E8C6;
}
.output_label.checked {
border: 5px solid #59E8C6;
}
`;
// Shared component styles
const sectionStyle = {
marginBottom: 0,
padding: 0,
borderRadius: "8px",
boxShadow: "0 2px 4px rgba(0, 0, 0, 0.05)",
display: "flex",
flexDirection: "column",
justifyContent: "center",
position: "relative",
};
export class CopusShareDialog extends ComfyDialog {
static instance = null;
constructor() {
super();
$el("style", {
textContent: style,
parent: document.head,
});
this.element = $el(
"div.comfy-modal.copus-share-dialog",
{
parent: document.body,
style: {
"overflow-y": "auto",
},
},
[$el("div.comfy-modal-content", {}, [...this.createButtons()])]
);
this.selectedOutputIndex = 0;
this.selectedNodeId = null;
this.uploadedImages = [];
this.allFilesImages = [];
this.selectedFile = null;
this.allFiles = [];
this.titleNum = 0;
}
createButtons() {
const inputStyle = {
display: "block",
minWidth: "500px",
width: "100%",
padding: "10px",
margin: "10px 0",
borderRadius: "4px",
border: "1px solid #ddd",
boxSizing: "border-box",
};
const textAreaStyle = {
display: "block",
minWidth: "500px",
width: "100%",
padding: "10px",
margin: "10px 0",
borderRadius: "4px",
border: "1px solid #ddd",
boxSizing: "border-box",
minHeight: "100px",
background: "#222",
resize: "vertical",
color: "#f2f2f2",
fontFamily: "Arial",
fontWeight: "400",
fontSize: "15px",
};
const hyperLinkStyle = {
display: "block",
marginBottom: "15px",
fontWeight: "bold",
fontSize: "14px",
};
const labelStyle = {
color: "#f8f8f8",
display: "block",
margin: "10px 0 0 0",
fontWeight: "bold",
textDecoration: "none",
};
const buttonStyle = {
padding: "10px 80px",
margin: "10px 5px",
borderRadius: "4px",
border: "none",
cursor: "pointer",
color: "#fff",
backgroundColor: "#007bff",
};
// upload images input
this.uploadImagesInput = $el("input", {
type: "file",
multiple: false,
style: inputStyle,
accept: "image/*",
});
this.uploadImagesInput.addEventListener("change", async (e) => {
const file = e.target.files[0];
if (!file) {
this.previewImage.src = "";
this.previewImage.style.display = "none";
return;
}
const reader = new FileReader();
reader.onload = async (e) => {
const imgData = e.target.result;
this.previewImage.src = imgData;
this.previewImage.style.display = "block";
this.selectedFile = null;
// Once user uploads an image, we uncheck all radio buttons
this.radioButtons.forEach((ele) => {
ele.checked = false;
ele.parentElement.classList.remove("checked");
});
// Add the opacity style toggle here to indicate that they only need
// to upload one image or choose one from the outputs.
this.outputsSection.style.opacity = 0.35;
this.uploadImagesInput.style.opacity = 1;
};
reader.readAsDataURL(file);
});
// preview image
this.previewImage = $el("img", {
src: "",
style: {
width: "100%",
maxHeight: "100px",
objectFit: "contain",
display: "none",
marginTop: "10px",
},
});
this.keyInput = $el("input", {
type: "password",
placeholder: "Copy & paste your API key",
style: inputStyle,
});
this.TitleInput = $el("input", {
type: "text",
placeholder: "Title (Required)",
style: inputStyle,
maxLength: "70",
oninput: () => {
const titleNum = this.TitleInput.value.length;
titleNumDom.textContent = `${titleNum}/70`;
},
});
this.SubTitleInput = $el("input", {
type: "text",
placeholder: "Subtitle (Optional)",
style: inputStyle,
maxLength: "70",
oninput: () => {
const titleNum = this.SubTitleInput.value.length;
subTitleNumDom.textContent = `${titleNum}/70`;
},
});
this.descriptionInput = $el("textarea", {
placeholder: "Content (Optional)",
style: {
...textAreaStyle,
minHeight: "100px",
},
});
// Header Section
const headerSection = $el("h3", {
textContent: "Share your workflow to Copus",
size: 3,
color: "white",
style: {
"text-align": "center",
color: "white",
margin: "0 0 10px 0",
},
});
this.getAPIKeyLink = $el(
"a",
{
style: {
...hyperLinkStyle,
color: "#59E8C6",
},
href: `${DEFAULT_HOMEPAGE_URL}?fromPage=comfyUI`,
target: "_blank",
},
["👉 Get your API key here"]
);
const linkSection = $el(
"div",
{
style: {
marginTop: "10px",
display: "flex",
flexDirection: "column",
},
},
[
// this.communityLink,
this.getAPIKeyLink,
]
);
// Account Section
const accountSection = $el("div", { style: sectionStyle }, [
$el("label", { style: labelStyle }, ["1⃣ Copus API Key"]),
this.keyInput,
]);
// Output Upload Section
const outputUploadSection = $el("div", { style: sectionStyle }, [
$el(
"label",
{
style: {
...labelStyle,
margin: "10px 0 0 0",
},
},
["2⃣ Image/Thumbnail (Required)"]
),
this.previewImage,
this.uploadImagesInput,
]);
// Outputs Section
this.outputsSection = $el(
"div",
{
id: "selectOutputs",
},
[]
);
const titleNumDom = $el(
"label",
{
style: {
fontSize: "12px",
position: "absolute",
right: "10px",
bottom: "-10px",
color: "#999",
},
},
["0/70"]
);
const subTitleNumDom = $el(
"label",
{
style: {
fontSize: "12px",
position: "absolute",
right: "10px",
bottom: "-10px",
color: "#999",
},
},
["0/70"]
);
const descriptionNumDom = $el(
"label",
{
style: {
fontSize: "12px",
position: "absolute",
right: "10px",
bottom: "-10px",
color: "#999",
},
},
["0/70"]
);
// Additional Inputs Section
const additionalInputsSection = $el(
"div",
{ style: { ...sectionStyle, } },
[
$el("label", { style: labelStyle }, ["3⃣ Title "]),
this.TitleInput,
titleNumDom,
]
);
const SubtitleSection = $el("div", { style: sectionStyle }, [
$el("label", { style: labelStyle }, ["4⃣ Subtitle "]),
this.SubTitleInput,
subTitleNumDom,
]);
const DescriptionSection = $el("div", { style: sectionStyle }, [
$el("label", { style: labelStyle }, ["5⃣ Description "]),
this.descriptionInput,
// descriptionNumDom,
]);
// switch between outputs section and additional inputs section
this.radioButtons = [];
this.radioButtonsCheck = $el("input", {
type: "radio",
name: "output_type",
value: "0",
id: "blockchain1",
checked: true,
});
this.radioButtonsCheckOff = $el("input", {
type: "radio",
name: "output_type",
value: "1",
id: "blockchain",
});
const blockChainSection = $el("div", { style: sectionStyle }, [
$el("label", { style: labelStyle }, ["6⃣ Store on blockchain "]),
$el(
"label",
{
style: {
marginTop: "10px",
display: "flex",
alignItems: "center",
cursor: "pointer",
},
},
[
this.radioButtonsCheck,
$el("span", { style: { marginLeft: "5px" } }, ["ON"]),
]
),
$el(
"label",
{ style: { display: "flex", alignItems: "center", cursor: "pointer" } },
[
this.radioButtonsCheckOff,
$el("span", { style: { marginLeft: "5px" } }, ["OFF"]),
]
),
$el(
"p",
{ style: { fontSize: "16px", color: "#fff", margin: "10px 0 0 0" } },
["Secure ownership with a permanent & decentralized storage"]
),
]);
// Message Section
this.message = $el(
"div",
{
style: {
color: "#ff3d00",
textAlign: "center",
padding: "10px",
fontSize: "20px",
},
},
[]
);
this.shareButton = $el("button", {
type: "submit",
textContent: "Share",
style: buttonStyle,
onclick: () => {
this.handleShareButtonClick();
},
});
// Share and Close Buttons
const buttonsSection = $el(
"div",
{
style: {
textAlign: "right",
marginTop: "20px",
display: "flex",
justifyContent: "space-between",
},
},
[
$el("button", {
type: "button",
textContent: "Close",
style: {
...buttonStyle,
backgroundColor: undefined,
},
onclick: () => {
this.close();
},
}),
this.shareButton,
]
);
// Composing the full layout
const layout = [
headerSection,
linkSection,
accountSection,
outputUploadSection,
this.outputsSection,
additionalInputsSection,
SubtitleSection,
DescriptionSection,
// contestSection,
blockChainSection,
this.message,
buttonsSection,
];
return layout;
}
/**
* api
* @param {url} path
* @param {params} options
* @param {statusText} statusText
* @returns
*/
async fetchApi(path, options, statusText) {
if (statusText) {
this.message.textContent = statusText;
}
const fullPath = new URL(API_ENDPOINT + path);
const response = await fetch(fullPath, options);
if (!response.ok) {
throw new Error(response.statusText);
}
if (statusText) {
this.message.textContent = "";
}
const data = await response.json();
return {
ok: response.ok,
statusText: response.statusText,
status: response.status,
data,
};
}
/**
* @param {file} uploadFile
*/
async uploadThumbnail(uploadFile, type) {
const form = new FormData();
form.append("file", uploadFile);
form.append("apiToken", this.keyInput.value);
try {
const res = await this.fetchApi(
`/client/common/opus/uploadImage`,
{
method: "POST",
body: form,
},
"Uploading thumbnail..."
);
if (res.status && res.data.status && res.data) {
const { data } = res.data;
if (type) {
this.allFilesImages.push({
url: data,
});
}
this.uploadedImages.push({
url: data,
});
} else {
throw new Error("make sure your API key is correct and try again later");
}
} catch (e) {
if (e?.response?.status === 413) {
throw new Error("File size is too large (max 20MB)");
} else {
throw new Error("Error uploading thumbnail: " + e.message);
}
}
}
async handleShareButtonClick() {
this.message.textContent = "";
try {
this.shareButton.disabled = true;
this.shareButton.textContent = "Sharing...";
await this.share();
} catch (e) {
alert(e.message);
}
this.shareButton.disabled = false;
this.shareButton.textContent = "Share";
}
/**
* share
* @param {string} title
* @param {string} subtitle
* @param {string} content
* @param {boolean} storeOnChain
* @param {string} coverUrl
* @param {string[]} imageUrls
* @param {string} apiToken
*/
async share() {
const prompt = await app.graphToPrompt();
const workflowJSON = prompt["workflow"];
const form_values = {
title: this.TitleInput.value,
subTitle: this.SubTitleInput.value,
content: this.descriptionInput.value,
storeOnChain: this.radioButtonsCheck.checked ? true : false,
};
if (!this.keyInput.value) {
throw new Error("API key is required");
}
if (!this.uploadImagesInput.files[0] && !this.selectedFile) {
throw new Error("Thumbnail is required");
}
if (!form_values.title) {
throw new Error("Title is required");
}
if (!this.uploadedImages.length) {
if (this.selectedFile) {
await this.uploadThumbnail(this.selectedFile);
} else {
for (const file of this.uploadImagesInput.files) {
try {
await this.uploadThumbnail(file);
} catch (e) {
this.uploadedImages = [];
throw new Error(e.message);
}
}
if (this.uploadImagesInput.files.length === 0) {
throw new Error("No thumbnail uploaded");
}
}
}
if (this.allFiles.length > 0) {
for (const file of this.allFiles) {
try {
await this.uploadThumbnail(file, true);
} catch (e) {
this.allFilesImages = [];
throw new Error(e.message);
}
}
}
try {
const res = await this.fetchApi(
"/client/common/opus/shareFromComfyUI",
{
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
workflowJson: workflowJSON,
apiToken: this.keyInput.value,
coverUrl: this.uploadedImages[0].url,
imageUrls: this.allFilesImages.map((image) => image.url),
...form_values,
}),
},
"Uploading workflow..."
);
if (res.status && res.data.status && res.data) {
localStorage.setItem("copus_token",this.keyInput.value);
const { data } = res.data;
if (data) {
const url = `${DEFAULT_HOMEPAGE_URL}/work/${data}`;
this.message.innerHTML = `Workflow has been shared successfully. <a href="${url}" target="_blank">Click here to view it.</a>`;
this.previewImage.src = "";
this.previewImage.style.display = "none";
this.uploadedImages = [];
this.allFilesImages = [];
this.allFiles = [];
this.TitleInput.value = "";
this.SubTitleInput.value = "";
this.descriptionInput.value = "";
this.selectedFile = null;
}
}
} catch (e) {
throw new Error("Error sharing workflow: " + e.message);
}
}
async fetchImageBlob(url) {
const response = await fetch(url);
const blob = await response.blob();
return blob;
}
async show({ potential_outputs, potential_output_nodes } = {}) {
// Sort `potential_output_nodes` by node ID to make the order always
// consistent, but we should also keep `potential_outputs` in the same
// order as `potential_output_nodes`.
const potential_output_to_order = {};
potential_output_nodes.forEach((node, index) => {
if (node.id in potential_output_to_order) {
potential_output_to_order[node.id][1].push(potential_outputs[index]);
} else {
potential_output_to_order[node.id] = [node, [potential_outputs[index]]];
}
});
// Sort the object `potential_output_to_order` by key (node ID)
const sorted_potential_output_to_order = Object.fromEntries(
Object.entries(potential_output_to_order).sort(
(a, b) => a[0].id - b[0].id
)
);
const sorted_potential_outputs = [];
const sorted_potential_output_nodes = [];
for (const [key, value] of Object.entries(
sorted_potential_output_to_order
)) {
sorted_potential_output_nodes.push(value[0]);
sorted_potential_outputs.push(...value[1]);
}
potential_output_nodes = sorted_potential_output_nodes;
potential_outputs = sorted_potential_outputs;
const apiToken = localStorage.getItem("copus_token");
this.message.innerHTML = "";
this.message.textContent = "";
this.element.style.display = "block";
this.previewImage.src = "";
this.previewImage.style.display = "none";
this.keyInput.value = apiToken!=null?apiToken:"";
this.uploadedImages = [];
this.allFilesImages = [];
this.allFiles = [];
// If `selectedNodeId` is provided, we will select the corresponding radio
// button for the node. In addition, we move the selected radio button to
// the top of the list.
if (this.selectedNodeId) {
const index = potential_output_nodes.findIndex(
(node) => node.id === this.selectedNodeId
);
if (index >= 0) {
this.selectedOutputIndex = index;
}
}
this.radioButtons = [];
const new_radio_buttons = $el(
"div",
{
id: "selectOutput-Options",
style: {
"overflow-y": "scroll",
"max-height": "200px",
display: "grid",
"grid-template-columns": "repeat(auto-fit, minmax(100px, 1fr))",
"grid-template-rows": "auto",
"grid-column-gap": "10px",
"grid-row-gap": "10px",
"margin-bottom": "10px",
padding: "10px",
"border-radius": "8px",
"box-shadow": "0 2px 4px rgba(0, 0, 0, 0.05)",
"background-color": "var(--bg-color)",
},
},
potential_outputs.map((output, index) => {
const { node_id } = output;
const radio_button = $el(
"input",
{
type: "radio",
name: "selectOutputImages",
value: index,
required: index === 0,
},
[]
);
let radio_button_img;
let filename;
if (output.type === "image" || output.type === "temp") {
radio_button_img = $el(
"img",
{
src: `/view?filename=${output.image.filename}&subfolder=${output.image.subfolder}&type=${output.image.type}`,
style: {
width: "100px",
height: "100px",
objectFit: "cover",
borderRadius: "5px",
},
},
[]
);
filename = output.image.filename;
} else if (output.type === "output") {
radio_button_img = $el(
"img",
{
src: output.output.value,
style: {
width: "auto",
height: "100px",
objectFit: "cover",
borderRadius: "5px",
},
},
[]
);
filename = output.filename;
} else {
// unsupported output type
// this should never happen
radio_button_img = $el(
"img",
{
src: "",
style: { width: "auto", height: "100px" },
},
[]
);
}
const radio_button_text = $el(
"span",
{
style: {
color: "gray",
display: "block",
fontSize: "12px",
overflowX: "hidden",
textOverflow: "ellipsis",
textWrap: "nowrap",
maxWidth: "100px",
},
},
[output.title]
);
const node_id_chip = $el(
"span",
{
style: {
color: "#FBFBFD",
display: "block",
backgroundColor: "rgba(0, 0, 0, 0.5)",
fontSize: "12px",
overflowX: "hidden",
padding: "2px 3px",
textOverflow: "ellipsis",
textWrap: "nowrap",
maxWidth: "100px",
position: "absolute",
top: "3px",
left: "3px",
borderRadius: "3px",
},
},
[`Node: ${node_id}`]
);
radio_button.style.color = "var(--fg-color)";
radio_button.checked = this.selectedOutputIndex === index;
radio_button.onchange = async () => {
this.selectedOutputIndex = parseInt(radio_button.value);
// Remove the "checked" class from all radio buttons
this.radioButtons.forEach((ele) => {
ele.parentElement.classList.remove("checked");
});
radio_button.parentElement.classList.add("checked");
this.fetchImageBlob(radio_button_img.src).then((blob) => {
const file = new File([blob], filename, {
type: blob.type,
});
this.previewImage.src = radio_button_img.src;
this.previewImage.style.display = "block";
this.selectedFile = file;
});
// Add the opacity style toggle here to indicate that they only need
// to upload one image or choose one from the outputs.
this.outputsSection.style.opacity = 1;
this.uploadImagesInput.style.opacity = 0.35;
};
if (radio_button.checked) {
this.fetchImageBlob(radio_button_img.src).then((blob) => {
const file = new File([blob], filename, {
type: blob.type,
});
this.previewImage.src = radio_button_img.src;
this.previewImage.style.display = "block";
this.selectedFile = file;
});
// Add the opacity style toggle here to indicate that they only need
// to upload one image or choose one from the outputs.
this.outputsSection.style.opacity = 1;
this.uploadImagesInput.style.opacity = 0.35;
}
this.radioButtons.push(radio_button);
let src = "";
if (output.type === "image" || output.type === "temp") {
filename = output.image.filename;
src = `/view?filename=${output.image.filename}&subfolder=${output.image.subfolder}&type=${output.image.type}`;
} else if (output.type === "output") {
src = output.output.value;
filename = output.filename;
}
if (src) {
this.fetchImageBlob(src).then((blob) => {
const file = new File([blob], filename, {
type: blob.type,
});
this.allFiles.push(file);
});
}
return $el(
`label.output_label${radio_button.checked ? ".checked" : ""}`,
{
style: {
display: "flex",
flexDirection: "column",
alignItems: "center",
justifyContent: "center",
marginBottom: "10px",
cursor: "pointer",
position: "relative",
},
},
[radio_button_img, radio_button_text, radio_button, node_id_chip]
);
})
);
const header = $el(
"p",
{
textContent:
this.radioButtons.length === 0
? "Queue Prompt to see the outputs"
: "Or choose one from the outputs (scroll to see all)",
size: 2,
color: "white",
style: {
color: "white",
margin: "0 0 5px 0",
fontSize: "12px",
},
},
[]
);
this.outputsSection.innerHTML = "";
this.outputsSection.appendChild(header);
this.outputsSection.appendChild(new_radio_buttons);
}
}

View File

@ -0,0 +1,745 @@
import {app} from "../../scripts/app.js";
import {api} from "../../scripts/api.js";
import {ComfyDialog, $el} from "../../scripts/ui.js";
const LOCAL_STORAGE_KEY = "openart_comfy_workflow_key";
const DEFAULT_HOMEPAGE_URL = "https://openart.ai/workflows/dev?developer=true";
//const DEFAULT_HOMEPAGE_URL = "http://localhost:8080/workflows/dev?developer=true";
const API_ENDPOINT = "https://openart.ai/api";
//const API_ENDPOINT = "http://localhost:8080/api";
const style = `
.openart-share-dialog a {
color: #f8f8f8;
}
.openart-share-dialog a:hover {
color: #007bff;
}
.output_label {
border: 5px solid transparent;
}
.output_label:hover {
border: 5px solid #59E8C6;
}
.output_label.checked {
border: 5px solid #59E8C6;
}
`;
// Shared component styles
const sectionStyle = {
marginBottom: 0,
padding: 0,
borderRadius: "8px",
boxShadow: "0 2px 4px rgba(0, 0, 0, 0.05)",
display: "flex",
flexDirection: "column",
justifyContent: "center",
};
export class OpenArtShareDialog extends ComfyDialog {
static instance = null;
constructor() {
super();
$el("style", {
textContent: style,
parent: document.head,
});
this.element = $el(
"div.comfy-modal.openart-share-dialog",
{
parent: document.body,
style: {
"overflow-y": "auto",
},
},
[$el("div.comfy-modal-content", {}, [...this.createButtons()])]
);
this.selectedOutputIndex = 0;
this.selectedNodeId = null;
this.uploadedImages = [];
this.selectedFile = null;
}
async readKey() {
let key = ""
try {
key = await api.fetchApi(`/manager/get_openart_auth`)
.then(response => response.json())
.then(data => {
return data.openart_key;
})
.catch(error => {
// console.log(error);
});
} catch (error) {
// console.log(error);
}
return key || "";
}
async saveKey(value) {
await api.fetchApi(`/manager/set_openart_auth`, {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
openart_key: value
})
});
}
createButtons() {
const inputStyle = {
display: "block",
minWidth: "500px",
width: "100%",
padding: "10px",
margin: "10px 0",
borderRadius: "4px",
border: "1px solid #ddd",
boxSizing: "border-box",
};
const hyperLinkStyle = {
display: "block",
marginBottom: "15px",
fontWeight: "bold",
fontSize: "14px",
};
const labelStyle = {
color: "#f8f8f8",
display: "block",
margin: "10px 0 0 0",
fontWeight: "bold",
textDecoration: "none",
};
const buttonStyle = {
padding: "10px 80px",
margin: "10px 5px",
borderRadius: "4px",
border: "none",
cursor: "pointer",
color: "#fff",
backgroundColor: "#007bff",
};
// upload images input
this.uploadImagesInput = $el("input", {
type: "file",
multiple: false,
style: inputStyle,
accept: "image/*",
});
this.uploadImagesInput.addEventListener("change", async (e) => {
const file = e.target.files[0];
if (!file) {
this.previewImage.src = "";
this.previewImage.style.display = "none";
return;
}
const reader = new FileReader();
reader.onload = async (e) => {
const imgData = e.target.result;
this.previewImage.src = imgData;
this.previewImage.style.display = "block";
this.selectedFile = null
// Once user uploads an image, we uncheck all radio buttons
this.radioButtons.forEach((ele) => {
ele.checked = false;
ele.parentElement.classList.remove("checked");
});
// Add the opacity style toggle here to indicate that they only need
// to upload one image or choose one from the outputs.
this.outputsSection.style.opacity = 0.35;
this.uploadImagesInput.style.opacity = 1;
};
reader.readAsDataURL(file);
});
// preview image
this.previewImage = $el("img", {
src: "",
style: {
width: "100%",
maxHeight: "100px",
objectFit: "contain",
display: "none",
marginTop: '10px',
},
});
this.keyInput = $el("input", {
type: "password",
placeholder: "Copy & paste your API key",
style: inputStyle,
});
this.NameInput = $el("input", {
type: "text",
placeholder: "Title (required)",
style: inputStyle,
});
this.descriptionInput = $el("textarea", {
placeholder: "Description (optional)",
style: {
...inputStyle,
minHeight: "100px",
},
});
// Header Section
const headerSection = $el("h3", {
textContent: "Share your workflow to OpenArt",
size: 3,
color: "white",
style: {
'text-align': 'center',
color: 'white',
margin: '0 0 10px 0',
}
});
// LinkSection
this.communityLink = $el("a", {
style: hyperLinkStyle,
href: DEFAULT_HOMEPAGE_URL,
target: "_blank"
}, ["👉 Check out thousands of workflows shared from the community"])
this.getAPIKeyLink = $el("a", {
style: {
...hyperLinkStyle,
color: "#59E8C6"
},
href: DEFAULT_HOMEPAGE_URL,
target: "_blank"
}, ["👉 Get your API key here"])
const linkSection = $el(
"div",
{
style: {
marginTop: "10px",
display: "flex",
flexDirection: "column",
},
},
[
this.communityLink,
this.getAPIKeyLink,
]
);
// Account Section
const accountSection = $el("div", {style: sectionStyle}, [
$el("label", {style: labelStyle}, ["1⃣ OpenArt API Key"]),
this.keyInput,
]);
// Output Upload Section
const outputUploadSection = $el("div", {style: sectionStyle}, [
$el("label", {
style: {
...labelStyle,
margin: "10px 0 0 0"
}
}, ["2⃣ Image/Thumbnail (Required)"]),
this.previewImage,
this.uploadImagesInput,
]);
// Outputs Section
this.outputsSection = $el("div", {
id: "selectOutputs",
}, []);
// Additional Inputs Section
const additionalInputsSection = $el("div", {style: sectionStyle}, [
$el("label", {style: labelStyle}, ["3⃣ Workflow Information"]),
this.NameInput,
this.descriptionInput,
]);
// OpenArt Contest Section
/*
this.joinContestCheckbox = $el("input", {
type: 'checkbox',
id: "join_contest"s
}, [])
this.joinContestDescription = $el("a", {
style: {
...hyperLinkStyle,
display: 'inline-block',
color: "#59E8C6",
fontSize: '12px',
marginLeft: '10px',
marginBottom: 0,
},
href: "https://contest.openart.ai/",
target: "_blank"
}, ["🏆 I'm participating in the OpenArt workflow contest"])
this.joinContestLabel = $el("label", {
style: {
display: 'flex',
alignItems: 'center',
cursor: 'pointer',
}
}, [this.joinContestCheckbox, this.joinContestDescription])
const contestSection = $el("div", {style: sectionStyle}, [
this.joinContestLabel,
]);
*/
// Message Section
this.message = $el(
"div",
{
style: {
color: "#ff3d00",
textAlign: "center",
padding: "10px",
fontSize: "20px",
},
},
[]
);
this.shareButton = $el("button", {
type: "submit",
textContent: "Share",
style: buttonStyle,
onclick: () => {
this.handleShareButtonClick();
},
});
// Share and Close Buttons
const buttonsSection = $el(
"div",
{
style: {
textAlign: "right",
marginTop: "20px",
display: "flex",
justifyContent: "space-between",
},
},
[
$el("button", {
type: "button",
textContent: "Close",
style: {
...buttonStyle,
backgroundColor: undefined,
},
onclick: () => {
this.close();
},
}),
this.shareButton,
]
);
// Composing the full layout
const layout = [
headerSection,
linkSection,
accountSection,
outputUploadSection,
this.outputsSection,
additionalInputsSection,
// contestSection,
this.message,
buttonsSection,
];
return layout;
}
async fetchApi(path, options, statusText) {
if (statusText) {
this.message.textContent = statusText;
}
const addSearchParams = (url, params = {}) =>
new URL(
`${url.origin}${url.pathname}?${new URLSearchParams([
...Array.from(url.searchParams.entries()),
...Object.entries(params),
])}`
);
const fullPath = addSearchParams(new URL(API_ENDPOINT + path), {
workflow_api_key: this.keyInput.value,
});
const response = await fetch(fullPath, options);
if (!response.ok) {
throw new Error(response.statusText);
}
if (statusText) {
this.message.textContent = "";
}
const data = await response.json();
return {
ok: response.ok,
statusText: response.statusText,
status: response.status,
data,
};
}
async uploadThumbnail(uploadFile) {
const form = new FormData();
form.append("file", uploadFile);
try {
const res = await this.fetchApi(
`/workflows/upload_thumbnail`,
{
method: "POST",
body: form,
},
"Uploading thumbnail..."
);
if (res.ok && res.data) {
const {image_url, width, height} = res.data;
this.uploadedImages.push({
url: image_url,
width,
height,
});
}
} catch (e) {
if (e?.response?.status === 413) {
throw new Error("File size is too large (max 20MB)");
} else {
throw new Error("Error uploading thumbnail: " + e.message);
}
}
}
async handleShareButtonClick() {
this.message.textContent = "";
await this.saveKey(this.keyInput.value);
try {
this.shareButton.disabled = true;
this.shareButton.textContent = "Sharing...";
await this.share();
} catch (e) {
alert(e.message);
}
this.shareButton.disabled = false;
this.shareButton.textContent = "Share";
}
async share() {
const prompt = await app.graphToPrompt();
const workflowJSON = prompt["workflow"];
const workflowAPIJSON = prompt["output"];
const form_values = {
name: this.NameInput.value,
description: this.descriptionInput.value,
};
if (!this.keyInput.value) {
throw new Error("API key is required");
}
if (!this.uploadImagesInput.files[0] && !this.selectedFile) {
throw new Error("Thumbnail is required");
}
if (!form_values.name) {
throw new Error("Title is required");
}
const current_snapshot = await api.fetchApi(`/snapshot/get_current`)
.then(response => response.json())
.catch(error => {
// console.log(error);
});
if (!this.uploadedImages.length) {
if (this.selectedFile) {
await this.uploadThumbnail(this.selectedFile);
} else {
for (const file of this.uploadImagesInput.files) {
try {
await this.uploadThumbnail(file);
} catch (e) {
this.uploadedImages = [];
throw new Error(e.message);
}
}
if (this.uploadImagesInput.files.length === 0) {
throw new Error("No thumbnail uploaded");
}
}
}
// const join_contest = this.joinContestCheckbox.checked;
try {
const response = await this.fetchApi(
"/workflows/publish",
{
method: "POST",
headers: {"Content-Type": "application/json"},
body: JSON.stringify({
workflow_json: workflowJSON,
upload_images: this.uploadedImages,
form_values,
advanced_config: {
workflow_api_json: workflowAPIJSON,
snapshot: current_snapshot,
},
// join_contest,
}),
},
"Uploading workflow..."
);
if (response.ok) {
const {workflow_id} = response.data;
if (workflow_id) {
const url = `https://openart.ai/workflows/-/-/${workflow_id}`;
this.message.innerHTML = `Workflow has been shared successfully. <a href="${url}" target="_blank">Click here to view it.</a>`;
this.previewImage.src = "";
this.previewImage.style.display = "none";
this.uploadedImages = [];
this.NameInput.value = "";
this.descriptionInput.value = "";
this.radioButtons.forEach((ele) => {
ele.checked = false;
ele.parentElement.classList.remove("checked");
});
this.selectedOutputIndex = 0;
this.selectedNodeId = null;
this.selectedFile = null;
}
}
} catch (e) {
throw new Error("Error sharing workflow: " + e.message);
}
}
async fetchImageBlob(url) {
const response = await fetch(url);
const blob = await response.blob();
return blob;
}
async show({potential_outputs, potential_output_nodes} = {}) {
// Sort `potential_output_nodes` by node ID to make the order always
// consistent, but we should also keep `potential_outputs` in the same
// order as `potential_output_nodes`.
const potential_output_to_order = {};
potential_output_nodes.forEach((node, index) => {
if (node.id in potential_output_to_order) {
potential_output_to_order[node.id][1].push(potential_outputs[index]);
} else {
potential_output_to_order[node.id] = [node, [potential_outputs[index]]];
}
})
// Sort the object `potential_output_to_order` by key (node ID)
const sorted_potential_output_to_order = Object.fromEntries(
Object.entries(potential_output_to_order).sort((a, b) => a[0].id - b[0].id)
);
const sorted_potential_outputs = []
const sorted_potential_output_nodes = []
for (const [key, value] of Object.entries(sorted_potential_output_to_order)) {
sorted_potential_output_nodes.push(value[0]);
sorted_potential_outputs.push(...value[1]);
}
potential_output_nodes = sorted_potential_output_nodes;
potential_outputs = sorted_potential_outputs;
this.message.innerHTML = "";
this.message.textContent = "";
this.element.style.display = "block";
this.previewImage.src = "";
this.previewImage.style.display = "none";
const key = await this.readKey();
this.keyInput.value = key;
this.uploadedImages = [];
// If `selectedNodeId` is provided, we will select the corresponding radio
// button for the node. In addition, we move the selected radio button to
// the top of the list.
if (this.selectedNodeId) {
const index = potential_output_nodes.findIndex(node => node.id === this.selectedNodeId);
if (index >= 0) {
this.selectedOutputIndex = index;
}
}
this.radioButtons = [];
const new_radio_buttons = $el("div",
{
id: "selectOutput-Options",
style: {
'overflow-y': 'scroll',
'max-height': '200px',
'display': 'grid',
'grid-template-columns': 'repeat(auto-fit, minmax(100px, 1fr))',
'grid-template-rows': 'auto',
'grid-column-gap': '10px',
'grid-row-gap': '10px',
'margin-bottom': '10px',
'padding': '10px',
'border-radius': '8px',
'box-shadow': '0 2px 4px rgba(0, 0, 0, 0.05)',
'background-color': 'var(--bg-color)',
}
},
potential_outputs.map((output, index) => {
const {node_id} = output;
const radio_button = $el("input", {
type: 'radio',
name: "selectOutputImages",
value: index,
required: index === 0
}, [])
let radio_button_img;
let filename;
if (output.type === "image" || output.type === "temp") {
radio_button_img = $el("img", {
src: `/view?filename=${output.image.filename}&subfolder=${output.image.subfolder}&type=${output.image.type}`,
style: {
width: "100px",
height: "100px",
objectFit: "cover",
borderRadius: "5px"
}
}, []);
filename = output.image.filename
} else if (output.type === "output") {
radio_button_img = $el("img", {
src: output.output.value,
style: {
width: "auto",
height: "100px",
objectFit: "cover",
borderRadius: "5px"
}
}, []);
filename = output.filename
} else {
// unsupported output type
// this should never happen
// TODO
radio_button_img = $el("img", {
src: "",
style: {width: "auto", height: "100px"}
}, []);
}
const radio_button_text = $el("span", {
style: {
color: 'gray',
display: 'block',
fontSize: '12px',
overflowX: 'hidden',
textOverflow: 'ellipsis',
textWrap: 'nowrap',
maxWidth: '100px',
}
}, [output.title])
const node_id_chip = $el("span", {
style: {
color: '#FBFBFD',
display: 'block',
backgroundColor: 'rgba(0, 0, 0, 0.5)',
fontSize: '12px',
overflowX: 'hidden',
padding: '2px 3px',
textOverflow: 'ellipsis',
textWrap: 'nowrap',
maxWidth: '100px',
position: 'absolute',
top: '3px',
left: '3px',
borderRadius: '3px',
}
}, [`Node: ${node_id}`])
radio_button.style.color = "var(--fg-color)";
radio_button.checked = this.selectedOutputIndex === index;
radio_button.onchange = async () => {
this.selectedOutputIndex = parseInt(radio_button.value);
// Remove the "checked" class from all radio buttons
this.radioButtons.forEach((ele) => {
ele.parentElement.classList.remove("checked");
});
radio_button.parentElement.classList.add("checked");
this.fetchImageBlob(radio_button_img.src).then((blob) => {
const file = new File([blob], filename, {
type: blob.type,
});
this.previewImage.src = radio_button_img.src;
this.previewImage.style.display = "block";
this.selectedFile = file;
})
// Add the opacity style toggle here to indicate that they only need
// to upload one image or choose one from the outputs.
this.outputsSection.style.opacity = 1;
this.uploadImagesInput.style.opacity = 0.35;
};
if (radio_button.checked) {
this.fetchImageBlob(radio_button_img.src).then((blob) => {
const file = new File([blob], filename, {
type: blob.type,
});
this.previewImage.src = radio_button_img.src;
this.previewImage.style.display = "block";
this.selectedFile = file;
})
// Add the opacity style toggle here to indicate that they only need
// to upload one image or choose one from the outputs.
this.outputsSection.style.opacity = 1;
this.uploadImagesInput.style.opacity = 0.35;
}
this.radioButtons.push(radio_button);
return $el(`label.output_label${radio_button.checked ? '.checked' : ''}`, {
style: {
display: "flex",
flexDirection: "column",
alignItems: "center",
justifyContent: "center",
marginBottom: "10px",
cursor: "pointer",
position: 'relative',
}
}, [radio_button_img, radio_button_text, radio_button, node_id_chip]);
})
);
const header =
$el("p", {
textContent: this.radioButtons.length === 0 ? "Queue Prompt to see the outputs" : "Or choose one from the outputs (scroll to see all)",
size: 2,
color: "white",
style: {
color: 'white',
margin: '0 0 5px 0',
fontSize: '12px',
},
}, [])
this.outputsSection.innerHTML = "";
this.outputsSection.appendChild(header);
this.outputsSection.appendChild(new_radio_buttons);
}
}

View File

@ -0,0 +1,568 @@
import {app} from "../../scripts/app.js";
import {api} from "../../scripts/api.js";
import {ComfyDialog, $el} from "../../scripts/ui.js";
const BASE_URL = "https://youml.com";
//const BASE_URL = "http://localhost:3000";
const DEFAULT_HOMEPAGE_URL = `${BASE_URL}/?from=comfyui`;
const TOKEN_PAGE_URL = `${BASE_URL}/my-token`;
const API_ENDPOINT = `${BASE_URL}/api`;
const style = `
.youml-share-dialog {
overflow-y: auto;
}
.youml-share-dialog .dialog-header {
text-align: center;
color: white;
margin: 0 0 10px 0;
}
.youml-share-dialog .dialog-section {
margin-bottom: 0;
padding: 0;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
display: flex;
flex-direction: column;
justify-content: center;
}
.youml-share-dialog input, .youml-share-dialog textarea {
display: block;
min-width: 500px;
width: 100%;
padding: 10px;
margin: 10px 0;
border-radius: 4px;
border: 1px solid #ddd;
box-sizing: border-box;
}
.youml-share-dialog textarea {
color: var(--input-text);
background-color: var(--comfy-input-bg);
}
.youml-share-dialog .workflow-description {
min-height: 75px;
}
.youml-share-dialog label {
color: #f8f8f8;
display: block;
margin: 5px 0 0 0;
font-weight: bold;
text-decoration: none;
}
.youml-share-dialog .action-button {
padding: 10px 80px;
margin: 10px 5px;
border-radius: 4px;
border: none;
cursor: pointer;
}
.youml-share-dialog .share-button {
color: #fff;
background-color: #007bff;
}
.youml-share-dialog .close-button {
background-color: none;
}
.youml-share-dialog .action-button-panel {
text-align: right;
display: flex;
justify-content: space-between;
}
.youml-share-dialog .status-message {
color: #fd7909;
text-align: center;
padding: 5px;
font-size: 18px;
}
.youml-share-dialog .status-message a {
color: white;
}
.youml-share-dialog .output-panel {
overflow: auto;
max-height: 180px;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
grid-template-rows: auto;
grid-column-gap: 10px;
grid-row-gap: 10px;
margin-bottom: 10px;
padding: 10px;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
background-color: var(--bg-color);
}
.youml-share-dialog .output-panel .output-image {
width: 100px;
height: 100px;
objectFit: cover;
borderRadius: 5px;
}
.youml-share-dialog .output-panel .radio-button {
color:var(--fg-color);
}
.youml-share-dialog .output-panel .radio-text {
color: gray;
display: block;
font-size: 12px;
overflow-x: hidden;
text-overflow: ellipsis;
text-wrap: nowrap;
max-width: 100px;
}
.youml-share-dialog .output-panel .node-id {
color: #FBFBFD;
display: block;
background-color: rgba(0, 0, 0, 0.5);
font-size: 12px;
overflow-x: hidden;
padding: 2px 3px;
text-overflow: ellipsis;
text-wrap: nowrap;
max-width: 100px;
position: absolute;
top: 3px;
left: 3px;
border-radius: 3px;
}
.youml-share-dialog .output-panel .output-label {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin-bottom: 10px;
cursor: pointer;
position: relative;
border: 5px solid transparent;
}
.youml-share-dialog .output-panel .output-label:hover {
border: 5px solid #007bff;
}
.youml-share-dialog .output-panel .output-label.checked {
border: 5px solid #007bff;
}
.youml-share-dialog .missing-output-message{
color: #fd7909;
font-size: 16px;
margin-bottom:10px
}
.youml-share-dialog .select-output-message{
color: white;
margin-bottom:5px
}
`;
export class YouMLShareDialog extends ComfyDialog {
static instance = null;
constructor() {
super();
$el("style", {
textContent: style,
parent: document.head,
});
this.element = $el(
"div.comfy-modal.youml-share-dialog",
{
parent: document.body,
},
[$el("div.comfy-modal-content", {}, [...this.createLayout()])]
);
this.selectedOutputIndex = 0;
this.selectedNodeId = null;
this.uploadedImages = [];
this.selectedFile = null;
}
async loadToken() {
let key = ""
try {
const response = await api.fetchApi(`/manager/youml/settings`)
const settings = await response.json()
return settings.token
} catch (error) {
}
return key || "";
}
async saveToken(value) {
await api.fetchApi(`/manager/youml/settings`, {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
token: value
})
});
}
createLayout() {
// Header Section
const headerSection = $el("h3.dialog-header", {
textContent: "Share your workflow to YouML.com",
size: 3,
});
// Workflow Info Section
this.nameInput = $el("input", {
type: "text",
placeholder: "Name (required)",
});
this.descriptionInput = $el("textarea.workflow-description", {
placeholder: "Description (optional, markdown supported)",
});
const workflowMetadata = $el("div.dialog-section", {}, [
$el("label", {}, ["Workflow info"]),
this.nameInput,
this.descriptionInput,
]);
// Outputs Section
this.outputsSection = $el("div.dialog-section", {
id: "selectOutputs",
}, []);
const outputUploadSection = $el("div.dialog-section", {}, [
$el("label", {}, ["Thumbnail"]),
this.outputsSection,
]);
// API Token Section
this.apiTokenInput = $el("input", {
type: "password",
placeholder: "Copy & paste your API token",
});
const getAPITokenButton = $el("button", {
href: DEFAULT_HOMEPAGE_URL,
target: "_blank",
onclick: () => window.open(TOKEN_PAGE_URL, "_blank"),
}, ["Get your API Token"])
const apiTokenSection = $el("div.dialog-section", {}, [
$el("label", {}, ["YouML API Token"]),
this.apiTokenInput,
getAPITokenButton,
]);
// Message Section
this.message = $el("div.status-message", {}, []);
// Share and Close Buttons
this.shareButton = $el("button.action-button.share-button", {
type: "submit",
textContent: "Share",
onclick: () => {
this.handleShareButtonClick();
},
});
const buttonsSection = $el(
"div.action-button-panel",
{},
[
$el("button.action-button.close-button", {
type: "button",
textContent: "Close",
onclick: () => {
this.close();
},
}),
this.shareButton,
]
);
// Composing the full layout
const layout = [
headerSection,
workflowMetadata,
outputUploadSection,
apiTokenSection,
this.message,
buttonsSection,
];
return layout;
}
async fetchYoumlApi(path, options, statusText) {
if (statusText) {
this.message.textContent = statusText;
}
const fullPath = new URL(API_ENDPOINT + path)
const fetchOptions = Object.assign({}, options)
fetchOptions.headers = {
...fetchOptions.headers,
"Authorization": `Bearer ${this.apiTokenInput.value}`,
"User-Agent": "ComfyUI-Manager-Youml/1.0.0",
}
const response = await fetch(fullPath, fetchOptions);
if (!response.ok) {
throw new Error(response.statusText + " " + (await response.text()));
}
if (statusText) {
this.message.textContent = "";
}
const data = await response.json();
return {
ok: response.ok,
statusText: response.statusText,
status: response.status,
data,
};
}
async uploadThumbnail(uploadFile, recipeId) {
const form = new FormData();
form.append("file", uploadFile, uploadFile.name);
try {
const res = await this.fetchYoumlApi(
`/v1/comfy/recipes/${recipeId}/thumbnail`,
{
method: "POST",
body: form,
},
"Uploading thumbnail..."
);
} catch (e) {
if (e?.response?.status === 413) {
throw new Error("File size is too large (max 20MB)");
} else {
throw new Error("Error uploading thumbnail: " + e.message);
}
}
}
async handleShareButtonClick() {
this.message.textContent = "";
await this.saveToken(this.apiTokenInput.value);
try {
this.shareButton.disabled = true;
this.shareButton.textContent = "Sharing...";
await this.share();
} catch (e) {
alert(e.message);
} finally {
this.shareButton.disabled = false;
this.shareButton.textContent = "Share";
}
}
async share() {
const prompt = await app.graphToPrompt();
const workflowJSON = prompt["workflow"];
const workflowAPIJSON = prompt["output"];
const form_values = {
name: this.nameInput.value,
description: this.descriptionInput.value,
};
if (!this.apiTokenInput.value) {
throw new Error("API token is required");
}
if (!this.selectedFile) {
throw new Error("Thumbnail is required");
}
if (!form_values.name) {
throw new Error("Title is required");
}
try {
let snapshotData = null;
try {
const snapshot = await api.fetchApi(`/snapshot/get_current`)
snapshotData = await snapshot.json()
} catch (e) {
console.error("Failed to get snapshot", e)
}
const request = {
name: this.nameInput.value,
description: this.descriptionInput.value,
workflowUiJson: JSON.stringify(workflowJSON),
workflowApiJson: JSON.stringify(workflowAPIJSON),
}
if (snapshotData) {
request.snapshotJson = JSON.stringify(snapshotData)
}
const response = await this.fetchYoumlApi(
"/v1/comfy/recipes",
{
method: "POST",
headers: {"Content-Type": "application/json"},
body: JSON.stringify(request),
},
"Uploading workflow..."
);
if (response.ok) {
const {id, recipePageUrl, editorPageUrl} = response.data;
if (id) {
let messagePrefix = "Workflow has been shared."
if (this.selectedFile) {
try {
await this.uploadThumbnail(this.selectedFile, id);
} catch (e) {
console.error("Thumbnail upload failed: ", e);
messagePrefix = "Workflow has been shared, but thumbnail upload failed. You can create a thumbnail on YouML later."
}
}
this.message.innerHTML = `${messagePrefix} To turn your workflow into an interactive app, ` +
`<a href="${recipePageUrl}" target="_blank">visit it on YouML</a>`;
this.uploadedImages = [];
this.nameInput.value = "";
this.descriptionInput.value = "";
this.radioButtons.forEach((ele) => {
ele.checked = false;
ele.parentElement.classList.remove("checked");
});
this.selectedOutputIndex = 0;
this.selectedNodeId = null;
this.selectedFile = null;
}
}
} catch (e) {
throw new Error("Error sharing workflow: " + e.message);
}
}
async fetchImageBlob(url) {
const response = await fetch(url);
const blob = await response.blob();
return blob;
}
async show(potentialOutputs, potentialOutputNodes) {
const potentialOutputsToOrder = {};
potentialOutputNodes.forEach((node, index) => {
if (node.id in potentialOutputsToOrder) {
potentialOutputsToOrder[node.id][1].push(potentialOutputs[index]);
} else {
potentialOutputsToOrder[node.id] = [node, [potentialOutputs[index]]];
}
})
const sortedPotentialOutputsToOrder = Object.fromEntries(
Object.entries(potentialOutputsToOrder).sort((a, b) => a[0].id - b[0].id)
);
const sortedPotentialOutputs = []
const sortedPotentiaOutputNodes = []
for (const [key, value] of Object.entries(sortedPotentialOutputsToOrder)) {
sortedPotentiaOutputNodes.push(value[0]);
sortedPotentialOutputs.push(...value[1]);
}
potentialOutputNodes = sortedPotentiaOutputNodes;
potentialOutputs = sortedPotentialOutputs;
// If `selectedNodeId` is provided, we will select the corresponding radio
// button for the node. In addition, we move the selected radio button to
// the top of the list.
if (this.selectedNodeId) {
const index = potentialOutputNodes.findIndex(node => node.id === this.selectedNodeId);
if (index >= 0) {
this.selectedOutputIndex = index;
}
}
this.radioButtons = [];
const newRadioButtons = $el("div.output-panel",
{
id: "selectOutput-Options",
},
potentialOutputs.map((output, index) => {
const {node_id: nodeId} = output;
const radioButton = $el("input.radio-button", {
type: "radio",
name: "selectOutputImages",
value: index,
required: index === 0
}, [])
let radioButtonImage;
let filename;
if (output.type === "image" || output.type === "temp") {
radioButtonImage = $el("img.output-image", {
src: `/view?filename=${output.image.filename}&subfolder=${output.image.subfolder}&type=${output.image.type}`,
}, []);
filename = output.image.filename
} else if (output.type === "output") {
radioButtonImage = $el("img.output-image", {
src: output.output.value,
}, []);
filename = output.output.filename
} else {
radioButtonImage = $el("img.output-image", {
src: "",
}, []);
}
const radioButtonText = $el("span.radio-text", {}, [output.title])
const nodeIdChip = $el("span.node-id", {}, [`Node: ${nodeId}`])
radioButton.checked = this.selectedOutputIndex === index;
radioButton.onchange = async () => {
this.selectedOutputIndex = parseInt(radioButton.value);
// Remove the "checked" class from all radio buttons
this.radioButtons.forEach((ele) => {
ele.parentElement.classList.remove("checked");
});
radioButton.parentElement.classList.add("checked");
this.fetchImageBlob(radioButtonImage.src).then((blob) => {
const file = new File([blob], filename, {
type: blob.type,
});
this.selectedFile = file;
})
};
if (radioButton.checked) {
this.fetchImageBlob(radioButtonImage.src).then((blob) => {
const file = new File([blob], filename, {
type: blob.type,
});
this.selectedFile = file;
})
}
this.radioButtons.push(radioButton);
return $el(`label.output-label${radioButton.checked ? '.checked' : ''}`, {},
[radioButtonImage, radioButtonText, radioButton, nodeIdChip]);
})
);
let header;
if (this.radioButtons.length === 0) {
header = $el("div.missing-output-message", {textContent: "Queue Prompt to see the outputs and select a thumbnail"}, [])
} else {
header = $el("div.select-output-message", {textContent: "Choose one from the outputs (scroll to see all)"}, [])
}
this.outputsSection.innerHTML = "";
this.outputsSection.appendChild(header);
if (this.radioButtons.length > 0) {
this.outputsSection.appendChild(newRadioButtons);
}
this.message.innerHTML = "";
this.message.textContent = "";
const token = await this.loadToken();
this.apiTokenInput.value = token;
this.uploadedImages = [];
this.element.style.display = "block";
}
}

View File

@ -0,0 +1,240 @@
import { app } from "../../scripts/app.js";
import { api } from "../../scripts/api.js";
import { $el, ComfyDialog } from "../../scripts/ui.js";
export function show_message(msg) {
app.ui.dialog.show(msg);
app.ui.dialog.element.style.zIndex = 10010;
}
export async function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
export function rebootAPI() {
if (confirm("Are you sure you'd like to reboot the server?")) {
try {
api.fetchApi("/manager/reboot");
}
catch(exception) {
}
return true;
}
return false;
}
export var manager_instance = null;
export function setManagerInstance(obj) {
manager_instance = obj;
}
export function showToast(message, duration = 3000) {
const toast = $el("div.comfy-toast", {textContent: message});
document.body.appendChild(toast);
setTimeout(() => {
toast.classList.add("comfy-toast-fadeout");
setTimeout(() => toast.remove(), 500);
}, duration);
}
function isValidURL(url) {
if(url.includes('&'))
return false;
const http_pattern = /^(https?|ftp):\/\/[^\s$?#]+$/;
const ssh_pattern = /^(.+@|ssh:\/\/).+:.+$/;
return http_pattern.test(url) || ssh_pattern.test(url);
}
export async function install_pip(packages) {
if(packages.includes('&'))
app.ui.dialog.show(`Invalid PIP package enumeration: '${packages}'`);
const res = await api.fetchApi("/customnode/install/pip", {
method: "POST",
body: packages,
});
if(res.status == 403) {
show_message('This action is not allowed with this security level configuration.');
return;
}
if(res.status == 200) {
show_message(`PIP package installation is processed.<br>To apply the pip packages, please click the <button id='cm-reboot-button3'><font size='3px'>RESTART</font></button> button in ComfyUI.`);
const rebootButton = document.getElementById('cm-reboot-button3');
const self = this;
rebootButton.addEventListener("click", rebootAPI);
}
else {
show_message(`Failed to install '${packages}'<BR>See terminal log.`);
}
}
export async function install_via_git_url(url, manager_dialog) {
if(!url) {
return;
}
if(!isValidURL(url)) {
show_message(`Invalid Git url '${url}'`);
return;
}
show_message(`Wait...<BR><BR>Installing '${url}'`);
const res = await api.fetchApi("/customnode/install/git_url", {
method: "POST",
body: url,
});
if(res.status == 403) {
show_message('This action is not allowed with this security level configuration.');
return;
}
if(res.status == 200) {
show_message(`'${url}' is installed<BR>To apply the installed custom node, please <button id='cm-reboot-button4'><font size='3px'>RESTART</font></button> ComfyUI.`);
const rebootButton = document.getElementById('cm-reboot-button4');
const self = this;
rebootButton.addEventListener("click",
function() {
if(rebootAPI()) {
manager_dialog.close();
}
});
}
else {
show_message(`Failed to install '${url}'<BR>See terminal log.`);
}
}
export async function free_models(free_execution_cache) {
try {
let mode = "";
if(free_execution_cache) {
mode = '{"unload_models": true, "free_memory": true}';
}
else {
mode = '{"unload_models": true}';
}
let res = await api.fetchApi(`/free`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: mode
});
if (res.status == 200) {
if(free_execution_cache) {
showToast("'Models' and 'Execution Cache' have been cleared.", 3000);
}
else {
showToast("Models' have been unloaded.", 3000);
}
} else {
showToast('Unloading of models failed. Installed ComfyUI may be an outdated version.', 5000);
}
} catch (error) {
showToast('An error occurred while trying to unload models.', 5000);
}
}
export function md5(inputString) {
const hc = '0123456789abcdef';
const rh = n => {let j,s='';for(j=0;j<=3;j++) s+=hc.charAt((n>>(j*8+4))&0x0F)+hc.charAt((n>>(j*8))&0x0F);return s;}
const ad = (x,y) => {let l=(x&0xFFFF)+(y&0xFFFF);let m=(x>>16)+(y>>16)+(l>>16);return (m<<16)|(l&0xFFFF);}
const rl = (n,c) => (n<<c)|(n>>>(32-c));
const cm = (q,a,b,x,s,t) => ad(rl(ad(ad(a,q),ad(x,t)),s),b);
const ff = (a,b,c,d,x,s,t) => cm((b&c)|((~b)&d),a,b,x,s,t);
const gg = (a,b,c,d,x,s,t) => cm((b&d)|(c&(~d)),a,b,x,s,t);
const hh = (a,b,c,d,x,s,t) => cm(b^c^d,a,b,x,s,t);
const ii = (a,b,c,d,x,s,t) => cm(c^(b|(~d)),a,b,x,s,t);
const sb = x => {
let i;const nblk=((x.length+8)>>6)+1;const blks=[];for(i=0;i<nblk*16;i++) { blks[i]=0 };
for(i=0;i<x.length;i++) {blks[i>>2]|=x.charCodeAt(i)<<((i%4)*8);}
blks[i>>2]|=0x80<<((i%4)*8);blks[nblk*16-2]=x.length*8;return blks;
}
let i,x=sb(inputString),a=1732584193,b=-271733879,c=-1732584194,d=271733878,olda,oldb,oldc,oldd;
for(i=0;i<x.length;i+=16) {olda=a;oldb=b;oldc=c;oldd=d;
a=ff(a,b,c,d,x[i+ 0], 7, -680876936);d=ff(d,a,b,c,x[i+ 1],12, -389564586);c=ff(c,d,a,b,x[i+ 2],17, 606105819);
b=ff(b,c,d,a,x[i+ 3],22,-1044525330);a=ff(a,b,c,d,x[i+ 4], 7, -176418897);d=ff(d,a,b,c,x[i+ 5],12, 1200080426);
c=ff(c,d,a,b,x[i+ 6],17,-1473231341);b=ff(b,c,d,a,x[i+ 7],22, -45705983);a=ff(a,b,c,d,x[i+ 8], 7, 1770035416);
d=ff(d,a,b,c,x[i+ 9],12,-1958414417);c=ff(c,d,a,b,x[i+10],17, -42063);b=ff(b,c,d,a,x[i+11],22,-1990404162);
a=ff(a,b,c,d,x[i+12], 7, 1804603682);d=ff(d,a,b,c,x[i+13],12, -40341101);c=ff(c,d,a,b,x[i+14],17,-1502002290);
b=ff(b,c,d,a,x[i+15],22, 1236535329);a=gg(a,b,c,d,x[i+ 1], 5, -165796510);d=gg(d,a,b,c,x[i+ 6], 9,-1069501632);
c=gg(c,d,a,b,x[i+11],14, 643717713);b=gg(b,c,d,a,x[i+ 0],20, -373897302);a=gg(a,b,c,d,x[i+ 5], 5, -701558691);
d=gg(d,a,b,c,x[i+10], 9, 38016083);c=gg(c,d,a,b,x[i+15],14, -660478335);b=gg(b,c,d,a,x[i+ 4],20, -405537848);
a=gg(a,b,c,d,x[i+ 9], 5, 568446438);d=gg(d,a,b,c,x[i+14], 9,-1019803690);c=gg(c,d,a,b,x[i+ 3],14, -187363961);
b=gg(b,c,d,a,x[i+ 8],20, 1163531501);a=gg(a,b,c,d,x[i+13], 5,-1444681467);d=gg(d,a,b,c,x[i+ 2], 9, -51403784);
c=gg(c,d,a,b,x[i+ 7],14, 1735328473);b=gg(b,c,d,a,x[i+12],20,-1926607734);a=hh(a,b,c,d,x[i+ 5], 4, -378558);
d=hh(d,a,b,c,x[i+ 8],11,-2022574463);c=hh(c,d,a,b,x[i+11],16, 1839030562);b=hh(b,c,d,a,x[i+14],23, -35309556);
a=hh(a,b,c,d,x[i+ 1], 4,-1530992060);d=hh(d,a,b,c,x[i+ 4],11, 1272893353);c=hh(c,d,a,b,x[i+ 7],16, -155497632);
b=hh(b,c,d,a,x[i+10],23,-1094730640);a=hh(a,b,c,d,x[i+13], 4, 681279174);d=hh(d,a,b,c,x[i+ 0],11, -358537222);
c=hh(c,d,a,b,x[i+ 3],16, -722521979);b=hh(b,c,d,a,x[i+ 6],23, 76029189);a=hh(a,b,c,d,x[i+ 9], 4, -640364487);
d=hh(d,a,b,c,x[i+12],11, -421815835);c=hh(c,d,a,b,x[i+15],16, 530742520);b=hh(b,c,d,a,x[i+ 2],23, -995338651);
a=ii(a,b,c,d,x[i+ 0], 6, -198630844);d=ii(d,a,b,c,x[i+ 7],10, 1126891415);c=ii(c,d,a,b,x[i+14],15,-1416354905);
b=ii(b,c,d,a,x[i+ 5],21, -57434055);a=ii(a,b,c,d,x[i+12], 6, 1700485571);d=ii(d,a,b,c,x[i+ 3],10,-1894986606);
c=ii(c,d,a,b,x[i+10],15, -1051523);b=ii(b,c,d,a,x[i+ 1],21,-2054922799);a=ii(a,b,c,d,x[i+ 8], 6, 1873313359);
d=ii(d,a,b,c,x[i+15],10, -30611744);c=ii(c,d,a,b,x[i+ 6],15,-1560198380);b=ii(b,c,d,a,x[i+13],21, 1309151649);
a=ii(a,b,c,d,x[i+ 4], 6, -145523070);d=ii(d,a,b,c,x[i+11],10,-1120210379);c=ii(c,d,a,b,x[i+ 2],15, 718787259);
b=ii(b,c,d,a,x[i+ 9],21, -343485551);a=ad(a,olda);b=ad(b,oldb);c=ad(c,oldc);d=ad(d,oldd);
}
return rh(a)+rh(b)+rh(c)+rh(d);
}
export async function fetchData(route, options) {
let err;
const res = await api.fetchApi(route, options).catch(e => {
err = e;
});
if (!res) {
return {
status: 400,
error: new Error("Unknown Error")
}
}
const { status, statusText } = res;
if (err) {
return {
status,
error: err
}
}
if (status !== 200) {
return {
status,
error: new Error(statusText || "Unknown Error")
}
}
const data = await res.json();
if (!data) {
return {
status,
error: new Error(`Failed to load data: ${route}`)
}
}
return {
status,
data
}
}
export const icons = {
search: '<svg viewBox="0 0 24 24" width="100%" height="100%" pointer-events="none" xmlns="http://www.w3.org/2000/svg"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m21 21-4.486-4.494M19 10.5a8.5 8.5 0 1 1-17 0 8.5 8.5 0 0 1 17 0"/></svg>',
extensions: '<svg viewBox="64 64 896 896" width="100%" height="100%" pointer-events="none" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M843.5 737.4c-12.4-75.2-79.2-129.1-155.3-125.4S550.9 676 546 752c-153.5-4.8-208-40.7-199.1-113.7 3.3-27.3 19.8-41.9 50.1-49 18.4-4.3 38.8-4.9 57.3-3.2 1.7.2 3.5.3 5.2.5 11.3 2.7 22.8 5 34.3 6.8 34.1 5.6 68.8 8.4 101.8 6.6 92.8-5 156-45.9 159.2-132.7 3.1-84.1-54.7-143.7-147.9-183.6-29.9-12.8-61.6-22.7-93.3-30.2-14.3-3.4-26.3-5.7-35.2-7.2-7.9-75.9-71.5-133.8-147.8-134.4S189.7 168 180.5 243.8s40 146.3 114.2 163.9 149.9-23.3 175.7-95.1c9.4 1.7 18.7 3.6 28 5.8 28.2 6.6 56.4 15.4 82.4 26.6 70.7 30.2 109.3 70.1 107.5 119.9-1.6 44.6-33.6 65.2-96.2 68.6-27.5 1.5-57.6-.9-87.3-5.8-8.3-1.4-15.9-2.8-22.6-4.3-3.9-.8-6.6-1.5-7.8-1.8l-3.1-.6c-2.2-.3-5.9-.8-10.7-1.3-25-2.3-52.1-1.5-78.5 4.6-55.2 12.9-93.9 47.2-101.1 105.8-15.7 126.2 78.6 184.7 276 188.9 29.1 70.4 106.4 107.9 179.6 87 73.3-20.9 119.3-93.4 106.9-168.6M329.1 345.2a83.3 83.3 0 1 1 .01-166.61 83.3 83.3 0 0 1-.01 166.61M695.6 845a83.3 83.3 0 1 1 .01-166.61A83.3 83.3 0 0 1 695.6 845"/></svg>',
conflicts: '<svg viewBox="0 0 400 400" width="100%" height="100%" pointer-events="none" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="m397.2 350.4.2-.2-180-320-.2.2C213.8 24.2 207.4 20 200 20s-13.8 4.2-17.2 10.4l-.2-.2-180 320 .2.2c-1.6 2.8-2.8 6-2.8 9.6 0 11 9 20 20 20h360c11 0 20-9 20-20 0-3.6-1.2-6.8-2.8-9.6M220 340h-40v-40h40zm0-60h-40V120h40z"/></svg>',
passed: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 426.667 426.667"><path fill="#6AC259" d="M213.333,0C95.518,0,0,95.514,0,213.333s95.518,213.333,213.333,213.333c117.828,0,213.333-95.514,213.333-213.333S331.157,0,213.333,0z M174.199,322.918l-93.935-93.931l31.309-31.309l62.626,62.622l140.894-140.898l31.309,31.309L174.199,322.918z"/></svg>',
download: '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" width="100%" height="100%" viewBox="0 0 32 32"><path fill="currentColor" d="M26 24v4H6v-4H4v4a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2v-4zm0-10l-1.41-1.41L17 20.17V2h-2v18.17l-7.59-7.58L6 14l10 10l10-10z"></path></svg>'
}

View File

@ -0,0 +1,809 @@
import { app } from "../../scripts/app.js";
import { api } from "../../scripts/api.js"
import { sleep, show_message } from "./common.js";
import { GroupNodeConfig, GroupNodeHandler } from "../../extensions/core/groupNode.js";
import { ComfyDialog, $el } from "../../scripts/ui.js";
let pack_map = {};
let rpack_map = {};
export function getPureName(node) {
// group nodes/
let category = null;
if(node.category) {
category = node.category.substring(12);
}
else {
category = node.constructor.category?.substring(12);
}
if(category) {
let purename = node.comfyClass.substring(category.length+1);
return purename;
}
else if(node.comfyClass.startsWith('workflow/')) {
return node.comfyClass.substring(9);
}
else {
return node.comfyClass;
}
}
function isValidVersionString(version) {
const versionPattern = /^(\d+)\.(\d+)(\.(\d+))?$/;
const match = version.match(versionPattern);
return match !== null &&
parseInt(match[1], 10) >= 0 &&
parseInt(match[2], 10) >= 0 &&
(!match[3] || parseInt(match[4], 10) >= 0);
}
function register_pack_map(name, data) {
if(data.packname) {
pack_map[data.packname] = name;
rpack_map[name] = data;
}
else {
rpack_map[name] = data;
}
}
function storeGroupNode(name, data, register=true) {
let extra = app.graph.extra;
if (!extra) app.graph.extra = extra = {};
let groupNodes = extra.groupNodes;
if (!groupNodes) extra.groupNodes = groupNodes = {};
groupNodes[name] = data;
if(register) {
register_pack_map(name, data);
}
}
export async function load_components() {
let data = await api.fetchApi('/manager/component/loads', {method: "POST"});
let components = await data.json();
let start_time = Date.now();
let failed = [];
let failed2 = [];
for(let name in components) {
if(app.graph.extra?.groupNodes?.[name]) {
if(data) {
let data = components[name];
let category = data.packname;
if(data.category) {
category += "/" + data.category;
}
if(category == '') {
category = 'components';
}
const config = new GroupNodeConfig(name, data);
await config.registerType(category);
register_pack_map(name, data);
continue;
}
}
let nodeData = components[name];
storeGroupNode(name, nodeData);
const config = new GroupNodeConfig(name, nodeData);
while(true) {
try {
let category = nodeData.packname;
if(nodeData.category) {
category += "/" + nodeData.category;
}
if(category == '') {
category = 'components';
}
await config.registerType(category);
register_pack_map(name, nodeData);
break;
}
catch {
let elapsed_time = Date.now() - start_time;
if (elapsed_time > 5000) {
failed.push(name);
break;
} else {
await sleep(100);
}
}
}
}
// fallback1
for(let i in failed) {
let name = failed[i];
if(app.graph.extra?.groupNodes?.[name]) {
continue;
}
let nodeData = components[name];
storeGroupNode(name, nodeData);
const config = new GroupNodeConfig(name, nodeData);
while(true) {
try {
let category = nodeData.packname;
if(nodeData.workflow.category) {
category += "/" + nodeData.category;
}
if(category == '') {
category = 'components';
}
await config.registerType(category);
register_pack_map(name, nodeData);
break;
}
catch {
let elapsed_time = Date.now() - start_time;
if (elapsed_time > 10000) {
failed2.push(name);
break;
} else {
await sleep(100);
}
}
}
}
// fallback2
for(let name in failed2) {
let name = failed2[i];
let nodeData = components[name];
storeGroupNode(name, nodeData);
const config = new GroupNodeConfig(name, nodeData);
while(true) {
try {
let category = nodeData.workflow.packname;
if(nodeData.workflow.category) {
category += "/" + nodeData.category;
}
if(category == '') {
category = 'components';
}
await config.registerType(category);
register_pack_map(name, nodeData);
break;
}
catch {
let elapsed_time = Date.now() - start_time;
if (elapsed_time > 30000) {
failed.push(name);
break;
} else {
await sleep(100);
}
}
}
}
}
async function save_as_component(node, version, author, prefix, nodename, packname, category) {
let component_name = `${prefix}::${nodename}`;
let subgraph = app.graph.extra?.groupNodes?.[component_name];
if(!subgraph) {
subgraph = app.graph.extra?.groupNodes?.[getPureName(node)];
}
subgraph.version = version;
subgraph.author = author;
subgraph.datetime = Date.now();
subgraph.packname = packname;
subgraph.category = category;
let body =
{
name: component_name,
workflow: subgraph
};
pack_map[packname] = component_name;
rpack_map[component_name] = subgraph;
const res = await api.fetchApi('/manager/component/save', {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(body),
});
if(res.status == 200) {
storeGroupNode(component_name, subgraph);
const config = new GroupNodeConfig(component_name, subgraph);
let category = body.workflow.packname;
if(body.workflow.category) {
category += "/" + body.workflow.category;
}
if(category == '') {
category = 'components';
}
await config.registerType(category);
let path = await res.text();
show_message(`Component '${component_name}' is saved into:\n${path}`);
}
else
show_message(`Failed to save component.`);
}
async function import_component(component_name, component, mode) {
if(mode) {
let body =
{
name: component_name,
workflow: component
};
const res = await api.fetchApi('/manager/component/save', {
method: "POST",
headers: { "Content-Type": "application/json", },
body: JSON.stringify(body)
});
}
let category = component.packname;
if(component.category) {
category += "/" + component.category;
}
if(category == '') {
category = 'components';
}
storeGroupNode(component_name, component);
const config = new GroupNodeConfig(component_name, component);
await config.registerType(category);
}
function restore_to_loaded_component(component_name) {
if(rpack_map[component_name]) {
let component = rpack_map[component_name];
storeGroupNode(component_name, component, false);
const config = new GroupNodeConfig(component_name, component);
config.registerType(component.category);
}
}
// Using a timestamp prevents duplicate pastes and ensures the prevention of re-deletion of litegrapheditor_clipboard.
let last_paste_timestamp = null;
function versionCompare(v1, v2) {
let ver1;
let ver2;
if(v1 && v1 != '') {
ver1 = v1.split('.');
ver1[0] = parseInt(ver1[0]);
ver1[1] = parseInt(ver1[1]);
if(ver1.length == 2)
ver1.push(0);
else
ver1[2] = parseInt(ver2[2]);
}
else {
ver1 = [0,0,0];
}
if(v2 && v2 != '') {
ver2 = v2.split('.');
ver2[0] = parseInt(ver2[0]);
ver2[1] = parseInt(ver2[1]);
if(ver2.length == 2)
ver2.push(0);
else
ver2[2] = parseInt(ver2[2]);
}
else {
ver2 = [0,0,0];
}
if(ver1[0] > ver2[0])
return -1;
else if(ver1[0] < ver2[0])
return 1;
if(ver1[1] > ver2[1])
return -1;
else if(ver1[1] < ver2[1])
return 1;
if(ver1[2] > ver2[2])
return -1;
else if(ver1[2] < ver2[2])
return 1;
return 0;
}
function checkVersion(name, component) {
let msg = '';
if(rpack_map[name]) {
let old_version = rpack_map[name].version;
if(!old_version || old_version == '') {
msg = ` '${name}' Upgrade (V0.0 -> V${component.version})`;
}
else {
let c = versionCompare(old_version, component.version);
if(c < 0) {
msg = ` '${name}' Downgrade (V${old_version} -> V${component.version})`;
}
else if(c > 0) {
msg = ` '${name}' Upgrade (V${old_version} -> V${component.version})`;
}
else {
msg = ` '${name}' Same version (V${component.version})`;
}
}
}
else {
msg = `'${name}' NEW (V${component.version})`;
}
return msg;
}
function handle_import_components(components) {
let msg = 'Components:\n';
let cnt = 0;
for(let name in components) {
let component = components[name];
let v = checkVersion(name, component);
if(cnt < 10) {
msg += v + '\n';
}
else if (cnt == 10) {
msg += '...\n';
}
else {
// do nothing
}
cnt++;
}
let last_name = null;
msg += '\nWill you load components?\n';
if(confirm(msg)) {
let mode = confirm('\nWill you save components?\n(cancel=load without save)');
for(let name in components) {
let component = components[name];
import_component(name, component, mode);
last_name = name;
}
if(mode) {
show_message('Components are saved.');
}
else {
show_message('Components are loaded.');
}
}
if(cnt == 1 && last_name) {
const node = LiteGraph.createNode(`workflow/${last_name}`);
node.pos = [app.canvas.graph_mouse[0], app.canvas.graph_mouse[1]];
app.canvas.graph.add(node, false);
}
}
function handlePaste(e) {
let data = (e.clipboardData || window.clipboardData);
const items = data.items;
for(const item of items) {
if(item.kind == 'string' && item.type == 'text/plain') {
data = data.getData("text/plain");
try {
let json_data = JSON.parse(data);
if(json_data.kind == 'ComfyUI Components' && last_paste_timestamp != json_data.timestamp) {
last_paste_timestamp = json_data.timestamp;
handle_import_components(json_data.components);
// disable paste node
localStorage.removeItem("litegrapheditor_clipboard", null);
}
else {
console.log('This components are already pasted: ignored');
}
}
catch {
// nothing to do
}
}
}
}
document.addEventListener("paste", handlePaste);
export class ComponentBuilderDialog extends ComfyDialog {
constructor() {
super();
}
clear() {
while (this.element.children.length) {
this.element.removeChild(this.element.children[0]);
}
}
show() {
this.invalidateControl();
this.element.style.display = "block";
this.element.style.zIndex = 10001;
this.element.style.width = "500px";
this.element.style.height = "480px";
}
invalidateControl() {
this.clear();
let self = this;
const close_button = $el("button", { id: "cm-close-button", type: "button", textContent: "Close", onclick: () => self.close() });
this.save_button = $el("button",
{ id: "cm-save-button", type: "button", textContent: "Save", onclick: () =>
{
save_as_component(self.target_node, self.version_string.value.trim(), self.author.value.trim(), self.node_prefix.value.trim(),
self.getNodeName(), self.getPackName(), self.category.value.trim());
}
});
let default_nodename = getPureName(this.target_node).trim();
let groupNode = app.graph.extra.groupNodes[default_nodename];
let default_packname = groupNode.packname;
if(!default_packname) {
default_packname = '';
}
let default_category = groupNode.category;
if(!default_category) {
default_category = '';
}
this.default_ver = groupNode.version;
if(!this.default_ver) {
this.default_ver = '0.0';
}
let default_author = groupNode.author;
if(!default_author) {
default_author = '';
}
let delimiterIndex = default_nodename.indexOf('::');
let default_prefix = "";
if(delimiterIndex != -1) {
default_prefix = default_nodename.substring(0, delimiterIndex);
default_nodename = default_nodename.substring(delimiterIndex + 2);
}
if(!default_prefix) {
this.save_button.disabled = true;
}
this.pack_list = this.createPackListCombo();
let version_string = this.createLabeledInput('input version (e.g. 1.0)', '*Version : ', this.default_ver);
this.version_string = version_string[1];
this.version_string.disabled = true;
let author = this.createLabeledInput('input author (e.g. Dr.Lt.Data)', 'Author : ', default_author);
this.author = author[1];
let node_prefix = this.createLabeledInput('input node prefix (e.g. mypack)', '*Prefix : ', default_prefix);
this.node_prefix = node_prefix[1];
let manual_nodename = this.createLabeledInput('input node name (e.g. MAKE_BASIC_PIPE)', 'Nodename : ', default_nodename);
this.manual_nodename = manual_nodename[1];
let manual_packname = this.createLabeledInput('input pack name (e.g. mypack)', 'Packname : ', default_packname);
this.manual_packname = manual_packname[1];
let category = this.createLabeledInput('input category (e.g. util/pipe)', 'Category : ', default_category);
this.category = category[1];
this.node_label = this.createNodeLabel();
let author_mode = this.createAuthorModeCheck();
this.author_mode = author_mode[0];
const content =
$el("div.comfy-modal-content",
[
$el("tr.cm-title", {}, [
$el("font", {size:6, color:"white"}, [`ComfyUI-Manager: Component Builder`])]
),
$el("br", {}, []),
$el("div.cm-menu-container",
[
author_mode[0],
author_mode[1],
category[0],
author[0],
node_prefix[0],
manual_nodename[0],
manual_packname[0],
version_string[0],
this.pack_list,
$el("br", {}, []),
this.node_label
]),
$el("br", {}, []),
this.save_button,
close_button,
]
);
content.style.width = '100%';
content.style.height = '100%';
this.element = $el("div.comfy-modal", { id:'cm-manager-dialog', parent: document.body }, [ content ]);
}
validateInput() {
let msg = "";
if(!isValidVersionString(this.version_string.value)) {
msg += 'Invalid version string: '+event.value+"\n";
}
if(this.node_prefix.value.trim() == '') {
msg += 'Node prefix cannot be empty\n';
}
if(this.manual_nodename.value.trim() == '') {
msg += 'Node name cannot be empty\n';
}
if(msg != '') {
// alert(msg);
}
this.save_button.disabled = msg != "";
}
getPackName() {
if(this.pack_list.selectedIndex == 0) {
return this.manual_packname.value.trim();
}
return this.pack_list.value.trim();
}
getNodeName() {
if(this.manual_nodename.value.trim() != '') {
return this.manual_nodename.value.trim();
}
return getPureName(this.target_node);
}
createAuthorModeCheck() {
let check = $el("input",{type:'checkbox', id:"author-mode"},[])
const check_label = $el("label",{for:"author-mode"},["Enable author mode"]);
check_label.style.color = "var(--fg-color)";
check_label.style.cursor = "pointer";
check.checked = false;
let self = this;
check.onchange = () => {
self.version_string.disabled = !check.checked;
if(!check.checked) {
self.version_string.value = self.default_ver;
}
else {
alert('If you are not the author, it is not recommended to change the version, as it may cause component update issues.');
}
};
return [check, check_label];
}
createNodeLabel() {
let label = $el('p');
label.className = 'cb-node-label';
if(this.target_node.comfyClass.includes('::'))
label.textContent = getPureName(this.target_node);
else
label.textContent = " _::" + getPureName(this.target_node);
return label;
}
createLabeledInput(placeholder, label, value) {
let textbox = $el('input.cb-widget-input', {type:'text', placeholder:placeholder, value:value}, []);
let self = this;
textbox.onchange = () => {
this.validateInput.call(self);
this.node_label.textContent = this.node_prefix.value + "::" + this.manual_nodename.value;
}
let row = $el('span.cb-widget', {}, [ $el('span.cb-widget-input-label', label), textbox]);
return [row, textbox];
}
createPackListCombo() {
let combo = document.createElement("select");
combo.className = "cb-widget";
let default_packname_option = { value: '##manual', text: 'Packname: Manual' };
combo.appendChild($el('option', default_packname_option, []));
for(let name in pack_map) {
combo.appendChild($el('option', { value: name, text: 'Packname: '+ name }, []));
}
let self = this;
combo.onchange = function () {
if(combo.selectedIndex == 0) {
self.manual_packname.disabled = false;
}
else {
self.manual_packname.disabled = true;
}
};
return combo;
}
}
let orig_handleFile = app.handleFile;
function handleFile(file) {
if (file.name?.endsWith(".json") || file.name?.endsWith(".pack")) {
const reader = new FileReader();
reader.onload = async () => {
let is_component = false;
const jsonContent = JSON.parse(reader.result);
for(let name in jsonContent) {
let cand = jsonContent[name];
is_component = cand.datetime && cand.version;
break;
}
if(is_component) {
handle_import_components(jsonContent);
}
else {
orig_handleFile.call(app, file);
}
};
reader.readAsText(file);
return;
}
orig_handleFile.call(app, file);
}
app.handleFile = handleFile;
let current_component_policy = 'workflow';
try {
api.fetchApi('/manager/component/policy')
.then(response => response.text())
.then(data => { current_component_policy = data; });
}
catch {}
function getChangedVersion(groupNodes) {
if(!Object.keys(pack_map).length || !groupNodes)
return null;
let res = {};
for(let component_name in groupNodes) {
let data = groupNodes[component_name];
if(rpack_map[component_name]) {
let v = versionCompare(data.version, rpack_map[component_name].version);
res[component_name] = v;
}
}
return res;
}
const loadGraphData = app.loadGraphData;
app.loadGraphData = async function () {
if(arguments.length == 0)
return await loadGraphData.apply(this, arguments);
let graphData = arguments[0];
let groupNodes = graphData.extra?.groupNodes;
let res = getChangedVersion(groupNodes);
if(res) {
let target_components = null;
switch(current_component_policy) {
case 'higher':
target_components = Object.keys(res).filter(key => res[key] == 1);
break;
case 'mine':
target_components = Object.keys(res);
break;
default:
// do nothing
}
if(target_components) {
for(let i in target_components) {
let component_name = target_components[i];
let component = rpack_map[component_name];
if(component && graphData.extra?.groupNodes) {
graphData.extra.groupNodes[component_name] = component;
}
}
}
}
else {
console.log('Empty components: policy ignored');
}
arguments[0] = graphData;
return await loadGraphData.apply(this, arguments);
};
export function set_component_policy(v) {
current_component_policy = v;
}
let graphToPrompt = app.graphToPrompt;
app.graphToPrompt = async function () {
let p = await graphToPrompt.call(app);
try {
let groupNodes = p.workflow.extra?.groupNodes;
if(groupNodes) {
p.workflow.extra = { ... p.workflow.extra};
// get used group nodes
let used_group_nodes = new Set();
for(let node of p.workflow.nodes) {
if(node.type.startsWith('workflow/')) {
used_group_nodes.add(node.type.substring(9));
}
}
// remove unused group nodes
let new_groupNodes = {};
for (let key in p.workflow.extra.groupNodes) {
if (used_group_nodes.has(key)) {
new_groupNodes[key] = p.workflow.extra.groupNodes[key];
}
}
p.workflow.extra.groupNodes = new_groupNodes;
}
}
catch(e) {
console.log(`Failed to filtering group nodes: ${e}`);
}
return p;
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,891 @@
import { $el } from "../../scripts/ui.js";
import {
manager_instance, rebootAPI,
fetchData, md5, icons
} from "./common.js";
// https://cenfun.github.io/turbogrid/api.html
import TG from "./turbogrid.esm.js";
const pageCss = `
.cmm-manager {
--grid-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
z-index: 10001;
width: 80%;
height: 80%;
display: flex;
flex-direction: column;
gap: 10px;
color: var(--fg-color);
font-family: arial, sans-serif;
}
.cmm-manager .cmm-flex-auto {
flex: auto;
}
.cmm-manager button {
font-size: 16px;
color: var(--input-text);
background-color: var(--comfy-input-bg);
border-radius: 8px;
border-color: var(--border-color);
border-style: solid;
margin: 0;
padding: 4px 8px;
min-width: 100px;
}
.cmm-manager button:disabled,
.cmm-manager input:disabled,
.cmm-manager select:disabled {
color: gray;
}
.cmm-manager button:disabled {
background-color: var(--comfy-input-bg);
}
.cmm-manager-header {
display: flex;
flex-wrap: wrap;
gap: 5px;
align-items: center;
padding: 0 5px;
}
.cmm-manager-header label {
display: flex;
gap: 5px;
align-items: center;
}
.cmm-manager-type,
.cmm-manager-base,
.cmm-manager-filter {
height: 28px;
line-height: 28px;
}
.cmm-manager-keywords {
height: 28px;
line-height: 28px;
padding: 0 5px 0 26px;
background-size: 16px;
background-position: 5px center;
background-repeat: no-repeat;
background-image: url("data:image/svg+xml;charset=utf8,${encodeURIComponent(icons.search.replace("currentColor", "#888"))}");
}
.cmm-manager-status {
padding-left: 10px;
}
.cmm-manager-grid {
flex: auto;
border: 1px solid var(--border-color);
overflow: hidden;
}
.cmm-manager-selection {
display: flex;
flex-wrap: wrap;
gap: 10px;
align-items: center;
}
.cmm-manager-message {
}
.cmm-manager-footer {
display: flex;
flex-wrap: wrap;
gap: 10px;
align-items: center;
}
.cmm-manager-grid .tg-turbogrid {
font-family: var(--grid-font);
font-size: 15px;
background: var(--bg-color);
}
.cmm-manager-grid .cmm-node-name a {
color: skyblue;
text-decoration: none;
word-break: break-word;
}
.cmm-manager-grid .cmm-node-desc a {
color: #5555FF;
font-weight: bold;
text-decoration: none;
}
.cmm-manager-grid .tg-cell a:hover {
text-decoration: underline;
}
.cmm-icon-passed {
width: 20px;
height: 20px;
position: absolute;
left: calc(50% - 10px);
top: calc(50% - 10px);
}
.cmm-manager .cmm-btn-enable {
background-color: blue;
color: white;
}
.cmm-manager .cmm-btn-disable {
background-color: MediumSlateBlue;
color: white;
}
.cmm-manager .cmm-btn-install {
background-color: black;
color: white;
}
.cmm-btn-download {
width: 18px;
height: 18px;
position: absolute;
left: calc(50% - 10px);
top: calc(50% - 10px);
cursor: pointer;
opacity: 0.8;
color: #fff;
}
.cmm-btn-download:hover {
opacity: 1;
}
.cmm-manager-light .cmm-btn-download {
color: #000;
}
@keyframes cmm-btn-loading-bg {
0% {
left: 0;
}
100% {
left: -105px;
}
}
.cmm-manager button.cmm-btn-loading {
position: relative;
overflow: hidden;
border-color: rgb(0 119 207 / 80%);
background-color: var(--comfy-input-bg);
}
.cmm-manager button.cmm-btn-loading::after {
position: absolute;
top: 0;
left: 0;
content: "";
width: 500px;
height: 100%;
background-image: repeating-linear-gradient(
-45deg,
rgb(0 119 207 / 30%),
rgb(0 119 207 / 30%) 10px,
transparent 10px,
transparent 15px
);
animation: cmm-btn-loading-bg 2s linear infinite;
}
.cmm-manager-light .cmm-node-name a {
color: blue;
}
.cmm-manager-light .cm-warn-note {
background-color: #ccc !important;
}
.cmm-manager-light .cmm-btn-install {
background-color: #333;
}
`;
const pageHtml = `
<div class="cmm-manager-header">
<label>Filter
<select class="cmm-manager-filter"></select>
</label>
<label>Type
<select class="cmm-manager-type"></select>
</label>
<label>Base
<select class="cmm-manager-base"></select>
</label>
<input class="cmm-manager-keywords" type="search" placeholder="Search" />
<div class="cmm-manager-status"></div>
<div class="cmm-flex-auto"></div>
</div>
<div class="cmm-manager-grid"></div>
<div class="cmm-manager-selection"></div>
<div class="cmm-manager-message"></div>
<div class="cmm-manager-footer">
<button class="cmm-manager-close">Close</button>
<div class="cmm-flex-auto"></div>
</div>
`;
export class ModelManager {
static instance = null;
constructor(app, manager_dialog) {
this.app = app;
this.manager_dialog = manager_dialog;
this.id = "cmm-manager";
this.filter = '';
this.type = '';
this.base = '';
this.keywords = '';
this.init();
}
init() {
if (!document.querySelector(`style[context="${this.id}"]`)) {
const $style = document.createElement("style");
$style.setAttribute("context", this.id);
$style.innerHTML = pageCss;
document.head.appendChild($style);
}
this.element = $el("div", {
parent: document.body,
className: "comfy-modal cmm-manager"
});
this.element.innerHTML = pageHtml;
this.initFilter();
this.bindEvents();
this.initGrid();
}
initFilter() {
this.filterList = [{
label: "All",
value: ""
}, {
label: "Installed",
value: "True"
}, {
label: "Not Installed",
value: "False"
}];
this.typeList = [{
label: "All",
value: ""
}];
this.baseList = [{
label: "All",
value: ""
}];
this.updateFilter();
}
updateFilter() {
const $filter = this.element.querySelector(".cmm-manager-filter");
$filter.innerHTML = this.filterList.map(item => {
const selected = item.value === this.filter ? " selected" : "";
return `<option value="${item.value}"${selected}>${item.label}</option>`
}).join("");
const $type = this.element.querySelector(".cmm-manager-type");
$type.innerHTML = this.typeList.map(item => {
const selected = item.value === this.type ? " selected" : "";
return `<option value="${item.value}"${selected}>${item.label}</option>`
}).join("");
const $base = this.element.querySelector(".cmm-manager-base");
$base.innerHTML = this.baseList.map(item => {
const selected = item.value === this.base ? " selected" : "";
return `<option value="${item.value}"${selected}>${item.label}</option>`
}).join("");
}
bindEvents() {
const eventsMap = {
".cmm-manager-filter": {
change: (e) => {
this.filter = e.target.value;
this.updateGrid();
}
},
".cmm-manager-type": {
change: (e) => {
this.type = e.target.value;
this.updateGrid();
}
},
".cmm-manager-base": {
change: (e) => {
this.base = e.target.value;
this.updateGrid();
}
},
".cmm-manager-keywords": {
input: (e) => {
const keywords = `${e.target.value}`.trim();
if (keywords !== this.keywords) {
this.keywords = keywords;
this.updateGrid();
}
},
focus: (e) => e.target.select()
},
".cmm-manager-selection": {
click: (e) => {
const target = e.target;
const mode = target.getAttribute("mode");
if (mode === "install") {
this.installModels(this.selectedModels, target);
}
}
},
".cmm-manager-close": {
click: (e) => this.close()
},
};
Object.keys(eventsMap).forEach(selector => {
const target = this.element.querySelector(selector);
if (target) {
const events = eventsMap[selector];
if (events) {
Object.keys(events).forEach(type => {
target.addEventListener(type, events[type]);
});
}
}
});
}
// ===========================================================================================
initGrid() {
const container = this.element.querySelector(".cmm-manager-grid");
const grid = new TG.Grid(container);
this.grid = grid;
grid.bind('onUpdated', (e, d) => {
this.showStatus(`${grid.viewRows.length.toLocaleString()} external models`);
});
grid.bind('onSelectChanged', (e, changes) => {
this.renderSelected();
});
grid.bind('onClick', (e, d) => {
const { rowItem } = d;
const target = d.e.target;
const mode = target.getAttribute("mode");
if (mode === "install") {
this.installModels([rowItem], target);
}
});
grid.setOption({
theme: 'dark',
selectVisible: true,
selectMultiple: true,
selectAllVisible: true,
textSelectable: true,
scrollbarRound: true,
frozenColumn: 1,
rowNotFound: "No Results",
rowHeight: 40,
bindWindowResize: true,
bindContainerResize: true,
cellResizeObserver: (rowItem, columnItem) => {
const autoHeightColumns = ['name', 'description'];
return autoHeightColumns.includes(columnItem.id)
},
// updateGrid handler for filter and keywords
rowFilter: (rowItem) => {
const searchableColumns = ["name", "type", "base", "description", "filename", "save_path"];
let shouldShown = grid.highlightKeywordsFilter(rowItem, searchableColumns, this.keywords);
if (shouldShown) {
if(this.filter && rowItem.installed !== this.filter) {
return false;
}
if(this.type && rowItem.type !== this.type) {
return false;
}
if(this.base && rowItem.base !== this.base) {
return false;
}
}
return shouldShown;
}
});
}
renderGrid() {
// update theme
const colorPalette = this.app.ui.settings.settingsValues['Comfy.ColorPalette'];
Array.from(this.element.classList).forEach(cn => {
if (cn.startsWith("cmm-manager-")) {
this.element.classList.remove(cn);
}
});
this.element.classList.add(`cmm-manager-${colorPalette}`);
const options = {
theme: colorPalette === "light" ? "" : "dark"
};
const rows = this.modelList || [];
const columns = [{
id: 'id',
name: 'ID',
width: 50,
align: 'center'
}, {
id: 'name',
name: 'Name',
width: 200,
minWidth: 100,
maxWidth: 500,
classMap: 'cmm-node-name',
formatter: function(name, rowItem, columnItem, cellNode) {
return `<a href=${rowItem.reference} target="_blank"><b>${name}</b></a>`;
}
}, {
id: 'installed',
name: 'Install',
width: 130,
minWidth: 110,
maxWidth: 200,
sortable: false,
align: 'center',
formatter: (installed, rowItem, columnItem) => {
if (rowItem.refresh) {
return `<font color="red">Refresh Required</span>`;
}
if (installed === "True") {
return `<div class="cmm-icon-passed">${icons.passed}</div>`;
}
return `<button class="cmm-btn-install" mode="install">Install</button>`;
}
}, {
id: 'url',
name: '',
width: 50,
sortable: false,
align: 'center',
formatter: (url, rowItem, columnItem) => {
return `<a class="cmm-btn-download" title="Download file" href="${url}" target="_blank">${icons.download}</a>`;
}
}, {
id: 'size',
name: 'Size',
width: 100,
formatter: (size) => {
if (typeof size === "number") {
return this.formatSize(size);
}
return size;
}
}, {
id: 'type',
name: 'Type',
width: 100
}, {
id: 'base',
name: 'Base'
}, {
id: 'description',
name: 'Description',
width: 400,
maxWidth: 5000,
classMap: 'cmm-node-desc'
}, {
id: "save_path",
name: 'Save Path',
width: 200
}, {
id: 'filename',
name: 'Filename',
width: 200
}];
this.grid.setData({
options,
rows,
columns
});
this.grid.render();
}
updateGrid() {
if (this.grid) {
this.grid.update();
}
}
// ===========================================================================================
renderSelected() {
const selectedList = this.grid.getSelectedRows();
if (!selectedList.length) {
this.showSelection("");
this.selectedModels = [];
return;
}
this.selectedModels = selectedList;
this.showSelection(`<span>Selected <b>${selectedList.length}</b> models <button class="cmm-btn-install" mode="install">Install</button>`);
}
focusInstall(item) {
const cellNode = this.grid.getCellNode(item, "installed");
if (cellNode) {
const cellBtn = cellNode.querySelector(`button[mode="install"]`);
if (cellBtn) {
cellBtn.classList.add("cmm-btn-loading");
return true
}
}
}
async installModels(list, btn) {
btn.classList.add("cmm-btn-loading");
this.showLoading();
this.showError("");
let needRestart = false;
let errorMsg = "";
for (const item of list) {
this.grid.scrollRowIntoView(item);
if (!this.focusInstall(item)) {
this.grid.onNextUpdated(() => {
this.focusInstall(item);
});
}
this.showStatus(`Install ${item.name} ...`);
const data = item.originalData;
const res = await fetchData('/model/install', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(data)
});
if (res.error) {
errorMsg = `Install failed: ${item.name} ${res.error.message}`;
break;;
}
needRestart = true;
this.grid.setRowSelected(item, false);
item.refresh = true;
item.selectable = false;
this.grid.updateCell(item, "installed");
this.grid.updateCell(item, "tg-column-select");
this.showStatus(`Install ${item.name} successfully`);
}
this.hideLoading();
btn.classList.remove("cmm-btn-loading");
if (errorMsg) {
this.showError(errorMsg);
} else {
this.showStatus(`Install ${list.length} models successfully`);
}
if (needRestart) {
this.showMessage(`To apply the installed model, please click the 'Refresh' button on the main menu.`, "red")
}
}
getModelList(models) {
const typeMap = new Map();
const baseMap = new Map();
models.forEach((item, i) => {
const { type, base, name, reference, installed } = item;
item.originalData = JSON.parse(JSON.stringify(item));
item.size = this.sizeToBytes(item.size);
item.hash = md5(name + reference);
item.id = i + 1;
if (installed === "True") {
item.selectable = false;
}
typeMap.set(type, type);
baseMap.set(base, base);
});
const typeList = [];
typeMap.forEach(type => {
typeList.push({
label: type,
value: type
});
});
typeList.sort((a,b)=> {
const au = a.label.toUpperCase();
const bu = b.label.toUpperCase();
if (au !== bu) {
return au > bu ? 1 : -1;
}
return 0;
});
this.typeList = [{
label: "All",
value: ""
}].concat(typeList);
const baseList = [];
baseMap.forEach(base => {
baseList.push({
label: base,
value: base
});
});
baseList.sort((a,b)=> {
const au = a.label.toUpperCase();
const bu = b.label.toUpperCase();
if (au !== bu) {
return au > bu ? 1 : -1;
}
return 0;
});
this.baseList = [{
label: "All",
value: ""
}].concat(baseList);
return models;
}
// ===========================================================================================
async loadData() {
this.showLoading();
this.showStatus(`Loading external model list ...`);
const mode = manager_instance.datasrc_combo.value;
const res = await fetchData(`/externalmodel/getlist?mode=${mode}`);
if (res.error) {
this.showError("Failed to get external model list.");
this.hideLoading();
return
}
const { models } = res.data;
this.modelList = this.getModelList(models);
// console.log("models", this.modelList);
this.updateFilter();
this.renderGrid();
this.hideLoading();
}
// ===========================================================================================
formatSize(v) {
const base = 1000;
const units = ['', 'K', 'M', 'G', 'T', 'P'];
const space = '';
const postfix = 'B';
if (v <= 0) {
return `0${space}${postfix}`;
}
for (let i = 0, l = units.length; i < l; i++) {
const min = Math.pow(base, i);
const max = Math.pow(base, i + 1);
if (v > min && v <= max) {
const unit = units[i];
if (unit) {
const n = v / min;
const nl = n.toString().split('.')[0].length;
const fl = Math.max(3 - nl, 1);
v = n.toFixed(fl);
}
v = v + space + unit + postfix;
break;
}
}
return v;
}
// for size sort
sizeToBytes(v) {
if (typeof v === "number") {
return v;
}
if (typeof v === "string") {
const n = parseFloat(v);
const unit = v.replace(/[0-9.B]+/g, "").trim().toUpperCase();
if (unit === "K") {
return n * 1000;
}
if (unit === "M") {
return n * 1000 * 1000;
}
if (unit === "G") {
return n * 1000 * 1000 * 1000;
}
if (unit === "T") {
return n * 1000 * 1000 * 1000 * 1000;
}
}
return v;
}
showSelection(msg) {
this.element.querySelector(".cmm-manager-selection").innerHTML = msg;
}
showError(err) {
this.showMessage(err, "red");
}
showMessage(msg, color) {
if (color) {
msg = `<font color="${color}">${msg}</font>`;
}
this.element.querySelector(".cmm-manager-message").innerHTML = msg;
}
showStatus(msg, color) {
if (color) {
msg = `<font color="${color}">${msg}</font>`;
}
this.element.querySelector(".cmm-manager-status").innerHTML = msg;
}
showLoading() {
this.setDisabled(true);
if (this.grid) {
this.grid.showLoading();
this.grid.showMask({
opacity: 0.05
});
}
}
hideLoading() {
this.setDisabled(false);
if (this.grid) {
this.grid.hideLoading();
this.grid.hideMask();
}
}
setDisabled(disabled) {
const $close = this.element.querySelector(".cmm-manager-close");
const list = [
".cmm-manager-header input",
".cmm-manager-header select",
".cmm-manager-footer button",
".cmm-manager-selection button"
].map(s => {
return Array.from(this.element.querySelectorAll(s));
})
.flat()
.filter(it => {
return it !== $close;
});
list.forEach($elem => {
if (disabled) {
$elem.setAttribute("disabled", "disabled");
} else {
$elem.removeAttribute("disabled");
}
});
Array.from(this.element.querySelectorAll(".cmm-btn-loading")).forEach($elem => {
$elem.classList.remove("cmm-btn-loading");
});
}
setKeywords(keywords = "") {
this.keywords = keywords;
this.element.querySelector(".cmm-manager-keywords").value = keywords;
}
show() {
this.element.style.display = "flex";
this.setKeywords("");
this.showSelection("");
this.showMessage("");
this.loadData();
}
close() {
this.element.style.display = "none";
}
}

View File

@ -0,0 +1,211 @@
import { app } from "../../scripts/app.js";
import { api } from "../../scripts/api.js";
let double_click_policy = "copy-all";
api.fetchApi('/manager/dbl_click/policy')
.then(response => response.text())
.then(data => set_double_click_policy(data));
export function set_double_click_policy(mode) {
double_click_policy = mode;
}
function addMenuHandler(nodeType, cb) {
const getOpts = nodeType.prototype.getExtraMenuOptions;
nodeType.prototype.getExtraMenuOptions = function () {
const r = getOpts.apply(this, arguments);
cb.apply(this, arguments);
return r;
};
}
function distance(node1, node2) {
let dx = (node1.pos[0] + node1.size[0]/2) - (node2.pos[0] + node2.size[0]/2);
let dy = (node1.pos[1] + node1.size[1]/2) - (node2.pos[1] + node2.size[1]/2);
return Math.sqrt(dx * dx + dy * dy);
}
function lookup_nearest_nodes(node) {
let nearest_distance = Infinity;
let nearest_node = null;
for(let other of app.graph._nodes) {
if(other === node)
continue;
let dist = distance(node, other);
if (dist < nearest_distance && dist < 1000) {
nearest_distance = dist;
nearest_node = other;
}
}
return nearest_node;
}
function lookup_nearest_inputs(node) {
let input_map = {};
for(let i in node.inputs) {
let input = node.inputs[i];
if(input.link || input_map[input.type])
continue;
input_map[input.type] = {distance: Infinity, input_name: input.name, node: null, slot: null};
}
let x = node.pos[0];
let y = node.pos[1] + node.size[1]/2;
for(let other of app.graph._nodes) {
if(other === node || !other.outputs)
continue;
let dx = x - (other.pos[0] + other.size[0]);
let dy = y - (other.pos[1] + other.size[1]/2);
if(dx < 0)
continue;
let dist = Math.sqrt(dx * dx + dy * dy);
for(let input_type in input_map) {
for(let j in other.outputs) {
let output = other.outputs[j];
if(output.type == input_type) {
if(input_map[input_type].distance > dist) {
input_map[input_type].distance = dist;
input_map[input_type].node = other;
input_map[input_type].slot = parseInt(j);
}
}
}
}
}
let res = {};
for (let i in input_map) {
if (input_map[i].node) {
res[i] = input_map[i];
}
}
return res;
}
function connect_inputs(nearest_inputs, node) {
for(let i in nearest_inputs) {
let info = nearest_inputs[i];
info.node.connect(info.slot, node.id, info.input_name);
}
}
function node_info_copy(src, dest, connect_both) {
// copy input connections
for(let i in src.inputs) {
let input = src.inputs[i];
if(input.link) {
let link = app.graph.links[input.link];
let src_node = app.graph.getNodeById(link.origin_id);
src_node.connect(link.origin_slot, dest.id, input.name);
}
}
// copy output connections
if(connect_both) {
let output_links = {};
for(let i in src.outputs) {
let output = src.outputs[i];
if(output.links) {
let links = [];
for(let j in output.links) {
links.push(app.graph.links[output.links[j]]);
}
output_links[output.name] = links;
}
}
for(let i in dest.outputs) {
let links = output_links[dest.outputs[i].name];
if(links) {
for(let j in links) {
let link = links[j];
let target_node = app.graph.getNodeById(link.target_id);
dest.connect(parseInt(i), target_node, link.target_slot);
}
}
}
}
app.graph.afterChange();
}
app.registerExtension({
name: "Comfy.Manager.NodeFixer",
async nodeCreated(node, app) {
let orig_dblClick = node.onDblClick;
node.onDblClick = function (e, pos, self) {
orig_dblClick?.apply?.(this, arguments);
if((!node.inputs && !node.outputs) || pos[1] > 0)
return;
switch(double_click_policy) {
case "copy-all":
case "copy-input":
{
if(node.inputs?.some(x => x.link != null) || node.outputs?.some(x => x.links != null && x.links.length > 0) )
return;
let src_node = lookup_nearest_nodes(node);
if(src_node)
node_info_copy(src_node, node, double_click_policy == "copy-all");
}
break;
case "possible-input":
{
let nearest_inputs = lookup_nearest_inputs(node);
if(nearest_inputs)
connect_inputs(nearest_inputs, node);
}
break;
case "dual":
{
if(pos[0] < node.size[0]/2) {
// left: possible-input
let nearest_inputs = lookup_nearest_inputs(node);
if(nearest_inputs)
connect_inputs(nearest_inputs, node);
}
else {
// right: copy-all
if(node.inputs?.some(x => x.link != null) || node.outputs?.some(x => x.links != null && x.links.length > 0) )
return;
let src_node = lookup_nearest_nodes(node);
if(src_node)
node_info_copy(src_node, node, true);
}
}
break;
}
}
},
beforeRegisterNodeDef(nodeType, nodeData, app) {
addMenuHandler(nodeType, function (_, options) {
options.push({
content: "Fix node (recreate)",
callback: () => {
let new_node = LiteGraph.createNode(nodeType.comfyClass);
new_node.pos = [this.pos[0], this.pos[1]];
app.canvas.graph.add(new_node, false);
node_info_copy(this, new_node);
app.canvas.graph.remove(this);
},
});
});
}
});

View File

@ -0,0 +1,300 @@
import { app } from "../../scripts/app.js";
import { api } from "../../scripts/api.js"
import { ComfyDialog, $el } from "../../scripts/ui.js";
import { manager_instance, rebootAPI, show_message } from "./common.js";
async function restore_snapshot(target) {
if(SnapshotManager.instance) {
try {
const response = await api.fetchApi(`/snapshot/restore?target=${target}`, { cache: "no-store" });
if(response.status == 403) {
show_message('This action is not allowed with this security level configuration.');
return false;
}
if(response.status == 400) {
show_message(`Restore snapshot failed: ${target.title} / ${exception}`);
}
app.ui.dialog.close();
return true;
}
catch(exception) {
show_message(`Restore snapshot failed: ${target.title} / ${exception}`);
return false;
}
finally {
await SnapshotManager.instance.invalidateControl();
SnapshotManager.instance.updateMessage("<BR>To apply the snapshot, please <button id='cm-reboot-button2' class='cm-small-button'>RESTART</button> ComfyUI. And refresh browser.", 'cm-reboot-button2');
}
}
}
async function remove_snapshot(target) {
if(SnapshotManager.instance) {
try {
const response = await api.fetchApi(`/snapshot/remove?target=${target}`, { cache: "no-store" });
if(response.status == 403) {
show_message('This action is not allowed with this security level configuration.');
return false;
}
if(response.status == 400) {
show_message(`Remove snapshot failed: ${target.title} / ${exception}`);
}
app.ui.dialog.close();
return true;
}
catch(exception) {
show_message(`Restore snapshot failed: ${target.title} / ${exception}`);
return false;
}
finally {
await SnapshotManager.instance.invalidateControl();
}
}
}
async function save_current_snapshot() {
try {
const response = await api.fetchApi('/snapshot/save', { cache: "no-store" });
app.ui.dialog.close();
return true;
}
catch(exception) {
show_message(`Backup snapshot failed: ${exception}`);
return false;
}
finally {
await SnapshotManager.instance.invalidateControl();
SnapshotManager.instance.updateMessage("<BR>Current snapshot saved.");
}
}
async function getSnapshotList() {
const response = await api.fetchApi(`/snapshot/getlist`);
const data = await response.json();
return data;
}
export class SnapshotManager extends ComfyDialog {
static instance = null;
restore_buttons = [];
message_box = null;
data = null;
clear() {
this.restore_buttons = [];
this.message_box = null;
this.data = null;
}
constructor(app, manager_dialog) {
super();
this.manager_dialog = manager_dialog;
this.search_keyword = '';
this.element = $el("div.comfy-modal", { parent: document.body }, []);
}
async remove_item() {
caller.disableButtons();
await caller.invalidateControl();
}
createControls() {
return [
$el("button.cm-small-button", {
type: "button",
textContent: "Close",
onclick: () => { this.close(); }
})
];
}
startRestore(target) {
const self = SnapshotManager.instance;
self.updateMessage(`<BR><font color="green">Restore snapshot '${target.name}'</font>`);
for(let i in self.restore_buttons) {
self.restore_buttons[i].disabled = true;
self.restore_buttons[i].style.backgroundColor = 'gray';
}
}
async invalidateControl() {
this.clear();
this.data = (await getSnapshotList()).items;
while (this.element.children.length) {
this.element.removeChild(this.element.children[0]);
}
await this.createGrid();
await this.createBottomControls();
}
updateMessage(msg, btn_id) {
this.message_box.innerHTML = msg;
if(btn_id) {
const rebootButton = document.getElementById(btn_id);
const self = this;
rebootButton.onclick = function() {
if(rebootAPI()) {
self.close();
self.manager_dialog.close();
}
};
}
}
async createGrid(models_json) {
var grid = document.createElement('table');
grid.setAttribute('id', 'snapshot-list-grid');
var thead = document.createElement('thead');
var tbody = document.createElement('tbody');
var headerRow = document.createElement('tr');
thead.style.position = "sticky";
thead.style.top = "0px";
thead.style.borderCollapse = "collapse";
thead.style.tableLayout = "fixed";
var header1 = document.createElement('th');
header1.innerHTML = '&nbsp;&nbsp;ID&nbsp;&nbsp;';
header1.style.width = "20px";
var header2 = document.createElement('th');
header2.innerHTML = 'Datetime';
header2.style.width = "100%";
var header_button = document.createElement('th');
header_button.innerHTML = 'Action';
header_button.style.width = "100px";
thead.appendChild(headerRow);
headerRow.appendChild(header1);
headerRow.appendChild(header2);
headerRow.appendChild(header_button);
headerRow.style.backgroundColor = "Black";
headerRow.style.color = "White";
headerRow.style.textAlign = "center";
headerRow.style.width = "100%";
headerRow.style.padding = "0";
grid.appendChild(thead);
grid.appendChild(tbody);
this.grid_rows = {};
if(this.data)
for (var i = 0; i < this.data.length; i++) {
const data = this.data[i];
var dataRow = document.createElement('tr');
var data1 = document.createElement('td');
data1.style.textAlign = "center";
data1.innerHTML = i+1;
var data2 = document.createElement('td');
data2.innerHTML = `&nbsp;${data}`;
var data_button = document.createElement('td');
data_button.style.textAlign = "center";
var restoreBtn = document.createElement('button');
restoreBtn.innerHTML = 'Restore';
restoreBtn.style.width = "100px";
restoreBtn.style.backgroundColor = 'blue';
restoreBtn.addEventListener('click', function() {
restore_snapshot(data);
});
var removeBtn = document.createElement('button');
removeBtn.innerHTML = 'Remove';
removeBtn.style.width = "100px";
removeBtn.style.backgroundColor = 'red';
removeBtn.addEventListener('click', function() {
remove_snapshot(data);
});
data_button.appendChild(restoreBtn);
data_button.appendChild(removeBtn);
dataRow.style.backgroundColor = "var(--bg-color)";
dataRow.style.color = "var(--fg-color)";
dataRow.style.textAlign = "left";
dataRow.appendChild(data1);
dataRow.appendChild(data2);
dataRow.appendChild(data_button);
tbody.appendChild(dataRow);
this.grid_rows[i] = {data:data, control:dataRow};
}
let self = this;
const panel = document.createElement('div');
panel.style.width = "100%";
panel.appendChild(grid);
function handleResize() {
const parentHeight = self.element.clientHeight;
const gridHeight = parentHeight - 200;
grid.style.height = gridHeight + "px";
}
window.addEventListener("resize", handleResize);
grid.style.position = "relative";
grid.style.display = "inline-block";
grid.style.width = "100%";
grid.style.height = "100%";
grid.style.overflowY = "scroll";
this.element.style.height = "85%";
this.element.style.width = "80%";
this.element.appendChild(panel);
handleResize();
}
async createBottomControls() {
var close_button = document.createElement("button");
close_button.className = "cm-small-button";
close_button.innerHTML = "Close";
close_button.onclick = () => { this.close(); }
close_button.style.display = "inline-block";
var save_button = document.createElement("button");
save_button.className = "cm-small-button";
save_button.innerHTML = "Save snapshot";
save_button.onclick = () => { save_current_snapshot(); }
save_button.style.display = "inline-block";
save_button.style.horizontalAlign = "right";
save_button.style.width = "170px";
this.message_box = $el('div', {id:'custom-download-message'}, [$el('br'), '']);
this.message_box.style.height = '60px';
this.message_box.style.verticalAlign = 'middle';
this.element.appendChild(this.message_box);
this.element.appendChild(close_button);
this.element.appendChild(save_button);
}
async show() {
try {
this.invalidateControl();
this.element.style.display = "block";
this.element.style.zIndex = 10001;
}
catch(exception) {
app.ui.dialog.show(`Failed to get external model list. / ${exception}`);
}
}
}

View File

@ -0,0 +1,81 @@
import {app} from "../../scripts/app.js";
import {ComfyWidgets} from "../../scripts/widgets.js";
// Node that add notes to your project
let terminal_node;
let log_mode = false;
app.registerExtension({
name: "Comfy.Manager.Terminal",
registerCustomNodes() {
class TerminalNode {
color = "#222222";
bgcolor = "#000000";
groupcolor = LGraphCanvas.node_colors.black.groupcolor;
constructor() {
this.logs = [];
if (!this.properties) {
this.properties = {};
this.properties.text="";
}
ComfyWidgets.STRING(this, "", ["", {default:this.properties.text, multiline: true}], app)
ComfyWidgets.BOOLEAN(this, "mode", ["", {default:true, label_on:'Logging', label_off:'Stop'}], app)
ComfyWidgets.INT(this, "lines", ["", {default:500, min:10, max:10000, steps:1}], app)
let self = this;
Object.defineProperty(this.widgets[1], 'value', {
set: (v) => {
api.fetchApi(`/manager/terminal?mode=${v}`, {});
log_mode = v;
},
get: () => {
return log_mode;
}
});
this.serialize_widgets = false;
this.isVirtualNode = true;
if(terminal_node) {
try {
terminal_node.widgets[0].value = 'The output of this node is disabled because another terminal node has appeared.';
}
catch {}
}
terminal_node = this;
}
}
// Load default visibility
LiteGraph.registerNodeType(
"Terminal Log //CM",
Object.assign(TerminalNode, {
title_mode: LiteGraph.NORMAL_TITLE,
title: "Terminal Log (Manager)",
collapsable: true,
})
);
TerminalNode.category = "utils";
},
});
import { api } from "../../scripts/api.js";
function terminalFeedback(event) {
if(terminal_node) {
terminal_node.logs.push(event.detail.data);
if(terminal_node.logs.length > terminal_node.widgets[2].value) {
terminal_node.logs.shift();
if(terminal_node.logs[0] == '' || terminal_node.logs[0] == '\n')
terminal_node.logs.shift();
}
terminal_node.widgets[0].value = [...terminal_node.logs].reverse().join('').trim();
}
}
api.addEventListener("manager-terminal-feedback", terminalFeedback);

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,23 @@
import json
import argparse
def check_json_syntax(file_path):
try:
with open(file_path, 'r') as file:
json_str = file.read()
json.loads(json_str)
print(f"[ OK ] {file_path}")
except json.JSONDecodeError as e:
print(f"[FAIL] {file_path}\n\n {e}\n")
except FileNotFoundError:
print(f"[FAIL] {file_path}\n\n File not found\n")
def main():
parser = argparse.ArgumentParser(description="JSON File Syntax Checker")
parser.add_argument("file_path", type=str, help="Path to the JSON file for syntax checking")
args = parser.parse_args()
check_json_syntax(args.file_path)
if __name__ == "__main__":
main()

View File

@ -0,0 +1,444 @@
{
"Impact::MAKE_BASIC_PIPE": {
"category": "",
"config": {
"1": {
"input": {
"text": {
"name": "Positive prompt"
}
}
},
"2": {
"input": {
"text": {
"name": "Negative prompt"
}
}
}
},
"datetime": 1705418802481,
"external": [],
"links": [
[
0,
1,
1,
0,
1,
"CLIP"
],
[
0,
1,
2,
0,
1,
"CLIP"
],
[
0,
0,
3,
0,
1,
"MODEL"
],
[
0,
1,
3,
1,
1,
"CLIP"
],
[
0,
2,
3,
2,
1,
"VAE"
],
[
1,
0,
3,
3,
3,
"CONDITIONING"
],
[
2,
0,
3,
4,
4,
"CONDITIONING"
]
],
"nodes": [
{
"flags": {},
"index": 0,
"mode": 0,
"order": 0,
"outputs": [
{
"links": [],
"name": "MODEL",
"shape": 3,
"slot_index": 0,
"type": "MODEL"
},
{
"links": [],
"name": "CLIP",
"shape": 3,
"slot_index": 1,
"type": "CLIP"
},
{
"links": [],
"name": "VAE",
"shape": 3,
"slot_index": 2,
"type": "VAE"
}
],
"pos": [
550,
360
],
"properties": {
"Node name for S&R": "CheckpointLoaderSimple"
},
"size": {
"0": 315,
"1": 98
},
"type": "CheckpointLoaderSimple",
"widgets_values": [
"SDXL/sd_xl_base_1.0_0.9vae.safetensors"
]
},
{
"flags": {},
"index": 1,
"inputs": [
{
"link": null,
"name": "clip",
"type": "CLIP"
}
],
"mode": 0,
"order": 1,
"outputs": [
{
"links": [],
"name": "CONDITIONING",
"shape": 3,
"slot_index": 0,
"type": "CONDITIONING"
}
],
"pos": [
940,
480
],
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"size": {
"0": 263,
"1": 99
},
"title": "Positive",
"type": "CLIPTextEncode",
"widgets_values": [
""
]
},
{
"flags": {},
"index": 2,
"inputs": [
{
"link": null,
"name": "clip",
"type": "CLIP"
}
],
"mode": 0,
"order": 2,
"outputs": [
{
"links": [],
"name": "CONDITIONING",
"shape": 3,
"slot_index": 0,
"type": "CONDITIONING"
}
],
"pos": [
940,
640
],
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"size": {
"0": 263,
"1": 99
},
"title": "Negative",
"type": "CLIPTextEncode",
"widgets_values": [
""
]
},
{
"flags": {},
"index": 3,
"inputs": [
{
"link": null,
"name": "model",
"type": "MODEL"
},
{
"link": null,
"name": "clip",
"type": "CLIP"
},
{
"link": null,
"name": "vae",
"type": "VAE"
},
{
"link": null,
"name": "positive",
"type": "CONDITIONING"
},
{
"link": null,
"name": "negative",
"type": "CONDITIONING"
}
],
"mode": 0,
"order": 3,
"outputs": [
{
"links": null,
"name": "basic_pipe",
"shape": 3,
"slot_index": 0,
"type": "BASIC_PIPE"
}
],
"pos": [
1320,
360
],
"properties": {
"Node name for S&R": "ToBasicPipe"
},
"size": {
"0": 241.79998779296875,
"1": 106
},
"type": "ToBasicPipe"
}
],
"packname": "Impact",
"version": "1.0"
},
"Impact::SIMPLE_DETAILER_PIPE": {
"category": "",
"config": {
"0": {
"output": {
"0": {
"visible": false
},
"1": {
"visible": false
}
}
},
"2": {
"input": {
"Select to add LoRA": {
"visible": false
},
"Select to add Wildcard": {
"visible": false
},
"wildcard": {
"visible": false
}
}
}
},
"datetime": 1705419147116,
"external": [],
"links": [
[
null,
0,
2,
0,
6,
"BASIC_PIPE"
],
[
0,
0,
2,
1,
13,
"BBOX_DETECTOR"
],
[
1,
0,
2,
2,
15,
"SAM_MODEL"
]
],
"nodes": [
{
"flags": {},
"index": 0,
"mode": 0,
"order": 2,
"outputs": [
{
"links": [],
"name": "BBOX_DETECTOR",
"shape": 3,
"type": "BBOX_DETECTOR"
},
{
"links": null,
"name": "SEGM_DETECTOR",
"shape": 3,
"type": "SEGM_DETECTOR"
}
],
"pos": [
590,
830
],
"properties": {
"Node name for S&R": "UltralyticsDetectorProvider"
},
"size": {
"0": 315,
"1": 78
},
"type": "UltralyticsDetectorProvider",
"widgets_values": [
"bbox/Eyeful_v1.pt"
]
},
{
"flags": {},
"index": 1,
"mode": 0,
"order": 3,
"outputs": [
{
"links": [],
"name": "SAM_MODEL",
"shape": 3,
"type": "SAM_MODEL"
}
],
"pos": [
590,
960
],
"properties": {
"Node name for S&R": "SAMLoader"
},
"size": {
"0": 315,
"1": 82
},
"type": "SAMLoader",
"widgets_values": [
"sam_vit_b_01ec64.pth",
"AUTO"
]
},
{
"flags": {},
"index": 2,
"inputs": [
{
"link": null,
"name": "basic_pipe",
"type": "BASIC_PIPE"
},
{
"link": null,
"name": "bbox_detector",
"slot_index": 1,
"type": "BBOX_DETECTOR"
},
{
"link": null,
"name": "sam_model_opt",
"slot_index": 2,
"type": "SAM_MODEL"
},
{
"link": null,
"name": "segm_detector_opt",
"type": "SEGM_DETECTOR"
},
{
"link": null,
"name": "detailer_hook",
"type": "DETAILER_HOOK"
}
],
"mode": 0,
"order": 5,
"outputs": [
{
"links": null,
"name": "detailer_pipe",
"shape": 3,
"type": "DETAILER_PIPE"
}
],
"pos": [
1044,
812
],
"properties": {
"Node name for S&R": "BasicPipeToDetailerPipe"
},
"size": {
"0": 400,
"1": 204
},
"type": "BasicPipeToDetailerPipe",
"widgets_values": [
"",
"Select the LoRA to add to the text",
"Select the Wildcard to add to the text"
]
}
],
"packname": "Impact",
"version": "1.0"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,762 @@
{
"https://github.com/17Retoucher/ComfyUI_Fooocus": {
"stars": 52,
"last_update": "2024-02-24 07:33:29",
"author_account_age_days": 171
},
"https://github.com/A719689614/ComfyUI_AC_FUNV8Beta1": {
"stars": 13,
"last_update": "2024-03-08 10:11:44",
"author_account_age_days": 314
},
"https://github.com/AI2lab/comfyUI-tool-2lab": {
"stars": 7,
"last_update": "2024-06-06 16:16:11",
"author_account_age_days": 192
},
"https://github.com/AIGODLIKE/ComfyUI-Studio": {
"stars": 203,
"last_update": "2024-06-05 00:52:46",
"author_account_age_days": 501
},
"https://github.com/ALatentPlace/ComfyUI_yanc": {
"stars": 18,
"last_update": "2024-06-14 09:04:57",
"author_account_age_days": 1460
},
"https://github.com/AllenEdgarPoe/ComfyUI-Xorbis-nodes": {
"stars": 0,
"last_update": "2024-06-21 01:43:13",
"author_account_age_days": 2105
},
"https://github.com/AustinMroz/ComfyUI-WorkflowCheckpointing": {
"stars": 5,
"last_update": "2024-06-19 21:19:45",
"author_account_age_days": 4074
},
"https://github.com/BadCafeCode/execution-inversion-demo-comfyui": {
"stars": 4,
"last_update": "2024-06-19 06:59:39",
"author_account_age_days": 430
},
"https://github.com/Beinsezii/comfyui-amd-go-fast": {
"stars": 9,
"last_update": "2024-05-10 00:48:37",
"author_account_age_days": 2226
},
"https://github.com/BlueDangerX/ComfyUI-BDXNodes": {
"stars": 1,
"last_update": "2023-12-10 04:01:19",
"author_account_age_days": 246
},
"https://github.com/Brandelan/ComfyUI_bd_customNodes": {
"stars": 1,
"last_update": "2023-10-09 00:40:26",
"author_account_age_days": 4151
},
"https://github.com/DeTK/ComfyUI-Switch": {
"stars": 0,
"last_update": "2024-03-04 11:52:04",
"author_account_age_days": 2031
},
"https://github.com/DrMWeigand/ComfyUI_LineBreakInserter": {
"stars": 0,
"last_update": "2024-04-19 11:37:19",
"author_account_age_days": 1032
},
"https://github.com/Elawphant/ComfyUI-MusicGen": {
"stars": 4,
"last_update": "2024-05-11 13:33:24",
"author_account_age_days": 2588
},
"https://github.com/ExponentialML/ComfyUI_LiveDirector": {
"stars": 35,
"last_update": "2024-04-09 19:01:49",
"author_account_age_days": 1623
},
"https://github.com/Extraltodeus/Conditioning-token-experiments-for-ComfyUI": {
"stars": 13,
"last_update": "2024-03-10 01:04:02",
"author_account_age_days": 3149
},
"https://github.com/FoundD-oka/ComfyUI-kisekae-OOTD": {
"stars": 0,
"last_update": "2024-06-02 06:13:42",
"author_account_age_days": 437
},
"https://github.com/GentlemanHu/ComfyUI-Notifier": {
"stars": 3,
"last_update": "2024-06-04 10:05:38",
"author_account_age_days": 2383
},
"https://github.com/GraftingRayman/ComfyUI_GR_PromptSelector": {
"stars": 17,
"last_update": "2024-06-22 18:22:20",
"author_account_age_days": 163
},
"https://github.com/GrindHouse66/ComfyUI-GH_Tools": {
"stars": 0,
"last_update": "2024-03-10 13:27:14",
"author_account_age_days": 624
},
"https://github.com/IvanZhd/comfyui-codeformer": {
"stars": 0,
"last_update": "2023-12-02 20:51:52",
"author_account_age_days": 2578
},
"https://github.com/Jaxkr/comfyui-terminal-command": {
"stars": 1,
"last_update": "2023-12-03 10:31:40",
"author_account_age_days": 4627
},
"https://github.com/Jiffies-64/ComfyUI-SaveImagePlus": {
"stars": 0,
"last_update": "2024-04-01 10:52:59",
"author_account_age_days": 891
},
"https://github.com/Jordach/comfy-consistency-vae": {
"stars": 68,
"last_update": "2023-11-06 20:50:40",
"author_account_age_days": 4513
},
"https://github.com/LZpenguin/ComfyUI-Text": {
"stars": 9,
"last_update": "2024-06-20 13:38:16",
"author_account_age_days": 1979
},
"https://github.com/LarryJane491/ComfyUI-ModelUnloader": {
"stars": 1,
"last_update": "2024-01-14 08:22:39",
"author_account_age_days": 164
},
"https://github.com/LotzF/ComfyUI-Simple-Chat-GPT-completion": {
"stars": 0,
"last_update": "2024-02-04 21:15:22",
"author_account_age_days": 929
},
"https://github.com/LykosAI/ComfyUI-Inference-Core-Nodes": {
"stars": 16,
"last_update": "2024-04-05 05:11:51",
"author_account_age_days": 378
},
"https://github.com/MrAdamBlack/CheckProgress": {
"stars": 1,
"last_update": "2024-01-10 08:02:18",
"author_account_age_days": 2720
},
"https://github.com/MushroomFleet/DJZ-Nodes": {
"stars": 4,
"last_update": "2024-03-18 11:18:42",
"author_account_age_days": 3721
},
"https://github.com/NicholasKao1029/comfyui-hook": {
"stars": 0,
"last_update": "2024-03-07 05:50:56",
"author_account_age_days": 2030
},
"https://github.com/NitramDom/ComfyUI_FacialFlip": {
"stars": 2,
"last_update": "2024-06-07 14:56:55",
"author_account_age_days": 3172
},
"https://github.com/PluMaZero/ComfyUI-SpaceFlower": {
"stars": 4,
"last_update": "2023-12-09 05:55:15",
"author_account_age_days": 1058
},
"https://github.com/Quasimondo/ComfyUI-QuasimondoNodes": {
"stars": 4,
"last_update": "2024-06-21 19:55:21",
"author_account_age_days": 5275
},
"https://github.com/SadaleNet/ComfyUI-Prompt-To-Prompt": {
"stars": 20,
"last_update": "2024-03-17 04:30:01",
"author_account_age_days": 4040
},
"https://github.com/Sai-ComfyUI/ComfyUI-MS-Nodes": {
"stars": 2,
"last_update": "2024-02-22 08:34:44",
"author_account_age_days": 209
},
"https://github.com/Scorpinaus/ComfyUI-DiffusersLoader": {
"stars": 3,
"last_update": "2024-06-23 01:30:57",
"author_account_age_days": 1110
},
"https://github.com/SeedV/ComfyUI-SeedV-Nodes": {
"stars": 1,
"last_update": "2024-06-05 10:01:47",
"author_account_age_days": 1126
},
"https://github.com/Shinsplat/ComfyUI-Shinsplat": {
"stars": 13,
"last_update": "2024-06-22 14:29:36",
"author_account_age_days": 1024
},
"https://github.com/StartHua/Comfyui_CXH_CRM": {
"stars": 26,
"last_update": "2024-06-06 14:15:14",
"author_account_age_days": 2835
},
"https://github.com/TSFSean/ComfyUI-TSFNodes": {
"stars": 4,
"last_update": "2024-05-18 00:59:06",
"author_account_age_days": 3472
},
"https://github.com/TemryL/ComfyUI-IDM-VTON": {
"stars": 203,
"last_update": "2024-06-22 06:14:19",
"author_account_age_days": 868
},
"https://github.com/Video3DGenResearch/comfyui-batch-input-node": {
"stars": 1,
"last_update": "2024-04-28 15:21:17",
"author_account_age_days": 106
},
"https://github.com/WSJUSA/Comfyui-StableSR": {
"stars": 38,
"last_update": "2023-10-18 12:40:30",
"author_account_age_days": 1424
},
"https://github.com/WilliamStanford/visuallabs_comfyui_nodes": {
"stars": 1,
"last_update": "2024-04-16 21:53:02",
"author_account_age_days": 1769
},
"https://github.com/ZHO-ZHO-ZHO/ComfyUI-AnyText": {
"stars": 45,
"last_update": "2024-05-22 14:30:05",
"author_account_age_days": 340
},
"https://github.com/ZHO-ZHO-ZHO/ComfyUI-PuLID-ZHO": {
"stars": 184,
"last_update": "2024-05-22 13:38:23",
"author_account_age_days": 340
},
"https://github.com/alt-key-project/comfyui-dream-video-batches": {
"stars": 51,
"last_update": "2024-05-22 20:52:05",
"author_account_age_days": 660
},
"https://github.com/baicai99/ComfyUI-FrameSkipping": {
"stars": 6,
"last_update": "2024-06-18 10:25:55",
"author_account_age_days": 831
},
"https://github.com/beyastard/ComfyUI_BeySoft": {
"stars": 0,
"last_update": "2024-05-26 22:44:55",
"author_account_age_days": 4286
},
"https://github.com/birnam/ComfyUI-GenData-Pack": {
"stars": 0,
"last_update": "2024-03-25 01:25:23",
"author_account_age_days": 5009
},
"https://github.com/blepping/comfyui_overly_complicated_sampling": {
"stars": 5,
"last_update": "2024-06-12 01:05:41",
"author_account_age_days": 154
},
"https://github.com/blib-la/ComfyUI-Captain-Extensions": {
"stars": 0,
"last_update": "2024-05-17 23:27:25",
"author_account_age_days": 273
},
"https://github.com/bruce007lee/comfyui-cleaner": {
"stars": 3,
"last_update": "2024-04-20 15:36:03",
"author_account_age_days": 4512
},
"https://github.com/bruce007lee/comfyui-tiny-utils": {
"stars": 0,
"last_update": "2024-06-07 03:44:47",
"author_account_age_days": 4512
},
"https://github.com/brycegoh/comfyui-custom-nodes": {
"stars": 0,
"last_update": "2024-06-05 09:30:06",
"author_account_age_days": 3108
},
"https://github.com/chaojie/ComfyUI-DynamiCrafter": {
"stars": 109,
"last_update": "2024-06-14 10:23:59",
"author_account_age_days": 4833
},
"https://github.com/chaojie/ComfyUI-mobvoi-openapi": {
"stars": 2,
"last_update": "2024-05-29 09:02:52",
"author_account_age_days": 4833
},
"https://github.com/christian-byrne/infinite-zoom-parallax-nodes": {
"stars": 4,
"last_update": "2024-05-27 01:51:24",
"author_account_age_days": 1348
},
"https://github.com/christian-byrne/python-interpreter-node": {
"stars": 20,
"last_update": "2024-06-23 22:22:20",
"author_account_age_days": 1348
},
"https://github.com/comfyanonymous/ComfyUI": {
"stars": 39915,
"last_update": "2024-06-24 11:47:40",
"author_account_age_days": 549
},
"https://github.com/comfypod/ComfyUI-Comflow": {
"stars": 0,
"last_update": "2024-06-17 08:44:08",
"author_account_age_days": 23
},
"https://github.com/corbin-hayden13/ComfyUI-Better-Dimensions": {
"stars": 7,
"last_update": "2024-06-12 17:45:21",
"author_account_age_days": 1815
},
"https://github.com/cubiq/Comfy_Dungeon": {
"stars": 174,
"last_update": "2024-04-26 11:00:58",
"author_account_age_days": 5011
},
"https://github.com/dezi-ai/ComfyUI-AnimateLCM": {
"stars": 148,
"last_update": "2024-02-07 17:34:39",
"author_account_age_days": 177
},
"https://github.com/dfl/comfyui-stylegan": {
"stars": 1,
"last_update": "2024-03-14 14:34:25",
"author_account_age_days": 5974
},
"https://github.com/dnl13/ComfyUI-dnl13-seg": {
"stars": 16,
"last_update": "2024-01-08 10:52:13",
"author_account_age_days": 4218
},
"https://github.com/doucx/ComfyUI_WcpD_Utility_Kit": {
"stars": 1,
"last_update": "2024-01-06 19:07:45",
"author_account_age_days": 2323
},
"https://github.com/eigenpunk/ComfyUI-audio": {
"stars": 59,
"last_update": "2024-03-03 21:14:14",
"author_account_age_days": 925
},
"https://github.com/ejektaflex/ComfyUI-Ty": {
"stars": 0,
"last_update": "2024-06-12 16:08:16",
"author_account_age_days": 2772
},
"https://github.com/endman100/ComfyUI-SaveAndLoadPromptCondition": {
"stars": 0,
"last_update": "2024-06-06 06:07:49",
"author_account_age_days": 2473
},
"https://github.com/ericbeyer/guidance_interval": {
"stars": 2,
"last_update": "2024-04-16 03:24:01",
"author_account_age_days": 2594
},
"https://github.com/flowtyone/comfyui-flowty-lcm": {
"stars": 62,
"last_update": "2023-10-23 12:08:55",
"author_account_age_days": 273
},
"https://github.com/flyingdogsoftware/gyre_for_comfyui": {
"stars": 0,
"last_update": "2024-06-21 15:35:49",
"author_account_age_days": 2013
},
"https://github.com/foglerek/comfyui-cem-tools": {
"stars": 1,
"last_update": "2024-01-13 23:22:07",
"author_account_age_days": 4038
},
"https://github.com/gameltb/ComfyUI_paper_playground": {
"stars": 9,
"last_update": "2024-06-20 07:16:06",
"author_account_age_days": 4055
},
"https://github.com/gameltb/ComfyUI_stable_fast": {
"stars": 183,
"last_update": "2024-06-06 12:43:16",
"author_account_age_days": 4055
},
"https://github.com/gameltb/io_comfyui": {
"stars": 3,
"last_update": "2024-04-06 04:40:05",
"author_account_age_days": 4055
},
"https://github.com/githubYiheng/comfyui_median_filter": {
"stars": 0,
"last_update": "2024-05-24 15:21:40",
"author_account_age_days": 3903
},
"https://github.com/haofanwang/ComfyUI-InstantStyle": {
"stars": 5,
"last_update": "2024-05-23 16:11:13",
"author_account_age_days": 2977
},
"https://github.com/horidream/ComfyUI-Horidream": {
"stars": 0,
"last_update": "2024-06-18 02:09:07",
"author_account_age_days": 5043
},
"https://github.com/houdinii/comfy-magick": {
"stars": 4,
"last_update": "2024-03-11 06:40:54",
"author_account_age_days": 3520
},
"https://github.com/huchenlei/ComfyUI_densediffusion": {
"stars": 70,
"last_update": "2024-06-11 00:39:28",
"author_account_age_days": 2875
},
"https://github.com/huchenlei/ComfyUI_omost": {
"stars": 321,
"last_update": "2024-06-14 12:45:52",
"author_account_age_days": 2875
},
"https://github.com/huizhang0110/ComfyUI_Easy_Nodes_hui": {
"stars": 2,
"last_update": "2024-02-27 08:22:49",
"author_account_age_days": 2455
},
"https://github.com/hy134300/comfyui-hb-node": {
"stars": 0,
"last_update": "2024-04-09 09:56:22",
"author_account_age_days": 1761
},
"https://github.com/hy134300/comfyui-hydit": {
"stars": 7,
"last_update": "2024-06-07 09:52:15",
"author_account_age_days": 1761
},
"https://github.com/ilovejohnwhite/UncleBillyGoncho": {
"stars": 0,
"last_update": "2024-02-29 00:16:42",
"author_account_age_days": 873
},
"https://github.com/immersiveexperience/ie-comfyui-color-nodes": {
"stars": 2,
"last_update": "2024-06-18 10:54:55",
"author_account_age_days": 269
},
"https://github.com/jh-leon-kim/ComfyUI-JHK-utils": {
"stars": 0,
"last_update": "2024-06-04 08:57:52",
"author_account_age_days": 172
},
"https://github.com/jimmm-ai/TimeUi-a-ComfyUi-Timeline-Node": {
"stars": 194,
"last_update": "2024-06-12 20:10:22",
"author_account_age_days": 20
},
"https://github.com/jn-jairo/jn_node_suite_comfyui": {
"stars": 5,
"last_update": "2024-06-08 05:15:33",
"author_account_age_days": 3984
},
"https://github.com/jtscmw01/ComfyUI-DiffBIR": {
"stars": 61,
"last_update": "2024-05-21 05:28:34",
"author_account_age_days": 502
},
"https://github.com/jtydhr88/ComfyUI-Unique3D": {
"stars": 57,
"last_update": "2024-06-24 00:30:37",
"author_account_age_days": 4753
},
"https://github.com/kadirnar/ComfyUI-Adapter": {
"stars": 3,
"last_update": "2024-04-03 12:05:39",
"author_account_age_days": 2329
},
"https://github.com/kadirnar/comfyui_helpers": {
"stars": 2,
"last_update": "2024-03-04 16:25:30",
"author_account_age_days": 2329
},
"https://github.com/kappa54m/ComfyUI_Usability": {
"stars": 0,
"last_update": "2024-02-05 14:49:45",
"author_account_age_days": 1511
},
"https://github.com/kijai/ComfyUI-CV-VAE": {
"stars": 9,
"last_update": "2024-06-03 21:46:49",
"author_account_age_days": 2183
},
"https://github.com/kijai/ComfyUI-DeepSeek-VL": {
"stars": 19,
"last_update": "2024-05-21 16:43:40",
"author_account_age_days": 2183
},
"https://github.com/kijai/ComfyUI-DiffSynthWrapper": {
"stars": 22,
"last_update": "2024-06-22 00:16:46",
"author_account_age_days": 2183
},
"https://github.com/kijai/ComfyUI-DiffusersSD3Wrapper": {
"stars": 7,
"last_update": "2024-06-17 13:03:43",
"author_account_age_days": 2183
},
"https://github.com/kycg/comfyui-Kwtoolset": {
"stars": 0,
"last_update": "2024-06-12 17:04:09",
"author_account_age_days": 940
},
"https://github.com/laksjdjf/ssd-1b-comfyui": {
"stars": 1,
"last_update": "2023-10-27 20:05:06",
"author_account_age_days": 2831
},
"https://github.com/logtd/ComfyUI-MotionThiefExperiment": {
"stars": 36,
"last_update": "2024-05-22 00:12:06",
"author_account_age_days": 122
},
"https://github.com/longgui0318/comfyui-one-more-step": {
"stars": 1,
"last_update": "2024-05-07 08:40:56",
"author_account_age_days": 4165
},
"https://github.com/ltdrdata/ComfyUI-Workflow-Component": {
"stars": 195,
"last_update": "2024-04-26 01:39:09",
"author_account_age_days": 462
},
"https://github.com/marcueberall/ComfyUI-BuildPath": {
"stars": 0,
"last_update": "2024-02-06 07:57:33",
"author_account_age_days": 1782
},
"https://github.com/marduk191/comfyui-marnodes": {
"stars": 0,
"last_update": "2024-06-14 10:24:11",
"author_account_age_days": 4415
},
"https://github.com/maruhidd/ComfyUI_Transparent-Background": {
"stars": 1,
"last_update": "2024-06-14 07:02:56",
"author_account_age_days": 2255
},
"https://github.com/mashb1t/comfyui-nodes-mashb1t": {
"stars": 0,
"last_update": "2024-06-11 15:55:53",
"author_account_age_days": 3535
},
"https://github.com/mikeymcfish/FishTools": {
"stars": 12,
"last_update": "2024-06-21 20:35:44",
"author_account_age_days": 3403
},
"https://github.com/mingqizhang/ComfyUI_AEMatter_zmq": {
"stars": 0,
"last_update": "2024-06-24 07:22:59",
"author_account_age_days": 2594
},
"https://github.com/mut-ex/comfyui-gligengui-node": {
"stars": 30,
"last_update": "2024-02-28 02:46:05",
"author_account_age_days": 2858
},
"https://github.com/nat-chan/comfyui-eval": {
"stars": 1,
"last_update": "2024-05-28 11:56:37",
"author_account_age_days": 2993
},
"https://github.com/nat-chan/comfyui-in-memory-transceiver": {
"stars": 1,
"last_update": "2024-05-01 10:03:01",
"author_account_age_days": 2993
},
"https://github.com/nat-chan/comfyui-paint": {
"stars": 2,
"last_update": "2024-06-14 11:01:38",
"author_account_age_days": 2993
},
"https://github.com/nidefawl/ComfyUI-nidefawl": {
"stars": 0,
"last_update": "2024-01-16 18:16:41",
"author_account_age_days": 4868
},
"https://github.com/nkchocoai/ComfyUI-PromptUtilities": {
"stars": 6,
"last_update": "2024-06-23 04:58:30",
"author_account_age_days": 160
},
"https://github.com/norgeous/ComfyUI-UI-Builder": {
"stars": 2,
"last_update": "2024-06-24 13:55:40",
"author_account_age_days": 4029
},
"https://github.com/oyvindg/ComfyUI-TrollSuite": {
"stars": 0,
"last_update": "2024-05-22 21:32:03",
"author_account_age_days": 2329
},
"https://github.com/oztrkoguz/ComfyUI_Kosmos2_BBox_Cutter": {
"stars": 13,
"last_update": "2024-05-03 10:52:29",
"author_account_age_days": 841
},
"https://github.com/pamparamm/ComfyUI-ppm": {
"stars": 3,
"last_update": "2024-06-15 15:19:13",
"author_account_age_days": 2131
},
"https://github.com/phineas-pta/comfy-trt-test": {
"stars": 83,
"last_update": "2024-06-04 21:09:17",
"author_account_age_days": 2288
},
"https://github.com/poisenbery/NudeNet-Detector-Provider": {
"stars": 1,
"last_update": "2024-02-26 02:11:27",
"author_account_age_days": 1237
},
"https://github.com/prabinpebam/anyPython": {
"stars": 3,
"last_update": "2024-06-21 16:58:16",
"author_account_age_days": 4242
},
"https://github.com/prismwastaken/comfyui-tools": {
"stars": 0,
"last_update": "2024-03-05 14:34:56",
"author_account_age_days": 157
},
"https://github.com/pzzmyc/comfyui-sd3-simple-simpletuner": {
"stars": 1,
"last_update": "2024-06-19 12:48:18",
"author_account_age_days": 2099
},
"https://github.com/redhottensors/ComfyUI-ODE": {
"stars": 12,
"last_update": "2024-06-23 22:16:53",
"author_account_age_days": 139
},
"https://github.com/romeobuilderotti/ComfyUI-EZ-Pipes": {
"stars": 3,
"last_update": "2023-11-15 22:00:49",
"author_account_age_days": 290
},
"https://github.com/runtime44/comfyui_r44_nodes": {
"stars": 28,
"last_update": "2024-06-11 10:49:02",
"author_account_age_days": 168
},
"https://github.com/sangeet/comfyui-testui": {
"stars": 2,
"last_update": "2024-05-15 00:55:17",
"author_account_age_days": 5080
},
"https://github.com/sdfxai/SDFXBridgeForComfyUI": {
"stars": 6,
"last_update": "2024-06-14 10:26:56",
"author_account_age_days": 235
},
"https://github.com/shadowcz007/ComfyUI-PuLID-Test": {
"stars": 8,
"last_update": "2024-05-12 14:37:28",
"author_account_age_days": 3314
},
"https://github.com/shadowcz007/comfyui-CLIPSeg": {
"stars": 1,
"last_update": "2024-02-08 02:16:24",
"author_account_age_days": 3314
},
"https://github.com/shadowcz007/comfyui-llamafile": {
"stars": 15,
"last_update": "2024-05-21 19:47:56",
"author_account_age_days": 3314
},
"https://github.com/shadowcz007/comfyui-musicgen": {
"stars": 54,
"last_update": "2024-06-20 02:07:31",
"author_account_age_days": 3314
},
"https://github.com/shirazdesigner/CLIPTextEncodeAndEnhancev4": {
"stars": 0,
"last_update": "2024-04-27 13:25:08",
"author_account_age_days": 3962
},
"https://github.com/sofakid/dandy": {
"stars": 30,
"last_update": "2024-05-27 21:46:18",
"author_account_age_days": 4053
},
"https://github.com/stavsap/ComfyUI-React-SDK": {
"stars": 6,
"last_update": "2024-03-17 21:54:21",
"author_account_age_days": 4084
},
"https://github.com/stutya/ComfyUI-Terminal": {
"stars": 0,
"last_update": "2024-02-05 16:47:28",
"author_account_age_days": 3838
},
"https://github.com/sugarkwork/comfyui_psd": {
"stars": 1,
"last_update": "2024-03-26 08:24:56",
"author_account_age_days": 875
},
"https://github.com/tachyon-beep/comfyui-simplefeed": {
"stars": 3,
"last_update": "2024-05-22 03:30:57",
"author_account_age_days": 4921
},
"https://github.com/talesofai/comfyui-supersave": {
"stars": 1,
"last_update": "2023-12-27 02:05:53",
"author_account_age_days": 556
},
"https://github.com/tjorbogarden/my-useful-comfyui-custom-nodes": {
"stars": 0,
"last_update": "2024-03-05 13:31:31",
"author_account_age_days": 113
},
"https://github.com/tracerstar/comfyui-p5js-node": {
"stars": 28,
"last_update": "2024-05-30 18:33:55",
"author_account_age_days": 5198
},
"https://github.com/tuckerdarby/ComfyUI-TDNodes": {
"stars": 3,
"last_update": "2024-02-19 17:00:55",
"author_account_age_days": 2938
},
"https://github.com/umisetokikaze/comfyui_mergekit": {
"stars": 0,
"last_update": "2024-04-28 07:21:00",
"author_account_age_days": 1823
},
"https://github.com/unanan/ComfyUI-Dist": {
"stars": 5,
"last_update": "2024-02-28 10:03:50",
"author_account_age_days": 2898
},
"https://github.com/unanan/ComfyUI-clip-interrogator": {
"stars": 22,
"last_update": "2024-02-01 09:46:57",
"author_account_age_days": 1030
},
"https://github.com/wormley/comfyui-wormley-nodes": {
"stars": 0,
"last_update": "2023-11-12 19:05:11",
"author_account_age_days": 2473
},
"https://github.com/yushan777/ComfyUI-Y7Nodes": {
"stars": 1,
"last_update": "2024-06-23 22:36:49",
"author_account_age_days": 517
},
"https://github.com/zmwv823/ComfyUI-AnyText": {
"stars": 42,
"last_update": "2024-06-23 15:52:12",
"author_account_age_days": 3269
}
}

View File

@ -0,0 +1,3 @@
{
"models": []
}

View File

@ -0,0 +1,3 @@
#!/bin/bash
rm ~/.tmp/dev/*.py > /dev/null 2>&1
python ../../scanner.py ~/.tmp/dev

View File

@ -0,0 +1,54 @@
{
"custom_nodes": [
{
"author": "meimeilook",
"title": "ComfyUI_IPAdapter_plus.old [backward compatbility]",
"reference": "https://github.com/meimeilook/ComfyUI_IPAdapter_plus.old",
"files": [
"https://github.com/meimeilook/ComfyUI_IPAdapter_plus.old"
],
"install_type": "git-clone",
"description": "This repo is created to provide backward compatibility for workflows configured with the old IPAdapter."
},
{
"author": "ZHO-ZHO-ZHO",
"title": "Dr.Lt.Data/ComfyUI-YoloWorld-EfficientSAM",
"reference": "https://github.com/ltdrdata/ComfyUI-YoloWorld-EfficientSAM",
"files": [
"https://github.com/ltdrdata/ComfyUI-YoloWorld-EfficientSAM"
],
"install_type": "git-clone",
"description": "This fork includes [a/PR32](https://github.com/ZHO-ZHO-ZHO/ComfyUI-YoloWorld-EfficientSAM/pull/32)"
},
{
"author": "ertu110",
"title": "sdxl_prompt_style",
"reference": "https://github.com/ertu110/sdxl_prompt_style",
"files": [
"https://github.com/ertu110/sdxl_prompt_style"
],
"install_type": "git-clone",
"description": "This project is a complete benchmark [a/https://github.com/twri/sdxl_prompt_styler](https://github.com/twri/sdxl_prompt_styler) A large amount of code inside comes from https://github.com/twri/sdxl_prompt_styler Project and [a/https://www.nodecafe.org/package/pythongosssss_ComfyUI-Custom-Scripts](https://www.nodecafe.org/package/pythongosssss_ComfyUI-Custom-Scripts) project\nThe functionality of this project is related to https://github.com/twri/sdxl_prompt_styler Highly overlapping, the only purpose of creating this project is because there are too many styles when selecting, resulting in a long and inconvenient dropdown box. Therefore, To address this issue, this project has added a secondary menu to the style."
},
{
"author": "gustproof",
"title": "ComfyUI_IPAdapter_plus_Style_Components",
"reference": "https://github.com/gustproof/ComfyUI_IPAdapter_plus_Style_Components",
"files": [
"https://github.com/gustproof/ComfyUI_IPAdapter_plus_Style_Components"
],
"install_type": "git-clone",
"description": "Style Components is an IP-Adapter model conditioned on anime styles. The style embeddings can either be extracted from images or created manually. This repo currently only supports the SDXL model trained on AutismmixPony."
},
{
"author": "gameltb",
"title": "comfyui-stablsr",
"reference": "https://github.com/gameltb/Comfyui-StableSR",
"files": [
"https://github.com/gameltb/Comfyui-StableSR"
],
"install_type": "git-clone",
"description": "This is a development respository for debugging migration of StableSR to ComfyUI\n\nNOTE:Forked from [https://github.com/gameltb/Comfyui-StableSR]\nPut the StableSR [a/webui_786v_139.ckpt](https://huggingface.co/Iceclear/StableSR/resolve/main/webui_768v_139.ckpt) model into Comyfui/models/stablesr/, Put the StableSR [a/stablesr_768v_000139.ckpt](https://huggingface.co/Iceclear/StableSR/resolve/main/stablesr_768v_000139.ckpt) model into Comyfui/models/checkpoints/"
}
]
}

View File

@ -0,0 +1,3 @@
{
"models": []
}

View File

@ -0,0 +1,4 @@
#!/bin/bash
source ../../../../venv/bin/activate
rm .tmp/*.py > /dev/null
python ../../scanner.py

View File

@ -0,0 +1 @@
{}

View File

@ -0,0 +1,587 @@
{
"custom_nodes": [
{
"author": "#NOTICE_1.13",
"title": "NOTICE: This channel is not the default channel.",
"reference": "https://github.com/ltdrdata/ComfyUI-Manager",
"files": [],
"install_type": "git-clone",
"description": "If you see this message, your ComfyUI-Manager is outdated.\nLegacy channel provides only the list of the deprecated nodes. If you want to find the complete node list, please go to the Default channel."
},
{
"author": "turkyden",
"title": "ComfyUI-Sticker [REMOVED]",
"reference": "https://github.com/turkyden/ComfyUI-Sticker",
"files": [
"https://github.com/turkyden/ComfyUI-Sticker"
],
"install_type": "git-clone",
"description": "image to sticker"
},
{
"author": "turkyden",
"title": "ComfyUI-Comic [REMOVED]",
"id": "comic",
"reference": "https://github.com/turkyden/ComfyUI-Comic",
"files": [
"https://github.com/turkyden/ComfyUI-Comic"
],
"install_type": "git-clone",
"description": "a comfyui plugin for image to comic"
},
{
"author": "turkyden",
"title": "ComfyUI-Avatar [REMOVED]",
"id": "avatar",
"reference": "https://github.com/turkyden/ComfyUI-Avatar",
"files": [
"https://github.com/turkyden/ComfyUI-Avatar"
],
"install_type": "git-clone",
"description": "a comfyui plugin for image to avatar"
},
{
"author": "bvhari",
"title": "LatentToRGB [DEPRECATED]",
"id": "latent2rgb",
"reference": "https://github.com/bvhari/ComfyUI_LatentToRGB",
"files": [
"https://github.com/bvhari/ComfyUI_LatentToRGB"
],
"install_type": "git-clone",
"description": "ComfyUI custom node to convert latent to RGB.\nNOTE:This repo has been archived because ComfyUI natively has similar functionality now"
},
{
"author": "Kaharos94",
"title": "ComfyUI-Saveaswebp [DEPRECATED]",
"id": "save-webp",
"reference": "https://github.com/Kaharos94/ComfyUI-Saveaswebp",
"files": [
"https://github.com/Kaharos94/ComfyUI-Saveaswebp"
],
"install_type": "git-clone",
"description": "Save a picture as Webp file in Comfy + Workflow loading"
},
{
"author": "udi0510",
"title": "comfyui-slicer [REMOVED]",
"id": "slicer",
"reference": "https://github.com/udi0510/comfyui-slicer",
"files": [
"https://github.com/udi0510/comfyui-slicer"
],
"install_type": "git-clone",
"description": "Nodes:SlicerNode"
},
{
"author": "logtd",
"title": "ComfyUI-FLATTEN [REMOVED]",
"id": "flatten",
"reference": "https://github.com/logtd/ComfyUI-FlattenFlow",
"files": [
"https://github.com/logtd/ComfyUI-FlattenFlow"
],
"install_type": "git-clone",
"description": "An alternate trajectory processor for ComfyUI-FLATTEN\nNOTE:When using this trajectory type FLATTEN will use roughly 1/4 VRAM and be ~20% faster at the cost of some consistency (especially when injection_steps are low)."
},
{
"author": "MackinationsAi",
"title": "ComfyUi_Stuctured-Outputs [REMOVED]",
"id": "struct-output",
"reference": "https://github.com/MackinationsAi/ComfyUi_Stuctured-Outputs",
"files": [
"https://github.com/MackinationsAi/ComfyUi_Stuctured-Outputs"
],
"install_type": "git-clone",
"description": "This repository contains a custom node for ComfyUI that allows users to save generative image outputs with custom filenames and folder structures. The filenames are padded to four digits, and the positive and negative prompts are embedded in the image metadata."
},
{
"author": "laksjdjf",
"title": "attention-couple-ComfyUI [DEPRECATED]",
"id": "attention-couple",
"reference": "https://github.com/laksjdjf/attention-couple-ComfyUI",
"files": [
"https://github.com/laksjdjf/attention-couple-ComfyUI"
],
"install_type": "git-clone",
"description": "Nodes:Attention couple. This is a custom node that manipulates region-specific prompts. While vanilla ComfyUI employs an area specification method based on latent couples, this node divides regions using attention layers within UNet.\nNOTE: This has been integrated with cgem156-ComfyUI."
},
{
"author": "phineas-pta",
"title": "comfy-trt-test [DEPRECATED]",
"reference": "https://github.com/phineas-pta/comfy-trt-test",
"files": [
"https://github.com/phineas-pta/comfy-trt-test"
],
"install_type": "git-clone",
"description": "Test project for ComfyUI TensorRT Support.\nNOT WORKING YET.\nnot automatic yet, do not use ComfyUI-Manager to install !!!.\nnot beginner-friendly yet, still intended to technical users\nNOTE: The reason for registration in the Manager is for guidance, and for detailed installation instructions, please visit the repository.\nNOTE: Use 'TensorRT Node for ComfyUI' instead of this."
},
{
"author": "dezi-ai",
"title": "ComfyUI Animate LCM [NOT MAINTAINED]",
"reference": "https://github.com/dezi-ai/ComfyUI-AnimateLCM",
"files": [
"https://github.com/dezi-ai/ComfyUI-AnimateLCM"
],
"install_type": "git-clone",
"description": "ComfyUI implementation for [a/AnimateLCM](https://animatelcm.github.io/) [[a/paper](https://arxiv.org/abs/2402.00769)].\b[w/This extension includes a large number of nodes imported from the existing custom nodes, increasing the likelihood of conflicts.]"
},
{
"author": "christian-byrne",
"title": "elimination-nodes [REMOVED]",
"reference": "https://github.com/christian-byrne/elimination-nodes",
"files": [
"https://github.com/christian-byrne/elimination-nodes"
],
"install_type": "git-clone",
"description": "Nodes:Paste Cutout on Base Image"
},
{
"author": "Levy1417",
"title": "Universal-Data-Processing-Kit [UNSAFE] [REMOVED]",
"reference": "https://github.com/Levy1417/Universal-Data-Processing-Kit",
"files": [
"https://github.com/Levy1417/Universal-Data-Processing-Kit"
],
"install_type": "git-clone",
"description": "Nodes:DPK - Any Eval, DPK - Extract Array, DPK - Run External Program, DPK - Any Literals, DPK - Set Node States, DPK - Realtime Text Preview, DPK - Dynamic Action, DPK - Object To Json, DPK - Json To Object\n[w/This extension includes the ability to execute arbitrary code and programs.]"
},
{
"author": "liusida",
"title": "ComfyUI-Sida-Remove-Image [UNSAFE] [REMOVED]",
"reference": "https://github.com/liusida/ComfyUI-Sida-Remove-Image",
"files": [
"https://github.com/liusida/ComfyUI-Sida-Remove-Image"
],
"install_type": "git-clone",
"description": "Nodes: LoadImageWithPrivacy, RemoveImage.[w/This extension is not secure because it provides the capability to delete files from arbitrary paths.]"
},
{
"author": "88IO",
"title": "ComfyUI Image Reordering Plugins [REMOVED]",
"reference": "https://github.com/88IO/ComfyUI-ImageReorder",
"files": [
"https://github.com/88IO/ComfyUI-ImageReorder"
],
"install_type": "git-clone",
"description": "A custom node reorder multiple image frames based on indexes or curves."
},
{
"author": "jtydhr88",
"title": "ComfyUI-InstantMesh [DEPRECATED]",
"id": "instant-mesh",
"reference": "https://github.com/jtydhr88/ComfyUI-InstantMesh",
"files": [
"https://github.com/jtydhr88/ComfyUI-InstantMesh"
],
"install_type": "git-clone",
"description": "ComfyUI InstantMesh is custom nodes that running TencentARC/InstantMesh into ComfyUI, this extension depends on ComfyUI-3D-Pack. Please refer to Readme carefully to install.\nNOTE: This repo is archived due to ComfyUI-3D-Pack supports InstantMesh, please check 3D-Pack directly if you need it"
},
{
"author": "biegert",
"title": "CLIPSeg [NOT MAINTAINED]",
"id": "clipseg",
"reference": "https://github.com/biegert/ComfyUI-CLIPSeg",
"files": [
"https://github.com/biegert/ComfyUI-CLIPSeg/raw/main/custom_nodes/clipseg.py"
],
"install_type": "copy",
"description": "The CLIPSeg node generates a binary mask for a given input image and text prompt."
},
{
"author": "tankucc1no",
"title": "ComfyUI-Dragdiffusion [REMOVED]",
"id": "dragdiffusion",
"reference": "https://github.com/tankucc1no/ComfyUI-Dragdiffusion",
"files": [
"https://github.com/tankucc1no/ComfyUI-Dragdiffusion"
],
"install_type": "git-clone",
"description": "Implementation of [a/Dragdiffusion](https://github.com/Yujun-Shi/DragDiffusion) in ComfyUI."
},
{
"author": "wibur0620",
"title": "ComfyUI Ollama (wibur) [REMOVED]",
"id": "ollama-wibur",
"reference": "https://github.com/wibur0620/comfyui-ollama-wibur",
"files": [
"https://github.com/wibur0620/comfyui-ollama-wibur"
],
"install_type": "git-clone",
"description": "Custom ComfyUI Nodes for interacting with [a/Ollama](https://ollama.com/) using the ollama python client.\nIntegrate the power of LLMs into ComfyUI workflows easily or just experiment with GPT.\nNOTE: To use this properly, you would need a running Ollama server reachable from the host that is running ComfyUI."
},
{
"author": "IKHOR",
"title": "ikhor-nodes [REMOVED]",
"reference": "https://github.com/IKHOR/ComfyUI-IKHOR-Jam-Nodes",
"files": [
"https://github.com/IKHOR/ComfyUI-IKHOR-Jam-Nodes"
],
"install_type": "git-clone",
"description": "Nodes:LoadFromS3, LoadBatchFromS3, SaveToS3, SaveBatchToS3"
},
{
"author": "kijai",
"title": "ComfyUI wrapper nodes for IC-light [DEPRECATED]",
"reference": "https://github.com/kijai/ComfyUI-IC-Light-Wrapper",
"files": [
"https://github.com/kijai/ComfyUI-IC-Light-Wrapper"
],
"install_type": "git-clone",
"description": "Stopped. Original repo: [a/https://github.com/lllyasviel/IC-Light](https://github.com/lllyasviel/IC-Light)"
},
{
"author": "thedyze",
"title": "Save Image Extended for ComfyUI",
"reference": "https://github.com/thedyze/save-image-extended-comfyui",
"files": [
"https://github.com/thedyze/save-image-extended-comfyui"
],
"install_type": "git-clone",
"description": "Customize the information saved in file- and folder names. Use the values of sampler parameters as part of file or folder names. Save your positive & negative prompt as entries in a JSON (text) file, in each folder.\n[w/This custom node has not been maintained for a long time. Please use an alternative node from the default channel.]"
},
{
"author": "ExponentialML",
"title": "ComfyUI_ELLA [DEPRECATED]",
"reference": "https://github.com/ExponentialML/ComfyUI_ELLA",
"files": [
"https://github.com/ExponentialML/ComfyUI_ELLA"
],
"install_type": "git-clone",
"description": "ComfyUI Implementaion of ELLA: Equip Diffusion Models with LLM for Enhanced Semantic Alignment.[w/Officially implemented here: [a/https://github.com/TencentQQGYLab/ComfyUI-ELLA](https://github.com/TencentQQGYLab/ComfyUI-ELLA)]"
},
{
"author": "shinich39",
"title": "comfyui-text-pipe-39 [DEPRECATED]",
"reference": "https://github.com/shinich39/comfyui-text-pipe-39",
"files": [
"https://github.com/shinich39/comfyui-text-pipe-39"
],
"install_type": "git-clone",
"description": "Modify text by condition."
},
{
"author": "Big Idea Technology",
"title": "Image Text Overlay Node for ComfyUI [DEPRECATED]",
"reference": "https://github.com/Big-Idea-Technology/ComfyUI_Image_Text_Overlay",
"files": [
"https://github.com/Big-Idea-Technology/ComfyUI_Image_Text_Overlay"
],
"install_type": "git-clone",
"description": "Please note that the ImageTextOverlay project is no longer supported and has been moved to a new repository. For ongoing developments, contributions, and issues, please refer to the new repository at: [a/https://github.com/Big-Idea-Technology/ComfyUI-Book-Tools](https://github.com/Big-Idea-Technology/ComfyUI-Book-Tools)"
},
{
"author": "mlinmg",
"title": "LaMa Preprocessor [DEPRECATED]",
"reference": "https://github.com/mlinmg/ComfyUI-LaMA-Preprocessor",
"files": [
"https://github.com/mlinmg/ComfyUI-LaMA-Preprocessor"
],
"install_type": "git-clone",
"description": "A LaMa prerocessor for ComfyUI. This preprocessor finally enable users to generate coherent inpaint and outpaint prompt-free. The best results are given on landscapes, not so much in drawings/animation."
},
{
"author": "CapsAdmin",
"title": "ComfyUI-Euler-Smea-Dyn-Sampler [DEPRECATED]",
"reference": "https://github.com/CapsAdmin/ComfyUI-Euler-Smea-Dyn-Sampler",
"files": [
"https://github.com/CapsAdmin/ComfyUI-Euler-Smea-Dyn-Sampler"
],
"install_type": "git-clone",
"description": "Just a comfyui version of [a/Euler Smea Dyn Sampler](https://github.com/Koishi-Star/Euler-Smea-Dyn-Sampler). It adds the sampler directly to existing samplers."
},
{
"author": "BlakeOne",
"title": "ComfyUI FastImageListToImageBatch [REMOVED]",
"reference": "https://github.com/BlakeOne/ComfyUI-FastImageListToImageBatch",
"files": [
"https://github.com/BlakeOne/ComfyUI-FastImageListToImageBatch"
],
"install_type": "git-clone",
"description": "Quickly convert a list of images to a batch of images. All images must be the same size. Great for long videos."
},
{
"author": "ggpid",
"title": "idpark_custom_node [REMOVED]",
"reference": "https://github.com/ggpid/idpark_custom_node",
"files": [
"https://github.com/ggpid/idpark_custom_node"
],
"install_type": "git-clone",
"description": "Nodes:Load Image from S3, Save Image to S3, Generate SAM, Generate FastSAM, Cut by Mask fixed"
},
{
"author": "Davemane42",
"title": "Visual Area Conditioning / Latent composition [DEPRECATED]",
"reference": "https://github.com/Davemane42/ComfyUI_Dave_CustomNode",
"files": [
"https://github.com/Davemane42/ComfyUI_Dave_CustomNode"
],
"install_type": "git-clone",
"description": "This tool provides custom nodes that allow visualization and configuration of area conditioning and latent composite."
},
{
"author": "laksjdjf",
"title": "LoRA-Merger-ComfyUI [DEPRECATED]",
"reference": "https://github.com/laksjdjf/LoRA-Merger-ComfyUI",
"files": [
"https://github.com/laksjdjf/LoRA-Merger-ComfyUI"
],
"install_type": "git-clone",
"description": "Nodes:Load LoRA Weight Only, Load LoRA from Weight, Merge LoRA, Save LoRA. This extension provides nodes for merging LoRA."
},
{
"author": "kinfolk0117",
"title": "TiledIPAdapter [DEPRECATED]",
"reference": "https://github.com/kinfolk0117/ComfyUI_TiledIPAdapter",
"files": [
"https://github.com/kinfolk0117/ComfyUI_TiledIPAdapter"
],
"install_type": "git-clone",
"description": "Proof of concent on how to use IPAdapter to control tiled upscaling. NOTE: You need to have 'ComfyUI_IPAdapter_plus' installed."
},
{
"author": "XINZHANG-ops",
"title": "comfyui-xin-nodes [REMOVED]",
"reference": "https://github.com/XINZHANG-ops/comfyui-xin-nodes",
"files": [
"https://github.com/XINZHANG-ops/comfyui-xin-nodes"
],
"install_type": "git-clone",
"description": "Nodes:ImageSizeClassifer, RandomInt, ShowValue"
},
{
"author": "ssitu",
"title": "NestedNodeBuilder [DEPRECATED]",
"reference": "https://github.com/ssitu/ComfyUI_NestedNodeBuilder",
"files": [
"https://github.com/ssitu/ComfyUI_NestedNodeBuilder"
],
"install_type": "git-clone",
"description": "This extension provides the ability to combine multiple nodes into a single node.\nNOTE:An identical feature now exists in ComfyUI. Additionally, this extension is largely broken with the recent versions of the codebase, so please use the built-in feature for group nodes."
},
{
"author": "ccvv804",
"title": "ComfyUI StableCascade using diffusers for Low VRAM [DEPRECATED]",
"reference": "https://github.com/ccvv804/ComfyUI-DiffusersStableCascade-LowVRAM",
"files": [
"https://github.com/ccvv804/ComfyUI-DiffusersStableCascade-LowVRAM"
],
"install_type": "git-clone",
"description": "Works with RTX 4070ti 12GB.\nSimple quick wrapper for [a/https://huggingface.co/stabilityai/stable-cascade](https://huggingface.co/stabilityai/stable-cascade)\nComfy is going to implement this properly soon, this repo is just for quick testing for the impatient!"
},
{
"author": "kijai",
"title": "ComfyUI StableCascade using diffusers [DEPRECATED]",
"reference": "https://github.com/kijai/ComfyUI-DiffusersStableCascade",
"files": [
"https://github.com/kijai/ComfyUI-DiffusersStableCascade"
],
"install_type": "git-clone",
"description": "Simple quick wrapper for [a/https://huggingface.co/stabilityai/stable-cascade](https://huggingface.co/stabilityai/stable-cascade)\nComfy is going to implement this properly soon, this repo is just for quick testing for the impatient!"
},
{
"author": "solarpush",
"title": "comfyui_sendimage_node [REMOVED]",
"reference": "https://github.com/solarpush/comfyui_sendimage_node",
"files": [
"https://github.com/solarpush/comfyui_sendimage_node"
],
"install_type": "git-clone",
"description": "Send images to the pod."
},
{
"author": "azazeal04",
"title": "ComfyUI-Styles",
"reference": "https://github.com/azazeal04/ComfyUI-Styles",
"files": [
"https://github.com/azazeal04/ComfyUI-Styles"
],
"install_type": "git-clone",
"description": "Nodes:Anime_Styler, Fantasy_Styler, Gothic_Styler, Line_Art_Styler, Movie_Poster_Styler, Punk_Styler, Travel_Poster_Styler. This extension offers 8 art style nodes, each of which includes approximately 50 individual style variations.\n\nNOTE: Due to the dynamic nature of node name definitions, ComfyUI-Manager cannot recognize the node list from this extension. The Missing nodes and Badge features are not available for this extension.\nNOTE: This extension is removed. Users who were previously using this node should install ComfyUI-styles-all instead."
},
{
"author": "hnmr293",
"title": "ComfyUI-nodes-hnmr",
"reference": "https://github.com/hnmr293/ComfyUI-nodes-hnmr",
"files": [
"https://github.com/hnmr293/ComfyUI-nodes-hnmr"
],
"install_type": "git-clone",
"description": "Provide various custom nodes for Latent, Sampling, Model, Loader, Image, Text"
},
{
"author": "bvhari",
"title": "ComfyUI_PerpNeg [WIP]",
"reference": "https://github.com/bvhari/ComfyUI_PerpNeg",
"files": [
"https://github.com/bvhari/ComfyUI_PerpNeg"
],
"install_type": "git-clone",
"description": "Nodes: KSampler (Advanced + Perp-Neg). Implementation of [a/Perp-Neg](https://perp-neg.github.io/)\nIncludes Tonemap and CFG Rescale optionsComfyUI custom node to convert latent to RGB.[w/WARNING: Experimental code, might have incompatibilities and edge cases.]\nNOTE: In the latest version of ComfyUI, this extension is included as built-in."
},
{
"author": "laksjdjf",
"title": "IPAdapter-ComfyUI",
"reference": "https://github.com/laksjdjf/IPAdapter-ComfyUI",
"files": [
"https://github.com/laksjdjf/IPAdapter-ComfyUI"
],
"install_type": "git-clone",
"description": "This custom nodes provides loader of the IP-Adapter model.[w/NOTE: To use this extension node, you need to download the [a/ip-adapter_sd15.bin](https://huggingface.co/h94/IP-Adapter/resolve/main/models/ip-adapter_sd15.bin) file and place it in the %%**custom_nodes/IPAdapter-ComfyUI/models**%% directory. Additionally, you need to download the 'Clip vision model' from the 'Install models' menu as well.]<BR>NOTE: Use ComfyUI_IPAdapter_plus instead of this."
},
{
"author": "RockOfFire",
"title": "CR Animation Nodes",
"reference": "https://github.com/RockOfFire/CR_Animation_Nodes",
"files": [
"https://github.com/RockOfFire/CR_Animation_Nodes"
],
"install_type": "git-clone",
"description": "A comprehensive suite of nodes to enhance your animations. These nodes include some features similar to Deforum, and also some new ideas.<BR>NOTE: This node is merged into Comfyroll Custom Nodes."
},
{
"author": "tkoenig89",
"title": "Load Image with metadata",
"reference": "https://github.com/tkoenig89/ComfyUI_Load_Image_With_Metadata",
"files": [
"https://github.com/tkoenig89/ComfyUI_Load_Image_With_Metadata"
],
"install_type": "git-clone",
"description": "A custom node for comfy ui to read generation data from images (prompt, seed, size...). This could be used when upscaling generated images to use the original prompt and seed."
},
{
"author": "LucianoCirino",
"title": "Efficiency Nodes for ComfyUI [LEGACY]",
"reference": "https://github.com/LucianoCirino/efficiency-nodes-comfyui",
"files": [
"https://github.com/LucianoCirino/efficiency-nodes-comfyui"
],
"install_type": "git-clone",
"description": "A collection of ComfyUI custom nodes to help streamline workflows and reduce total node count.<BR>NOTE: This repository is the original repository but is no longer maintained. Please use the forked version by jags."
},
{
"author": "GeLi1989",
"title": "roop nodes for ComfyUI",
"reference": "https://github.com/GeLi1989/GK-beifen-ComfyUI_roop",
"files": [
"https://github.com/GeLi1989/GK-beifen-ComfyUI_roop"
],
"install_type": "git-clone",
"description": "ComfyUI nodes for the roop A1111 webui script. NOTE: Need to download <a href='https://github.com/SumDeusVitae/FaceSwap_v01/raw/main/inswapper_128.onnx' target='blank'/>model</a> to use this node. NOTE: This is removed."
},
{
"author": "ProDALOR",
"title": "comfyui_u2net",
"reference": "https://github.com/ProDALOR/comfyui_u2net",
"files": [
"https://github.com/ProDALOR/comfyui_u2net"
],
"install_type": "git-clone",
"description": "Nodes: Load U2Net model, U2Net segmentation, To mask, Segmentation to mask, U2NetBaseNormalization, U2NetMaxNormalization. NOTE: This is removed."
},
{
"author": "FizzleDorf",
"title": "AIT",
"reference": "https://github.com/FizzleDorf/AIT",
"files": [
"https://github.com/FizzleDorf/AIT"
],
"install_type": "git-clone",
"description": "Nodes: Load AITemplate, Load AITemplate (ControlNet), VAE Decode (AITemplate), VAE Encode (AITemplate), VAE Encode (AITemplate, Inpaint). Experimental usage of AITemplate. NOTE: This is deprecated extension. Use <b>ComfyUI-AIT</b> instead of this."
},
{
"author": "chenbaiyujason",
"title": "sc-node-comfyui",
"reference": "https://github.com/chenbaiyujason/sc-node-comfyui",
"files": [
"https://github.com/chenbaiyujason/sc-node-comfyui"
],
"install_type": "git-clone",
"description": "Nodes for GPT interaction and text manipulation"
},
{
"author": "asd417",
"title": "CheckpointTomeLoader",
"reference": "https://github.com/asd417/tomeSD_for_Comfy",
"files": [
"https://github.com/ltdrdata/ComfyUI-tomeSD-installer"
],
"install_type": "git-clone",
"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>"
},
{
"author": "gamert",
"title": "ComfyUI_tagger",
"reference": "https://github.com/gamert/ComfyUI_tagger",
"pip": ["gradio"],
"files": [
"https://github.com/gamert/ComfyUI_tagger"
],
"install_type": "git-clone",
"description": "Nodes: CLIPTextEncodeTaggerDD, ImageTaggerDD. <p style='background-color: black; color: red;'>WARNING: Installing the current version is causing an issue where ComfyUI fails to start.</p>"
},
{
"author": "Fannovel16",
"title": "ControlNet Preprocessors",
"reference": "https://github.com/Fannovel16/comfy_controlnet_preprocessors",
"files": [
"https://github.com/Fannovel16/comfy_controlnet_preprocessors"
],
"install_type": "git-clone",
"description": "ControlNet Preprocessors. (To use this extension, you need to download the required model file from <B>Install Models</B>)<BR> <p style='background-color: black; color: red;'>NOTE: Please uninstall this custom node and instead install 'ComfyUI's ControlNet Auxiliary Preprocessors' from the default channel.<BR>To use nodes belonging to <B>controlnet v1</b> such as <B>Canny_Edge_Preprocessor, MIDAS_Depth_Map_Preprocessor, Uniformer_SemSegPreprocessor, etc.</B>, you need to copy the <font color='white'>config.yaml.example</font> file to <font color='white'>config.yaml</font> and change <font color='white'>skip_v1: True</font> to <font color='white'>skip_v1: False</font>.</p>"
},
{
"author": "comfyanonymous",
"title": "ComfyUI_experiments/sampler_tonemap",
"reference": "https://github.com/comfyanonymous/ComfyUI_experiments",
"files": [
"https://github.com/comfyanonymous/ComfyUI_experiments/raw/master/sampler_tonemap.py"
],
"install_type": "copy",
"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. "
},
{
"author": "comfyanonymous",
"title": "ComfyUI_experiments/sampler_rescalecfg",
"reference": "https://github.com/comfyanonymous/ComfyUI_experiments",
"files": [
"https://github.com/comfyanonymous/ComfyUI_experiments/raw/master/sampler_rescalecfg.py"
],
"install_type": "copy",
"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>)<p style='background-color: black; color: red;'>It is recommended to use the integrated custom nodes in the default channel for update support rather than installing individual nodes.</p>"
},
{
"author": "comfyanonymous",
"title": "ComfyUI_experiments/advanced_model_merging",
"reference": "https://github.com/comfyanonymous/ComfyUI_experiments",
"files": [
"https://github.com/comfyanonymous/ComfyUI_experiments/raw/master/advanced_model_merging.py"
],
"install_type": "copy",
"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.<p style='background-color: black; color: red;'>It is recommended to use the integrated custom nodes in the default channel for update support rather than installing individual nodes.</p>"
},
{
"author": "comfyanonymous",
"title": "ComfyUI_experiments/sdxl_model_merging",
"reference": "https://github.com/comfyanonymous/ComfyUI_experiments",
"files": [
"https://github.com/comfyanonymous/ComfyUI_experiments/raw/master/sdxl_model_merging.py"
],
"install_type": "copy",
"description": "These nodes provide the capability to merge SDXL base models.<p style='background-color: black; color: red;'>It is recommended to use the integrated custom nodes in the default channel for update support rather than installing individual nodes.</p>"
},
{
"author": "comfyanonymous",
"title": "ComfyUI_experiments/reference_only",
"reference": "https://github.com/comfyanonymous/ComfyUI_experiments",
"files": [
"https://github.com/comfyanonymous/ComfyUI_experiments/raw/master/reference_only.py"
],
"install_type": "copy",
"description": "This node provides functionality corresponding to Reference only in Controlnet.<p style='background-color: black; color: red;'>It is recommended to use the integrated custom nodes in the default channel for update support rather than installing individual nodes.</p>"
}
]
}

View File

@ -0,0 +1,3 @@
{
"models": []
}

View File

@ -0,0 +1,4 @@
{
"items": [
]
}

View File

@ -0,0 +1,702 @@
{
"custom_nodes": [
{
"author": "#NOTICE_1.13",
"title": "NOTICE: This channel is not the default channel.",
"reference": "https://github.com/ltdrdata/ComfyUI-Manager","files": [],
"install_type": "git-clone",
"description": "If you see this message, your ComfyUI-Manager is outdated.\nRecent channel provides only the list of the latest nodes. If you want to find the complete node list, please go to the Default channel.\nMaking LoRA has never been easier!"
},
{
"author": "Extraltodeus",
"title": "pre_cfg_comfy_nodes_for_ComfyUI",
"id": "precfg",
"reference": "https://github.com/Extraltodeus/pre_cfg_comfy_nodes_for_ComfyUI",
"files": [
"https://github.com/Extraltodeus/pre_cfg_comfy_nodes_for_ComfyUI"
],
"install_type": "git-clone",
"description": "A set of nodes to prepare the noise predictions before the CFG function"
},
{
"author": "ZZXYWQ",
"title": "ZZX Nodes",
"id": "ZZXYWQ",
"reference": "https://github.com/ZZXYWQ/ComfyUI-ZZXYWQ",
"files": [
"https://github.com/ZZXYWQ/ComfyUI-ZZXYWQ"
],
"install_type": "git-clone",
"description": "Node(s): VideoFormatConverter(VFC)"
},
{
"author": "smthemex",
"title": "ComfyUI_AnyDoor",
"id": "ComfyUI_AnyDoor",
"reference": "https://github.com/smthemex/ComfyUI_AnyDoor",
"files": [
"https://github.com/smthemex/ComfyUI_AnyDoor"
],
"install_type": "git-clone",
"description": "You can use anydoor, change clothes or object..."
},
{
"author": "Haoming02",
"title": "ComfyUI Node Beautify",
"reference": "https://github.com/Haoming02/comfyui-node-beautify",
"files": [
"https://github.com/Haoming02/comfyui-node-beautify"
],
"install_type": "git-clone",
"description": "This is an Extension for ComfyUI, which helps formatting the workflow."
},
{
"author": "adigayung",
"title": "ComfyUI-Translator",
"reference": "https://github.com/adigayung/ComfyUI-Translator",
"files": [
"https://github.com/adigayung/ComfyUI-Translator"
],
"install_type": "git-clone",
"description": "Auto translate all languages to english"
},
{
"author": "christian-byrne",
"title": "comfyui-default-values-manager",
"reference": "https://github.com/christian-byrne/comfyui-default-values-manager",
"files": [
"https://github.com/christian-byrne/comfyui-default-values-manager"
],
"install_type": "git-clone",
"description": "comfyui-default-values-manager"
},
{
"author": "vivax3794",
"title": "ComfyUI-Sub-Nodes",
"reference": "https://github.com/vivax3794/ComfyUI-Sub-Nodes",
"files": [
"https://github.com/vivax3794/ComfyUI-Sub-Nodes"
],
"install_type": "git-clone",
"description": "Creating subgraph and Calling subgraphs."
},
{
"author": "HECer",
"title": "ComfyUI-FilePathCreator",
"reference": "https://github.com/HECer/ComfyUI-FilePathCreator",
"files": [
"https://github.com/HECer/ComfyUI-FilePathCreator"
],
"install_type": "git-clone",
"description": "The ComfyUI-FilePathCreator is a custom node extension for ComfyUI designed to generate dynamic filenames based on user-defined parameters. This node helps streamline the process of creating organized and timestamped filenames, ideal for saving output files in a structured manner."
},
{
"author": "mullakhmetov",
"title": "comfyui_dynamic_util_nodes",
"reference": "https://github.com/mullakhmetov/comfyui_dynamic_util_nodes",
"files": [
"https://github.com/mullakhmetov/comfyui_dynamic_util_nodes"
],
"install_type": "git-clone",
"description": "ComfyS3 helpful util nodes for dynamic workflows"
},
{
"author": "wTechArtist",
"title": "ComfyUI-CustomNodes",
"reference": "https://github.com/wTechArtist/ComfyUI-CustomNodes",
"files": [
"https://github.com/wTechArtist/ComfyUI-CustomNodes"
],
"install_type": "git-clone",
"description": "Nodes:Image Blending Mode Mask"
},
{
"author": "bradsec",
"title": "ComfyUI_StringTools",
"id": "stringtools",
"reference": "https://github.com/bradsec/ComfyUI_StringTools",
"files": [
"https://github.com/bradsec/ComfyUI_StringTools"
],
"install_type": "git-clone",
"description": "Some simple string tools to modify text and strings in ComfyUI."
},
{
"author": "bluevisor",
"title": "ComfyUI_PS_Blend_Node",
"reference": "https://github.com/bluevisor/ComfyUI_PS_Blend_Node",
"files": [
"https://github.com/bluevisor/ComfyUI_PS_Blend_Node"
],
"install_type": "git-clone",
"description": "This repository contains a simple custom node for ComfyUI that implements familiar PS-style blend modes using PyTorch. The PSBlendNode allows you to blend two images together using a variety of blend modes and an opacity parameter."
},
{
"author": "longgui0318",
"title": "comfyui-common-util",
"id": "common-util",
"reference": "https://github.com/longgui0318/comfyui-common-util",
"files": [
"https://github.com/longgui0318/comfyui-common-util"
],
"install_type": "git-clone",
"description": "Nodes:Init Layer Info Array, Added Layer Info To Array, Layer Info Array Fuse, Layer Image Seleted, Layer Images IPAdapter Advanced, Enhanced Random Light Source"
},
{
"author": "kijai",
"title": "ComfyUI-KwaiKolorsWrapper",
"id": "kwaikolors",
"reference": "https://github.com/kijai/ComfyUI-KwaiKolorsWrapper",
"files": [
"https://github.com/kijai/ComfyUI-KwaiKolorsWrapper"
],
"install_type": "git-clone",
"description": "Rudimentary wrapper that runs [a/Kwai-Kolors](https://huggingface.co/Kwai-Kolors/Kolors) text2image pipeline using diffusers."
},
{
"author": "Smuzzies",
"title": "comfyui_meme_maker",
"reference": "https://github.com/Smuzzies/comfyui_meme_maker",
"files": [
"https://github.com/Smuzzies/comfyui_meme_maker"
],
"install_type": "git-clone",
"description": "Meme Maker Node for ComfyUI."
},
{
"author": "kijai",
"title": "ComfyUI-LivePortraitKJ",
"id": "liveportrait-kijai",
"reference": "https://github.com/kijai/ComfyUI-LivePortraitKJ",
"files": [
"https://github.com/kijai/ComfyUI-LivePortraitKJ"
],
"install_type": "git-clone",
"description": "Nodes for [a/LivePortrait](https://github.com/KwaiVGI/LivePortrait), insightface is required"
},
{
"author": "metncelik",
"title": "comfyui_met_suite",
"reference": "https://github.com/metncelik/comfyui_met_suite",
"files": [
"https://github.com/metncelik/comfyui_met_suite"
],
"install_type": "git-clone",
"description": "Nodes: Primitive BBOX, BBOX Padding, BBOX Resize, ImageResize KeepRatio."
},
{
"author": "shadowcz007",
"title": "comfyui-liveportrait",
"id": "liveportrait",
"reference": "https://github.com/shadowcz007/comfyui-liveportrait",
"files": [
"https://github.com/shadowcz007/comfyui-liveportrait"
],
"install_type": "git-clone",
"description": "The ComfyUI version of [a/LivePortrait](https://github.com/KwaiVGI/LivePortrait)."
},
{
"author": "Tritant",
"title": "ComfyUI-CreaPrompt",
"id": "creaprompt",
"reference": "https://github.com/tritant/ComfyUI_CreaPrompt",
"files": [
"https://github.com/tritant/ComfyUI_CreaPrompt"
],
"install_type": "git-clone",
"description": "Generate random prompts easily."
},
{
"author": "kijai",
"title": "ComfyUI-MimicMotionWrapper",
"id": "mimicmotion-kijai",
"reference": "https://github.com/kijai/ComfyUI-MimicMotionWrapper",
"files": [
"https://github.com/kijai/ComfyUI-MimicMotionWrapper"
],
"install_type": "git-clone",
"description": "Optimized wrapper nodes for MimicMotion: [a/https://github.com/tencent/MimicMotion](https://github.com/tencent/MimicMotion)"
},
{
"author": "kijai",
"title": "ComfyUI-OpenDiTWrapper",
"id": "opendit-kijai",
"reference": "https://github.com/kijai/ComfyUI-OpenDiTWrapper",
"files": [
"https://github.com/kijai/ComfyUI-OpenDiTWrapper"
],
"install_type": "git-clone",
"description": "Wrapper nodes for OpenDiT: [a/OpenDiT](https://github.com/NUS-HPC-AI-Lab/OpenDiT/), supports Open-Sora t2i and i2i"
},
{
"author": "smthemex",
"title": "ComfyUI_MS_Diffusion",
"id": "MS_Diffusion",
"reference": "https://github.com/smthemex/ComfyUI_MS_Diffusion",
"files": [
"https://github.com/smthemex/ComfyUI_MS_Diffusion"
],
"install_type": "git-clone",
"description": "You can using MS-diffusion make story in comfyUI."
},
{
"author": "christian-byrne",
"title": "audio-separation-nodes-comfyui",
"reference": "https://github.com/christian-byrne/audio-separation-nodes-comfyui",
"files": [
"https://github.com/christian-byrne/audio-separation-nodes-comfyui"
],
"install_type": "git-clone",
"description": "Nodes:AudioSeparation, AudioCrop, AudioCombine, AudioTempoMatch."
},
{
"author": "yiwangsimple",
"title": "comfy-groqchat",
"reference": "https://github.com/yiwangsimple/ComfyUI_GroqChat",
"files": [
"https://github.com/yiwangsimple/ComfyUI_GroqChat"
],
"install_type": "git-clone",
"description": "Content generation with open source models in comfyui via graq api implementation."
},
{
"author": "AIFSH",
"title": "ComfyUI-MimicMotion",
"id": "mimicmotion-aifsh",
"reference": "https://github.com/AIFSH/ComfyUI-MimicMotion",
"files": [
"https://github.com/AIFSH/ComfyUI-MimicMotion"
],
"install_type": "git-clone",
"description": "a comfyui custom node for [a/MimicMotion](https://github.com/Tencent/MimicMotion)"
},
{
"author": "AIFSH",
"title": "ComfyUI-DiffSynth-Studio",
"id": "diffsynth-studio",
"reference": "https://github.com/AIFSH/ComfyUI-DiffSynth-Studio",
"files": [
"https://github.com/AIFSH/ComfyUI-DiffSynth-Studio"
],
"install_type": "git-clone",
"description": "make [a/DiffSynth-Studio](https://github.com/modelscope/DiffSynth-Studio) available in ComfyUI"
},
{
"author": "1038lab",
"title": "ComfyUI-latentSizeSelector",
"id": "ComfyUI-latentSizeSelector",
"reference": "https://github.com/1038lab/ComfyUI_LatentSizeSelector",
"files": [
"https://github.com/1038lab/ComfyUI_LatentSizeSelector"
],
"install_type": "git-clone",
"description": "You'll get a new node Latent Size Selector, you can pick the x and y sizes from a list."
},
{
"author": "AIFSH",
"title": "ComfyUI-I2V-Adapter",
"id": "i2v-adapter",
"reference": "https://github.com/AIFSH/ComfyUI-I2V-Adapter",
"files": [
"https://github.com/AIFSH/ComfyUI-I2V-Adapter"
],
"install_type": "git-clone",
"description": "a comfyui custom node for [a/I2V-Adapter](https://github.com/KwaiVGI/I2V-Adapter)"
},
{
"author": "DeJoker",
"title": "Pipeline Parallel ComfyUI",
"reference": "https://github.com/DeJoker/pipeline-parallel-comfy",
"files": [
"https://github.com/DeJoker/pipeline-parallel-comfy"
],
"install_type": "git-clone",
"description": "provide extra api to run prompt request with parallel execution of independent node"
},
{
"author": "AIFSH",
"title": "ComfyUI-MARS5-TTS",
"id": "mars5-tts",
"reference": "https://github.com/AIFSH/ComfyUI-MARS5-TTS",
"files": [
"https://github.com/AIFSH/ComfyUI-MARS5-TTS"
],
"install_type": "git-clone",
"description": "a comfyui custom node for [a/MARS5-TTS](https://github.com/Camb-ai/MARS5-TTS)"
},
{
"author": "MrSamSeen",
"title": "ComfyUI_SSStereoscope",
"id": "ssstereoscope",
"reference": "https://github.com/MrSamSeen/ComfyUI_SSStereoscope",
"files": [
"https://github.com/MrSamSeen/ComfyUI_SSStereoscope"
],
"install_type": "git-clone",
"description": "The SideBySide Node is a powerful tool designed for ComfyUI to generate stereoscopic images. It takes a base image and a corresponding depth map as inputs and produces a combined image that simulates a 3D effect when viewed with appropriate equipment."
},
{
"author": "jroc22",
"title": "ComfyUI-CSV-prompt-builder",
"id": "csv-prompt-builder",
"reference": "https://github.com/jroc22/ComfyUI-CSV-prompt-builder",
"files": [
"https://github.com/jroc22/ComfyUI-CSV-prompt-builder"
],
"install_type": "git-clone",
"description": "This is a simple node for creating prompts using a .csv file. I created this node as an easy way to output different prompts each time a workflow is run."
},
{
"author": "ImmortalPie",
"title": "PonySwitch Node",
"reference": "https://github.com/ImmortalPie/ComfyUI-PonySwitch",
"files": [
"https://github.com/ImmortalPie/ComfyUI-PonySwitch/raw/main/PonySwitch.py"
],
"install_type": "copy",
"description": "The PonySwitch node is a custom node for ComfyUI that modifies prompts based on a toggle switch and adds configurable pony tags."
},
{
"author": "SEkINVR",
"title": "ComfyUI SaveAS",
"id": "saveas",
"reference": "https://github.com/SEkINVR/ComfyUI-SaveAs",
"files": [
"https://github.com/SEkINVR/ComfyUI-SaveAs"
],
"install_type": "git-clone",
"description": "This custom node for ComfyUI allows you to save images in multiple formats, including PNG, JPG, WebP, and ICO.\n[w/ComfyUI-Save-Multi-Format is renamed to SaveAs. Remove previous one and reinstall to this.]"
},
{
"author": "Fuou Marinas",
"title": "ComfyUI-FirstOrderMM",
"id": "fomm",
"reference": "https://github.com/FuouM/ComfyUI-FirstOrderMM",
"files": [
"https://github.com/FuouM/ComfyUI-FirstOrderMM"
],
"install_type": "git-clone",
"description": "Run [a/First Order Motion Model](https://github.com/AliaksandrSiarohin/first-order-model) for Image Animation in ComfyUI."
},
{
"author": "my-opencode",
"title": "ComfyUI_IndustrialMagick",
"id": "industrialmagick",
"reference": "https://github.com/my-opencode/ComfyUI_IndustrialMagick",
"files": [
"https://github.com/my-opencode/ComfyUI_IndustrialMagick"
],
"install_type": "git-clone",
"description": "[a/ImageMagick](https://imagemagick.org/index.php) nodes for ComfyUI. Adds nodes to call ImageMagick subprocesses from ComfyUI.\nRequirements: [a/ImagMagick7](https://imagemagick.org/script/download.php), 'magick' command in your CLI environment."
},
{
"author": "my-opencode",
"title": "ComfyUI_KSamplerTimer",
"id": "ksamplertimer",
"reference": "https://github.com/my-opencode/ComfyUI_KSamplerTimer",
"files": [
"https://github.com/my-opencode/ComfyUI_KSamplerTimer"
],
"install_type": "git-clone",
"description": "A custom node that returns the generation time of the KSampler. Intended for benchmarking or debugging."
},
{
"author": "licyk",
"title": "ComfyUI-Restart-Sampler",
"id": "restart-sampler-licyk",
"reference": "https://github.com/licyk/ComfyUI-Restart-Sampler",
"files": [
"https://github.com/licyk/ComfyUI-Restart-Sampler"
],
"install_type": "git-clone",
"description": "This extension is a node that directly expands the functionality of KSampler, rather than being in the form of a custom node. [w/Workflows created using this feature are not compatible with other users.]"
},
{
"author": "pamparamm",
"title": "ComfyUI Vectorscope CC",
"id": "vectorscope",
"reference": "https://github.com/pamparamm/ComfyUI-vectorscope-cc",
"files": [
"https://github.com/pamparamm/ComfyUI-vectorscope-cc"
],
"install_type": "git-clone",
"description": "ComfyUI port of a wonderful extension [a/SD Webui Vectorscope CC by Haoming02](https://github.com/Haoming02/sd-webui-vectorscope-cc).\nBased on (and probably incompatible with) [a/ComfyUI Diffusion Color Grading by Haoming02](https://github.com/Haoming02/comfyui-diffusion-cg)."
},
{
"author": "yuvraj108c",
"title": "ComfyUI YoloNasPose Tensorrt",
"id": "yolonaspose-tensorrt",
"reference": "https://github.com/yuvraj108c/ComfyUI-YoloNasPose-Tensorrt",
"files": [
"https://github.com/yuvraj108c/ComfyUI-YoloNasPose-Tensorrt"
],
"install_type": "git-clone",
"description": "This repo provides a ComfyUI Custom Node implementation of [a/YOLO-NAS-POSE](https://github.com/Deci-AI/super-gradients), powered by TensorRT for ultra fast pose estimation. It has been adapted to work with openpose controlnet (experimental)"
},
{
"author": "GreenLandisaLie",
"title": "AuraSR-ComfyUI",
"id": "aurasr-greenlandisalie",
"reference": "https://github.com/GreenLandisaLie/AuraSR-ComfyUI",
"files": [
"https://github.com/GreenLandisaLie/AuraSR-ComfyUI"
],
"install_type": "git-clone",
"description": "ComfyUI implementation of [a/Aura-SR](https://github.com/fal-ai/aura-sr)"
},
{
"author": "mingqizhang",
"title": "ComfyUI_InSPyResNet_zmq",
"id": "inspy",
"reference": "https://github.com/mingqizhang/ComfyUI_InSPyResNet_zmq",
"files": [
"https://github.com/mingqizhang/ComfyUI_InSPyResNet_zmq"
],
"install_type": "git-clone",
"description": "Nodes:INSPY removebg ModelLoader, INSPY RMBG"
},
{
"author": "hwhaocool",
"title": "ComfyUI-Select-Any",
"id": "select-any",
"reference": "https://github.com/hwhaocool/ComfyUI-Select-Any",
"files": [
"https://github.com/hwhaocool/ComfyUI-Select-Any"
],
"install_type": "git-clone",
"description": "a comfyui custom node, which can select value from inputs"
},
{
"author": "leiweiqiang",
"title": "ComfyUI-TRA",
"id": "tra",
"reference": "https://github.com/leiweiqiang/ComfyUI-TRA",
"files": [
"https://github.com/leiweiqiang/ComfyUI-TRA"
],
"install_type": "git-clone",
"description": "Nodes:TCL EbSynth, TCL Extract Frames (From File), TCL Extract Frames (From Video), TCL Combine Frames, TCL Save Video (From Frames)"
},
{
"author": "AIFSH",
"title": "ComfyUI-AuraSR",
"id": "aurasr",
"reference": "https://github.com/AIFSH/ComfyUI-AuraSR",
"files": [
"https://github.com/AIFSH/ComfyUI-AuraSR"
],
"install_type": "git-clone",
"description": "a node for [a/AuraSR](https://github.com/fal-ai/aura-sr)"
},
{
"author": "veighnsche",
"title": "comfyui_gr85",
"id": "gr85",
"reference": "https://github.com/veighnsche/comfyui_gr85",
"files": [
"https://github.com/veighnsche/comfyui_gr85"
],
"install_type": "git-clone",
"description": "Nodes:Image Dimension Resizer, Image Sizer, Random Ratio, Show Text, Random Title Character, Random Wildcard Tag Picker, Random Show Atm Loc Outfit, Contains Word, Elements Concatenator, ..."
},
{
"author": "hyunamy",
"title": "Comfy-UI on-complete-email-me",
"id": "hyunamy",
"reference": "https://github.com/hyunamy/comfy-ui-on-complete-email-me",
"files": [
"https://github.com/hyunamy/comfy-ui-on-complete-email-me"
],
"install_type": "git-clone",
"description": "A feature that sends an email via Gmail once image generation is completed in Comfy-ui."
},
{
"author": "rhdunn",
"title": "comfyui-bus-plugin",
"id": "bus",
"reference": "https://github.com/rhdunn/comfyui-bus-plugin",
"files": [
"https://github.com/rhdunn/comfyui-bus-plugin"
],
"install_type": "git-clone",
"description": "A collection of nodes for rerouting multiple I/O lines together in a bus."
},
{
"author": "hay86",
"title": "ComfyUI Hallo",
"id": "hallo-hay86",
"reference": "https://github.com/hay86/ComfyUI_Hallo",
"files": [
"https://github.com/hay86/ComfyUI_Hallo"
],
"install_type": "git-clone",
"description": "Unofficial implementation of [a/hallo](https://github.com/fudan-generative-vision/hallo) for ComfyUI"
},
{
"author": "AI2lab",
"title": "comfyUI-siliconflow-api-2lab",
"id": "siliconflow",
"reference": "https://github.com/AI2lab/comfyUI-siliconflow-api-2lab",
"files": [
"https://github.com/AI2lab/comfyUI-siliconflow-api-2lab"
],
"install_type": "git-clone",
"description": "Unofficial implementation of siliconflow API for ComfyUI\nHow to use:apply api key in https://cloud.siliconflow.cn/\nadd api key in config.json"
},
{
"author": "11dogzi",
"title": "ComfUI-EGAdapterMadAssistant",
"id": "ergouzi-samplers",
"reference": "https://github.com/11dogzi/ComfUI-EGAdapterMadAssistant",
"files": [
"https://github.com/11dogzi/ComfUI-EGAdapterMadAssistant"
],
"install_type": "git-clone",
"description": "This is a hierarchical auxiliary project of the IPAdapter project, which uses a slider to quickly control the hierarchical weights and add fully random and semi random modes"
},
{
"author": "iwanders",
"title": "iwanders/ComfyUI_nodes",
"id": "iwanders-nodes",
"reference": "https://github.com/iwanders/ComfyUI_nodes",
"files": [
"https://github.com/iwanders/ComfyUI_nodes"
],
"install_type": "git-clone",
"description": "Nodes:IW SaveString, IW PrintString, IW ReplaceString, IW StringNode, IW StringConcat, IW TokenizerVocab, IW JsonPickItem."
},
{
"author": "SaltAI",
"title": "SaltAI_AudioViz",
"id": "saltai-audioviz",
"reference": "https://github.com/get-salt-AI/SaltAI_AudioViz",
"files": [
"https://github.com/get-salt-AI/SaltAI_AudioViz"
],
"install_type": "git-clone",
"description": "SaltAI AudioViz contains ComfyUI nodes for generating complex audio reactive visualizations"
},
{
"author": "AI2lab",
"title": "comfyUI-tool-2lab",
"id": "tool-2lab",
"reference": "https://github.com/AI2lab/comfyUI-tool-2lab",
"files": [
"https://github.com/AI2lab/comfyUI-tool-2lab"
],
"install_type": "git-clone",
"description": "tool set for developing workflow and publish to web api server"
},
{
"author": "SherryXieYuchen",
"title": "ComfyUI-Image-Inpainting",
"id": "image-inpainting",
"reference": "https://github.com/SherryXieYuchen/ComfyUI-Image-Inpainting",
"files": [
"https://github.com/SherryXieYuchen/ComfyUI-Image-Inpainting"
],
"install_type": "git-clone",
"description": "Nodes:VAE Encode Inpaint, VAE Decode Inpaint, ColorCorrection Inpaint, ImagePreprocess Inpaint, ImagePostprocess Inpaint, Load Model Inpaint, Inpainting (using Model)"
},
{
"author": "zeroxoxo",
"title": "ComfyUI-Fast-Style-Transfer",
"id": "fast-style-transfer",
"reference": "https://github.com/zeroxoxo/ComfyUI-Fast-Style-Transfer",
"files": [
"https://github.com/zeroxoxo/ComfyUI-Fast-Style-Transfer"
],
"install_type": "git-clone",
"description": "ComfyUI node for fast neural style transfer. This is a simple conversion based on this: [a/https://github.com/rrmina/fast-neural-style-pytorch](https://github.com/rrmina/fast-neural-style-pytorch) Only basic inference functionality is ported for now."
},
{
"author": "Shibiko-AI",
"title": "Shibiko AI ComfyUI Tools",
"id": "shibiko-ai-tools",
"reference": "https://github.com/Shibiko-AI/ShibikoAI-ComfyUI-Tools",
"files": [
"https://github.com/Shibiko-AI/ShibikoAI-ComfyUI-Tools"
],
"install_type": "git-clone",
"description": "This is a collection of tools that I use to make my life easier when developing ComfyUI applications. It is a collection of tools that I have created to help me with my development process. I have decided to share these tools with the community in the hopes that they will be useful to others as well. I use this tools to further develop features for [a/https://shibiko.ai](https://shibiko.ai)"
},
{
"author": "fofr",
"title": "comfyui-replicate",
"reference": "https://github.com/fofr/comfyui-replicate",
"files": [
"https://github.com/fofr/comfyui-replicate"
],
"install_type": "git-clone",
"description": "Nodes:Llama 3 Replicate"
},
{
"author": "RedRayz",
"title": "ComfyUI-Danbooru-To-WD",
"id": "danbooru2wd",
"reference": "https://github.com/RedRayz/ComfyUI-Danbooru-To-WD",
"files": [
"https://github.com/RedRayz/ComfyUI-Danbooru-To-WD"
],
"install_type": "git-clone",
"description": "Converts booru tags to a format suitable for Waifu Diffusion(or Danbooru based models)."
},
{
"author": "akkyoss",
"title": "ComfyUI_Zwng_Nodes",
"id": "zwng",
"reference": "https://github.com/za-wa-n-go/ComfyUI_Zwng_Nodes",
"files": [
"https://github.com/za-wa-n-go/ComfyUI_Zwng_Nodes"
],
"install_type": "git-clone",
"description": "Simple nodes for loading image files.Nodes that include a simple remote connection to Photoshop, a node that can overlay and preview an image with a mask, and a node that can load images directly from a file path."
},
{
"author": "slyt",
"title": "comfyui-ollama-nodes",
"reference": "https://github.com/slyt/comfyui-ollama-nodes",
"files": [
"https://github.com/slyt/comfyui-ollama-nodes"
],
"install_type": "git-clone",
"description": "ComfyUI custom nodes for working with [a/Ollama](https://github.com/ollama/ollama).\nNOTE:Assumes that an Ollama server is running at http://127.0.0.1:11434 and accessible by the ComfyUI backend."
},
{
"author": "MilitantHitchhiker",
"title": "Militant Hitchhiker's Switchblade Pack",
"id": "hitchhiker",
"reference": "https://github.com/MilitantHitchhiker/MilitantHitchhiker-SwitchbladePack",
"files": [
"https://github.com/MilitantHitchhiker/MilitantHitchhiker-SwitchbladePack"
],
"install_type": "git-clone",
"description": "Militant Hitchhiker's Switchblade Pack is a collection of custom nodes for ComfyUI that provide various multi-function capabilities."
},
{
"author": "turkyden",
"title": "ComfyUI-Avatar",
"id": "avatar",
"reference": "https://github.com/turkyden/ComfyUI-Avatar",
"files": [
"https://github.com/turkyden/ComfyUI-Avatar"
],
"install_type": "git-clone",
"description": "a comfyui plugin for image to avatar"
},
{
"author": "fablestudio",
"title": "ComfyUI-Showrunner-Utils",
"reference": "https://github.com/fablestudio/ComfyUI-Showrunner-Utils",
"files": [
"https://github.com/fablestudio/ComfyUI-Showrunner-Utils"
],
"install_type": "git-clone",
"description": "Comfyui Custom Nodes for Showrunner"
}
]
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,710 @@
{
"models": [
{
"name": "xinsir/ControlNet++: All-in-one ControlNet",
"type": "controlnet",
"base": "SDXL",
"save_path": "controlnet/SDXL/controlnet-union-sdxl-1.0",
"description": "All-in-one ControlNet for image generations and editing!",
"reference": "https://huggingface.co/xinsir/controlnet-union-sdxl-1.0",
"filename": "diffusion_pytorch_model.safetensors",
"url": "https://huggingface.co/xinsir/controlnet-union-sdxl-1.0/resolve/main/diffusion_pytorch_model.safetensors",
"size": "2.50GB"
},
{
"name": "InstantX/SD3-Controlnet-Canny",
"type": "controlnet",
"base": "SD3",
"save_path": "controlnet/SD3/InstantX-Controlnet-Canny",
"description": "Controlnet SD3 Canny model.",
"reference": "https://huggingface.co/InstantX/SD3-Controlnet-Canny",
"filename": "diffusion_pytorch_model.safetensors",
"url": "https://huggingface.co/InstantX/SD3-Controlnet-Canny/resolve/main/diffusion_pytorch_model.safetensors",
"size": "1.19GB"
},
{
"name": "InstantX/SD3-Controlnet-Pose",
"type": "controlnet",
"base": "SD3",
"save_path": "controlnet/SD3/InstantX-Controlnet-Pose",
"description": "Controlnet SD3 Pose model.",
"reference": "https://huggingface.co/InstantX/SD3-Controlnet-Pose",
"filename": "diffusion_pytorch_model.safetensors",
"url": "https://huggingface.co/InstantX/SD3-Controlnet-Pose/resolve/main/diffusion_pytorch_model.safetensors",
"size": "1.19GB"
},
{
"name": "InstantX/SD3-Controlnet-Tile",
"type": "controlnet",
"base": "SD3",
"save_path": "controlnet/SD3/InstantX-Controlnet-Tile",
"description": "Controlnet SD3 Tile model.",
"reference": "https://huggingface.co/InstantX/SD3-Controlnet-Tile",
"filename": "diffusion_pytorch_model.safetensors",
"url": "https://huggingface.co/InstantX/SD3-Controlnet-Tile/resolve/main/diffusion_pytorch_model.safetensors",
"size": "1.19GB"
},
{
"name": "xinsir/ControlNet Depth SDXL, support zoe, midias",
"type": "controlnet",
"base": "SDXL",
"save_path": "controlnet/SDXL/controlnet-depth-sdxl-1.0",
"description": "Controlnet SDXL Depth model.",
"reference": "https://huggingface.co/xinsir/controlnet-depth-sdxl-1.0",
"filename": "diffusion_pytorch_model.safetensors",
"url": "https://huggingface.co/xinsir/controlnet-depth-sdxl-1.0/resolve/main/diffusion_pytorch_model.safetensors",
"size": "2.50GB"
},
{
"name": "xinsir/ControlNet Tile SDXL",
"type": "controlnet",
"base": "SDXL",
"save_path": "controlnet/SDXL/controlnet-tile-sdxl-1.0",
"description": "Controlnet SDXL Tile model.",
"reference": "https://huggingface.co/xinsir/controlnet-tile-sdxl-1.0",
"filename": "diffusion_pytorch_model.safetensors",
"url": "https://huggingface.co/xinsir/controlnet-tile-sdxl-1.0/resolve/main/diffusion_pytorch_model.safetensors",
"size": "2.50GB"
},
{
"name": "google-t5/t5-base",
"type": "clip",
"base": "t5-base",
"save_path": "clip/t5-base",
"description": "T5 Base: Text-To-Text Transfer Transformer. This model can be loaded via CLIPLoader for Stable Audio workflow.",
"reference": "https://huggingface.co/google-t5/t5-base",
"filename": "model.safetensors",
"url": "https://huggingface.co/google-t5/t5-base/resolve/main/model.safetensors",
"size": "892MB"
},
{
"name": "PixArt-Sigma-XL-2-1024-MS.pth",
"type": "checkpoint",
"base": "pixart-sigma",
"save_path": "checkpoints/PixArt-Sigma",
"description": "PixArt-Sigma Checkpoint model",
"reference": "https://huggingface.co/PixArt-alpha/PixArt-Sigma/tree/main",
"filename": "PixArt-Sigma-XL-2-1024-MS.pth",
"url": "https://huggingface.co/PixArt-alpha/PixArt-Sigma/resolve/main/PixArt-Sigma-XL-2-1024-MS.pth",
"size": "2.47GB"
},
{
"name": "TAESD3 Decoder",
"type": "TAESD",
"base": "SDXL",
"save_path": "vae_approx",
"description": "(SD3 Verison) To view the preview in high quality while running samples in ComfyUI, you will need this model.",
"reference": "https://github.com/madebyollin/taesd",
"filename": "taesd3_decoder.pth",
"url": "https://github.com/madebyollin/taesd/raw/main/taesd3_decoder.pth",
"size": "4.94MB"
},
{
"name": "TAESD3 Encoder",
"type": "TAESD",
"base": "SDXL",
"save_path": "vae_approx",
"description": "(SD3 Verison) To view the preview in high quality while running samples in ComfyUI, you will need this model.",
"reference": "https://github.com/madebyollin/taesd",
"filename": "taesd3_encoder.pth",
"url": "https://github.com/madebyollin/taesd/raw/main/taesd3_encoder.pth",
"size": "4.94MB"
},
{
"name": "TTPlanet/TTPLanet_SDXL_Controlnet_Tile_Realistic v2 (rank256)",
"type": "controlnet",
"base": "SDXL",
"save_path": "controlnet/SDXL",
"description": "Controlnet SDXL Tile model realistic version.",
"reference": "https://huggingface.co/TTPlanet/TTPLanet_SDXL_Controlnet_Tile_Realistic",
"filename": "TTPLANET_Controlnet_Tile_realistic_v2_rank256.safetensors",
"url": "https://huggingface.co/TTPlanet/TTPLanet_SDXL_Controlnet_Tile_Realistic/resolve/main/TTPLANET_Controlnet_Tile_realistic_v2_rank256.safetensors",
"size": "774.4MB"
},
{
"name": "kijai/DepthAnythingV2 (vitb/fp16)",
"type": "depthanything",
"base": "depthanything",
"save_path": "depthanything",
"description": "DepthAnythingV2 model",
"reference": "https://huggingface.co/Kijai/DepthAnythingV2-safetensors/tree/main",
"filename": "depth_anything_v2_vitb_fp16.safetensors",
"url": "https://huggingface.co/Kijai/DepthAnythingV2-safetensors/resolve/main/depth_anything_v2_vitb_fp16.safetensors",
"size": "195.0MB"
},
{
"name": "kijai/DepthAnythingV2 (vitb/fp32)",
"type": "depthanything",
"base": "depthanything",
"save_path": "depthanything",
"description": "DepthAnythingV2 model",
"reference": "https://huggingface.co/Kijai/DepthAnythingV2-safetensors/tree/main",
"filename": "depth_anything_v2_vitb_fp32.safetensors",
"url": "https://huggingface.co/Kijai/DepthAnythingV2-safetensors/resolve/main/depth_anything_v2_vitb_fp32.safetensors",
"size": "389.9MB"
},
{
"name": "kijai/DepthAnythingV2 (vitl/fp16)",
"type": "depthanything",
"base": "depthanything",
"save_path": "depthanything",
"description": "[671MB] DepthAnythingV2 model",
"reference": "https://huggingface.co/Kijai/DepthAnythingV2-safetensors/tree/main",
"filename": "depth_anything_v2_vitl_fp16.safetensors",
"url": "https://huggingface.co/Kijai/DepthAnythingV2-safetensors/resolve/main/depth_anything_v2_vitl_fp16.safetensors",
"size": "670.7MB"
},
{
"name": "kijai/DepthAnythingV2 (vitl/fp32)",
"type": "depthanything",
"base": "depthanything",
"save_path": "depthanything",
"description": "[195MB] DepthAnythingV2 model",
"reference": "https://huggingface.co/Kijai/DepthAnythingV2-safetensors/tree/main",
"filename": "depth_anything_v2_vitl_fp32.safetensors",
"url": "https://huggingface.co/Kijai/DepthAnythingV2-safetensors/resolve/main/depth_anything_v2_vitl_fp32.safetensors",
"size": "1.34GB"
},
{
"name": "kijai/DepthAnythingV2 (vits/fp16)",
"type": "depthanything",
"base": "depthanything",
"save_path": "depthanything",
"description": "[49.6MB] DepthAnythingV2 model",
"reference": "https://huggingface.co/Kijai/DepthAnythingV2-safetensors/tree/main",
"filename": "depth_anything_v2_vits_fp16.safetensors",
"url": "https://huggingface.co/Kijai/DepthAnythingV2-safetensors/resolve/main/depth_anything_v2_vits_fp16.safetensors",
"size": "49.6MB"
},
{
"name": "kijai/DepthAnythingV2 (vitb/fp32)",
"type": "depthanything",
"base": "depthanything",
"save_path": "depthanything",
"description": "[99.2MB] DepthAnythingV2 model",
"reference": "https://huggingface.co/Kijai/DepthAnythingV2-safetensors/tree/main",
"filename": "depth_anything_v2_vits_fp32.safetensors",
"url": "https://huggingface.co/Kijai/DepthAnythingV2-safetensors/resolve/main/depth_anything_v2_vits_fp32.safetensors",
"size": "99.2MB"
},
{
"name": "CN-anytest_v4-marged.safetensors",
"type": "controlnet",
"base": "SDXL",
"save_path": "controlnet/SDXL",
"description": "[2.5GB] AnyTest Controlnet. A model for style transfer.",
"reference": "https://huggingface.co/2vXpSwA7/iroiro-lora/tree/main",
"filename": "CN-anytest_v4-marged.safetensors",
"url": "https://huggingface.co/2vXpSwA7/iroiro-lora/resolve/main/test_controlnet2/CN-anytest_v4-marged.safetensors",
"size": "2.50GB"
},
{
"name": "CN-anytest_v4-marged_am_dim256.safetensors (dim256/Animagine)",
"type": "controlnet",
"base": "SDXL",
"save_path": "controlnet/SDXL",
"description": "[774MB] AnyTest Controlnet Lora (dim256) for Animagine. A model for style transfer.",
"reference": "https://huggingface.co/2vXpSwA7/iroiro-lora/tree/main",
"filename": "CN-anytest_v4-marged_am_dim256.safetensors",
"url": "https://huggingface.co/2vXpSwA7/iroiro-lora/resolve/main/test_controlnet2/CN-anytest_v4-marged_am_dim256.safetensors",
"size": "774.4MB"
},
{
"name": "CN-anytest_v4-marged_am_dim128.safetensors (dim128/Animagine)",
"type": "controlnet",
"base": "SDXL",
"save_path": "controlnet/SDXL",
"description": "[396MB] AnyTest Controlnet Lora (dim128) for Animagine. A model for style transfer.",
"reference": "https://huggingface.co/2vXpSwA7/iroiro-lora/tree/main",
"filename": "CN-anytest_v4-marged_am_dim128.safetensors",
"url": "https://huggingface.co/2vXpSwA7/iroiro-lora/resolve/main/test_controlnet2/CN-anytest_v4-marged_am_dim128.safetensors",
"size": "395.7MB"
},
{
"name": "CN-anytest_v4-marged_pn_dim256.safetensors (dim256/Pony)",
"type": "controlnet",
"base": "SDXL",
"save_path": "controlnet/SDXL",
"description": "[774MB] AnyTest Controlnet Lora (dim256) for Pony. A model for style transfer.",
"reference": "https://huggingface.co/2vXpSwA7/iroiro-lora/tree/main",
"filename": "CN-anytest_v4-marged_pn_dim256.safetensors",
"url": "https://huggingface.co/2vXpSwA7/iroiro-lora/resolve/main/test_controlnet2/CN-anytest_v4-marged_pn_dim256.safetensors",
"size": "774.4MB"
},
{
"name": "CN-anytest_v4-marged_pn_dim128.safetensors (dim128/Pony)",
"type": "controlnet",
"base": "SDXL",
"save_path": "controlnet/SDXL",
"description": "[396MB] AnyTest Controlnet Lora (dim128) for Pony. A model for style transfer.",
"reference": "https://huggingface.co/2vXpSwA7/iroiro-lora/tree/main",
"filename": "CN-anytest_v4-marged_pn_dim128.safetensors",
"url": "https://huggingface.co/2vXpSwA7/iroiro-lora/resolve/main/test_controlnet2/CN-anytest_v4-marged_pn_dim128.safetensors",
"size": "395.7MB"
},
{
"name": "CN-anytest_v3-50000_fp16.safetensors (fp16)",
"type": "controlnet",
"base": "SDXL",
"save_path": "controlnet/SDXL",
"description": "[2.5GB] AnyTest Controlnet. A strict control model.",
"reference": "https://huggingface.co/2vXpSwA7/iroiro-lora/tree/main",
"filename": "CN-anytest_v3-50000_fp16.safetensors",
"url": "https://huggingface.co/2vXpSwA7/iroiro-lora/resolve/main/test_controlnet2/CN-anytest_v3-50000_fp16.safetensors",
"size": "2.50GB"
},
{
"name": "CN-anytest_v3-50000_am_dim256.safetensors (dim256/Animagine)",
"type": "controlnet",
"base": "SDXL",
"save_path": "controlnet/SDXL",
"description": "[774MB] AnyTest Controlnet Lora (dim256) for Animagine. A strict control model.",
"reference": "https://huggingface.co/2vXpSwA7/iroiro-lora/tree/main",
"filename": "CN-anytest_v3-50000_am_dim256.safetensors",
"url": "https://huggingface.co/2vXpSwA7/iroiro-lora/resolve/main/test_controlnet2/CN-anytest_v3-50000_am_dim256.safetensors",
"size": "774.4MB"
},
{
"name": "CN-anytest_v3-50000_am_dim128.safetensors (dim128/Animagine)",
"type": "controlnet",
"base": "SDXL",
"save_path": "controlnet/SDXL",
"description": "[396MB] AnyTest Controlnet Lora (dim128) for Animagine. A strict control model.",
"reference": "https://huggingface.co/2vXpSwA7/iroiro-lora/tree/main",
"filename": "CN-anytest_v3-50000_am_dim128.safetensors",
"url": "https://huggingface.co/2vXpSwA7/iroiro-lora/resolve/main/test_controlnet2/CN-anytest_v3-50000_am_dim128.safetensors",
"size": "395.7MB"
},
{
"name": "CN-anytest_v3-50000_pn_dim256.safetensors (dim256/Pony)",
"type": "controlnet",
"base": "SDXL",
"save_path": "controlnet/SDXL",
"description": "[774MB] AnyTest Controlnet Lora (dim256) for Pony. A strict control model.",
"reference": "https://huggingface.co/2vXpSwA7/iroiro-lora/tree/main",
"filename": "CN-anytest_v3-50000_pn_dim256.safetensors",
"url": "https://huggingface.co/2vXpSwA7/iroiro-lora/resolve/main/test_controlnet2/CN-anytest_v3-50000_pn_dim256.safetensors",
"size": "774.4MB"
},
{
"name": "CN-anytest_v3-50000_pn_dim128.safetensors (dim128/Pony)",
"type": "controlnet",
"base": "SDXL",
"save_path": "controlnet/SDXL",
"description": "[396MB] AnyTest Controlnet Lora (dim128) for Pony. A strict control model.",
"reference": "https://huggingface.co/2vXpSwA7/iroiro-lora/tree/main",
"filename": "CN-anytest_v3-50000_pn_dim128.safetensors",
"url": "https://huggingface.co/2vXpSwA7/iroiro-lora/resolve/main/test_controlnet2/CN-anytest_v3-50000_pn_dim128.safetensors",
"size": "395.7MB"
},
{
"name": "Kijai/ToonCrafter model checkpoint (interpolation fp16)",
"type": "checkpoint",
"base": "ToonCrafter",
"save_path": "checkpoints/ToonCrafter",
"description": "[5.25GB] ToonCrafter checkpoint model for ComfyUI-DynamiCrafterWrapper",
"reference": "https://huggingface.co/Kijai/DynamiCrafter_pruned",
"filename": "tooncrafter_512_interp-fp16.safetensors",
"url": "https://huggingface.co/Kijai/DynamiCrafter_pruned/resolve/main/tooncrafter_512_interp-fp16.safetensors",
"size": "5.25GB"
},
{
"name": "xinsir/Controlnet-Scribble-Sdxl-1.0",
"type": "controlnet",
"base": "SDXL",
"save_path": "controlnet/SDXL/controlnet-scribble-sdxl-1.0",
"description": "[2.5GB] Controlnet SDXL Scribble model.",
"reference": "https://huggingface.co/xinsir/controlnet-scribble-sdxl-1.0",
"filename": "diffusion_pytorch_model.safetensors",
"url": "https://huggingface.co/xinsir/controlnet-scribble-sdxl-1.0/resolve/main/diffusion_pytorch_model.safetensors",
"size": "2.50GB"
},
{
"name": "xinsir/Controlnet-Canny-Sdxl-1.0 (V2)",
"type": "controlnet",
"base": "SDXL",
"save_path": "controlnet/SDXL/controlnet-canny-sdxl-1.0",
"description": "[2.5GB] Controlnet SDXL Canny model.",
"reference": "https://huggingface.co/xinsir/controlnet-canny-sdxl-1.0",
"filename": "diffusion_pytorch_model_V2.safetensors",
"url": "https://huggingface.co/xinsir/controlnet-canny-sdxl-1.0/resolve/main/diffusion_pytorch_model_V2.safetensors",
"size": "2.50GB"
},
{
"name": "xinsir/Controlnet-Openpose-Sdxl-1.0",
"type": "controlnet",
"base": "SDXL",
"save_path": "controlnet/SDXL/controlnet-openpose-sdxl-1.0",
"description": "[2.5GB] Controlnet SDXL Openpose model.",
"reference": "https://huggingface.co/xinsir/controlnet-openpose-sdxl-1.0",
"filename": "diffusion_pytorch_model.safetensors",
"url": "https://huggingface.co/xinsir/controlnet-openpose-sdxl-1.0/resolve/main/diffusion_pytorch_model.safetensors",
"size": "2.50GB"
},
{
"name": "xinsir/Controlnet-Openpose-Sdxl-1.0 (Ver. twins)",
"type": "controlnet",
"base": "SDXL",
"save_path": "controlnet/SDXL/controlnet-openpose-sdxl-1.0",
"description": "[2.5GB] Controlnet SDXL Openpose model. (Ver. twins)",
"reference": "https://huggingface.co/xinsir/controlnet-openpose-sdxl-1.0",
"filename": "diffusion_pytorch_model_twins.safetensors",
"url": "https://huggingface.co/xinsir/controlnet-openpose-sdxl-1.0/resolve/main/diffusion_pytorch_model_twins.safetensors",
"size": "2.50GB"
},
{
"name": "xinsir/Controlnet-Scribble-Sdxl-1.0-Anime",
"type": "controlnet",
"base": "SDXL",
"save_path": "controlnet/SDXL/controlnet-scribble-sdxl-1.0-anime",
"description": "[2.5GB] Controlnet SDXL Scribble model. (Ver. anime)",
"reference": "https://huggingface.co/xinsir/anime-painter",
"filename": "diffusion_pytorch_model.safetensors",
"url": "https://huggingface.co/xinsir/anime-painter/resolve/main/diffusion_pytorch_model.safetensors",
"size": "2.50GB"
},
{
"name": "Doubiiu/ToonCrafter model checkpoint",
"type": "checkpoint",
"base": "ToonCrafter",
"save_path": "custom_nodes/ComfyUI-ToonCrafter/ToonCrafter/checkpoints/tooncrafter_512_interp_v1",
"description": "[10.5GB] ToonCrafter checkpoint model for ComfyUI-ToonCrafter",
"reference": "https://huggingface.co/Doubiiu/ToonCrafter/tree/main",
"filename": "model.ckpt",
"url": "https://huggingface.co/Doubiiu/ToonCrafter/resolve/main/model.ckpt",
"size": "10.5GB"
},
{
"name": "ViperYX/RGT_x2.pth",
"type": "RGT",
"base": "RGT",
"save_path": "RGT/RGT",
"description": "[180MB] RGT x2 upscale model for ComfyUI-RGT",
"reference": "https://huggingface.co/ViperYX/RGT/tree/main",
"filename": "RGT_x2.pth",
"url": "https://huggingface.co/ViperYX/RGT/resolve/main/RGT/RGT_x2.pth",
"size": "179.8MB"
},
{
"name": "ViperYX/RGT_x3.pth",
"type": "RGT",
"base": "RGT",
"save_path": "RGT/RGT",
"description": "[180MB] RGT x3 upscale model for ComfyUI-RGT",
"reference": "https://huggingface.co/ViperYX/RGT/tree/main",
"filename": "RGT_x3.pth",
"url": "https://huggingface.co/ViperYX/RGT/resolve/main/RGT/RGT_x3.pth",
"size": "180.5MB"
},
{
"name": "ViperYX/RGT_x4.pth",
"type": "RGT",
"base": "RGT",
"save_path": "RGT/RGT",
"description": "[180MB] RGT_S x4 upscale model for ComfyUI-RGT",
"reference": "https://huggingface.co/ViperYX/RGT/tree/main",
"filename": "RGT_x4.pth",
"url": "https://huggingface.co/ViperYX/RGT/resolve/main/RGT/RGT_x4.pth",
"size": "180.4MB"
},
{
"name": "ViperYX/RGT_S_x2.pth",
"type": "RGT",
"base": "RGT",
"save_path": "RGT/RGT_S",
"description": "[135MB] RGT_S x2 upscale model for ComfyUI-RGT",
"reference": "https://huggingface.co/ViperYX/RGT/tree/main",
"filename": "RGT_S_x2.pth",
"url": "https://huggingface.co/ViperYX/RGT/resolve/main/RGT_S/RGT_S_x2.pth",
"size": "135.4MB"
},
{
"name": "ViperYX/RGT_S_x3.pth",
"type": "RGT",
"base": "RGT",
"save_path": "RGT/RGT_S",
"description": "[136MB] RGT_S x3 upscale model for ComfyUI-RGT",
"reference": "https://huggingface.co/ViperYX/RGT/tree/main",
"filename": "RGT_S_x3.pth",
"url": "https://huggingface.co/ViperYX/RGT/resolve/main/RGT_S/RGT_S_x3.pth",
"size": "136.1MB"
},
{
"name": "ViperYX/RGT_S_x4.pth",
"type": "RGT",
"base": "RGT",
"save_path": "RGT/RGT_S",
"description": "[136MB] RGT_S x4 upscale model for ComfyUI-RGT",
"reference": "https://huggingface.co/ViperYX/RGT/tree/main",
"filename": "RGT_S_x4.pth",
"url": "https://huggingface.co/ViperYX/RGT/resolve/main/RGT_S/RGT_S_x4.pth",
"size": "136.0MB"
},
{
"name": "TTPlanet/TTPLanet_SDXL_Controlnet_Tile_Realistic v2 (fp16)",
"type": "controlnet",
"base": "SDXL",
"save_path": "controlnet/SDXL",
"description": "[2.5GB] Controlnet SDXL Tile model realistic version.",
"reference": "https://huggingface.co/TTPlanet/TTPLanet_SDXL_Controlnet_Tile_Realistic",
"filename": "TTPLANET_Controlnet_Tile_realistic_v2_fp16.safetensors",
"url": "https://huggingface.co/TTPlanet/TTPLanet_SDXL_Controlnet_Tile_Realistic/resolve/main/TTPLANET_Controlnet_Tile_realistic_v2_fp16.safetensors",
"size": "2.50GB"
},
{
"name": "TencentARC/CustomNet",
"type": "CustomNet",
"base": "CustomNet",
"save_path": "custom_nodes/ComfyUI_CustomNet/pretrain",
"description": "CustomNet pretrained model for ComfyUI_CustomNet",
"reference": "https://huggingface.co/TencentARC/CustomNet/tree/main",
"filename": "customnet_v1.pt",
"url": "https://huggingface.co/TencentARC/CustomNet/resolve/main/customnet_v1.pt",
"size": "5.71GB"
},
{
"name": "ID-Animator/animator.ckpt",
"type": "ID-Animator",
"base": "SD1.5",
"save_path": "custom_nodes/ComfyUI_ID_Animator/models",
"description": "ID-Animator checkpoint",
"reference": "https://huggingface.co/spaces/ID-Animator/ID-Animator",
"filename": "animator.ckpt",
"url": "https://huggingface.co/spaces/ID-Animator/ID-Animator/resolve/main/animator.ckpt",
"size": "247.3MB"
},
{
"name": "ID-Animator/mm_sd_v15_v2.ckpt",
"type": "ID-Animator",
"base": "SD1.5",
"save_path": "custom_nodes/ComfyUI_ID_Animator/models/animatediff_models",
"description": "AnimateDiff checkpoint for ID-Animator",
"reference": "https://huggingface.co/spaces/ID-Animator/ID-Animator",
"filename": "mm_sd_v15_v2.ckpt",
"url": "https://huggingface.co/spaces/ID-Animator/ID-Animator/resolve/main/mm_sd_v15_v2.ckpt",
"size": "1.82GB"
},
{
"name": "ID-Animator/image_encoder",
"type": "ID-Animator",
"base": "SD1.5",
"save_path": "custom_nodes/ComfyUI_ID_Animator/models/image_encoder",
"description": "CLIP Image encoder for ID-Animator",
"reference": "https://huggingface.co/spaces/ID-Animator/ID-Animator",
"filename": "model.safetensors",
"url": "https://huggingface.co/spaces/ID-Animator/ID-Animator/resolve/main/image_encoder/model.safetensors",
"size": "2.53GB"
},
{
"name": "IC-Light/fc",
"type": "IC-Light",
"base": "SD1.5",
"save_path": "unet/IC-Light",
"description": "The default relighting model, conditioned on text and foreground",
"reference": "https://huggingface.co/lllyasviel/ic-light",
"filename": "iclight_sd15_fc.safetensors",
"url": "https://huggingface.co/lllyasviel/ic-light/resolve/main/iclight_sd15_fc.safetensors",
"size": "1.72GB"
},
{
"name": "IC-Light/fbc",
"type": "IC-Light",
"base": "SD1.5",
"save_path": "unet/IC-Light",
"description": "Relighting model conditioned with text, foreground, and background",
"reference": "https://huggingface.co/lllyasviel/ic-light",
"filename": "iclight_sd15_fbc.safetensors",
"url": "https://huggingface.co/lllyasviel/ic-light/resolve/main/iclight_sd15_fbc.safetensors",
"size": "1.72GB"
},
{
"name": "IC-Light/fcon",
"type": "IC-Light",
"base": "SD1.5",
"save_path": "unet/IC-Light",
"description": "Same as iclight_sd15_fc.safetensors, but trained with offset noise",
"reference": "https://huggingface.co/lllyasviel/ic-light",
"filename": "iclight_sd15_fcon.safetensors",
"url": "https://huggingface.co/lllyasviel/ic-light/resolve/main/iclight_sd15_fcon.safetensors",
"size": "1.72GB"
},
{
"name": "MonsterMMORPG/insightface (for InstantID)",
"type": "insightface",
"base": "SDXL",
"save_path": "insightface/models",
"description": "MonsterMMORPG insightface model for cubiq/InstantID",
"reference": "https://huggingface.co/MonsterMMORPG/tools/tree/main",
"filename": "antelopev2.zip",
"url": "https://huggingface.co/MonsterMMORPG/tools/resolve/main/antelopev2.zip",
"size": "360.7MB"
},
{
"name": "InstantID/ip-adapter",
"type": "instantid",
"base": "SDXL",
"save_path": "instantid/SDXL",
"description": "ip-adapter model for cubiq/InstantID",
"reference": "https://huggingface.co/InstantX/InstantID",
"filename": "ip-adapter.bin",
"url": "https://huggingface.co/InstantX/InstantID/resolve/main/ip-adapter.bin"
},
{
"name": "InstantID/ControlNet",
"type": "controlnet",
"base": "SDXL",
"save_path": "controlnet/SDXL/instantid",
"description": "instantid controlnet model for cubiq/InstantID",
"reference": "https://huggingface.co/InstantX/InstantID",
"filename": "diffusion_pytorch_model.safetensors",
"url": "https://huggingface.co/InstantX/InstantID/resolve/main/ControlNetModel/diffusion_pytorch_model.safetensors"
},
{
"name": "ip_plus_composition_sd15.safetensors",
"type": "IP-Adapter",
"base": "SD1.5",
"save_path": "ipadapter",
"description": "You can use this model in the [a/ComfyUI IPAdapter plus](https://github.com/cubiq/ComfyUI_IPAdapter_plus) extension.",
"reference": "https://huggingface.co/ostris/ip-composition-adapter",
"filename": "ip_plus_composition_sd15.safetensors",
"url": "https://huggingface.co/ostris/ip-composition-adapter/resolve/main/ip_plus_composition_sd15.safetensors"
},
{
"name": "ip_plus_composition_sdxl.safetensors",
"type": "IP-Adapter",
"base": "SDXL",
"save_path": "ipadapter",
"description": "You can use this model in the [a/ComfyUI IPAdapter plus](https://github.com/cubiq/ComfyUI_IPAdapter_plus) extension.",
"reference": "https://huggingface.co/ostris/ip-composition-adapter",
"filename": "ip_plus_composition_sdxl.safetensors",
"url": "https://huggingface.co/ostris/ip-composition-adapter/resolve/main/ip_plus_composition_sdxl.safetensors"
},
{
"name": "ip-adapter-faceid-portrait-v11_sd15.bin",
"type": "IP-Adapter",
"base": "SD1.5",
"save_path": "ipadapter",
"description": "IP-Adapter-FaceID Portrait V11 Model (SD1.5) [ipadapter]",
"reference": "https://huggingface.co/h94/IP-Adapter-FaceID",
"filename": "ip-adapter-faceid-portrait-v11_sd15.bin",
"url": "https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-portrait-v11_sd15.bin"
},
{
"name": "ip-adapter-faceid-portrait_sdxl.bin",
"type": "IP-Adapter",
"base": "SDXL",
"save_path": "ipadapter",
"description": "IP-Adapter-FaceID Portrait Model (SDXL) [ipadapter]",
"reference": "https://huggingface.co/h94/IP-Adapter-FaceID",
"filename": "ip-adapter-faceid-portrait_sdxl.bin",
"url": "https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-portrait_sdxl.bin"
},
{
"name": "ip-adapter-faceid-portrait_sdxl_unnorm.bin",
"type": "IP-Adapter",
"base": "SDXL",
"save_path": "ipadapter",
"description": "IP-Adapter-FaceID Portrait Model (SDXL/unnorm) [ipadapter]",
"reference": "https://huggingface.co/h94/IP-Adapter-FaceID",
"filename": "ip-adapter-faceid-portrait_sdxl_unnorm.bin",
"url": "https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-portrait_sdxl_unnorm.bin"
},
{
"name": "ip-adapter_sd15_light_v11.bin",
"type": "IP-Adapter",
"base": "SD1.5",
"save_path": "ipadapter",
"description": "You can use this model in the [a/ComfyUI IPAdapter plus](https://github.com/cubiq/ComfyUI_IPAdapter_plus) extension.",
"reference": "https://huggingface.co/h94/IP-Adapter",
"filename": "ip-adapter_sd15_light_v11.bin",
"url": "https://huggingface.co/h94/IP-Adapter/resolve/main/models/ip-adapter_sd15_light_v11.bin"
},
{
"name": "Kijai/SUPIR-v0F_fp16.safetensors (pruned)",
"type": "checkpoints",
"base": "SUPIR",
"save_path": "checkpoints/SUPIR",
"description": "SUPIR checkpoint model",
"reference": "https://huggingface.co/Kijai/SUPIR_pruned/tree/main",
"filename": "SUPIR-v0F_fp16.safetensors",
"url": "https://huggingface.co/Kijai/SUPIR_pruned/resolve/main/SUPIR-v0F_fp16.safetensors"
},
{
"name": "Kijai/SUPIR-v0Q_fp16.safetensors (pruned)",
"type": "checkpoints",
"base": "SUPIR",
"save_path": "checkpoints/SUPIR",
"description": "SUPIR checkpoint model",
"reference": "https://huggingface.co/Kijai/SUPIR_pruned/tree/main",
"filename": "SUPIR-v0Q_fp16.safetensors",
"url": "https://huggingface.co/Kijai/SUPIR_pruned/resolve/main/SUPIR-v0Q_fp16.safetensors"
},
{
"name": "SUPIR-v0F.ckpt",
"type": "checkpoints",
"base": "SUPIR",
"save_path": "checkpoints/SUPIR",
"description": "SUPIR checkpoint model",
"reference": "https://huggingface.co/camenduru/SUPIR/tree/main",
"filename": "SUPIR-v0F.ckpt",
"url": "https://huggingface.co/camenduru/SUPIR/resolve/main/SUPIR-v0F.ckpt"
},
{
"name": "SUPIR-v0Q.ckpt",
"type": "checkpoints",
"base": "SUPIR",
"save_path": "checkpoints/SUPIR",
"description": "SUPIR checkpoint model",
"reference": "https://huggingface.co/camenduru/SUPIR/tree/main",
"filename": "SUPIR-v0Q.ckpt",
"url": "https://huggingface.co/camenduru/SUPIR/resolve/main/SUPIR-v0Q.ckpt"
},{
"name": "Depth-FM-v1 fp16 safetensors",
"type": "checkpoints",
"base": "Depth-FM",
"save_path": "checkpoints/depthfm",
"description": "Depth-FM monocular depth estimation model",
"reference": "https://huggingface.co/Kijai/depth-fm-pruned",
"filename": "depthfm-v1_fp16.safetensors",
"url": "https://huggingface.co/Kijai/depth-fm-pruned/resolve/main/depthfm-v1_fp16.safetensors"
},
{
"name": "Depth-FM-v1 fp32 safetensors",
"type": "checkpoints",
"base": "Depth-FM",
"save_path": "checkpoints/depthfm",
"description": "Depth-FM monocular depth estimation model",
"reference": "https://huggingface.co/Kijai/depth-fm-pruned",
"filename": "depthfm-v1_fp32.safetensors",
"url": "https://huggingface.co/Kijai/depth-fm-pruned/resolve/main/depthfm-v1_fp32.safetensors"
},
{
"name": "monster-labs - Controlnet QR Code Monster v1 For SDXL",
"type": "controlnet",
"base": "SDXL",
"save_path": "default",
"description": "monster-labs - Controlnet QR Code Monster v1 For SDXL",
"reference": "https://huggingface.co/monster-labs/control_v1p_sdxl_qrcode_monster",
"filename": "control_v1p_sdxl_qrcode_monster.safetensors",
"url": "https://huggingface.co/monster-labs/control_v1p_sdxl_qrcode_monster/resolve/main/diffusion_pytorch_model.safetensors"
}
]
}

View File

@ -0,0 +1,244 @@
{
"custom_nodes": [
{
"author": "Suzie1",
"title": "Guide To Making Custom Nodes in ComfyUI",
"reference": "https://github.com/Suzie1/ComfyUI_Guide_To_Making_Custom_Nodes",
"files": [
"https://github.com/Suzie1/ComfyUI_Guide_To_Making_Custom_Nodes"
],
"install_type": "git-clone",
"description": "There is a small node pack attached to this guide. This includes the init file and 3 nodes associated with the tutorials."
},
{
"author": "bamboodia",
"title": "BAM Nodes",
"reference": "https://github.com/bamboodia/BAM_Nodes",
"files": [
"https://github.com/bamboodia/BAM_Nodes"
],
"install_type": "git-clone",
"description": "A collection of comfyui nodes that I have made for nothing more than educational purposes."
},
{
"author": "BadCafeCode",
"title": "execution-inversion-demo-comfyui",
"reference": "https://github.com/BadCafeCode/execution-inversion-demo-comfyui",
"files": [
"https://github.com/BadCafeCode/execution-inversion-demo-comfyui"
],
"install_type": "git-clone",
"description": "These are demo nodes for [a/PR2666](https://github.com/comfyanonymous/ComfyUI/pull/2666)"
},
{
"author": "ecjojo",
"title": "ecjojo_example_nodes",
"reference": "https://github.com/ecjojo/ecjojo-example-nodes",
"files": [
"https://github.com/ecjojo/ecjojo-example-nodes"
],
"install_type": "git-clone",
"description": "Welcome to ecjojo_example_nodes! This example is specifically designed for beginners who want to learn how to write a simple custom node.\nFeel free to modify this example and make it your own. Experiment with different features and functionalities to enhance your understanding of ComfyUI custom nodes. Don't be afraid to explore and customize the code to suit your needs.\nBy diving into this example and making it your own, you'll gain valuable hands-on experience in creating custom nodes in ComfyUI. Enjoy the process of learning and have fun with your custom node development journey!"
},
{
"author": "dynamixar",
"title": "Atluris",
"reference": "https://github.com/dynamixar/Atluris",
"files": [
"https://github.com/dynamixar/Atluris"
],
"install_type": "git-clone",
"description": "Nodes:Random Line"
},
{
"author": "et118",
"title": "ComfyUI-ElGogh-Nodes",
"reference": "https://github.com/et118/ComfyUI-ElGogh-Nodes",
"files": [
"https://github.com/et118/ComfyUI-ElGogh-Nodes"
],
"install_type": "git-clone",
"description": "Nodes:ElGogh Positive Prompt, ElGogh NEGATIVE Prompt, ElGogh Empty Latent Image, ElGogh Checkpoint Loader Simple"
},
{
"author": "LarryJane491",
"title": "Custom-Node-Base",
"reference": "https://github.com/LarryJane491/Custom-Node-Base",
"files": [
"https://github.com/LarryJane491/Custom-Node-Base"
],
"install_type": "git-clone",
"description": "This project is an `empty` custom node that is already in its own folder. It serves as a base to build any custom node. Whenever you want to create a custom node, you can download that, put it in custom_nodes, then you just have to change the names and fill it with code!"
},
{
"author": "foxtrot-roger",
"title": "comfyui-custom-nodes",
"reference": "https://github.com/foxtrot-roger/comfyui-custom-nodes",
"files": [
"https://github.com/foxtrot-roger/comfyui-custom-nodes"
],
"install_type": "git-clone",
"description": "Tutorial nodes"
},
{
"author": "wailovet",
"title": "ComfyUI-WW",
"reference": "https://github.com/wailovet/ComfyUI-WW",
"files": [
"https://github.com/wailovet/ComfyUI-WW"
],
"install_type": "git-clone",
"description": "Nodes:WW_ImageResize"
},
{
"author": "bmz55",
"title": "bmz nodes",
"reference": "https://github.com/bmz55/comfyui-bmz-nodes",
"files": [
"https://github.com/bmz55/comfyui-bmz-nodes"
],
"install_type": "git-clone",
"description": "Nodes:Load Images From Dir With Name (Inspire - BMZ), Count Images In Dir (BMZ), Get Level Text (BMZ), Get Level Float (BMZ)"
},
{
"author": "azure-dragon-ai",
"title": "ComfyUI-HPSv2-Nodes",
"reference": "https://github.com/azure-dragon-ai/ComfyUI-HPSv2-Nodes",
"files": [
"https://github.com/azure-dragon-ai/ComfyUI-HPSv2-Nodes"
],
"install_type": "git-clone",
"description": "Nodes:Loader, Image Processor, Text Processor, ImageScore"
},
{
"author": "kappa54m",
"title": "ComfyUI-HPSv2-Nodes",
"reference": "https://github.com/kappa54m/ComfyUI_Usability",
"files": [
"https://github.com/kappa54m/ComfyUI_Usability"
],
"install_type": "git-clone",
"description": "Nodes:Load Image Dedup"
},
{
"author": "IvanRybakov",
"title": "comfyui-node-int-to-string-convertor",
"reference": "https://github.com/IvanRybakov/comfyui-node-int-to-string-convertor",
"files": [
"https://github.com/IvanRybakov/comfyui-node-int-to-string-convertor"
],
"install_type": "git-clone",
"description": "Nodes:Int To String Convertor"
},
{
"author": "yowipr",
"title": "ComfyUI-Manual",
"reference": "https://github.com/yowipr/ComfyUI-Manual",
"files": [
"https://github.com/yowipr/ComfyUI-Manual"
],
"install_type": "git-clone",
"description": "Nodes:M_Layer, M_Output"
},
{
"author": "andrewharp",
"title": "ComfyUI Function Annotator",
"reference": "https://github.com/andrewharp/ComfyUI-Annotations",
"files": [
"https://github.com/andrewharp/ComfyUI-Annotations"
],
"install_type": "git-clone",
"description": "This module provides an annotation @ComfyFunc to streamline adding custom node types in ComfyUI. It processes your function's signature to create a wrapped function and custom node definition required for ComfyUI, eliminating all the boilerplate code. In most cases you can just add a @ComfyFunc(\"category\") annotation to your existing function."
},
{
"author": "MokkaBoss1",
"title": "Woman_in_a_dress",
"reference": "https://github.com/MokkaBoss1/Woman_in_a_dress",
"files": [
"https://github.com/MokkaBoss1/Woman_in_a_dress/raw/main/Woman_In_A_Dress.py"
],
"install_type": "git-clone",
"description": "Nodes:Woman_in_a_dress"
},
{
"author": "shinich39",
"title": "comfyui-concat-text-39",
"reference": "https://github.com/shinich39/comfyui-concat-text-39",
"files": [
"https://github.com/shinich39/comfyui-concat-text-39"
],
"install_type": "git-clone",
"description": "Nodes:Concatenate multiple text nodes."
},
{
"author": "nilor-corp",
"title": "nilor-nodes",
"reference": "https://github.com/nilor-corp/nilor-nodes",
"files": [
"https://github.com/nilor-corp/nilor-nodes"
],
"install_type": "git-clone",
"description": "Nodes:Nilor Floats, Nilor Int To List Of Bools, Nilor Bool From List Of Bools, Nilor Int From List Of Ints, Nilor List of Ints, Nilor Count Images In Directory"
},
{
"author": "OuticNZ",
"title": "ComfyUI-Simple-Of-Complex",
"reference": "https://github.com/OuticNZ/ComfyUI-Simple-Of-Complex",
"files": [
"https://github.com/OuticNZ/ComfyUI-Simple-Of-Complex"
],
"install_type": "git-clone",
"description": "Keeping it simple for starting. Single branch for now and will add development branch later."
},
{
"author": "jtong",
"title": "comfyui-jtong-workflow",
"reference": "https://github.com/jtong/comfyui-jtong-workflow",
"files": [
"https://github.com/jtong/comfyui-jtong-workflow"
],
"install_type": "git-clone",
"description": "Nodes:jtong.Highway, Example"
},
{
"author": "thinkthinking",
"title": "ComfyUI-Ye",
"reference": "https://github.com/thinkthinking/ComfyUI-Ye",
"files": [
"https://github.com/thinkthinking/ComfyUI-Ye"
],
"install_type": "git-clone",
"description": "Nodes:Signature|Ye, CheckpointLoader|Ye, PrintHelloWorld|Ye."
},
{
"author": "BoosterCore",
"title": "ComfyUI-BC-Experimental",
"reference": "https://github.com/BoosterCore/ComfyUI-BC-Experimental",
"files": [
"https://github.com/BoosterCore/ComfyUI-BC-Experimental"
],
"install_type": "git-clone",
"description": "Nodes:ClipTextEncodeBC, SaveAnyText, SimpleText"
},
{
"author": "sonyeon-sj",
"title": "ComfyUI-easy_ImageSize_Selecter",
"reference": "https://github.com/sonyeon-sj/ComfyUI-easy_ImageSize_Selecter",
"files": [
"https://github.com/sonyeon-sj/ComfyUI-easy_ImageSize_Selecter"
],
"install_type": "git-clone",
"description": "Custom node for ComfyUI Select the image size from the preset and select Vertical and Horizontal to output Width and Height."
},
{
"author": "boricuapab",
"title": "ComfyUI_BoricuapabWFNodePack",
"reference": "https://github.com/boricuapab/ComfyUI_BoricuapabWFNodePack",
"files": [
"https://github.com/boricuapab/ComfyUI_BoricuapabWFNodePack"
],
"install_type": "git-clone",
"description": "Learning how to make my own comfy ui custom nodes"
}
]
}

View File

@ -0,0 +1,3 @@
{
"models": []
}

View File

@ -0,0 +1,4 @@
#!/bin/bash
source ../../../../venv/bin/activate
rm .tmp/*.py > /dev/null
python ../../scanner.py

View File

@ -0,0 +1,372 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "aaaaaaaaaa"
},
"source": [
"Git clone the repo and install the requirements. (ignore the pip errors about protobuf)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "bbbbbbbbbb"
},
"outputs": [],
"source": [
"# #@title Environment Setup\n",
"\n",
"from pathlib import Path\n",
"\n",
"OPTIONS = {}\n",
"\n",
"USE_GOOGLE_DRIVE = True #@param {type:\"boolean\"}\n",
"UPDATE_COMFY_UI = True #@param {type:\"boolean\"}\n",
"USE_COMFYUI_MANAGER = True #@param {type:\"boolean\"}\n",
"INSTALL_CUSTOM_NODES_DEPENDENCIES = True #@param {type:\"boolean\"}\n",
"OPTIONS['USE_GOOGLE_DRIVE'] = USE_GOOGLE_DRIVE\n",
"OPTIONS['UPDATE_COMFY_UI'] = UPDATE_COMFY_UI\n",
"OPTIONS['USE_COMFYUI_MANAGER'] = USE_COMFYUI_MANAGER\n",
"OPTIONS['INSTALL_CUSTOM_NODES_DEPENDENCIES'] = INSTALL_CUSTOM_NODES_DEPENDENCIES\n",
"\n",
"current_dir = !pwd\n",
"WORKSPACE = f\"{current_dir[0]}/ComfyUI\"\n",
"\n",
"if OPTIONS['USE_GOOGLE_DRIVE']:\n",
" !echo \"Mounting Google Drive...\"\n",
" %cd /\n",
"\n",
" from google.colab import drive\n",
" drive.mount('/content/drive')\n",
"\n",
" WORKSPACE = \"/content/drive/MyDrive/ComfyUI\"\n",
" %cd /content/drive/MyDrive\n",
"\n",
"![ ! -d $WORKSPACE ] && echo -= Initial setup ComfyUI =- && git clone https://github.com/comfyanonymous/ComfyUI\n",
"%cd $WORKSPACE\n",
"\n",
"if OPTIONS['UPDATE_COMFY_UI']:\n",
" !echo -= Updating ComfyUI =-\n",
"\n",
" # Correction of the issue of permissions being deleted on Google Drive.\n",
" ![ -f \".ci/nightly/update_windows/update_comfyui_and_python_dependencies.bat\" ] && chmod 755 .ci/nightly/update_windows/update_comfyui_and_python_dependencies.bat\n",
" ![ -f \".ci/nightly/windows_base_files/run_nvidia_gpu.bat\" ] && chmod 755 .ci/nightly/windows_base_files/run_nvidia_gpu.bat\n",
" ![ -f \".ci/update_windows/update_comfyui_and_python_dependencies.bat\" ] && chmod 755 .ci/update_windows/update_comfyui_and_python_dependencies.bat\n",
" ![ -f \".ci/update_windows_cu118/update_comfyui_and_python_dependencies.bat\" ] && chmod 755 .ci/update_windows_cu118/update_comfyui_and_python_dependencies.bat\n",
" ![ -f \".ci/update_windows/update.py\" ] && chmod 755 .ci/update_windows/update.py\n",
" ![ -f \".ci/update_windows/update_comfyui.bat\" ] && chmod 755 .ci/update_windows/update_comfyui.bat\n",
" ![ -f \".ci/update_windows/README_VERY_IMPORTANT.txt\" ] && chmod 755 .ci/update_windows/README_VERY_IMPORTANT.txt\n",
" ![ -f \".ci/update_windows/run_cpu.bat\" ] && chmod 755 .ci/update_windows/run_cpu.bat\n",
" ![ -f \".ci/update_windows/run_nvidia_gpu.bat\" ] && chmod 755 .ci/update_windows/run_nvidia_gpu.bat\n",
"\n",
" !git pull\n",
"\n",
"!echo -= Install dependencies =-\n",
"!pip3 install accelerate\n",
"!pip3 install einops transformers>=4.25.1 safetensors>=0.3.0 aiohttp pyyaml Pillow scipy tqdm psutil\n",
"!pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121\n",
"!pip3 install torchsde\n",
"!pip3 install kornia>=0.7.1 spandrel\n",
"\n",
"if OPTIONS['USE_COMFYUI_MANAGER']:\n",
" %cd custom_nodes\n",
"\n",
" # Correction of the issue of permissions being deleted on Google Drive.\n",
" ![ -f \"ComfyUI-Manager/check.sh\" ] && chmod 755 ComfyUI-Manager/check.sh\n",
" ![ -f \"ComfyUI-Manager/scan.sh\" ] && chmod 755 ComfyUI-Manager/scan.sh\n",
" ![ -f \"ComfyUI-Manager/node_db/dev/scan.sh\" ] && chmod 755 ComfyUI-Manager/node_db/dev/scan.sh\n",
" ![ -f \"ComfyUI-Manager/scripts/install-comfyui-venv-linux.sh\" ] && chmod 755 ComfyUI-Manager/scripts/install-comfyui-venv-linux.sh\n",
" ![ -f \"ComfyUI-Manager/scripts/install-comfyui-venv-win.bat\" ] && chmod 755 ComfyUI-Manager/scripts/install-comfyui-venv-win.bat\n",
"\n",
" ![ ! -d ComfyUI-Manager ] && echo -= Initial setup ComfyUI-Manager =- && git clone https://github.com/ltdrdata/ComfyUI-Manager\n",
" %cd ComfyUI-Manager\n",
" !git pull\n",
"\n",
"%cd $WORKSPACE\n",
"\n",
"if OPTIONS['INSTALL_CUSTOM_NODES_DEPENDENCIES']:\n",
" !echo -= Install custom nodes dependencies =-\n",
" !pip install GitPython\n",
" !python custom_nodes/ComfyUI-Manager/cm-cli.py restore-dependencies\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "cccccccccc"
},
"source": [
"Download some models/checkpoints/vae or custom comfyui nodes (uncomment the commands for the ones you want)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "dddddddddd"
},
"outputs": [],
"source": [
"# Checkpoints\n",
"\n",
"### SDXL\n",
"### I recommend these workflow examples: https://comfyanonymous.github.io/ComfyUI_examples/sdxl/\n",
"\n",
"#!wget -c https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_base_1.0.safetensors -P ./models/checkpoints/\n",
"#!wget -c https://huggingface.co/stabilityai/stable-diffusion-xl-refiner-1.0/resolve/main/sd_xl_refiner_1.0.safetensors -P ./models/checkpoints/\n",
"\n",
"# SDXL ReVision\n",
"#!wget -c https://huggingface.co/comfyanonymous/clip_vision_g/resolve/main/clip_vision_g.safetensors -P ./models/clip_vision/\n",
"\n",
"# SD1.5\n",
"!wget -c https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.ckpt -P ./models/checkpoints/\n",
"\n",
"# SD2\n",
"#!wget -c https://huggingface.co/stabilityai/stable-diffusion-2-1-base/resolve/main/v2-1_512-ema-pruned.safetensors -P ./models/checkpoints/\n",
"#!wget -c https://huggingface.co/stabilityai/stable-diffusion-2-1/resolve/main/v2-1_768-ema-pruned.safetensors -P ./models/checkpoints/\n",
"\n",
"# Some SD1.5 anime style\n",
"#!wget -c https://huggingface.co/WarriorMama777/OrangeMixs/resolve/main/Models/AbyssOrangeMix2/AbyssOrangeMix2_hard.safetensors -P ./models/checkpoints/\n",
"#!wget -c https://huggingface.co/WarriorMama777/OrangeMixs/resolve/main/Models/AbyssOrangeMix3/AOM3A1_orangemixs.safetensors -P ./models/checkpoints/\n",
"#!wget -c https://huggingface.co/WarriorMama777/OrangeMixs/resolve/main/Models/AbyssOrangeMix3/AOM3A3_orangemixs.safetensors -P ./models/checkpoints/\n",
"#!wget -c https://huggingface.co/Linaqruf/anything-v3.0/resolve/main/anything-v3-fp16-pruned.safetensors -P ./models/checkpoints/\n",
"\n",
"# Waifu Diffusion 1.5 (anime style SD2.x 768-v)\n",
"#!wget -c https://huggingface.co/waifu-diffusion/wd-1-5-beta3/resolve/main/wd-illusion-fp16.safetensors -P ./models/checkpoints/\n",
"\n",
"\n",
"# unCLIP models\n",
"#!wget -c https://huggingface.co/comfyanonymous/illuminatiDiffusionV1_v11_unCLIP/resolve/main/illuminatiDiffusionV1_v11-unclip-h-fp16.safetensors -P ./models/checkpoints/\n",
"#!wget -c https://huggingface.co/comfyanonymous/wd-1.5-beta2_unCLIP/resolve/main/wd-1-5-beta2-aesthetic-unclip-h-fp16.safetensors -P ./models/checkpoints/\n",
"\n",
"\n",
"# VAE\n",
"!wget -c https://huggingface.co/stabilityai/sd-vae-ft-mse-original/resolve/main/vae-ft-mse-840000-ema-pruned.safetensors -P ./models/vae/\n",
"#!wget -c https://huggingface.co/WarriorMama777/OrangeMixs/resolve/main/VAEs/orangemix.vae.pt -P ./models/vae/\n",
"#!wget -c https://huggingface.co/hakurei/waifu-diffusion-v1-4/resolve/main/vae/kl-f8-anime2.ckpt -P ./models/vae/\n",
"\n",
"\n",
"# Loras\n",
"#!wget -c https://civitai.com/api/download/models/10350 -O ./models/loras/theovercomer8sContrastFix_sd21768.safetensors #theovercomer8sContrastFix SD2.x 768-v\n",
"#!wget -c https://civitai.com/api/download/models/10638 -O ./models/loras/theovercomer8sContrastFix_sd15.safetensors #theovercomer8sContrastFix SD1.x\n",
"#!wget -c https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_offset_example-lora_1.0.safetensors -P ./models/loras/ #SDXL offset noise lora\n",
"\n",
"\n",
"# T2I-Adapter\n",
"#!wget -c https://huggingface.co/TencentARC/T2I-Adapter/resolve/main/models/t2iadapter_depth_sd14v1.pth -P ./models/controlnet/\n",
"#!wget -c https://huggingface.co/TencentARC/T2I-Adapter/resolve/main/models/t2iadapter_seg_sd14v1.pth -P ./models/controlnet/\n",
"#!wget -c https://huggingface.co/TencentARC/T2I-Adapter/resolve/main/models/t2iadapter_sketch_sd14v1.pth -P ./models/controlnet/\n",
"#!wget -c https://huggingface.co/TencentARC/T2I-Adapter/resolve/main/models/t2iadapter_keypose_sd14v1.pth -P ./models/controlnet/\n",
"#!wget -c https://huggingface.co/TencentARC/T2I-Adapter/resolve/main/models/t2iadapter_openpose_sd14v1.pth -P ./models/controlnet/\n",
"#!wget -c https://huggingface.co/TencentARC/T2I-Adapter/resolve/main/models/t2iadapter_color_sd14v1.pth -P ./models/controlnet/\n",
"#!wget -c https://huggingface.co/TencentARC/T2I-Adapter/resolve/main/models/t2iadapter_canny_sd14v1.pth -P ./models/controlnet/\n",
"\n",
"# T2I Styles Model\n",
"#!wget -c https://huggingface.co/TencentARC/T2I-Adapter/resolve/main/models/t2iadapter_style_sd14v1.pth -P ./models/style_models/\n",
"\n",
"# CLIPVision model (needed for styles model)\n",
"#!wget -c https://huggingface.co/openai/clip-vit-large-patch14/resolve/main/pytorch_model.bin -O ./models/clip_vision/clip_vit14.bin\n",
"\n",
"\n",
"# ControlNet\n",
"#!wget -c https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11e_sd15_ip2p_fp16.safetensors -P ./models/controlnet/\n",
"#!wget -c https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11e_sd15_shuffle_fp16.safetensors -P ./models/controlnet/\n",
"#!wget -c https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11p_sd15_canny_fp16.safetensors -P ./models/controlnet/\n",
"#!wget -c https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11f1p_sd15_depth_fp16.safetensors -P ./models/controlnet/\n",
"#!wget -c https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11p_sd15_inpaint_fp16.safetensors -P ./models/controlnet/\n",
"#!wget -c https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11p_sd15_lineart_fp16.safetensors -P ./models/controlnet/\n",
"#!wget -c https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11p_sd15_mlsd_fp16.safetensors -P ./models/controlnet/\n",
"#!wget -c https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11p_sd15_normalbae_fp16.safetensors -P ./models/controlnet/\n",
"#!wget -c https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11p_sd15_openpose_fp16.safetensors -P ./models/controlnet/\n",
"#!wget -c https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11p_sd15_scribble_fp16.safetensors -P ./models/controlnet/\n",
"#!wget -c https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11p_sd15_seg_fp16.safetensors -P ./models/controlnet/\n",
"#!wget -c https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11p_sd15_softedge_fp16.safetensors -P ./models/controlnet/\n",
"#!wget -c https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11p_sd15s2_lineart_anime_fp16.safetensors -P ./models/controlnet/\n",
"#!wget -c https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11u_sd15_tile_fp16.safetensors -P ./models/controlnet/\n",
"\n",
"# ControlNet SDXL\n",
"#!wget -c https://huggingface.co/stabilityai/control-lora/resolve/main/control-LoRAs-rank256/control-lora-canny-rank256.safetensors -P ./models/controlnet/\n",
"#!wget -c https://huggingface.co/stabilityai/control-lora/resolve/main/control-LoRAs-rank256/control-lora-depth-rank256.safetensors -P ./models/controlnet/\n",
"#!wget -c https://huggingface.co/stabilityai/control-lora/resolve/main/control-LoRAs-rank256/control-lora-recolor-rank256.safetensors -P ./models/controlnet/\n",
"#!wget -c https://huggingface.co/stabilityai/control-lora/resolve/main/control-LoRAs-rank256/control-lora-sketch-rank256.safetensors -P ./models/controlnet/\n",
"\n",
"# Controlnet Preprocessor nodes by Fannovel16\n",
"#!cd custom_nodes && git clone https://github.com/Fannovel16/comfy_controlnet_preprocessors; cd comfy_controlnet_preprocessors && python install.py\n",
"\n",
"\n",
"# GLIGEN\n",
"#!wget -c https://huggingface.co/comfyanonymous/GLIGEN_pruned_safetensors/resolve/main/gligen_sd14_textbox_pruned_fp16.safetensors -P ./models/gligen/\n",
"\n",
"\n",
"# ESRGAN upscale model\n",
"#!wget -c https://github.com/xinntao/Real-ESRGAN/releases/download/v0.1.0/RealESRGAN_x4plus.pth -P ./models/upscale_models/\n",
"#!wget -c https://huggingface.co/sberbank-ai/Real-ESRGAN/resolve/main/RealESRGAN_x2.pth -P ./models/upscale_models/\n",
"#!wget -c https://huggingface.co/sberbank-ai/Real-ESRGAN/resolve/main/RealESRGAN_x4.pth -P ./models/upscale_models/\n",
"\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "kkkkkkkkkkkkkkk"
},
"source": [
"### Run ComfyUI with cloudflared (Recommended Way)\n",
"\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "jjjjjjjjjjjjjj"
},
"outputs": [],
"source": [
"!wget https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb\n",
"!dpkg -i cloudflared-linux-amd64.deb\n",
"\n",
"import subprocess\n",
"import threading\n",
"import time\n",
"import socket\n",
"import urllib.request\n",
"\n",
"def iframe_thread(port):\n",
" while True:\n",
" time.sleep(0.5)\n",
" sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\n",
" result = sock.connect_ex(('127.0.0.1', port))\n",
" if result == 0:\n",
" break\n",
" sock.close()\n",
" print(\"\\nComfyUI finished loading, trying to launch cloudflared (if it gets stuck here cloudflared is having issues)\\n\")\n",
"\n",
" p = subprocess.Popen([\"cloudflared\", \"tunnel\", \"--url\", \"http://127.0.0.1:{}\".format(port)], stdout=subprocess.PIPE, stderr=subprocess.PIPE)\n",
" for line in p.stderr:\n",
" l = line.decode()\n",
" if \"trycloudflare.com \" in l:\n",
" print(\"This is the URL to access ComfyUI:\", l[l.find(\"http\"):], end='')\n",
" #print(l, end='')\n",
"\n",
"\n",
"threading.Thread(target=iframe_thread, daemon=True, args=(8188,)).start()\n",
"\n",
"!python main.py --dont-print-server"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "kkkkkkkkkkkkkk"
},
"source": [
"### Run ComfyUI with localtunnel\n",
"\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "jjjjjjjjjjjjj"
},
"outputs": [],
"source": [
"!npm install -g localtunnel\n",
"\n",
"import subprocess\n",
"import threading\n",
"import time\n",
"import socket\n",
"import urllib.request\n",
"\n",
"def iframe_thread(port):\n",
" while True:\n",
" time.sleep(0.5)\n",
" sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\n",
" result = sock.connect_ex(('127.0.0.1', port))\n",
" if result == 0:\n",
" break\n",
" sock.close()\n",
" print(\"\\nComfyUI finished loading, trying to launch localtunnel (if it gets stuck here localtunnel is having issues)\\n\")\n",
"\n",
" print(\"The password/enpoint ip for localtunnel is:\", urllib.request.urlopen('https://ipv4.icanhazip.com').read().decode('utf8').strip(\"\\n\"))\n",
" p = subprocess.Popen([\"lt\", \"--port\", \"{}\".format(port)], stdout=subprocess.PIPE)\n",
" for line in p.stdout:\n",
" print(line.decode(), end='')\n",
"\n",
"\n",
"threading.Thread(target=iframe_thread, daemon=True, args=(8188,)).start()\n",
"\n",
"!python main.py --dont-print-server"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "gggggggggg"
},
"source": [
"### Run ComfyUI with colab iframe (use only in case the previous way with localtunnel doesn't work)\n",
"\n",
"You should see the ui appear in an iframe. If you get a 403 error, it's your firefox settings or an extension that's messing things up.\n",
"\n",
"If you want to open it in another window use the link.\n",
"\n",
"Note that some UI features like live image previews won't work because the colab iframe blocks websockets."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "hhhhhhhhhh"
},
"outputs": [],
"source": [
"import threading\n",
"import time\n",
"import socket\n",
"def iframe_thread(port):\n",
" while True:\n",
" time.sleep(0.5)\n",
" sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\n",
" result = sock.connect_ex(('127.0.0.1', port))\n",
" if result == 0:\n",
" break\n",
" sock.close()\n",
" from google.colab import output\n",
" output.serve_kernel_port_as_iframe(port, height=1024)\n",
" print(\"to open it in a window you can open this link here:\")\n",
" output.serve_kernel_port_as_window(port)\n",
"\n",
"threading.Thread(target=iframe_thread, daemon=True, args=(8188,)).start()\n",
"\n",
"!python main.py --dont-print-server"
]
}
],
"metadata": {
"accelerator": "GPU",
"colab": {
"provenance": []
},
"gpuClass": "standard",
"kernelspec": {
"display_name": "Python 3",
"name": "python3"
},
"language_info": {
"name": "python"
}
},
"nbformat": 4,
"nbformat_minor": 0
}

View File

@ -0,0 +1,21 @@
{
"imageio-ffmpeg": "imageio",
"imageio[ffmpeg]": "imageio",
"imageio_ffmpeg": "imageio",
"diffusers~=0.21.4": "diffusers",
"huggingface_hub": "huggingface-hub",
"numpy<1.24>=1.18": "numpy",
"numpy>=1.18.5, <1.25.0": "numpy",
"opencv-contrib-python": "opencv-contrib-python-headless",
"opencv-python": "opencv-contrib-python-headless",
"opencv-python-headless": "opencv-contrib-python-headless",
"opencv-python-headless[ffmpeg]<=4.7.0.72": "opencv-contrib-python-headless",
"opencv-python>=4.7.0.72": "opencv-contrib-python-headless",
"pandas<=1.5.1": "pandas",
"scikit-image==0.20.0": "scikit-image",
"scipy>=1.11.4": "scipy",
"segment_anything": "segment-anything",
"timm==0.6.5": "timm",
"timm>=0.4.12": "timm",
"transformers==4.26.1": "transformers"
}

View File

@ -0,0 +1,665 @@
import datetime
import os
import subprocess
import sys
import atexit
import threading
import re
import locale
import platform
import json
import ast
import logging
glob_path = os.path.join(os.path.dirname(__file__), "glob")
sys.path.append(glob_path)
import security_check
from manager_util import *
import cm_global
security_check.security_check()
cm_global.pip_downgrade_blacklist = ['torch', 'torchsde', 'torchvision', 'transformers', 'safetensors', 'kornia']
def skip_pip_spam(x):
return ('Requirement already satisfied:' in x) or ("DEPRECATION: Loading egg at" in x)
message_collapses = [skip_pip_spam]
import_failed_extensions = set()
cm_global.variables['cm.on_revision_detected_handler'] = []
enable_file_logging = True
def register_message_collapse(f):
global message_collapses
message_collapses.append(f)
def is_import_failed_extension(name):
global import_failed_extensions
return name in import_failed_extensions
def check_file_logging():
global enable_file_logging
try:
import configparser
config_path = os.path.join(os.path.dirname(__file__), "config.ini")
config = configparser.ConfigParser()
config.read(config_path)
default_conf = config['default']
if 'file_logging' in default_conf and default_conf['file_logging'].lower() == 'false':
enable_file_logging = False
except Exception:
pass
check_file_logging()
comfy_path = os.environ.get('COMFYUI_PATH')
if comfy_path is None:
comfy_path = os.path.abspath(os.path.dirname(sys.modules['__main__'].__file__))
sys.__comfyui_manager_register_message_collapse = register_message_collapse
sys.__comfyui_manager_is_import_failed_extension = is_import_failed_extension
cm_global.register_api('cm.register_message_collapse', register_message_collapse)
cm_global.register_api('cm.is_import_failed_extension', is_import_failed_extension)
comfyui_manager_path = os.path.dirname(__file__)
custom_nodes_path = os.path.abspath(os.path.join(comfyui_manager_path, ".."))
startup_script_path = os.path.join(comfyui_manager_path, "startup-scripts")
restore_snapshot_path = os.path.join(startup_script_path, "restore-snapshot.json")
git_script_path = os.path.join(comfyui_manager_path, "git_helper.py")
pip_overrides_path = os.path.join(comfyui_manager_path, "pip_overrides.json")
cm_global.pip_overrides = {}
if os.path.exists(pip_overrides_path):
with open(pip_overrides_path, 'r', encoding="UTF-8", errors="ignore") as json_file:
cm_global.pip_overrides = json.load(json_file)
def remap_pip_package(pkg):
if pkg in cm_global.pip_overrides:
res = cm_global.pip_overrides[pkg]
print(f"[ComfyUI-Manager] '{pkg}' is remapped to '{res}'")
return res
else:
return pkg
std_log_lock = threading.Lock()
class TerminalHook:
def __init__(self):
self.hooks = {}
def add_hook(self, k, v):
self.hooks[k] = v
def remove_hook(self, k):
if k in self.hooks:
del self.hooks[k]
def write_stderr(self, msg):
for v in self.hooks.values():
try:
v.write_stderr(msg)
except Exception:
pass
def write_stdout(self, msg):
for v in self.hooks.values():
try:
v.write_stdout(msg)
except Exception:
pass
terminal_hook = TerminalHook()
sys.__comfyui_manager_terminal_hook = terminal_hook
def handle_stream(stream, prefix):
stream.reconfigure(encoding=locale.getpreferredencoding(), errors='replace')
for msg in stream:
if prefix == '[!]' and ('it/s]' in msg or 's/it]' in msg) and ('%|' in msg or 'it [' in msg):
if msg.startswith('100%'):
print('\r' + msg, end="", file=sys.stderr),
else:
print('\r' + msg[:-1], end="", file=sys.stderr),
else:
if prefix == '[!]':
print(prefix, msg, end="", file=sys.stderr)
else:
print(prefix, msg, end="")
def process_wrap(cmd_str, cwd_path, handler=None, env=None):
process = subprocess.Popen(cmd_str, cwd=cwd_path, env=env, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, bufsize=1)
if handler is None:
handler = handle_stream
stdout_thread = threading.Thread(target=handler, args=(process.stdout, ""))
stderr_thread = threading.Thread(target=handler, args=(process.stderr, "[!]"))
stdout_thread.start()
stderr_thread.start()
stdout_thread.join()
stderr_thread.join()
return process.wait()
try:
if '--port' in sys.argv:
port_index = sys.argv.index('--port')
if port_index + 1 < len(sys.argv):
port = int(sys.argv[port_index + 1])
postfix = f"_{port}"
else:
postfix = ""
else:
postfix = ""
# Logger setup
if enable_file_logging:
if os.path.exists(f"comfyui{postfix}.log"):
if os.path.exists(f"comfyui{postfix}.prev.log"):
if os.path.exists(f"comfyui{postfix}.prev2.log"):
os.remove(f"comfyui{postfix}.prev2.log")
os.rename(f"comfyui{postfix}.prev.log", f"comfyui{postfix}.prev2.log")
os.rename(f"comfyui{postfix}.log", f"comfyui{postfix}.prev.log")
log_file = open(f"comfyui{postfix}.log", "w", encoding="utf-8", errors="ignore")
log_lock = threading.Lock()
original_stdout = sys.stdout
original_stderr = sys.stderr
if original_stdout.encoding.lower() == 'utf-8':
write_stdout = original_stdout.write
write_stderr = original_stderr.write
else:
def wrapper_stdout(msg):
original_stdout.write(msg.encode('utf-8').decode(original_stdout.encoding, errors="ignore"))
def wrapper_stderr(msg):
original_stderr.write(msg.encode('utf-8').decode(original_stderr.encoding, errors="ignore"))
write_stdout = wrapper_stdout
write_stderr = wrapper_stderr
pat_tqdm = r'\d+%.*\[(.*?)\]'
pat_import_fail = r'seconds \(IMPORT FAILED\):.*[/\\]custom_nodes[/\\](.*)$'
is_start_mode = True
class ComfyUIManagerLogger:
def __init__(self, is_stdout):
self.is_stdout = is_stdout
self.encoding = "utf-8"
self.last_char = ''
def fileno(self):
try:
if self.is_stdout:
return original_stdout.fileno()
else:
return original_stderr.fileno()
except AttributeError:
# Handle error
raise ValueError("The object does not have a fileno method")
def isatty(self):
return False
def write(self, message):
global is_start_mode
if any(f(message) for f in message_collapses):
return
if is_start_mode:
match = re.search(pat_import_fail, message)
if match:
import_failed_extensions.add(match.group(1))
if 'Starting server' in message:
is_start_mode = False
if not self.is_stdout:
match = re.search(pat_tqdm, message)
if match:
message = re.sub(r'([#|])\d', r'\1▌', message)
message = re.sub('#', '', message)
if '100%' in message:
self.sync_write(message)
else:
write_stderr(message)
original_stderr.flush()
else:
self.sync_write(message)
else:
self.sync_write(message)
def sync_write(self, message, file_only=False):
with log_lock:
timestamp = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')[:-3]
if self.last_char != '\n':
log_file.write(message)
else:
log_file.write(f"[{timestamp}] {message}")
log_file.flush()
self.last_char = message if message == '' else message[-1]
if not file_only:
with std_log_lock:
if self.is_stdout:
write_stdout(message)
original_stdout.flush()
terminal_hook.write_stderr(message)
else:
write_stderr(message)
original_stderr.flush()
terminal_hook.write_stdout(message)
def flush(self):
log_file.flush()
with std_log_lock:
if self.is_stdout:
original_stdout.flush()
else:
original_stderr.flush()
def close(self):
self.flush()
def reconfigure(self, *args, **kwargs):
pass
# You can close through sys.stderr.close_log()
def close_log(self):
sys.stderr = original_stderr
sys.stdout = original_stdout
log_file.close()
def close_log():
sys.stderr = original_stderr
sys.stdout = original_stdout
log_file.close()
if enable_file_logging:
sys.stdout = ComfyUIManagerLogger(True)
stderr_wrapper = ComfyUIManagerLogger(False)
sys.stderr = stderr_wrapper
atexit.register(close_log)
else:
sys.stdout.close_log = lambda: None
stderr_wrapper = None
class LoggingHandler(logging.Handler):
def emit(self, record):
global is_start_mode
message = record.getMessage()
if is_start_mode:
match = re.search(pat_import_fail, message)
if match:
import_failed_extensions.add(match.group(1))
if 'Starting server' in message:
is_start_mode = False
if stderr_wrapper:
stderr_wrapper.sync_write(message+'\n', file_only=True)
logging.getLogger().addHandler(LoggingHandler())
except Exception as e:
print(f"[ComfyUI-Manager] Logging failed: {e}")
try:
import git
except ModuleNotFoundError:
my_path = os.path.dirname(__file__)
requirements_path = os.path.join(my_path, "requirements.txt")
print(f"## ComfyUI-Manager: installing dependencies. (GitPython)")
try:
result = subprocess.check_output([sys.executable, '-s', '-m', 'pip', 'install', '-r', requirements_path])
except subprocess.CalledProcessError as e:
print(f"## [ERROR] ComfyUI-Manager: Attempting to reinstall dependencies using an alternative method.")
try:
result = subprocess.check_output([sys.executable, '-s', '-m', 'pip', 'install', '--user', '-r', requirements_path])
except subprocess.CalledProcessError as e:
print(f"## [ERROR] ComfyUI-Manager: Failed to install the GitPython package in the correct Python environment. Please install it manually in the appropriate environment. (You can seek help at https://app.element.io/#/room/%23comfyui_space%3Amatrix.org)")
try:
import git
print(f"## ComfyUI-Manager: installing dependencies done.")
except:
# maybe we should sys.exit() here? there is at least two screens worth of error messages still being pumped after our error messages
print(f"## [ERROR] ComfyUI-Manager: GitPython package seems to be installed, but failed to load somehow. Make sure you have a working git client installed")
print("** ComfyUI startup time:", datetime.datetime.now())
print("** Platform:", platform.system())
print("** Python version:", sys.version)
print("** Python executable:", sys.executable)
print("** ComfyUI Path:", comfy_path)
if enable_file_logging:
print("** Log path:", os.path.abspath('comfyui.log'))
else:
print("** Log path: file logging is disabled")
def read_downgrade_blacklist():
try:
import configparser
config_path = os.path.join(os.path.dirname(__file__), "config.ini")
config = configparser.ConfigParser()
config.read(config_path)
default_conf = config['default']
if 'downgrade_blacklist' in default_conf:
items = default_conf['downgrade_blacklist'].split(',')
items = [x.strip() for x in items if x != '']
cm_global.pip_downgrade_blacklist += items
cm_global.pip_downgrade_blacklist = list(set(cm_global.pip_downgrade_blacklist))
except:
pass
read_downgrade_blacklist()
def check_bypass_ssl():
try:
import configparser
import ssl
config_path = os.path.join(os.path.dirname(__file__), "config.ini")
config = configparser.ConfigParser()
config.read(config_path)
default_conf = config['default']
if 'bypass_ssl' in default_conf and default_conf['bypass_ssl'].lower() == 'true':
print(f"[ComfyUI-Manager] WARN: Unsafe - SSL verification bypass option is Enabled. (see ComfyUI-Manager/config.ini)")
ssl._create_default_https_context = ssl._create_unverified_context # SSL certificate error fix.
except Exception:
pass
check_bypass_ssl()
# Perform install
processed_install = set()
script_list_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "startup-scripts", "install-scripts.txt")
pip_map = None
def get_installed_packages():
global pip_map
if pip_map is None:
try:
result = subprocess.check_output([sys.executable, '-m', 'pip', 'list'], universal_newlines=True)
pip_map = {}
for line in result.split('\n'):
x = line.strip()
if x:
y = line.split()
if y[0] == 'Package' or y[0].startswith('-'):
continue
pip_map[y[0]] = y[1]
except subprocess.CalledProcessError as e:
print(f"[ComfyUI-Manager] Failed to retrieve the information of installed pip packages.")
return set()
return pip_map
def is_installed(name):
name = name.strip()
if name.startswith('#'):
return True
pattern = r'([^<>!=]+)([<>!=]=?)(.*)'
match = re.search(pattern, name)
if match:
name = match.group(1)
if name in cm_global.pip_downgrade_blacklist:
pips = get_installed_packages()
if match is None:
if name in pips:
return True
elif match.group(2) in ['<=', '==', '<']:
if name in pips:
if StrictVersion(pips[name]) >= StrictVersion(match.group(3)):
print(f"[ComfyUI-Manager] skip black listed pip installation: '{name}'")
return True
pkg = get_installed_packages().get(name.lower())
if pkg is None:
return False # update if not installed
if match is None:
return True # don't update if version is not specified
if match.group(2) in ['>', '>=']:
if StrictVersion(pkg) < StrictVersion(match.group(3)):
return False
elif StrictVersion(pkg) > StrictVersion(match.group(3)):
print(f"[SKIP] Downgrading pip package isn't allowed: {name.lower()} (cur={pkg})")
return True # prevent downgrade
if os.path.exists(restore_snapshot_path):
try:
cloned_repos = []
def msg_capture(stream, prefix):
stream.reconfigure(encoding=locale.getpreferredencoding(), errors='replace')
for msg in stream:
if msg.startswith("CLONE: "):
cloned_repos.append(msg[7:])
if prefix == '[!]':
print(prefix, msg, end="", file=sys.stderr)
else:
print(prefix, msg, end="")
elif prefix == '[!]' and ('it/s]' in msg or 's/it]' in msg) and ('%|' in msg or 'it [' in msg):
if msg.startswith('100%'):
print('\r' + msg, end="", file=sys.stderr),
else:
print('\r'+msg[:-1], end="", file=sys.stderr),
else:
if prefix == '[!]':
print(prefix, msg, end="", file=sys.stderr)
else:
print(prefix, msg, end="")
print(f"[ComfyUI-Manager] Restore snapshot.")
cmd_str = [sys.executable, git_script_path, '--apply-snapshot', restore_snapshot_path]
new_env = os.environ.copy()
new_env["COMFYUI_PATH"] = comfy_path
exit_code = process_wrap(cmd_str, custom_nodes_path, handler=msg_capture, env=new_env)
repository_name = ''
for url in cloned_repos:
try:
repository_name = url.split("/")[-1].strip()
repo_path = os.path.join(custom_nodes_path, repository_name)
repo_path = os.path.abspath(repo_path)
requirements_path = os.path.join(repo_path, 'requirements.txt')
install_script_path = os.path.join(repo_path, 'install.py')
this_exit_code = 0
if os.path.exists(requirements_path):
with open(requirements_path, 'r', encoding="UTF-8", errors="ignore") as file:
for line in file:
package_name = remap_pip_package(line.strip())
if package_name and not is_installed(package_name):
if not package_name.startswith('#'):
install_cmd = [sys.executable, "-m", "pip", "install", package_name]
this_exit_code += process_wrap(install_cmd, repo_path)
if os.path.exists(install_script_path) and f'{repo_path}/install.py' not in processed_install:
processed_install.add(f'{repo_path}/install.py')
install_cmd = [sys.executable, install_script_path]
print(f">>> {install_cmd} / {repo_path}")
new_env = os.environ.copy()
new_env["COMFYUI_PATH"] = comfy_path
this_exit_code += process_wrap(install_cmd, repo_path, env=new_env)
if this_exit_code != 0:
print(f"[ComfyUI-Manager] Restoring '{repository_name}' is failed.")
except Exception as e:
print(e)
print(f"[ComfyUI-Manager] Restoring '{repository_name}' is failed.")
if exit_code != 0:
print(f"[ComfyUI-Manager] Restore snapshot failed.")
else:
print(f"[ComfyUI-Manager] Restore snapshot done.")
except Exception as e:
print(e)
print(f"[ComfyUI-Manager] Restore snapshot failed.")
os.remove(restore_snapshot_path)
def execute_lazy_install_script(repo_path, executable):
global processed_install
install_script_path = os.path.join(repo_path, "install.py")
requirements_path = os.path.join(repo_path, "requirements.txt")
if os.path.exists(requirements_path):
print(f"Install: pip packages for '{repo_path}'")
with open(requirements_path, "r") as requirements_file:
for line in requirements_file:
package_name = remap_pip_package(line.strip())
if package_name and not is_installed(package_name):
install_cmd = [executable, "-m", "pip", "install", package_name]
process_wrap(install_cmd, repo_path)
if os.path.exists(install_script_path) and f'{repo_path}/install.py' not in processed_install:
processed_install.add(f'{repo_path}/install.py')
print(f"Install: install script for '{repo_path}'")
install_cmd = [executable, "install.py"]
new_env = os.environ.copy()
new_env["COMFYUI_PATH"] = comfy_path
process_wrap(install_cmd, repo_path, env=new_env)
# Check if script_list_path exists
if os.path.exists(script_list_path):
print("\n#######################################################################")
print("[ComfyUI-Manager] Starting dependency installation/(de)activation for the extension\n")
executed = set()
# Read each line from the file and convert it to a list using eval
with open(script_list_path, 'r', encoding="UTF-8", errors="ignore") as file:
for line in file:
if line in executed:
continue
executed.add(line)
try:
script = ast.literal_eval(line)
if script[1].startswith('#') and script[1] != '#FORCE':
if script[1] == "#LAZY-INSTALL-SCRIPT":
execute_lazy_install_script(script[0], script[2])
elif os.path.exists(script[0]):
if script[1] == "#FORCE":
del script[1]
else:
if 'pip' in script[1:] and 'install' in script[1:] and is_installed(script[-1]):
continue
print(f"\n## ComfyUI-Manager: EXECUTE => {script[1:]}")
print(f"\n## Execute install/(de)activation script for '{script[0]}'")
new_env = os.environ.copy()
new_env["COMFYUI_PATH"] = comfy_path
exit_code = process_wrap(script[1:], script[0], env=new_env)
if exit_code != 0:
print(f"install/(de)activation script failed: {script[0]}")
else:
print(f"\n## ComfyUI-Manager: CANCELED => {script[1:]}")
except Exception as e:
print(f"[ERROR] Failed to execute install/(de)activation script: {line} / {e}")
# Remove the script_list_path file
if os.path.exists(script_list_path):
os.remove(script_list_path)
print("\n[ComfyUI-Manager] Startup script completed.")
print("#######################################################################\n")
del processed_install
del pip_map
def check_windows_event_loop_policy():
try:
import configparser
config_path = os.path.join(os.path.dirname(__file__), "config.ini")
config = configparser.ConfigParser()
config.read(config_path)
default_conf = config['default']
if 'windows_selector_event_loop_policy' in default_conf and default_conf['windows_selector_event_loop_policy'].lower() == 'true':
try:
import asyncio
import asyncio.windows_events
asyncio.set_event_loop_policy(asyncio.windows_events.WindowsSelectorEventLoopPolicy())
print(f"[ComfyUI-Manager] Windows event loop policy mode enabled")
except Exception as e:
print(f"[ComfyUI-Manager] WARN: Windows initialization fail: {e}")
except Exception:
pass
if platform.system() == 'Windows':
check_windows_event_loop_policy()

View File

@ -0,0 +1,15 @@
[project]
name = "comfyui-manager"
description = "ComfyUI-Manager provides features to install and manage custom nodes for ComfyUI, as well as various functionalities to assist with ComfyUI."
version = "2.46.2"
license = "LICENSE"
dependencies = ["GitPython", "PyGithub", "matrix-client==0.4.0", "transformers", "huggingface-hub>0.20", "typer", "rich", "typing-extensions"]
[project.urls]
Repository = "https://github.com/ltdrdata/ComfyUI-Manager"
# Used by Comfy Registry https://comfyregistry.org
[tool.comfy]
PublisherId = "drltdata"
DisplayName = "ComfyUI-Manager"
Icon = ""

View File

@ -0,0 +1,8 @@
GitPython
PyGithub
matrix-client==0.4.0
transformers
huggingface-hub>0.20
typer
rich
typing-extensions

View File

@ -0,0 +1,7 @@
#!/bin/bash
rm ~/.tmp/default/*.py > /dev/null 2>&1
python scanner.py ~/.tmp/default $*
cp extension-node-map.json node_db/new/.
echo Integrity check
./check.sh

View File

@ -0,0 +1,527 @@
import ast
import re
import os
import json
from git import Repo
import concurrent
import datetime
import concurrent.futures
import requests
builtin_nodes = set()
import sys
from urllib.parse import urlparse
from github import Github
def download_url(url, dest_folder, filename=None):
# Ensure the destination folder exists
if not os.path.exists(dest_folder):
os.makedirs(dest_folder)
# Extract filename from URL if not provided
if filename is None:
filename = os.path.basename(url)
# Full path to save the file
dest_path = os.path.join(dest_folder, filename)
# Download the file
response = requests.get(url, stream=True)
if response.status_code == 200:
with open(dest_path, 'wb') as file:
for chunk in response.iter_content(chunk_size=1024):
if chunk:
file.write(chunk)
else:
raise Exception(f"Failed to download file from {url}")
# prepare temp dir
if len(sys.argv) > 1:
temp_dir = sys.argv[1]
else:
temp_dir = os.path.join(os.getcwd(), ".tmp")
if not os.path.exists(temp_dir):
os.makedirs(temp_dir)
skip_update = '--skip-update' in sys.argv or '--skip-all' in sys.argv
skip_stat_update = '--skip-stat-update' in sys.argv or '--skip-all' in sys.argv
if not skip_stat_update:
g = Github(os.environ.get('GITHUB_TOKEN'))
else:
g = None
print(f"TEMP DIR: {temp_dir}")
parse_cnt = 0
def extract_nodes(code_text):
global parse_cnt
try:
if parse_cnt % 100 == 0:
print(f".", end="", flush=True)
parse_cnt += 1
code_text = re.sub(r'\\[^"\']', '', code_text)
parsed_code = ast.parse(code_text)
assignments = (node for node in parsed_code.body if isinstance(node, ast.Assign))
for assignment in assignments:
if isinstance(assignment.targets[0], ast.Name) and assignment.targets[0].id in ['NODE_CONFIG', 'NODE_CLASS_MAPPINGS']:
node_class_mappings = assignment.value
break
else:
node_class_mappings = None
if node_class_mappings:
s = set()
for key in node_class_mappings.keys:
if key is not None and isinstance(key.value, str):
s.add(key.value.strip())
return s
else:
return set()
except:
return set()
# scan
def scan_in_file(filename, is_builtin=False):
global builtin_nodes
try:
with open(filename, encoding='utf-8') as file:
code = file.read()
except UnicodeDecodeError:
with open(filename, encoding='cp949') as file:
code = file.read()
pattern = r"_CLASS_MAPPINGS\s*=\s*{([^}]*)}"
regex = re.compile(pattern, re.MULTILINE | re.DOTALL)
nodes = set()
class_dict = {}
nodes |= extract_nodes(code)
code = re.sub(r'^#.*?$', '', code, flags=re.MULTILINE)
def extract_keys(pattern, code):
keys = re.findall(pattern, code)
return {key.strip() for key in keys}
def update_nodes(nodes, new_keys):
nodes |= new_keys
patterns = [
r'^[^=]*_CLASS_MAPPINGS\["(.*?)"\]',
r'^[^=]*_CLASS_MAPPINGS\[\'(.*?)\'\]',
r'@register_node\("(.+)",\s*\".+"\)',
r'"(\w+)"\s*:\s*{"class":\s*\w+\s*'
]
with concurrent.futures.ThreadPoolExecutor() as executor:
futures = {executor.submit(extract_keys, pattern, code): pattern for pattern in patterns}
for future in concurrent.futures.as_completed(futures):
update_nodes(nodes, future.result())
matches = regex.findall(code)
for match in matches:
dict_text = match
key_value_pairs = re.findall(r"\"([^\"]*)\"\s*:\s*([^,\n]*)", dict_text)
for key, value in key_value_pairs:
class_dict[key.strip()] = value.strip()
key_value_pairs = re.findall(r"'([^']*)'\s*:\s*([^,\n]*)", dict_text)
for key, value in key_value_pairs:
class_dict[key.strip()] = value.strip()
for key, value in class_dict.items():
nodes.add(key.strip())
update_pattern = r"_CLASS_MAPPINGS.update\s*\({([^}]*)}\)"
update_match = re.search(update_pattern, code)
if update_match:
update_dict_text = update_match.group(1)
update_key_value_pairs = re.findall(r"\"([^\"]*)\"\s*:\s*([^,\n]*)", update_dict_text)
for key, value in update_key_value_pairs:
class_dict[key.strip()] = value.strip()
nodes.add(key.strip())
metadata = {}
lines = code.strip().split('\n')
for line in lines:
if line.startswith('@'):
if line.startswith("@author:") or line.startswith("@title:") or line.startswith("@nickname:") or line.startswith("@description:"):
key, value = line[1:].strip().split(':', 1)
metadata[key.strip()] = value.strip()
if is_builtin:
builtin_nodes += set(nodes)
else:
for x in builtin_nodes:
if x in nodes:
nodes.remove(x)
return nodes, metadata
def get_py_file_paths(dirname):
file_paths = []
for root, dirs, files in os.walk(dirname):
if ".git" in root or "__pycache__" in root:
continue
for file in files:
if file.endswith(".py"):
file_path = os.path.join(root, file)
file_paths.append(file_path)
return file_paths
def get_nodes(target_dir):
py_files = []
directories = []
for item in os.listdir(target_dir):
if ".git" in item or "__pycache__" in item:
continue
path = os.path.abspath(os.path.join(target_dir, item))
if os.path.isfile(path) and item.endswith(".py"):
py_files.append(path)
elif os.path.isdir(path):
directories.append(path)
return py_files, directories
def get_git_urls_from_json(json_file):
with open(json_file, encoding='utf-8') as file:
data = json.load(file)
custom_nodes = data.get('custom_nodes', [])
git_clone_files = []
for node in custom_nodes:
if node.get('install_type') == 'git-clone':
files = node.get('files', [])
if files:
git_clone_files.append((files[0], node.get('title'), node.get('preemptions'), node.get('nodename_pattern')))
git_clone_files.append(("https://github.com/comfyanonymous/ComfyUI", "ComfyUI", None, None))
return git_clone_files
def get_py_urls_from_json(json_file):
with open(json_file, encoding='utf-8') as file:
data = json.load(file)
custom_nodes = data.get('custom_nodes', [])
py_files = []
for node in custom_nodes:
if node.get('install_type') == 'copy':
files = node.get('files', [])
if files:
py_files.append((files[0], node.get('title'), node.get('preemptions'), node.get('nodename_pattern')))
return py_files
def clone_or_pull_git_repository(git_url):
repo_name = git_url.split("/")[-1].split(".")[0]
repo_dir = os.path.join(temp_dir, repo_name)
if os.path.exists(repo_dir):
try:
repo = Repo(repo_dir)
origin = repo.remote(name="origin")
origin.pull()
repo.git.submodule('update', '--init', '--recursive')
print(f"Pulling {repo_name}...")
except Exception as e:
print(f"Pulling {repo_name} failed: {e}")
else:
try:
Repo.clone_from(git_url, repo_dir, recursive=True)
print(f"Cloning {repo_name}...")
except Exception as e:
print(f"Cloning {repo_name} failed: {e}")
def update_custom_nodes():
if not os.path.exists(temp_dir):
os.makedirs(temp_dir)
node_info = {}
git_url_titles_preemptions = get_git_urls_from_json('custom-node-list.json')
def process_git_url_title(url, title, preemptions, node_pattern):
name = os.path.basename(url)
if name.endswith(".git"):
name = name[:-4]
node_info[name] = (url, title, preemptions, node_pattern)
if not skip_update:
clone_or_pull_git_repository(url)
def process_git_stats(git_url_titles_preemptions):
GITHUB_STATS_CACHE_FILENAME = 'github-stats-cache.json'
GITHUB_STATS_FILENAME = 'github-stats.json'
github_stats = {}
try:
with open(GITHUB_STATS_CACHE_FILENAME, 'r', encoding='utf-8') as file:
github_stats = json.load(file)
except FileNotFoundError:
pass
def is_rate_limit_exceeded():
return g.rate_limiting[0] == 0
if is_rate_limit_exceeded():
print(f"GitHub API Rate Limit Exceeded: remained - {(g.rate_limiting_resettime - datetime.datetime.now().timestamp())/60:.2f} min")
else:
def renew_stat(url):
if is_rate_limit_exceeded():
return
if 'github.com' not in url:
return None
print('.', end="")
sys.stdout.flush()
try:
# Parsing the URL
parsed_url = urlparse(url)
domain = parsed_url.netloc
path = parsed_url.path
path_parts = path.strip("/").split("/")
if len(path_parts) >= 2 and domain == "github.com":
owner_repo = "/".join(path_parts[-2:])
repo = g.get_repo(owner_repo)
owner = repo.owner
now = datetime.datetime.now(datetime.timezone.utc)
author_time_diff = now - owner.created_at
last_update = repo.pushed_at.strftime("%Y-%m-%d %H:%M:%S") if repo.pushed_at else 'N/A'
item = {
"stars": repo.stargazers_count,
"last_update": last_update,
"cached_time": now.timestamp(),
"author_account_age_days": author_time_diff.days,
}
return url, item
else:
print(f"\nInvalid URL format for GitHub repository: {url}\n")
except Exception as e:
print(f"\nERROR on {url}\n{e}")
return None
# resolve unresolved urls
with concurrent.futures.ThreadPoolExecutor(11) as executor:
futures = []
for url, title, preemptions, node_pattern in git_url_titles_preemptions:
if url not in github_stats:
futures.append(executor.submit(renew_stat, url))
for future in concurrent.futures.as_completed(futures):
url_item = future.result()
if url_item is not None:
url, item = url_item
github_stats[url] = item
# renew outdated cache
outdated_urls = []
for k, v in github_stats.items():
elapsed = (datetime.datetime.now().timestamp() - v['cached_time'])
if elapsed > 60*60*12: # 12 hours
outdated_urls.append(k)
with concurrent.futures.ThreadPoolExecutor(11) as executor:
for url in outdated_urls:
futures.append(executor.submit(renew_stat, url))
for future in concurrent.futures.as_completed(futures):
url_item = future.result()
if url_item is not None:
url, item = url_item
github_stats[url] = item
with open('github-stats-cache.json', 'w', encoding='utf-8') as file:
json.dump(github_stats, file, ensure_ascii=False, indent=4)
with open(GITHUB_STATS_FILENAME, 'w', encoding='utf-8') as file:
for v in github_stats.values():
if "cached_time" in v:
del v["cached_time"]
github_stats = dict(sorted(github_stats.items()))
json.dump(github_stats, file, ensure_ascii=False, indent=4)
print(f"Successfully written to {GITHUB_STATS_FILENAME}.")
if not skip_stat_update:
process_git_stats(git_url_titles_preemptions)
with concurrent.futures.ThreadPoolExecutor(11) as executor:
for url, title, preemptions, node_pattern in git_url_titles_preemptions:
executor.submit(process_git_url_title, url, title, preemptions, node_pattern)
py_url_titles_and_pattern = get_py_urls_from_json('custom-node-list.json')
def download_and_store_info(url_title_preemptions_and_pattern):
url, title, preemptions, node_pattern = url_title_preemptions_and_pattern
name = os.path.basename(url)
if name.endswith(".py"):
node_info[name] = (url, title, preemptions, node_pattern)
try:
download_url(url, temp_dir)
except:
print(f"[ERROR] Cannot download '{url}'")
with concurrent.futures.ThreadPoolExecutor(10) as executor:
executor.map(download_and_store_info, py_url_titles_and_pattern)
return node_info
def gen_json(node_info):
# scan from .py file
node_files, node_dirs = get_nodes(temp_dir)
comfyui_path = os.path.abspath(os.path.join(temp_dir, "ComfyUI"))
node_dirs.remove(comfyui_path)
node_dirs = [comfyui_path] + node_dirs
data = {}
for dirname in node_dirs:
py_files = get_py_file_paths(dirname)
metadata = {}
nodes = set()
for py in py_files:
nodes_in_file, metadata_in_file = scan_in_file(py, dirname == "ComfyUI")
nodes.update(nodes_in_file)
metadata.update(metadata_in_file)
dirname = os.path.basename(dirname)
if 'Jovimetrix' in dirname:
pass
if len(nodes) > 0 or (dirname in node_info and node_info[dirname][3] is not None):
nodes = list(nodes)
nodes.sort()
if dirname in node_info:
git_url, title, preemptions, node_pattern = node_info[dirname]
metadata['title_aux'] = title
if preemptions is not None:
metadata['preemptions'] = preemptions
if node_pattern is not None:
metadata['nodename_pattern'] = node_pattern
data[git_url] = (nodes, metadata)
else:
print(f"WARN: {dirname} is removed from custom-node-list.json")
for file in node_files:
nodes, metadata = scan_in_file(file)
if len(nodes) > 0 or (dirname in node_info and node_info[dirname][3] is not None):
nodes = list(nodes)
nodes.sort()
file = os.path.basename(file)
if file in node_info:
url, title, preemptions, node_pattern = node_info[file]
metadata['title_aux'] = title
if preemptions is not None:
metadata['preemptions'] = preemptions
if node_pattern is not None:
metadata['nodename_pattern'] = node_pattern
data[url] = (nodes, metadata)
else:
print(f"Missing info: {file}")
# scan from node_list.json file
extensions = [name for name in os.listdir(temp_dir) if os.path.isdir(os.path.join(temp_dir, name))]
for extension in extensions:
node_list_json_path = os.path.join(temp_dir, extension, 'node_list.json')
if os.path.exists(node_list_json_path):
git_url, title, preemptions, node_pattern = node_info[extension]
with open(node_list_json_path, 'r', encoding='utf-8') as f:
try:
node_list_json = json.load(f)
except Exception as e:
print(f"\nERROR: Invalid json format '{node_list_json_path}'")
print("------------------------------------------------------")
print(e)
print("------------------------------------------------------")
metadata_in_url = {}
if git_url not in data:
nodes = set()
else:
nodes_in_url, metadata_in_url = data[git_url]
nodes = set(nodes_in_url)
for x, desc in node_list_json.items():
nodes.add(x.strip())
metadata_in_url['title_aux'] = title
if preemptions is not None:
metadata['preemptions'] = preemptions
if node_pattern is not None:
metadata_in_url['nodename_pattern'] = node_pattern
nodes = list(nodes)
nodes.sort()
data[git_url] = (nodes, metadata_in_url)
json_path = f"extension-node-map.json"
with open(json_path, "w", encoding='utf-8') as file:
json.dump(data, file, indent=4, sort_keys=True)
print("### ComfyUI Manager Node Scanner ###")
print("\n# Updating extensions\n")
updated_node_info = update_custom_nodes()
print("\n# 'extension-node-map.json' file is generated.\n")
gen_json(updated_node_info)
print("\nDONE.\n")

View File

@ -0,0 +1,39 @@
import os
import subprocess
def get_enabled_subdirectories_with_files(base_directory):
subdirs_with_files = []
for subdir in os.listdir(base_directory):
try:
full_path = os.path.join(base_directory, subdir)
if os.path.isdir(full_path) and not subdir.endswith(".disabled") and not subdir.startswith('.') and subdir != '__pycache__':
print(f"## Install dependencies for '{subdir}'")
requirements_file = os.path.join(full_path, "requirements.txt")
install_script = os.path.join(full_path, "install.py")
if os.path.exists(requirements_file) or os.path.exists(install_script):
subdirs_with_files.append((full_path, requirements_file, install_script))
except Exception as e:
print(f"EXCEPTION During Dependencies INSTALL on '{subdir}':\n{e}")
return subdirs_with_files
def install_requirements(requirements_file_path):
if os.path.exists(requirements_file_path):
subprocess.run(["pip", "install", "-r", requirements_file_path])
def run_install_script(install_script_path):
if os.path.exists(install_script_path):
subprocess.run(["python", install_script_path])
custom_nodes_directory = "custom_nodes"
subdirs_with_files = get_enabled_subdirectories_with_files(custom_nodes_directory)
for subdir, requirements_file, install_script in subdirs_with_files:
install_requirements(requirements_file)
run_install_script(install_script)

View File

@ -0,0 +1,21 @@
git clone https://github.com/comfyanonymous/ComfyUI
cd ComfyUI/custom_nodes
git clone https://github.com/ltdrdata/ComfyUI-Manager
cd ..
python -m venv venv
source venv/bin/activate
python -m pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu121
python -m pip install -r requirements.txt
python -m pip install -r custom_nodes/ComfyUI-Manager/requirements.txt
cd ..
echo "#!/bin/bash" > run_gpu.sh
echo "cd ComfyUI" >> run_gpu.sh
echo "source venv/bin/activate" >> run_gpu.sh
echo "python main.py --preview-method auto" >> run_gpu.sh
chmod +x run_gpu.sh
echo "#!/bin/bash" > run_cpu.sh
echo "cd ComfyUI" >> run_cpu.sh
echo "source venv/bin/activate" >> run_cpu.sh
echo "python main.py --preview-method auto --cpu" >> run_cpu.sh
chmod +x run_cpu.sh

View File

@ -0,0 +1,17 @@
git clone https://github.com/comfyanonymous/ComfyUI
cd ComfyUI/custom_nodes
git clone https://github.com/ltdrdata/ComfyUI-Manager
cd ..
python -m venv venv
call venv/Scripts/activate
python -m pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu121
python -m pip install -r requirements.txt
python -m pip install -r custom_nodes/ComfyUI-Manager/requirements.txt
cd ..
echo "cd ComfyUI" >> run_gpu.bat
echo "call venv/Scripts/activate" >> run_gpu.bat
echo "python main.py" >> run_gpu.bat
echo "cd ComfyUI" >> run_cpu.bat
echo "call venv/Scripts/activate" >> run_cpu.bat
echo "python main.py --cpu" >> run_cpu.bat

View File

@ -0,0 +1,2 @@
.\python_embeded\python.exe -s -m pip install gitpython
.\python_embeded\python.exe -c "import git; git.Repo.clone_from('https://github.com/ltdrdata/ComfyUI-Manager', './ComfyUI/custom_nodes/ComfyUI-Manager')"

View File

@ -0,0 +1,12 @@
import git
commit_hash = "a361cc1"
repo = git.Repo('.')
if repo.is_dirty():
repo.git.stash()
repo.git.update_ref("refs/remotes/origin/main", commit_hash)
repo.remotes.origin.fetch()
repo.git.pull("origin", "main")