pixelkiln 0.13.0 → 0.14.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 CHANGED
@@ -1,8 +1,8 @@
1
1
  # Provider comparison
2
2
 
3
- PixelKiln can route one manifest through PixelLab, Retro Diffusion, and a
4
- self-hosted ComfyUI server. Planning, review, recovery, and packaging stay the
5
- same. Each adapter handles its service's authentication, prices, request
3
+ PixelKiln can route one manifest through PixelLab, Retro Diffusion, Scenario,
4
+ and a self-hosted ComfyUI server. Planning, review, recovery, and packaging stay
5
+ the same. Each adapter handles its service's authentication, prices, request
6
6
  lifecycle, and file formats.
7
7
 
8
8
  PixelLab remains the default so existing manifests and spec hashes remain
@@ -10,8 +10,9 @@ compatible. The manifest's top-level `provider` is the default; a style may
10
10
  override it. Keep service settings under the matching `providerOptions` key.
11
11
 
12
12
  To configure a project, use [Set up PixelLab](./docs/PIXELLAB.md),
13
- [Set up Retro Diffusion](./docs/RETRO_DIFFUSION.md), or
14
- [Set up ComfyUI](./docs/COMFYUI.md). This page focuses on choosing between
13
+ [Set up Retro Diffusion](./docs/RETRO_DIFFUSION.md),
14
+ [Set up ComfyUI](./docs/COMFYUI.md), or
15
+ [Set up Scenario](./docs/SCENARIO.md). This page focuses on choosing between
15
16
  them.
16
17
 
17
18
  ## Support status
@@ -21,6 +22,7 @@ them.
21
22
  | PixelLab | Production; paid generation and account workflows live-tested | `PIXELLAB_API_KEY` | generations |
22
23
  | Retro Diffusion | Experimental; authenticated paid still generation, download, provenance, and recovery live-tested; advanced workflows pending | `RD_API_KEY` | USD |
23
24
  | ComfyUI | Experimental; local single-image generation, four-candidate queue, provenance, and cache-only recovery live-tested on Apple MPS | none; optional `COMFYUI_BASE_URL` | free |
25
+ | 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 |
24
26
  | FakeProvider | Test-only deterministic lifecycle | none | free |
25
27
 
26
28
  Live tests now cover single-candidate RD Fast and RD Plus stills from cost quote
@@ -35,6 +37,13 @@ ComfyUI's `free` unit means PixelKiln cannot identify a metered provider
35
37
  charge. It does not count hardware, hosting, electricity, or model-license
36
38
  costs.
37
39
 
40
+ Scenario planning uses the manifest's conservative `maxComputeUnits` value.
41
+ Immediately before paid work, the adapter asks Scenario for a free live quote
42
+ using the identical request. The first live smoke quoted and billed 16 CU for
43
+ one image and 32 CU for two. Human selection and a forced provider restore both
44
+ passed. The smoke is separate from the visual comparison because it uses a
45
+ different brief.
46
+
38
47
  ## PixelLab vs. Retro Diffusion
39
48
 
40
49
  This comparison describes the adapters PixelKiln ships today, not every feature
@@ -81,17 +90,38 @@ the same graph and still differ because their checkpoint bytes, custom nodes,
81
90
  or sampler settings differ. Commit the workflow and record the model stack used
82
91
  to test it.
83
92
 
93
+ ## Where Scenario fits
94
+
95
+ Scenario adds hosted third-party models and reusable project-specific models
96
+ without requiring a local GPU. PixelKiln's first adapter intentionally covers
97
+ only the part that fits its existing still-image pipeline.
98
+
99
+ | Decision | Scenario through PixelKiln |
100
+ |---|---|
101
+ | Best fit today | A controlled one-asset spike using a hosted model or project LoRA with a hard CU ceiling |
102
+ | PixelKiln generator | `map` stills |
103
+ | Output | One to four PNG candidates, 128–2048px in multiples of 16 |
104
+ | Cost model | Manifest `maxComputeUnits`, command budget, then free authoritative preflight before each paid request |
105
+ | Recovery | Durable job and asset IDs refresh temporary signed original-file URLs |
106
+ | Account lifecycle | Read-only connectivity check; no balance, list, adopt, salvage, tag, or purge yet |
107
+ | 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 |
108
+
109
+ Scenario model schemas differ. The current adapter sends prompt, width, height,
110
+ output count, optional seed, and explicitly declared JSON parameters. Verify
111
+ the chosen model accepts that shape before spending. Use
112
+ [Set up Scenario](./docs/SCENARIO.md) for the safe first-run sequence.
113
+
84
114
  ## Large environments, mountains, and buildings
