pixelkiln 0.12.1 → 0.13.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,13 +1,13 @@
1
1
  # Provider comparison
2
2
 
3
- PixelKiln can run one manifest through PixelLab, Retro Diffusion, or a
4
- self-hosted ComfyUI server. Planning, budgets, review, recovery, and packaging
5
- stay the same. Each adapter handles its service's authentication, prices,
6
- request lifecycle, and file formats.
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
6
+ lifecycle, and file formats.
7
7
 
8
8
  PixelLab remains the default so existing manifests and spec hashes remain
9
- compatible. Select another backend with the manifest's top-level `provider`
10
- field and keep its settings under the matching `providerOptions` key.
9
+ compatible. The manifest's top-level `provider` is the default; a style may
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
13
  [Set up Retro Diffusion](./docs/RETRO_DIFFUSION.md), or
@@ -115,58 +115,36 @@ repeatable.
115
115
 
116
116
  ## Use multiple providers in one project
117
117
 
118
- One manifest selects one provider. PixelKiln does not currently support a
119
- provider override on an individual style or asset. The boundary is deliberate:
120
- one command constructs one account adapter, and one `--budget` must have one
121
- meaning. PixelLab generations and Retro Diffusion dollars cannot share a safe
122
- ceiling.
123
-
124
- A repository can still use multiple providers today. Give each provider its own
125
- manifest, lockfile, and output directory:
126
-
127
- ```text
128
- art/
129
- pixelkiln.pixellab.manifest.json
130
- pixelkiln.pixellab.lock.json
131
- pixelkiln.retrodiffusion.manifest.json
132
- pixelkiln.retrodiffusion.lock.json
133
- pixelkiln.comfyui.manifest.json
134
- pixelkiln.comfyui.lock.json
135
- pixelkiln.workspace.json
136
- ```
137
-
138
- Plan and authorize each manifest separately:
118
+ 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:
139
122
 
140
123
  ```bash
141
- pixelkiln plan --manifest art/pixelkiln.pixellab.manifest.json --lock art/pixelkiln.pixellab.lock.json
142
- pixelkiln gen --manifest art/pixelkiln.pixellab.manifest.json --lock art/pixelkiln.pixellab.lock.json --budget <generations>
124
+ pixelkiln plan
125
+ pixelkiln gen \
126
+ --budget pixellab=12 \
127
+ --budget retrodiffusion=0.20 \
128
+ --budget comfyui=0
129
+ ```
143
130
 
144
- pixelkiln plan --manifest art/pixelkiln.retrodiffusion.manifest.json --lock art/pixelkiln.retrodiffusion.lock.json
145
- pixelkiln gen --manifest art/pixelkiln.retrodiffusion.manifest.json --lock art/pixelkiln.retrodiffusion.lock.json --budget <usd>
131
+ The same lockfile records which provider accepted each item. Resumed polling,
132
+ review, download, restore, and tagging follow that recorded provider. Account
133
+ operations such as `balance`, `adopt`, `salvage`, and `purge` require an
134
+ explicit `--provider` in a mixed manifest.
146
135
 
