pixelkiln 0.84.0 → 0.85.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/PROVIDERS.md +3 -3
- package/dist/cli.js +462 -346
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +549 -433
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +25 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.js +444 -328
- package/dist/index.js.map +1 -1
- package/docs/REVISIONS.md +4 -2
- package/docs/SCENARIO.md +174 -7
- package/package.json +1 -1
- package/skills/pixelkiln/references/scenario.md +8 -4
package/docs/REVISIONS.md
CHANGED
|
@@ -5,14 +5,16 @@ 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. ComfyUI and
|
|
8
|
+
The manifest and pipeline are provider-neutral. ComfyUI, PixelLab and Scenario implement
|
|
9
9
|
it; PixelLab covers `image-to-image`, `inpaint`, `reduce-colors`,
|
|
10
10
|
`correct-pixelart`, `remove-background`, `animate`, `animate-pixminimax`,
|
|
11
11
|
`animate-skeleton`, `interpolate`, and `edit-animation`, not `outpaint` (its API has no
|
|
12
12
|
canvas-expansion endpoint). ComfyUI covers every mode generically except the
|
|
13
13
|
five frame-set modes (`animate`, `animate-pixminimax`, `animate-skeleton`,
|
|
14
14
|
`interpolate`, `edit-animation`), which need an ordered frame set its
|
|
15
|
-
revision path cannot produce.
|
|
15
|
+
revision path cannot produce. Scenario covers `image-to-image` only, by uploading the parent as a reference
|
|
16
|
+
image to its editing models ([Set up Scenario](./SCENARIO.md#reference-images-and-edits)).
|
|
17
|
+
Retro Diffusion rejects revision
|
|
16
18
|
work during offline resolution instead of silently starting a fresh
|
|
17
19
|
text-to-image job.
|
|
18
20
|
|
package/docs/SCENARIO.md
CHANGED
|
@@ -31,8 +31,12 @@ override the production API root. Ordinary projects should leave it unset.
|
|
|
31
31
|
PixelKiln calls `POST /generate/custom/{modelId}`. Scenario model inputs vary;
|
|
32
32
|
inspect the model's current parameter reference before adding optional inputs.
|
|
33
33
|
The initial PixelKiln contract sends `prompt`, `width`, `height`, `numOutputs`,
|
|
34
|
-
and an optional `seed`. It accepts dimensions from
|
|
35
|
-
|
|
34
|
+
and an optional `seed`. It accepts whole-number dimensions from 16 to 4096px and one to four PNG
|
|
35
|
+
outputs. Each model has its own tighter bounds (FLUX takes 128 to 2048 in
|
|
36
|
+
steps of 16, Retro Diffusion Plus 16 to 384); the free dry run that precedes
|
|
37
|
+
every paid request reports them, for example "Input width must be at least
|
|
38
|
+
672", before anything is spent. A model may also return a different canvas than
|
|
39
|
+
the one requested, so check real dimensions.
|
|
36
40
|
|
|
37
41
|
The public `model_bfl-flux-2-dev` profile documents that input shape. A custom
|
|
38
42
|
LoRA used with that base can be supplied as `parameters.modelId` when the
|
|
@@ -78,9 +82,146 @@ keeps job and asset lookup scoped to the intended Scenario project.
|
|
|
78
82
|
replace PixelKiln-owned `prompt`, dimensions, seed, output count, project, or
|
|
79
83
|
budget fields.
|
|
80
84
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
85
|
+
## Reference images and edits
|
|
86
|
+
|
|
87
|
+
Most Scenario image models take reference images, which serve both as style
|
|
88
|
+
guidance and as the image to edit. PixelKiln uploads each local image to
|
|
89
|
+
Scenario once (`POST /assets`, free), keeps the returned asset id by content
|
|
90
|
+
hash in a temporary cache so a rerun does not upload it again, and sends the ids
|
|
91
|
+
as the model's `referenceImages` input. Two things use this:
|
|
92
|
+
|
|
93
|
+
- A style's `styleImages` are sent as references with every asset in the style.
|
|
94
|
+
- An `image-to-image` revision sends its parent first, then any style images.
|
|
95
|
+
The prompt is the edit instruction, as in
|
|
96
|
+
[controlled revisions](./REVISIONS.md). Masked `inpaint` and the
|
|
97
|
+
PixelLab animation and cleanup modes are not available, and `strength` is
|
|
98
|
+
refused because Scenario has no common one; use the model's own `parameters`.
|
|
99
|
+
|
|
100
|
+
```jsonc
|
|
101
|
+
{
|
|
102
|
+
"styles": {
|
|
103
|
+
"edit": {
|
|
104
|
+
"generator": "map",
|
|
105
|
+
"size": 512,
|
|
106
|
+
"outDir": "assets/generated",
|
|
107
|
+
"providerOptions": {
|
|
108
|
+
"scenario": { "modelId": "model_bfl-flux-2-klein-9b", "maxComputeUnits": 1 }
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"assets": {
|
|
113
|
+
"keep": { "prompt": "a stone mountain keep", "source": "art/keep.png" },
|
|
114
|
+
"keep-snow": {
|
|
115
|
+
"prompt": "the same keep in winter: snow on the roofs, pixel art",
|
|
116
|
+
"revision": { "mode": "image-to-image", "from": "keep" }
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
The adapter does not know each model's input names, so a model whose image
|
|
123
|
+
input is not called `referenceImages` needs `referenceParameter` (for example
|
|
124
|
+
`"image"`), and `referenceArray: false` if it takes one image rather than a
|
|
125
|
+
list. `parameters` may not also set that input. A model must accept images at
|
|
126
|
+
all: the free dry run, which now includes the references, rejects one that
|
|
127
|
+
does not before anything is spent. A reference can add to the quote (GPT Image 2
|
|
128
|
+
priced one text-only 512×512 request at 11 CU and the same request with a
|
|
129
|
+
reference at 12).
|
|
130
|
+
|
|
131
|
+
On October 5, 2026 a one-image `image-to-image` revision of the bake-off's GPT
|
|
132
|
+
Image 2 keep through `model_bfl-flux-2-klein-9b` quoted and billed 1 CU and
|
|
133
|
+
returned the same keep with snow on its roofs and battlements, banners and
|
|
134
|
+
layout intact. The committed
|
|
135
|
+
[Scenario edit smoke](../benchmarks/provider-scenario-edit/README.md) has the
|
|
136
|
+
manifest, lockfile, and both images. That is one sample on one model.
|
|
137
|
+
|
|
138
|
+
### Tool models as image-to-image
|
|
139
|
+
|
|
140
|
+
Scenario's single-image tools (pixel snapper, pixelate, background removal,
|
|
141
|
+
upscalers) are models like any other, so they run through the same
|
|
142
|
+
`image-to-image` revision with no extra mode: point the style at the tool's
|
|
143
|
+
model, name its input `image`, and put its settings in `parameters`. The
|
|
144
|
+
adapter's other fields (`prompt`, `width`, `height`, `numOutputs`, `seed`) are
|
|
145
|
+
accepted and ignored by these tools, and the free dry run prices the exact
|
|
146
|
+
request. Free dry runs on October 5, 2026 quoted these on a `cu-basic` account:
|
|
147
|
+
|
|
148
|
+
| Model | CU | Inputs besides `image` |
|
|
149
|
+
|---|---:|---|
|
|
150
|
+
| `model_birefnet-background-removal` | 2 | none |
|
|
151
|
+
| `model_recraft-crisp-upscale` | 2 | none |
|
|
152
|
+
| `model_bria-remove-background`, `model_photoroom-background-removal` | 3 | none |
|
|
153
|
+
| `model_pixel-snapper` | 5 | `colors` 8 to 256 (default 16) |
|
|
154
|
+
| `model_sc-pixelate` | 5 | `pixelGridSize` 1 to 512, `removeNoise`, `colorPalette`, `colorPaletteSize` |
|
|
155
|
+
| `model_upscale-v3`, `model_topaz-image-upscale` | 10 | none |
|
|
156
|
+
|
|
157
|
+
```jsonc
|
|
158
|
+
{
|
|
159
|
+
"styles": {
|
|
160
|
+
"snap": {
|
|
161
|
+
"generator": "map",
|
|
162
|
+
"size": 512,
|
|
163
|
+
"outDir": "assets/snapped",
|
|
164
|
+
"providerOptions": {
|
|
165
|
+
"scenario": {
|
|
166
|
+
"modelId": "model_pixel-snapper",
|
|
167
|
+
"maxComputeUnits": 5,
|
|
168
|
+
"referenceParameter": "image",
|
|
169
|
+
"referenceArray": false,
|
|
170
|
+
"parameters": { "colors": 16 }
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
"assets": {
|
|
176
|
+
"keep-snapped": {
|
|
177
|
+
"prompt": "snap to the pixel grid",
|
|
178
|
+
"revision": { "mode": "image-to-image", "from": "keep" }
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
Birefnet and Pixel Snapper were then run once each through the adapter (7 CU,
|
|
185
|
+
quoted and billed identically; see the
|
|
186
|
+
[tool-model smoke](../benchmarks/provider-scenario-tools/README.md)). Pixel
|
|
187
|
+
Snapper returned an 83×83, exactly-16-colour native-grid version of a 512×512
|
|
188
|
+
image, a different size than the manifest's canvas, and Birefnet's cutout kept
|
|
189
|
+
its subject at alpha 254 rather than 255. The other tools were only quoted. They overlap PixelKiln's own offline work: `pixelkiln refine` snaps
|
|
190
|
+
the grid and palette for free, and PixelLab's `remove-background` revision costs
|
|
191
|
+
one generation. Reach for these when the art is already on Scenario.
|
|
192
|
+
|
|
193
|
+
### Retro Diffusion on Scenario
|
|
194
|
+
|
|
195
|
+
Scenario hosts three Retro Diffusion models, and they are the most pixel-art-specific
|
|
196
|
+
models in its catalog: `model_retrodiffusion-plus` (18 styles from `default` and
|
|
197
|
+
`retro` to `isometric_asset`, `topdown_asset`, `character_turnaround`, and
|
|
198
|
+
`ui_element`), `model_retrodiffusion-tile` (`tileset`, `tileset_advanced`,
|
|
199
|
+
`single_tile`, `tile_variation`, `tile_object`, `scene_object`), and
|
|
200
|
+
`model_retrodiffusion-animation` (`four_angle_walking`, `walking_and_idle`,
|
|
201
|
+
`small_sprites`, `vfx`). On a `cu-basic` account every dry run answered
|
|
202
|
+
`ModelAccessRestrictedError` with `requiredPlan: cu-pro-q3-25`, so none of this
|
|
203
|
+
has been run, and no price is known until the plan is upgraded.
|
|
204
|
+
|
|
205
|
+
Judging from Scenario's parameter reference (nothing here was exercised), what
|
|
206
|
+
the adapter already supports and what it does not:
|
|
207
|
+
|
|
208
|
+
| Need | Status |
|
|
209
|
+
|---|---|
|
|
210
|
+
| `style`, `removeBg`, `tileX`, `tileY`, `strength`, `bypassPromptExpansion` | Pass-through `parameters`. |
|
|
211
|
+
| 16 to 384 px canvas | Accepted now; the model's bound comes from the free dry run. |
|
|
212
|
+
| `image` (image-to-image) | Supported through an `image-to-image` revision with `referenceParameter: "image"` and `referenceArray: false`. |
|
|
213
|
+
| `inputPalette` (a palette image) | Not supported: the adapter has one reference input. |
|
|
214
|
+
| More than 4 outputs (Plus and Tile allow 10) | Not supported: `numOutputs` stops at 4. |
|
|
215
|
+
| Animation as a PNG spritesheet (`returnSpritesheet: true`) | Lands as one still image; there is no frame-set output for Scenario, so a person would slice it. The default GIF output is refused. |
|
|
216
|
+
| Tilesets | Land as one still; PixelKiln's tile roles and exports do not apply. |
|
|
217
|
+
|
|
218
|
+
PixelKiln also has a direct [Retro Diffusion](./RETRO_DIFFUSION.md) provider
|
|
219
|
+
with live-tested single stills. Choosing between them is a billing and plan
|
|
220
|
+
question (Retro Diffusion's USD credits against Scenario's compute units), not a
|
|
221
|
+
feature one, until the Scenario route is measured. The first live check after
|
|
222
|
+
upgrading should be one `model_retrodiffusion-plus` still at 64×64 with the
|
|
223
|
+
default style: quote, billed amount, dimensions, and whether it comes back as
|
|
224
|
+
PNG.
|
|
84
225
|
|
|
85
226
|
## Plan before spending
|
|
86
227
|
|
|
@@ -114,6 +255,12 @@ quote stops the run before paid work. Scenario's `costDetails` already sum to
|
|
|
114
255
|
`creativeUnitsCost`; PixelKiln records both without double-counting. A separate
|
|
115
256
|
IP-detection charge is additive when Scenario reports one.
|
|
116
257
|
|
|
258
|
+
A 429 on a generation request means the account's concurrent-job limit
|
|
259
|
+
refused it: nothing was accepted or billed, and the adapter retries for about
|
|
260
|
+
80 seconds. Past that, rerun `gen`; the assets that landed are kept. A finished
|
|
261
|
+
job whose asset is not a PNG (some models return JPEG) is billed, so that asset
|
|
262
|
+
is marked failed rather than polled again.
|
|
263
|
+
|
|
117
264
|
The command budget is still a hard ceiling over the whole selected run. The
|
|
118
265
|
manifest ceiling protects each request from a changed live quote.
|
|
119
266
|
|
|
@@ -123,6 +270,24 @@ closed palette, and require named approval before pack or mount. This offline
|
|
|
123
270
|
policy does not change the Scenario request or CU quote. See
|
|
124
271
|
[Manifest quality profiles](./MANIFEST.md#quality-profiles).
|
|
125
272
|
|
|
273
|
+
### Models and what they cost
|
|
274
|
+
|
|
275
|
+
A free survey on October 5, 2026 quoted every non-deprecated text-to-image
|
|
276
|
+
model with a prompt-only 512×512 dry run on a `cu-basic` account. 37 were
|
|
277
|
+
usable and 19 were refused with `ModelAccessRestrictedError` (the Retro
|
|
278
|
+
Diffusion Plus, Tile, and Animation models need the `cu-pro-q3-25` plan).
|
|
279
|
+
Quotes ran from 1 CU (FLUX.2 Klein 9b, FLUX.1 Schnell, P-Image) through 2 to 6
|
|
280
|
+
for the Krea 2, Recraft V4.1 Flash, Meta Muse, Ernie, Z-Image, and Qwen Image
|
|
281
|
+
models, 11 to 12 for GPT Image 2 and Gemini 3.1 Flash, to 16 for the FLUX.2 Dev
|
|
282
|
+
this page was first validated on. The
|
|
283
|
+
[model bake-off](../benchmarks/provider-scenario-bakeoff/README.md) ran ten of
|
|
284
|
+
them once: price did not predict fit, several models ignore the requested
|
|
285
|
+
canvas size, and one returned a JPEG, which the adapter refuses.
|
|
286
|
+
|
|
287
|
+
Scenario's catalog also lists pixel-art LoRAs, background-removal and upscale
|
|
288
|
+
models, and a `pixel-snapper` cleanup tool. LoRA models answer a different
|
|
289
|
+
endpoint than `/generate/custom/{modelId}`, which this adapter does not call.
|
|
290
|
+
|
|
126
291
|
### Current live validation
|
|
127
292
|
|
|
128
293
|
On September 5, 2026, PixelKiln authenticated against the read-only model
|
|
@@ -184,9 +349,11 @@ for every style:
|
|
|
184
349
|
| `numOutputs` | One to four PNG candidates; defaults to one. |
|
|
185
350
|
| `projectId` | Optional Scenario ownership/routing project. |
|
|
186
351
|
| `parameters` | Additional model-specific JSON inputs. PixelKiln-owned request fields cannot be overridden. |
|
|
352
|
+
| `referenceParameter` | The model input that takes images, default `referenceImages`. |
|
|
353
|
+
| `referenceArray` | `false` when that input takes one image rather than a list. |
|
|
187
354
|
|
|
188
|
-
The current adapter supports `map`, dimensions from
|
|
189
|
-
|
|
355
|
+
The current adapter supports `map`, whole-number dimensions from 16 to 4096px,
|
|
356
|
+
optional seed, style images and `image-to-image` revisions as reference uploads. Every paid request is preceded
|
|
190
357
|
by an identical `dryRun=true` request. See [Set up Scenario](SCENARIO.md) for
|
|
191
358
|
credentials, cost semantics, recovery, and the paid live-test boundary.
|
|
192
359
|
|
package/package.json
CHANGED
|
@@ -20,11 +20,15 @@ schemas remain unverified. Require a one-asset smoke before widening a batch.
|
|
|
20
20
|
existing Scenario asset and must not trigger another generation.
|
|
21
21
|
- Treat `scenario://` job and asset references as the recovery contract.
|
|
22
22
|
Temporary signed Scenario URLs must not remain in a settled lockfile.
|
|
23
|
-
- Verify the chosen model returns PNG. The
|
|
24
|
-
|
|
23
|
+
- Verify the chosen model returns PNG. The adapter rejects other media
|
|
24
|
+
formats, animation, and tiles.
|
|
25
|
+
- Style images and `image-to-image` revisions are uploaded once (free) and sent
|
|
26
|
+
as the model's `referenceImages` input; set `referenceParameter` and
|
|
27
|
+
`referenceArray` for a model that names it differently. Other revision modes
|
|
28
|
+
and `strength` are refused.
|
|
25
29
|
|
|
26
|
-
Scenario model parameters vary. The MVP supplies prompt,
|
|
27
|
-
|
|
30
|
+
Scenario model parameters vary. The MVP supplies prompt, 16–4096px dimensions
|
|
31
|
+
(each model has tighter bounds, reported by the free dry run), one to four outputs, and optional seed. Put only documented
|
|
28
32
|
model inputs in `parameters`; PixelKiln rejects attempts to override its prompt,
|
|
29
33
|
dimensions, seed, output count, project routing, or CU ceiling.
|
|
30
34
|
|