@melite/models-qwen-img-edit-21 0.0.0-stage → 0.1.5-pre-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +557 -0
- package/README.md +44 -2
- package/lib/actions.d.ts +31 -0
- package/lib/actions.js +155 -0
- package/lib/index.d.ts +7 -0
- package/lib/index.js +318 -0
- package/lib/mods/loras.d.ts +3 -0
- package/lib/mods/loras.js +9 -0
- package/lib/mods/mask.d.ts +3 -0
- package/lib/mods/mask.js +8 -0
- package/package.json +42 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,557 @@
|
|
|
1
|
+
Server Side Public License
|
|
2
|
+
VERSION 1, OCTOBER 16, 2018
|
|
3
|
+
|
|
4
|
+
Copyright © 2018 MongoDB, Inc.
|
|
5
|
+
|
|
6
|
+
Everyone is permitted to copy and distribute verbatim copies of this
|
|
7
|
+
license document, but changing it is not allowed.
|
|
8
|
+
|
|
9
|
+
TERMS AND CONDITIONS
|
|
10
|
+
|
|
11
|
+
0. Definitions.
|
|
12
|
+
|
|
13
|
+
“This License” refers to Server Side Public License.
|
|
14
|
+
|
|
15
|
+
“Copyright” also means copyright-like laws that apply to other kinds of
|
|
16
|
+
works, such as semiconductor masks.
|
|
17
|
+
|
|
18
|
+
“The Program” refers to any copyrightable work licensed under this
|
|
19
|
+
License. Each licensee is addressed as “you”. “Licensees” and
|
|
20
|
+
“recipients” may be individuals or organizations.
|
|
21
|
+
|
|
22
|
+
To “modify” a work means to copy from or adapt all or part of the work in
|
|
23
|
+
a fashion requiring copyright permission, other than the making of an
|
|
24
|
+
exact copy. The resulting work is called a “modified version” of the
|
|
25
|
+
earlier work or a work “based on” the earlier work.
|
|
26
|
+
|
|
27
|
+
A “covered work” means either the unmodified Program or a work based on
|
|
28
|
+
the Program.
|
|
29
|
+
|
|
30
|
+
To “propagate” a work means to do anything with it that, without
|
|
31
|
+
permission, would make you directly or secondarily liable for
|
|
32
|
+
infringement under applicable copyright law, except executing it on a
|
|
33
|
+
computer or modifying a private copy. Propagation includes copying,
|
|
34
|
+
distribution (with or without modification), making available to the
|
|
35
|
+
public, and in some countries other activities as well.
|
|
36
|
+
|
|
37
|
+
To “convey” a work means any kind of propagation that enables other
|
|
38
|
+
parties to make or receive copies. Mere interaction with a user through a
|
|
39
|
+
computer network, with no transfer of a copy, is not conveying.
|
|
40
|
+
|
|
41
|
+
An interactive user interface displays “Appropriate Legal Notices” to the
|
|
42
|
+
extent that it includes a convenient and prominently visible feature that
|
|
43
|
+
(1) displays an appropriate copyright notice, and (2) tells the user that
|
|
44
|
+
there is no warranty for the work (except to the extent that warranties
|
|
45
|
+
are provided), that licensees may convey the work under this License, and
|
|
46
|
+
how to view a copy of this License. If the interface presents a list of
|
|
47
|
+
user commands or options, such as a menu, a prominent item in the list
|
|
48
|
+
meets this criterion.
|
|
49
|
+
|
|
50
|
+
1. Source Code.
|
|
51
|
+
|
|
52
|
+
The “source code” for a work means the preferred form of the work for
|
|
53
|
+
making modifications to it. “Object code” means any non-source form of a
|
|
54
|
+
work.
|
|
55
|
+
|
|
56
|
+
A “Standard Interface” means an interface that either is an official
|
|
57
|
+
standard defined by a recognized standards body, or, in the case of
|
|
58
|
+
interfaces specified for a particular programming language, one that is
|
|
59
|
+
widely used among developers working in that language. The “System
|
|
60
|
+
Libraries” of an executable work include anything, other than the work as
|
|
61
|
+
a whole, that (a) is included in the normal form of packaging a Major
|
|
62
|
+
Component, but which is not part of that Major Component, and (b) serves
|
|
63
|
+
only to enable use of the work with that Major Component, or to implement
|
|
64
|
+
a Standard Interface for which an implementation is available to the
|
|
65
|
+
public in source code form. A “Major Component”, in this context, means a
|
|
66
|
+
major essential component (kernel, window system, and so on) of the
|
|
67
|
+
specific operating system (if any) on which the executable work runs, or
|
|
68
|
+
a compiler used to produce the work, or an object code interpreter used
|
|
69
|
+
to run it.
|
|
70
|
+
|
|
71
|
+
The “Corresponding Source” for a work in object code form means all the
|
|
72
|
+
source code needed to generate, install, and (for an executable work) run
|
|
73
|
+
the object code and to modify the work, including scripts to control
|
|
74
|
+
those activities. However, it does not include the work's System
|
|
75
|
+
Libraries, or general-purpose tools or generally available free programs
|
|
76
|
+
which are used unmodified in performing those activities but which are
|
|
77
|
+
not part of the work. For example, Corresponding Source includes
|
|
78
|
+
interface definition files associated with source files for the work, and
|
|
79
|
+
the source code for shared libraries and dynamically linked subprograms
|
|
80
|
+
that the work is specifically designed to require, such as by intimate
|
|
81
|
+
data communication or control flow between those subprograms and other
|
|
82
|
+
parts of the work.
|
|
83
|
+
|
|
84
|
+
The Corresponding Source need not include anything that users can
|
|
85
|
+
regenerate automatically from other parts of the Corresponding Source.
|
|
86
|
+
|
|
87
|
+
The Corresponding Source for a work in source code form is that same work.
|
|
88
|
+
|
|
89
|
+
2. Basic Permissions.
|
|
90
|
+
|
|
91
|
+
All rights granted under this License are granted for the term of
|
|
92
|
+
copyright on the Program, and are irrevocable provided the stated
|
|
93
|
+
conditions are met. This License explicitly affirms your unlimited
|
|
94
|
+
permission to run the unmodified Program, subject to section 13. The
|
|
95
|
+
output from running a covered work is covered by this License only if the
|
|
96
|
+
output, given its content, constitutes a covered work. This License
|
|
97
|
+
acknowledges your rights of fair use or other equivalent, as provided by
|
|
98
|
+
copyright law. Subject to section 13, you may make, run and propagate
|
|
99
|
+
covered works that you do not convey, without conditions so long as your
|
|
100
|
+
license otherwise remains in force. You may convey covered works to
|
|
101
|
+
others for the sole purpose of having them make modifications exclusively
|
|
102
|
+
for you, or provide you with facilities for running those works, provided
|
|
103
|
+
that you comply with the terms of this License in conveying all
|
|
104
|
+
material for which you do not control copyright. Those thus making or
|
|
105
|
+
running the covered works for you must do so exclusively on your
|
|
106
|
+
behalf, under your direction and control, on terms that prohibit them
|
|
107
|
+
from making any copies of your copyrighted material outside their
|
|
108
|
+
relationship with you.
|
|
109
|
+
|
|
110
|
+
Conveying under any other circumstances is permitted solely under the
|
|
111
|
+
conditions stated below. Sublicensing is not allowed; section 10 makes it
|
|
112
|
+
unnecessary.
|
|
113
|
+
|
|
114
|
+
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
|
115
|
+
|
|
116
|
+
No covered work shall be deemed part of an effective technological
|
|
117
|
+
measure under any applicable law fulfilling obligations under article 11
|
|
118
|
+
of the WIPO copyright treaty adopted on 20 December 1996, or similar laws
|
|
119
|
+
prohibiting or restricting circumvention of such measures.
|
|
120
|
+
|
|
121
|
+
When you convey a covered work, you waive any legal power to forbid
|
|
122
|
+
circumvention of technological measures to the extent such circumvention is
|
|
123
|
+
effected by exercising rights under this License with respect to the
|
|
124
|
+
covered work, and you disclaim any intention to limit operation or
|
|
125
|
+
modification of the work as a means of enforcing, against the work's users,
|
|
126
|
+
your or third parties' legal rights to forbid circumvention of
|
|
127
|
+
technological measures.
|
|
128
|
+
|
|
129
|
+
4. Conveying Verbatim Copies.
|
|
130
|
+
|
|
131
|
+
You may convey verbatim copies of the Program's source code as you
|
|
132
|
+
receive it, in any medium, provided that you conspicuously and
|
|
133
|
+
appropriately publish on each copy an appropriate copyright notice; keep
|
|
134
|
+
intact all notices stating that this License and any non-permissive terms
|
|
135
|
+
added in accord with section 7 apply to the code; keep intact all notices
|
|
136
|
+
of the absence of any warranty; and give all recipients a copy of this
|
|
137
|
+
License along with the Program. You may charge any price or no price for
|
|
138
|
+
each copy that you convey, and you may offer support or warranty
|
|
139
|
+
protection for a fee.
|
|
140
|
+
|
|
141
|
+
5. Conveying Modified Source Versions.
|
|
142
|
+
|
|
143
|
+
You may convey a work based on the Program, or the modifications to
|
|
144
|
+
produce it from the Program, in the form of source code under the terms
|
|
145
|
+
of section 4, provided that you also meet all of these conditions:
|
|
146
|
+
|
|
147
|
+
a) The work must carry prominent notices stating that you modified it,
|
|
148
|
+
and giving a relevant date.
|
|
149
|
+
|
|
150
|
+
b) The work must carry prominent notices stating that it is released
|
|
151
|
+
under this License and any conditions added under section 7. This
|
|
152
|
+
requirement modifies the requirement in section 4 to “keep intact all
|
|
153
|
+
notices”.
|
|
154
|
+
|
|
155
|
+
c) You must license the entire work, as a whole, under this License to
|
|
156
|
+
anyone who comes into possession of a copy. This License will therefore
|
|
157
|
+
apply, along with any applicable section 7 additional terms, to the
|
|
158
|
+
whole of the work, and all its parts, regardless of how they are
|
|
159
|
+
packaged. This License gives no permission to license the work in any
|
|
160
|
+
other way, but it does not invalidate such permission if you have
|
|
161
|
+
separately received it.
|
|
162
|
+
|
|
163
|
+
d) If the work has interactive user interfaces, each must display
|
|
164
|
+
Appropriate Legal Notices; however, if the Program has interactive
|
|
165
|
+
interfaces that do not display Appropriate Legal Notices, your work
|
|
166
|
+
need not make them do so.
|
|
167
|
+
|
|
168
|
+
A compilation of a covered work with other separate and independent
|
|
169
|
+
works, which are not by their nature extensions of the covered work, and
|
|
170
|
+
which are not combined with it such as to form a larger program, in or on
|
|
171
|
+
a volume of a storage or distribution medium, is called an “aggregate” if
|
|
172
|
+
the compilation and its resulting copyright are not used to limit the
|
|
173
|
+
access or legal rights of the compilation's users beyond what the
|
|
174
|
+
individual works permit. Inclusion of a covered work in an aggregate does
|
|
175
|
+
not cause this License to apply to the other parts of the aggregate.
|
|
176
|
+
|
|
177
|
+
6. Conveying Non-Source Forms.
|
|
178
|
+
|
|
179
|
+
You may convey a covered work in object code form under the terms of
|
|
180
|
+
sections 4 and 5, provided that you also convey the machine-readable
|
|
181
|
+
Corresponding Source under the terms of this License, in one of these
|
|
182
|
+
ways:
|
|
183
|
+
|
|
184
|
+
a) Convey the object code in, or embodied in, a physical product
|
|
185
|
+
(including a physical distribution medium), accompanied by the
|
|
186
|
+
Corresponding Source fixed on a durable physical medium customarily
|
|
187
|
+
used for software interchange.
|
|
188
|
+
|
|
189
|
+
b) Convey the object code in, or embodied in, a physical product
|
|
190
|
+
(including a physical distribution medium), accompanied by a written
|
|
191
|
+
offer, valid for at least three years and valid for as long as you
|
|
192
|
+
offer spare parts or customer support for that product model, to give
|
|
193
|
+
anyone who possesses the object code either (1) a copy of the
|
|
194
|
+
Corresponding Source for all the software in the product that is
|
|
195
|
+
covered by this License, on a durable physical medium customarily used
|
|
196
|
+
for software interchange, for a price no more than your reasonable cost
|
|
197
|
+
of physically performing this conveying of source, or (2) access to
|
|
198
|
+
copy the Corresponding Source from a network server at no charge.
|
|
199
|
+
|
|
200
|
+
c) Convey individual copies of the object code with a copy of the
|
|
201
|
+
written offer to provide the Corresponding Source. This alternative is
|
|
202
|
+
allowed only occasionally and noncommercially, and only if you received
|
|
203
|
+
the object code with such an offer, in accord with subsection 6b.
|
|
204
|
+
|
|
205
|
+
d) Convey the object code by offering access from a designated place
|
|
206
|
+
(gratis or for a charge), and offer equivalent access to the
|
|
207
|
+
Corresponding Source in the same way through the same place at no
|
|
208
|
+
further charge. You need not require recipients to copy the
|
|
209
|
+
Corresponding Source along with the object code. If the place to copy
|
|
210
|
+
the object code is a network server, the Corresponding Source may be on
|
|
211
|
+
a different server (operated by you or a third party) that supports
|
|
212
|
+
equivalent copying facilities, provided you maintain clear directions
|
|
213
|
+
next to the object code saying where to find the Corresponding Source.
|
|
214
|
+
Regardless of what server hosts the Corresponding Source, you remain
|
|
215
|
+
obligated to ensure that it is available for as long as needed to
|
|
216
|
+
satisfy these requirements.
|
|
217
|
+
|
|
218
|
+
e) Convey the object code using peer-to-peer transmission, provided you
|
|
219
|
+
inform other peers where the object code and Corresponding Source of
|
|
220
|
+
the work are being offered to the general public at no charge under
|
|
221
|
+
subsection 6d.
|
|
222
|
+
|
|
223
|
+
A separable portion of the object code, whose source code is excluded
|
|
224
|
+
from the Corresponding Source as a System Library, need not be included
|
|
225
|
+
in conveying the object code work.
|
|
226
|
+
|
|
227
|
+
A “User Product” is either (1) a “consumer product”, which means any
|
|
228
|
+
tangible personal property which is normally used for personal, family,
|
|
229
|
+
or household purposes, or (2) anything designed or sold for incorporation
|
|
230
|
+
into a dwelling. In determining whether a product is a consumer product,
|
|
231
|
+
doubtful cases shall be resolved in favor of coverage. For a particular
|
|
232
|
+
product received by a particular user, “normally used” refers to a
|
|
233
|
+
typical or common use of that class of product, regardless of the status
|
|
234
|
+
of the particular user or of the way in which the particular user
|
|
235
|
+
actually uses, or expects or is expected to use, the product. A product
|
|
236
|
+
is a consumer product regardless of whether the product has substantial
|
|
237
|
+
commercial, industrial or non-consumer uses, unless such uses represent
|
|
238
|
+
the only significant mode of use of the product.
|
|
239
|
+
|
|
240
|
+
“Installation Information” for a User Product means any methods,
|
|
241
|
+
procedures, authorization keys, or other information required to install
|
|
242
|
+
and execute modified versions of a covered work in that User Product from
|
|
243
|
+
a modified version of its Corresponding Source. The information must
|
|
244
|
+
suffice to ensure that the continued functioning of the modified object
|
|
245
|
+
code is in no case prevented or interfered with solely because
|
|
246
|
+
modification has been made.
|
|
247
|
+
|
|
248
|
+
If you convey an object code work under this section in, or with, or
|
|
249
|
+
specifically for use in, a User Product, and the conveying occurs as part
|
|
250
|
+
of a transaction in which the right of possession and use of the User
|
|
251
|
+
Product is transferred to the recipient in perpetuity or for a fixed term
|
|
252
|
+
(regardless of how the transaction is characterized), the Corresponding
|
|
253
|
+
Source conveyed under this section must be accompanied by the
|
|
254
|
+
Installation Information. But this requirement does not apply if neither
|
|
255
|
+
you nor any third party retains the ability to install modified object
|
|
256
|
+
code on the User Product (for example, the work has been installed in
|
|
257
|
+
ROM).
|
|
258
|
+
|
|
259
|
+
The requirement to provide Installation Information does not include a
|
|
260
|
+
requirement to continue to provide support service, warranty, or updates
|
|
261
|
+
for a work that has been modified or installed by the recipient, or for
|
|
262
|
+
the User Product in which it has been modified or installed. Access
|
|
263
|
+
to a network may be denied when the modification itself materially
|
|
264
|
+
and adversely affects the operation of the network or violates the
|
|
265
|
+
rules and protocols for communication across the network.
|
|
266
|
+
|
|
267
|
+
Corresponding Source conveyed, and Installation Information provided, in
|
|
268
|
+
accord with this section must be in a format that is publicly documented
|
|
269
|
+
(and with an implementation available to the public in source code form),
|
|
270
|
+
and must require no special password or key for unpacking, reading or
|
|
271
|
+
copying.
|
|
272
|
+
|
|
273
|
+
7. Additional Terms.
|
|
274
|
+
|
|
275
|
+
“Additional permissions” are terms that supplement the terms of this
|
|
276
|
+
License by making exceptions from one or more of its conditions.
|
|
277
|
+
Additional permissions that are applicable to the entire Program shall be
|
|
278
|
+
treated as though they were included in this License, to the extent that
|
|
279
|
+
they are valid under applicable law. If additional permissions apply only
|
|
280
|
+
to part of the Program, that part may be used separately under those
|
|
281
|
+
permissions, but the entire Program remains governed by this License
|
|
282
|
+
without regard to the additional permissions. When you convey a copy of
|
|
283
|
+
a covered work, you may at your option remove any additional permissions
|
|
284
|
+
from that copy, or from any part of it. (Additional permissions may be
|
|
285
|
+
written to require their own removal in certain cases when you modify the
|
|
286
|
+
work.) You may place additional permissions on material, added by you to
|
|
287
|
+
a covered work, for which you have or can give appropriate copyright
|
|
288
|
+
permission.
|
|
289
|
+
|
|
290
|
+
Notwithstanding any other provision of this License, for material you add
|
|
291
|
+
to a covered work, you may (if authorized by the copyright holders of
|
|
292
|
+
that material) supplement the terms of this License with terms:
|
|
293
|
+
|
|
294
|
+
a) Disclaiming warranty or limiting liability differently from the
|
|
295
|
+
terms of sections 15 and 16 of this License; or
|
|
296
|
+
|
|
297
|
+
b) Requiring preservation of specified reasonable legal notices or
|
|
298
|
+
author attributions in that material or in the Appropriate Legal
|
|
299
|
+
Notices displayed by works containing it; or
|
|
300
|
+
|
|
301
|
+
c) Prohibiting misrepresentation of the origin of that material, or
|
|
302
|
+
requiring that modified versions of such material be marked in
|
|
303
|
+
reasonable ways as different from the original version; or
|
|
304
|
+
|
|
305
|
+
d) Limiting the use for publicity purposes of names of licensors or
|
|
306
|
+
authors of the material; or
|
|
307
|
+
|
|
308
|
+
e) Declining to grant rights under trademark law for use of some trade
|
|
309
|
+
names, trademarks, or service marks; or
|
|
310
|
+
|
|
311
|
+
f) Requiring indemnification of licensors and authors of that material
|
|
312
|
+
by anyone who conveys the material (or modified versions of it) with
|
|
313
|
+
contractual assumptions of liability to the recipient, for any
|
|
314
|
+
liability that these contractual assumptions directly impose on those
|
|
315
|
+
licensors and authors.
|
|
316
|
+
|
|
317
|
+
All other non-permissive additional terms are considered “further
|
|
318
|
+
restrictions” within the meaning of section 10. If the Program as you
|
|
319
|
+
received it, or any part of it, contains a notice stating that it is
|
|
320
|
+
governed by this License along with a term that is a further restriction,
|
|
321
|
+
you may remove that term. If a license document contains a further
|
|
322
|
+
restriction but permits relicensing or conveying under this License, you
|
|
323
|
+
may add to a covered work material governed by the terms of that license
|
|
324
|
+
document, provided that the further restriction does not survive such
|
|
325
|
+
relicensing or conveying.
|
|
326
|
+
|
|
327
|
+
If you add terms to a covered work in accord with this section, you must
|
|
328
|
+
place, in the relevant source files, a statement of the additional terms
|
|
329
|
+
that apply to those files, or a notice indicating where to find the
|
|
330
|
+
applicable terms. Additional terms, permissive or non-permissive, may be
|
|
331
|
+
stated in the form of a separately written license, or stated as
|
|
332
|
+
exceptions; the above requirements apply either way.
|
|
333
|
+
|
|
334
|
+
8. Termination.
|
|
335
|
+
|
|
336
|
+
You may not propagate or modify a covered work except as expressly
|
|
337
|
+
provided under this License. Any attempt otherwise to propagate or modify
|
|
338
|
+
it is void, and will automatically terminate your rights under this
|
|
339
|
+
License (including any patent licenses granted under the third paragraph
|
|
340
|
+
of section 11).
|
|
341
|
+
|
|
342
|
+
However, if you cease all violation of this License, then your license
|
|
343
|
+
from a particular copyright holder is reinstated (a) provisionally,
|
|
344
|
+
unless and until the copyright holder explicitly and finally terminates
|
|
345
|
+
your license, and (b) permanently, if the copyright holder fails to
|
|
346
|
+
notify you of the violation by some reasonable means prior to 60 days
|
|
347
|
+
after the cessation.
|
|
348
|
+
|
|
349
|
+
Moreover, your license from a particular copyright holder is reinstated
|
|
350
|
+
permanently if the copyright holder notifies you of the violation by some
|
|
351
|
+
reasonable means, this is the first time you have received notice of
|
|
352
|
+
violation of this License (for any work) from that copyright holder, and
|
|
353
|
+
you cure the violation prior to 30 days after your receipt of the notice.
|
|
354
|
+
|
|
355
|
+
Termination of your rights under this section does not terminate the
|
|
356
|
+
licenses of parties who have received copies or rights from you under
|
|
357
|
+
this License. If your rights have been terminated and not permanently
|
|
358
|
+
reinstated, you do not qualify to receive new licenses for the same
|
|
359
|
+
material under section 10.
|
|
360
|
+
|
|
361
|
+
9. Acceptance Not Required for Having Copies.
|
|
362
|
+
|
|
363
|
+
You are not required to accept this License in order to receive or run a
|
|
364
|
+
copy of the Program. Ancillary propagation of a covered work occurring
|
|
365
|
+
solely as a consequence of using peer-to-peer transmission to receive a
|
|
366
|
+
copy likewise does not require acceptance. However, nothing other than
|
|
367
|
+
this License grants you permission to propagate or modify any covered
|
|
368
|
+
work. These actions infringe copyright if you do not accept this License.
|
|
369
|
+
Therefore, by modifying or propagating a covered work, you indicate your
|
|
370
|
+
acceptance of this License to do so.
|
|
371
|
+
|
|
372
|
+
10. Automatic Licensing of Downstream Recipients.
|
|
373
|
+
|
|
374
|
+
Each time you convey a covered work, the recipient automatically receives
|
|
375
|
+
a license from the original licensors, to run, modify and propagate that
|
|
376
|
+
work, subject to this License. You are not responsible for enforcing
|
|
377
|
+
compliance by third parties with this License.
|
|
378
|
+
|
|
379
|
+
An “entity transaction” is a transaction transferring control of an
|
|
380
|
+
organization, or substantially all assets of one, or subdividing an
|
|
381
|
+
organization, or merging organizations. If propagation of a covered work
|
|
382
|
+
results from an entity transaction, each party to that transaction who
|
|
383
|
+
receives a copy of the work also receives whatever licenses to the work
|
|
384
|
+
the party's predecessor in interest had or could give under the previous
|
|
385
|
+
paragraph, plus a right to possession of the Corresponding Source of the
|
|
386
|
+
work from the predecessor in interest, if the predecessor has it or can
|
|
387
|
+
get it with reasonable efforts.
|
|
388
|
+
|
|
389
|
+
You may not impose any further restrictions on the exercise of the rights
|
|
390
|
+
granted or affirmed under this License. For example, you may not impose a
|
|
391
|
+
license fee, royalty, or other charge for exercise of rights granted
|
|
392
|
+
under this License, and you may not initiate litigation (including a
|
|
393
|
+
cross-claim or counterclaim in a lawsuit) alleging that any patent claim
|
|
394
|
+
is infringed by making, using, selling, offering for sale, or importing
|
|
395
|
+
the Program or any portion of it.
|
|
396
|
+
|
|
397
|
+
11. Patents.
|
|
398
|
+
|
|
399
|
+
A “contributor” is a copyright holder who authorizes use under this
|
|
400
|
+
License of the Program or a work on which the Program is based. The work
|
|
401
|
+
thus licensed is called the contributor's “contributor version”.
|
|
402
|
+
|
|
403
|
+
A contributor's “essential patent claims” are all patent claims owned or
|
|
404
|
+
controlled by the contributor, whether already acquired or hereafter
|
|
405
|
+
acquired, that would be infringed by some manner, permitted by this
|
|
406
|
+
License, of making, using, or selling its contributor version, but do not
|
|
407
|
+
include claims that would be infringed only as a consequence of further
|
|
408
|
+
modification of the contributor version. For purposes of this definition,
|
|
409
|
+
“control” includes the right to grant patent sublicenses in a manner
|
|
410
|
+
consistent with the requirements of this License.
|
|
411
|
+
|
|
412
|
+
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
|
413
|
+
patent license under the contributor's essential patent claims, to make,
|
|
414
|
+
use, sell, offer for sale, import and otherwise run, modify and propagate
|
|
415
|
+
the contents of its contributor version.
|
|
416
|
+
|
|
417
|
+
In the following three paragraphs, a “patent license” is any express
|
|
418
|
+
agreement or commitment, however denominated, not to enforce a patent
|
|
419
|
+
(such as an express permission to practice a patent or covenant not to
|
|
420
|
+
sue for patent infringement). To “grant” such a patent license to a party
|
|
421
|
+
means to make such an agreement or commitment not to enforce a patent
|
|
422
|
+
against the party.
|
|
423
|
+
|
|
424
|
+
If you convey a covered work, knowingly relying on a patent license, and
|
|
425
|
+
the Corresponding Source of the work is not available for anyone to copy,
|
|
426
|
+
free of charge and under the terms of this License, through a publicly
|
|
427
|
+
available network server or other readily accessible means, then you must
|
|
428
|
+
either (1) cause the Corresponding Source to be so available, or (2)
|
|
429
|
+
arrange to deprive yourself of the benefit of the patent license for this
|
|
430
|
+
particular work, or (3) arrange, in a manner consistent with the
|
|
431
|
+
requirements of this License, to extend the patent license to downstream
|
|
432
|
+
recipients. “Knowingly relying” means you have actual knowledge that, but
|
|
433
|
+
for the patent license, your conveying the covered work in a country, or
|
|
434
|
+
your recipient's use of the covered work in a country, would infringe
|
|
435
|
+
one or more identifiable patents in that country that you have reason
|
|
436
|
+
to believe are valid.
|
|
437
|
+
|
|
438
|
+
If, pursuant to or in connection with a single transaction or
|
|
439
|
+
arrangement, you convey, or propagate by procuring conveyance of, a
|
|
440
|
+
covered work, and grant a patent license to some of the parties receiving
|
|
441
|
+
the covered work authorizing them to use, propagate, modify or convey a
|
|
442
|
+
specific copy of the covered work, then the patent license you grant is
|
|
443
|
+
automatically extended to all recipients of the covered work and works
|
|
444
|
+
based on it.
|
|
445
|
+
|
|
446
|
+
A patent license is “discriminatory” if it does not include within the
|
|
447
|
+
scope of its coverage, prohibits the exercise of, or is conditioned on
|
|
448
|
+
the non-exercise of one or more of the rights that are specifically
|
|
449
|
+
granted under this License. You may not convey a covered work if you are
|
|
450
|
+
a party to an arrangement with a third party that is in the business of
|
|
451
|
+
distributing software, under which you make payment to the third party
|
|
452
|
+
based on the extent of your activity of conveying the work, and under
|
|
453
|
+
which the third party grants, to any of the parties who would receive the
|
|
454
|
+
covered work from you, a discriminatory patent license (a) in connection
|
|
455
|
+
with copies of the covered work conveyed by you (or copies made from
|
|
456
|
+
those copies), or (b) primarily for and in connection with specific
|
|
457
|
+
products or compilations that contain the covered work, unless you
|
|
458
|
+
entered into that arrangement, or that patent license was granted, prior
|
|
459
|
+
to 28 March 2007.
|
|
460
|
+
|
|
461
|
+
Nothing in this License shall be construed as excluding or limiting any
|
|
462
|
+
implied license or other defenses to infringement that may otherwise be
|
|
463
|
+
available to you under applicable patent law.
|
|
464
|
+
|
|
465
|
+
12. No Surrender of Others' Freedom.
|
|
466
|
+
|
|
467
|
+
If conditions are imposed on you (whether by court order, agreement or
|
|
468
|
+
otherwise) that contradict the conditions of this License, they do not
|
|
469
|
+
excuse you from the conditions of this License. If you cannot use,
|
|
470
|
+
propagate or convey a covered work so as to satisfy simultaneously your
|
|
471
|
+
obligations under this License and any other pertinent obligations, then
|
|
472
|
+
as a consequence you may not use, propagate or convey it at all. For
|
|
473
|
+
example, if you agree to terms that obligate you to collect a royalty for
|
|
474
|
+
further conveying from those to whom you convey the Program, the only way
|
|
475
|
+
you could satisfy both those terms and this License would be to refrain
|
|
476
|
+
entirely from conveying the Program.
|
|
477
|
+
|
|
478
|
+
13. Offering the Program as a Service.
|
|
479
|
+
|
|
480
|
+
If you make the functionality of the Program or a modified version
|
|
481
|
+
available to third parties as a service, you must make the Service Source
|
|
482
|
+
Code available via network download to everyone at no charge, under the
|
|
483
|
+
terms of this License. Making the functionality of the Program or
|
|
484
|
+
modified version available to third parties as a service includes,
|
|
485
|
+
without limitation, enabling third parties to interact with the
|
|
486
|
+
functionality of the Program or modified version remotely through a
|
|
487
|
+
computer network, offering a service the value of which entirely or
|
|
488
|
+
primarily derives from the value of the Program or modified version, or
|
|
489
|
+
offering a service that accomplishes for users the primary purpose of the
|
|
490
|
+
Program or modified version.
|
|
491
|
+
|
|
492
|
+
“Service Source Code” means the Corresponding Source for the Program or
|
|
493
|
+
the modified version, and the Corresponding Source for all programs that
|
|
494
|
+
you use to make the Program or modified version available as a service,
|
|
495
|
+
including, without limitation, management software, user interfaces,
|
|
496
|
+
application program interfaces, automation software, monitoring software,
|
|
497
|
+
backup software, storage software and hosting software, all such that a
|
|
498
|
+
user could run an instance of the service using the Service Source Code
|
|
499
|
+
you make available.
|
|
500
|
+
|
|
501
|
+
14. Revised Versions of this License.
|
|
502
|
+
|
|
503
|
+
MongoDB, Inc. may publish revised and/or new versions of the Server Side
|
|
504
|
+
Public License from time to time. Such new versions will be similar in
|
|
505
|
+
spirit to the present version, but may differ in detail to address new
|
|
506
|
+
problems or concerns.
|
|
507
|
+
|
|
508
|
+
Each version is given a distinguishing version number. If the Program
|
|
509
|
+
specifies that a certain numbered version of the Server Side Public
|
|
510
|
+
License “or any later version” applies to it, you have the option of
|
|
511
|
+
following the terms and conditions either of that numbered version or of
|
|
512
|
+
any later version published by MongoDB, Inc. If the Program does not
|
|
513
|
+
specify a version number of the Server Side Public License, you may
|
|
514
|
+
choose any version ever published by MongoDB, Inc.
|
|
515
|
+
|
|
516
|
+
If the Program specifies that a proxy can decide which future versions of
|
|
517
|
+
the Server Side Public License can be used, that proxy's public statement
|
|
518
|
+
of acceptance of a version permanently authorizes you to choose that
|
|
519
|
+
version for the Program.
|
|
520
|
+
|
|
521
|
+
Later license versions may give you additional or different permissions.
|
|
522
|
+
However, no additional obligations are imposed on any author or copyright holder
|
|
523
|
+
as a result of your choosing to follow a later version.
|
|
524
|
+
|
|
525
|
+
15. Disclaimer of Warranty.
|
|
526
|
+
|
|
527
|
+
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
|
528
|
+
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS
|
|
529
|
+
AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY
|
|
530
|
+
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
|
531
|
+
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
532
|
+
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
|
533
|
+
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
|
534
|
+
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
|
535
|
+
|
|
536
|
+
16. Limitation of Liability.
|
|
537
|
+
|
|
538
|
+
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
|
539
|
+
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
|
540
|
+
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING
|
|
541
|
+
ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF
|
|
542
|
+
THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO
|
|
543
|
+
LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU
|
|
544
|
+
OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
|
545
|
+
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
|
546
|
+
POSSIBILITY OF SUCH DAMAGES.
|
|
547
|
+
|
|
548
|
+
17. Interpretation of Sections 15 and 16.
|
|
549
|
+
|
|
550
|
+
If the disclaimer of warranty and limitation of liability provided above
|
|
551
|
+
cannot be given local legal effect according to their terms, reviewing
|
|
552
|
+
courts shall apply local law that most closely approximates an absolute
|
|
553
|
+
waiver of all civil liability in connection with the Program, unless a
|
|
554
|
+
warranty or assumption of liability accompanies a copy of the Program in
|
|
555
|
+
return for a fee.
|
|
556
|
+
|
|
557
|
+
END OF TERMS AND CONDITIONS
|
package/README.md
CHANGED
|
@@ -1,3 +1,45 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: Qwen Image Edit 2.1 — the cached-reference edit lane over the shared 2.1 checkpoint; up to 16 images, edits at the stated target resolution.
|
|
3
|
+
kind: package-library
|
|
4
|
+
---
|
|
2
5
|
|
|
3
|
-
|
|
6
|
+
# qwen-img-edit-21
|
|
7
|
+
|
|
8
|
+
qwen-img-edit-21 registers Qwen Image Edit 2.1 (form `form_edit`, label "Qwen Image Edit 2.1", genre `image`): the instruction-edit lane over the SAME physical 2.1 checkpoint as the t2i sibling. The lane: UNETLoader → QwenImage21Cache (the reference-prefix KV cache wrapped around the base unet — no separate edit weights exist) → TextEncodeQwenImage21 conditioning on the anchor images through its `image_N` autogrow slots (positive AND negative from ONE node) → EmptyLatentImage at the stated target resolution → KSampler → decode and save under `<run>/edit`. This is not the 2511 lane (VAEEncode-of-source at source resolution); the branch key is the lane's `text_encode_node`.
|
|
9
|
+
|
|
10
|
+
## Params and law
|
|
11
|
+
|
|
12
|
+
Declared surface: `input_images`, `image1`, `image2`, `image3`, `reference_images`, `input_mask` (validation-only aliases the lane admits as wire keys), `prompt`, `negative_prompt`, `width`, `height`, `seed`, `steps`, `cfg`, `sampler`, `scheduler`. Laws: `width` and `height` ride together — an EmptyLatentImage takes both axes or neither, bounds 256–1536; `prompt` is required (the instruction, not a description of the image); an anchor is required — the ordered `input_images` list or a legacy spelling (`image1` / `image2` / `image3` / `reference_images`). The image cap is 16 total, anchor included (`max_images`).
|
|
13
|
+
|
|
14
|
+
Defaults: 25 steps, `euler` / `simple`, cfg 1, 1024×1024. Variants: `int8` (about 7.3 GB unet, about 24 GB VRAM, DEFAULT — provisioning required; without the 2.1 files the engine refuses loud) and `bf16` (about 14.2 GB, about 48 GB). Recipes: `remove_background` (the official template's canned prompt verbatim), `upstream_solvers`, `default`.
|
|
15
|
+
|
|
16
|
+
## Mod surface
|
|
17
|
+
|
|
18
|
+
The DECL boards `mask` only: the bare flavor whose region contract rides the crop_stitch detailer over the cached model; automatic inpainting with a named field refuses — the LanPaint sampler is 2511's lane. `./mods/loras` is the seam with an empty row set (no first-party 2.1 adapters); nothing is fetched from either subpath.
|
|
19
|
+
|
|
20
|
+
## Model Experience
|
|
21
|
+
|
|
22
|
+
### Request context and condition
|
|
23
|
+
|
|
24
|
+
A run needs the anchor image and the edit instruction; target resolution and the sampling block ride defaults. Reference sets beyond the anchor go in `input_images` order, up to the 16-image ceiling.
|
|
25
|
+
|
|
26
|
+
#### What the model sees
|
|
27
|
+
|
|
28
|
+
The anchor and reference images (up to 16), the instruction, the target resolution, and the sampling block; the cached lane above.
|
|
29
|
+
|
|
30
|
+
#### Token effect
|
|
31
|
+
|
|
32
|
+
Zero-direct: an engine graph, not a token stream.
|
|
33
|
+
|
|
34
|
+
#### KV Cache effect
|
|
35
|
+
|
|
36
|
+
Within a run, the cache is the lane's point: QwenImage21Cache prefixes reference KV around the base unet, so the edit shares context with its anchors. Across runs it stays independent.
|
|
37
|
+
|
|
38
|
+
## Known Limitations and Deferred Work
|
|
39
|
+
|
|
40
|
+
- **16-image ceiling** — beyond `max_images` the kit refuses loud; larger reference sets need trimming.
|
|
41
|
+
- **Resolution pair rides together** — a lone width or height is refused (the range rule made law).
|
|
42
|
+
- **No LoRA rows** — the `./mods/loras` seam is empty until first-party adapters land.
|
|
43
|
+
- **Live behavior unobserved** — not verified against the running model.
|
|
44
|
+
|
|
45
|
+
Exports: the plugin root, `./package.json`, `./mods/loras`, `./mods/mask`.
|
package/lib/actions.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ComfyActionSpec } from "@melite/comfyui-card-kit";
|
|
2
|
+
import { type LaneInputsFacts } from "@melite/comfyui-card-kit/facts";
|
|
3
|
+
/** The closed facts shape the 2.1 edit segment reads. */
|
|
4
|
+
export type EditFacts = {
|
|
5
|
+
readonly unet: string;
|
|
6
|
+
readonly text_encoder: string;
|
|
7
|
+
readonly vae: string;
|
|
8
|
+
readonly clip_type: string;
|
|
9
|
+
readonly text_encode_node: "TextEncodeQwenImage21";
|
|
10
|
+
readonly max_images: number;
|
|
11
|
+
};
|
|
12
|
+
/** The gated params doc the edit segment reads (the card's schema
|
|
13
|
+
* walk validated types and bounds; the bag/region rows ride beneath
|
|
14
|
+
* flat params exactly as the card schema declares them). */
|
|
15
|
+
export type EditParams = Record<string, unknown>;
|
|
16
|
+
/** The edit facts door: the resolved lane_inputs parsed into the
|
|
17
|
+
* closed shape. A drifted encoder class refuses here, never
|
|
18
|
+
* silently routes to another lane's topology. `max_images` is the
|
|
19
|
+
* node's own truth (16 total, anchor included) and floors at 1 —
|
|
20
|
+
* a degenerate cap is a DECL bug.
|
|
21
|
+
* @param raw the resolved lane_inputs (family ⊕ variant)
|
|
22
|
+
* @returns the typed facts the segment factory reads */
|
|
23
|
+
export declare function parseEditFacts(raw: LaneInputsFacts): EditFacts;
|
|
24
|
+
/** The edit action: the cached-reference lane — loaders → lora
|
|
25
|
+
* stack → text pair → per-slot LoadImage anchors →
|
|
26
|
+
* QwenImage21Cache + TextEncodeQwenImage21 (pos+neg from one node,
|
|
27
|
+
* refs on the images.image_N autogrow slots) → EITHER the region
|
|
28
|
+
* detailer tail (mask_mode crop_stitch) OR EmptyLatentImage at
|
|
29
|
+
* target resolution → KSampler → decode + save under <run>/edit. */
|
|
30
|
+
export declare const edit: ComfyActionSpec<EditParams, EditFacts>;
|
|
31
|
+
//# sourceMappingURL=actions.d.ts.map
|
package/lib/actions.js
ADDED
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { loadTextPair, decodeSave, stackLoras, orderedInputImages, regionSegs, detailerSave, isSpell, laneSampler, laneScheduler } from "@melite/comfyui-card-kit";
|
|
2
|
+
import { fireLoras } from "@melite/comfyui-card-kit/guard";
|
|
3
|
+
import { parseDiffusionLaneFacts, parseEditCap } from "@melite/comfyui-card-kit/facts";
|
|
4
|
+
import { EDIT_DIFFUSION_BOUNDS, diffusionParamRows } from "@melite/comfyui-card-kit/paramRows";
|
|
5
|
+
/** The edit facts door: the resolved lane_inputs parsed into the
|
|
6
|
+
* closed shape. A drifted encoder class refuses here, never
|
|
7
|
+
* silently routes to another lane's topology. `max_images` is the
|
|
8
|
+
* node's own truth (16 total, anchor included) and floors at 1 —
|
|
9
|
+
* a degenerate cap is a DECL bug.
|
|
10
|
+
* @param raw the resolved lane_inputs (family ⊕ variant)
|
|
11
|
+
* @returns the typed facts the segment factory reads */
|
|
12
|
+
export function parseEditFacts(raw) {
|
|
13
|
+
// The checks + refusal prose live in the kit (J3 consolidation,
|
|
14
|
+
|
|
15
|
+
// into the family's own typed shape (B4).
|
|
16
|
+
const f = parseDiffusionLaneFacts(raw, "qwen-img-edit-21 edit", { key: "text_encode_node", node: "TextEncodeQwenImage21" }, false);
|
|
17
|
+
return { unet: f.unet, text_encoder: f.text_encoder, vae: f.vae, clip_type: f.clip_type, text_encode_node: f.node, max_images: parseEditCap(raw, "qwen-img-edit-21 edit") };
|
|
18
|
+
}
|
|
19
|
+
/** The edit action: the cached-reference lane — loaders → lora
|
|
20
|
+
* stack → text pair → per-slot LoadImage anchors →
|
|
21
|
+
* QwenImage21Cache + TextEncodeQwenImage21 (pos+neg from one node,
|
|
22
|
+
* refs on the images.image_N autogrow slots) → EITHER the region
|
|
23
|
+
* detailer tail (mask_mode crop_stitch) OR EmptyLatentImage at
|
|
24
|
+
* target resolution → KSampler → decode + save under <run>/edit. */
|
|
25
|
+
export const edit = {
|
|
26
|
+
id: "edit",
|
|
27
|
+
inputs: [],
|
|
28
|
+
outputs: [{ name: "image", kind: "IMAGE" }],
|
|
29
|
+
// THE DECLARED SURFACE (the write plane, phase 2): the
|
|
30
|
+
// image-edit card schema's own types and bounds — the family
|
|
31
|
+
// door judges defaults and variant presets against this row;
|
|
32
|
+
// the closed sets resolve from the ONE engine vocabulary. The
|
|
33
|
+
// lanpaint knobs are mod-owned (the advanced tier) and ride the
|
|
34
|
+
// mod plane, not this surface.
|
|
35
|
+
params: [
|
|
36
|
+
{ name: "input_images", type: "image_list" },
|
|
37
|
+
{ name: "image1", type: "string" },
|
|
38
|
+
{ name: "image2", type: "string" },
|
|
39
|
+
{ name: "image3", type: "string" },
|
|
40
|
+
{ name: "reference_images", type: "image_list" },
|
|
41
|
+
...diffusionParamRows(EDIT_DIFFUSION_BOUNDS),
|
|
42
|
+
{ name: "match_input_resolution", type: "boolean" },
|
|
43
|
+
{ name: "use_stock_nodes", type: "boolean" },
|
|
44
|
+
{ name: "double_reference", type: "boolean" },
|
|
45
|
+
],
|
|
46
|
+
facts: parseEditFacts,
|
|
47
|
+
build({ p, facts, model, g, runId }) {
|
|
48
|
+
const seed = p.seed;
|
|
49
|
+
let unet = g.node("UNETLoader", { unet_name: facts.unet, weight_dtype: "default" }).out();
|
|
50
|
+
unet = stackLoras(g, unet, fireLoras(model, p));
|
|
51
|
+
const { clip, vae } = loadTextPair(g, facts);
|
|
52
|
+
// THE ONE LIST (the merge): orderedInputImages refuses mixed
|
|
53
|
+
// vocabularies loud; the anchor is position 0, the references
|
|
54
|
+
// are the rest. THE SHARED CEILING (the max_images law — ONE
|
|
55
|
+
// check) counts the WHOLE list (anchor included) against the
|
|
56
|
+
// DECL cap before any image loads — never drops quiet, never
|
|
57
|
+
// orphans LoadImages. The card's anchor gate pins the empty
|
|
58
|
+
// list; this re-pin covers direct action callers.
|
|
59
|
+
const list = orderedInputImages(p);
|
|
60
|
+
if (list.length === 0) {
|
|
61
|
+
throw new Error(`required param 'input_images' missing on the image-edit card (the first image is the one being edited — the list cannot be empty; legacy drafts may state image1 alone instead)`);
|
|
62
|
+
}
|
|
63
|
+
const cap = facts.max_images;
|
|
64
|
+
if (list.length > cap) {
|
|
65
|
+
throw new Error(`'input_images' fires on the image-edit card (this lane takes ${cap} input images total — the first is the one being edited, ${cap - 1} references — but the list counts ${list.length}; drop ${list.length - cap}) — the TS plane maps every stated image to a slot, never drops one quietly`);
|
|
66
|
+
}
|
|
67
|
+
// THE SPELL ARM rides the anchor verbatim (the wired-tensor
|
|
68
|
+
// law: a $name names a wired stage input, never a file);
|
|
69
|
+
// files/URLs/estate paths keep the LoadImage handoff.
|
|
70
|
+
const anchor = list[0];
|
|
71
|
+
const refs = list.slice(1);
|
|
72
|
+
const image = isSpell(anchor)
|
|
73
|
+
? anchor
|
|
74
|
+
: g.node("LoadImage", { image: anchor, upload: "image" }).out(0);
|
|
75
|
+
// Each stated ref loads ahead of the encodes (creation order IS
|
|
76
|
+
// node-id order); blank refs contribute no input at all. A
|
|
77
|
+
// spelled ref rides verbatim — same wired-tensor law as the
|
|
78
|
+
// anchor; a file keeps its LoadImage.
|
|
79
|
+
const loaded = refs.map((s) => isSpell(s) ? s : g.node("LoadImage", { image: s, upload: "image" }).out(0));
|
|
80
|
+
// THE REGION ROW (one merge — the gate's own merge twin): the
|
|
81
|
+
// bag merges UNDER flat params (explicit flat keys win). One
|
|
82
|
+
// region per run; the region arm below reads this row.
|
|
83
|
+
const bag = Array.isArray(p.mask) ? p.mask : [];
|
|
84
|
+
const merged = { ...p };
|
|
85
|
+
const bagObj = bag.length === 1 && typeof bag[0] === "object" && bag[0] !== null ? bag[0] : null;
|
|
86
|
+
if (bagObj) {
|
|
87
|
+
for (const [k, v] of Object.entries(bagObj)) {
|
|
88
|
+
if (merged[k] === undefined)
|
|
89
|
+
merged[k] = v;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
const maskPath = (merged.input_mask ?? "").trim();
|
|
93
|
+
const mode = (merged.mask_mode ?? "auto");
|
|
94
|
+
const cropStitch = (mode === "full_frame" ? "auto" : mode) === "crop_stitch";
|
|
95
|
+
// The 2.1 base has NO separate edit weights: the edit rides
|
|
96
|
+
// QwenImage21Cache (the reference-prefix KV cache wrapped
|
|
97
|
+
// around the SAME unet) + TextEncodeQwenImage21 conditioned on
|
|
98
|
+
// the anchor images through its own image_N autogrow slots,
|
|
99
|
+
// sampled on an EmptyLatentImage at the TARGET resolution (the
|
|
100
|
+
// official template graph). vae rides the encoder's optional
|
|
101
|
+
// input (reference latents splice); one encoder node emits
|
|
102
|
+
// pos+neg.
|
|
103
|
+
const cached = g.node("QwenImage21Cache", { model: unet, device: "auto", dtype: "default" }).out();
|
|
104
|
+
// THE AUTOGROW KEYS (the live v0.37 law, proven on the engine:
|
|
105
|
+
// execute(clip, prompt, negative_prompt, vae, resolution,
|
|
106
|
+
// images) — the slots ride DOTTED 'images.image_N' node-input
|
|
107
|
+
// keys, the executor's dynamic-path split nests them into the
|
|
108
|
+
// images dict; a bare 'image_1' reaches execute() as a kwarg
|
|
109
|
+
// and dies).
|
|
110
|
+
const images21 = { "images.image_1": image };
|
|
111
|
+
// THE ORDER RIDES CONTIGUOUSLY: refs map onto images.image_2+
|
|
112
|
+
// in order — no gaps, no second concept (the ceiling above
|
|
113
|
+
// already enforced the DECL cap).
|
|
114
|
+
loaded.forEach((ref, i) => {
|
|
115
|
+
images21[`images.image_${2 + i}`] = ref;
|
|
116
|
+
});
|
|
117
|
+
const enc21 = g.node("TextEncodeQwenImage21", {
|
|
118
|
+
clip, vae, prompt: p.prompt, negative_prompt: p.negative_prompt ?? "", resolution: 1024,
|
|
119
|
+
...images21,
|
|
120
|
+
});
|
|
121
|
+
// THE REGION DETAILER: the SAME generic arm as the 2511 tail,
|
|
122
|
+
// riding THIS lane's own model and conditioning (the
|
|
123
|
+
// reference vision tokens live in the conditioning — each crop
|
|
124
|
+
// edits against the anchor, the plain arm's contract). No
|
|
125
|
+
// EmptyLatentImage on this path: DetailerForEach encodes and
|
|
126
|
+
// sizes each crop itself (width/height would wire to nothing —
|
|
127
|
+
// the card's gate refuses them field-named).
|
|
128
|
+
if (cropStitch) {
|
|
129
|
+
const segs = regionSegs(g, merged, image, maskPath);
|
|
130
|
+
return detailerSave(g, p, merged, {
|
|
131
|
+
image, segs, model: cached, clip, vae,
|
|
132
|
+
positive: enc21.out(0), negative: enc21.out(1), seed,
|
|
133
|
+
}, runId).out();
|
|
134
|
+
}
|
|
135
|
+
const latent21 = g.node("EmptyLatentImage", {
|
|
136
|
+
batch_size: 1,
|
|
137
|
+
width: (p.width ?? 1024),
|
|
138
|
+
height: (p.height ?? 1024),
|
|
139
|
+
});
|
|
140
|
+
const sampled21 = g.node("KSampler", {
|
|
141
|
+
seed,
|
|
142
|
+
steps: p.steps,
|
|
143
|
+
cfg: p.cfg,
|
|
144
|
+
sampler_name: laneSampler(p),
|
|
145
|
+
scheduler: laneScheduler(p),
|
|
146
|
+
denoise: 1.0,
|
|
147
|
+
latent_image: latent21.out(),
|
|
148
|
+
model: cached,
|
|
149
|
+
positive: enc21.out(0),
|
|
150
|
+
negative: enc21.out(1),
|
|
151
|
+
});
|
|
152
|
+
return decodeSave(g, sampled21.out(), vae, `${runId}/edit`).out();
|
|
153
|
+
},
|
|
154
|
+
};
|
|
155
|
+
//# sourceMappingURL=actions.js.map
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Plugin } from "@deepseek-ai/cordis";
|
|
2
|
+
import type { ModelDecl } from '@melite/comfyui-card-kit/model-contract';
|
|
3
|
+
export declare const DECL: ModelDecl;
|
|
4
|
+
export declare const family: Plugin;
|
|
5
|
+
export { edit, parseEditFacts, type EditFacts, type EditParams } from "./actions.js";
|
|
6
|
+
export { family as default };
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
import { edit } from "./actions.js";
|
|
2
|
+
export const DECL = {
|
|
3
|
+
"id": "qwen-img-edit-21",
|
|
4
|
+
"form": "form_edit",
|
|
5
|
+
"label": "Qwen Image Edit 2.1",
|
|
6
|
+
"description": "Instruction-driven image editing on the Qwen-Image-2.1 base — the reference-cached lane: the SAME 2.1 checkpoint as text-to-image (no separate edit weights), wrapped in QwenImage21Cache with the anchor images spliced through TextEncodeQwenImage21's own vision path, sampled at target resolution. The sibling family qwen-img-21 serves the t2i lane on the image-gen card.",
|
|
7
|
+
"engine": "comfyui",
|
|
8
|
+
"defaults": {
|
|
9
|
+
"steps": 25,
|
|
10
|
+
"sampler": "euler",
|
|
11
|
+
"scheduler": "simple",
|
|
12
|
+
"cfg": 1,
|
|
13
|
+
|
|
14
|
+
// edit lane samples an EmptyLatentImage at target size — the
|
|
15
|
+
// values ARE the model's (the RANGE RULE: whoever owns the
|
|
16
|
+
// default owns the floor). Until now the DECL stated none and
|
|
17
|
+
// the LANE hardcoded `?? 1024` silently (lanes-image.ts) — the
|
|
18
|
+
// form showed empty Width/Height because the cascade had
|
|
19
|
+
// nothing to overlay. Declared here, the card's resolution
|
|
20
|
+
// group fills from the cascade; the lane's fallback arm now
|
|
21
|
+
// covers only direct (non-card) lane callers.
|
|
22
|
+
"width": 1024,
|
|
23
|
+
"height": 1024
|
|
24
|
+
},
|
|
25
|
+
"genre": "image",
|
|
26
|
+
// THE LANE SURFACE (fix shapes 1+2 — the model is the author of
|
|
27
|
+
// what it accepts; the card's visible_when guard list dies). The
|
|
28
|
+
// base params EVERY lane of this family accepts: the visible
|
|
29
|
+
// surface (input_images, prompt, negative_prompt, the sampling
|
|
30
|
+
// block) plus the card's VALIDATION-ONLY aliases (image1/2/3,
|
|
31
|
+
// reference_images, input_mask — hidden carriers, but a wire key
|
|
32
|
+
// the lane admits, so the surface owns them) and THIS lane's
|
|
33
|
+
// target resolution pair — the 2.1 edit lane samples an
|
|
34
|
+
// EmptyLatentImage at stated size, so width/height are 2.1's —
|
|
35
|
+
// plus the card-owned match toggle (ON by default: output matches
|
|
36
|
+
// the anchor; OFF: the custom pair rides). The toggle is admitted
|
|
37
|
+
// on BOTH edit lanes (the 2511 lane holds it as a no-op — it
|
|
38
|
+
// always edits at source resolution).
|
|
39
|
+
// use_stock_nodes/double_reference are 2511's edit-tuning pair
|
|
40
|
+
// and are NOT here: with a declared surface the bench-write door
|
|
41
|
+
// refuses them on this family in the field's voice.
|
|
42
|
+
"params": [
|
|
43
|
+
"input_images",
|
|
44
|
+
"image1",
|
|
45
|
+
"image2",
|
|
46
|
+
"image3",
|
|
47
|
+
"reference_images",
|
|
48
|
+
"input_mask",
|
|
49
|
+
"prompt",
|
|
50
|
+
"negative_prompt",
|
|
51
|
+
"width",
|
|
52
|
+
"height",
|
|
53
|
+
"match_input_resolution",
|
|
54
|
+
"seed",
|
|
55
|
+
"steps",
|
|
56
|
+
"cfg",
|
|
57
|
+
"sampler",
|
|
58
|
+
"scheduler",
|
|
59
|
+
],
|
|
60
|
+
// THE RESOLUTION PAIR RIDES TOGETHER: an EmptyLatentImage takes a
|
|
61
|
+
// width AND a height — a lone axis is half a size (the card's old
|
|
62
|
+
// tooltip said "target resolution"; the law says both or neither,
|
|
63
|
+
// never one). Judged at bench-write and rendered inline in the
|
|
64
|
+
// form, in the field's voice.
|
|
65
|
+
"relations": {
|
|
66
|
+
"together": [
|
|
67
|
+
{
|
|
68
|
+
"fields": ["width", "height"],
|
|
69
|
+
"cure": "an EmptyLatentImage takes both axes — state width and height together, or neither (the lane's own 1024s)",
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
|
+
|
|
73
|
+
// the GAP-7 shape one card over): compose has refused a
|
|
74
|
+
// prompt-less edit since the merge, imperatively, while the
|
|
75
|
+
// bench admitted the same draft — a state the form could build
|
|
76
|
+
// and the run refused. Stated as the required word (the tts
|
|
77
|
+
// precedent: the word the form already refused), the
|
|
78
|
+
// bench-write door refuses it first, in the field's voice.
|
|
79
|
+
// THE ANCHOR LAW, LEGACY-AWARE: the merge takes input_images
|
|
80
|
+
// verbatim, else the legacy keys — one anchor vocabulary
|
|
81
|
+
// suffices. any_of is the one-of anchor: refused only when NONE
|
|
82
|
+
// of the alternatives is stated (either_or keeps the blank
|
|
83
|
+
// tolerance by law, so it cannot say this).
|
|
84
|
+
"required": [
|
|
85
|
+
{
|
|
86
|
+
"fields": ["prompt"],
|
|
87
|
+
"cure": "an edit states WHAT to change — write the prompt (the instruction, not a description of the image)",
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"fields": ["input_images", "image1", "image2", "image3", "reference_images"],
|
|
91
|
+
"any_of": true,
|
|
92
|
+
"cure": "an edit needs the image being edited — the ordered input_images list, or a legacy image1/image2/image3/reference_images anchor",
|
|
93
|
+
},
|
|
94
|
+
],
|
|
95
|
+
},
|
|
96
|
+
|
|
97
|
+
// owns the default owns the floor — this family owns the edit
|
|
98
|
+
// resolution (1024s declared above), and until now the domain
|
|
99
|
+
// lived NOWHERE: the card schema states no min/max for the pair,
|
|
100
|
+
// so width -50 admitted at every door and the engine produced
|
|
101
|
+
// garbage. Declared here, judged at bench-write in the same
|
|
102
|
+
// voice as the relation words (the declaration, not the form).
|
|
103
|
+
// 256–1536: the practical domain of the 2.1 checkpoint (the
|
|
104
|
+
// official edit templates sample 1024/1328; a 4-megapixel edit
|
|
105
|
+
// is outside the trained envelope).
|
|
106
|
+
"bounds": {
|
|
107
|
+
"width": { "min": 256, "max": 1536 },
|
|
108
|
+
"height": { "min": 256, "max": 1536 },
|
|
109
|
+
},
|
|
110
|
+
|
|
111
|
+
// is the legacy model… 2.1 is the new Qwen edit model"): the mask
|
|
112
|
+
// pack's region contract absorbs onto THIS lane — crop_stitch (the
|
|
113
|
+
// generic region detailer) rides the cache-wrapped model + encoder
|
|
114
|
+
// conditioning; auto+mask still refuses field-named (lanpaint is
|
|
115
|
+
// 2511's flavor — that sampler does not board here).
|
|
116
|
+
"mods": [
|
|
117
|
+
"mask"
|
|
118
|
+
],
|
|
119
|
+
// THE PROVISION TRUTH (the silent-failure cure, 2511's law): the
|
|
120
|
+
// text encoder and vae carry provisions from the same
|
|
121
|
+
// Comfy-Org/Qwen-Image-2.1 repo; the unet rides the cell artifacts
|
|
122
|
+
// (the quant owns the download — same files as the t2i sibling;
|
|
123
|
+
// the engine's downloader dedups by content).
|
|
124
|
+
"provisions": [
|
|
125
|
+
{
|
|
126
|
+
"name": "qwen3vl_8b_bf16.safetensors",
|
|
127
|
+
"url": "https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/text_encoders/qwen3vl_8b_bf16.safetensors",
|
|
128
|
+
"folder": "text_encoders",
|
|
129
|
+
"sha256": "68bdc82bc1b66851162ae656225e7e2068166b603db19bd5d5a3b90eb12669a9",
|
|
130
|
+
"size_bytes": 17534334616
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"name": "qwen3vl_8b_int8_convrot.safetensors",
|
|
134
|
+
"url": "https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/text_encoders/qwen3vl_8b_int8_convrot.safetensors",
|
|
135
|
+
"folder": "text_encoders",
|
|
136
|
+
"sha256": "8bfd0f6e12abf2d2d697ecc888e5e90b0d6741d6708f05799f53afa560452e8f",
|
|
137
|
+
"size_bytes": 9350798360
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"name": "qwen_image_2.1_vae_bf16.safetensors",
|
|
141
|
+
"url": "https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/vae/qwen_image_2.1_vae_bf16.safetensors",
|
|
142
|
+
"folder": "vae",
|
|
143
|
+
"sha256": "bb21f7473051e1ac368515dd3f2e15cd44d7a11748ee8823e1ddca3e4876b7c9",
|
|
144
|
+
"size_bytes": 675509688
|
|
145
|
+
}
|
|
146
|
+
],
|
|
147
|
+
// THE 2.1 MATRIX ON THE EDIT LANE (the variant-axis law,
|
|
148
|
+
|
|
149
|
+
// weights): Variant = Base/Turbo, Quant = int8_convrot/bf16;
|
|
150
|
+
// the quant cell owns its tier's unet spelling
|
|
151
|
+
// (CellRow.lane_inputs — the cell-lane cascade).
|
|
152
|
+
"variants": [
|
|
153
|
+
{
|
|
154
|
+
"id": "base",
|
|
155
|
+
"label": "Base",
|
|
156
|
+
"hint": "The 2.1 base checkpoint on the edit lane — 25 steps (the official template's own count), both download tiers below, the cache-wrapped edit compose. Requires provisioning: the 2.1 files are NOT on this box by default; without them the engine validation refuses LOUD (the honest face — the 2511 weights are what ship).",
|
|
157
|
+
"group": "Variant",
|
|
158
|
+
"route": "qwen-img-edit-21",
|
|
159
|
+
"order": 0,
|
|
160
|
+
"cells": [
|
|
161
|
+
{
|
|
162
|
+
"quant": "int8_convrot",
|
|
163
|
+
"label": "INT8 ConvRot",
|
|
164
|
+
"route": "qwen-img-edit-21-int8",
|
|
165
|
+
"vram_peak_gb": 24,
|
|
166
|
+
"artifact": {
|
|
167
|
+
"source_url": "https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/diffusion_models/qwen_image_2.1_int8_convrot.safetensors",
|
|
168
|
+
"size_bytes": 7256783064,
|
|
169
|
+
"sha256": "cb74113cb03faecd79611b01fd7fd642f0aa60d6f0b95086abee214d75eaa57d",
|
|
170
|
+
"dest_root": "COMFYUI_ROOT",
|
|
171
|
+
"dest_sub": "diffusion_models",
|
|
172
|
+
"size_hint_gb": 7.3
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"quant": "bf16",
|
|
177
|
+
"label": "BF16",
|
|
178
|
+
"route": "qwen-img-edit-21-bf16",
|
|
179
|
+
"vram_peak_gb": 48,
|
|
180
|
+
"lane_inputs": {
|
|
181
|
+
"unet": "qwen_image_2.1_bf16.safetensors",
|
|
182
|
+
"text_encoder": "qwen3vl_8b_bf16.safetensors"
|
|
183
|
+
},
|
|
184
|
+
"artifact": {
|
|
185
|
+
"source_url": "https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/diffusion_models/qwen_image_2.1_bf16.safetensors",
|
|
186
|
+
"size_bytes": 14230280616,
|
|
187
|
+
"sha256": "89f4158d066cc33906a199fca85634f766892dd78f49b6698dabf187ac86c4bc",
|
|
188
|
+
"dest_root": "COMFYUI_ROOT",
|
|
189
|
+
"dest_sub": "diffusion_models",
|
|
190
|
+
"size_hint_gb": 14.3
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
]
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"id": "turbo",
|
|
197
|
+
"label": "Turbo",
|
|
198
|
+
"hint": "The distilled turbo weights on the edit lane — 8 steps instead of the base 25 (upstream: 'Turbo uses 8 steps'), both download tiers below, same cache-wrapped edit compose. Requires provisioning: the 2.1 turbo files are NOT on this box by default; without them the engine validation refuses LOUD (the honest face — the 2511 weights are what ship).",
|
|
199
|
+
"group": "Variant",
|
|
200
|
+
"route": "qwen-img-edit-21-turbo",
|
|
201
|
+
"order": 1,
|
|
202
|
+
"resolver_defaults": { "steps": 8 },
|
|
203
|
+
"cells": [
|
|
204
|
+
{
|
|
205
|
+
"quant": "int8_convrot",
|
|
206
|
+
"label": "INT8 ConvRot",
|
|
207
|
+
"route": "qwen-img-edit-21-turbo-int8",
|
|
208
|
+
"vram_peak_gb": 24,
|
|
209
|
+
"lane_inputs": {
|
|
210
|
+
"unet": "qwen_image_2.1_turbo_int8_convrot.safetensors"
|
|
211
|
+
},
|
|
212
|
+
"artifact": {
|
|
213
|
+
"source_url": "https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/diffusion_models/qwen_image_2.1_turbo_int8_convrot.safetensors",
|
|
214
|
+
"size_bytes": 7256787829,
|
|
215
|
+
"sha256": "8144a0182964aa8403ad6dbc011db837304167d235161b9aabaa8532e967314c",
|
|
216
|
+
"dest_root": "COMFYUI_ROOT",
|
|
217
|
+
"dest_sub": "diffusion_models",
|
|
218
|
+
"size_hint_gb": 7.3
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"quant": "bf16",
|
|
223
|
+
"label": "BF16",
|
|
224
|
+
"route": "qwen-img-edit-21-turbo-bf16",
|
|
225
|
+
"vram_peak_gb": 48,
|
|
226
|
+
"lane_inputs": {
|
|
227
|
+
"unet": "qwen_image_2.1_turbo_bf16.safetensors"
|
|
228
|
+
},
|
|
229
|
+
"artifact": {
|
|
230
|
+
"source_url": "https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/diffusion_models/qwen_image_2.1_turbo_bf16.safetensors",
|
|
231
|
+
"size_bytes": 14230280616,
|
|
232
|
+
"sha256": "8b74237a7f505773e2c66726fa696444b4c704585c93a347cff9044937f7914a",
|
|
233
|
+
"dest_root": "COMFYUI_ROOT",
|
|
234
|
+
"dest_sub": "diffusion_models",
|
|
235
|
+
"size_hint_gb": 14.3
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
]
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
"id": "remove_background",
|
|
242
|
+
"label": "Remove Background",
|
|
243
|
+
"hint": "The official one-click — the Comfy-Org background-removal template's canned prompt verbatim (the 2.1 base renders the subject on transparency; solver/cfg/steps ride the family defaults, which are the template's own values).",
|
|
244
|
+
"group": "Recipe",
|
|
245
|
+
"wire_defaults": { "prompt": "Remove the background, and output a PNG image" },
|
|
246
|
+
"cells": [],
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
"id": "upstream_solvers",
|
|
250
|
+
"label": "Upstream Solvers",
|
|
251
|
+
"hint": "Sampler euler + scheduler simple — the official 2.1 templates' own solver truth (this family's DECL defaults, both members of the card's sampler/scheduler vocabularies).",
|
|
252
|
+
"group": "Recipe",
|
|
253
|
+
"wire_defaults": { "sampler": "euler", "scheduler": "simple" },
|
|
254
|
+
"cells": [],
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
"id": "default",
|
|
258
|
+
"label": "Default",
|
|
259
|
+
"hint": "The family default — no extra stamps; a fresh card lands here.",
|
|
260
|
+
"group": "Recipe",
|
|
261
|
+
"cells": [],
|
|
262
|
+
}
|
|
263
|
+
],
|
|
264
|
+
"variant_groups": [
|
|
265
|
+
{
|
|
266
|
+
"id": "Variant",
|
|
267
|
+
"label": "Variant",
|
|
268
|
+
"tooltip": "Quantization tier of the ONE 2.1 base — INT8 ConvRot (the official template pick) or BF16 (full precision, most VRAM).",
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
"id": "Quant",
|
|
272
|
+
"label": "Quant",
|
|
273
|
+
"tooltip": "The download tier — INT8 ConvRot (7.3GB) or BF16 (14.2GB).",
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
"id": "Recipe",
|
|
277
|
+
"label": "Recipe",
|
|
278
|
+
"tooltip": "One-click recipes — patch-only rows that stamp picks onto the draft; Default stamps nothing.",
|
|
279
|
+
"default": "default"
|
|
280
|
+
}
|
|
281
|
+
],
|
|
282
|
+
"has_agent": true,
|
|
283
|
+
"has_inference": true,
|
|
284
|
+
"actions": [edit],
|
|
285
|
+
"lane_inputs": {
|
|
286
|
+
"clip_type": "qwen_image",
|
|
287
|
+
// THE LANE BRANCH KEY (the latent_node precedent — data, never
|
|
288
|
+
// a family-id switch): names the 2.1 encoder class; the kit's
|
|
289
|
+
// imageEdit builder routes onto the cached-reference lane.
|
|
290
|
+
"text_encode_node": "TextEncodeQwenImage21",
|
|
291
|
+
// THE IMAGE CAPACITY (the node's own truth — the card and the
|
|
292
|
+
// lane RIDE this, never a hardcoded count): TextEncodeQwenImage21
|
|
293
|
+
// opens image inputs as filled, up to 16 total (anchor +
|
|
294
|
+
// references). The kit caps the unified reference order at
|
|
295
|
+
// max_images - 1; the card caps its stack face at the roomiest
|
|
296
|
+
// boarded lane's max_images - 1.
|
|
297
|
+
"max_images": 16,
|
|
298
|
+
"text_encoder": "qwen3vl_8b_int8_convrot.safetensors",
|
|
299
|
+
"unet": "qwen_image_2.1_int8_convrot.safetensors",
|
|
300
|
+
"vae": "qwen_image_2.1_vae_bf16.safetensors"
|
|
301
|
+
}
|
|
302
|
+
};
|
|
303
|
+
export const family = {
|
|
304
|
+
name: "family-qwen-img-edit-21",
|
|
305
|
+
inject: ["models"],
|
|
306
|
+
apply(ctx) {
|
|
307
|
+
ctx.effect(() => ctx.models.registerFamily(DECL));
|
|
308
|
+
},
|
|
309
|
+
};
|
|
310
|
+
// The family's offered actions (the atom vocabulary): the edit
|
|
311
|
+
// action the image-edit card binds.
|
|
312
|
+
export { edit, parseEditFacts } from "./actions.js";
|
|
313
|
+
// The Loader-row face: DSH loads plugin rows by bare specifier and
|
|
314
|
+
// unwraps `exports.default ?? exports` (vendor/cordis_plugins/loader
|
|
315
|
+
// unwrapExports) — the default export IS the row-loadable plugin. The
|
|
316
|
+
// named `family` stays the library face (engine loadFamilies).
|
|
317
|
+
export { family as default };
|
|
318
|
+
//# sourceMappingURL=index.js.map
|
package/lib/mods/mask.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,44 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@melite/models-qwen-img-edit-21",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.5-pre-alpha",
|
|
4
|
+
"license": "SSPL-1.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"types": "./lib/index.d.ts",
|
|
9
|
+
"default": "./lib/index.js"
|
|
10
|
+
},
|
|
11
|
+
"./package.json": "./package.json",
|
|
12
|
+
"./mods/loras": {
|
|
13
|
+
"types": "./lib/mods/loras.d.ts",
|
|
14
|
+
"default": "./lib/mods/loras.js"
|
|
15
|
+
},
|
|
16
|
+
"./mods/mask": {
|
|
17
|
+
"types": "./lib/mods/mask.d.ts",
|
|
18
|
+
"default": "./lib/mods/mask.js"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@melite/comfyui-card-kit": "0.1.5-pre-alpha"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@types/node": "^22.20.0",
|
|
26
|
+
"typescript": "^5.9.3",
|
|
27
|
+
"@deepseek-ai/cordis": "^4.0.4"
|
|
28
|
+
},
|
|
29
|
+
"files": [
|
|
30
|
+
"lib/index.js",
|
|
31
|
+
"lib/**/*.js",
|
|
32
|
+
"lib/**/*.d.ts"
|
|
33
|
+
],
|
|
34
|
+
"peerDependencies": {
|
|
35
|
+
"@deepseek-ai/cordis": "^4.0.4"
|
|
36
|
+
},
|
|
37
|
+
"scripts": {
|
|
38
|
+
"build": "tsc -p tsconfig.build-mods.json && tsc -p tsconfig.build.json",
|
|
39
|
+
"typecheck": "tsc --noEmit"
|
|
40
|
+
},
|
|
41
|
+
"publishConfig": {
|
|
42
|
+
"access": "public"
|
|
43
|
+
}
|
|
44
|
+
}
|