147
- pixelkiln plan --manifest art/pixelkiln.comfyui.manifest.json --lock art/pixelkiln.comfyui.lock.json
148
- pixelkiln gen --manifest art/pixelkiln.comfyui.manifest.json --lock art/pixelkiln.comfyui.lock.json --budget 0
149
- ```
136
+ This works well when PixelLab handles prompt-sensitive buildings and account
137
+ recovery, Retro Diffusion handles environment-styled backdrops, clean cutouts,
138
+ or native animation, and ComfyUI handles private or project-specific model
139
+ experiments that can absorb manual cleanup. Retro Diffusion is not a
140
+ higher-resolution route through PixelKiln today: its useful environment styles
141
+ cap at 384×384, while PixelLab `map` reaches 400×400. Its advantage is the
142
+ model/style and output type, not raw dimensions.
150
143
 
151
- Register the manifests in the workspace catalog for aggregate status and
152
- complete claim checks. Keep the provider lockfiles separate. Package their
153
- reviewed outputs independently, or combine explicit files with `pixelkiln pack
154
- --inputs <file> --out <path>`.
155
-
156
- This split works when PixelLab handles prompt-sensitive buildings and
157
- account recovery, Retro Diffusion handles environment-styled backdrops, clean
158
- cutouts, or native animation, and ComfyUI handles private or project-specific
159
- model experiments that can absorb manual cleanup. Retro Diffusion is not a higher-resolution
160
- route through PixelKiln today: its useful environment styles cap at 384×384,
161
- while PixelLab `map` reaches 400×400. Its advantage is the model/style and
162
- output type, not raw dimensions.
163
-
164
- Native mixed-provider support inside one manifest would be a larger feature,
165
- not a schema-only change. It needs provider selection on each style, plans and
166
- confirmations grouped by provider and cost unit, separate budget ceilings,
167
- per-provider polling and downloads, and an explicit provider for account-wide
168
- commands. The lockfile already records a provider on every entry, so the state
169
- format can support that direction without merging provider identities.
144
+ See [Mixed-provider projects](./docs/MIXED_PROVIDERS.md) for the manifest,
145
+ budget, recovery, and account-command contract. Separate manifests remain a
146
+ good boundary when different teams, credentials, or release schedules should
147
+ not share one runtime.
170
148
 
171
149
  ## Cost comparison
172
150
 
@@ -201,8 +179,8 @@ The provider boundary owns behavior that differs between services:
201
179
  - downloads and optional account capabilities such as balance, listing,
202
180
  tagging, and deletion.
203
181
 
204
- Planning groups costs by unit instead of adding incompatible values. A budget
205
- is interpreted in the active provider's unit. Providers without a balance or
182
+ Planning groups costs by provider and unit instead of adding incompatible
183
+ values. Mixed runs use provider-keyed ceilings. Providers without a balance or
206
184
  account-management endpoint can still generate safely because the offline
207
185
  estimate and hard budget remain enforced.
208
186
 
@@ -214,12 +192,10 @@ and the approval record work. The tested SDXL plus Pixel Art XL graph can find
214
192
  a composition, but it is not a production preset. Background removal stays in
215
193
  the graph. A person must still check the brief, pixel clusters, and drawing.
216
194
 
217
- Native per-style provider routing remains the highest-value orchestration
218
- feature. One manifest should be able to send a building style to PixelLab, an
219
- animation style to Retro Diffusion, and a private model workflow to ComfyUI.
220
- That requires provider-keyed budgets and confirmations, independently
221
- rate-limited adapters, and an explicit provider for account-wide commands. The
222
- lockfile already records the provider on each entry.
195
+ Per-style provider routing now lets one manifest send a building style to
196
+ PixelLab, an animation style to Retro Diffusion, and a private model workflow
197
+ to ComfyUI. Provider-keyed budgets, independent orchestration, lock-authoritative
198
+ recovery, and explicit account-provider selection ship with it.
223
199
 
224
200
  Scenario remains the best next hosted provider candidate. The implementation
225
201
  scope and acceptance criteria are tracked in
@@ -241,16 +217,14 @@ captured before submission.
241
217
 
242
218
  Recommended order from here:
243
219
 
244
- 1. Benchmark pinned ComfyUI models and prompt patterns across at least two scene
245
- families. Reject any supposed improvement that helps only one subject.
246
- 2. Add per-style provider selection, provider-keyed budgets, and mixed-provider
247
- integration tests.
248
- 3. Finish live Retro Diffusion multi-candidate, tileset, GIF, and spritesheet
220
+ 1. Finish live Retro Diffusion multi-candidate, tileset, GIF, and spritesheet
249
221
  smoke tests.
250
- 4. Build the Scenario still-image spike from issue #52 with dry-run cost, submit, poll,
222
+ 2. Build the Scenario still-image spike from issue #52 with dry-run cost, submit, poll,
251
223
  download, and one custom-model or reference-image benchmark.
252
- 5. Design ComfyUI Cloud as a separate authenticated and billable adapter.
253
- 6. Consider general raster marketplaces only with explicit nearest-neighbor,
224
+ 3. Benchmark another pinned ComfyUI model and prompt pattern across at least two
225
+ scene families. Reject any improvement that helps only one subject.
226
+ 4. Design ComfyUI Cloud as a separate authenticated and billable adapter.
227
+ 5. Consider general raster marketplaces only with explicit nearest-neighbor,
254
228
  palette, transparency, and reproducibility checks.
255
229
 
256
230
  Midjourney is not an adapter target without an official public API. Automating
package/README.md CHANGED
@@ -21,7 +21,8 @@ Plus stills; its multi-candidate, tileset, GIF, and spritesheet paths are tested
21
21
  with fixtures but still need paid live runs. ComfyUI has passed local generation,
22
22
  four-candidate review, cache recovery, and native-grid refinement on Apple MPS.
23
23
  Its tested SDXL workflow can find a composition, but it is not a finished
24
- pixel-art preset. The [provider comparison](./PROVIDERS.md) lists the tested
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
25
26
  limits and the best route for buildings and environments. `FakeProvider` covers
26
27
  the same contract in automated tests.
27
28
 
@@ -54,7 +55,7 @@ PixelKiln keeps the missing record:
54
55
 
55
56
  | Workflow | What PixelKiln provides |
56
57
  |---|---|
57
- | Plan and budget | Offline manifest/lock/disk diff, provider-unit estimates, hard `--budget` ceiling, JSON/CI gate. |
58
+ | Plan and budget | Offline manifest/lock/disk diff, provider-grouped estimates, keyed mixed-provider budget ceilings, JSON/CI gate. |
58
59
  | Generate and review | Resumable submit/poll/pick/fetch pipeline with a fast local candidate sheet. |
59
60
  | Existing-art onboarding | Manifest scaffolding, exact-hash account adoption, and prompt recovery. |
60
61
  | Recovery | Validated local content cache, durable provider-reference restore, account object-hash cache, and resumable jobs. |
@@ -138,7 +139,8 @@ See [Getting started](./docs/GETTING_STARTED.md) for new and existing projects.
138
139
  Use [Set up PixelLab](./docs/PIXELLAB.md),
139
140
  [Set up Retro Diffusion](./docs/RETRO_DIFFUSION.md), or
140
141
  [Set up ComfyUI](./docs/COMFYUI.md) for provider-specific configuration,
141
- manifest examples, and current limits.
142
+ manifest examples, and current limits. See [Mixed-provider projects](./docs/MIXED_PROVIDERS.md)
143
+ when styles in one manifest need different backends.
142
144
 
143
145
  ## Agent skill
144
146
 
@@ -335,16 +337,14 @@ import {
335
337
  buildPlan,
336
338
  loadLock,
337
339
  loadManifest,
338
- PixelLabProvider,
339
340
  resolveSpecs,
340
341
  } from "pixelkiln"
341
342
 
342
343
  const loaded = await loadManifest("pixelkiln.manifest.json")
343
- const provider = PixelLabProvider.forOffline()
344
- const specs = await resolveSpecs(loaded, { provider })
344
+ const specs = await resolveSpecs(loaded)
345
345
  const plan = await buildPlan(specs, await loadLock("pixelkiln.lock.json"))
346
346
 
347
- console.log(plan.cost, plan.costUnit, plan.actionable.length)
347
+ console.log(plan.groups, plan.actionable.length)
348
348
  ```
