pixelkiln 0.92.2 → 0.92.3
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 +2 -2
- package/dist/cli.js +48 -24
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +52 -24
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +52 -26
- package/dist/index.d.ts +52 -26
- package/dist/index.js +50 -24
- package/dist/index.js.map +1 -1
- package/docs/ENDPOINTS.md +39 -37
- package/docs/GENERATORS.md +36 -27
- package/docs/PIXELLAB.md +2 -2
- package/docs/REVISIONS.md +31 -27
- package/package.json +1 -1
- package/skills/pixelkiln/references/pixellab-fidelity.md +2 -1
- package/skills/pixelkiln/references/pixellab-roadmap.md +31 -23
- package/skills/pixelkiln/references/pixellab.md +19 -16
package/dist/index.cjs
CHANGED
|
@@ -264,6 +264,7 @@ __export(index_exports, {
|
|
|
264
264
|
parseVfxStep: () => parseVfxStep,
|
|
265
265
|
parseWorkspace: () => parseWorkspace,
|
|
266
266
|
pickHistory: () => pickHistory,
|
|
267
|
+
pixMiniMaxCost: () => pixMiniMaxCost,
|
|
267
268
|
pixelateFile: () => pixelateFile,
|
|
268
269
|
pngSize: () => pngSize,
|
|
269
270
|
poll: () => poll,
|
|
@@ -355,6 +356,7 @@ __export(index_exports, {
|
|
|
355
356
|
tilesCost: () => tilesCost,
|
|
356
357
|
toPortablePath: () => toPortablePath,
|
|
357
358
|
totalSpend: () => totalSpend,
|
|
359
|
+
uiElementCandidateCount: () => uiElementCandidateCount,
|
|
358
360
|
unzoomFile: () => unzoomFile,
|
|
359
361
|
upsert: () => upsert,
|
|
360
362
|
validateCostEstimate: () => validateCostEstimate,
|
|
@@ -431,6 +433,17 @@ function candidateCount(size) {
|
|
|
431
433
|
if (size <= 170) return 4;
|
|
432
434
|
return 1;
|
|
433
435
|
}
|
|
436
|
+
function uiElementCandidateCount(size) {
|
|
437
|
+
if (size <= 32) return 64;
|
|
438
|
+
if (size <= 35) return 49;
|
|
439
|
+
if (size <= 41) return 36;
|
|
440
|
+
if (size <= 50) return 25;
|
|
441
|
+
if (size <= 64) return 16;
|
|
442
|
+
if (size <= 84) return 9;
|
|
443
|
+
if (size === 85) return 16;
|
|
444
|
+
if (size <= 170) return 4;
|
|
445
|
+
return 1;
|
|
446
|
+
}
|
|
434
447
|
function generationCost(width, height, generator = "map") {
|
|
435
448
|
if (generator === "vfx") return 0;
|
|
436
449
|
if (generator === "map" || generator === "pixflux") return 1;
|
|
@@ -447,6 +460,16 @@ function proTierCost(width, height) {
|
|
|
447
460
|
if (px <= 102400) return PRO_TIER_PRICES[1];
|
|
448
461
|
return PRO_TIER_PRICES[2];
|
|
449
462
|
}
|
|
463
|
+
function pixMiniMaxCost(width, height, frames, enhancePrompt = false) {
|
|
464
|
+
const f = width * height * Math.max(1, frames) / 4096;
|
|
465
|
+
let units;
|
|
466
|
+
if (f <= 8) units = 1;
|
|
467
|
+
else if (f <= 16) units = 1 + (f - 8) / 8;
|
|
468
|
+
else if (f <= 40) units = 2 + (f - 16) / 6;
|
|
469
|
+
else units = 6 + (f - 40) / 6;
|
|
470
|
+
const base = Math.max(1, Math.ceil(units - 1e-9));
|
|
471
|
+
return enhancePrompt ? base + 0.05 : base;
|
|
472
|
+
}
|
|
450
473
|
function tilesCost(tileSize, variations) {
|
|
451
474
|
const px = tileSize * tileSize * Math.max(1, variations);
|
|
452
475
|
if (px <= 1024) return PRO_TIER_PRICES[0];
|
|
@@ -3266,10 +3289,10 @@ var PixelLabClient = class {
|
|
|
3266
3289
|
* limited to 400x400 and no style reference. Like a revision, this hands
|
|
3267
3290
|
* back a plain background job with no resource of its own; unlike a
|
|
3268
3291
|
* revision, one call returns several candidate images to pick from (the
|
|
3269
|
-
* same 4/16/64-by-size tiering as `1dir`), not a single result
|
|
3270
|
-
*
|
|
3271
|
-
* pixellab.ts fails loudly rather than guess if `last_response.images`
|
|
3272
|
-
*
|
|
3292
|
+
* same 4/16/64-by-size tiering as `1dir`), not a single result. It has run
|
|
3293
|
+
* live (a 64x64 call billed 10, October 2026); `pollImagePro` in
|
|
3294
|
+
* pixellab.ts still fails loudly rather than guess if `last_response.images`
|
|
3295
|
+
* is not the field name.
|
|
3273
3296
|
*
|
|
3274
3297
|
* Reference images and a style image (`reference_images`, `style_image` +
|
|
3275
3298
|
* `style_options`) exist on this endpoint but are not modeled here yet.
|
|
@@ -3380,7 +3403,8 @@ var PixelLabClient = class {
|
|
|
3380
3403
|
* guided by an optional concept image and a natural-language color
|
|
3381
3404
|
* palette. A plain background job; unlike `/create-ui-asset` there is no
|
|
3382
3405
|
* piece/element layout, and sizes start at 16px instead of 192. Its
|
|
3383
|
-
* completed shape
|
|
3406
|
+
* completed shape came back as a list of candidates on a live
|
|
3407
|
+
* 32x32 call (64 of them, billed 10); `pollUiElement` still reads it
|
|
3384
3408
|
* defensively.
|
|
3385
3409
|
*/
|
|
3386
3410
|
async generateUiV2(args) {
|
|
@@ -3626,11 +3650,10 @@ var PixelLabClient = class {
|
|
|
3626
3650
|
* no PixelLab character/object resource required — unlike `animateCharacter`
|
|
3627
3651
|
* / `animateObject`, `firstFrame` is whatever bytes the caller has on hand.
|
|
3628
3652
|
* A plain background job, like every other PixelLab async submission;
|
|
3629
|
-
*
|
|
3630
|
-
*
|
|
3631
|
-
*
|
|
3632
|
-
*
|
|
3633
|
-
* defensively, the same as `pollRevision` already does for image edits).
|
|
3653
|
+
* like `inpaintV3`/`editImagesV2`, it has run live (November 2026, a
|
|
3654
|
+
* 64x64 call of 4 frames billed 1 and returned 5 frames); `pollAnimateRevision`
|
|
3655
|
+
* in pixellab.ts still checks several plausible field names for the frame
|
|
3656
|
+
* list defensively, the same as `pollRevision` does for image edits.
|
|
3634
3657
|
*/
|
|
3635
3658
|
async animateWithTextV3(args) {
|
|
3636
3659
|
const body = { first_frame: args.firstFrame, action: args.action };
|
|
@@ -3714,8 +3737,8 @@ var PixelLabClient = class {
|
|
|
3714
3737
|
* `runEstimateSkeleton` in `src/cli/commands`) so the only PixelLab
|
|
3715
3738
|
* endpoint composed into `animate-with-skeleton-v3`'s submission is that
|
|
3716
3739
|
* one endpoint itself, not two unverified calls chained together.
|
|
3717
|
-
* Synchronous
|
|
3718
|
-
*
|
|
3740
|
+
* Synchronous, and it has run live (October 2026; see
|
|
3741
|
+
* `EstimateSkeletonResponseSchema`).
|
|
3719
3742
|
*/
|
|
3720
3743
|
async estimateSkeleton(args) {
|
|
3721
3744
|
const body = { image: { type: "base64", base64: args.image.base64, format: args.image.format } };
|
|
@@ -5627,12 +5650,15 @@ var PixelLabProvider = class _PixelLabProvider {
|
|
|
5627
5650
|
const width = spec.revision.sourceWidth ?? spec.width;
|
|
5628
5651
|
const height = spec.revision.sourceHeight ?? spec.height;
|
|
5629
5652
|
const side = spec.revision.mode === "edit-animation" ? Math.ceil(Math.sqrt(Math.max(1, spec.revision.sourceMembers?.length ?? 1))) : 1;
|
|
5630
|
-
return { unit: "generations", amount:
|
|
5653
|
+
return { unit: "generations", amount: proTierCost(width * side, height * side), candidates: 1 };
|
|
5631
5654
|
}
|
|
5632
5655
|
if (spec.revision?.mode === "animate" || spec.revision?.mode === "animate-pixminimax") {
|
|
5633
5656
|
const width = spec.revision.sourceWidth ?? spec.width;
|
|
5634
5657
|
const height = spec.revision.sourceHeight ?? spec.height;
|
|
5635
5658
|
const frames = spec.revision.frames ?? 8;
|
|
5659
|
+
if (spec.revision.mode === "animate-pixminimax") {
|
|
5660
|
+
return { unit: "generations", amount: pixMiniMaxCost(width, height, frames, spec.revision.enhancePrompt), candidates: 1 };
|
|
5661
|
+
}
|
|
5636
5662
|
const base = Math.max(1, Math.ceil(width * height * frames / 65536));
|
|
5637
5663
|
return { unit: "generations", amount: spec.revision.enhancePrompt ? base + 0.05 : base, candidates: 1 };
|
|
5638
5664
|
}
|
|
@@ -5663,7 +5689,7 @@ var PixelLabProvider = class _PixelLabProvider {
|
|
|
5663
5689
|
return {
|
|
5664
5690
|
unit: "generations",
|
|
5665
5691
|
amount: generationCost(spec.width, spec.height, spec.generator),
|
|
5666
|
-
candidates: spec.generator === "1dir" || spec.generator === "imagePro" ? candidateCount(spec.size) : 1
|
|
5692
|
+
candidates: spec.generator === "1dir" || spec.generator === "imagePro" ? candidateCount(spec.size) : spec.generator === "uiElement" ? uiElementCandidateCount(spec.size) : 1
|
|
5667
5693
|
};
|
|
5668
5694
|
}
|
|
5669
5695
|
validate(spec, styleImages) {
|
|
@@ -7513,15 +7539,15 @@ var PixelLabProvider = class _PixelLabProvider {
|
|
|
7513
7539
|
* `pollRevision` above, but completing with an ORDERED FRAME LIST instead
|
|
7514
7540
|
* of a single image — the same `review-set` shape `pollCharacterAnimation`
|
|
7515
7541
|
* returns, minus any character/object resource to look the result up on
|
|
7516
|
-
* (there is none; this operates on a loose image).
|
|
7517
|
-
*
|
|
7518
|
-
*
|
|
7519
|
-
*
|
|
7520
|
-
*
|
|
7521
|
-
*
|
|
7522
|
-
*
|
|
7523
|
-
*
|
|
7524
|
-
*
|
|
7542
|
+
* (there is none; this operates on a loose image). Both
|
|
7543
|
+
* `/animate-with-text-v3` and `/animate-pixminimax` have run live
|
|
7544
|
+
* (November 2026) and the completed jobs were read correctly. The checks
|
|
7545
|
+
* below stay defensive (hosted URLs under a plausible key name, the same
|
|
7546
|
+
* `storage_urls.frames` shape character animations use, or inline base64
|
|
7547
|
+
* per frame, decoded to a local cache file the same way `pollRevision`'s
|
|
7548
|
+
* single-image case is) and fail loudly, naming the keys actually
|
|
7549
|
+
* received, if a shape ever differs. PixMiniMax includes the input frame,
|
|
7550
|
+
* so a set holds the requested count plus one.
|
|
7525
7551
|
*/
|
|
7526
7552
|
async pollAnimateRevision(jobId, context) {
|
|
7527
7553
|
const job = await this.client.getBackgroundJob(jobId);
|
|
@@ -7662,7 +7688,7 @@ var PixelLabProvider = class _PixelLabProvider {
|
|
|
7662
7688
|
}
|
|
7663
7689
|
return {
|
|
7664
7690
|
status: "failed",
|
|
7665
|
-
error: `Invalid PixelLab response for imagePro job ${jobId}: completed with no recognized images array (got: ${Object.keys(done).join(", ") || "no keys"});
|
|
7691
|
+
error: `Invalid PixelLab response for imagePro job ${jobId}: completed with no recognized images array (got: ${Object.keys(done).join(", ") || "no keys"}); update pollImagePro in src/providers/pixellab.ts with the real shape`
|
|
7666
7692
|
};
|
|
7667
7693
|
}
|
|
7668
7694
|
/**
|
|
@@ -21620,6 +21646,7 @@ async function workspaceStatus(ws, dir) {
|
|
|
21620
21646
|
parseVfxStep,
|
|
21621
21647
|
parseWorkspace,
|
|
21622
21648
|
pickHistory,
|
|
21649
|
+
pixMiniMaxCost,
|
|
21623
21650
|
pixelateFile,
|
|
21624
21651
|
pngSize,
|
|
21625
21652
|
poll,
|
|
@@ -21711,6 +21738,7 @@ async function workspaceStatus(ws, dir) {
|
|
|
21711
21738
|
tilesCost,
|
|
21712
21739
|
toPortablePath,
|
|
21713
21740
|
totalSpend,
|
|
21741
|
+
uiElementCandidateCount,
|
|
21714
21742
|
unzoomFile,
|
|
21715
21743
|
upsert,
|
|
21716
21744
|
validateCostEstimate,
|