85
115
 
86
116
  Start by deciding whether the result is an isolated map object or a complete
87
117
  background. That distinction matters more than raw canvas size.
88
118
 
89
- | Asset type | PixelLab | Retro Diffusion | ComfyUI |
90
- |---|---|---|---|
91
- | 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. |
92
- | Full scenic background | Use `pixflux` with `noBackground: false` when an exact palette matters, or `map` for a simple scene. Current PixelKiln routes top out at 400×400. | `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. |
93
- | 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. |
94
- | 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. |
119
+ | Asset type | PixelLab | Retro Diffusion | ComfyUI | Scenario |
120
+ |---|---|---|---|---|
121
+ | 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. |
122
+ | Full scenic background | Use `pixflux` with `noBackground: false` when an exact palette matters, or `map` for a simple scene. Current PixelKiln routes top out at 400×400. | `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. |
123
+ | 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. |
124
+ | 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. |
95
125
 
96
126
  For a production environment, build a kit: seamless terrain, separate
97
127
  landmarks and buildings, foreground occluders, and a distant backdrop. You can
@@ -116,15 +146,16 @@ repeatable.
116
146
  ## Use multiple providers in one project
117
147
 
118
148
  Set a provider on any style that differs from the manifest default. Planning
119
- and confirmations remain grouped by provider and unit, so PixelLab generations
120
- and Retro Diffusion dollars are never added together. A mixed run takes a
121
- separate named ceiling for each paid provider; the free group may be explicit:
149
+ and confirmations remain grouped by provider and unit, so PixelLab generations,
150
+ Retro Diffusion dollars, Scenario Compute Units, and local free work are never
151
+ added together. A mixed run takes a separate named ceiling for each paid
152
+ provider; the free group may be explicit:
122
153
 
123
154
  ```bash
124
155
  pixelkiln plan
125
156
  pixelkiln gen \
126
157
  --budget pixellab=12 \
127
- --budget retrodiffusion=0.20 \
158
+ --budget scenario=60 \
128
159
  --budget comfyui=0
129
160
  ```
130
161
 
@@ -169,6 +200,12 @@ style, and candidate count affect the exact still-image quote. Treat
169
200
  as the authoritative submit-time check. See Retro Diffusion's
