pixelkiln 0.85.0 → 0.86.1
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/PROVIDERS.md +5 -5
- package/dist/cli.js +66 -7
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +66 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +82 -4
- package/dist/index.d.ts +82 -4
- package/dist/index.js +66 -7
- package/dist/index.js.map +1 -1
- package/docs/MANIFEST.md +2 -1
- package/docs/REVISIONS.md +39 -9
- package/docs/SCENARIO.md +116 -1
- package/package.json +1 -1
- package/schema/manifest.schema.json +4 -0
- package/skills/pixelkiln/references/revisions.md +4 -2
- package/skills/pixelkiln/references/scenario.md +10 -0
package/docs/MANIFEST.md
CHANGED
|
@@ -472,7 +472,8 @@ their own page: [Characters](./CHARACTERS.md) and
|
|
|
472
472
|
| Revision field | Type | Meaning |
|
|
473
473
|
|---|---|---|
|
|
474
474
|
| `mode` | enum, required | `image-to-image`, `inpaint`, `outpaint`, `reduce-colors`, `correct-pixelart`, `remove-background`, `animate`, `animate-pixminimax`, `animate-skeleton`, `interpolate`, or `edit-animation`. The selected provider must opt into the mode. |
|
|
475
|
-
| `from` | asset id, required | Parent asset in
|
|
475
|
+
| `from` | asset id, required | Parent asset, in this asset's style unless `fromStyle` names another. Self-references, unknown ids, and cycles are rejected. A parent written as a set (a character's directions, an animation's frames) is read as every member: `reduce-colors`, `correct-pixelart`, and `edit-animation` take the whole set in one call; the other modes refuse it. See [Revising a whole set at once](./REVISIONS.md#revising-a-whole-set-at-once). |
|
|
476
|
+
| `fromStyle` | style id | The style the parent lives in, when it is not this asset's own. The parent must be an asset in that style, and styles may depend on one another but not in a cycle. See [Across styles](./REVISIONS.md#across-styles). |
|
|
476
477
|
| `mask` | string | Manifest-relative PNG required for `inpaint`; rejected for the other modes. Its dimensions must match an available source. |
|
|
477
478
|
| `strength` | number 0–1 | Workflow edit/denoise strength (`image-to-image`, `correct-pixelart`); rejected for `reduce-colors`, `remove-background`, `animate`, `animate-pixminimax`, `interpolate`, and `edit-animation`. Interpretation is provider- and model-specific. |
|
|
478
479
|
| `numColors` | integer 2–256 | `reduce-colors` only. Target palette size; mutually exclusive with `paletteImage`. |
|
package/docs/REVISIONS.md
CHANGED
|
@@ -43,15 +43,10 @@ Keep the parent as its own asset and point the child at its stable asset id:
|
|
|
43
43
|
}
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
`from` names another asset in the
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
Revision edges do not cross styles or providers in this version. To use output
|
|
51
|
-
from another provider, commit or retain that PNG and declare it as a separate
|
|
52
|
-
`source` asset in the ComfyUI revision style. The child still records the exact
|
|
53
|
-
source hash, but the cross-provider handoff is a file boundary rather than one
|
|
54
|
-
automatic lock dependency.
|
|
46
|
+
`from` names another asset. It lives in the child's own style unless
|
|
47
|
+
`fromStyle` names another (see [Across styles](#across-styles)). A source and its
|
|
48
|
+
revision cannot be the same asset, and revision chains cannot contain a cycle.
|
|
49
|
+
`source` and `revision` are mutually exclusive on one asset.
|
|
55
50
|
|
|
56
51
|
Start with a low strength. Values around `0.2`–`0.4` give the workflow room to
|
|
57
52
|
change texture and lighting while retaining more of the source. Higher values
|
|
@@ -104,6 +99,41 @@ poses" opens the same editor on its keypoints file. Saving rewrites the file
|
|
|
104
99
|
only if it still holds what the page loaded (an edit made elsewhere since is
|
|
105
100
|
refused, not overwritten), and the animation is stale until generated again.
|
|
106
101
|
|
|
102
|
+
### Across styles
|
|
103
|
+
|
|
104
|
+
A style has one provider and one model, so a chain that generates with one model
|
|
105
|
+
and cleans up with another spans styles. Name the parent's style:
|
|
106
|
+
|
|
107
|
+
```jsonc
|
|
108
|
+
{
|
|
109
|
+
"styles": {
|
|
110
|
+
"gen": { "generator": "map", "outDir": "art/gen", "providerOptions": { "scenario": { "modelId": "model_bfl-flux-2-klein-9b", "maxComputeUnits": 1 } } },
|
|
111
|
+
"pixelate": { "generator": "map", "outDir": "art/pixelate", "providerOptions": { "scenario": { "modelId": "model_sc-pixelate", "maxComputeUnits": 5, "referenceParameter": "image", "referenceArray": false } } }
|
|
112
|
+
},
|
|
113
|
+
"assets": {
|
|
114
|
+
"knight": { "prompt": "a knight, isolated on white", "styles": ["gen"] },
|
|
115
|
+
"knight-px": {
|
|
116
|
+
"prompt": "pixelate",
|
|
117
|
+
"styles": ["pixelate"],
|
|
118
|
+
"revision": { "mode": "image-to-image", "from": "knight", "fromStyle": "gen" }
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
The child starts from the parent's output file, however that style produced it
|
|
125
|
+
(any provider, or a placed `source`), and the dependency gate is unchanged: the
|
|
126
|
+
child is `blocked` until the parent is downloaded, current, and untouched, and
|
|
127
|
+
`gen` takes the whole chain to the end in one run, one wave per link. The parent
|
|
128
|
+
must be an asset in the named style. Styles may depend on one another but not
|
|
129
|
+
in a cycle, and `fromStyle` naming the asset's own style is the ordinary case.
|
|
130
|
+
`--style` still selects which specs a run returns; a parent style it excludes is
|
|
131
|
+
resolved, not generated.
|
|
132
|
+
|
|
133
|
+
A `quality` profile gates the style it is on. Put it on the last style of a
|
|
134
|
+
chain, whose parents are in other styles, and only that style's output is gated.
|
|
135
|
+
A profile on a style that also holds the raw parent would block the child.
|
|
136
|
+
|
|
107
137
|
## Inpainting
|
|
108
138
|
|
|
109
139
|
An inpaint revision also declares a manifest-relative mask:
|
package/docs/SCENARIO.md
CHANGED
|
@@ -186,7 +186,13 @@ quoted and billed identically; see the
|
|
|
186
186
|
[tool-model smoke](../benchmarks/provider-scenario-tools/README.md)). Pixel
|
|
187
187
|
Snapper returned an 83×83, exactly-16-colour native-grid version of a 512×512
|
|
188
188
|
image, a different size than the manifest's canvas, and Birefnet's cutout kept
|
|
189
|
-
its subject at alpha 254 rather than 255.
|
|
189
|
+
its subject at alpha 254 rather than 255. Pixelate (5 CU) was run too and returned a 23-colour, crisp pixel version at the
|
|
190
|
+
source's size; of the upscalers, Topaz smoothed the art, Upscale V3 repainted it
|
|
191
|
+
as a photoreal castle, and Recraft Crisp returned WebP, which the adapter refuses,
|
|
192
|
+
so none of them suits pixel art. Pixelate's output also passed `pixelkiln refine`'s
|
|
193
|
+
high-confidence grid gate as a 102×102, 23-colour asset, where the raw image
|
|
194
|
+
(low confidence) and Pixel Snapper's output (medium) did not: GPT Image 2,
|
|
195
|
+
then Pixelate, then free refinement made one gate-passing asset for 16 CU. They overlap PixelKiln's own offline work: `pixelkiln refine` snaps
|
|
190
196
|
the grid and palette for free, and PixelLab's `remove-background` revision costs
|
|
191
197
|
one generation. Reach for these when the art is already on Scenario.
|
|
192
198
|
|
|
@@ -223,6 +229,115 @@ upgrading should be one `model_retrodiffusion-plus` still at 64×64 with the
|
|
|
223
229
|
default style: quote, billed amount, dimensions, and whether it comes back as
|
|
224
230
|
PNG.
|
|
225
231
|
|
|
232
|
+
### Chaining models and tools
|
|
233
|
+
|
|
234
|
+
The [pipeline run](../benchmarks/provider-scenario-pipeline/README.md)
|
|
235
|
+
generated a character, pixelated it to a palette, cut out its background, and
|
|
236
|
+
refined it, for 8 CU on the cheapest path and 18 CU with GPT Image 2, ending in
|
|
237
|
+
a 64×64 transparent sprite that passed the `refine` gate. Three rules came out
|
|
238
|
+
of it:
|
|
239
|
+
|
|
240
|
+
- A style has one model, so a chain spans styles. Name the parent's style with
|
|
241
|
+
`revision.fromStyle` (see [Across styles](./REVISIONS.md#across-styles)); the
|
|
242
|
+
child is blocked until the parent is generated, and `gen` runs the whole chain
|
|
243
|
+
in one invocation, one wave per link. The
|
|
244
|
+
[chain run](../benchmarks/provider-scenario-chain/README.md) did this live in
|
|
245
|
+
8 CU. (The pipeline benchmark was run before `fromStyle` existed, so it
|
|
246
|
+
restates each output as a placed `source` and runs `gen --style` per step.)
|
|
247
|
+
- A `quality` profile gates every asset in its style, parents included, so a raw
|
|
248
|
+
parent in the same style blocks its own child. Put `quality` on the last style
|
|
249
|
+
of the chain, whose parents are in other styles, then run
|
|
250
|
+
`pixelkiln refine --style`.
|
|
251
|
+
- Pass the same palette to the tool (Pixelate's `colorPalette`) and to
|
|
252
|
+
`quality.palette`. The output then stays inside it.
|
|
253
|
+
|
|
254
|
+
A palette that is too small for the art costs fidelity (a bright blue cape
|
|
255
|
+
became navy under a 32-colour palette), so passing the gate is not approval.
|
|
256
|
+
|
|
257
|
+
### Large and illustrative art: render big, pixelate, refine
|
|
258
|
+
|
|
259
|
+
A [game pilot](../benchmarks/provider-scenario-game-pilot/README.md) ran the
|
|
260
|
+
chain on a real game's large landmarks (240 px wide, 176 to 224 px tall) and on a
|
|
261
|
+
course cover, and it is where Scenario earned a place: a strong model renders the
|
|
262
|
+
art at four times its final size, Pixelate reduces it to the target grid on a
|
|
263
|
+
bounded palette, Birefnet removes the background, and `refine` confirms the
|
|
264
|
+
grid. It is poor at the opposite end: 32 px props lose their shape.
|
|
265
|
+
|
|
266
|
+
| Step | Setting that worked |
|
|
267
|
+
|---|---|
|
|
268
|
+
| Render | GPT Image 2 (`quality: medium`, flat 11 CU at any canvas size; `high` is 44), or FLUX.2 Klein 9b (1 CU). Ask for the subject isolated on a plain white background, with no ground or shadow. Canvas four times the target. |
|
|
269
|
+
| Pixelate | `pixelGridSize` and `colorPaletteSize` 64. **On an input wider than about 512 px the grid is not literal:** 240 asked on a 960 px image gave 2 px blocks (480 cells), 120 gave 4 px blocks (240 cells). Test one image and read the blocks before a batch. |
|
|
270
|
+
| Cut out | Birefnet, 2 CU. |
|
|
271
|
+
| Refine | `pixelkiln refine` with the image's own 64 most common colours. |
|
|
272
|
+
|
|
273
|
+
With the right grid, a 960×832 render of a ski lodge came back as a **240×208**
|
|
274
|
+
native grid at **high** confidence, the same size as the game's existing
|
|
275
|
+
sprite, and visibly more detailed. At twice the grid the detector reported
|
|
276
|
+
medium confidence and a doubled grid, so a result that is not high is a sign the
|
|
277
|
+
grid was mis-set, not that the art is bad. The 1 CU Klein render of a temple was
|
|
278
|
+
about as good as the 11 CU GPT one. One chain costs 8 CU (Klein) or 18 CU (GPT
|
|
279
|
+
Image 2).
|
|
280
|
+
|
|
281
|
+
For a **cover or key art**, GPT Image 2 at four times the size, then Pixelate at a
|
|
282
|
+
grid giving the target width, produced a convincing pixel scene with 31 colours.
|
|
283
|
+
It renders legible title text, which PixelLab does not, and the text survives
|
|
284
|
+
Pixelate. Before pixelating it is a painterly illustration, not pixel art.
|
|
285
|
+
|
|
286
|
+
Do not use this for small native-size props. A winter pine and an autumn tree at
|
|
287
|
+
32 px came back as different trees, and Birefnet left holes in the canopy. A
|
|
288
|
+
free recolour of the original, or a PixelLab generation at the native size, is
|
|
289
|
+
the better tool there.
|
|
290
|
+
|
|
291
|
+
### Sound effects and other non-image models
|
|
292
|
+
|
|
293
|
+
The adapter handles still images only, but Scenario's audio models are reachable
|
|
294
|
+
through the same account. A call outside PixelKiln (`POST /generate/custom/{model}`,
|
|
295
|
+
then poll `/jobs/{id}` and fetch the asset) produced a sound effect for 1 CU;
|
|
296
|
+
nothing about it is recorded in a lockfile. Measured on October 5, 2026:
|
|
297
|
+
|
|
298
|
+
| Model | CU | Output |
|
|
299
|
+
|---|---:|---|
|
|
300
|
+
| `model_mm-audio-2-t2a` (MM Audio SFX) | 1, flat at any duration | Mono MP3, 44.1 kHz, 64 kbps |
|
|
301
|
+
| `model_elevenlabs-sound-effects-v2` | 30, flat at any duration | Stereo MP3, 44.1 kHz, 128 kbps |
|
|
302
|
+
|
|
303
|
+
Both ignore the duration for pricing, so ask for the length the game needs. A
|
|
304
|
+
prompt that narrates a sequence ("chains rattle, then the disc drops into the
|
|
305
|
+
tray") came back at the full requested length with the events spread out;
|
|
306
|
+
asking for one fast sound and a duration of 1.0 to 1.4 seconds, then trimming
|
|
307
|
+
leading and trailing silence, helps, but it was not enough on its own.
|
|
308
|
+
|
|
309
|
+
**What finally worked for a two-part impact** (a disc hitting a basket's chains,
|
|
310
|
+
then landing on its bars), judged by the game's owner by ear:
|
|
311
|
+
|
|
312
|
+
- **Generate each event as its own sound and layer them.** One prompt cannot carry
|
|
313
|
+
two events. MM Audio returned ambience for an impact prompt (its "drop" came
|
|
314
|
+
back at -50 dB, near silence) and ElevenLabs was the only model that made
|
|
315
|
+
distinct hits; an envelope check (the share of time within 20 dB of the peak,
|
|
316
|
+
and the count of sharp onsets) caught the ambience before anyone listened.
|
|
317
|
+
- **Describe the physical object, not a word that implies a cavity.** "Hollow
|
|
318
|
+
steel basket" produced a bucket-like clank with echo. What worked was "a plastic
|
|
319
|
+
disc landing on a ring of thin steel bars: a dry plastic-on-metal clack followed
|
|
320
|
+
by a quick tinny rattle against the metal rods, outdoors in open air,
|
|
321
|
+
completely dry, no echo, no reverb, no hollow resonance, no bucket sound."
|
|
322
|
+
The chain layer used "loose steel chain links rattling and jangling ... close up,
|
|
323
|
+
dry, no room reverb, no background noise."
|
|
324
|
+
- **Expect big variation between takes.** Re-running the same ElevenLabs prompt
|
|
325
|
+
gave drops of 65 ms, 114 ms, 166 ms and 274 ms; the owner picked the second of
|
|
326
|
+
three re-runs. There is no seed, so keep the chosen file and note the prompt.
|
|
327
|
+
- **Layer with ffmpeg:** trim silence below -50 dB at both ends, high-pass at
|
|
328
|
+
60 Hz, `loudnorm` each part to -18 LUFS, delay the second part about 260 ms,
|
|
329
|
+
`amix` without normalisation, limit at 0.89, then `loudnorm` the mix to -16 LUFS.
|
|
330
|
+
|
|
331
|
+
One finished two-part effect cost about 210 CU of ElevenLabs generations here (a
|
|
332
|
+
chain layer and six drop attempts at 30 CU each), after about 70 CU of cheaper
|
|
333
|
+
attempts that did not work, so budget for several takes of each part. Because a game's sounds should share one tone, fix the prompt
|
|
334
|
+
wording ("close up, dry, no room reverb, no background noise"), the model, and
|
|
335
|
+
the post chain above for every effect, and record each effect's prompts, model
|
|
336
|
+
and post steps beside the file.
|
|
337
|
+
|
|
338
|
+
Music models (ACE-Step, MusicGen, ElevenLabs Music, Lyria 3.5) quoted 10 to 30
|
|
339
|
+
CU; Sonilo and Lyria 3 Pro need the `cu-pro-q3-25` plan. Music was not generated.
|
|
340
|
+
|
|
226
341
|
## Plan before spending
|
|
227
342
|
|
|
228
343
|
Scenario prices depend on model, size, steps, and output count, so PixelKiln
|
package/package.json
CHANGED
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Read this reference when an asset declares `revision`.
|
|
4
4
|
|
|
5
|
-
- Treat the parent and child as separate assets. `revision.from`
|
|
6
|
-
parent in the
|
|
5
|
+
- Treat the parent and child as separate assets. `revision.from` names the
|
|
6
|
+
parent, in the child's own style unless `revision.fromStyle` names another, so
|
|
7
|
+
a chain can generate with one provider and refine with another. A `quality`
|
|
8
|
+
profile gates its own style; put it on the last style of a chain.
|
|
7
9
|
- Run `pixelkiln plan --only <child>` first. If it reports `blocked`, do not try
|
|
8
10
|
to submit the child or work around the gate.
|
|
9
11
|
- A generated parent must be current and downloaded. When the parent has a
|
|
@@ -32,6 +32,16 @@ Scenario model parameters vary. The MVP supplies prompt, 16–4096px dimensions
|
|
|
32
32
|
model inputs in `parameters`; PixelKiln rejects attempts to override its prompt,
|
|
33
33
|
dimensions, seed, output count, project routing, or CU ceiling.
|
|
34
34
|
|
|
35
|
+
Chain models across styles with `revision.fromStyle`; put any `quality` profile
|
|
36
|
+
on the last style. For large or illustrative art, render at four times the
|
|
37
|
+
target size (GPT Image 2 `quality: medium` is a flat 11 CU, FLUX.2 Klein 9b
|
|
38
|
+
1 CU), then Pixelate, Birefnet cutout, and `pixelkiln refine`. Pixelate's
|
|
39
|
+
`pixelGridSize` is not literal on inputs wider than about 512 px (120 asked gave
|
|
40
|
+
a 240-cell grid on a 960 px image): check one image's blocks first. Do not use
|
|
41
|
+
the chain for small native-size sprites. The adapter handles images only;
|
|
42
|
+
sound effects (MM Audio 1 CU, ElevenLabs 30 CU) go through the API directly.
|
|
43
|
+
See `docs/SCENARIO.md` for settings and measurements.
|
|
44
|
+
|
|
35
45
|
PixelKiln validates the job, bytes, hashes, and recovery path. It does not prove
|
|
36
46
|
the output is good pixel art. Inspect one result at 1× before approving a batch.
|
|
37
47
|
|