HEL-892: document fixed FastH3 text-to-video reference
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
@@ -0,0 +1 @@
|
||||
{"error":"","message":"Node not found"}
|
||||
@@ -0,0 +1,32 @@
|
||||
tree 8e78753b31d405a4f33293106845998ba121f89c
|
||||
parent 2bc93c7a02c57fd1da10f94aa7331d396962d123
|
||||
author Comfy Org PR Bot <snomiao+comfy-pr@gmail.com> 1788659320 +0900
|
||||
committer GitHub <noreply@github.com> 1788659320 +0900
|
||||
gpgsig -----BEGIN PGP SIGNATURE-----
|
||||
|
||||
wsFcBAABCAAQBQJqnMZ4CRC1aQ7uu5UhlAAAm9gQABUFtBV6SWr2GzsRpGiIdsAS
|
||||
I9a+exaXQI1PY49OkqCMyNRyPm8LdBlND21DlvVpgOeV578pSp9vS7Z0GgLhi0Gv
|
||||
715KHc3aJJtBHtDGarlMhVcNLjvO6nRltKJzpXFASOTnquWsm/deeiEhH4GiY5MO
|
||||
0jf69Wl4CGiyNwznNkHRielUXPvcsyqNlGgS0M8JAkRoRap+Mmj+PPis0gY0doFR
|
||||
vA25sgPMTDmraJ+UP5kKvTlv3w1+trqK1j6Gn/SMfk+B88jrWd1DWmxY3O5uIoxg
|
||||
VBGM5jWZAWDRr1A0AW4AnwhypC+xlg5DN/iCx5E3oRNN3dQb7EYfvMAUsiokiJdH
|
||||
lhRam541TdgsUM8PecLI4e6MYr99l36p8JDhQiWVb18G1tNZPmNe8QK8qoto2VTW
|
||||
XaL9aHKh5RFGRmc9SG0CYEK+ukHDxHz0kA6KeAt0m6/lgaEwjBirUHLVD/zULdv0
|
||||
7+Av7iWO8W21/1s1DQPXMD/urDyIG2pHT9JYWp23dtEQTX5e0J1r6uZ5wFgkP/QC
|
||||
/58em5cdV0KYqSN1D5VB48i1NzNGIcvWT7izl5RRESEbnPSgkCItvZGeB3mGqvLI
|
||||
/dxojv3NCYfR68zn/Ik8mmf5B/h1ll5oddm82t+hHZVjbIZ7MMP/jJbPliwZk2hV
|
||||
yku6oDPdT0NUAcpxchgz
|
||||
=k7Qe
|
||||
-----END PGP SIGNATURE-----
|
||||
|
||||
|
||||
1.52.7 (#17090)
|
||||
|
||||
Patch version increment to 1.52.7
|
||||
|
||||
**Base branch:** `core/1.52`
|
||||
|
||||
---------
|
||||
|
||||
Co-authored-by: comfy-pr-bot <172744619+comfy-pr-bot@users.noreply.github.com>
|
||||
Co-authored-by: github-actions <github-actions@github.com>
|
||||
@@ -0,0 +1,2 @@
|
||||
From https://github.com/Comfy-Org/ComfyUI_frontend
|
||||
* tag v1.52.7 -> FETCH_HEAD
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"object": "1a7a6b82514874545dc5e8203d0bd2188c2d9b18",
|
||||
"commit": "1a7a6b82514874545dc5e8203d0bd2188c2d9b18",
|
||||
"tag": "v1.52.7"
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
tree 8e78753b31d405a4f33293106845998ba121f89c
|
||||
parent 2bc93c7a02c57fd1da10f94aa7331d396962d123
|
||||
author Comfy Org PR Bot <snomiao+comfy-pr@gmail.com> 1788659320 +0900
|
||||
committer GitHub <noreply@github.com> 1788659320 +0900
|
||||
gpgsig -----BEGIN PGP SIGNATURE-----
|
||||
|
||||
wsFcBAABCAAQBQJqnMZ4CRC1aQ7uu5UhlAAAm9gQABUFtBV6SWr2GzsRpGiIdsAS
|
||||
I9a+exaXQI1PY49OkqCMyNRyPm8LdBlND21DlvVpgOeV578pSp9vS7Z0GgLhi0Gv
|
||||
715KHc3aJJtBHtDGarlMhVcNLjvO6nRltKJzpXFASOTnquWsm/deeiEhH4GiY5MO
|
||||
0jf69Wl4CGiyNwznNkHRielUXPvcsyqNlGgS0M8JAkRoRap+Mmj+PPis0gY0doFR
|
||||
vA25sgPMTDmraJ+UP5kKvTlv3w1+trqK1j6Gn/SMfk+B88jrWd1DWmxY3O5uIoxg
|
||||
VBGM5jWZAWDRr1A0AW4AnwhypC+xlg5DN/iCx5E3oRNN3dQb7EYfvMAUsiokiJdH
|
||||
lhRam541TdgsUM8PecLI4e6MYr99l36p8JDhQiWVb18G1tNZPmNe8QK8qoto2VTW
|
||||
XaL9aHKh5RFGRmc9SG0CYEK+ukHDxHz0kA6KeAt0m6/lgaEwjBirUHLVD/zULdv0
|
||||
7+Av7iWO8W21/1s1DQPXMD/urDyIG2pHT9JYWp23dtEQTX5e0J1r6uZ5wFgkP/QC
|
||||
/58em5cdV0KYqSN1D5VB48i1NzNGIcvWT7izl5RRESEbnPSgkCItvZGeB3mGqvLI
|
||||
/dxojv3NCYfR68zn/Ik8mmf5B/h1ll5oddm82t+hHZVjbIZ7MMP/jJbPliwZk2hV
|
||||
yku6oDPdT0NUAcpxchgz
|
||||
=k7Qe
|
||||
-----END PGP SIGNATURE-----
|
||||
|
||||
|
||||
1.52.7 (#17090)
|
||||
|
||||
Patch version increment to 1.52.7
|
||||
|
||||
**Base branch:** `core/1.52`
|
||||
|
||||
---------
|
||||
|
||||
Co-authored-by: comfy-pr-bot <172744619+comfy-pr-bot@users.noreply.github.com>
|
||||
Co-authored-by: github-actions <github-actions@github.com>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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>.
|
||||
@@ -0,0 +1,244 @@
|
||||
{
|
||||
"name": "@comfyorg/comfyui-frontend",
|
||||
"version": "1.52.7",
|
||||
"private": true,
|
||||
"description": "Official front-end implementation of ComfyUI",
|
||||
"homepage": "https://comfy.org",
|
||||
"license": "GPL-3.0-only",
|
||||
"repository": "https://github.com/Comfy-Org/ComfyUI_frontend",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build:cloud": "cross-env DISTRIBUTION=cloud vite build --config vite.config.mts",
|
||||
"build:desktop": "pnpm --filter @comfyorg/desktop-ui run build",
|
||||
"build-storybook": "storybook build",
|
||||
"build:types": "vite build --config vite.types.config.mts && node scripts/prepare-types.js",
|
||||
"build:analyze": "cross-env ANALYZE_BUNDLE=true pnpm build",
|
||||
"build": "pnpm typecheck && vite build --config vite.config.mts",
|
||||
"clean": "pnpm dlx rimraf dist dist-ssr coverage playwright-report blob-report test-results node_modules/.vite apps/desktop-ui/dist apps/website/dist",
|
||||
"clean:all": "pnpm clean && pnpm dlx rimraf node_modules",
|
||||
"container:start": "scripts/start-comfyui-e2e.sh",
|
||||
"size:collect": "node scripts/size-collect.js",
|
||||
"size:report": "node scripts/size-report.js",
|
||||
"collect-i18n": "pnpm exec playwright test --config=playwright.i18n.config.ts",
|
||||
"dev:cloud": "pnpm dev:cloud:test",
|
||||
"dev:cloud:test": "cross-env DEV_SERVER_COMFYUI_URL=https://testcloud.comfy.org/ vite --config vite.config.mts",
|
||||
"dev:cloud:staging": "cross-env DEV_SERVER_COMFYUI_URL=https://stagingcloud.comfy.org/ vite --config vite.config.mts",
|
||||
"dev:cloud:prod": "cross-env DEV_SERVER_COMFYUI_URL=https://cloud.comfy.org/ vite --config vite.config.mts",
|
||||
"dev:desktop": "pnpm --filter @comfyorg/desktop-ui run dev",
|
||||
"dev:electron": "cross-env DISTRIBUTION=desktop vite --config vite.electron.config.mts",
|
||||
"dev:no-vue": "cross-env DISABLE_VUE_PLUGINS=true vite --config vite.config.mts",
|
||||
"dev:test": "cross-env VITE_USE_LEGACY_DEFAULT_GRAPH=true vite --config vite.config.mts",
|
||||
"dev": "vite --config vite.config.mts",
|
||||
"devtools:pycheck": "python3 -m compileall -q tools/devtools",
|
||||
"fallow": "fallow",
|
||||
"fallow:audit": "fallow audit",
|
||||
"format:check": "oxfmt --check",
|
||||
"format": "oxfmt --write",
|
||||
"json-schema": "tsx scripts/generate-json-schema.ts",
|
||||
"knip:no-cache": "knip",
|
||||
"knip": "knip --cache",
|
||||
"lint:fix:no-cache": "pnpm oxlint:main --fix && pnpm oxlint:audit && eslint src --fix",
|
||||
"lint:fix": "pnpm oxlint:main --fix && pnpm oxlint:audit && eslint src --cache --fix",
|
||||
"lint:no-cache": "pnpm exec stylelint '{apps,packages,src}/**/*.{css,vue}' && pnpm oxlint && eslint src",
|
||||
"lint:unstaged:fix": "git diff --name-only HEAD | grep -E '\\.(js|ts|vue|mts)$' | xargs -r eslint --cache --fix",
|
||||
"lint:unstaged": "git diff --name-only HEAD | grep -E '\\.(js|ts|vue|mts)$' | xargs -r eslint --cache",
|
||||
"lint": "pnpm stylelint && pnpm oxlint && eslint src --cache",
|
||||
"lint:desktop": "pnpm --filter @comfyorg/desktop-ui run lint",
|
||||
"locale": "tsx scripts/i18n/update-locales.ts",
|
||||
"locale:check": "tsx scripts/i18n/update-locales.ts --check",
|
||||
"oxlint:audit": "oxlint --config tools/oxlint-plugins/vitestCleanup.config.json .",
|
||||
"oxlint:main": "oxlint src browser_tests tools/oxlint-plugins --type-aware",
|
||||
"oxlint": "pnpm oxlint:main && pnpm oxlint:audit",
|
||||
"prepare": "pnpm exec husky || true && git config blame.ignoreRevsFile .git-blame-ignore-revs || true",
|
||||
"preview": "vite preview --config vite.config.mts",
|
||||
"storybook": "storybook dev -p 6006",
|
||||
"storybook:desktop": "pnpm --filter @comfyorg/desktop-ui run storybook",
|
||||
"stylelint:fix": "stylelint --cache --fix '{apps,packages,src}/**/*.{css,vue}'",
|
||||
"stylelint": "stylelint --cache '{apps,packages,src}/**/*.{css,vue}'",
|
||||
"test:browser": "pnpm exec playwright test",
|
||||
"test:browser:coverage": "cross-env COLLECT_COVERAGE=true pnpm test:browser",
|
||||
"test:browser:local": "cross-env PLAYWRIGHT_LOCAL=1 PLAYWRIGHT_TEST_URL=http://localhost:5173 pnpm test:browser",
|
||||
"custom-node-quarantine": "tsx scripts/customNodeQuarantine.ts",
|
||||
"custom-node-shard": "tsx scripts/customNodeShard.ts",
|
||||
"gen:cloud-manifest": "tsx scripts/cloud-manifest.ts",
|
||||
"test:custom-nodes": "cross-env PLAYWRIGHT_TEST_URL=http://localhost:5173 pnpm exec playwright test browser_tests/tests/customNodes/ --config playwright.chrome.config.ts --workers=1",
|
||||
"test:custom-nodes:ci": "cross-env PLAYWRIGHT_TEST_URL=http://localhost:8188 pnpm exec playwright test browser_tests/tests/customNodes/ --config playwright.chrome.config.ts --workers=1",
|
||||
"test:custom-nodes:watch": "cross-env PLAYWRIGHT_TEST_URL=http://localhost:5173 PLAYWRIGHT_LOCAL=1 SLOW_MO=300 pnpm exec playwright test browser_tests/tests/customNodes/customNode.regression.spec.ts browser_tests/tests/customNodes/connectivity.spec.ts --config playwright.chrome.config.ts --workers=1 --headed",
|
||||
"test:custom-nodes:debug": "cross-env PLAYWRIGHT_TEST_URL=http://localhost:5173 pnpm exec playwright test browser_tests/tests/customNodes/customNode.regression.spec.ts browser_tests/tests/customNodes/connectivity.spec.ts --config playwright.chrome.config.ts --workers=1 --debug",
|
||||
"test:custom-nodes:connectivity": "pnpm test:custom-nodes:debug -g \"connectivity\"",
|
||||
"test:custom-nodes:self-check": "pnpm test:custom-nodes:watch -g \"self-check\"",
|
||||
"test:coverage": "vitest run --coverage",
|
||||
"test:unit": "vitest run",
|
||||
"typecheck": "vue-tsc --noEmit",
|
||||
"typecheck:browser": "vue-tsc --project browser_tests/tsconfig.json",
|
||||
"typecheck:desktop": "pnpm --filter @comfyorg/desktop-ui run typecheck",
|
||||
"typecheck:scripts": "vue-tsc --project scripts/tsconfig.json",
|
||||
"typecheck:tools": "vue-tsc --project tools/tsconfig.json",
|
||||
"typecheck:website": "pnpm --filter @comfyorg/website run typecheck",
|
||||
"zipdist": "node scripts/zipdist.js",
|
||||
"test:custom-nodes:local": "start-server-and-test backend:custom-nodes http-get://127.0.0.1:8288/system_stats dev:custom-nodes http-get://localhost:5173 test:custom-nodes",
|
||||
"backend:custom-nodes": "sh -c 'cd \"${TEST_COMFYUI_DIR:?point at your ComfyUI checkout (README Prerequisites)}\"; cp \"$OLDPWD/browser_tests/assets/plain_video.mp4\" input/ || { echo \"could not stage plain_video.mp4 into $PWD/input - the curated VHS workflow cannot run without it\" >&2; exit 1; }; PY=python3; [ -x venv/bin/python ] && PY=venv/bin/python; [ -x .venv/bin/python ] && PY=.venv/bin/python; \"$PY\" main.py --port 8288 --multi-user --cache-none'",
|
||||
"dev:custom-nodes": "cross-env DEV_SERVER_COMFYUI_URL=http://127.0.0.1:8288 vite --config vite.config.mts --strictPort"
|
||||
},
|
||||
"dependencies": {
|
||||
"@alloc/quick-lru": "catalog:",
|
||||
"@atlaskit/pragmatic-drag-and-drop": "^1.3.1",
|
||||
"@comfyorg/comfyui-desktop-bridge-types": "workspace:*",
|
||||
"@comfyorg/comfyui-electron-types": "catalog:",
|
||||
"@comfyorg/design-system": "workspace:*",
|
||||
"@comfyorg/fbx-exporter-three": "^1.0.1",
|
||||
"@comfyorg/object-info-parser": "workspace:*",
|
||||
"@comfyorg/registry-types": "workspace:*",
|
||||
"@comfyorg/shared-frontend-utils": "workspace:*",
|
||||
"@comfyorg/tailwind-utils": "workspace:*",
|
||||
"@customerio/cdp-analytics-browser": "catalog:",
|
||||
"@datadog/browser-rum": "catalog:",
|
||||
"@floating-ui/vue": "catalog:",
|
||||
"@formkit/auto-animate": "catalog:",
|
||||
"@iconify/json": "catalog:",
|
||||
"@primeuix/utils": "catalog:",
|
||||
"@primevue/core": "catalog:",
|
||||
"@primevue/forms": "catalog:",
|
||||
"@primevue/themes": "catalog:",
|
||||
"@sentry/vue": "catalog:",
|
||||
"@sparkjsdev/spark": "catalog:",
|
||||
"@tanstack/vue-virtual": "catalog:",
|
||||
"@tiptap/core": "catalog:",
|
||||
"@tiptap/extension-link": "catalog:",
|
||||
"@tiptap/extension-table": "catalog:",
|
||||
"@tiptap/extension-table-cell": "catalog:",
|
||||
"@tiptap/extension-table-header": "catalog:",
|
||||
"@tiptap/extension-table-row": "catalog:",
|
||||
"@tiptap/pm": "catalog:",
|
||||
"@tiptap/starter-kit": "catalog:",
|
||||
"@vee-validate/zod": "catalog:",
|
||||
"@vueuse/core": "catalog:",
|
||||
"@vueuse/integrations": "catalog:",
|
||||
"@vueuse/router": "^14.4.0",
|
||||
"@xterm/addon-fit": "^0.10.0",
|
||||
"@xterm/addon-serialize": "^0.13.0",
|
||||
"@xterm/xterm": "^5.5.0",
|
||||
"ag-psd": "catalog:",
|
||||
"algoliasearch": "catalog:",
|
||||
"axios": "catalog:",
|
||||
"chart.js": "^4.5.0",
|
||||
"cva": "catalog:",
|
||||
"dompurify": "catalog:",
|
||||
"dotenv": "catalog:",
|
||||
"es-toolkit": "^1.39.9",
|
||||
"extendable-media-recorder": "^9.2.27",
|
||||
"extendable-media-recorder-wav-encoder": "^7.0.129",
|
||||
"firebase": "catalog:",
|
||||
"fuse.js": "7.0.0",
|
||||
"glob": "catalog:",
|
||||
"jsonata": "catalog:",
|
||||
"loglevel": "^1.9.2",
|
||||
"marked": "^15.0.11",
|
||||
"mediabunny": "catalog:",
|
||||
"minisearch": "catalog:",
|
||||
"pinia": "catalog:",
|
||||
"posthog-js": "catalog:",
|
||||
"primeicons": "catalog:",
|
||||
"primevue": "catalog:",
|
||||
"reka-ui": "catalog:",
|
||||
"semver": "^7.7.2",
|
||||
"three": "catalog:",
|
||||
"tiptap-markdown": "^0.8.10",
|
||||
"typegpu": "catalog:",
|
||||
"vee-validate": "catalog:",
|
||||
"vue": "catalog:",
|
||||
"vue-i18n": "catalog:",
|
||||
"vue-router": "catalog:",
|
||||
"vuefire": "catalog:",
|
||||
"wwobjloader2": "catalog:",
|
||||
"yjs": "catalog:",
|
||||
"zod": "catalog:",
|
||||
"zod-validation-error": "catalog:"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@comfyorg/ingest-types": "workspace:*",
|
||||
"@eslint/js": "catalog:",
|
||||
"@intlify/eslint-plugin-vue-i18n": "catalog:",
|
||||
"@pinia/testing": "catalog:",
|
||||
"@playwright/test": "catalog:",
|
||||
"@sentry/vite-plugin": "catalog:",
|
||||
"@storybook/addon-docs": "catalog:",
|
||||
"@storybook/addon-mcp": "catalog:",
|
||||
"@storybook/vue3": "catalog:",
|
||||
"@storybook/vue3-vite": "catalog:",
|
||||
"@tailwindcss/vite": "catalog:",
|
||||
"@testing-library/jest-dom": "catalog:",
|
||||
"@testing-library/user-event": "catalog:",
|
||||
"@testing-library/vue": "catalog:",
|
||||
"@total-typescript/shoehorn": "catalog:",
|
||||
"@types/fs-extra": "catalog:",
|
||||
"@types/jsdom": "catalog:",
|
||||
"@types/node": "catalog:",
|
||||
"@types/semver": "catalog:",
|
||||
"@types/three": "catalog:",
|
||||
"@vitejs/plugin-vue": "catalog:",
|
||||
"@vitest/coverage-v8": "catalog:",
|
||||
"@vitest/ui": "catalog:",
|
||||
"@webgpu/types": "catalog:",
|
||||
"cross-env": "catalog:",
|
||||
"eslint": "catalog:",
|
||||
"eslint-config-prettier": "catalog:",
|
||||
"eslint-import-resolver-typescript": "catalog:",
|
||||
"eslint-plugin-better-tailwindcss": "catalog:",
|
||||
"eslint-plugin-import-x": "catalog:",
|
||||
"eslint-plugin-oxlint": "catalog:",
|
||||
"eslint-plugin-playwright": "catalog:",
|
||||
"eslint-plugin-storybook": "catalog:",
|
||||
"eslint-plugin-testing-library": "catalog:",
|
||||
"eslint-plugin-unused-imports": "catalog:",
|
||||
"eslint-plugin-vue": "catalog:",
|
||||
"fallow": "catalog:",
|
||||
"fast-check": "catalog:",
|
||||
"fs-extra": "^11.2.0",
|
||||
"globals": "catalog:",
|
||||
"happy-dom": "catalog:",
|
||||
"husky": "catalog:",
|
||||
"jsdom": "catalog:",
|
||||
"jsonc-parser": "catalog:",
|
||||
"knip": "catalog:",
|
||||
"lint-staged": "catalog:",
|
||||
"markdown-table": "catalog:",
|
||||
"mixpanel-browser": "catalog:",
|
||||
"monocart-coverage-reports": "catalog:",
|
||||
"openai": "catalog:",
|
||||
"oxfmt": "catalog:",
|
||||
"oxlint": "catalog:",
|
||||
"oxlint-tsgolint": "catalog:",
|
||||
"picocolors": "catalog:",
|
||||
"postcss-html": "catalog:",
|
||||
"pretty-bytes": "catalog:",
|
||||
"rollup-plugin-visualizer": "catalog:",
|
||||
"start-server-and-test": "catalog:",
|
||||
"storybook": "catalog:",
|
||||
"stylelint": "catalog:",
|
||||
"tailwindcss": "catalog:",
|
||||
"tsx": "catalog:",
|
||||
"typescript": "catalog:",
|
||||
"typescript-eslint": "catalog:",
|
||||
"unplugin-icons": "catalog:",
|
||||
"unplugin-typegpu": "catalog:",
|
||||
"unplugin-vue-components": "catalog:",
|
||||
"uuid": "catalog:",
|
||||
"vite": "catalog:",
|
||||
"vite-plugin-dts": "catalog:",
|
||||
"vite-plugin-html": "catalog:",
|
||||
"vite-plugin-vue-devtools": "catalog:",
|
||||
"vitest": "catalog:",
|
||||
"vue-component-type-helpers": "catalog:",
|
||||
"vue-eslint-parser": "catalog:",
|
||||
"vue-tsc": "catalog:",
|
||||
"yaml": "catalog:",
|
||||
"zip-dir": "^2.0.0",
|
||||
"zod-to-json-schema": "catalog:"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=25 <26",
|
||||
"pnpm": ">=11.3"
|
||||
},
|
||||
"packageManager": "pnpm@11.13.1"
|
||||
}
|
||||
+18632
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,658 @@
|
||||
import { intersection } from 'es-toolkit/compat'
|
||||
|
||||
import { useChainCallback } from '@/composables/functional/useChainCallback'
|
||||
import { LGraphNode, LiteGraph } from '@/lib/litegraph/src/litegraph'
|
||||
import type {
|
||||
INodeInputSlot,
|
||||
INodeOutputSlot,
|
||||
ISlotType,
|
||||
LLink
|
||||
} from '@/lib/litegraph/src/litegraph'
|
||||
import type { IWidgetLocator } from '@/lib/litegraph/src/interfaces'
|
||||
import { NodeSlot } from '@/lib/litegraph/src/node/NodeSlot'
|
||||
import type {
|
||||
IBaseWidget,
|
||||
TWidgetValue
|
||||
} from '@/lib/litegraph/src/types/widgets'
|
||||
import { assetService } from '@/platform/assets/services/assetService'
|
||||
import { createAssetWidget } from '@/platform/assets/utils/createAssetWidget'
|
||||
import {
|
||||
getComboSpecComboOptions,
|
||||
isComboInputSpec
|
||||
} from '@/schemas/nodeDefSchema'
|
||||
import type { ComfyNodeDef, InputSpec } from '@/schemas/nodeDefSchema'
|
||||
import { app } from '@/scripts/app'
|
||||
import {
|
||||
ComfyWidgets,
|
||||
addValueControlWidgets,
|
||||
isValidWidgetType
|
||||
} from '@/scripts/widgets'
|
||||
import { isPrimitiveNode } from '@/renderer/utils/nodeTypeGuards'
|
||||
import { CONFIG, GET_CONFIG } from '@/services/litegraphService'
|
||||
import { mergeInputSpec } from '@/utils/nodeDefUtil'
|
||||
import { applyTextReplacements } from '@/utils/searchAndReplace'
|
||||
|
||||
import { applyFirstWidgetValueToGraph } from './widgetValuePropagation'
|
||||
|
||||
const replacePropertyName = 'Run widget replace on values'
|
||||
export class PrimitiveNode extends LGraphNode {
|
||||
controlValues?: TWidgetValue[]
|
||||
lastType?: string
|
||||
static override category: string
|
||||
constructor(title: string) {
|
||||
super(title)
|
||||
this.addOutput('connect to widget input', '*')
|
||||
this.serialize_widgets = true
|
||||
this.isVirtualNode = true
|
||||
|
||||
if (!this.properties || !(replacePropertyName in this.properties)) {
|
||||
this.addProperty(replacePropertyName, false, 'boolean')
|
||||
}
|
||||
}
|
||||
|
||||
override applyToGraph(extraLinks: LLink[] = []) {
|
||||
const sourceWidget = this.widgets?.[0]
|
||||
const graph = this.graph
|
||||
if (!sourceWidget || !graph) return
|
||||
|
||||
let v = sourceWidget.value
|
||||
if (v && this.properties[replacePropertyName]) {
|
||||
v = applyTextReplacements(graph, v as string)
|
||||
}
|
||||
applyFirstWidgetValueToGraph(this, extraLinks, () => v)
|
||||
}
|
||||
|
||||
override refreshComboInNode(defs?: Record<string, ComfyNodeDef>): void {
|
||||
const widget = this.widgets?.[0]
|
||||
if (widget?.type !== 'combo') return
|
||||
|
||||
const newValues = this._resolveComboValues(defs)
|
||||
if (newValues === undefined) return
|
||||
|
||||
widget.options.values = newValues
|
||||
|
||||
const value = widget.value
|
||||
if (
|
||||
(typeof value !== 'string' && typeof value !== 'number') ||
|
||||
!newValues.includes(value)
|
||||
) {
|
||||
widget.value = newValues[0]
|
||||
widget.callback?.(widget.value)
|
||||
}
|
||||
}
|
||||
|
||||
private _resolveComboValues(
|
||||
defs?: Record<string, ComfyNodeDef>
|
||||
): (string | number)[] | undefined {
|
||||
const fromDefs = defs ? this._comboValuesFromDefs(defs) : undefined
|
||||
if (fromDefs !== undefined) return fromDefs
|
||||
|
||||
const slotWidget = this.outputs?.[0]?.widget
|
||||
const config = slotWidget?.[GET_CONFIG]?.()
|
||||
if (!config || !isComboInputSpec(config)) return undefined
|
||||
|
||||
return getComboSpecComboOptions(config)
|
||||
}
|
||||
|
||||
private _comboValuesFromDefs(
|
||||
defs: Record<string, ComfyNodeDef>
|
||||
): (string | number)[] | undefined {
|
||||
const graph = this.graph
|
||||
const links = this.outputs?.[0]?.links
|
||||
if (!graph || !links?.length) return undefined
|
||||
|
||||
let values: (string | number)[] | undefined
|
||||
for (const linkId of links) {
|
||||
const link = graph.links.get(linkId)
|
||||
const targetNode = graph.getNodeById(link?.target_id)
|
||||
const targetType = targetNode?.type
|
||||
const targetInput = link
|
||||
? targetNode?.inputs[link.target_slot]
|
||||
: undefined
|
||||
const inputName = targetInput?.widget?.name ?? targetInput?.name
|
||||
if (!targetType || !inputName) return undefined
|
||||
|
||||
const def = defs[targetType]
|
||||
const inputSpec =
|
||||
def?.input?.required?.[inputName] ?? def?.input?.optional?.[inputName]
|
||||
if (!inputSpec || !isComboInputSpec(inputSpec)) return undefined
|
||||
|
||||
const options = getComboSpecComboOptions(inputSpec)
|
||||
values = values === undefined ? options : intersection(values, options)
|
||||
}
|
||||
|
||||
return values
|
||||
}
|
||||
|
||||
override onAfterGraphConfigured() {
|
||||
if (this.outputs[0].links?.length && !this.widgets?.length) {
|
||||
this._onFirstConnection()
|
||||
|
||||
// Populate widget values from config data
|
||||
if (this.widgets && this.widgets_values) {
|
||||
for (let i = 0; i < this.widgets_values.length; i++) {
|
||||
const w = this.widgets[i]
|
||||
if (w) {
|
||||
w.value = this.widgets_values[i]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Merge values if required
|
||||
this._mergeWidgetConfig()
|
||||
}
|
||||
}
|
||||
|
||||
override onConnectionsChange(
|
||||
_type: ISlotType,
|
||||
_index: number,
|
||||
connected: boolean
|
||||
) {
|
||||
if (app.configuringGraph) {
|
||||
// Dont run while the graph is still setting up
|
||||
return
|
||||
}
|
||||
|
||||
const links = this.outputs[0].links
|
||||
if (connected) {
|
||||
if (links?.length && !this.widgets?.length) {
|
||||
this._onFirstConnection()
|
||||
}
|
||||
} else {
|
||||
// We may have removed a link that caused the constraints to change
|
||||
this._mergeWidgetConfig()
|
||||
|
||||
if (!links?.length) {
|
||||
this.onLastDisconnect()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override onConnectOutput(
|
||||
slot: number,
|
||||
_type: string,
|
||||
input: INodeInputSlot,
|
||||
target_node: LGraphNode,
|
||||
target_slot: number
|
||||
) {
|
||||
// Fires before the link is made allowing us to reject it if it isn't valid
|
||||
// No widget, we can't connect
|
||||
if (!input.widget && !(input.type in ComfyWidgets)) {
|
||||
return false
|
||||
}
|
||||
|
||||
if (this.outputs[slot].links?.length) {
|
||||
const valid = this._isValidConnection(input)
|
||||
if (valid) {
|
||||
// On connect of additional outputs, copy our value to their widget
|
||||
this.applyToGraph([{ target_id: target_node.id, target_slot } as LLink])
|
||||
}
|
||||
return valid
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
private _onFirstConnection(recreating = false) {
|
||||
// First connection can fire before the graph is ready on initial load so random things can be missing
|
||||
if (!this.outputs[0].links || !this.graph) {
|
||||
this.onLastDisconnect()
|
||||
return
|
||||
}
|
||||
const linkId = this.outputs[0].links[0]
|
||||
const link = this.graph.links[linkId]
|
||||
if (!link) return
|
||||
|
||||
const theirNode = this.graph.getNodeById(link.target_id)
|
||||
if (!theirNode || !theirNode.inputs) return
|
||||
|
||||
const input = theirNode.inputs[link.target_slot]
|
||||
if (!input) return
|
||||
|
||||
let widget: IWidgetLocator
|
||||
if (!input.widget) {
|
||||
const inputType = input.type
|
||||
if (typeof inputType !== 'string' || !(inputType in ComfyWidgets)) return
|
||||
widget = { name: input.name, [GET_CONFIG]: () => [inputType, {}] } //fake widget
|
||||
} else {
|
||||
widget = input.widget
|
||||
}
|
||||
|
||||
const config = widget[GET_CONFIG]?.()
|
||||
if (!config) return
|
||||
|
||||
const { type } = getWidgetType(config)
|
||||
// Update our output to restrict to the widget type
|
||||
this.outputs[0].type = type
|
||||
this.outputs[0].name = type
|
||||
this.outputs[0].widget = widget
|
||||
|
||||
this._createWidget(
|
||||
widget[CONFIG] ?? config,
|
||||
theirNode,
|
||||
widget.name,
|
||||
recreating
|
||||
)
|
||||
}
|
||||
|
||||
private _createWidget(
|
||||
inputData: InputSpec,
|
||||
node: LGraphNode,
|
||||
widgetName: string,
|
||||
recreating: boolean
|
||||
) {
|
||||
let type = inputData[0]
|
||||
|
||||
if (type instanceof Array) {
|
||||
type = 'COMBO'
|
||||
}
|
||||
|
||||
// Store current size as addWidget resizes the node
|
||||
const [oldWidth, oldHeight] = this.size
|
||||
let widget: IBaseWidget
|
||||
|
||||
if (
|
||||
type === 'COMBO' &&
|
||||
assetService.shouldUseAssetBrowser(node.comfyClass, widgetName)
|
||||
) {
|
||||
widget = this._createAssetWidget(node, widgetName, inputData)
|
||||
const theirWidget = node.widgets?.find((w) => w.name === widgetName)
|
||||
if (theirWidget) widget.value = theirWidget.value
|
||||
this._finalizeWidget(widget, oldWidth, oldHeight, recreating)
|
||||
return
|
||||
}
|
||||
|
||||
if (isValidWidgetType(type)) {
|
||||
widget = (ComfyWidgets[type](this, 'value', inputData, app) || {}).widget
|
||||
} else {
|
||||
// @ts-expect-error InputSpec is not typed correctly
|
||||
widget = this.addWidget(type, 'value', null, () => {}, {})
|
||||
}
|
||||
|
||||
if (node?.widgets && widget) {
|
||||
const theirWidget = node.widgets.find((w) => w.name === widgetName)
|
||||
if (theirWidget) {
|
||||
widget.value = theirWidget.value
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
!inputData?.[1]?.control_after_generate &&
|
||||
(widget.type === 'number' || widget.type === 'combo')
|
||||
) {
|
||||
let control_value = this.widgets_values?.[1]
|
||||
if (!control_value) {
|
||||
control_value = 'fixed'
|
||||
}
|
||||
addValueControlWidgets(
|
||||
this,
|
||||
widget,
|
||||
control_value as string,
|
||||
undefined,
|
||||
inputData
|
||||
)
|
||||
if (this.widgets?.[1]) widget.linkedWidgets = [this.widgets[1]]
|
||||
|
||||
const filter = this.widgets_values?.[2]
|
||||
if (filter && this.widgets && this.widgets.length === 3) {
|
||||
this.widgets[2].value = filter
|
||||
}
|
||||
}
|
||||
|
||||
// Restore any saved control values
|
||||
const controlValues = this.controlValues
|
||||
if (
|
||||
this.widgets &&
|
||||
this.lastType === this.widgets[0]?.type &&
|
||||
controlValues?.length === this.widgets.length - 1
|
||||
) {
|
||||
for (let i = 0; i < controlValues.length; i++) {
|
||||
this.widgets[i + 1].value = controlValues[i]
|
||||
}
|
||||
}
|
||||
|
||||
this._finalizeWidget(widget, oldWidth, oldHeight, recreating)
|
||||
}
|
||||
|
||||
private _createAssetWidget(
|
||||
targetNode: LGraphNode,
|
||||
targetInputName: string,
|
||||
inputData: InputSpec
|
||||
): IBaseWidget {
|
||||
const defaultValue = inputData[1]?.default as string | undefined
|
||||
return createAssetWidget({
|
||||
node: this,
|
||||
widgetName: 'value',
|
||||
nodeTypeForBrowser: targetNode.comfyClass ?? '',
|
||||
inputNameForBrowser: targetInputName,
|
||||
defaultValue
|
||||
})
|
||||
}
|
||||
|
||||
private _finalizeWidget(
|
||||
widget: IBaseWidget,
|
||||
oldWidth: number,
|
||||
oldHeight: number,
|
||||
recreating: boolean
|
||||
) {
|
||||
widget.callback = useChainCallback(widget.callback, () => {
|
||||
this.applyToGraph()
|
||||
})
|
||||
|
||||
this.setSize([
|
||||
Math.max(this.size[0], oldWidth),
|
||||
Math.max(this.size[1], oldHeight)
|
||||
])
|
||||
|
||||
if (!recreating) {
|
||||
const sz = this.computeSize()
|
||||
if (this.size[0] < sz[0]) {
|
||||
this.size[0] = sz[0]
|
||||
}
|
||||
if (this.size[1] < sz[1]) {
|
||||
this.size[1] = sz[1]
|
||||
}
|
||||
|
||||
requestAnimationFrame(() => {
|
||||
this.onResize?.(this.size)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
recreateWidget() {
|
||||
const values = this.widgets?.map((w) => w.value)
|
||||
this._removeWidgets()
|
||||
this._onFirstConnection(true)
|
||||
if (values?.length && this.widgets) {
|
||||
for (let i = 0; i < this.widgets.length; i++)
|
||||
this.widgets[i].value = values[i]
|
||||
}
|
||||
return this.widgets?.[0]
|
||||
}
|
||||
|
||||
private _mergeWidgetConfig() {
|
||||
// Merge widget configs if the node has multiple outputs
|
||||
const output = this.outputs[0]
|
||||
const links = output.links ?? []
|
||||
|
||||
const hasConfig = !!output.widget?.[CONFIG]
|
||||
if (hasConfig) {
|
||||
delete output.widget?.[CONFIG]
|
||||
}
|
||||
|
||||
if (links?.length < 2 && hasConfig) {
|
||||
// Copy the widget options from the source
|
||||
if (links.length) {
|
||||
this.recreateWidget()
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
const config1 = output.widget?.[GET_CONFIG]?.()
|
||||
if (!config1) return
|
||||
const isNumber = config1[0] === 'INT' || config1[0] === 'FLOAT'
|
||||
if (!isNumber || !this.graph) return
|
||||
|
||||
for (const linkId of links) {
|
||||
const link = this.graph.links[linkId]
|
||||
if (!link) continue // Can be null when removing a node
|
||||
|
||||
const theirNode = this.graph.getNodeById(link.target_id)
|
||||
if (!theirNode) continue
|
||||
const theirInput = theirNode.inputs[link.target_slot]
|
||||
|
||||
// Call is valid connection so it can merge the configs when validating
|
||||
this._isValidConnection(theirInput, hasConfig)
|
||||
}
|
||||
}
|
||||
|
||||
private _isValidConnection(input: INodeInputSlot, forceUpdate?: boolean) {
|
||||
// Only allow connections where the configs match
|
||||
const output = this.outputs?.[0]
|
||||
const config2 = input.widget?.[GET_CONFIG]?.()
|
||||
if (!config2) return false
|
||||
|
||||
return !!mergeIfValid.call(
|
||||
this,
|
||||
output,
|
||||
config2,
|
||||
forceUpdate,
|
||||
this.recreateWidget
|
||||
)
|
||||
}
|
||||
|
||||
private _removeWidgets() {
|
||||
if (this.widgets) {
|
||||
// Allow widgets to cleanup
|
||||
for (const w of this.widgets) {
|
||||
if (w.onRemove) {
|
||||
w.onRemove()
|
||||
}
|
||||
}
|
||||
|
||||
// Temporarily store the current values in case the node is being recreated
|
||||
this.controlValues = []
|
||||
this.lastType = this.widgets[0]?.type
|
||||
for (let i = 1; i < this.widgets.length; i++) {
|
||||
this.controlValues.push(this.widgets[i].value)
|
||||
}
|
||||
setTimeout(() => {
|
||||
delete this.lastType
|
||||
delete this.controlValues
|
||||
}, 15)
|
||||
this.widgets.length = 0
|
||||
}
|
||||
}
|
||||
|
||||
onLastDisconnect() {
|
||||
// We can't remove + re-add the output here as if you drag a link over the same link
|
||||
// it removes, then re-adds, causing it to break
|
||||
this.outputs[0].type = '*'
|
||||
this.outputs[0].name = 'connect to widget input'
|
||||
delete this.outputs[0].widget
|
||||
|
||||
this._removeWidgets()
|
||||
}
|
||||
}
|
||||
|
||||
export function getWidgetConfig(
|
||||
slot: INodeInputSlot | INodeOutputSlot
|
||||
): InputSpec {
|
||||
return slot.widget?.[CONFIG] ?? slot.widget?.[GET_CONFIG]?.() ?? ['*', {}]
|
||||
}
|
||||
|
||||
function getConfig(this: LGraphNode, widgetName: string) {
|
||||
const { nodeData } = this.constructor
|
||||
return (
|
||||
nodeData?.input?.required?.[widgetName] ??
|
||||
nodeData?.input?.optional?.[widgetName]
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a widget to an input slot.
|
||||
* @deprecated Widget to socket conversion is no longer necessary, as they co-exist now.
|
||||
* @param node The node to convert the widget to an input slot for.
|
||||
* @param widget The widget to convert to an input slot.
|
||||
* @returns The input slot that was converted from the widget or undefined if the widget is not found.
|
||||
*/
|
||||
export function convertToInput(
|
||||
node: LGraphNode,
|
||||
widget: IBaseWidget
|
||||
): INodeInputSlot | undefined {
|
||||
console.warn(
|
||||
'Please remove call to convertToInput. Widget to socket conversion is no longer necessary, as they co-exist now.'
|
||||
)
|
||||
return node.inputs.find((slot) => slot.widget?.name === widget.name)
|
||||
}
|
||||
|
||||
function getWidgetType(config: InputSpec) {
|
||||
// Special handling for COMBO so we restrict links based on the entries
|
||||
let type = config[0]
|
||||
if (type instanceof Array) {
|
||||
type = 'COMBO'
|
||||
}
|
||||
return { type }
|
||||
}
|
||||
|
||||
export function setWidgetConfig(slot: INodeInputSlot, config?: InputSpec) {
|
||||
if (!slot.widget) return
|
||||
if (config) {
|
||||
slot.widget[GET_CONFIG] = () => config
|
||||
} else {
|
||||
delete slot.widget
|
||||
}
|
||||
|
||||
if (!(slot instanceof NodeSlot)) return
|
||||
const graph = slot.node.graph
|
||||
if (!graph) return
|
||||
const link = graph.getLink(slot.link)
|
||||
if (!link) return
|
||||
const originNode = graph.getNodeById(link.origin_id)
|
||||
if (!originNode || !isPrimitiveNode(originNode)) return
|
||||
if (config) {
|
||||
originNode.recreateWidget()
|
||||
} else if (!app.configuringGraph) {
|
||||
originNode.disconnectOutput(0)
|
||||
originNode.onLastDisconnect()
|
||||
}
|
||||
}
|
||||
|
||||
export function mergeIfValid(
|
||||
output: INodeOutputSlot | INodeInputSlot,
|
||||
config2: InputSpec,
|
||||
forceUpdate?: boolean,
|
||||
recreateWidget?: () => void,
|
||||
config1?: InputSpec
|
||||
): { customConfig: InputSpec[1] } {
|
||||
if (!config1) {
|
||||
config1 = getWidgetConfig(output)
|
||||
}
|
||||
|
||||
const customSpec = mergeInputSpec(config1, config2)
|
||||
|
||||
if (customSpec || forceUpdate) {
|
||||
if (customSpec) {
|
||||
// @ts-expect-error fixme ts strict error
|
||||
output.widget[CONFIG] = customSpec
|
||||
}
|
||||
|
||||
// @ts-expect-error fixme ts strict error
|
||||
const widget = recreateWidget?.call(this)
|
||||
// When deleting a node this can be null
|
||||
if (widget) {
|
||||
// @ts-expect-error fixme ts strict error
|
||||
const min = widget.options.min
|
||||
// @ts-expect-error fixme ts strict error
|
||||
const max = widget.options.max
|
||||
// @ts-expect-error fixme ts strict error
|
||||
if (min != null && widget.value < min) widget.value = min
|
||||
// @ts-expect-error fixme ts strict error
|
||||
if (max != null && widget.value > max) widget.value = max
|
||||
// @ts-expect-error fixme ts strict error
|
||||
widget.callback(widget.value)
|
||||
}
|
||||
}
|
||||
|
||||
return { customConfig: customSpec?.[1] ?? {} }
|
||||
}
|
||||
|
||||
app.registerExtension({
|
||||
name: 'Comfy.WidgetInputs',
|
||||
async beforeRegisterNodeDef(
|
||||
nodeType: typeof LGraphNode,
|
||||
_nodeData: ComfyNodeDef
|
||||
) {
|
||||
// @ts-expect-error adding extra property
|
||||
nodeType.prototype.convertWidgetToInput = function (this: LGraphNode) {
|
||||
console.warn(
|
||||
'Please remove call to convertWidgetToInput. Widget to socket conversion is no longer necessary, as they co-exist now.'
|
||||
)
|
||||
return false
|
||||
}
|
||||
|
||||
nodeType.prototype.onGraphConfigured = useChainCallback(
|
||||
nodeType.prototype.onGraphConfigured,
|
||||
function (this: LGraphNode) {
|
||||
if (!this.inputs) return
|
||||
this.widgets ??= []
|
||||
|
||||
for (const input of this.inputs) {
|
||||
if (input.widget) {
|
||||
const name = input.widget.name
|
||||
if (!input.widget[GET_CONFIG]) {
|
||||
input.widget[GET_CONFIG] = () => getConfig.call(this, name)
|
||||
}
|
||||
|
||||
const w = this.widgets?.find((w) => w.name === name)
|
||||
if (!w) {
|
||||
this.removeInput(this.inputs.findIndex((i) => i === input))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
nodeType.prototype.onConfigure = useChainCallback(
|
||||
nodeType.prototype.onConfigure,
|
||||
function (this: LGraphNode) {
|
||||
if (!app.configuringGraph && this.inputs) {
|
||||
// On copy + paste of nodes, ensure that widget configs are set up
|
||||
for (const input of this.inputs) {
|
||||
if (input.widget && !input.widget[GET_CONFIG]) {
|
||||
const name = input.widget.name
|
||||
input.widget[GET_CONFIG] = () => getConfig.call(this, name)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
// Double click a widget input to automatically attach a primitive
|
||||
const origOnInputDblClick = nodeType.prototype.onInputDblClick
|
||||
nodeType.prototype.onInputDblClick = function (
|
||||
this: LGraphNode,
|
||||
...[slot, ...args]: Parameters<NonNullable<typeof origOnInputDblClick>>
|
||||
) {
|
||||
const r = origOnInputDblClick?.apply(this, [slot, ...args])
|
||||
|
||||
const input = this.inputs[slot]
|
||||
if (!input.widget) {
|
||||
// Not a widget input or already handled input
|
||||
if (typeof input.type !== 'string' || !(input.type in ComfyWidgets)) {
|
||||
return r //also Not a ComfyWidgets input or combo (do nothing)
|
||||
}
|
||||
}
|
||||
|
||||
// Create a primitive node
|
||||
const node = LiteGraph.createNode('PrimitiveNode')
|
||||
const graph = app.canvas.graph
|
||||
if (!node || !graph) return r
|
||||
|
||||
graph?.add(node)
|
||||
|
||||
// Calculate a position that won't directly overlap another node
|
||||
const pos: [number, number] = [
|
||||
this.pos[0] - node.size[0] - 30,
|
||||
this.pos[1]
|
||||
]
|
||||
while (graph.getNodeOnPos(pos[0], pos[1], graph.nodes))
|
||||
pos[1] += LiteGraph.NODE_TITLE_HEIGHT
|
||||
|
||||
node.pos = pos
|
||||
node.connect(0, this, slot)
|
||||
node.title = input.name
|
||||
|
||||
return r
|
||||
}
|
||||
},
|
||||
registerCustomNodes() {
|
||||
LiteGraph.registerNodeType(
|
||||
'PrimitiveNode',
|
||||
Object.assign(PrimitiveNode, {
|
||||
title: 'Primitive'
|
||||
})
|
||||
)
|
||||
PrimitiveNode.category = 'utilities/primitive'
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,19 @@
|
||||
Copyright (C) 2013 by Javi Agenjo
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
File diff suppressed because it is too large
Load Diff
+429
@@ -0,0 +1,429 @@
|
||||
import { toLinkId } from '@/types/linkId'
|
||||
import type { LGraph } from '@/lib/litegraph/src/LGraph'
|
||||
import type { LGraphNode } from '@/lib/litegraph/src/LGraphNode'
|
||||
import type { SerializedNodeId } from '@/types/nodeId'
|
||||
import type { LinkId } from '@/lib/litegraph/src/LLink'
|
||||
import { InvalidLinkError } from '@/lib/litegraph/src/infrastructure/InvalidLinkError'
|
||||
import { useWidgetValueStore } from '@/stores/widgetValueStore'
|
||||
import { NullGraphError } from '@/lib/litegraph/src/infrastructure/NullGraphError'
|
||||
import { RecursionError } from '@/lib/litegraph/src/infrastructure/RecursionError'
|
||||
import { SlotIndexError } from '@/lib/litegraph/src/infrastructure/SlotIndexError'
|
||||
import type { ISlotType } from '@/lib/litegraph/src/interfaces'
|
||||
import { LGraphEventMode, LiteGraph } from '@/lib/litegraph/src/litegraph'
|
||||
|
||||
import type { Subgraph } from './Subgraph'
|
||||
import type { SubgraphNode } from './SubgraphNode'
|
||||
|
||||
export type ExecutionId = string
|
||||
|
||||
/**
|
||||
* Interface describing the data transfer objects used when compiling a graph for execution.
|
||||
*/
|
||||
export type ExecutableLGraphNode = Omit<
|
||||
ExecutableNodeDTO,
|
||||
'graph' | 'node' | 'subgraphNode'
|
||||
>
|
||||
|
||||
/**
|
||||
* The end result of resolving a DTO input.
|
||||
* When a widget value is returned, {@link widgetInfo} is present and {@link origin_slot} is `-1`.
|
||||
*/
|
||||
type ResolvedInput = {
|
||||
/** DTO for the node that the link originates from. */
|
||||
node: ExecutableLGraphNode
|
||||
/** Full unique execution ID of the node that the link originates from. In the case of a widget value, this is the ID of the subgraph node. */
|
||||
origin_id: ExecutionId
|
||||
/** The slot index of the output on the node that the link originates from. `-1` when widget value is set. */
|
||||
origin_slot: number
|
||||
/** Boxed widget value (e.g. for widgets). If this box is `undefined`, then an input link is connected, and widget values from the subgraph node are ignored. */
|
||||
widgetInfo?: { value: unknown }
|
||||
}
|
||||
|
||||
/**
|
||||
* Concrete implementation of {@link ExecutableLGraphNode}.
|
||||
* @remarks This is the class that is used to create the data transfer objects for executable nodes.
|
||||
*/
|
||||
export class ExecutableNodeDTO implements ExecutableLGraphNode {
|
||||
applyToGraph?(
|
||||
...args: Parameters<NonNullable<typeof this.node.applyToGraph>>
|
||||
): ReturnType<NonNullable<typeof this.node.applyToGraph>>
|
||||
|
||||
/** The graph that this node is a part of. */
|
||||
readonly graph: LGraph | Subgraph
|
||||
|
||||
inputs: { linkId: LinkId | null; name: string; type: ISlotType }[]
|
||||
|
||||
/** Backing field for {@link id}. */
|
||||
private _id: ExecutionId
|
||||
|
||||
/**
|
||||
* The path to the actual node through subgraph instances, represented as a list of all subgraph node IDs (instances),
|
||||
* followed by the actual original node ID within the subgraph. Each segment is separated by `:`.
|
||||
*
|
||||
* e.g. `1:2:3`:
|
||||
* - `1` is the node ID of the first subgraph node in the parent workflow
|
||||
* - `2` is the node ID of the second subgraph node in the first subgraph
|
||||
* - `3` is the node ID of the actual node in the subgraph definition
|
||||
*/
|
||||
get id() {
|
||||
return this._id
|
||||
}
|
||||
|
||||
get type() {
|
||||
return this.node.type
|
||||
}
|
||||
|
||||
get title() {
|
||||
return this.node.title
|
||||
}
|
||||
|
||||
get mode() {
|
||||
return this.node.mode
|
||||
}
|
||||
|
||||
get comfyClass() {
|
||||
return this.node.comfyClass
|
||||
}
|
||||
|
||||
get isVirtualNode() {
|
||||
return this.node.isVirtualNode
|
||||
}
|
||||
|
||||
get widgets() {
|
||||
return this.node.widgets
|
||||
}
|
||||
|
||||
get subgraphId() {
|
||||
return this.subgraphNode?.subgraph.id
|
||||
}
|
||||
|
||||
constructor(
|
||||
/** The actual node that this DTO wraps. */
|
||||
readonly node: LGraphNode | SubgraphNode,
|
||||
/** A list of subgraph instance node IDs from the root graph to the containing instance. @see {@link id} */
|
||||
readonly subgraphNodePath: readonly SerializedNodeId[],
|
||||
/** A flattened map of all DTOs in this node network. Subgraph instances have been expanded into their inner nodes. */
|
||||
readonly nodesByExecutionId: Map<ExecutionId, ExecutableLGraphNode>,
|
||||
/** The actual subgraph instance that contains this node, otherwise undefined. */
|
||||
readonly subgraphNode?: SubgraphNode
|
||||
) {
|
||||
if (!node.graph) throw new NullGraphError()
|
||||
|
||||
// Set the internal ID of the DTO
|
||||
this._id = [...this.subgraphNodePath, this.node.id].join(':')
|
||||
this.graph = node.graph
|
||||
this.inputs = this.node.inputs.map((x) => ({
|
||||
linkId: x.link == null ? null : toLinkId(x.link),
|
||||
name: x.name,
|
||||
type: x.type
|
||||
}))
|
||||
|
||||
// Only create a wrapper if the node has an applyToGraph method
|
||||
if (this.node.applyToGraph) {
|
||||
this.applyToGraph = (...args) => this.node.applyToGraph?.(...args)
|
||||
}
|
||||
}
|
||||
|
||||
/** Returns either the DTO itself, or the DTOs of the inner nodes of the subgraph. */
|
||||
getInnerNodes(): ExecutableLGraphNode[] {
|
||||
return this.node.isSubgraphNode()
|
||||
? this.node.getInnerNodes(this.nodesByExecutionId, this.subgraphNodePath)
|
||||
: [this]
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolves the executable node & link IDs for a given input slot.
|
||||
* @param slot The slot index of the input.
|
||||
* @param visited Leave empty unless overriding this method.
|
||||
* A set of unique IDs, used to guard against infinite recursion.
|
||||
* If overriding, ensure that the set is passed on all recursive calls.
|
||||
* @returns The node and the origin ID / slot index of the output.
|
||||
*/
|
||||
resolveInput(
|
||||
slot: number,
|
||||
visited = new Set<string>(),
|
||||
type?: ISlotType
|
||||
): ResolvedInput | undefined {
|
||||
const uniqueId = `${this.subgraphNode?.subgraph.id}:${this.node.id}[I]${slot}`
|
||||
if (visited.has(uniqueId)) {
|
||||
const nodeInfo = `${this.node.id}${this.node.title ? ` (${this.node.title})` : ''}`
|
||||
const pathInfo =
|
||||
this.subgraphNodePath.length > 0
|
||||
? ` at path ${this.subgraphNodePath.join(':')}`
|
||||
: ''
|
||||
throw new RecursionError(
|
||||
`Circular reference detected while resolving input ${slot} of node ${nodeInfo}${pathInfo}. ` +
|
||||
`This creates an infinite loop in link resolution. UniqueID: [${uniqueId}]`
|
||||
)
|
||||
}
|
||||
visited.add(uniqueId)
|
||||
|
||||
const input = this.inputs.at(slot)
|
||||
if (!input)
|
||||
throw new SlotIndexError(
|
||||
`No input found for flattened id [${this.id}] slot [${slot}]`
|
||||
)
|
||||
|
||||
// Nothing connected
|
||||
if (input.linkId == null) return
|
||||
|
||||
const link = this.graph.getLink(input.linkId)
|
||||
if (!link)
|
||||
throw new InvalidLinkError(
|
||||
`No link found in parent graph for id [${this.id}] slot [${slot}] ${input.name}`
|
||||
)
|
||||
|
||||
const { subgraphNode } = this
|
||||
|
||||
// Link goes up and out of this subgraph
|
||||
if (subgraphNode && link.originIsIoNode) {
|
||||
const subgraphNodeInput = subgraphNode.inputs.at(link.origin_slot)
|
||||
if (!subgraphNodeInput)
|
||||
throw new SlotIndexError(
|
||||
`No input found for slot [${link.origin_slot}] ${input.name}`
|
||||
)
|
||||
|
||||
// Nothing connected
|
||||
const linkId = subgraphNodeInput.link
|
||||
if (linkId == null) {
|
||||
const id = subgraphNodeInput.widgetId
|
||||
if (!id) return
|
||||
|
||||
return {
|
||||
node: this,
|
||||
origin_id: this.id,
|
||||
origin_slot: -1,
|
||||
widgetInfo: { value: useWidgetValueStore().getWidget(id)?.value }
|
||||
}
|
||||
}
|
||||
|
||||
if (!subgraphNode.graph)
|
||||
throw new NullGraphError(
|
||||
`SubgraphNode ${subgraphNode.id} has no graph during input resolution`
|
||||
)
|
||||
const outerLink = subgraphNode.graph.getLink(linkId)
|
||||
if (!outerLink)
|
||||
throw new InvalidLinkError(
|
||||
`No outer link found for slot [${link.origin_slot}] ${input.name}`
|
||||
)
|
||||
|
||||
const subgraphNodeExecutionId: ExecutionId =
|
||||
this.subgraphNodePath.join(':')
|
||||
const subgraphNodeDto = this.nodesByExecutionId.get(
|
||||
subgraphNodeExecutionId
|
||||
)
|
||||
if (!subgraphNodeDto)
|
||||
throw new Error(
|
||||
`No subgraph node DTO found for id [${subgraphNodeExecutionId}]`
|
||||
)
|
||||
|
||||
return subgraphNodeDto.resolveInput(outerLink.target_slot, visited)
|
||||
}
|
||||
|
||||
// Not part of a subgraph; use the original link
|
||||
const outputNode = this.graph.getNodeById(link.origin_id)
|
||||
if (!outputNode)
|
||||
throw new InvalidLinkError(
|
||||
`No input node found for id [${this.id}] slot [${slot}] ${input.name}`
|
||||
)
|
||||
|
||||
const outputNodeExecutionId: ExecutionId = [
|
||||
...this.subgraphNodePath,
|
||||
outputNode.id
|
||||
].join(':')
|
||||
const outputNodeDto = this.nodesByExecutionId.get(outputNodeExecutionId)
|
||||
if (!outputNodeDto)
|
||||
throw new Error(
|
||||
`No output node DTO found for id [${outputNodeExecutionId}]`
|
||||
)
|
||||
|
||||
return outputNodeDto.resolveOutput(
|
||||
link.origin_slot,
|
||||
type ?? input.type,
|
||||
visited
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines whether this output is a valid endpoint for a link (non-virtual, non-bypass).
|
||||
* @param slot The slot index of the output.
|
||||
* @param type The type of the input
|
||||
* @param visited A set of unique IDs to guard against infinite recursion. See {@link resolveInput}.
|
||||
* @returns The node and the origin ID / slot index of the output.
|
||||
*/
|
||||
resolveOutput(
|
||||
slot: number,
|
||||
type: ISlotType,
|
||||
visited: Set<string>
|
||||
): ResolvedInput | undefined {
|
||||
const uniqueId = `${this.subgraphNode?.subgraph.id}:${this.node.id}[O]${slot}`
|
||||
if (visited.has(uniqueId)) {
|
||||
const nodeInfo = `${this.node.id}${this.node.title ? ` (${this.node.title})` : ''}`
|
||||
const pathInfo =
|
||||
this.subgraphNodePath.length > 0
|
||||
? ` at path ${this.subgraphNodePath.join(':')}`
|
||||
: ''
|
||||
throw new RecursionError(
|
||||
`Circular reference detected while resolving output ${slot} of node ${nodeInfo}${pathInfo}. ` +
|
||||
`This creates an infinite loop in link resolution. UniqueID: [${uniqueId}]`
|
||||
)
|
||||
}
|
||||
visited.add(uniqueId)
|
||||
|
||||
// Muted nodes produce no output
|
||||
if (this.mode === LGraphEventMode.NEVER) return
|
||||
|
||||
// Upstreamed: Bypass nodes are bypassed using the first input with matching type
|
||||
if (this.mode === LGraphEventMode.BYPASS) {
|
||||
// Bypass nodes by finding first input with matching type
|
||||
const matchingIndex = this._getBypassSlotIndex(slot, type)
|
||||
|
||||
// No input types match - bypass not possible
|
||||
if (matchingIndex === -1) {
|
||||
console.warn(
|
||||
`[ExecutableNodeDTO.resolveOutput] No input types match type [${type}] for id [${this.id}] slot [${slot}]`,
|
||||
this
|
||||
)
|
||||
return
|
||||
}
|
||||
|
||||
return this.resolveInput(matchingIndex, visited)
|
||||
}
|
||||
|
||||
const { node } = this
|
||||
if (node.isSubgraphNode())
|
||||
return this._resolveSubgraphOutput(slot, type, visited)
|
||||
|
||||
if (node.isVirtualNode) {
|
||||
// Cross-graph virtual nodes (e.g. Set/Get) resolve their source directly.
|
||||
const virtualSource = this.node.resolveVirtualOutput?.(slot)
|
||||
if (virtualSource) {
|
||||
const inputNodeDto = [...this.nodesByExecutionId.values()].find(
|
||||
(dto) =>
|
||||
dto instanceof ExecutableNodeDTO && dto.node === virtualSource.node
|
||||
)
|
||||
if (!inputNodeDto)
|
||||
throw new Error(
|
||||
`No DTO found for virtual source node [${virtualSource.node.id}]`
|
||||
)
|
||||
|
||||
return inputNodeDto.resolveOutput(virtualSource.slot, type, visited)
|
||||
}
|
||||
const virtualLink = this.node.getInputLink(slot)
|
||||
if (virtualLink) {
|
||||
const { inputNode } = virtualLink.resolve(this.graph)
|
||||
if (!inputNode)
|
||||
throw new InvalidLinkError(
|
||||
`Virtual node failed to resolve parent [${this.id}] slot [${slot}]`
|
||||
)
|
||||
|
||||
const inputNodeExecutionId: ExecutionId = [
|
||||
...this.subgraphNodePath,
|
||||
inputNode.id
|
||||
].join(':')
|
||||
const inputNodeDto = this.nodesByExecutionId.get(inputNodeExecutionId)
|
||||
if (!inputNodeDto)
|
||||
throw new Error(`No input node DTO found for id [${inputNode.id}]`)
|
||||
|
||||
return inputNodeDto.resolveInput(virtualLink.target_slot, visited, type)
|
||||
}
|
||||
|
||||
// Virtual nodes without a matching input should be discarded.
|
||||
return
|
||||
}
|
||||
|
||||
return {
|
||||
node: this,
|
||||
origin_id: this.id,
|
||||
origin_slot: slot
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds the index of the input slot on this node that matches the given output {@link slot} index.
|
||||
* Used when bypassing nodes.
|
||||
* @param slot The output slot index on this node
|
||||
* @param type The type of the final target input (so type list matches are accurate)
|
||||
* @returns The index of the input slot on this node, otherwise `-1`.
|
||||
*/
|
||||
private _getBypassSlotIndex(slot: number, type: ISlotType) {
|
||||
const { inputs } = this
|
||||
const oppositeInput = inputs[slot]
|
||||
const outputType = this.node.outputs[slot].type
|
||||
|
||||
// Any type short circuit - match slot ID, fallback to first slot
|
||||
if (type === '*' || type === '') {
|
||||
return inputs.length > slot ? slot : 0
|
||||
}
|
||||
|
||||
// Prefer input with the same slot ID
|
||||
if (
|
||||
oppositeInput &&
|
||||
LiteGraph.isValidConnection(oppositeInput.type, outputType) &&
|
||||
LiteGraph.isValidConnection(oppositeInput.type, type)
|
||||
) {
|
||||
return slot
|
||||
}
|
||||
|
||||
// Preserve legacy behaviour; use exact match first.
|
||||
const exactMatch = inputs.findIndex((input) => input.type === type)
|
||||
if (exactMatch !== -1) return exactMatch
|
||||
|
||||
// Find first matching slot - prefer exact type
|
||||
return inputs.findIndex(
|
||||
(input) =>
|
||||
LiteGraph.isValidConnection(input.type, outputType) &&
|
||||
LiteGraph.isValidConnection(input.type, type)
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolves the link inside a subgraph node, from the subgraph IO node to the node inside the subgraph.
|
||||
* @param slot The slot index of the output on the subgraph node.
|
||||
* @param visited A set of unique IDs to guard against infinite recursion. See {@link resolveInput}.
|
||||
* @returns A DTO for the node, and the origin ID / slot index of the output.
|
||||
*/
|
||||
private _resolveSubgraphOutput(
|
||||
slot: number,
|
||||
type: ISlotType,
|
||||
visited: Set<string>
|
||||
): ResolvedInput | undefined {
|
||||
const { node } = this
|
||||
const output = node.outputs.at(slot)
|
||||
|
||||
if (!output)
|
||||
throw new SlotIndexError(
|
||||
`No output found for flattened id [${this.id}] slot [${slot}]`
|
||||
)
|
||||
if (!node.isSubgraphNode())
|
||||
throw new TypeError(`Node is not a subgraph node: ${node.id}`)
|
||||
|
||||
// Link inside the subgraph
|
||||
const innerResolved = node.resolveSubgraphOutputLink(slot)
|
||||
if (!innerResolved) return
|
||||
|
||||
const innerNode = innerResolved.outputNode
|
||||
if (!innerNode)
|
||||
throw new Error(
|
||||
`No output node found for id [${this.id}] slot [${slot}] ${output.name}`
|
||||
)
|
||||
|
||||
// Recurse into the subgraph
|
||||
const innerNodeExecutionId: ExecutionId = [
|
||||
...this.subgraphNodePath,
|
||||
node.id,
|
||||
innerNode.id
|
||||
].join(':')
|
||||
const innerNodeDto = this.nodesByExecutionId.get(innerNodeExecutionId)
|
||||
if (!innerNodeDto)
|
||||
throw new Error(
|
||||
`No inner node DTO found for id [${innerNodeExecutionId}]`
|
||||
)
|
||||
|
||||
return innerNodeDto.resolveOutput(
|
||||
innerResolved.link.origin_slot,
|
||||
type,
|
||||
visited
|
||||
)
|
||||
}
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
// Re-export Subgraph and GraphOrSubgraph from LGraph.ts to maintain compatibility
|
||||
// This is a temporary fix to resolve circular dependency issues
|
||||
export { Subgraph, type GraphOrSubgraph } from '@/lib/litegraph/src/LGraph'
|
||||
+980
@@ -0,0 +1,980 @@
|
||||
import cloneDeep from 'es-toolkit/compat/cloneDeep'
|
||||
import type { BaseLGraph, LGraph, SubgraphId } from '@/lib/litegraph/src/LGraph'
|
||||
import type { LGraphButton } from '@/lib/litegraph/src/LGraphButton'
|
||||
import type { LGraphCanvas } from '@/lib/litegraph/src/LGraphCanvas'
|
||||
import { LGraphNode } from '@/lib/litegraph/src/LGraphNode'
|
||||
import type { DrawTitleBoxOptions } from '@/lib/litegraph/src/LGraphNode'
|
||||
import { LLink } from '@/lib/litegraph/src/LLink'
|
||||
import type { ResolvedConnection } from '@/lib/litegraph/src/LLink'
|
||||
import { NullGraphError } from '@/lib/litegraph/src/infrastructure/NullGraphError'
|
||||
import { RecursionError } from '@/lib/litegraph/src/infrastructure/RecursionError'
|
||||
import type {
|
||||
ISubgraphInput,
|
||||
IWidgetLocator
|
||||
} from '@/lib/litegraph/src/interfaces'
|
||||
import { LiteGraph } from '@/lib/litegraph/src/litegraph'
|
||||
import type { INodeInputSlot, ISlotType } from '@/lib/litegraph/src/litegraph'
|
||||
import { NodeInputSlot } from '@/lib/litegraph/src/node/NodeInputSlot'
|
||||
import { NodeOutputSlot } from '@/lib/litegraph/src/node/NodeOutputSlot'
|
||||
import { UNASSIGNED_NODE_ID, toNodeId } from '@/types/nodeId'
|
||||
import type { SerializedNodeId } from '@/types/nodeId'
|
||||
import type {
|
||||
GraphOrSubgraph,
|
||||
Subgraph
|
||||
} from '@/lib/litegraph/src/subgraph/Subgraph'
|
||||
import type {
|
||||
ExportedSubgraphInstance,
|
||||
ISerialisedNode
|
||||
} from '@/lib/litegraph/src/types/serialisation'
|
||||
import { NodeSlotType } from '@/lib/litegraph/src/types/globalEnums'
|
||||
import type {
|
||||
IBaseWidget,
|
||||
TWidgetValue
|
||||
} from '@/lib/litegraph/src/types/widgets'
|
||||
import { isWidgetValue } from '@/lib/litegraph/src/types/widgets'
|
||||
import { isNodeBindable } from '@/lib/litegraph/src/utils/type'
|
||||
import { toConcreteWidget } from '@/lib/litegraph/src/widgets/widgetMap'
|
||||
import type { WidgetTypeMap } from '@/lib/litegraph/src/widgets/widgetMap'
|
||||
import { resolveConcretePromotedWidget } from '@/core/graph/subgraph/resolveConcretePromotedWidget'
|
||||
import { resolveSubgraphInputTarget } from '@/core/graph/subgraph/resolveSubgraphInputTarget'
|
||||
import { parsePreviewExposures } from '@/core/schemas/previewExposureSchema'
|
||||
import { parseProxyWidgetErrorQuarantine } from '@/core/schemas/proxyWidgetQuarantineSchema'
|
||||
import { usePreviewExposureStore } from '@/stores/previewExposureStore'
|
||||
import { useWidgetValueStore } from '@/stores/widgetValueStore'
|
||||
import { createNodeLocatorId } from '@/types/nodeIdentification'
|
||||
import type { WidgetId } from '@/types/widgetId'
|
||||
import { widgetId } from '@/types/widgetId'
|
||||
|
||||
import { ExecutableNodeDTO } from './ExecutableNodeDTO'
|
||||
import type { ExecutableLGraphNode, ExecutionId } from './ExecutableNodeDTO'
|
||||
import type { SubgraphInput } from './SubgraphInput'
|
||||
import { createBitmapCache } from './svgBitmapCache'
|
||||
|
||||
const workflowSvg = new Image()
|
||||
workflowSvg.src =
|
||||
"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' width='16' height='16'%3E%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3E%3Cpath stroke='white' stroke-linecap='round' stroke-width='1.3' d='M9.18613 3.09999H6.81377M9.18613 12.9H7.55288c-3.08678 0-5.35171-2.99581-4.60305-6.08843l.3054-1.26158M14.7486 2.1721l-.5931 2.45c-.132.54533-.6065.92789-1.1508.92789h-2.2993c-.77173 0-1.33797-.74895-1.1508-1.5221l.5931-2.45c.132-.54533.6065-.9279 1.1508-.9279h2.2993c.7717 0 1.3379.74896 1.1508 1.52211Zm-8.3033 0-.59309 2.45c-.13201.54533-.60646.92789-1.15076.92789H2.4021c-.7717 0-1.33793-.74895-1.15077-1.5221l.59309-2.45c.13201-.54533.60647-.9279 1.15077-.9279h2.29935c.77169 0 1.33792.74896 1.15076 1.52211Zm8.3033 9.8-.5931 2.45c-.132.5453-.6065.9279-1.1508.9279h-2.2993c-.77173 0-1.33797-.749-1.1508-1.5221l.5931-2.45c.132-.5453.6065-.9279 1.1508-.9279h2.2993c.7717 0 1.3379.7489 1.1508 1.5221Z'/%3E%3C/svg%3E %3C/svg%3E"
|
||||
|
||||
const workflowBitmapCache = createBitmapCache(workflowSvg, 32)
|
||||
|
||||
export class SubgraphNode extends LGraphNode implements BaseLGraph {
|
||||
declare inputs: (INodeInputSlot & Partial<ISubgraphInput>)[]
|
||||
|
||||
override readonly type: SubgraphId
|
||||
override readonly isVirtualNode = true as const
|
||||
override graph: GraphOrSubgraph | null
|
||||
|
||||
get rootGraph(): LGraph {
|
||||
if (!this.graph)
|
||||
throw new NullGraphError(`SubgraphNode ${this.id} has no graph`)
|
||||
return this.graph.rootGraph
|
||||
}
|
||||
|
||||
get isDetached(): boolean {
|
||||
return !this.graph
|
||||
}
|
||||
|
||||
override get displayType(): string {
|
||||
return 'Subgraph node'
|
||||
}
|
||||
|
||||
override isSubgraphNode(): this is SubgraphNode {
|
||||
return true
|
||||
}
|
||||
|
||||
declare widgets: IBaseWidget[]
|
||||
|
||||
/** Widgets added programmatically (e.g. addDOMWidget) outside the promotion system. */
|
||||
private readonly _extraWidgets: IBaseWidget[] = []
|
||||
|
||||
/**
|
||||
* Retained as a no-op for extension compatibility: promoted host widgets are
|
||||
* now store-backed and addressed by widgetId, so there is no view cache to
|
||||
* invalidate.
|
||||
*/
|
||||
invalidatePromotedViews(): void {}
|
||||
|
||||
private _eventAbortController = new AbortController()
|
||||
|
||||
constructor(
|
||||
graph: GraphOrSubgraph,
|
||||
readonly subgraph: Subgraph,
|
||||
instanceData: ExportedSubgraphInstance
|
||||
) {
|
||||
super(subgraph.name, subgraph.id)
|
||||
this.graph = graph
|
||||
|
||||
Object.defineProperty(this, 'widgets', {
|
||||
get: () => [
|
||||
...this.inputs.flatMap((input) => {
|
||||
const widget = this._projectPromotedWidget(input)
|
||||
return widget ? [widget] : []
|
||||
}),
|
||||
...this._extraWidgets
|
||||
],
|
||||
set: () => {
|
||||
if (import.meta.env.DEV)
|
||||
console.warn(
|
||||
'Cannot manually set widgets on SubgraphNode; use the promotion system.'
|
||||
)
|
||||
},
|
||||
configurable: true,
|
||||
enumerable: true
|
||||
})
|
||||
|
||||
const subgraphEvents = this.subgraph.events
|
||||
const { signal } = this._eventAbortController
|
||||
|
||||
subgraphEvents.addEventListener(
|
||||
'input-added',
|
||||
(e) => {
|
||||
const subgraphInput = e.detail.input
|
||||
const { name, type } = subgraphInput
|
||||
const existingInput = this.inputs.find(
|
||||
(input) =>
|
||||
input._subgraphSlot === subgraphInput ||
|
||||
(input._subgraphSlot && input._subgraphSlot.id === subgraphInput.id)
|
||||
)
|
||||
if (existingInput) {
|
||||
this._addSubgraphInputListeners(subgraphInput, existingInput)
|
||||
const linkId = subgraphInput.linkIds[0]
|
||||
if (linkId === undefined) return
|
||||
|
||||
const link = this.subgraph.getLink(linkId)
|
||||
if (!link) return
|
||||
|
||||
const { inputNode, input } = link.resolve(subgraph)
|
||||
if (!inputNode || !input) return
|
||||
|
||||
const widget = inputNode.getWidgetFromSlot(input)
|
||||
if (widget)
|
||||
this._setWidget(subgraphInput, existingInput, widget, input.widget)
|
||||
return
|
||||
}
|
||||
const input = this.addInput(name, type, {
|
||||
_subgraphSlot: subgraphInput
|
||||
})
|
||||
this.invalidatePromotedViews()
|
||||
|
||||
this._addSubgraphInputListeners(subgraphInput, input)
|
||||
},
|
||||
{ signal }
|
||||
)
|
||||
|
||||
subgraphEvents.addEventListener(
|
||||
'removing-input',
|
||||
(e) => {
|
||||
const widget = e.detail.input._widget
|
||||
if (widget) this.ensureWidgetRemoved(widget)
|
||||
|
||||
this.removeInput(e.detail.index)
|
||||
this.invalidatePromotedViews()
|
||||
this.setDirtyCanvas(true, true)
|
||||
},
|
||||
{ signal }
|
||||
)
|
||||
|
||||
subgraphEvents.addEventListener(
|
||||
'output-added',
|
||||
(e) => {
|
||||
const { name, type } = e.detail.output
|
||||
this.addOutput(name, type)
|
||||
},
|
||||
{ signal }
|
||||
)
|
||||
|
||||
subgraphEvents.addEventListener(
|
||||
'removing-output',
|
||||
(e) => {
|
||||
this.removeOutput(e.detail.index)
|
||||
this.setDirtyCanvas(true, true)
|
||||
},
|
||||
{ signal }
|
||||
)
|
||||
|
||||
subgraphEvents.addEventListener(
|
||||
'renaming-input',
|
||||
(e) => {
|
||||
const { index, newName } = e.detail
|
||||
const input = this.inputs.at(index)
|
||||
if (!input) throw new Error('Subgraph input not found')
|
||||
|
||||
input.label = newName
|
||||
// Do NOT change input.widget.name — it is the stable internal
|
||||
// identifier used by onGraphConfigured (widgetInputs.ts) to match
|
||||
// inputs to widgets. Changing it to the display label would cause
|
||||
// collisions when two promoted inputs share the same label.
|
||||
if (input._widget) input._widget.label = newName
|
||||
if (input.widgetId) {
|
||||
const state = useWidgetValueStore().getWidget(input.widgetId)
|
||||
if (state) state.label = newName
|
||||
}
|
||||
this.invalidatePromotedViews()
|
||||
this.graph?.trigger('node:slot-label:changed', {
|
||||
nodeId: this.id,
|
||||
slotType: NodeSlotType.INPUT
|
||||
})
|
||||
},
|
||||
{ signal }
|
||||
)
|
||||
|
||||
subgraphEvents.addEventListener(
|
||||
'renaming-output',
|
||||
(e) => {
|
||||
const { index, newName } = e.detail
|
||||
const output = this.outputs.at(index)
|
||||
if (!output) throw new Error('Subgraph output not found')
|
||||
|
||||
output.label = newName
|
||||
this.graph?.trigger('node:slot-label:changed', {
|
||||
nodeId: this.id,
|
||||
slotType: NodeSlotType.OUTPUT
|
||||
})
|
||||
},
|
||||
{ signal }
|
||||
)
|
||||
|
||||
this.type = subgraph.id
|
||||
this.configure(instanceData)
|
||||
|
||||
this.addTitleButton({
|
||||
name: 'enter_subgraph',
|
||||
text: '\uE93B', // Unicode for pi-window-maximize
|
||||
yOffset: 0, // No vertical offset needed, button is centered
|
||||
xOffset: -10,
|
||||
fontSize: 16
|
||||
})
|
||||
}
|
||||
|
||||
override onTitleButtonClick(
|
||||
button: LGraphButton,
|
||||
canvas: LGraphCanvas
|
||||
): void {
|
||||
if (button.name === 'enter_subgraph') {
|
||||
canvas.openSubgraph(this.subgraph, this)
|
||||
} else {
|
||||
super.onTitleButtonClick(button, canvas)
|
||||
}
|
||||
}
|
||||
|
||||
private _projectPromotedWidget(
|
||||
input: INodeInputSlot
|
||||
): IBaseWidget | undefined {
|
||||
if (input._widget) return input._widget
|
||||
|
||||
const id = input.widgetId
|
||||
if (!id) return
|
||||
|
||||
const store = useWidgetValueStore()
|
||||
const widget: IBaseWidget = {
|
||||
get name() {
|
||||
return store.getWidget(id)?.name ?? input.name
|
||||
},
|
||||
get label() {
|
||||
return store.getWidget(id)?.label ?? input.label ?? input.name
|
||||
},
|
||||
set label(next) {
|
||||
const state = store.getWidget(id)
|
||||
if (state) state.label = next
|
||||
},
|
||||
get y() {
|
||||
return store.getWidget(id)?.y ?? 0
|
||||
},
|
||||
set y(next) {
|
||||
const state = store.getWidget(id)
|
||||
if (state) state.y = next
|
||||
},
|
||||
get type() {
|
||||
return store.getWidget(id)?.type ?? 'text'
|
||||
},
|
||||
get options() {
|
||||
return store.getWidget(id)?.options ?? {}
|
||||
},
|
||||
get value() {
|
||||
const value = store.getWidget(id)?.value
|
||||
return isWidgetValue(value) ? value : undefined
|
||||
},
|
||||
set value(next) {
|
||||
store.setValue(id, next)
|
||||
},
|
||||
// Canvas edits operate on a transient concrete widget (toConcreteWidget),
|
||||
// so the value setter above is never invoked; BaseWidget.setValue writes
|
||||
// its own local state and then calls this callback, which is the only
|
||||
// bridge back to the store.
|
||||
callback(next) {
|
||||
store.setValue(id, next)
|
||||
}
|
||||
}
|
||||
Object.defineProperty(widget, 'widgetId', {
|
||||
value: id,
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
})
|
||||
input._widget = widget
|
||||
return input._widget
|
||||
}
|
||||
|
||||
private _addSubgraphInputListeners(
|
||||
subgraphInput: SubgraphInput,
|
||||
input: INodeInputSlot & Partial<ISubgraphInput>
|
||||
) {
|
||||
input._subgraphSlot = subgraphInput
|
||||
|
||||
if (
|
||||
input._listenerController &&
|
||||
typeof input._listenerController.abort === 'function'
|
||||
) {
|
||||
input._listenerController.abort()
|
||||
}
|
||||
input._listenerController = new AbortController()
|
||||
const { signal } = input._listenerController
|
||||
|
||||
subgraphInput.events.addEventListener(
|
||||
'input-connected',
|
||||
(e) => {
|
||||
input.shape = this.getSlotShape(subgraphInput, e.detail.input)
|
||||
if (!e.detail.widget || !e.detail.node) return
|
||||
|
||||
this._setWidget(
|
||||
subgraphInput,
|
||||
input,
|
||||
e.detail.widget,
|
||||
e.detail.input.widget
|
||||
)
|
||||
},
|
||||
{ signal }
|
||||
)
|
||||
|
||||
subgraphInput.events.addEventListener(
|
||||
'input-disconnected',
|
||||
() => {
|
||||
this.invalidatePromotedViews()
|
||||
input.shape = this.getSlotShape(subgraphInput)
|
||||
|
||||
const connectedWidgets = subgraphInput.getConnectedWidgets()
|
||||
if (connectedWidgets.length > 0) {
|
||||
this._resolveInputWidget(subgraphInput, input)
|
||||
this.invalidatePromotedViews()
|
||||
return
|
||||
}
|
||||
|
||||
if (input._widget) this.ensureWidgetRemoved(input._widget)
|
||||
if (input.widgetId) {
|
||||
const id = input.widgetId
|
||||
queueMicrotask(() => {
|
||||
if (this.inputs.some((input) => input.widgetId === id)) return
|
||||
useWidgetValueStore().deleteWidget(id)
|
||||
})
|
||||
}
|
||||
|
||||
delete input.pos
|
||||
delete input.widget
|
||||
delete input.widgetId
|
||||
input._widget = undefined
|
||||
this.invalidatePromotedViews()
|
||||
},
|
||||
{ signal }
|
||||
)
|
||||
}
|
||||
|
||||
private _rebindInputSubgraphSlots(): void {
|
||||
this.invalidatePromotedViews()
|
||||
|
||||
const subgraphSlots = [...this.subgraph.inputNode.slots]
|
||||
const slotsBySignature = new Map<string, SubgraphInput[]>()
|
||||
const slotsByName = new Map<string, SubgraphInput[]>()
|
||||
|
||||
for (const slot of subgraphSlots) {
|
||||
const signature = `${slot.name}:${String(slot.type)}`
|
||||
const signatureSlots = slotsBySignature.get(signature)
|
||||
if (signatureSlots) {
|
||||
signatureSlots.push(slot)
|
||||
} else {
|
||||
slotsBySignature.set(signature, [slot])
|
||||
}
|
||||
|
||||
const nameSlots = slotsByName.get(slot.name)
|
||||
if (nameSlots) {
|
||||
nameSlots.push(slot)
|
||||
} else {
|
||||
slotsByName.set(slot.name, [slot])
|
||||
}
|
||||
}
|
||||
|
||||
const assignedSlotIds = new Set<string>()
|
||||
const takeUnassignedSlot = (
|
||||
slots: SubgraphInput[] | undefined
|
||||
): SubgraphInput | undefined => {
|
||||
if (!slots) return undefined
|
||||
return slots.find((slot) => !assignedSlotIds.has(String(slot.id)))
|
||||
}
|
||||
|
||||
for (const input of this.inputs) {
|
||||
const existingSlot = input._subgraphSlot
|
||||
if (
|
||||
existingSlot &&
|
||||
this.subgraph.inputNode.slots.some((slot) => slot === existingSlot)
|
||||
) {
|
||||
assignedSlotIds.add(String(existingSlot.id))
|
||||
continue
|
||||
}
|
||||
|
||||
const signature = `${input.name}:${String(input.type)}`
|
||||
const matchedSlot =
|
||||
takeUnassignedSlot(slotsBySignature.get(signature)) ??
|
||||
takeUnassignedSlot(slotsByName.get(input.name))
|
||||
|
||||
if (matchedSlot) {
|
||||
input._subgraphSlot = matchedSlot
|
||||
assignedSlotIds.add(String(matchedSlot.id))
|
||||
} else {
|
||||
delete input._subgraphSlot
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override configure(info: ExportedSubgraphInstance): void {
|
||||
for (const input of this.inputs) {
|
||||
if (
|
||||
input._listenerController &&
|
||||
typeof input._listenerController.abort === 'function'
|
||||
) {
|
||||
input._listenerController.abort()
|
||||
}
|
||||
}
|
||||
|
||||
this.inputs.length = 0
|
||||
this.inputs.push(
|
||||
...this.subgraph.inputNode.slots.map((slot) =>
|
||||
Object.assign(
|
||||
new NodeInputSlot(
|
||||
{
|
||||
name: slot.name,
|
||||
localized_name: slot.localized_name,
|
||||
label: slot.label,
|
||||
shape: this.getSlotShape(slot),
|
||||
type: slot.type,
|
||||
link: null
|
||||
},
|
||||
this
|
||||
),
|
||||
{
|
||||
_subgraphSlot: slot
|
||||
}
|
||||
)
|
||||
)
|
||||
)
|
||||
this.invalidatePromotedViews()
|
||||
|
||||
this.outputs.length = 0
|
||||
this.outputs.push(
|
||||
...this.subgraph.outputNode.slots.map(
|
||||
(slot) =>
|
||||
new NodeOutputSlot(
|
||||
{
|
||||
name: slot.name,
|
||||
localized_name: slot.localized_name,
|
||||
label: slot.label,
|
||||
type: slot.type,
|
||||
links: null
|
||||
},
|
||||
this
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
super.configure(info)
|
||||
if (!info.widgets_values_named || !LiteGraph.namedValuesRestore)
|
||||
this._applyPromotedWidgetValues(info.widgets_values)
|
||||
}
|
||||
|
||||
private _applyPromotedWidgetValues(
|
||||
widgetValues: ExportedSubgraphInstance['widgets_values']
|
||||
): void {
|
||||
const quarantineValuesByInputName = this._readQuarantineHostValuesByName()
|
||||
|
||||
let valueIndex = 0
|
||||
for (const input of this.inputs) {
|
||||
if (!input.widgetId) continue
|
||||
const value =
|
||||
quarantineValuesByInputName.get(input.name) ??
|
||||
widgetValues?.[valueIndex]
|
||||
if (value !== undefined) {
|
||||
useWidgetValueStore().setValue(input.widgetId, value)
|
||||
}
|
||||
valueIndex += 1
|
||||
}
|
||||
}
|
||||
|
||||
private _readQuarantineHostValuesByName(): Map<string, TWidgetValue> {
|
||||
return new Map(
|
||||
parseProxyWidgetErrorQuarantine(
|
||||
this.properties.proxyWidgetErrorQuarantine
|
||||
)
|
||||
.toReversed()
|
||||
.flatMap(({ originalEntry: [sourceNodeId, name], hostValue }) =>
|
||||
sourceNodeId === '-1' &&
|
||||
hostValue !== undefined &&
|
||||
isWidgetValue(hostValue)
|
||||
? [[name, hostValue] as const]
|
||||
: []
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
override _internalConfigureAfterSlots() {
|
||||
this._rebindInputSubgraphSlots()
|
||||
|
||||
this.inputs = this.inputs.filter((input) => input._subgraphSlot)
|
||||
this.invalidatePromotedViews()
|
||||
|
||||
this._hydratePreviewExposures()
|
||||
|
||||
for (const input of this.inputs) {
|
||||
const subgraphInput = input._subgraphSlot
|
||||
if (!subgraphInput) {
|
||||
console.warn(
|
||||
`[SubgraphNode.configure] No subgraph input found for input ${input.name}, skipping`
|
||||
)
|
||||
continue
|
||||
}
|
||||
|
||||
this._addSubgraphInputListeners(subgraphInput, input)
|
||||
this._resolveInputWidget(subgraphInput, input)
|
||||
}
|
||||
}
|
||||
|
||||
private _hydratePreviewExposures() {
|
||||
const store = usePreviewExposureStore()
|
||||
const rootGraphId = this.rootGraph.id
|
||||
const hostLocator = String(this.id)
|
||||
const rawProperty = this.properties.previewExposures
|
||||
const hasExplicitProperty = Array.isArray(rawProperty)
|
||||
const fromProperty = parsePreviewExposures(rawProperty)
|
||||
if (fromProperty.length) {
|
||||
store.setExposures(rootGraphId, hostLocator, fromProperty)
|
||||
return
|
||||
}
|
||||
if (hasExplicitProperty) {
|
||||
store.setExposures(rootGraphId, hostLocator, [])
|
||||
return
|
||||
}
|
||||
const legacyKey = createNodeLocatorId(null, this.id)
|
||||
const legacy = store.getExposures(rootGraphId, legacyKey)
|
||||
if (legacy.length) {
|
||||
store.setExposures(rootGraphId, hostLocator, [...legacy])
|
||||
return
|
||||
}
|
||||
store.setExposures(rootGraphId, hostLocator, [])
|
||||
}
|
||||
|
||||
rebuildInputWidgetBindings(): void {
|
||||
this.invalidatePromotedViews()
|
||||
|
||||
for (const input of this.inputs) {
|
||||
delete input.widget
|
||||
delete input.pos
|
||||
delete input.widgetId
|
||||
this._clearPromotedWidget(input)
|
||||
const subgraphInput = input._subgraphSlot
|
||||
if (!subgraphInput) continue
|
||||
this._resolveInputWidget(subgraphInput, input)
|
||||
}
|
||||
|
||||
this.invalidatePromotedViews()
|
||||
}
|
||||
|
||||
private _resolveInputWidget(
|
||||
subgraphInput: SubgraphInput,
|
||||
input: INodeInputSlot
|
||||
) {
|
||||
for (const linkId of subgraphInput.linkIds) {
|
||||
const link = this.subgraph.getLink(linkId)
|
||||
if (!link) {
|
||||
console.warn(
|
||||
`[SubgraphNode.configure] No link found for link ID ${linkId}`,
|
||||
this
|
||||
)
|
||||
continue
|
||||
}
|
||||
|
||||
const { inputNode } = link.resolve(this.subgraph)
|
||||
if (!inputNode) {
|
||||
console.warn('Failed to resolve inputNode', link, this)
|
||||
continue
|
||||
}
|
||||
|
||||
const targetInput = inputNode.inputs.find((inp) => inp.link === linkId)
|
||||
if (!targetInput) {
|
||||
console.warn('Failed to find corresponding input', link, inputNode)
|
||||
continue
|
||||
}
|
||||
|
||||
const widget = inputNode.getWidgetFromSlot(targetInput)
|
||||
if (widget) {
|
||||
this._setWidget(subgraphInput, input, widget, targetInput.widget)
|
||||
break
|
||||
}
|
||||
|
||||
// Nested promotion: the source is itself a promoted subgraph input with
|
||||
// no concrete widget. Resolve the deepest interior widget so this input
|
||||
// still receives widget state and a widgetId.
|
||||
const nested = this._resolveNestedPromotedSource(inputNode, targetInput)
|
||||
if (nested) {
|
||||
this._setWidget(subgraphInput, input, nested.widget, targetInput.widget)
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private _resolveNestedPromotedSource(
|
||||
inputNode: LGraphNode,
|
||||
targetInput: INodeInputSlot
|
||||
): { node: LGraphNode; widget: IBaseWidget } | undefined {
|
||||
if (!inputNode.isSubgraphNode()) return undefined
|
||||
|
||||
const target = resolveSubgraphInputTarget(inputNode, targetInput.name)
|
||||
if (!target) return undefined
|
||||
|
||||
const resolved = resolveConcretePromotedWidget(
|
||||
inputNode,
|
||||
target.nodeId,
|
||||
target.widgetName
|
||||
)
|
||||
return resolved.status === 'resolved' ? resolved.resolved : undefined
|
||||
}
|
||||
|
||||
private _setWidget(
|
||||
subgraphInput: Readonly<SubgraphInput>,
|
||||
input: INodeInputSlot,
|
||||
interiorWidget: Readonly<IBaseWidget>,
|
||||
inputWidget: IWidgetLocator | undefined
|
||||
) {
|
||||
this.invalidatePromotedViews()
|
||||
|
||||
this._clearPromotedWidget(input)
|
||||
|
||||
input.widget ??= { name: subgraphInput.name }
|
||||
input.widget.name = subgraphInput.name
|
||||
if (inputWidget) Object.setPrototypeOf(input.widget, inputWidget)
|
||||
|
||||
const id = widgetId(this.rootGraph.id, this.id, subgraphInput.name)
|
||||
input.widgetId = id
|
||||
useWidgetValueStore().registerWidget(id, {
|
||||
type: interiorWidget.type,
|
||||
value: interiorWidget.value,
|
||||
options: cloneDeep(interiorWidget.options ?? {}),
|
||||
label: input.label ?? subgraphInput.name,
|
||||
serialize: interiorWidget.serialize,
|
||||
disabled: interiorWidget.disabled,
|
||||
isDOMWidget:
|
||||
'isDOMWidget' in interiorWidget &&
|
||||
typeof interiorWidget.isDOMWidget === 'boolean'
|
||||
? interiorWidget.isDOMWidget
|
||||
: undefined
|
||||
})
|
||||
input._widget =
|
||||
this.createPromotedHostWidget(input, id, interiorWidget) ??
|
||||
this._projectPromotedWidget(input)
|
||||
this._setConcreteSlots()
|
||||
|
||||
this.subgraph.events.dispatch('widget-promoted', {
|
||||
widget: interiorWidget,
|
||||
subgraphNode: this
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* App-layer hook to build a promoted DOM widget; the default falls back to the
|
||||
* store-backed projection. Litegraph core stays free of Vue/Pinia/DOM.
|
||||
*/
|
||||
protected createPromotedHostWidget(
|
||||
_input: INodeInputSlot,
|
||||
_id: WidgetId,
|
||||
_sourceWidget: Readonly<IBaseWidget>
|
||||
): IBaseWidget | undefined {
|
||||
return undefined
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs the host widget's `onRemove` (unregistering DOM widgets) and clears it.
|
||||
* Unlike {@link ensureWidgetRemoved}, dispatches no demotion event, so it is
|
||||
* safe on re-resolution.
|
||||
*/
|
||||
private _clearPromotedWidget(input: INodeInputSlot): void {
|
||||
input._widget?.onRemove?.()
|
||||
input._widget = undefined
|
||||
}
|
||||
|
||||
override onAdded(_graph: LGraph): void {
|
||||
this.invalidatePromotedViews()
|
||||
}
|
||||
|
||||
/**
|
||||
* @param name The name of the input slot.
|
||||
* @param type The type of the input slot.
|
||||
* @param inputProperties Properties that are directly assigned to the created input. Default: a new, empty object.
|
||||
* @returns The new input slot.
|
||||
*/
|
||||
override addInput<TInput extends Partial<ISubgraphInput>>(
|
||||
name: string,
|
||||
type: ISlotType,
|
||||
inputProperties: TInput = {} as TInput
|
||||
): INodeInputSlot & TInput {
|
||||
return super.addInput(name, type, inputProperties)
|
||||
}
|
||||
|
||||
override getSlotFromWidget(
|
||||
widget: IBaseWidget | undefined
|
||||
): INodeInputSlot | undefined {
|
||||
if (widget?.widgetId) {
|
||||
const promotedInput = this.inputs.find(
|
||||
(input) => input.widgetId === widget.widgetId
|
||||
)
|
||||
if (promotedInput) return promotedInput
|
||||
}
|
||||
return super.getSlotFromWidget(widget)
|
||||
}
|
||||
|
||||
override getWidgetFromSlot(slot: INodeInputSlot): IBaseWidget | undefined {
|
||||
if (slot._widget) return slot._widget
|
||||
return super.getWidgetFromSlot(slot)
|
||||
}
|
||||
|
||||
override getInputLink(slot: number): LLink | null {
|
||||
const innerLink = this.subgraph.outputNode.slots[slot].getLinks().at(0)
|
||||
if (!innerLink) {
|
||||
console.warn(
|
||||
`SubgraphNode.getInputLink: no inner link found for slot ${slot}`
|
||||
)
|
||||
return null
|
||||
}
|
||||
|
||||
const newLink = LLink.create(innerLink)
|
||||
newLink.origin_id = toNodeId(`${this.id}:${innerLink.origin_id}`)
|
||||
newLink.origin_slot = innerLink.origin_slot
|
||||
|
||||
return newLink
|
||||
}
|
||||
|
||||
/**
|
||||
* @param slot The slot index
|
||||
* @returns The resolved connections, or undefined if no input node is found.
|
||||
*/
|
||||
resolveSubgraphInputLinks(slot: number): ResolvedConnection[] {
|
||||
const inputSlot = this.subgraph.inputNode.slots[slot]
|
||||
const innerLinks = inputSlot.getLinks()
|
||||
if (innerLinks.length === 0) {
|
||||
console.warn(
|
||||
`[SubgraphNode.resolveSubgraphInputLinks] No inner links found for input slot [${slot}] ${inputSlot.name}`,
|
||||
this
|
||||
)
|
||||
return []
|
||||
}
|
||||
return innerLinks.map((link) => link.resolve(this.subgraph))
|
||||
}
|
||||
|
||||
/**
|
||||
* @param slot The slot index
|
||||
* @returns The output node if found, otherwise undefined.
|
||||
*/
|
||||
resolveSubgraphOutputLink(slot: number): ResolvedConnection | undefined {
|
||||
const outputSlot = this.subgraph.outputNode.slots[slot]
|
||||
const innerLink = outputSlot.getLinks().at(0)
|
||||
if (innerLink) {
|
||||
return innerLink.resolve(this.subgraph)
|
||||
}
|
||||
console.warn(
|
||||
`[SubgraphNode.resolveSubgraphOutputLink] No inner link found for output slot [${slot}] ${outputSlot.name}`,
|
||||
this
|
||||
)
|
||||
}
|
||||
|
||||
override getInnerNodes(
|
||||
executableNodes: Map<ExecutionId, ExecutableLGraphNode>,
|
||||
subgraphNodePath: readonly SerializedNodeId[] = [],
|
||||
nodes: ExecutableLGraphNode[] = [],
|
||||
visited = new Set<SubgraphNode>()
|
||||
): ExecutableLGraphNode[] {
|
||||
if (visited.has(this)) {
|
||||
const nodeInfo = `${this.id}${this.title ? ` (${this.title})` : ''}`
|
||||
const subgraphInfo = `'${this.subgraph.name || 'Unnamed Subgraph'}'`
|
||||
const depth = subgraphNodePath.length
|
||||
throw new RecursionError(
|
||||
`Circular reference detected at depth ${depth} in node ${nodeInfo} of subgraph ${subgraphInfo}. ` +
|
||||
`This creates an infinite loop in the subgraph hierarchy.`
|
||||
)
|
||||
}
|
||||
visited.add(this)
|
||||
|
||||
const subgraphInstanceIdPath = [...subgraphNodePath, this.id]
|
||||
|
||||
const parentSubgraphNode = this.rootGraph
|
||||
.resolveSubgraphIdPath(subgraphNodePath.map(toNodeId))
|
||||
.at(-1)
|
||||
const subgraphNodeDto = new ExecutableNodeDTO(
|
||||
this,
|
||||
subgraphNodePath,
|
||||
executableNodes,
|
||||
parentSubgraphNode
|
||||
)
|
||||
executableNodes.set(subgraphNodeDto.id, subgraphNodeDto)
|
||||
|
||||
for (const node of this.subgraph.nodes) {
|
||||
if ('getInnerNodes' in node && node.getInnerNodes) {
|
||||
node.getInnerNodes(
|
||||
executableNodes,
|
||||
subgraphInstanceIdPath,
|
||||
nodes,
|
||||
new Set(visited)
|
||||
)
|
||||
} else {
|
||||
const aVeryRealNode = new ExecutableNodeDTO(
|
||||
node,
|
||||
subgraphInstanceIdPath,
|
||||
executableNodes,
|
||||
this
|
||||
)
|
||||
executableNodes.set(aVeryRealNode.id, aVeryRealNode)
|
||||
nodes.push(aVeryRealNode)
|
||||
}
|
||||
}
|
||||
return nodes
|
||||
}
|
||||
|
||||
override addCustomWidget<TPlainWidget extends IBaseWidget>(
|
||||
customWidget: TPlainWidget
|
||||
): TPlainWidget | WidgetTypeMap[TPlainWidget['type']] {
|
||||
const widget = toConcreteWidget(customWidget, this, false) ?? customWidget
|
||||
this._extraWidgets.push(widget)
|
||||
this._widgetSlotsDirty = true
|
||||
|
||||
if (this.id !== UNASSIGNED_NODE_ID && isNodeBindable(widget)) {
|
||||
widget.setNodeId(this.id)
|
||||
}
|
||||
|
||||
return widget
|
||||
}
|
||||
|
||||
override removeWidget(widget: IBaseWidget): void {
|
||||
this.ensureWidgetRemoved(widget)
|
||||
}
|
||||
|
||||
override ensureWidgetRemoved(widget: IBaseWidget): void {
|
||||
widget.onRemove?.()
|
||||
|
||||
const index = this._extraWidgets.indexOf(widget)
|
||||
if (index !== -1) {
|
||||
this._extraWidgets.splice(index, 1)
|
||||
this._widgetSlotsDirty = true
|
||||
return
|
||||
}
|
||||
|
||||
this.subgraph.events.dispatch('widget-demoted', {
|
||||
widget,
|
||||
subgraphNode: this
|
||||
})
|
||||
}
|
||||
|
||||
override onRemoved(): void {
|
||||
this._eventAbortController.abort()
|
||||
|
||||
for (const input of this.inputs) {
|
||||
if (
|
||||
input._listenerController &&
|
||||
typeof input._listenerController.abort === 'function'
|
||||
) {
|
||||
input._listenerController.abort()
|
||||
}
|
||||
this._clearPromotedWidget(input)
|
||||
}
|
||||
for (const widget of this._extraWidgets) widget.onRemove?.()
|
||||
}
|
||||
override drawTitleBox(
|
||||
ctx: CanvasRenderingContext2D,
|
||||
{
|
||||
scale,
|
||||
low_quality = false,
|
||||
title_height = LiteGraph.NODE_TITLE_HEIGHT,
|
||||
box_size = 10
|
||||
}: DrawTitleBoxOptions
|
||||
): void {
|
||||
if (this.onDrawTitleBox) {
|
||||
this.onDrawTitleBox(ctx, title_height, this.renderingSize, scale)
|
||||
return
|
||||
}
|
||||
ctx.save()
|
||||
ctx.fillStyle = '#3b82f6'
|
||||
ctx.beginPath()
|
||||
ctx.roundRect(6, -24.5, 22, 20, 5)
|
||||
ctx.fill()
|
||||
if (!low_quality) {
|
||||
ctx.translate(25, 23)
|
||||
ctx.scale(-1.5, 1.5)
|
||||
ctx.drawImage(
|
||||
workflowBitmapCache.get(),
|
||||
0,
|
||||
-title_height,
|
||||
box_size,
|
||||
box_size
|
||||
)
|
||||
}
|
||||
ctx.restore()
|
||||
}
|
||||
|
||||
override serialize(): ISerialisedNode {
|
||||
const serialized = super.serialize()
|
||||
const serializedProperties = { ...(serialized.properties ?? {}) }
|
||||
const rootGraphId = this.rootGraph.id
|
||||
const hostLocator = String(this.id)
|
||||
|
||||
const previewExposures = usePreviewExposureStore().getExposures(
|
||||
rootGraphId,
|
||||
hostLocator
|
||||
)
|
||||
serializedProperties.previewExposures = previewExposures.map((entry) => ({
|
||||
...entry
|
||||
}))
|
||||
|
||||
const quarantine = parseProxyWidgetErrorQuarantine(
|
||||
this.properties.proxyWidgetErrorQuarantine
|
||||
)
|
||||
if (quarantine.length === 0) {
|
||||
delete serializedProperties.proxyWidgetErrorQuarantine
|
||||
} else {
|
||||
serializedProperties.proxyWidgetErrorQuarantine = quarantine.map(
|
||||
(entry) => ({ ...entry })
|
||||
)
|
||||
}
|
||||
|
||||
serialized.properties = serializedProperties
|
||||
|
||||
const widgetValues = this.inputs.flatMap((input) => {
|
||||
if (!input.widgetId) return []
|
||||
const value = useWidgetValueStore().getWidget(input.widgetId)?.value
|
||||
return [isWidgetValue(value) ? value : undefined]
|
||||
})
|
||||
|
||||
if (widgetValues.some((value) => value !== undefined)) {
|
||||
serialized.widgets_values = widgetValues
|
||||
} else {
|
||||
delete serialized.widgets_values
|
||||
}
|
||||
|
||||
return serialized
|
||||
}
|
||||
|
||||
override clone() {
|
||||
const clone = super.clone()
|
||||
|
||||
// TODO: Consider deep cloning subgraphs here.
|
||||
|
||||
return clone
|
||||
}
|
||||
getSlotShape(slot: SubgraphInput, extraInput?: INodeInputSlot) {
|
||||
const shapes = slot.linkIds.map(
|
||||
(id) => this.subgraph.links[id]?.resolve(this.subgraph)?.input?.shape
|
||||
)
|
||||
if (extraInput) shapes.push(extraInput.shape)
|
||||
return shapes.every((shape) => shape === shapes[0]) ? shapes[0] : undefined
|
||||
}
|
||||
}
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
import type { IBooleanWidget } from '@/lib/litegraph/src/types/widgets'
|
||||
|
||||
import { BaseWidget } from './BaseWidget'
|
||||
import type { DrawWidgetOptions, WidgetEventOptions } from './BaseWidget'
|
||||
|
||||
export class BooleanWidget
|
||||
extends BaseWidget<IBooleanWidget>
|
||||
implements IBooleanWidget
|
||||
{
|
||||
override type = 'toggle' as const
|
||||
|
||||
override drawWidget(
|
||||
ctx: CanvasRenderingContext2D,
|
||||
options: DrawWidgetOptions
|
||||
) {
|
||||
const { width, showText = true } = options
|
||||
const { height, y } = this
|
||||
const { margin } = BaseWidget
|
||||
|
||||
this.drawWidgetShape(ctx, options)
|
||||
|
||||
ctx.fillStyle = this.value ? '#89A' : '#333'
|
||||
ctx.beginPath()
|
||||
ctx.arc(width - margin * 2, y + height * 0.5, height * 0.36, 0, Math.PI * 2)
|
||||
ctx.fill()
|
||||
|
||||
if (showText) {
|
||||
this.drawLabel(ctx, margin * 2)
|
||||
this.drawValue(ctx, width - 40)
|
||||
}
|
||||
}
|
||||
|
||||
drawLabel(ctx: CanvasRenderingContext2D, x: number): void {
|
||||
// Draw label
|
||||
ctx.fillStyle = this.secondary_text_color
|
||||
const { displayName } = this
|
||||
if (displayName) ctx.fillText(displayName, x, this.labelBaseline)
|
||||
}
|
||||
|
||||
drawValue(ctx: CanvasRenderingContext2D, x: number): void {
|
||||
// Draw value
|
||||
ctx.fillStyle = this.value ? this.text_color : this.secondary_text_color
|
||||
ctx.textAlign = 'right'
|
||||
const value = this.value
|
||||
? this.options.on || 'true'
|
||||
: this.options.off || 'false'
|
||||
ctx.fillText(value, x, this.labelBaseline)
|
||||
}
|
||||
|
||||
override onClick(options: WidgetEventOptions) {
|
||||
this.setValue(!this.value, options)
|
||||
}
|
||||
}
|
||||
+94
@@ -0,0 +1,94 @@
|
||||
import type { INumericWidget } from '@/lib/litegraph/src/types/widgets'
|
||||
import { evaluateInput, getWidgetStep } from '@/lib/litegraph/src/utils/widget'
|
||||
|
||||
import { BaseSteppedWidget } from './BaseSteppedWidget'
|
||||
import type { WidgetEventOptions } from './BaseWidget'
|
||||
|
||||
export class NumberWidget
|
||||
extends BaseSteppedWidget<INumericWidget>
|
||||
implements INumericWidget
|
||||
{
|
||||
override type = 'number' as const
|
||||
|
||||
override get _displayValue() {
|
||||
if (this.computedDisabled) return ''
|
||||
return Number(this.value).toFixed(
|
||||
this.options.precision !== undefined ? this.options.precision : 3
|
||||
)
|
||||
}
|
||||
|
||||
override canIncrement(): boolean {
|
||||
const { max } = this.options
|
||||
return max == null || this.value < max
|
||||
}
|
||||
|
||||
override canDecrement(): boolean {
|
||||
const { min } = this.options
|
||||
return min == null || this.value > min
|
||||
}
|
||||
|
||||
override incrementValue(options: WidgetEventOptions): void {
|
||||
this.setValue(this.value + getWidgetStep(this.options), options)
|
||||
}
|
||||
|
||||
override decrementValue(options: WidgetEventOptions): void {
|
||||
this.setValue(this.value - getWidgetStep(this.options), options)
|
||||
}
|
||||
|
||||
override setValue(value: number, options: WidgetEventOptions) {
|
||||
let newValue = value
|
||||
if (this.options.min != null && newValue < this.options.min) {
|
||||
newValue = this.options.min
|
||||
}
|
||||
if (this.options.max != null && newValue > this.options.max) {
|
||||
newValue = this.options.max
|
||||
}
|
||||
super.setValue(newValue, options)
|
||||
}
|
||||
|
||||
override onClick({ e, node, canvas }: WidgetEventOptions) {
|
||||
const x = e.canvasX - node.pos[0]
|
||||
const width = this.width || node.size[0]
|
||||
|
||||
// Determine if clicked on left/right arrows
|
||||
const delta = x < 40 ? -1 : x > width - 40 ? 1 : 0
|
||||
|
||||
if (delta) {
|
||||
// Handle left/right arrow clicks
|
||||
this.setValue(this.value + delta * getWidgetStep(this.options), {
|
||||
e,
|
||||
node,
|
||||
canvas
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
// Handle center click - show prompt
|
||||
canvas.prompt(
|
||||
'Value',
|
||||
this.value,
|
||||
(v: string) => {
|
||||
const parsed = evaluateInput(v)
|
||||
if (parsed !== undefined) this.setValue(parsed, { e, node, canvas })
|
||||
},
|
||||
e
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles drag events for the number widget
|
||||
* @param options The options for handling the drag event
|
||||
*/
|
||||
override onDrag({ e, node, canvas }: WidgetEventOptions) {
|
||||
const width = this.width || node.width
|
||||
const x = e.canvasX - node.pos[0]
|
||||
const delta = x < 40 ? -1 : x > width - 40 ? 1 : 0
|
||||
|
||||
if (delta && x > -3 && x < width + 3) return
|
||||
this.setValue(this.value + (e.deltaX ?? 0) * getWidgetStep(this.options), {
|
||||
e,
|
||||
node,
|
||||
canvas
|
||||
})
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,256 @@
|
||||
import { t } from '@/i18n'
|
||||
import { type LGraphNode, isComboWidget } from '@/lib/litegraph/src/litegraph'
|
||||
import type {
|
||||
IBaseWidget,
|
||||
IComboWidget,
|
||||
IStringWidget
|
||||
} from '@/lib/litegraph/src/types/widgets'
|
||||
import { nextValueForLinkedTarget } from './valueControl'
|
||||
import { useSettingStore } from '@/platform/settings/settingStore'
|
||||
import { dynamicWidgets } from '@/core/graph/widgets/dynamicWidgets'
|
||||
import { useBooleanWidget } from '@/renderer/extensions/vueNodes/widgets/composables/useBooleanWidget'
|
||||
import { useBoundingBoxWidget } from '@/renderer/extensions/vueNodes/widgets/composables/useBoundingBoxWidget'
|
||||
import { useCurveWidget } from '@/renderer/extensions/vueNodes/widgets/composables/useCurveWidget'
|
||||
import { useChartWidget } from '@/renderer/extensions/vueNodes/widgets/composables/useChartWidget'
|
||||
import { useColorWidget } from '@/renderer/extensions/vueNodes/widgets/composables/useColorWidget'
|
||||
import { useComboWidget } from '@/renderer/extensions/vueNodes/widgets/composables/useComboWidget'
|
||||
import { useCompositorWidget } from '@/renderer/extensions/vueNodes/widgets/composables/useCompositorWidget'
|
||||
import { useFloatWidget } from '@/renderer/extensions/vueNodes/widgets/composables/useFloatWidget'
|
||||
import { useGalleriaWidget } from '@/renderer/extensions/vueNodes/widgets/composables/useGalleriaWidget'
|
||||
import { useBoundingBoxesWidget } from '@/renderer/extensions/vueNodes/widgets/composables/useBoundingBoxesWidget'
|
||||
import { useColorsWidget } from '@/renderer/extensions/vueNodes/widgets/composables/useColorsWidget'
|
||||
import { useImageCompareWidget } from '@/renderer/extensions/vueNodes/widgets/composables/useImageCompareWidget'
|
||||
import { useImageUploadWidget } from '@/renderer/extensions/vueNodes/widgets/composables/useImageUploadWidget'
|
||||
import { useIntWidget } from '@/renderer/extensions/vueNodes/widgets/composables/useIntWidget'
|
||||
import { useMarkdownWidget } from '@/renderer/extensions/vueNodes/widgets/composables/useMarkdownWidget'
|
||||
import { usePainterWidget } from '@/renderer/extensions/vueNodes/widgets/composables/usePainterWidget'
|
||||
import { useRangeWidget } from '@/renderer/extensions/vueNodes/widgets/composables/useRangeWidget'
|
||||
import { useResolutionPreviewWidget } from '@/renderer/extensions/vueNodes/widgets/composables/useResolutionPreviewWidget'
|
||||
import { useStringWidget } from '@/renderer/extensions/vueNodes/widgets/composables/useStringWidget'
|
||||
import { useTextareaWidget } from '@/renderer/extensions/vueNodes/widgets/composables/useTextareaWidget'
|
||||
import { useVideoEditWidget } from '@/renderer/extensions/vueNodes/widgets/composables/useVideoEditWidget'
|
||||
import { transformInputSpecV1ToV2 } from '@/schemas/nodeDef/migration'
|
||||
import type { InputSpec as InputSpecV2 } from '@/schemas/nodeDef/nodeDefSchemaV2'
|
||||
import type { InputSpec } from '@/schemas/nodeDefSchema'
|
||||
|
||||
import type { ComfyApp } from './app'
|
||||
import { IS_CONTROL_WIDGET } from './controlWidgetMarker'
|
||||
import './domWidget'
|
||||
import './errorNodeWidgets'
|
||||
|
||||
export { IS_CONTROL_WIDGET }
|
||||
|
||||
export type ComfyWidgetConstructorV2 = (
|
||||
node: LGraphNode,
|
||||
inputSpec: InputSpecV2
|
||||
) => IBaseWidget
|
||||
|
||||
export type ComfyWidgetConstructor = (
|
||||
node: LGraphNode,
|
||||
inputName: string,
|
||||
inputData: InputSpec,
|
||||
app: ComfyApp,
|
||||
widgetName?: string
|
||||
) => { widget: IBaseWidget; minWidth?: number; minHeight?: number }
|
||||
|
||||
/**
|
||||
* Transforms a V2 widget constructor to a V1 widget constructor.
|
||||
* @param widgetConstructorV2 The V2 widget constructor to transform.
|
||||
* @returns The transformed V1 widget constructor.
|
||||
*/
|
||||
const transformWidgetConstructorV2ToV1 = (
|
||||
widgetConstructorV2: ComfyWidgetConstructorV2
|
||||
): ComfyWidgetConstructor => {
|
||||
return (node, inputName, inputData) => {
|
||||
const inputSpec = transformInputSpecV1ToV2(inputData, {
|
||||
name: inputName
|
||||
})
|
||||
const widget = widgetConstructorV2(node, inputSpec)
|
||||
return {
|
||||
widget,
|
||||
minWidth: widget.options.minNodeSize?.[0],
|
||||
minHeight: widget.options.minNodeSize?.[1]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function controlValueRunBefore() {
|
||||
return useSettingStore().get('Comfy.WidgetControlMode') === 'before'
|
||||
}
|
||||
|
||||
export function updateControlWidgetLabel(widget: IBaseWidget) {
|
||||
if (controlValueRunBefore()) {
|
||||
widget.label = t('g.control_before_generate')
|
||||
} else {
|
||||
widget.label = t('g.control_after_generate')
|
||||
}
|
||||
}
|
||||
|
||||
const HAS_EXECUTED = Symbol()
|
||||
|
||||
export function addValueControlWidget(
|
||||
node: LGraphNode,
|
||||
targetWidget: IBaseWidget,
|
||||
defaultValue?: string,
|
||||
_values?: unknown,
|
||||
widgetName?: string,
|
||||
inputData?: InputSpec
|
||||
): IComboWidget {
|
||||
let name = inputData?.[1]?.control_after_generate
|
||||
if (typeof name !== 'string') {
|
||||
name = widgetName
|
||||
}
|
||||
const widgets = addValueControlWidgets(
|
||||
node,
|
||||
targetWidget,
|
||||
defaultValue ?? 'randomize',
|
||||
{
|
||||
addFilterList: false,
|
||||
controlAfterGenerateName: name
|
||||
},
|
||||
inputData
|
||||
)
|
||||
return widgets[0]
|
||||
}
|
||||
|
||||
export function addValueControlWidgets(
|
||||
node: LGraphNode,
|
||||
targetWidget: IBaseWidget,
|
||||
defaultValue?: string,
|
||||
options?: Record<string, any>,
|
||||
inputData?: InputSpec
|
||||
): [IComboWidget, ...IStringWidget[]] {
|
||||
if (!defaultValue) defaultValue = 'randomize'
|
||||
if (!options) options = {}
|
||||
|
||||
const getName = (defaultName: string, optionName: string) => {
|
||||
let name = defaultName
|
||||
if (options[optionName]) {
|
||||
name = options[optionName]
|
||||
} else if (typeof inputData?.[1]?.[defaultName] === 'string') {
|
||||
name = inputData?.[1]?.[defaultName]
|
||||
} else if (inputData?.[1]?.control_prefix) {
|
||||
name = inputData?.[1]?.control_prefix + ' ' + name
|
||||
}
|
||||
return name
|
||||
}
|
||||
|
||||
const valueControl = node.addWidget(
|
||||
'combo',
|
||||
getName('control_after_generate', 'controlAfterGenerateName'),
|
||||
defaultValue,
|
||||
function () {},
|
||||
{
|
||||
values: ['fixed', 'increment', 'decrement', 'randomize'],
|
||||
serialize: false, // Don't include this in prompt.
|
||||
canvasOnly: true
|
||||
}
|
||||
) as IComboWidget
|
||||
|
||||
valueControl.tooltip =
|
||||
'Allows the linked widget to be changed automatically, for example randomizing the noise seed.'
|
||||
valueControl[IS_CONTROL_WIDGET] = true
|
||||
updateControlWidgetLabel(valueControl)
|
||||
Object.defineProperty(valueControl, 'disabled', {
|
||||
get: () => targetWidget.computedDisabled
|
||||
})
|
||||
const widgets: [IComboWidget, ...IStringWidget[]] = [valueControl]
|
||||
|
||||
const isCombo = isComboWidget(targetWidget)
|
||||
let comboFilter: IStringWidget
|
||||
if (isCombo && valueControl.options.values) {
|
||||
// @ts-expect-error Combo widget values may be a dictionary or legacy function type
|
||||
valueControl.options.values.push('increment-wrap')
|
||||
}
|
||||
if (isCombo && options.addFilterList !== false) {
|
||||
comboFilter = node.addWidget(
|
||||
'string',
|
||||
getName('control_filter_list', 'controlFilterListName'),
|
||||
'',
|
||||
function () {},
|
||||
{
|
||||
serialize: false // Don't include this in prompt.
|
||||
}
|
||||
) as IStringWidget
|
||||
updateControlWidgetLabel(comboFilter)
|
||||
comboFilter.tooltip =
|
||||
"Allows for filtering the list of values when changing the value via the control generate mode. Allows for RegEx matches in the format /abc/ to only filter to values containing 'abc'."
|
||||
Object.defineProperty(comboFilter, 'disabled', {
|
||||
get: () => targetWidget.computedDisabled
|
||||
})
|
||||
|
||||
widgets.push(comboFilter)
|
||||
}
|
||||
|
||||
function applyWidgetControl(isPartialExecution: boolean | undefined) {
|
||||
if (
|
||||
node.inputs?.some(
|
||||
(input) =>
|
||||
input.widget?.name === targetWidget.name && input.link != null
|
||||
)
|
||||
)
|
||||
return
|
||||
|
||||
const next = nextValueForLinkedTarget({
|
||||
target: targetWidget,
|
||||
linkedWidgets: targetWidget.linkedWidgets,
|
||||
nodeId: node.id,
|
||||
isPartialExecution
|
||||
})
|
||||
if (next === undefined) return
|
||||
|
||||
targetWidget.value = next
|
||||
targetWidget.callback?.(next)
|
||||
}
|
||||
|
||||
valueControl.beforeQueued = ({ isPartialExecution } = {}) => {
|
||||
if (controlValueRunBefore()) {
|
||||
// Don't run on first execution
|
||||
if (valueControl[HAS_EXECUTED]) {
|
||||
applyWidgetControl(isPartialExecution)
|
||||
}
|
||||
}
|
||||
valueControl[HAS_EXECUTED] = true
|
||||
}
|
||||
|
||||
valueControl.afterQueued = ({ isPartialExecution } = {}) => {
|
||||
if (!controlValueRunBefore()) {
|
||||
applyWidgetControl(isPartialExecution)
|
||||
}
|
||||
}
|
||||
|
||||
return widgets
|
||||
}
|
||||
|
||||
export const ComfyWidgets = {
|
||||
INT: transformWidgetConstructorV2ToV1(useIntWidget()),
|
||||
FLOAT: transformWidgetConstructorV2ToV1(useFloatWidget()),
|
||||
BOOLEAN: transformWidgetConstructorV2ToV1(useBooleanWidget()),
|
||||
STRING: transformWidgetConstructorV2ToV1(useStringWidget()),
|
||||
MARKDOWN: transformWidgetConstructorV2ToV1(useMarkdownWidget()),
|
||||
COMBO: transformWidgetConstructorV2ToV1(useComboWidget()),
|
||||
IMAGEUPLOAD: useImageUploadWidget(),
|
||||
COLOR: transformWidgetConstructorV2ToV1(useColorWidget()),
|
||||
IMAGECOMPARE: transformWidgetConstructorV2ToV1(useImageCompareWidget()),
|
||||
BOUNDING_BOX: transformWidgetConstructorV2ToV1(useBoundingBoxWidget()),
|
||||
CHART: transformWidgetConstructorV2ToV1(useChartWidget()),
|
||||
GALLERIA: transformWidgetConstructorV2ToV1(useGalleriaWidget()),
|
||||
PAINTER: transformWidgetConstructorV2ToV1(usePainterWidget()),
|
||||
COMPOSITOR: transformWidgetConstructorV2ToV1(useCompositorWidget()),
|
||||
TEXTAREA: transformWidgetConstructorV2ToV1(useTextareaWidget()),
|
||||
CURVE: transformWidgetConstructorV2ToV1(useCurveWidget()),
|
||||
RANGE: transformWidgetConstructorV2ToV1(useRangeWidget()),
|
||||
VIDEO_EDIT: transformWidgetConstructorV2ToV1(useVideoEditWidget()),
|
||||
RESOLUTION_PREVIEW: transformWidgetConstructorV2ToV1(
|
||||
useResolutionPreviewWidget()
|
||||
),
|
||||
BOUNDING_BOXES: transformWidgetConstructorV2ToV1(useBoundingBoxesWidget()),
|
||||
COLORS: transformWidgetConstructorV2ToV1(useColorsWidget()),
|
||||
...dynamicWidgets
|
||||
} as const
|
||||
|
||||
export function isValidWidgetType(
|
||||
key: unknown
|
||||
): key is keyof typeof ComfyWidgets {
|
||||
return ComfyWidgets[key as keyof typeof ComfyWidgets] !== undefined
|
||||
}
|
||||
@@ -0,0 +1,745 @@
|
||||
{
|
||||
"sources": [
|
||||
{
|
||||
"id": "core0330",
|
||||
"repo": "Comfy-Org/ComfyUI",
|
||||
"file": "LICENSE",
|
||||
"local_file": "../h3-core-reference/core__LICENSE",
|
||||
"commit": "2f35f4a08176d993cded35dac3332be4f7287f41",
|
||||
"tree": "668784f3dcf05f5adb6d12ee551dc476e2f56e46",
|
||||
"tag": "v0.33.0",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/2f35f4a08176d993cded35dac3332be4f7287f41/LICENSE",
|
||||
"sha256": "3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986",
|
||||
"git_blob_sha1": "f288702d2fa16d3cdf0035b15a9fcbc552cd88e7",
|
||||
"acquisition_time": "未知:已审原清单未记录首次获取时间;本轮仅复用",
|
||||
"reverified_at": "2026-10-31T22:16:20.753775+00:00",
|
||||
"license_file": "../h3-core-reference/core__LICENSE",
|
||||
"identity_root": "../minimax-h3-t2v-reference",
|
||||
"identity_key": "core0330",
|
||||
"transport": "reviewed fixed text reuse; Git commit/tag/tree/blob independently rebound",
|
||||
"applicability": "本图明确声明core0.33.0节点的静态依据;不用于四个缺身份节点,原获取未知仍未知"
|
||||
},
|
||||
{
|
||||
"id": "core0330",
|
||||
"repo": "Comfy-Org/ComfyUI",
|
||||
"file": "comfy/samplers.py",
|
||||
"local_file": "../h3-core-reference/core__comfy__samplers.py",
|
||||
"commit": "2f35f4a08176d993cded35dac3332be4f7287f41",
|
||||
"tree": "668784f3dcf05f5adb6d12ee551dc476e2f56e46",
|
||||
"tag": "v0.33.0",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/2f35f4a08176d993cded35dac3332be4f7287f41/comfy/samplers.py",
|
||||
"sha256": "69498999dd1198c05fa64fa2a7b7090d21090c470d2304191e483a0543fcefd2",
|
||||
"git_blob_sha1": "1d6a4e10473748bcfcdd643ea92804857a586999",
|
||||
"acquisition_time": "未知:已审原清单未记录首次获取时间;本轮仅复用",
|
||||
"reverified_at": "2026-10-31T22:16:20.753775+00:00",
|
||||
"license_file": "../h3-core-reference/core__LICENSE",
|
||||
"identity_root": "../minimax-h3-t2v-reference",
|
||||
"identity_key": "core0330",
|
||||
"transport": "reviewed fixed text reuse; Git commit/tag/tree/blob independently rebound",
|
||||
"applicability": "本图明确声明core0.33.0节点的静态依据;不用于四个缺身份节点,原获取未知仍未知"
|
||||
},
|
||||
{
|
||||
"id": "core0330",
|
||||
"repo": "Comfy-Org/ComfyUI",
|
||||
"file": "comfy_api/latest/_io.py",
|
||||
"local_file": "../h3-core-reference/core__comfy_api__latest___io.py",
|
||||
"commit": "2f35f4a08176d993cded35dac3332be4f7287f41",
|
||||
"tree": "668784f3dcf05f5adb6d12ee551dc476e2f56e46",
|
||||
"tag": "v0.33.0",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/2f35f4a08176d993cded35dac3332be4f7287f41/comfy_api/latest/_io.py",
|
||||
"sha256": "495aefa059aad4eed4181aa7fbb415679d3f269651e9fc6f542bdac1b99dd40f",
|
||||
"git_blob_sha1": "6d9e08f478f345871152ff395c295f19b0771943",
|
||||
"acquisition_time": "未知:已审原清单未记录首次获取时间;本轮仅复用",
|
||||
"reverified_at": "2026-10-31T22:16:20.753775+00:00",
|
||||
"license_file": "../h3-core-reference/core__LICENSE",
|
||||
"identity_root": "../minimax-h3-t2v-reference",
|
||||
"identity_key": "core0330",
|
||||
"transport": "reviewed fixed text reuse; Git commit/tag/tree/blob independently rebound",
|
||||
"applicability": "本图明确声明core0.33.0节点的静态依据;不用于四个缺身份节点,原获取未知仍未知"
|
||||
},
|
||||
{
|
||||
"id": "core0330",
|
||||
"repo": "Comfy-Org/ComfyUI",
|
||||
"file": "comfy_extras/nodes_custom_sampler.py",
|
||||
"local_file": "../h3-core-reference/core__comfy_extras__nodes_custom_sampler.py",
|
||||
"commit": "2f35f4a08176d993cded35dac3332be4f7287f41",
|
||||
"tree": "668784f3dcf05f5adb6d12ee551dc476e2f56e46",
|
||||
"tag": "v0.33.0",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/2f35f4a08176d993cded35dac3332be4f7287f41/comfy_extras/nodes_custom_sampler.py",
|
||||
"sha256": "b0ba1521c72475e06fed15db004274ed7c8bb2bf73f1d58849faf6f9f9d264fe",
|
||||
"git_blob_sha1": "c73a8f6dcc0183e1b46a9525b1212590c45ecd77",
|
||||
"acquisition_time": "未知:已审原清单未记录首次获取时间;本轮仅复用",
|
||||
"reverified_at": "2026-10-31T22:16:20.753775+00:00",
|
||||
"license_file": "../h3-core-reference/core__LICENSE",
|
||||
"identity_root": "../minimax-h3-t2v-reference",
|
||||
"identity_key": "core0330",
|
||||
"transport": "reviewed fixed text reuse; Git commit/tag/tree/blob independently rebound",
|
||||
"applicability": "本图明确声明core0.33.0节点的静态依据;不用于四个缺身份节点,原获取未知仍未知"
|
||||
},
|
||||
{
|
||||
"id": "core0330",
|
||||
"repo": "Comfy-Org/ComfyUI",
|
||||
"file": "comfy_extras/nodes_math.py",
|
||||
"local_file": "../h3-core-reference/core__comfy_extras__nodes_math.py",
|
||||
"commit": "2f35f4a08176d993cded35dac3332be4f7287f41",
|
||||
"tree": "668784f3dcf05f5adb6d12ee551dc476e2f56e46",
|
||||
"tag": "v0.33.0",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/2f35f4a08176d993cded35dac3332be4f7287f41/comfy_extras/nodes_math.py",
|
||||
"sha256": "b117db3e5eadf7e1689a7a2edaad9436bb6282ab3d57865ec2cd78004de9fb88",
|
||||
"git_blob_sha1": "0883c65ac7826251a0966606cb7a4cef70d5d8ee",
|
||||
"acquisition_time": "未知:已审原清单未记录首次获取时间;本轮仅复用",
|
||||
"reverified_at": "2026-10-31T22:16:20.753775+00:00",
|
||||
"license_file": "../h3-core-reference/core__LICENSE",
|
||||
"identity_root": "../minimax-h3-t2v-reference",
|
||||
"identity_key": "core0330",
|
||||
"transport": "reviewed fixed text reuse; Git commit/tag/tree/blob independently rebound",
|
||||
"applicability": "本图明确声明core0.33.0节点的静态依据;不用于四个缺身份节点,原获取未知仍未知"
|
||||
},
|
||||
{
|
||||
"id": "core0330",
|
||||
"repo": "Comfy-Org/ComfyUI",
|
||||
"file": "comfy_extras/nodes_primitive.py",
|
||||
"local_file": "../h3-core-reference/core__comfy_extras__nodes_primitive.py",
|
||||
"commit": "2f35f4a08176d993cded35dac3332be4f7287f41",
|
||||
"tree": "668784f3dcf05f5adb6d12ee551dc476e2f56e46",
|
||||
"tag": "v0.33.0",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/2f35f4a08176d993cded35dac3332be4f7287f41/comfy_extras/nodes_primitive.py",
|
||||
"sha256": "ee3882214ebdd0d20c8061691075cebb1642c303e162f6d22ae525d75aa59b2d",
|
||||
"git_blob_sha1": "35761863ff49fba89af08f02314354f92770bc91",
|
||||
"acquisition_time": "未知:已审原清单未记录首次获取时间;本轮仅复用",
|
||||
"reverified_at": "2026-10-31T22:16:20.753775+00:00",
|
||||
"license_file": "../h3-core-reference/core__LICENSE",
|
||||
"identity_root": "../minimax-h3-t2v-reference",
|
||||
"identity_key": "core0330",
|
||||
"transport": "reviewed fixed text reuse; Git commit/tag/tree/blob independently rebound",
|
||||
"applicability": "本图明确声明core0.33.0节点的静态依据;不用于四个缺身份节点,原获取未知仍未知"
|
||||
},
|
||||
{
|
||||
"id": "core0330",
|
||||
"repo": "Comfy-Org/ComfyUI",
|
||||
"file": "comfy_extras/nodes_resolution.py",
|
||||
"local_file": "../h3-core-reference/core__comfy_extras__nodes_resolution.py",
|
||||
"commit": "2f35f4a08176d993cded35dac3332be4f7287f41",
|
||||
"tree": "668784f3dcf05f5adb6d12ee551dc476e2f56e46",
|
||||
"tag": "v0.33.0",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/2f35f4a08176d993cded35dac3332be4f7287f41/comfy_extras/nodes_resolution.py",
|
||||
"sha256": "2c6ca2d3d91a7f2945642729233ab015983a574d53a50a91caff60aa9b950090",
|
||||
"git_blob_sha1": "083e47ae46df249feac63089092c0205620e074e",
|
||||
"acquisition_time": "未知:已审原清单未记录首次获取时间;本轮仅复用",
|
||||
"reverified_at": "2026-10-31T22:16:20.753775+00:00",
|
||||
"license_file": "../h3-core-reference/core__LICENSE",
|
||||
"identity_root": "../minimax-h3-t2v-reference",
|
||||
"identity_key": "core0330",
|
||||
"transport": "reviewed fixed text reuse; Git commit/tag/tree/blob independently rebound",
|
||||
"applicability": "本图明确声明core0.33.0节点的静态依据;不用于四个缺身份节点,原获取未知仍未知"
|
||||
},
|
||||
{
|
||||
"id": "core0330",
|
||||
"repo": "Comfy-Org/ComfyUI",
|
||||
"file": "nodes.py",
|
||||
"local_file": "../h3-core-reference/core__nodes.py",
|
||||
"commit": "2f35f4a08176d993cded35dac3332be4f7287f41",
|
||||
"tree": "668784f3dcf05f5adb6d12ee551dc476e2f56e46",
|
||||
"tag": "v0.33.0",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/2f35f4a08176d993cded35dac3332be4f7287f41/nodes.py",
|
||||
"sha256": "38f918673c5300bc2d355e02f1131a7b1f97548337e7623754dafaea412008e8",
|
||||
"git_blob_sha1": "1a3dd3f484f56297f0a8df5722698f1d973f2a08",
|
||||
"acquisition_time": "未知:已审原清单未记录首次获取时间;本轮仅复用",
|
||||
"reverified_at": "2026-10-31T22:16:20.753775+00:00",
|
||||
"license_file": "../h3-core-reference/core__LICENSE",
|
||||
"identity_root": "../minimax-h3-t2v-reference",
|
||||
"identity_key": "core0330",
|
||||
"transport": "reviewed fixed text reuse; Git commit/tag/tree/blob independently rebound",
|
||||
"applicability": "本图明确声明core0.33.0节点的静态依据;不用于四个缺身份节点,原获取未知仍未知"
|
||||
},
|
||||
{
|
||||
"id": "core0330",
|
||||
"repo": "Comfy-Org/ComfyUI",
|
||||
"file": "comfy_api/latest/_util/video_types.py",
|
||||
"local_file": "../h3-chain-reference/core__comfy_api__latest___util__video_types.py",
|
||||
"commit": "2f35f4a08176d993cded35dac3332be4f7287f41",
|
||||
"tree": "668784f3dcf05f5adb6d12ee551dc476e2f56e46",
|
||||
"tag": "v0.33.0",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/2f35f4a08176d993cded35dac3332be4f7287f41/comfy_api/latest/_util/video_types.py",
|
||||
"sha256": "5d2f7dd2b82aecec3c05f8f5bd9519530736825d33590207ea0aa32b8cc8627f",
|
||||
"git_blob_sha1": "6c9d6a526251bf1040ef41bc3bb8a60f8be2c7b1",
|
||||
"acquisition_time": "未知:已审原清单未记录首次获取时间;本轮仅复用",
|
||||
"reverified_at": "2026-10-31T22:16:20.753775+00:00",
|
||||
"license_file": "../h3-core-reference/core__LICENSE",
|
||||
"identity_root": "../minimax-h3-t2v-reference",
|
||||
"identity_key": "core0330",
|
||||
"transport": "reviewed fixed text reuse; Git commit/tag/tree/blob independently rebound",
|
||||
"applicability": "本图明确声明core0.33.0节点的静态依据;不用于四个缺身份节点,原获取未知仍未知"
|
||||
},
|
||||
{
|
||||
"id": "core0330",
|
||||
"repo": "Comfy-Org/ComfyUI",
|
||||
"file": "comfy_extras/nodes_audio.py",
|
||||
"local_file": "../h3-chain-reference/core__comfy_extras__nodes_audio.py",
|
||||
"commit": "2f35f4a08176d993cded35dac3332be4f7287f41",
|
||||
"tree": "668784f3dcf05f5adb6d12ee551dc476e2f56e46",
|
||||
"tag": "v0.33.0",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/2f35f4a08176d993cded35dac3332be4f7287f41/comfy_extras/nodes_audio.py",
|
||||
"sha256": "82bb9dcf191a84cb0695bc2533602f7956e29a81a1176965556350b02e1bd67e",
|
||||
"git_blob_sha1": "1c6e91fe4f7781baa27f35b79566dc22d9b8a9ac",
|
||||
"acquisition_time": "未知:已审原清单未记录首次获取时间;本轮仅复用",
|
||||
"reverified_at": "2026-10-31T22:16:20.753775+00:00",
|
||||
"license_file": "../h3-core-reference/core__LICENSE",
|
||||
"identity_root": "../minimax-h3-t2v-reference",
|
||||
"identity_key": "core0330",
|
||||
"transport": "reviewed fixed text reuse; Git commit/tag/tree/blob independently rebound",
|
||||
"applicability": "本图明确声明core0.33.0节点的静态依据;不用于四个缺身份节点,原获取未知仍未知"
|
||||
},
|
||||
{
|
||||
"id": "core0330",
|
||||
"repo": "Comfy-Org/ComfyUI",
|
||||
"file": "comfy_extras/nodes_video.py",
|
||||
"local_file": "../h3-chain-reference/core__comfy_extras__nodes_video.py",
|
||||
"commit": "2f35f4a08176d993cded35dac3332be4f7287f41",
|
||||
"tree": "668784f3dcf05f5adb6d12ee551dc476e2f56e46",
|
||||
"tag": "v0.33.0",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/2f35f4a08176d993cded35dac3332be4f7287f41/comfy_extras/nodes_video.py",
|
||||
"sha256": "727653159de9a6e9d5b37b1101d3ece5df7dce8fc6a5a3a1f27e260afcfa6c14",
|
||||
"git_blob_sha1": "45394ce4df077c1bfb9593a21637675d9cc48b99",
|
||||
"acquisition_time": "未知:已审原清单未记录首次获取时间;本轮仅复用",
|
||||
"reverified_at": "2026-10-31T22:16:20.753775+00:00",
|
||||
"license_file": "../h3-core-reference/core__LICENSE",
|
||||
"identity_root": "../minimax-h3-t2v-reference",
|
||||
"identity_key": "core0330",
|
||||
"transport": "reviewed fixed text reuse; Git commit/tag/tree/blob independently rebound",
|
||||
"applicability": "本图明确声明core0.33.0节点的静态依据;不用于四个缺身份节点,原获取未知仍未知"
|
||||
},
|
||||
{
|
||||
"id": "core0330",
|
||||
"repo": "Comfy-Org/ComfyUI",
|
||||
"file": "comfy_extras/nodes_minimax_h3.py",
|
||||
"local_file": "../minimax-h3-t2v-reference/core0330__comfy_extras__nodes_minimax_h3.py",
|
||||
"commit": "2f35f4a08176d993cded35dac3332be4f7287f41",
|
||||
"tree": "668784f3dcf05f5adb6d12ee551dc476e2f56e46",
|
||||
"tag": "v0.33.0",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/2f35f4a08176d993cded35dac3332be4f7287f41/comfy_extras/nodes_minimax_h3.py",
|
||||
"sha256": "f767df4074b908efb345f5a87c2fd263ba82c12e65bcca932846207cc213e064",
|
||||
"git_blob_sha1": "0b1840e851c248f89e9920159c3c8237fa2e7186",
|
||||
"acquisition_time": "2026-10-31T21:33:32.960519+00:00",
|
||||
"reverified_at": "2026-10-31T22:16:20.753775+00:00",
|
||||
"license_file": "../h3-core-reference/core__LICENSE",
|
||||
"identity_root": "../minimax-h3-t2v-reference",
|
||||
"identity_key": "core0330",
|
||||
"transport": "filtered Git necessary text only",
|
||||
"applicability": "本图明确声明core0.33.0节点的静态依据;不用于四个缺身份节点,原获取未知仍未知"
|
||||
},
|
||||
{
|
||||
"id": "core0330",
|
||||
"repo": "Comfy-Org/ComfyUI",
|
||||
"file": "comfy_extras/nodes_logic.py",
|
||||
"local_file": "../minimax-h3-t2v-reference/core0330__comfy_extras__nodes_logic.py",
|
||||
"commit": "2f35f4a08176d993cded35dac3332be4f7287f41",
|
||||
"tree": "668784f3dcf05f5adb6d12ee551dc476e2f56e46",
|
||||
"tag": "v0.33.0",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/2f35f4a08176d993cded35dac3332be4f7287f41/comfy_extras/nodes_logic.py",
|
||||
"sha256": "2cb1ce149ce616c0b12a67962ed7b799eb398fbcdeb20dcec4c5210eb6af6df1",
|
||||
"git_blob_sha1": "13c1685f7d8ba95d9d5ab640f8249e0f895889d5",
|
||||
"acquisition_time": "2026-10-31T21:33:32.960519+00:00",
|
||||
"reverified_at": "2026-10-31T22:16:20.753775+00:00",
|
||||
"license_file": "../h3-core-reference/core__LICENSE",
|
||||
"identity_root": "../minimax-h3-t2v-reference",
|
||||
"identity_key": "core0330",
|
||||
"transport": "filtered Git necessary text only",
|
||||
"applicability": "本图明确声明core0.33.0节点的静态依据;不用于四个缺身份节点,原获取未知仍未知"
|
||||
},
|
||||
{
|
||||
"id": "core0330",
|
||||
"repo": "Comfy-Org/ComfyUI",
|
||||
"file": "comfy_api/latest/_io_public.py",
|
||||
"local_file": "../minimax-h3-t2v-reference/core0330__comfy_api__latest___io_public.py",
|
||||
"commit": "2f35f4a08176d993cded35dac3332be4f7287f41",
|
||||
"tree": "668784f3dcf05f5adb6d12ee551dc476e2f56e46",
|
||||
"tag": "v0.33.0",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/2f35f4a08176d993cded35dac3332be4f7287f41/comfy_api/latest/_io_public.py",
|
||||
"sha256": "c805d754d61aba1ea72ed2d9d5c371de35be9affa5305d35426fb298fcb7c046",
|
||||
"git_blob_sha1": "43c7680f3283cec64bf89023ca7ec90314a3499d",
|
||||
"acquisition_time": "2026-10-31T21:33:32.960519+00:00",
|
||||
"reverified_at": "2026-10-31T22:16:20.753775+00:00",
|
||||
"license_file": "../h3-core-reference/core__LICENSE",
|
||||
"identity_root": "../minimax-h3-t2v-reference",
|
||||
"identity_key": "core0330",
|
||||
"transport": "filtered Git necessary text only",
|
||||
"applicability": "本图明确声明core0.33.0节点的静态依据;不用于四个缺身份节点,原获取未知仍未知"
|
||||
},
|
||||
{
|
||||
"id": "core0330",
|
||||
"repo": "Comfy-Org/ComfyUI",
|
||||
"file": "comfy_api/latest/__init__.py",
|
||||
"local_file": "../minimax-h3-t2v-reference/core0330__comfy_api__latest____init__.py",
|
||||
"commit": "2f35f4a08176d993cded35dac3332be4f7287f41",
|
||||
"tree": "668784f3dcf05f5adb6d12ee551dc476e2f56e46",
|
||||
"tag": "v0.33.0",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/2f35f4a08176d993cded35dac3332be4f7287f41/comfy_api/latest/__init__.py",
|
||||
"sha256": "5d2c1f3e37ecac36d9a4075a644d43ab211d0bbeab4c86698b6c987523ca072d",
|
||||
"git_blob_sha1": "294ad425e1df870b69546b0f1b2b372811bc8525",
|
||||
"acquisition_time": "2026-10-31T21:33:32.960519+00:00",
|
||||
"reverified_at": "2026-10-31T22:16:20.753775+00:00",
|
||||
"license_file": "../h3-core-reference/core__LICENSE",
|
||||
"identity_root": "../minimax-h3-t2v-reference",
|
||||
"identity_key": "core0330",
|
||||
"transport": "filtered Git necessary text only",
|
||||
"applicability": "本图明确声明core0.33.0节点的静态依据;不用于四个缺身份节点,原获取未知仍未知"
|
||||
},
|
||||
{
|
||||
"id": "core0330",
|
||||
"repo": "Comfy-Org/ComfyUI",
|
||||
"file": "comfy_api/latest/_ui.py",
|
||||
"local_file": "../minimax-h3-t2v-reference/core0330__comfy_api__latest___ui.py",
|
||||
"commit": "2f35f4a08176d993cded35dac3332be4f7287f41",
|
||||
"tree": "668784f3dcf05f5adb6d12ee551dc476e2f56e46",
|
||||
"tag": "v0.33.0",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/2f35f4a08176d993cded35dac3332be4f7287f41/comfy_api/latest/_ui.py",
|
||||
"sha256": "14c48175a06d4c5ad7b7dfc2e3809185f88eb93af068fe5df84703257ca66353",
|
||||
"git_blob_sha1": "f1f359e6a48b4289a1c900a9a1982ecdbd4d52a3",
|
||||
"acquisition_time": "2026-10-31T21:33:32.960519+00:00",
|
||||
"reverified_at": "2026-10-31T22:16:20.753775+00:00",
|
||||
"license_file": "../h3-core-reference/core__LICENSE",
|
||||
"identity_root": "../minimax-h3-t2v-reference",
|
||||
"identity_key": "core0330",
|
||||
"transport": "filtered Git necessary text only",
|
||||
"applicability": "本图明确声明core0.33.0节点的静态依据;不用于四个缺身份节点,原获取未知仍未知"
|
||||
},
|
||||
{
|
||||
"id": "core0330",
|
||||
"repo": "Comfy-Org/ComfyUI",
|
||||
"file": "comfy_api/latest/_ui_public.py",
|
||||
"local_file": "../minimax-h3-t2v-reference/core0330__comfy_api__latest___ui_public.py",
|
||||
"commit": "2f35f4a08176d993cded35dac3332be4f7287f41",
|
||||
"tree": "668784f3dcf05f5adb6d12ee551dc476e2f56e46",
|
||||
"tag": "v0.33.0",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/2f35f4a08176d993cded35dac3332be4f7287f41/comfy_api/latest/_ui_public.py",
|
||||
"sha256": "7104ffcac91481c1d05e9417904c93afe6a126590e06e587c140e2f3d4039431",
|
||||
"git_blob_sha1": "85b11d78b61eb75fd71ccefea5caf9cb70239c58",
|
||||
"acquisition_time": "2026-10-31T21:33:32.960519+00:00",
|
||||
"reverified_at": "2026-10-31T22:16:20.753775+00:00",
|
||||
"license_file": "../h3-core-reference/core__LICENSE",
|
||||
"identity_root": "../minimax-h3-t2v-reference",
|
||||
"identity_key": "core0330",
|
||||
"transport": "filtered Git necessary text only",
|
||||
"applicability": "本图明确声明core0.33.0节点的静态依据;不用于四个缺身份节点,原获取未知仍未知"
|
||||
},
|
||||
{
|
||||
"id": "core0330",
|
||||
"repo": "Comfy-Org/ComfyUI",
|
||||
"file": "comfy_api/latest/_input_impl/video_types.py",
|
||||
"local_file": "../minimax-h3-t2v-reference/core0330__comfy_api__latest___input_impl__video_types.py",
|
||||
"commit": "2f35f4a08176d993cded35dac3332be4f7287f41",
|
||||
"tree": "668784f3dcf05f5adb6d12ee551dc476e2f56e46",
|
||||
"tag": "v0.33.0",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/2f35f4a08176d993cded35dac3332be4f7287f41/comfy_api/latest/_input_impl/video_types.py",
|
||||
"sha256": "f838d6d3e113c5f885e44fd056c32caa7d9549736663fe669f2b96c39422386b",
|
||||
"git_blob_sha1": "cf4119250a4e2d99b29eacebc7bfbb629e21cac4",
|
||||
"acquisition_time": "2026-10-31T21:33:32.960519+00:00",
|
||||
"reverified_at": "2026-10-31T22:16:20.753775+00:00",
|
||||
"license_file": "../h3-core-reference/core__LICENSE",
|
||||
"identity_root": "../minimax-h3-t2v-reference",
|
||||
"identity_key": "core0330",
|
||||
"transport": "filtered Git necessary text only",
|
||||
"applicability": "本图明确声明core0.33.0节点的静态依据;不用于四个缺身份节点,原获取未知仍未知"
|
||||
},
|
||||
{
|
||||
"id": "core0330",
|
||||
"repo": "Comfy-Org/ComfyUI",
|
||||
"file": "comfy_api/latest/_input/video_types.py",
|
||||
"local_file": "../minimax-h3-t2v-reference/core0330__comfy_api__latest___input__video_types.py",
|
||||
"commit": "2f35f4a08176d993cded35dac3332be4f7287f41",
|
||||
"tree": "668784f3dcf05f5adb6d12ee551dc476e2f56e46",
|
||||
"tag": "v0.33.0",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/2f35f4a08176d993cded35dac3332be4f7287f41/comfy_api/latest/_input/video_types.py",
|
||||
"sha256": "8d2eea0fd4c1b5f6f33263d17b0d282e1b2d338570946ff30090689ac1802932",
|
||||
"git_blob_sha1": "b700d44f55b71a96c0a410dc77716afa5121115f",
|
||||
"acquisition_time": "2026-10-31T21:33:32.960519+00:00",
|
||||
"reverified_at": "2026-10-31T22:16:20.753775+00:00",
|
||||
"license_file": "../h3-core-reference/core__LICENSE",
|
||||
"identity_root": "../minimax-h3-t2v-reference",
|
||||
"identity_key": "core0330",
|
||||
"transport": "filtered Git necessary text only",
|
||||
"applicability": "本图明确声明core0.33.0节点的静态依据;不用于四个缺身份节点,原获取未知仍未知"
|
||||
},
|
||||
{
|
||||
"id": "core0330",
|
||||
"repo": "Comfy-Org/ComfyUI",
|
||||
"file": "comfy_api/latest/_util/__init__.py",
|
||||
"local_file": "../minimax-h3-t2v-reference/core0330__comfy_api__latest___util____init__.py",
|
||||
"commit": "2f35f4a08176d993cded35dac3332be4f7287f41",
|
||||
"tree": "668784f3dcf05f5adb6d12ee551dc476e2f56e46",
|
||||
"tag": "v0.33.0",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/2f35f4a08176d993cded35dac3332be4f7287f41/comfy_api/latest/_util/__init__.py",
|
||||
"sha256": "d119ea71c1bb687ea1a198344d164fa8b6b10f98fb2925bc040132a32672062a",
|
||||
"git_blob_sha1": "b27f5a97ea30beb8b3b307d4a974e1de3a2dd989",
|
||||
"acquisition_time": "2026-10-31T21:33:32.960519+00:00",
|
||||
"reverified_at": "2026-10-31T22:16:20.753775+00:00",
|
||||
"license_file": "../h3-core-reference/core__LICENSE",
|
||||
"identity_root": "../minimax-h3-t2v-reference",
|
||||
"identity_key": "core0330",
|
||||
"transport": "filtered Git necessary text only",
|
||||
"applicability": "本图明确声明core0.33.0节点的静态依据;不用于四个缺身份节点,原获取未知仍未知"
|
||||
},
|
||||
{
|
||||
"id": "core0330",
|
||||
"repo": "Comfy-Org/ComfyUI",
|
||||
"file": "comfy/text_encoders/minimax.py",
|
||||
"local_file": "../minimax-h3-t2v-reference/core0330__comfy__text_encoders__minimax.py",
|
||||
"commit": "2f35f4a08176d993cded35dac3332be4f7287f41",
|
||||
"tree": "668784f3dcf05f5adb6d12ee551dc476e2f56e46",
|
||||
"tag": "v0.33.0",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/2f35f4a08176d993cded35dac3332be4f7287f41/comfy/text_encoders/minimax.py",
|
||||
"sha256": "751b2876c9f151f8c09576dadf4122aea84400d3147917202c70ce2c15b16e89",
|
||||
"git_blob_sha1": "c2dc47f7f148ef4f7ac0612aa62df0332eda5c9a",
|
||||
"acquisition_time": "2026-10-31T21:33:32.960519+00:00",
|
||||
"reverified_at": "2026-10-31T22:16:20.753775+00:00",
|
||||
"license_file": "../h3-core-reference/core__LICENSE",
|
||||
"identity_root": "../minimax-h3-t2v-reference",
|
||||
"identity_key": "core0330",
|
||||
"transport": "filtered Git necessary text only",
|
||||
"applicability": "本图明确声明core0.33.0节点的静态依据;不用于四个缺身份节点,原获取未知仍未知"
|
||||
},
|
||||
{
|
||||
"id": "core0330",
|
||||
"repo": "Comfy-Org/ComfyUI",
|
||||
"file": "comfy/ldm/minimax/audio_vae.py",
|
||||
"local_file": "../minimax-h3-t2v-reference/core0330__comfy__ldm__minimax__audio_vae.py",
|
||||
"commit": "2f35f4a08176d993cded35dac3332be4f7287f41",
|
||||
"tree": "668784f3dcf05f5adb6d12ee551dc476e2f56e46",
|
||||
"tag": "v0.33.0",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/2f35f4a08176d993cded35dac3332be4f7287f41/comfy/ldm/minimax/audio_vae.py",
|
||||
"sha256": "470f7f07be8c38634b85e719bbf5d0f04ce12d2a2c9253791db61930d15e8121",
|
||||
"git_blob_sha1": "0b9f2b6fc54d2f31f78de9ff6bee4d24b12fb463",
|
||||
"acquisition_time": "2026-10-31T21:33:32.960519+00:00",
|
||||
"reverified_at": "2026-10-31T22:16:20.753775+00:00",
|
||||
"license_file": "../h3-core-reference/core__LICENSE",
|
||||
"identity_root": "../minimax-h3-t2v-reference",
|
||||
"identity_key": "core0330",
|
||||
"transport": "filtered Git necessary text only",
|
||||
"applicability": "本图明确声明core0.33.0节点的静态依据;不用于四个缺身份节点,原获取未知仍未知"
|
||||
},
|
||||
{
|
||||
"id": "core0330",
|
||||
"repo": "Comfy-Org/ComfyUI",
|
||||
"file": "comfy/ldm/minimax/vae.py",
|
||||
"local_file": "../minimax-h3-t2v-reference/core0330__comfy__ldm__minimax__vae.py",
|
||||
"commit": "2f35f4a08176d993cded35dac3332be4f7287f41",
|
||||
"tree": "668784f3dcf05f5adb6d12ee551dc476e2f56e46",
|
||||
"tag": "v0.33.0",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/2f35f4a08176d993cded35dac3332be4f7287f41/comfy/ldm/minimax/vae.py",
|
||||
"sha256": "40c4bf2db63279e0d13eb8de2c8a4602207a90cf9350f94afbee7aeed8b757ea",
|
||||
"git_blob_sha1": "e1c146ec412a86e6721d1f35c512549bf0e8213b",
|
||||
"acquisition_time": "2026-10-31T21:33:32.960519+00:00",
|
||||
"reverified_at": "2026-10-31T22:16:20.753775+00:00",
|
||||
"license_file": "../h3-core-reference/core__LICENSE",
|
||||
"identity_root": "../minimax-h3-t2v-reference",
|
||||
"identity_key": "core0330",
|
||||
"transport": "filtered Git necessary text only",
|
||||
"applicability": "本图明确声明core0.33.0节点的静态依据;不用于四个缺身份节点,原获取未知仍未知"
|
||||
},
|
||||
{
|
||||
"id": "core0330",
|
||||
"repo": "Comfy-Org/ComfyUI",
|
||||
"file": "comfy/sd.py",
|
||||
"local_file": "../minimax-h3-t2v-reference/core0330__comfy__sd.py",
|
||||
"commit": "2f35f4a08176d993cded35dac3332be4f7287f41",
|
||||
"tree": "668784f3dcf05f5adb6d12ee551dc476e2f56e46",
|
||||
"tag": "v0.33.0",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/2f35f4a08176d993cded35dac3332be4f7287f41/comfy/sd.py",
|
||||
"sha256": "a780d85ff07431534d65ac676c8c9a27a5e7ff1dbef74495030e53d5834870c1",
|
||||
"git_blob_sha1": "4bdaa978c1735b12a6cc0092c98263ac25312318",
|
||||
"acquisition_time": "2026-10-31T21:33:32.960519+00:00",
|
||||
"reverified_at": "2026-10-31T22:16:20.753775+00:00",
|
||||
"license_file": "../h3-core-reference/core__LICENSE",
|
||||
"identity_root": "../minimax-h3-t2v-reference",
|
||||
"identity_key": "core0330",
|
||||
"transport": "filtered Git necessary text only",
|
||||
"applicability": "本图明确声明core0.33.0节点的静态依据;不用于四个缺身份节点,原获取未知仍未知"
|
||||
},
|
||||
{
|
||||
"id": "core0330",
|
||||
"repo": "Comfy-Org/ComfyUI",
|
||||
"file": "folder_paths.py",
|
||||
"local_file": "../minimax-h3-t2v-reference/core0330__folder_paths.py",
|
||||
"commit": "2f35f4a08176d993cded35dac3332be4f7287f41",
|
||||
"tree": "668784f3dcf05f5adb6d12ee551dc476e2f56e46",
|
||||
"tag": "v0.33.0",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/2f35f4a08176d993cded35dac3332be4f7287f41/folder_paths.py",
|
||||
"sha256": "b748be5d1e068ad673f6c4de069fb6b7b723405c40ae3c3c44465d416f7df2db",
|
||||
"git_blob_sha1": "6723e52c867c57003e9ba4ed53ae58f8d79a7752",
|
||||
"acquisition_time": "2026-10-31T21:33:32.960519+00:00",
|
||||
"reverified_at": "2026-10-31T22:16:20.753775+00:00",
|
||||
"license_file": "../h3-core-reference/core__LICENSE",
|
||||
"identity_root": "../minimax-h3-t2v-reference",
|
||||
"identity_key": "core0330",
|
||||
"transport": "filtered Git necessary text only",
|
||||
"applicability": "本图明确声明core0.33.0节点的静态依据;不用于四个缺身份节点,原获取未知仍未知"
|
||||
},
|
||||
{
|
||||
"id": "core0330",
|
||||
"repo": "Comfy-Org/ComfyUI",
|
||||
"file": "requirements.txt",
|
||||
"local_file": "../minimax-h3-t2v-reference/core0330__requirements.txt",
|
||||
"commit": "2f35f4a08176d993cded35dac3332be4f7287f41",
|
||||
"tree": "668784f3dcf05f5adb6d12ee551dc476e2f56e46",
|
||||
"tag": "v0.33.0",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/2f35f4a08176d993cded35dac3332be4f7287f41/requirements.txt",
|
||||
"sha256": "162eb6c1d79d1f0dcf906498c425f01293199261553977791b16a96fceba7d07",
|
||||
"git_blob_sha1": "e180e78841943d15118fb3921d135451024c454c",
|
||||
"acquisition_time": "2026-10-31T21:33:32.960519+00:00",
|
||||
"reverified_at": "2026-10-31T22:16:20.753775+00:00",
|
||||
"license_file": "../h3-core-reference/core__LICENSE",
|
||||
"identity_root": "../minimax-h3-t2v-reference",
|
||||
"identity_key": "core0330",
|
||||
"transport": "filtered Git necessary text only",
|
||||
"applicability": "本图明确声明core0.33.0节点的静态依据;不用于四个缺身份节点,原获取未知仍未知"
|
||||
},
|
||||
{
|
||||
"id": "frontend",
|
||||
"repo": "Comfy-Org/ComfyUI_frontend",
|
||||
"file": "package.json",
|
||||
"local_file": "frontend__package.json",
|
||||
"commit": "1a7a6b82514874545dc5e8203d0bd2188c2d9b18",
|
||||
"tree": "8e78753b31d405a4f33293106845998ba121f89c",
|
||||
"tag": "v1.52.7",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/1a7a6b82514874545dc5e8203d0bd2188c2d9b18/package.json",
|
||||
"sha256": "30f9a691251ec51467a5041c5c18564d068c20eeb6936231bf6dad29f458a7e4",
|
||||
"git_blob_sha1": "fa3ea41cd3533fefbd448d4b33864bfc13d8ccda",
|
||||
"acquisition_time": "2026-10-31T22:16:20.753775+00:00",
|
||||
"reverified_at": "2026-10-31T22:16:20.753775+00:00",
|
||||
"license_file": "frontend__LICENSE",
|
||||
"identity_root": ".",
|
||||
"identity_key": "frontend",
|
||||
"transport": "filtered Git necessary text only",
|
||||
"applicability": "本图独立准确版本静态核准,不执行或认证安装/恢复"
|
||||
},
|
||||
{
|
||||
"id": "frontend",
|
||||
"repo": "Comfy-Org/ComfyUI_frontend",
|
||||
"file": "pnpm-lock.yaml",
|
||||
"local_file": "frontend__pnpm-lock.yaml",
|
||||
"commit": "1a7a6b82514874545dc5e8203d0bd2188c2d9b18",
|
||||
"tree": "8e78753b31d405a4f33293106845998ba121f89c",
|
||||
"tag": "v1.52.7",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/1a7a6b82514874545dc5e8203d0bd2188c2d9b18/pnpm-lock.yaml",
|
||||
"sha256": "d8fdc808acc5cabce0197998d7ddb47fa099056749683c568aad28297b615bc9",
|
||||
"git_blob_sha1": "5f42f3279c9feba3fcd9f45a9abdfc349f2ccfae",
|
||||
"acquisition_time": "2026-10-31T22:16:20.753775+00:00",
|
||||
"reverified_at": "2026-10-31T22:16:20.753775+00:00",
|
||||
"license_file": "frontend__LICENSE",
|
||||
"identity_root": ".",
|
||||
"identity_key": "frontend",
|
||||
"transport": "filtered Git necessary text only",
|
||||
"applicability": "本图独立准确版本静态核准,不执行或认证安装/恢复"
|
||||
},
|
||||
{
|
||||
"id": "frontend",
|
||||
"repo": "Comfy-Org/ComfyUI_frontend",
|
||||
"file": "src/scripts/widgets.ts",
|
||||
"local_file": "frontend__src__scripts__widgets.ts",
|
||||
"commit": "1a7a6b82514874545dc5e8203d0bd2188c2d9b18",
|
||||
"tree": "8e78753b31d405a4f33293106845998ba121f89c",
|
||||
"tag": "v1.52.7",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/1a7a6b82514874545dc5e8203d0bd2188c2d9b18/src/scripts/widgets.ts",
|
||||
"sha256": "07e91bf2d16056938f7ce50a1ac90c8f5be9faa27d6bec3d2060e529da139257",
|
||||
"git_blob_sha1": "0100f21b03e3aa0cb551ca48f4886ca1d66c3bc2",
|
||||
"acquisition_time": "2026-10-31T22:16:20.753775+00:00",
|
||||
"reverified_at": "2026-10-31T22:16:20.753775+00:00",
|
||||
"license_file": "frontend__LICENSE",
|
||||
"identity_root": ".",
|
||||
"identity_key": "frontend",
|
||||
"transport": "filtered Git necessary text only",
|
||||
"applicability": "本图独立准确版本静态核准,不执行或认证安装/恢复"
|
||||
},
|
||||
{
|
||||
"id": "frontend",
|
||||
"repo": "Comfy-Org/ComfyUI_frontend",
|
||||
"file": "src/scripts/app.ts",
|
||||
"local_file": "frontend__src__scripts__app.ts",
|
||||
"commit": "1a7a6b82514874545dc5e8203d0bd2188c2d9b18",
|
||||
"tree": "8e78753b31d405a4f33293106845998ba121f89c",
|
||||
"tag": "v1.52.7",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/1a7a6b82514874545dc5e8203d0bd2188c2d9b18/src/scripts/app.ts",
|
||||
"sha256": "8de496f05a3e91cfff0c83be8d534122aec7e21a97170d09c5965c7540b9d4bd",
|
||||
"git_blob_sha1": "af734c62e4e092b04a5260ee22d2897c808bb19b",
|
||||
"acquisition_time": "2026-10-31T22:16:20.753775+00:00",
|
||||
"reverified_at": "2026-10-31T22:16:20.753775+00:00",
|
||||
"license_file": "frontend__LICENSE",
|
||||
"identity_root": ".",
|
||||
"identity_key": "frontend",
|
||||
"transport": "filtered Git necessary text only",
|
||||
"applicability": "本图独立准确版本静态核准,不执行或认证安装/恢复"
|
||||
},
|
||||
{
|
||||
"id": "frontend",
|
||||
"repo": "Comfy-Org/ComfyUI_frontend",
|
||||
"file": "src/extensions/core/widgetInputs.ts",
|
||||
"local_file": "frontend__src__extensions__core__widgetInputs.ts",
|
||||
"commit": "1a7a6b82514874545dc5e8203d0bd2188c2d9b18",
|
||||
"tree": "8e78753b31d405a4f33293106845998ba121f89c",
|
||||
"tag": "v1.52.7",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/1a7a6b82514874545dc5e8203d0bd2188c2d9b18/src/extensions/core/widgetInputs.ts",
|
||||
"sha256": "f1de4c37996155dc6573045996cc9b73666eebf985ace1ad15f9707acfd63a38",
|
||||
"git_blob_sha1": "dbe617e89c84ab21906a9b27cfa9ec883af6fe6f",
|
||||
"acquisition_time": "2026-10-31T22:16:20.753775+00:00",
|
||||
"reverified_at": "2026-10-31T22:16:20.753775+00:00",
|
||||
"license_file": "frontend__LICENSE",
|
||||
"identity_root": ".",
|
||||
"identity_key": "frontend",
|
||||
"transport": "filtered Git necessary text only",
|
||||
"applicability": "本图独立准确版本静态核准,不执行或认证安装/恢复"
|
||||
},
|
||||
{
|
||||
"id": "frontend",
|
||||
"repo": "Comfy-Org/ComfyUI_frontend",
|
||||
"file": "src/lib/litegraph/src/LGraphNode.ts",
|
||||
"local_file": "frontend__src__lib__litegraph__src__LGraphNode.ts",
|
||||
"commit": "1a7a6b82514874545dc5e8203d0bd2188c2d9b18",
|
||||
"tree": "8e78753b31d405a4f33293106845998ba121f89c",
|
||||
"tag": "v1.52.7",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/1a7a6b82514874545dc5e8203d0bd2188c2d9b18/src/lib/litegraph/src/LGraphNode.ts",
|
||||
"sha256": "d6263d56f28a5e6c5a95a3a263fe0d6ffe4083a981c01a14ec4ebfca43487e50",
|
||||
"git_blob_sha1": "38723cce556962cb80456239df383d49469134d9",
|
||||
"acquisition_time": "2026-10-31T22:16:20.753775+00:00",
|
||||
"reverified_at": "2026-10-31T22:16:20.753775+00:00",
|
||||
"license_file": "frontend__src__lib__litegraph__LICENSE",
|
||||
"identity_root": ".",
|
||||
"identity_key": "frontend",
|
||||
"transport": "filtered Git necessary text only",
|
||||
"applicability": "本图独立准确版本静态核准,不执行或认证安装/恢复"
|
||||
},
|
||||
{
|
||||
"id": "frontend",
|
||||
"repo": "Comfy-Org/ComfyUI_frontend",
|
||||
"file": "src/lib/litegraph/src/subgraph/SubgraphNode.ts",
|
||||
"local_file": "frontend__src__lib__litegraph__src__subgraph__SubgraphNode.ts",
|
||||
"commit": "1a7a6b82514874545dc5e8203d0bd2188c2d9b18",
|
||||
"tree": "8e78753b31d405a4f33293106845998ba121f89c",
|
||||
"tag": "v1.52.7",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/1a7a6b82514874545dc5e8203d0bd2188c2d9b18/src/lib/litegraph/src/subgraph/SubgraphNode.ts",
|
||||
"sha256": "e204cd7be49ad0d48b16395dc26f6a086ca5be25a3bc0817831139255578219a",
|
||||
"git_blob_sha1": "3b9efa1b4fca5c6f30f0cd7009223b60f635e9cc",
|
||||
"acquisition_time": "2026-10-31T22:16:20.753775+00:00",
|
||||
"reverified_at": "2026-10-31T22:16:20.753775+00:00",
|
||||
"license_file": "frontend__src__lib__litegraph__LICENSE",
|
||||
"identity_root": ".",
|
||||
"identity_key": "frontend",
|
||||
"transport": "filtered Git necessary text only",
|
||||
"applicability": "本图独立准确版本静态核准,不执行或认证安装/恢复"
|
||||
},
|
||||
{
|
||||
"id": "frontend",
|
||||
"repo": "Comfy-Org/ComfyUI_frontend",
|
||||
"file": "src/lib/litegraph/src/subgraph/Subgraph.ts",
|
||||
"local_file": "frontend__src__lib__litegraph__src__subgraph__Subgraph.ts",
|
||||
"commit": "1a7a6b82514874545dc5e8203d0bd2188c2d9b18",
|
||||
"tree": "8e78753b31d405a4f33293106845998ba121f89c",
|
||||
"tag": "v1.52.7",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/1a7a6b82514874545dc5e8203d0bd2188c2d9b18/src/lib/litegraph/src/subgraph/Subgraph.ts",
|
||||
"sha256": "321403ca3ba2faa0b448dec6e8bf379e49ddea4bfbe8619547d29926e30d62d2",
|
||||
"git_blob_sha1": "e1f2f0b255a703e9735761fd83d75ee3eb21334e",
|
||||
"acquisition_time": "2026-10-31T22:16:20.753775+00:00",
|
||||
"reverified_at": "2026-10-31T22:16:20.753775+00:00",
|
||||
"license_file": "frontend__src__lib__litegraph__LICENSE",
|
||||
"identity_root": ".",
|
||||
"identity_key": "frontend",
|
||||
"transport": "filtered Git necessary text only",
|
||||
"applicability": "本图独立准确版本静态核准,不执行或认证安装/恢复"
|
||||
},
|
||||
{
|
||||
"id": "frontend",
|
||||
"repo": "Comfy-Org/ComfyUI_frontend",
|
||||
"file": "src/lib/litegraph/src/subgraph/ExecutableNodeDTO.ts",
|
||||
"local_file": "frontend__src__lib__litegraph__src__subgraph__ExecutableNodeDTO.ts",
|
||||
"commit": "1a7a6b82514874545dc5e8203d0bd2188c2d9b18",
|
||||
"tree": "8e78753b31d405a4f33293106845998ba121f89c",
|
||||
"tag": "v1.52.7",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/1a7a6b82514874545dc5e8203d0bd2188c2d9b18/src/lib/litegraph/src/subgraph/ExecutableNodeDTO.ts",
|
||||
"sha256": "64baa71b46bd67440b032e18e4d9aebb67a6cc135fe7c4509ae1b5bc25acc2a3",
|
||||
"git_blob_sha1": "35220e8b093297bd6d3185b343d67d512309ccc5",
|
||||
"acquisition_time": "2026-10-31T22:16:20.753775+00:00",
|
||||
"reverified_at": "2026-10-31T22:16:20.753775+00:00",
|
||||
"license_file": "frontend__src__lib__litegraph__LICENSE",
|
||||
"identity_root": ".",
|
||||
"identity_key": "frontend",
|
||||
"transport": "filtered Git necessary text only",
|
||||
"applicability": "本图独立准确版本静态核准,不执行或认证安装/恢复"
|
||||
},
|
||||
{
|
||||
"id": "frontend",
|
||||
"repo": "Comfy-Org/ComfyUI_frontend",
|
||||
"file": "src/lib/litegraph/src/widgets/NumberWidget.ts",
|
||||
"local_file": "frontend__src__lib__litegraph__src__widgets__NumberWidget.ts",
|
||||
"commit": "1a7a6b82514874545dc5e8203d0bd2188c2d9b18",
|
||||
"tree": "8e78753b31d405a4f33293106845998ba121f89c",
|
||||
"tag": "v1.52.7",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/1a7a6b82514874545dc5e8203d0bd2188c2d9b18/src/lib/litegraph/src/widgets/NumberWidget.ts",
|
||||
"sha256": "4f6519f4d5639eef1ac858940ec0a7b3a0a6dde405d663b8a862005c6c4dbd95",
|
||||
"git_blob_sha1": "c142d8b4db1d5fe09361b9d84886214b96f44584",
|
||||
"acquisition_time": "2026-10-31T22:16:20.753775+00:00",
|
||||
"reverified_at": "2026-10-31T22:16:20.753775+00:00",
|
||||
"license_file": "frontend__src__lib__litegraph__LICENSE",
|
||||
"identity_root": ".",
|
||||
"identity_key": "frontend",
|
||||
"transport": "filtered Git necessary text only",
|
||||
"applicability": "本图独立准确版本静态核准,不执行或认证安装/恢复"
|
||||
},
|
||||
{
|
||||
"id": "frontend",
|
||||
"repo": "Comfy-Org/ComfyUI_frontend",
|
||||
"file": "src/lib/litegraph/src/widgets/BooleanWidget.ts",
|
||||
"local_file": "frontend__src__lib__litegraph__src__widgets__BooleanWidget.ts",
|
||||
"commit": "1a7a6b82514874545dc5e8203d0bd2188c2d9b18",
|
||||
"tree": "8e78753b31d405a4f33293106845998ba121f89c",
|
||||
"tag": "v1.52.7",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/1a7a6b82514874545dc5e8203d0bd2188c2d9b18/src/lib/litegraph/src/widgets/BooleanWidget.ts",
|
||||
"sha256": "c19d7198f3074ebc305848fcd5f6abee354b5a2a990e65a27130e00550bf00ff",
|
||||
"git_blob_sha1": "0b0c5d31e15c0737dfa69226c18f9747cb0a17f4",
|
||||
"acquisition_time": "2026-10-31T22:16:20.753775+00:00",
|
||||
"reverified_at": "2026-10-31T22:16:20.753775+00:00",
|
||||
"license_file": "frontend__src__lib__litegraph__LICENSE",
|
||||
"identity_root": ".",
|
||||
"identity_key": "frontend",
|
||||
"transport": "filtered Git necessary text only",
|
||||
"applicability": "本图独立准确版本静态核准,不执行或认证安装/恢复"
|
||||
},
|
||||
{
|
||||
"id": "frontend",
|
||||
"repo": "Comfy-Org/ComfyUI_frontend",
|
||||
"file": "src/lib/litegraph/LICENSE",
|
||||
"local_file": "frontend__src__lib__litegraph__LICENSE",
|
||||
"commit": "1a7a6b82514874545dc5e8203d0bd2188c2d9b18",
|
||||
"tree": "8e78753b31d405a4f33293106845998ba121f89c",
|
||||
"tag": "v1.52.7",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/1a7a6b82514874545dc5e8203d0bd2188c2d9b18/src/lib/litegraph/LICENSE",
|
||||
"sha256": "1b38cc30fe774bcc77538ab99eb460f4e1c8a47c4fddc6e991ee3b5cc2a96bb9",
|
||||
"git_blob_sha1": "1b52aa11c186c25f8d66f1de74c0d378851bfcff",
|
||||
"acquisition_time": "2026-10-31T22:16:20.753775+00:00",
|
||||
"reverified_at": "2026-10-31T22:16:20.753775+00:00",
|
||||
"license_file": "frontend__src__lib__litegraph__LICENSE",
|
||||
"identity_root": ".",
|
||||
"identity_key": "frontend",
|
||||
"transport": "filtered Git necessary text only",
|
||||
"applicability": "本图独立准确版本静态核准,不执行或认证安装/恢复"
|
||||
},
|
||||
{
|
||||
"id": "frontend",
|
||||
"repo": "Comfy-Org/ComfyUI_frontend",
|
||||
"file": "LICENSE",
|
||||
"local_file": "frontend__LICENSE",
|
||||
"commit": "1a7a6b82514874545dc5e8203d0bd2188c2d9b18",
|
||||
"tree": "8e78753b31d405a4f33293106845998ba121f89c",
|
||||
"tag": "v1.52.7",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/1a7a6b82514874545dc5e8203d0bd2188c2d9b18/LICENSE",
|
||||
"sha256": "3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986",
|
||||
"git_blob_sha1": "f288702d2fa16d3cdf0035b15a9fcbc552cd88e7",
|
||||
"acquisition_time": "2026-10-31T22:16:20.753775+00:00",
|
||||
"reverified_at": "2026-10-31T22:16:20.753775+00:00",
|
||||
"license_file": "frontend__LICENSE",
|
||||
"identity_root": ".",
|
||||
"identity_key": "frontend",
|
||||
"transport": "filtered Git necessary text only",
|
||||
"applicability": "本图独立准确版本静态核准,不执行或认证安装/恢复"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user