170
201
  [official API examples and pricing formulas](https://github.com/Retro-Diffusion/api-examples#pricing).
171
202
 
203
+ Scenario uses Compute Units rather than USD in the API contract. Costs vary by
204
+ model and inputs, so the manifest records a conservative per-asset ceiling
205
+ instead of a stale formula. PixelKiln records Scenario's live dry-run quote and
206
+ final job billing separately. The first BFL Flux 2 Dev smoke measured 16 CU for
207
+ one 512px output and 32 CU for two with 28 inference steps.
208
+
172
209
  ## Capability boundary
173
210
 
174
211
  The provider boundary owns behavior that differs between services:
@@ -197,30 +234,29 @@ PixelLab, an animation style to Retro Diffusion, and a private model workflow
197
234
  to ComfyUI. Provider-keyed budgets, independent orchestration, lock-authoritative
198
235
  recovery, and explicit account-provider selection ship with it.
199
236
 
200
- Scenario remains the best next hosted provider candidate. The implementation
201
- scope and acceptance criteria are tracked in
202
- [GitHub issue #52](https://github.com/gfargo/pixelkiln/issues/52).
237
+ The Scenario still-image adapter from
238
+ [GitHub issue #52](https://github.com/gfargo/pixelkiln/issues/52) now has mocked
239
+ edge coverage and a paid BFL Flux 2 Dev lifecycle smoke. It remains
240
+ experimental until more model schemas and representative art briefs pass.
203
241
 
204
242
  | Candidate | What it adds | Fit with PixelKiln | Main cost or risk | Priority |
205
243
  |---|---|---|---|---:|
206
- | Scenario | Custom-trained style models, references, image editing, background removal, upscaling, and managed assets | Async jobs, asset IDs, and free `dryRun` cost estimates map closely to PixelKiln's plan/submit/poll/download lifecycle | API access requires a paid plan; auth uses both an API key and secret, so the provider factory must describe more than one credential | 1 |
244
+ | Scenario comparable benchmark | Custom-trained style models and hosted third-party generation | Tests the same environment briefs now that CU accounting, review, PNG output, and signed-URL recovery are proven | Model schemas differ, and the first live smoke is not directly comparable to the existing provider set | 1 |
207
245
  | ComfyUI Cloud | Managed execution of workflow graphs without running a local GPU | Could reuse part of the workflow model, but authentication, endpoints, billing, and lifecycle must remain separate from the local adapter | Treating cloud as a base-URL swap would hide real security and cost differences | 2 |
208
246
  | fal | A large hosted model catalog, including pixel-art style controls, LoRAs, editing, upscaling, and background removal | Queue-based requests and model schemas are accessible through one client | Model-specific schemas and prices move the adapter toward a marketplace abstraction rather than one stable art workflow | 3 |
209
247
 
210
- Scenario is the next hosted spike because its [custom generation API](https://docs.scenario.com/get-started/generation/third-party-model-generation)
211
- returns an asynchronous job ID, its [generation surface](https://docs.scenario.com/get-started/documentation/key-capabilities-at-a-glance)
212
- supports custom models and image references, and its
248
+ Scenario's [custom generation API](https://docs.scenario.com/get-started/generation/third-party-model-generation)
249
+ returns asynchronous jobs, while its
213
250
  [Compute Unit guidance](https://help.scenario.com/articles/7934059476-api-usage-and-credits-compute-units)
214
- documents free cost preflights. That combination adds something the current
215
- providers do not: a project-specific visual model with a cost check that can be
216
- captured before submission.
251
+ documents free cost preflights. PixelKiln now maps those mechanics into its
252
+ normal plan, submit, poll, review, fetch, and restore lifecycle.
217
253
 
218
254
  Recommended order from here:
219
255
 
220
256
  1. Finish live Retro Diffusion multi-candidate, tileset, GIF, and spritesheet
221
257
  smoke tests.
222
- 2. Build the Scenario still-image spike from issue #52 with dry-run cost, submit, poll,
223
- download, and one custom-model or reference-image benchmark.
258
+ 2. Run the shared environment briefs through Scenario, then add one custom-model
259
+ or project-LoRA benchmark.
224
260
  3. Benchmark another pinned ComfyUI model and prompt pattern across at least two
225
261
  scene families. Reject any improvement that helps only one subject.
226
262
  4. Design ComfyUI Cloud as a separate authenticated and billable adapter.
package/README.md CHANGED
@@ -2,9 +2,7 @@
2
2
 
3
3
  ![PixelKiln](https://wp.griffen.codes/wp-content/uploads/2026/08/download.png)
4
4
 
5
- [Website](https://pixelkiln.griffen.codes) ·
6
- [Documentation](https://pixelkiln.griffen.codes/docs) ·
7
- [GitHub](https://github.com/gfargo/pixelkiln)
5
+ [Website](https://pixelkiln.griffen.codes) · [Documentation](https://pixelkiln.griffen.codes/docs) · [GitHub](https://github.com/gfargo/pixelkiln)
8
6
 
9
7
  Generate pixel art from a manifest, review it locally, recover paid work, and
10
8
  package the accepted files for a game engine.
@@ -15,16 +13,17 @@ local contact sheet, and commit the source and output hashes. No LLM chooses
15
13
  what to run or which image wins. The CLI handles provider calls, polling,
16
14
  hashing, downloads, and file placement.
17
15
 
18
- PixelLab is the production backend. Retro Diffusion and self-hosted ComfyUI are
19
- experimental. The Retro Diffusion adapter has live coverage for RD Fast and RD
20
- Plus stills; its multi-candidate, tileset, GIF, and spritesheet paths are tested
21
- with fixtures but still need paid live runs. ComfyUI has passed local generation,
22
- four-candidate review, cache recovery, and native-grid refinement on Apple MPS.
23
- Its tested SDXL workflow can find a composition, but it is not a finished
24
- pixel-art preset. Styles in one manifest may use different providers with
25
- separate budget ceilings. The [provider comparison](./PROVIDERS.md) lists the tested
26
- limits and the best route for buildings and environments. `FakeProvider` covers
27
- the same contract in automated tests.
16
+ PixelLab is the production backend. Retro Diffusion, self-hosted ComfyUI, and
17
+ Scenario are experimental. The Retro Diffusion adapter has live coverage for
18
+ RD Fast and RD Plus stills; its multi-candidate, tileset, GIF, and spritesheet
19
+ paths are tested with fixtures but still need paid live runs. ComfyUI has passed
20
+ local generation, four-candidate review, cache recovery, and native-grid
21
+ refinement on Apple MPS. Its tested SDXL workflow can find a composition, but
22
+ it is not a finished pixel-art preset. Scenario has live-tested authentication,
23
+ CU preflight, single- and two-output generation, human review, and durable
24
+ restore with BFL Flux 2 Dev. It remains experimental. Styles may use different providers with separate
25
+ budget ceilings. The [provider comparison](./PROVIDERS.md) lists the tested limits
26
+ and best routes. `FakeProvider` covers the same contract in automated tests.
28
27
 
29
28
  ## Release
30
29
 
@@ -106,10 +105,11 @@ Put a hosted provider's credential in `.env.local` beside the manifest:
106
105
  ```dotenv
107
106
  # PixelLab (the default provider)
108
107
  PIXELLAB_API_KEY=...
109
-
110
108
  # Or Retro Diffusion when `provider` is `retrodiffusion`
111
109
  RD_API_KEY=...
112
-
110
+ # Scenario needs both values when `provider` is `scenario`
111
+ SCENARIO_SDK_API_KEY=...
112
+ SCENARIO_SDK_API_SECRET=...
113
113
  # Self-hosted ComfyUI needs no key; override its local URL only when needed
114
114
  COMFYUI_BASE_URL=http://127.0.0.1:8188
115
115
  ```
@@ -137,8 +137,9 @@ pixelkiln plan
137
137
 
138
138
  See [Getting started](./docs/GETTING_STARTED.md) for new and existing projects.
139
139
  Use [Set up PixelLab](./docs/PIXELLAB.md),
140
- [Set up Retro Diffusion](./docs/RETRO_DIFFUSION.md), or
141
- [Set up ComfyUI](./docs/COMFYUI.md) for provider-specific configuration,
140
+ [Set up Retro Diffusion](./docs/RETRO_DIFFUSION.md),
141
+ [Set up ComfyUI](./docs/COMFYUI.md), or
142
+ [Set up Scenario](./docs/SCENARIO.md) for provider-specific configuration,
142
143
  manifest examples, and current limits. See [Mixed-provider projects](./docs/MIXED_PROVIDERS.md)
143
144
  when styles in one manifest need different backends.
144
145
 
@@ -186,8 +187,9 @@ set. Generator choice, reference-image bytes, dimensions, palette, seed, and
186
187
  prompt settings participate in deterministic spec identity. A manifest may
187
188
  select another provider and pass namespaced `providerOptions`; see
188
189
  [Set up PixelLab](./docs/PIXELLAB.md),
189
- [Set up Retro Diffusion](./docs/RETRO_DIFFUSION.md), and
190
- [Set up ComfyUI](./docs/COMFYUI.md). The
190
+ [Set up Retro Diffusion](./docs/RETRO_DIFFUSION.md),
191
+ [Set up ComfyUI](./docs/COMFYUI.md), and
192
+ [Set up Scenario](./docs/SCENARIO.md). The
191
193
  [provider comparison](./PROVIDERS.md) covers costs,
192
194
  current confidence, and limitations. The committed ComfyUI projects now include
193
195
  transparent cutouts, palette-controlled backgrounds, wide environment canvases,
@@ -255,18 +257,17 @@ replace a hard palette or reference-image constraint. See
255
257
  Generator names describe PixelKiln workflows; their exact capabilities and
256
258
  prices depend on the selected provider. Retro Diffusion also supports the
257
259
  provider-specific `animation` generator. ComfyUI currently supports `map`
258
- through an operator-supplied workflow. Compare the adapters in the
259
- [provider comparison](./PROVIDERS.md).
260
+ through an operator-supplied workflow. Scenario currently supports `map`
261
+ with a required offline CU ceiling and a live quote before each paid call.
262
+ Compare the adapters in the [provider comparison](./PROVIDERS.md).
260
263
 
261
264
  ## Derived artifacts
262
265
 
263
266
  ```bash
264
267
  # Deterministic sheet + atlas + provenance.
265
268
  pixelkiln pack --style base
266
-
267
269
  # Stable declared cells in an existing sheet.
268
270
  pixelkiln mount --style ground
269
-
270
271
  # Structural atlas + engine metadata + provenance.
271
272
  pixelkiln export --style ground --only terrain --format tiled
272
273
  ```
@@ -339,11 +340,9 @@ import {
339
340
  loadManifest,
340
341
  resolveSpecs,
341
342
  } from "pixelkiln"
342
-
343
343
  const loaded = await loadManifest("pixelkiln.manifest.json")
344
344
  const specs = await resolveSpecs(loaded)
345
345
  const plan = await buildPlan(specs, await loadLock("pixelkiln.lock.json"))
346
-
347
346
  console.log(plan.groups, plan.actionable.length)
348
347
  ```
349
348
 
@@ -361,6 +360,7 @@ exporters, managed artifact writes, and offline provenance verification. See
361
360
  | [Set up PixelLab](./docs/PIXELLAB.md) | Production-provider credentials, manifest, generators, and account workflows. |
362
361
  | [Set up Retro Diffusion](./docs/RETRO_DIFFUSION.md) | Experimental-provider credentials, styles, formats, cost checks, and limits. |
363
362
  | [Set up ComfyUI](./docs/COMFYUI.md) | Experimental self-hosted server, workflow bindings, local cost semantics, and limits. |
363
+ | [Set up Scenario](./docs/SCENARIO.md) | Experimental hosted models, two-part credentials, CU preflight, review, and durable downloads. |
364
364
  | [Versioned recipes](./docs/RECIPES.md) | Pinned workflow packs, model hashes, manifest templates, and quality contracts. |
365
365
  | [CLI reference](./docs/CLI.md) | Every command, flag, JSON mode, and exit contract. |
366
366
  | [Manifest reference](./docs/MANIFEST.md) | Every style/asset field and generator constraint. |
package/SECURITY.md CHANGED
@@ -34,7 +34,8 @@ credentials in their query string. Reports involving authentication leakage, pat
34
34
  cross-origin review actions, HTML/script injection, unsafe overwrite/delete
35
35
  behavior, lockfile corruption, or budget bypass are security relevant.
36
36
 
37
- Never attach a real `PIXELLAB_API_KEY`, `RD_API_KEY`, `.env` file, private
37
+ Never attach a real `PIXELLAB_API_KEY`, `RD_API_KEY`, `SCENARIO_SDK_API_KEY`,
38
+ `SCENARIO_SDK_API_SECRET`, `.env` file, private
38
39
  provider URL, or unredacted lockfile from a confidential project to a public
39
40
  report.
40
41