pixelkiln 0.86.0 → 0.86.2

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 CHANGED
@@ -27,7 +27,7 @@ them.
27
27
  | PixelLab | Production; paid generation and account workflows live-tested | `PIXELLAB_API_KEY` | generations |
28
28
  | Retro Diffusion | Experimental; authenticated paid still generation, download, provenance, and recovery live-tested; advanced workflows pending | `RD_API_KEY` | USD |
29
29
  | ComfyUI | Experimental; local generation, review, recovery, and image-to-image revision smoke live-tested on Apple MPS; inpaint/outpaint remain mock-tested | none; optional `COMFYUI_BASE_URL` | free |
30
- | Scenario | Experimental; BFL Flux 2 Dev authentication, CU preflight, paid single/two-output generation, review, download, and durable recovery live-tested | `SCENARIO_SDK_API_KEY` and `SCENARIO_SDK_API_SECRET` | compute-units |
30
+ | Scenario | Experimental; BFL Flux 2 Dev authentication, CU preflight, paid single/two-output generation, review, download, and durable recovery live-tested; reference-image edits, tool models, and multi-model chains run once each | `SCENARIO_SDK_API_KEY` and `SCENARIO_SDK_API_SECRET` | compute-units |
31
31
  | FakeProvider | Test-only deterministic lifecycle | none | free |
32
32
 
33
33
  Live tests now cover single-candidate RD Fast and RD Plus stills from cost quote
@@ -114,13 +114,13 @@ only the part that fits its existing still-image pipeline.
114
114
 
115
115
  | Decision | Scenario through PixelKiln |
116
116
  |---|---|
117
- | Best fit today | A controlled one-asset spike using a hosted model or project LoRA with a hard CU ceiling |
118
- | PixelKiln generator | `map` stills |
117
+ | Best fit today | Large or illustrative art rendered big then reduced (render, Pixelate, cut out, refine), image-to-image edits of existing art, and a chain of models across styles, each with a hard CU ceiling. Poor for small native-size sprites. |
118
+ | PixelKiln generator | `map` stills, with `styleImages` and `image-to-image` revisions as reference uploads, and `revision.fromStyle` to chain styles |
119
119
  | Output | One to four PNG candidates, 16–4096px; each model has its own bounds |
120
120
  | Cost model | Manifest `maxComputeUnits`, command budget, then free authoritative preflight before each paid request |
121
121
  | Recovery | Durable job and asset IDs refresh temporary signed original-file URLs |
122
122
  | Account lifecycle | Read-only connectivity check; no balance, list, adopt, salvage, tag, or purge yet |
123
- | Confidence | BFL Flux 2 Dev live-tested through quote, billing, single/two-output jobs, human selection, PNG download, and provider-backed restore; other model schemas remain unverified |
123
+ | Confidence | BFL Flux 2 Dev live-tested through quote, billing, single/two-output jobs, human selection, PNG download, and provider-backed restore. Ten generation models, six tool models, reference-image edits, a three-style chain, and a game's landmarks and cover have each been run once; see the [Scenario page](./docs/SCENARIO.md). Other model schemas remain unverified. |
124
124
 
125
125
  Scenario model schemas differ. The current adapter sends prompt, width, height,
126
126
  output count, optional seed, and explicitly declared JSON parameters. Verify
@@ -134,8 +134,8 @@ background. That distinction matters more than raw canvas size.
134
134
 
135
135
  | Asset type | PixelLab | Retro Diffusion | ComfyUI | Scenario |
136
136
  |---|---|---|---|---|