349
349
 
350
350
  The package also exports audit and image-regression gates, provider-neutral refinement, lock/output
@@ -364,6 +364,7 @@ exporters, managed artifact writes, and offline provenance verification. See
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. |
367
+ | [Mixed-provider projects](./docs/MIXED_PROVIDERS.md) | Per-style routing, provider-keyed budgets, recovery, and account commands. |
367
368
  | [Agent workflows](./docs/AGENTS.md) | Official skill install, operating model, and provider-aware safety. |
368
369
  | [Generators](./docs/GENERATORS.md) | Capability choice, measured costs, palettes, style references, and tiles. |
369
370
  | [Environment provider benchmark](./docs/PROVIDER_BENCHMARK.md) | Thirty provider outputs plus native-grid and final-palette results comparing large scenes, transparency, palette size, and file readiness. |
package/dist/cli.d.ts CHANGED
@@ -12,6 +12,8 @@ interface Args {
12
12
  force: boolean;
13
13
  yes: boolean;
14
14
  budget?: number;
15
+ /** Repeatable provider-keyed budgets used by a mixed-provider run. */
16
+ providerBudgets: Record<string, number>;
15
17
  dryRun: boolean;
16
18
  all: boolean;
17
19
  json: boolean;
@@ -50,7 +52,7 @@ interface Args {
50
52
  workspace?: string;
51
53
  /** Positional target for recipe and workspace subcommands. */
52
54
  target?: string;
53
- /** `workspace add`: provider id to register the project under. Defaults to "pixellab". */
55
+ /** Account provider selector; also the `workspace add` catalog provider hint. */
54
56
  provider?: string;
55
57
  /** `workspace add`: free-form account label, e.g. distinguishing sandboxes. */
56
58
  account?: string;