pixelkiln 0.48.0 → 0.49.0
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/dist/cli.js +199 -3
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +199 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +77 -0
- package/dist/index.d.ts +77 -0
- package/dist/index.js +199 -3
- package/dist/index.js.map +1 -1
- package/docs/ENDPOINTS.md +8 -3
- package/docs/PIXELLAB.md +3 -1
- package/docs/REVISIONS.md +31 -2
- package/package.json +1 -1
- package/skills/pixelkiln/SKILL.md +4 -0
- package/skills/pixelkiln/references/pixellab.md +72 -6
package/docs/ENDPOINTS.md
CHANGED
|
@@ -327,9 +327,14 @@ once a 1-generation re-roll exists: forty re-rolls cost one `1dir` call.
|
|
|
327
327
|
|
|
328
328
|
Listed so the gaps are known rather than assumed away:
|
|
329
329
|
|
|
330
|
-
- `inpaint
|
|
331
|
-
|
|
332
|
-
|
|
330
|
+
- `inpaint-v3` and `edit-images-v2` back the `revision` asset shape's
|
|
331
|
+
`inpaint` and `image-to-image` modes as of this writing (see
|
|
332
|
+
[Controlled asset revisions](./REVISIONS.md)), but the wiring is built from
|
|
333
|
+
the OpenAPI spec, not a live account: no job has actually been run, so cost
|
|
334
|
+
is a borrowed estimate and a completed job's exact response shape is
|
|
335
|
+
unconfirmed. The older `inpaint` and `edit-image` (non-v2/v3) endpoints are
|
|
336
|
+
untouched by any of this. All four accept `color_image`, but given that
|
|
337
|
+
`resize` accepts and ignores it, assume nothing until measured.
|
|
333
338
|
- `image-to-pixelart-pro` takes only `image` + `description`, no size fields.
|
|
334
339
|
The non-Pro version is characterised above.
|
|
335
340
|
- the tileset family, with schema documented above and costs unmeasured
|
package/docs/PIXELLAB.md
CHANGED
|
@@ -136,6 +136,8 @@ transfer, lip-sync, and skeleton-driven animation are not part of this
|
|
|
136
136
|
adapter. Characters, their states, and their animations are the `character`
|
|
137
137
|
generator, with all four creation engines (standard, v3, pro, pro-flash),
|
|
138
138
|
reference sprites, concept images, style anchors, mirrors, and every
|
|
139
|
-
`animate-character` control; see [Characters](./CHARACTERS.md).
|
|
139
|
+
`animate-character` control; see [Characters](./CHARACTERS.md). Masked
|
|
140
|
+
inpainting and whole-image editing are the `revision` asset shape, not the
|
|
141
|
+
`character` generator; see [Controlled asset revisions](./REVISIONS.md). Use
|
|
140
142
|
the [manifest reference](./MANIFEST.md) for the fields PixelKiln supports
|
|
141
143
|
today.
|
package/docs/REVISIONS.md
CHANGED
|
@@ -5,8 +5,9 @@ The parent may be committed art, a downloaded generation, or an approved
|
|
|
5
5
|
quality output. PixelKiln hashes the exact parent and mask bytes, blocks stale
|
|
6
6
|
dependencies before submission, and records the lineage in the lockfile.
|
|
7
7
|
|
|
8
|
-
The manifest and pipeline are provider-neutral.
|
|
9
|
-
|
|
8
|
+
The manifest and pipeline are provider-neutral. ComfyUI and PixelLab implement
|
|
9
|
+
it; PixelLab covers `image-to-image` and `inpaint`, not `outpaint` (its API
|
|
10
|
+
has no canvas-expansion endpoint). Retro Diffusion and Scenario reject
|
|
10
11
|
revision work during offline resolution instead of silently starting a fresh
|
|
11
12
|
text-to-image job.
|
|
12
13
|
|
|
@@ -156,6 +157,34 @@ composition candidate and use the normal native-grid, palette, alpha, and human
|
|
|
156
157
|
approval gate before shipping. See the
|
|
157
158
|
[committed smoke](../benchmarks/provider-revisions/comfyui/README.md).
|
|
158
159
|
|
|
160
|
+
## PixelLab
|
|
161
|
+
|
|
162
|
+
PixelLab needs no bindings: `image-to-image` calls `/edit-images-v2`,
|
|
163
|
+
`inpaint` calls `/inpaint-v3`, both as a plain background job polled the same
|
|
164
|
+
way as every other PixelLab submission.
|
|
165
|
+
|
|
166
|
+
- The mask convention is fixed, not graph-defined like ComfyUI's: white marks
|
|
167
|
+
the area to generate, black the area to preserve. There is no way to flip it.
|
|
168
|
+
- `strength` has nowhere to go on `image-to-image`. PixelLab's edit endpoint
|
|
169
|
+
applies the instruction in full; declaring a strength fails the submission
|
|
170
|
+
rather than silently ignoring it.
|
|
171
|
+
- The source image is sent at its own actual dimensions (`revision.sourceWidth`
|
|
172
|
+
/ `sourceHeight`), not the child asset's declared `width`/`height`. Neither
|
|
173
|
+
endpoint resizes; they edit the pixels that exist.
|
|
174
|
+
- `/inpaint-v3` takes 32 to 512 pixels per side; a smaller or larger source
|
|
175
|
+
is refused before any request is sent.
|
|
176
|
+
- Cost is **not yet measured**. Both endpoints are documented as PixelLab's
|
|
177
|
+
"Pro" tier, so pixelkiln prices them on the same canvas-area tiers already
|
|
178
|
+
measured for `1dir` and `create-tiles-pro` (20/25/40 generations) rather than
|
|
179
|
+
guess a number — the safe direction to be wrong in, per `generationCost`'s
|
|
180
|
+
own contract. Treat this as a placeholder until a live job's `usage` is read.
|
|
181
|
+
- A completed job's exact response shape is not documented for either
|
|
182
|
+
endpoint (the API's own worked example of that field is a character job's
|
|
183
|
+
shape, not an edit or inpaint job's). `pollRevision` in
|
|
184
|
+
`src/providers/pixellab.ts` reads it defensively and fails the job with a
|
|
185
|
+
named error rather than crash or guess wrong; if a live job's shape differs
|
|
186
|
+
from what it checks, that function is a one-line fix.
|
|
187
|
+
|
|
159
188
|
## Provenance and invalidation
|
|
160
189
|
|
|
161
190
|
The lock entry records revision mode, parent id, parent hash, optional mask
|
package/package.json
CHANGED
|
@@ -12,6 +12,10 @@ hashes.
|
|
|
12
12
|
## Working rules
|
|
13
13
|
|
|
14
14
|
- Locate `pixelkiln.manifest.json` first. Paths are manifest-relative.
|
|
15
|
+
- Give every new asset a descriptive `id` (`oak_tree`, `iron_sword`, not
|
|
16
|
+
`asset_3` or `object1`). A vague id is cheap to write and expensive the
|
|
17
|
+
moment another asset needs to reference it (`state.of`, `animation.of`,
|
|
18
|
+
`revision.from`, `mirror`) or a person asks which one it was.
|
|
15
19
|
- Treat `style.extends` as a source-level variant, not a reason to copy the
|
|
16
20
|
parent. Keep every child `outDir` explicit, inspect the resolved plan, and
|
|
17
21
|
remember that a pixel-affecting parent edit intentionally makes children stale.
|
|
@@ -24,6 +24,29 @@ providers, or before any PixelLab account operation.
|
|
|
24
24
|
| `tiles` | Ground variations or connected structures | 20–40 generations |
|
|
25
25
|
| `character` | A character in 4 or 8 directions, its poses (`state`), and its loops (`animation`) | 1 per standard base, 6 per pro-flash base at 64px (1 from a `reference`), 20–40 per pose, 1 per template loop per direction |
|
|
26
26
|
|
|
27
|
+
`tiles` is not limited to top-down ground: `tileType` selects the projection
|
|
28
|
+
(`isometric` — the API default —, `oblique`, `hex`, `hex_pointy`, `octagon`,
|
|
29
|
+
or `square_topdown`), `tileSize` sets one tile's edge in pixels (16–256), and
|
|
30
|
+
`tileView` sets the camera (`top-down`, `high top-down`, `low top-down`, or
|
|
31
|
+
`side`). `outlineMode` chooses `outline` (a dark border per tile — right for
|
|
32
|
+
tiles meant to read as discrete objects) or `segmentation` (no border, so a
|
|
33
|
+
ground set tiles seamlessly instead of quilting at every cell edge — this
|
|
34
|
+
alone decided whether a measured terrain set was usable). `tileFeature` asks
|
|
35
|
+
for a connectable set instead of independent variations: `roads` for an
|
|
36
|
+
18-configuration path set, `tileset` for a 16-tile Wang corner set — describe
|
|
37
|
+
the transition itself in the prompt ("fairway grass to rough meadow"), not
|
|
38
|
+
one terrain — or `building` for a floor/wall/doorway construction kit.
|
|
39
|
+
Passing `styleImages` overrides `tileType`/`tileView` entirely and copies
|
|
40
|
+
tile shape and size from the reference instead, the only way to land new
|
|
41
|
+
tiles on an existing sheet's ground plane.
|
|
42
|
+
|
|
43
|
+
Do not confuse pixelkiln's `map` generator with PixelLab's own "Map
|
|
44
|
+
Workshop": `map` returns one static prop, icon, or building in a single
|
|
45
|
+
generation with no scene, canvas, or placement concept. Map Workshop (scene
|
|
46
|
+
composition — laying out a tile floor, placing characters and movable
|
|
47
|
+
objects, inpainting sections in place, exporting the result) is a distinct
|
|
48
|
+
PixelLab product surface this adapter does not model at all.
|
|
49
|
+
|
|
27
50
|
A base can start from the author's own south-facing sprite (`reference` on
|
|
28
51
|
the asset; standard wants it at the style's size, v3 up to 256px, pro up
|
|
29
52
|
to 168px), and a standard humanoid base takes `proportions` (`chibi`,
|
|
@@ -32,16 +55,53 @@ designed from a `concept` image (up to 1024px) and follow the look of
|
|
|
32
55
|
another generated character in the style (`styleCharacter`), which makes
|
|
33
56
|
that character a dependency the way a loop's parent is.
|
|
34
57
|
|
|
58
|
+
A `reference`, `concept`, or `styleCharacter` image's own canvas size sets
|
|
59
|
+
the output's apparent scale, not just its content: a reference cropped or
|
|
60
|
+
padded to a canvas larger than the target size reliably produces an
|
|
61
|
+
oversized character next to everything else at the intended size. Match the
|
|
62
|
+
reference's canvas to the base's `size` (or the other way around) before
|
|
63
|
+
submitting, not after a mismatched result comes back.
|
|
64
|
+
|
|
35
65
|
A v3 loop can start from a pose image (`startFrame`) or interpolate to one
|
|
36
66
|
(`endFrame`), take a `subject` when the character's own description would
|
|
37
67
|
mislead, and ask PixelLab to `enhancePrompt`; a template loop takes
|
|
38
|
-
`outline`, `shading`, and `detail` overrides instead.
|
|
68
|
+
`outline`, `shading`, and `detail` overrides instead. `keepFirstFrame`
|
|
69
|
+
defaults to `true` on a v3 loop: the parent's resting pose (or `startFrame`,
|
|
70
|
+
when set) becomes frame 0 for free, so a requested `frames: 6` delivers 7
|
|
71
|
+
files, not 6. Account for the `+1` when checking a loop's output count or
|
|
72
|
+
estimating its budget; set it `false` only when the caller will supply its
|
|
73
|
+
own first frame downstream.
|
|
39
74
|
|
|
40
|
-
A loop costs per direction, and a sprite facing
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
75
|
+
A loop costs per direction, and a sprite facing one way is the sprite facing
|
|
76
|
+
the opposite way flipped — this holds for the east/west pair and for both
|
|
77
|
+
diagonal pairs, south-east/south-west and north-east/north-west. Declare the
|
|
78
|
+
west loop and make the east one `{ "mirror": "bot.walk.west" }`: PixelKiln
|
|
79
|
+
flips it locally for nothing, in the wave after the source lands. South and
|
|
80
|
+
north sit on the mirror line itself, so flipping either just relabels the
|
|
81
|
+
same asset, not a new one — generate those two directly. Generate south,
|
|
82
|
+
south-east, east, north-east, and north, then mirror the other three: eight
|
|
83
|
+
directions of one loop are then 5 generations, not 8.
|
|
84
|
+
|
|
85
|
+
A loop that needs headroom for an effect — recoil, a muzzle flash, a
|
|
86
|
+
projectile, anything that extends past the subject's silhouette — needs
|
|
87
|
+
empty canvas space near the subject before generating; a composition with no
|
|
88
|
+
margin is a common cause of a failed or clipped loop, and is worth ruling
|
|
89
|
+
out before rewriting the prompt. Bigger pose changes want more frames: a
|
|
90
|
+
simple loop (a walk, a static idle) reads fine at 6; a transition that
|
|
91
|
+
rotates or drops the subject (a fall, a knockdown) wants 8 or more. A
|
|
92
|
+
multi-stage action (windup, then attack, then recovery) is a chain of
|
|
93
|
+
loops, not one long one: take the final frame of one loop as the next
|
|
94
|
+
loop's `startFrame` and link them as separate manifest assets.
|
|
95
|
+
|
|
96
|
+
Write the loop `prompt` (and any `subject` override) as a full descriptive
|
|
97
|
+
sentence of the motion — pace, energy, what leads and what follows — rather
|
|
98
|
+
than a terse label like "attack": PixelLab's own tutorials treat this as the
|
|
99
|
+
single biggest lever on animation quality, on par with frame count. If an
|
|
100
|
+
agent drafts the prompt from a reference image, strip any technical framing
|
|
101
|
+
it invents (frame rates, frame-count ranges, export terms) before
|
|
102
|
+
submitting — PixelLab is never told the target frame rate, only the frame
|
|
103
|
+
count, and a stray "24fps" or "60 to 90 frames" fragment in the prompt does
|
|
104
|
+
not help.
|
|
45
105
|
|
|
46
106
|
In the committed environment benchmark, PixelLab followed complex building
|
|
47
107
|
prompts more closely and produced broader, more separable depth bands in scenic
|
|
@@ -50,6 +110,12 @@ transparency claim, so inspect alpha on one representative result before a
|
|
|
50
110
|
batch. Inspect scenic outputs for stray marks too: one untouched 384px attempt
|
|
51
111
|
contained a generated signature-like glyph.
|
|
52
112
|
|
|
113
|
+
An asset that declares `revision` against a PixelLab style calls `inpaint`
|
|
114
|
+
(masked) or `image-to-image` (whole-image, no mask); `outpaint` is refused,
|
|
115
|
+
since PixelLab has no canvas-expansion endpoint. Read `docs/REVISIONS.md`'s
|
|
116
|
+
PixelLab section before using either — its cost is an estimate, not yet
|
|
117
|
+
measured.
|
|
118
|
+
|
|
53
119
|
For setup and current field constraints, use
|
|
54
120
|
<https://pixelkiln.griffen.codes/docs/pixellab>. When working in the PixelKiln
|
|
55
121
|
repository, `docs/PIXELLAB.md` and `docs/ENDPOINTS.md` are the canonical local
|