137
- | Isolated house, building, mountain, or landmark | Start with `map`: arbitrary dimensions up to 400×400 and a measured one-generation cost. Live benchmark outputs had opaque backgrounds, so plan for cleanup. Use `1dir` only when references or candidate variety justify 20–40 generations and a square canvas. | Start with `rd_plus__topdown_asset`, `rd_plus__isometric_asset`, or `rd_tile__scene_object`, depending on perspective. `rd_tile__scene_object` is intended for 64–384px objects placed on tile maps. | Choose a checkpoint or LoRA trained for the intended perspective, then keep background removal or segmentation in the workflow. For the tested Pixel Art XL stack, target 48–128px native components even though the adapter accepts larger working canvases. | The live BFL smoke produced a readable 512px keep, but it was opaque and used 19,619 colors. Use that profile for concepts or refinement input, not a finished limited-palette asset. A project-specific model may improve consistency but needs its own smoke. |
138
- | Full scenic background | Use `pixflux` with `noBackground: false` when an exact palette matters, or `map` for a simple scene; both top out at 400×400. `imagePro` reaches 792 wide or 688 tall for a flat 40 generations. | `rd_plus__environment` targets one-point-perspective scenes; `rd_plus__topdown_map` targets 3/4 top-down maps. These styles support up to 384×384. | Use composition controls only to establish the scene. Recover and review native components, then compose them at 1× with one grid and palette. A large model canvas is not a large native pixel-art canvas. | The BFL profile accepts canvases up to 2048px, but no Scenario scenic brief has passed the shared benchmark. Treat that as model-canvas capacity, not native pixel resolution. Start with one 512px concept before raising size or steps. |
137
+ | Isolated house, building, mountain, or landmark | Start with `map`: arbitrary dimensions up to 400×400 and a measured one-generation cost. Live benchmark outputs had opaque backgrounds, so plan for cleanup. Use `1dir` only when references or candidate variety justify 20–40 generations and a square canvas. | Start with `rd_plus__topdown_asset`, `rd_plus__isometric_asset`, or `rd_tile__scene_object`, depending on perspective. `rd_tile__scene_object` is intended for 64–384px objects placed on tile maps. | Choose a checkpoint or LoRA trained for the intended perspective, then keep background removal or segmentation in the workflow. For the tested Pixel Art XL stack, target 48–128px native components even though the adapter accepts larger working canvases. | Raw model output is opaque and anti-aliased (the BFL smoke keep used 19,619 colors), but a chain of render at four times the size, Pixelate to the target grid, Birefnet, and `refine` took a 960 px render of an alpine lodge to a 240×208 native grid at high confidence with 63 colors, for 18 CU (a 1 CU render can be nearly as good). Details and the Pixelate grid caveat are in [Set up Scenario](./docs/SCENARIO.md#large-and-illustrative-art-render-big-pixelate-refine). One sample per subject. |
138
+ | Full scenic background | Use `pixflux` with `noBackground: false` when an exact palette matters, or `map` for a simple scene; both top out at 400×400. `imagePro` reaches 792 wide or 688 tall for a flat 40 generations. | `rd_plus__environment` targets one-point-perspective scenes; `rd_plus__topdown_map` targets 3/4 top-down maps. These styles support up to 384×384. | Use composition controls only to establish the scene. Recover and review native components, then compose them at 1× with one grid and palette. A large model canvas is not a large native pixel-art canvas. | GPT Image 2 at four times the target size, then Pixelate, turned a course-cover brief into a convincing pixel scene with 31 colors and legible title text. It has not been put through the shared benchmark. A large model canvas is not native pixel resolution: pixelate to the grid you need and check it with `refine`. |
139
139
  | Style consistency across a set | `1dir` accepts a style reference and returns size-dependent candidates, but it is more expensive and capped at the square-object range. | RD Pro accepts up to nine references and has stronger prompt following, but its common styles top out at 256×256 and cost $0.18 per image. Environment-specific RD Plus styles trade references for a larger 384px canvas. | LoRAs, reference adapters, ControlNet, and shared latent settings can live in the committed workflow. Reproducibility also depends on external model and custom-node versions. | Scenario's project models and LoRAs are the main reason to use it for a set. PixelKiln can pin the model ID and parameters, but its first live run covers only the public BFL profile. |
140
140
  | Very large final scene | Generate reusable objects, terrain, and background layers separately; assemble them deterministically and integer-upscale the result. | Use the same layered approach. The API has a 512px overall ceiling, but the useful environment and scene-object styles currently cap at 384px. | The graph can tile, upscale, or composite beyond hosted-provider limits, but memory and seam quality become workflow concerns. Prefer reusable layers unless the scene truly needs one render. | Scenario can request a larger raster from a compatible model, but the same rule applies: generate reusable layers at their useful native detail, compose at 1×, and integer-upscale only the final scene. |
141
141
 
@@ -267,9 +267,11 @@ to ComfyUI. Provider-keyed budgets, independent orchestration, lock-authoritativ
267
267
  recovery, and explicit account-provider selection ship with it.
268
268
 
269
269
  The Scenario still-image adapter from
270
- [GitHub issue #52](https://github.com/gfargo/pixelkiln/issues/52) now has mocked
271
- edge coverage and a paid BFL Flux 2 Dev lifecycle smoke. It remains
272
- experimental until more model schemas and representative art briefs pass.
270
+ [GitHub issue #52](https://github.com/gfargo/pixelkiln/issues/52) has mocked edge
271
+ coverage, a paid BFL Flux 2 Dev lifecycle smoke, and a broader evaluation (ten
272
+ more models, six tool models, reference-image edits, multi-model chains, and a real
273
+ game's art) recorded in [Set up Scenario](./docs/SCENARIO.md#where-the-evidence-is).
274
+ It remains experimental until more model schemas and representative art briefs pass.
273
275
 
274
276
  | Candidate | What it adds | Fit with PixelKiln | Main cost or risk | Priority |
275
277
  |---|---|---|---|---:|
package/README.md CHANGED
@@ -366,7 +366,7 @@ verification. See [Library API](./docs/LIBRARY.md).
366
366
  | [Set up PixelLab](./docs/PIXELLAB.md) | Production-provider credentials, manifest, generators, and account workflows. |
367
367
  | [Set up Retro Diffusion](./docs/RETRO_DIFFUSION.md) | Experimental-provider credentials, styles, formats, cost checks, and limits. |
368
368
  | [Set up ComfyUI](./docs/COMFYUI.md) | Self-hosted stills, revisions, ordered frame sets, per-asset inputs, and quality limits. |
369
- | [Set up Scenario](./docs/SCENARIO.md) | Experimental hosted models, two-part credentials, CU preflight, review, and durable downloads. |
369
+ | [Set up Scenario](./docs/SCENARIO.md) | Experimental hosted models, two-part credentials, CU preflight, reference-image edits, multi-model chains, measured findings, and durable downloads. |
370
370
  | [Versioned recipes](./docs/RECIPES.md) | Pinned workflow packs, model hashes, manifest templates, and quality contracts. |
371
371
  | [Controlled revisions](./docs/REVISIONS.md) | Image-to-image, inpaint, palette cleanup, animation, and interpolation from a parent; masks, fail-closed readiness, provenance, and ComfyUI bindings. |
372
372
  | [CLI reference](./docs/CLI.md) | Every command, flag, JSON mode, and exit contract. |
package/docs/AGENTS.md CHANGED
@@ -72,7 +72,7 @@ replacement:
72
72
  | PixelLab adapter | The current production and live-tested generation backend: stills, tiles, UI panels and elements, `objectPro` objects, controlled revisions, and the character family (four engines, states, loops, mirrors, portraits, outfits, adoption). |
73
73
  | Retro Diffusion adapter | Experimental backend; authenticated paid single-still lifecycle plus mocked advanced-workflow tests. |
74
74
  | ComfyUI adapter | Experimental self-hosted still, controlled-revision, and atomic frame-set backend; PixelKiln automates lineage and mechanical quality checks while a person retains visual approval. |
75
- | Scenario adapter | Experimental hosted still-image backend; BFL Flux 2 Dev quote, paid single/two-output generation, human review, and durable recovery live-tested. |
75
+ | Scenario adapter | Experimental hosted still-image backend with reference-image edits and cross-style chains; BFL Flux 2 Dev quote, paid generation, human review, and durable recovery live-tested, plus ten more models, six tool models, and a real game's art run once each. |
76
76
 
77
77
  PixelKiln's core is provider-neutral, but PixelLab remains the only production
78
78
  adapter. Retro Diffusion generation support is experimental. Paid RD Fast and
@@ -288,7 +288,7 @@ coverage. Live Apple MPS runs cover a small Stable
288
288
  Diffusion 1.5 plumbing smoke and
289
289
  the SDXL Base plus Pixel Art XL composition benchmark, including four-candidate
290
290
  review, cache recovery, and native-grid refinement. `ScenarioProvider` is an experimental hosted still-image
291
- adapter. It keeps offline planning conservative, records the provider's free
291
+ adapter that also uploads references for `styleImages` and `image-to-image` revisions. It keeps offline planning conservative, records the provider's free
292
292
  submit-time Compute Unit quote, and stores durable `scenario://` job and asset
293
293
  references that refresh signed URLs. Authentication and CU preflight have
294
294
  passed live with BFL Flux 2 Dev, along with paid single/two-output jobs, human
package/docs/CLI.md CHANGED
@@ -17,7 +17,7 @@ work accordingly. The experimental `retrodiffusion` adapter supports
17
17
  still-image `map`/`pixflux`, `tiles` sheets, and `animation` GIF/spritesheet
18
18
  work. The experimental `comfyui` adapter runs committed API-format `map` and
19
19
  ordered still-frame workflows on a self-hosted server. The experimental `scenario` adapter runs
20
- hosted still models with Compute Unit preflight and durable asset recovery.
20
+ hosted still models, with reference-image edits, Compute Unit preflight, and durable asset recovery.
21
21
 
22
22
  Which command:
23
23
 
@@ -73,7 +73,7 @@ remains the production adapter. See
73
73
  provider options and current limits, or
74
74
  [provider comparison](../PROVIDERS.md) for selection guidance.
75
75
 
76
- For experimental Scenario still generation, use both credentials:
76
+ For experimental Scenario still generation and reference-image edits, use both credentials:
77
77
 
78
78
  ```dotenv
79
79
  SCENARIO_SDK_API_KEY=...
package/docs/SCENARIO.md CHANGED
@@ -1,16 +1,29 @@
1
1
  # Set up Scenario
2
2
 
3
3
  [Scenario](https://www.scenario.com/) is an experimental hosted provider for
4
- project-specific models and third-party image models. PixelKiln currently
5
- supports still PNG generation through Scenario's universal model endpoint,
6
- free Compute Unit preflight, asynchronous jobs, multi-output review, and
7
- refreshable asset downloads.
8
-
9
- Every code path in the adapter has mocked coverage. BFL Flux 2 Dev has also passed
10
- live authentication, cost preflight, paid single- and two-output generation,
11
- human review, PNG download, and provider-backed recovery. Start every untested
12
- model with one disposable asset and a small ceiling. This integration remains
13
- experimental because Scenario model schemas vary.
4
+ project-specific models and third-party image models. PixelKiln supports still
5
+ PNG generation through Scenario's universal model endpoint, free Compute Unit
6
+ preflight, asynchronous jobs, multi-output review, and refreshable asset
7
+ downloads. It also uploads your images as references, so a style's
8
+ `styleImages` and `image-to-image` revisions work, and a manifest can chain
9
+ several Scenario models across styles with
10
+ [`revision.fromStyle`](./REVISIONS.md#across-styles). The adapter handles
11
+ still images only; audio models are reachable through the same account but not
12
+ through PixelKiln.
13
+
14
+ Every code path in the adapter has mocked coverage. BFL Flux 2 Dev passed live
15
+ authentication, cost preflight, paid single- and two-output generation, human
16
+ review, PNG download, and provider-backed recovery. A later evaluation ran ten
17
+ more text-to-image models, six tool models, reference-image edits, multi-model
18
+ chains, and a real game's art; its findings are on this page and its benchmark
19
+ projects are listed in [Where the evidence is](#where-the-evidence-is). Start
20
+ every untested model with one disposable asset and a small ceiling. This
21
+ integration remains experimental because Scenario model schemas vary.
22
+
23
+ The short version of what that evaluation found: price does not predict fit;
24
+ large or illustrative art (landmarks, covers, flat backdrops) comes out well
25
+ through render, Pixelate, cutout, and `refine`; small native-size sprites, tiles,
26
+ and characters do not; and a reference image keeps an existing design.
14
27
 
15
28
  ## Requirements
16
29
 
@@ -237,21 +250,191 @@ refined it, for 8 CU on the cheapest path and 18 CU with GPT Image 2, ending in
237
250
  a 64×64 transparent sprite that passed the `refine` gate. Three rules came out
238
251
  of it:
239
252
 
240
- - A revision's parent must be in the same style, and a style has one model. To
241
- chain steps, restate the previous output in the next style as a placed
242
- `source`: `"source": "outputs/gen-klein/knight.png"`. Run each step with
243
- `gen --style <id>`; nothing orders them yet.
253
+ - A style has one model, so a chain spans styles. Name the parent's style with
254
+ `revision.fromStyle` (see [Across styles](./REVISIONS.md#across-styles)); the
255
+ child is blocked until the parent is generated, and `gen` runs the whole chain
256
+ in one invocation, one wave per link. The
257
+ [chain run](../benchmarks/provider-scenario-chain/README.md) did this live in
258
+ 8 CU. (The pipeline benchmark was run before `fromStyle` existed, so it
259
+ restates each output as a placed `source` and runs `gen --style` per step.)
244
260
  - A `quality` profile gates every asset in its style, parents included, so a raw
245
- parent blocks its own child. Put `quality` only on a final style whose asset is
246
- the last output placed as a `source`, then run `pixelkiln refine --style`.
261
+ parent in the same style blocks its own child. Put `quality` on the last style
262
+ of the chain, whose parents are in other styles, then run
263
+ `pixelkiln refine --style`.
247
264
  - Pass the same palette to the tool (Pixelate's `colorPalette`) and to
248
- `quality.palette`. The output then stays inside it. Pixelate's
249
- `pixelGridSize` also set the detected native grid closely (48, 64 and 128
250
- asked, 46, 64 and 128 found).
265
+ `quality.palette`. The output then stays inside it.
251
266
 
252
267
  A palette that is too small for the art costs fidelity (a bright blue cape
253
268
  became navy under a 32-colour palette), so passing the gate is not approval.
254
269
 
270
+ ### Large and illustrative art: render big, pixelate, refine
271
+
272
+ A [game pilot](../benchmarks/provider-scenario-game-pilot/README.md) ran the
273
+ chain on a real game's large landmarks (240 px wide, 176 to 224 px tall) and on a
274
+ course cover, and it is where Scenario earned a place: a strong model renders the
275
+ art at four times its final size, Pixelate reduces it to the target grid on a
276
+ bounded palette, Birefnet removes the background, and `refine` confirms the
277
+ grid. It is poor at the opposite end: 32 px props lose their shape.
278
+
279
+ | Step | Setting that worked |
280
+ |---|---|
281
+ | 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. |
282
+ | 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. |
283
+ | Cut out | Birefnet, 2 CU. |
284
+ | Refine | `pixelkiln refine` with the image's own 64 most common colours. |
285
+
286
+ With the right grid, a 960×832 render of a ski lodge came back as a **240×208**
287
+ native grid at **high** confidence, the same size as the game's existing
288
+ sprite, and visibly more detailed. At twice the grid the detector reported
289
+ medium confidence and a doubled grid, so a result that is not high is a sign the
290
+ grid was mis-set, not that the art is bad. The 1 CU Klein render of a temple was
291
+ about as good as the 11 CU GPT one. One chain costs 8 CU (Klein) or 18 CU (GPT
292
+ Image 2).
293
+
294
+ For a **cover or key art**, GPT Image 2 at four times the size, then Pixelate at a
295
+ grid giving the target width, produced a convincing pixel scene with 31 colours.
296
+ It renders legible title text, which PixelLab does not, and the text survives
297
+ Pixelate. Before pixelating it is a painterly illustration, not pixel art.
298
+
299
+ A [structures pilot](../benchmarks/provider-scenario-game-pilot/README.md#structures-pilot-90-cu)
300
+ repeated this on five more buildings from five biomes at 8 CU each (18 CU with GPT
301
+ Image 2): all seven chains landed on the sprite's exact size at high confidence
302
+ with 63 colours and far more detail. Treat each result as a new design: the
303
+ building changed style, the footprint drifted by up to 25%, Klein baked a ground patch
304
+ under most (GPT did not), and a thin lattice tower at 128 px came out noisy. Asking for
305
+ twice the grid worked as an image but gave only medium confidence.
306
+
307
+ To keep a building's own design, send the existing sprite as a reference and ask for
308
+ the same design redrawn in finer detail (a placed `source` asset as the parent of an
309
+ `image-to-image` revision, the sprite upscaled 4× on white). Against the current
310
+ sprites, silhouette overlap rose from 0.39 to 0.66 with text alone to 0.93 to 1.00
311
+ with a Klein reference (0.77 and 0.81 with GPT Image 2), and the footprint matched.
312
+ The result is the same sprite with finer texture and shading, not a new look and not a
313
+ bigger one. Klein shifted colours; GPT held them better at a lower silhouette match.
314
+
315
+ **Backdrops** (wide, flat landform strips) need the prompt to say so. The game's
316
+ original prompt, which ends "isometric 2:1 perspective", came back as a ridge and a
317
+ treeline lying on a diagonal ground plane. A prompt with its isometric wording
318
+ removed and "flat side-on front-facing elevation view like a stage backdrop strip,
319
+ perfectly horizontal composition spanning the full width of the image edge to
320
+ edge, NOT isometric, no three-quarter view, no diagonal ground plane, the base
321
+ line straight and horizontal and the form fading to nothing at its foot, isolated
322
+ on a plain white background, no sky" gave a front-facing horizontal band for an
323
+ alpine ridge and a swamp treeline. At a 1024×448 render with `pixelGridSize: 128`
324
+ (a 256-cell grid on that 1024 px input) both came back as the game's exact
325
+ 256×112 grid at high confidence, 45 to 47 colours. The 1 CU Klein alpine ridge
326
+ was a cleaner single massif than the 11 CU GPT one, which was a wide band of many
327
+ peaks. Birefnet did not handle the fade into mist: it left a speckled grey fringe
328
+ along the foot where the form dissolves into the white background, so a fade
329
+ needs another route (keying luminance to alpha locally, or rendering on a known
330
+ tint).
331
+
332
+ Do not use this for small native-size props. A winter pine and an autumn tree at
333
+ 32 px came back as different trees, and Birefnet left holes in the canopy. A
334
+ free recolour of the original, or a PixelLab generation at the native size, is
335
+ the better tool there.
336
+
337
+ ### Sound effects and other non-image models
338
+
339
+ The adapter handles still images only, but Scenario's audio models are reachable
340
+ through the same account. A call outside PixelKiln (`POST /generate/custom/{model}`,
341
+ then poll `/jobs/{id}` and fetch the asset) produced a sound effect for 1 CU;
342
+ nothing about it is recorded in a lockfile. Measured on October 5, 2026:
343
+
344
+ | Model | CU | Output |
345
+ |---|---:|---|
346
+ | `model_mm-audio-2-t2a` (MM Audio SFX) | 1, flat at any duration | Mono MP3, 44.1 kHz, 64 kbps |
347
+ | `model_elevenlabs-sound-effects-v2` | 30, flat at any duration | Stereo MP3, 44.1 kHz, 128 kbps |
348
+
349
+ Both ignore the duration for pricing, so ask for the length the game needs. A
350
+ prompt that narrates a sequence ("chains rattle, then the disc drops into the
351
+ tray") came back at the full requested length with the events spread out;
352
+ asking for one fast sound and a duration of 1.0 to 1.4 seconds, then trimming
353
+ leading and trailing silence, helps, but it was not enough on its own.
354
+
355
+ **What finally worked for a two-part impact** (a disc hitting a basket's chains,
356
+ then landing on its bars), judged by the game's owner by ear:
357
+
358
+ - **Generate each event as its own sound and layer them.** One prompt cannot carry
359
+ two events. MM Audio returned ambience for an impact prompt (its "drop" came
360
+ back at -50 dB, near silence) and ElevenLabs was the only model that made
361
+ distinct hits; an envelope check (the share of time within 20 dB of the peak,
362
+ and the count of sharp onsets) caught the ambience before anyone listened.
363
+ - **Describe the physical object, not a word that implies a cavity.** "Hollow
364
+ steel basket" produced a bucket-like clank with echo. What worked was "a plastic
365
+ disc landing on a ring of thin steel bars: a dry plastic-on-metal clack followed
366
+ by a quick tinny rattle against the metal rods, outdoors in open air,
367
+ completely dry, no echo, no reverb, no hollow resonance, no bucket sound."
368
+ The chain layer used "loose steel chain links rattling and jangling ... close up,
369
+ dry, no room reverb, no background noise."
370
+ - **Expect big variation between takes.** Re-running the same ElevenLabs prompt
371
+ gave drops of 65 ms, 114 ms, 166 ms and 274 ms; the owner picked the second of
372
+ three re-runs. There is no seed, so keep the chosen file and note the prompt.
373
+ - **Layer with ffmpeg:** trim silence below -50 dB at both ends, high-pass at
374
+ 60 Hz, `loudnorm` each part to -18 LUFS, delay the second part about 260 ms,
375
+ `amix` without normalisation, limit at 0.89, then `loudnorm` the mix to -16 LUFS.
376
+
377
+ One finished two-part effect cost about 210 CU of ElevenLabs generations here (a
378
+ chain layer and six drop attempts at 30 CU each), after about 70 CU of cheaper
379
+ 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
380
+ wording ("close up, dry, no room reverb, no background noise"), the model, and
381
+ the post chain above for every effect, and record each effect's prompts, model
382
+ and post steps beside the file.
383
+
384
+ Music models (ACE-Step, MusicGen, ElevenLabs Music, Lyria 3.5) quoted 10 to 30
385
+ CU; Sonilo and Lyria 3 Pro need the `cu-pro-q3-25` plan. Music was not generated.
386
+
387
+ ### Calling the API directly: the dry run and the legacy endpoint
388
+
389
+ Two facts for anyone calling Scenario outside PixelKiln, because both cost compute
390
+ units to find:
391
+
392
+ - **The free dry run is only the query parameter** `?dryRun=true`. A `dryRun: true`
393
+ in the JSON body is ignored, and the request submits and bills a real job. A probe of
394
+ the legacy `/generate/txt2img` endpoint made that mistake and billed 10 CU for a
395
+ FLUX.1 LoRA image, and jobs there cannot be cancelled ("Cannot cancel this type of
396
+ job"). The adapter always sends the query parameter.
397
+ - **LoRA models do not use `/generate/custom/{modelId}`.** A public pixel-art LoRA
398
+ (Flux Retro Aesthetics) answered "Custom models only are supported for this
399
+ endpoint" there. The older `/generate/txt2img` endpoint accepted it at 10 CU an
400
+ image, returned a JPEG (which the adapter refuses), and is absent from the current
401
+ API reference. The adapter does not call it, and the same-quality Klein render costs
402
+ 1 CU.
403
+
404
+ ### Budget and billing notes
405
+
406
+ - **The adapter cannot read your balance.** `gen` enforces the budget you pass
407
+ (`scenario does not expose an account balance; enforcing its run budget`) and
408
+ the per-style `maxComputeUnits`, but the remaining balance is only on Scenario's
409
+ dashboard. Whether the allowance renews depends on the plan and billing
410
+ setup; a dashboard showing "No monthly reset scheduled" means it may not.
411
+ - **Check the dashboard against your own tally.** In our evaluation a hand total
412
+ of quoted and billed amounts came to about 715 CU while the dashboard's balance
413
+ had fallen by 753 CU, about 5% more. The cause was not identified, so budget with a
414
+ margin.
415
+ - **Quotes were exact where the adapter made them.** Every quote the adapter took
416
+ matched the billed amount in the lockfile, including failed assets that the
417
+ adapter refused after billing (a JPEG or WebP result is billed even though no
418
+ file lands).
419
+ - **Flat prices.** GPT Image 2 `quality: medium` was 11 CU at any canvas size (`high`
420
+ 44), ElevenLabs sound effects 30 CU at any length, and tool models 2 to 10 CU.
421
+
422
+ ### Where the evidence is
423
+
424
+ Each is a committed project with its manifest, lockfile, outputs, and README:
425
+
426
+ | Project | What it ran | CU |
427
+ |---|---|---:|
428
+ | `benchmarks/provider-scenario-smoke` | The first live run: FLUX.2 Dev, one and two outputs, recovery | 48 |
429
+ | `benchmarks/provider-scenario-bakeoff` | Ten models on one brief | 33 |
430
+ | `benchmarks/provider-scenario-edit` | One reference-image edit | 1 |
431
+ | `benchmarks/provider-scenario-tools` | Birefnet, Pixel Snapper, Pixelate, three upscalers, and the refine gate | 34 |
432
+ | `benchmarks/provider-scenario-pipeline` | Generate, pixelate, cut out, refine a character, with a sweep of Pixelate grid sizes | 41 |
433
+ | `benchmarks/provider-scenario-chain` | The same chain declared with `revision.fromStyle` and run by one `gen` | 8 |
434
+ | `benchmarks/provider-scenario-game-pilot` | A real game's landmarks, covers, backdrops, structures, and sound effects (settings and measurements only; the game's art is not included) | about 630 |
435
+
436
+ Scratch projects for the game pilot are not committed, so its README is the record.
437
+
255
438
  ## Plan before spending
256
439
 
257
440
  Scenario prices depend on model, size, steps, and output count, so PixelKiln
@@ -404,10 +587,13 @@ quote, final billing, selected asset ID, output index, and output hash without
404
587
  retaining credentials or signed query strings. Once cached, `restore` prefers
405
588
  the validated local content cache.
406
589
 
407
- Scenario account listing, adoption, salvage, tagging, deletion, balance, image
408
- uploads, training, background removal, and upscaling are not part of this first
409
- adapter. PixelKiln reports unavailable account commands instead of pretending
410
- they succeeded.
590
+ Scenario account listing, adoption, salvage, tagging, deletion, balance, and
591
+ training are not part of the adapter. Image uploads exist only to send
592
+ references (see [Reference images and edits](#reference-images-and-edits)), and
593
+ background removal, pixel snapping, and upscaling run as ordinary models through
594
+ `image-to-image` revisions ([Tool models](#tool-models-as-image-to-image)).
595
+ PixelKiln reports unavailable account commands instead of pretending they
596
+ succeeded.
411
597
 
412
598
  ## Mixed-provider projects
413
599
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pixelkiln",
3
- "version": "0.86.0",
3
+ "version": "0.86.2",
4
4
  "description": "Manifest-driven pixel-art generation, review, recovery, and packaging with deterministic provenance.",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -27,13 +27,32 @@ schemas remain unverified. Require a one-asset smoke before widening a batch.
27
27
  `referenceArray` for a model that names it differently. Other revision modes
28
28
  and `strength` are refused.
29
29
 
30
- Scenario model parameters vary. The MVP supplies prompt, 16–4096px dimensions
30
+ Scenario model parameters vary. The adapter supplies prompt, 16–4096px dimensions
31
31
  (each model has tighter bounds, reported by the free dry run), one to four outputs, and optional seed. Put only documented
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
 
48
+ When calling Scenario outside PixelKiln (audio, say), the free dry run is only the
49
+ query parameter `?dryRun=true`: a `dryRun: true` in the JSON body is ignored and
50
+ submits and bills a real job. LoRA models need the legacy `/generate/txt2img`
51
+ endpoint (10 CU, JPEG output, not callable by the adapter). The adapter cannot read
52
+ the CU balance; check the dashboard and budget with a margin (a hand tally ran about
53
+ 5% under the dashboard). A reference image keeps an existing design (silhouette
54
+ overlap 0.93 to 1.00 against 0.39 to 0.66 from text alone), though some models shift
55
+ its colours; use it before a text-only prompt when the look must be kept.
56
+
38
57
  See `docs/SCENARIO.md` for setup, manifest examples, unsupported account
39
58
  operations, and the live validation checklist.