pixelkiln 0.85.0 → 0.86.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/dist/cli.js +66 -7
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +66 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +82 -4
- package/dist/index.d.ts +82 -4
- package/dist/index.js +66 -7
- package/dist/index.js.map +1 -1
- package/docs/MANIFEST.md +2 -1
- package/docs/REVISIONS.md +39 -9
- package/docs/SCENARIO.md +30 -1
- package/package.json +1 -1
- package/schema/manifest.schema.json +4 -0
- package/skills/pixelkiln/references/revisions.md +4 -2
package/docs/MANIFEST.md
CHANGED
|
@@ -472,7 +472,8 @@ their own page: [Characters](./CHARACTERS.md) and
|
|
|
472
472
|
| Revision field | Type | Meaning |
|
|
473
473
|
|---|---|---|
|
|
474
474
|
| `mode` | enum, required | `image-to-image`, `inpaint`, `outpaint`, `reduce-colors`, `correct-pixelart`, `remove-background`, `animate`, `animate-pixminimax`, `animate-skeleton`, `interpolate`, or `edit-animation`. The selected provider must opt into the mode. |
|
|
475
|
-
| `from` | asset id, required | Parent asset in
|
|
475
|
+
| `from` | asset id, required | Parent asset, in this asset's style unless `fromStyle` names another. Self-references, unknown ids, and cycles are rejected. A parent written as a set (a character's directions, an animation's frames) is read as every member: `reduce-colors`, `correct-pixelart`, and `edit-animation` take the whole set in one call; the other modes refuse it. See [Revising a whole set at once](./REVISIONS.md#revising-a-whole-set-at-once). |
|
|
476
|
+
| `fromStyle` | style id | The style the parent lives in, when it is not this asset's own. The parent must be an asset in that style, and styles may depend on one another but not in a cycle. See [Across styles](./REVISIONS.md#across-styles). |
|
|
476
477
|
| `mask` | string | Manifest-relative PNG required for `inpaint`; rejected for the other modes. Its dimensions must match an available source. |
|
|
477
478
|
| `strength` | number 0–1 | Workflow edit/denoise strength (`image-to-image`, `correct-pixelart`); rejected for `reduce-colors`, `remove-background`, `animate`, `animate-pixminimax`, `interpolate`, and `edit-animation`. Interpretation is provider- and model-specific. |
|
|
478
479
|
| `numColors` | integer 2–256 | `reduce-colors` only. Target palette size; mutually exclusive with `paletteImage`. |
|
package/docs/REVISIONS.md
CHANGED
|
@@ -43,15 +43,10 @@ Keep the parent as its own asset and point the child at its stable asset id:
|
|
|
43
43
|
}
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
`from` names another asset in the
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
Revision edges do not cross styles or providers in this version. To use output
|
|
51
|
-
from another provider, commit or retain that PNG and declare it as a separate
|
|
52
|
-
`source` asset in the ComfyUI revision style. The child still records the exact
|
|
53
|
-
source hash, but the cross-provider handoff is a file boundary rather than one
|
|
54
|
-
automatic lock dependency.
|
|
46
|
+
`from` names another asset. It lives in the child's own style unless
|
|
47
|
+
`fromStyle` names another (see [Across styles](#across-styles)). A source and its
|
|
48
|
+
revision cannot be the same asset, and revision chains cannot contain a cycle.
|
|
49
|
+
`source` and `revision` are mutually exclusive on one asset.
|
|
55
50
|
|
|
56
51
|
Start with a low strength. Values around `0.2`–`0.4` give the workflow room to
|
|
57
52
|
change texture and lighting while retaining more of the source. Higher values
|
|
@@ -104,6 +99,41 @@ poses" opens the same editor on its keypoints file. Saving rewrites the file
|
|
|
104
99
|
only if it still holds what the page loaded (an edit made elsewhere since is
|
|
105
100
|
refused, not overwritten), and the animation is stale until generated again.
|
|
106
101
|
|
|
102
|
+
### Across styles
|
|
103
|
+
|
|
104
|
+
A style has one provider and one model, so a chain that generates with one model
|
|
105
|
+
and cleans up with another spans styles. Name the parent's style:
|
|
106
|
+
|
|
107
|
+
```jsonc
|
|
108
|
+
{
|
|
109
|
+
"styles": {
|
|
110
|
+
"gen": { "generator": "map", "outDir": "art/gen", "providerOptions": { "scenario": { "modelId": "model_bfl-flux-2-klein-9b", "maxComputeUnits": 1 } } },
|
|
111
|
+
"pixelate": { "generator": "map", "outDir": "art/pixelate", "providerOptions": { "scenario": { "modelId": "model_sc-pixelate", "maxComputeUnits": 5, "referenceParameter": "image", "referenceArray": false } } }
|
|
112
|
+
},
|
|
113
|
+
"assets": {
|
|
114
|
+
"knight": { "prompt": "a knight, isolated on white", "styles": ["gen"] },
|
|
115
|
+
"knight-px": {
|
|
116
|
+
"prompt": "pixelate",
|
|
117
|
+
"styles": ["pixelate"],
|
|
118
|
+
"revision": { "mode": "image-to-image", "from": "knight", "fromStyle": "gen" }
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
The child starts from the parent's output file, however that style produced it
|
|
125
|
+
(any provider, or a placed `source`), and the dependency gate is unchanged: the
|
|
126
|
+
child is `blocked` until the parent is downloaded, current, and untouched, and
|
|
127
|
+
`gen` takes the whole chain to the end in one run, one wave per link. The parent
|
|
128
|
+
must be an asset in the named style. Styles may depend on one another but not
|
|
129
|
+
in a cycle, and `fromStyle` naming the asset's own style is the ordinary case.
|
|
130
|
+
`--style` still selects which specs a run returns; a parent style it excludes is
|
|
131
|
+
resolved, not generated.
|
|
132
|
+
|
|
133
|
+
A `quality` profile gates the style it is on. Put it on the last style of a
|
|
134
|
+
chain, whose parents are in other styles, and only that style's output is gated.
|
|
135
|
+
A profile on a style that also holds the raw parent would block the child.
|
|
136
|
+
|
|
107
137
|
## Inpainting
|
|
108
138
|
|
|
109
139
|
An inpaint revision also declares a manifest-relative mask:
|
package/docs/SCENARIO.md
CHANGED
|
@@ -186,7 +186,13 @@ quoted and billed identically; see the
|
|
|
186
186
|
[tool-model smoke](../benchmarks/provider-scenario-tools/README.md)). Pixel
|
|
187
187
|
Snapper returned an 83×83, exactly-16-colour native-grid version of a 512×512
|
|
188
188
|
image, a different size than the manifest's canvas, and Birefnet's cutout kept
|
|
189
|
-
its subject at alpha 254 rather than 255.
|
|
189
|
+
its subject at alpha 254 rather than 255. Pixelate (5 CU) was run too and returned a 23-colour, crisp pixel version at the
|
|
190
|
+
source's size; of the upscalers, Topaz smoothed the art, Upscale V3 repainted it
|
|
191
|
+
as a photoreal castle, and Recraft Crisp returned WebP, which the adapter refuses,
|
|
192
|
+
so none of them suits pixel art. Pixelate's output also passed `pixelkiln refine`'s
|
|
193
|
+
high-confidence grid gate as a 102×102, 23-colour asset, where the raw image
|
|
194
|
+
(low confidence) and Pixel Snapper's output (medium) did not: GPT Image 2,
|
|
195
|
+
then Pixelate, then free refinement made one gate-passing asset for 16 CU. They overlap PixelKiln's own offline work: `pixelkiln refine` snaps
|
|
190
196
|
the grid and palette for free, and PixelLab's `remove-background` revision costs
|
|
191
197
|
one generation. Reach for these when the art is already on Scenario.
|
|
192
198
|
|
|
@@ -223,6 +229,29 @@ upgrading should be one `model_retrodiffusion-plus` still at 64×64 with the
|
|
|
223
229
|
default style: quote, billed amount, dimensions, and whether it comes back as
|
|
224
230
|
PNG.
|
|
225
231
|
|
|
232
|
+
### Chaining models and tools
|
|
233
|
+
|
|
234
|
+
The [pipeline run](../benchmarks/provider-scenario-pipeline/README.md)
|
|
235
|
+
generated a character, pixelated it to a palette, cut out its background, and
|
|
236
|
+
refined it, for 8 CU on the cheapest path and 18 CU with GPT Image 2, ending in
|
|
237
|
+
a 64×64 transparent sprite that passed the `refine` gate. Three rules came out
|
|
238
|
+
of it:
|
|
239
|
+
|
|
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.
|
|
244
|
+
- 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`.
|
|
247
|
+
- 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).
|
|
251
|
+
|
|
252
|
+
A palette that is too small for the art costs fidelity (a bright blue cape
|
|
253
|
+
became navy under a 32-colour palette), so passing the gate is not approval.
|
|
254
|
+
|
|
226
255
|
## Plan before spending
|
|
227
256
|
|
|
228
257
|
Scenario prices depend on model, size, steps, and output count, so PixelKiln
|
package/package.json
CHANGED
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Read this reference when an asset declares `revision`.
|
|
4
4
|
|
|
5
|
-
- Treat the parent and child as separate assets. `revision.from`
|
|
6
|
-
parent in the
|
|
5
|
+
- Treat the parent and child as separate assets. `revision.from` names the
|
|
6
|
+
parent, in the child's own style unless `revision.fromStyle` names another, so
|
|
7
|
+
a chain can generate with one provider and refine with another. A `quality`
|
|
8
|
+
profile gates its own style; put it on the last style of a chain.
|
|
7
9
|
- Run `pixelkiln plan --only <child>` first. If it reports `blocked`, do not try
|
|
8
10
|
to submit the child or work around the gate.
|
|
9
11
|
- A generated parent must be current and downloaded. When the parent has a
|