pixelkiln 0.86.1 → 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
@@ -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
 
@@ -283,6 +296,39 @@ grid giving the target width, produced a convincing pixel scene with 31 colours.
283
296
  It renders legible title text, which PixelLab does not, and the text survives
284
297
  Pixelate. Before pixelating it is a painterly illustration, not pixel art.
285
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
+
286
332
  Do not use this for small native-size props. A winter pine and an autumn tree at
287
333
  32 px came back as different trees, and Birefnet left holes in the canopy. A
288
334
  free recolour of the original, or a PixelLab generation at the native size, is
@@ -338,6 +384,57 @@ and post steps beside the file.
338
384
  Music models (ACE-Step, MusicGen, ElevenLabs Music, Lyria 3.5) quoted 10 to 30
339
385
  CU; Sonilo and Lyria 3 Pro need the `cu-pro-q3-25` plan. Music was not generated.
340
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
+
341
438
  ## Plan before spending
342
439
 
343
440
  Scenario prices depend on model, size, steps, and output count, so PixelKiln
@@ -490,10 +587,13 @@ quote, final billing, selected asset ID, output index, and output hash without
490
587
  retaining credentials or signed query strings. Once cached, `restore` prefers
491
588
  the validated local content cache.
492
589
 
493
- Scenario account listing, adoption, salvage, tagging, deletion, balance, image
494
- uploads, training, background removal, and upscaling are not part of this first
495
- adapter. PixelKiln reports unavailable account commands instead of pretending
496
- 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.
497
597
 
498
598
  ## Mixed-provider projects
499
599
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pixelkiln",
3
- "version": "0.86.1",
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,7 +27,7 @@ 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.
@@ -45,5 +45,14 @@ See `docs/SCENARIO.md` for settings and measurements.
45
45
  PixelKiln validates the job, bytes, hashes, and recovery path. It does not prove
46
46
  the output is good pixel art. Inspect one result at 1× before approving a batch.
47
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
+
48
57
  See `docs/SCENARIO.md` for setup, manifest examples, unsupported account
49
58
  operations, and the live validation checklist.