Skip to content

armgit / fuobe

Public Imported from GitHub
0

The open creative studio on ComfyUI: images, video, 3D and audio on open weights, on your own GPU or the cloud. Camera motions, effects, apps, Cinema, Layers, Image to 3D and an AI agent.

Fuobe FX: before and after stills for Motion control, Extend, Reframe, Image to 3D and Splat; Reframe's adds its wide still and tall crop

Adarsh77cbd5ca0261
diff --git a/public/previews/fx/extend/after.480.avif b/public/previews/fx/extend/after.480.avif
new file mode 100644
index 00000000..72e97511
Binary files /dev/null and b/public/previews/fx/extend/after.480.avif differ
diff --git a/public/previews/fx/extend/after.480.webp b/public/previews/fx/extend/after.480.webp
new file mode 100644
index 00000000..40a1ba83
Binary files /dev/null and b/public/previews/fx/extend/after.480.webp differ
diff --git a/public/previews/fx/extend/after.960.avif b/public/previews/fx/extend/after.960.avif
new file mode 100644
index 00000000..a1336c9f
Binary files /dev/null and b/public/previews/fx/extend/after.960.avif differ
diff --git a/public/previews/fx/extend/after.960.webp b/public/previews/fx/extend/after.960.webp
new file mode 100644
index 00000000..4488cbb8
Binary files /dev/null and b/public/previews/fx/extend/after.960.webp differ
diff --git a/public/previews/fx/extend/before.480.avif b/public/previews/fx/extend/before.480.avif
new file mode 100644
index 00000000..d9835dc3
Binary files /dev/null and b/public/previews/fx/extend/before.480.avif differ
diff --git a/public/previews/fx/extend/before.480.webp b/public/previews/fx/extend/before.480.webp
new file mode 100644
index 00000000..7e51f8e5
Binary files /dev/null and b/public/previews/fx/extend/before.480.webp differ
diff --git a/public/previews/fx/extend/before.960.avif b/public/previews/fx/extend/before.960.avif
new file mode 100644
index 00000000..1205b9bd
Binary files /dev/null and b/public/previews/fx/extend/before.960.avif differ
diff --git a/public/previews/fx/extend/before.960.webp b/public/previews/fx/extend/before.960.webp
new file mode 100644
index 00000000..abbe4486
Binary files /dev/null and b/public/previews/fx/extend/before.960.webp differ
diff --git a/public/previews/fx/extend/strip.webp b/public/previews/fx/extend/strip.webp
new file mode 100644
index 00000000..9530b374
Binary files /dev/null and b/public/previews/fx/extend/strip.webp differ
diff --git a/public/previews/fx/image-to-3d-splat/after.480.avif b/public/previews/fx/image-to-3d-splat/after.480.avif
new file mode 100644
index 00000000..58c89563
Binary files /dev/null and b/public/previews/fx/image-to-3d-splat/after.480.avif differ
diff --git a/public/previews/fx/image-to-3d-splat/after.480.webp b/public/previews/fx/image-to-3d-splat/after.480.webp
new file mode 100644
index 00000000..a156420e
Binary files /dev/null and b/public/previews/fx/image-to-3d-splat/after.480.webp differ
diff --git a/public/previews/fx/image-to-3d-splat/after.960.avif b/public/previews/fx/image-to-3d-splat/after.960.avif
new file mode 100644
index 00000000..0147fad3
Binary files /dev/null and b/public/previews/fx/image-to-3d-splat/after.960.avif differ
diff --git a/public/previews/fx/image-to-3d-splat/after.960.webp b/public/previews/fx/image-to-3d-splat/after.960.webp
new file mode 100644
index 00000000..d8593925
Binary files /dev/null and b/public/previews/fx/image-to-3d-splat/after.960.webp differ
diff --git a/public/previews/fx/image-to-3d-splat/before.480.avif b/public/previews/fx/image-to-3d-splat/before.480.avif
new file mode 100644
index 00000000..f64564b4
Binary files /dev/null and b/public/previews/fx/image-to-3d-splat/before.480.avif differ
diff --git a/public/previews/fx/image-to-3d-splat/before.480.webp b/public/previews/fx/image-to-3d-splat/before.480.webp
new file mode 100644
index 00000000..a820cbef
Binary files /dev/null and b/public/previews/fx/image-to-3d-splat/before.480.webp differ
diff --git a/public/previews/fx/image-to-3d-splat/before.960.avif b/public/previews/fx/image-to-3d-splat/before.960.avif
new file mode 100644
index 00000000..2c7ef2f1
Binary files /dev/null and b/public/previews/fx/image-to-3d-splat/before.960.avif differ
diff --git a/public/previews/fx/image-to-3d-splat/before.960.webp b/public/previews/fx/image-to-3d-splat/before.960.webp
new file mode 100644
index 00000000..77aa0dfa
Binary files /dev/null and b/public/previews/fx/image-to-3d-splat/before.960.webp differ
diff --git a/public/previews/fx/image-to-3d/after.480.avif b/public/previews/fx/image-to-3d/after.480.avif
new file mode 100644
index 00000000..4a6c215a
Binary files /dev/null and b/public/previews/fx/image-to-3d/after.480.avif differ
diff --git a/public/previews/fx/image-to-3d/after.480.webp b/public/previews/fx/image-to-3d/after.480.webp
new file mode 100644
index 00000000..8f53219a
Binary files /dev/null and b/public/previews/fx/image-to-3d/after.480.webp differ
diff --git a/public/previews/fx/image-to-3d/after.960.avif b/public/previews/fx/image-to-3d/after.960.avif
new file mode 100644
index 00000000..11f8d19b
Binary files /dev/null and b/public/previews/fx/image-to-3d/after.960.avif differ
diff --git a/public/previews/fx/image-to-3d/after.960.webp b/public/previews/fx/image-to-3d/after.960.webp
new file mode 100644
index 00000000..23fe5c9f
Binary files /dev/null and b/public/previews/fx/image-to-3d/after.960.webp differ
diff --git a/public/previews/fx/image-to-3d/before.480.avif b/public/previews/fx/image-to-3d/before.480.avif
new file mode 100644
index 00000000..4d167825
Binary files /dev/null and b/public/previews/fx/image-to-3d/before.480.avif differ
diff --git a/public/previews/fx/image-to-3d/before.480.webp b/public/previews/fx/image-to-3d/before.480.webp
new file mode 100644
index 00000000..feb070e4
Binary files /dev/null and b/public/previews/fx/image-to-3d/before.480.webp differ
diff --git a/public/previews/fx/image-to-3d/before.960.avif b/public/previews/fx/image-to-3d/before.960.avif
new file mode 100644
index 00000000..a304e974
Binary files /dev/null and b/public/previews/fx/image-to-3d/before.960.avif differ
diff --git a/public/previews/fx/image-to-3d/before.960.webp b/public/previews/fx/image-to-3d/before.960.webp
new file mode 100644
index 00000000..b15a397f
Binary files /dev/null and b/public/previews/fx/image-to-3d/before.960.webp differ
diff --git a/public/previews/fx/motion-control/after.480.avif b/public/previews/fx/motion-control/after.480.avif
new file mode 100644
index 00000000..52998639
Binary files /dev/null and b/public/previews/fx/motion-control/after.480.avif differ
diff --git a/public/previews/fx/motion-control/after.480.webp b/public/previews/fx/motion-control/after.480.webp
new file mode 100644
index 00000000..9d1f9d1d
Binary files /dev/null and b/public/previews/fx/motion-control/after.480.webp differ
diff --git a/public/previews/fx/motion-control/after.960.avif b/public/previews/fx/motion-control/after.960.avif
new file mode 100644
index 00000000..95196e2f
Binary files /dev/null and b/public/previews/fx/motion-control/after.960.avif differ
diff --git a/public/previews/fx/motion-control/after.960.webp b/public/previews/fx/motion-control/after.960.webp
new file mode 100644
index 00000000..fa499135
Binary files /dev/null and b/public/previews/fx/motion-control/after.960.webp differ
diff --git a/public/previews/fx/motion-control/before.480.avif b/public/previews/fx/motion-control/before.480.avif
new file mode 100644
index 00000000..750e4493
Binary files /dev/null and b/public/previews/fx/motion-control/before.480.avif differ
diff --git a/public/previews/fx/motion-control/before.480.webp b/public/previews/fx/motion-control/before.480.webp
new file mode 100644
index 00000000..c1cac4e2
Binary files /dev/null and b/public/previews/fx/motion-control/before.480.webp differ
diff --git a/public/previews/fx/motion-control/before.960.avif b/public/previews/fx/motion-control/before.960.avif
new file mode 100644
index 00000000..b1eb0fb5
Binary files /dev/null and b/public/previews/fx/motion-control/before.960.avif differ
diff --git a/public/previews/fx/motion-control/before.960.webp b/public/previews/fx/motion-control/before.960.webp
new file mode 100644
index 00000000..73cca696
Binary files /dev/null and b/public/previews/fx/motion-control/before.960.webp differ
diff --git a/public/previews/fx/reframe/after.480.avif b/public/previews/fx/reframe/after.480.avif
new file mode 100644
index 00000000..3fbc72be
Binary files /dev/null and b/public/previews/fx/reframe/after.480.avif differ
diff --git a/public/previews/fx/reframe/after.480.webp b/public/previews/fx/reframe/after.480.webp
new file mode 100644
index 00000000..e0c1c5f1
Binary files /dev/null and b/public/previews/fx/reframe/after.480.webp differ
diff --git a/public/previews/fx/reframe/after.960.avif b/public/previews/fx/reframe/after.960.avif
new file mode 100644
index 00000000..c056e18e
Binary files /dev/null and b/public/previews/fx/reframe/after.960.avif differ
diff --git a/public/previews/fx/reframe/after.960.webp b/public/previews/fx/reframe/after.960.webp
new file mode 100644
index 00000000..12ec6d11
Binary files /dev/null and b/public/previews/fx/reframe/after.960.webp differ
diff --git a/public/previews/fx/reframe/before.480.avif b/public/previews/fx/reframe/before.480.avif
new file mode 100644
index 00000000..6f8bade0
Binary files /dev/null and b/public/previews/fx/reframe/before.480.avif differ
diff --git a/public/previews/fx/reframe/before.480.webp b/public/previews/fx/reframe/before.480.webp
new file mode 100644
index 00000000..ca1fb10f
Binary files /dev/null and b/public/previews/fx/reframe/before.480.webp differ
diff --git a/public/previews/fx/reframe/before.960.avif b/public/previews/fx/reframe/before.960.avif
new file mode 100644
index 00000000..1affd1cd
Binary files /dev/null and b/public/previews/fx/reframe/before.960.avif differ
diff --git a/public/previews/fx/reframe/before.960.webp b/public/previews/fx/reframe/before.960.webp
new file mode 100644
index 00000000..144166ae
Binary files /dev/null and b/public/previews/fx/reframe/before.960.webp differ
diff --git a/public/previews/fx/reframe/wide.480.webp b/public/previews/fx/reframe/wide.480.webp
new file mode 100644
index 00000000..6e87b400
Binary files /dev/null and b/public/previews/fx/reframe/wide.480.webp differ
diff --git a/public/previews/fx/reframe/wide.960.webp b/public/previews/fx/reframe/wide.960.webp
new file mode 100644
index 00000000..5940f4c9
Binary files /dev/null and b/public/previews/fx/reframe/wide.960.webp differ
diff --git a/scripts/gen-fx-pairs.mjs b/scripts/gen-fx-pairs.mjs
index 1a753286..59a8d3a5 100644
--- a/scripts/gen-fx-pairs.mjs
+++ b/scripts/gen-fx-pairs.mjs
@@ -12,7 +12,8 @@
* kind "loupe": also before.loupe.webp and after.loupe.webp (240x240, and .loupe2x.webp at 480x480): the same 1:1
* detail of the after at its own resolution, and of the before enlarged to it
* kind "strip": also strip.webp: 6 frames of the real output clip side by side (each 480x360), in time order
- * kind "reframe": the before is the wide still; `rect` is the tall crop's box in it (fractions of its width and height)
+ * kind "reframe": also wide.480.webp / wide.960.webp, the before as a 16:9 still, and `rect`, the 9:16 crop's box in
+ * it (fractions x, y, w, h), centred on `focus`
* and src/lib/fx-pairs.generated.ts: { "<id>": { v, kind, rect? } }, v the content version every URL ends in (?v=).
*
* A sources file lists the pairs (it names files on the machine that makes them, so it stays outside the repository):
@@ -149,8 +150,18 @@ async function make(src) {
entry.frames = 6;
}
if (kind === "reframe") {
- if (!Array.isArray(src.rect) || src.rect.length !== 4) throw new Error(`${src.id}: a reframe pair names its tall crop's rect [x, y, w, h]`);
- entry.rect = src.rect;
+ // The wide still (16:9, the before's middle band) and the tall 9:16 box in it, centred on `focus`'s x.
+ const { width: W, height: H } = await sharp(before).metadata();
+ const wh = Math.min(H, Math.round((W * 9) / 16));
+ const wide = { left: 0, top: Math.round((H - wh) / 2), width: W, height: wh };
+ for (const [tag, w, max] of [["480", 480, 40_000], ["960", 960, 140_000]]) {
+ const h = Math.round((w * 9) / 16);
+ files[`wide.${tag}.webp`] = await fitting((q) => sharp(before).extract(wide).resize(w, h, { fit: "fill", kernel: "lanczos3" }).removeAlpha().webp({ quality: q }).toBuffer(), [82, 76, 70, 64], max);
+ }
+ const rw = (wh * 9) / 16 / W;
+ const cx = (src.focus ?? [0.5])[0];
+ const rx = Math.min(1 - rw, Math.max(0, cx - rw / 2));
+ entry.rect = [rx, 0, rw, 1].map((x) => Math.round(x * 10000) / 10000);
}
return { entry, files };
}
@@ -169,7 +180,7 @@ function writeManifest(pairs) {
* after is a cut-out with alpha. "depth": the after is the depth pass. "loupe": also before.loupe.webp / after.loupe.webp
* (240x240; .loupe2x.webp 480x480), a 1:1 detail of the after and the before enlarged to it, at \`loupe\` (fractions
* x, y, w, h of the frame). "strip": also strip.webp, 6 frames of the output clip side by side, 480x360 each.
- * "reframe": \`rect\` is the tall crop's box in the wide before (fractions). Every URL ends in ?v=<v>. Generated by
+ * "reframe": also wide.480.webp / wide.960.webp (the before at 16:9), and \`rect\` is the 9:16 crop's box in it (fractions). Every URL ends in ?v=<v>. Generated by
* scripts/gen-fx-pairs.mjs: run it again rather than editing.
*/
export interface FxPair {
diff --git a/src/lib/fx-pairs.generated.ts b/src/lib/fx-pairs.generated.ts
index c7d03edd..6a4d314e 100644
--- a/src/lib/fx-pairs.generated.ts
+++ b/src/lib/fx-pairs.generated.ts
@@ -4,7 +4,7 @@
* after is a cut-out with alpha. "depth": the after is the depth pass. "loupe": also before.loupe.webp / after.loupe.webp
* (240x240; .loupe2x.webp 480x480), a 1:1 detail of the after and the before enlarged to it, at `loupe` (fractions
* x, y, w, h of the frame). "strip": also strip.webp, 6 frames of the output clip side by side, 480x360 each.
- * "reframe": `rect` is the tall crop's box in the wide before (fractions). Every URL ends in ?v=<v>. Generated by
+ * "reframe": also wide.480.webp / wide.960.webp (the before at 16:9), and `rect` is the 9:16 crop's box in it (fractions). Every URL ends in ?v=<v>. Generated by
* scripts/gen-fx-pairs.mjs: run it again rather than editing.
*/
export interface FxPair {
@@ -27,6 +27,11 @@ export const FX_PAIRS: Record<string, FxPair> = {
"v": "f55c5b88",
"kind": "pair"
},
+ "extend": {
+ "v": "e88b8655",
+ "kind": "strip",
+ "frames": 6
+ },
"genjutsu": {
"v": "026a7ea7",
"kind": "pair"
@@ -55,6 +60,14 @@ export const FX_PAIRS: Record<string, FxPair> = {
"v": "e601d762",
"kind": "pair"
},
+ "image-to-3d": {
+ "v": "e51a6d45",
+ "kind": "pair"
+ },
+ "image-to-3d-splat": {
+ "v": "ad83fb11",
+ "kind": "pair"
+ },
"inpaint": {
"v": "79b01434",
"kind": "pair"
@@ -63,6 +76,20 @@ export const FX_PAIRS: Record<string, FxPair> = {
"v": "7b66fc4b",
"kind": "pair"
},
+ "motion-control": {
+ "v": "79f7c2c9",
+ "kind": "pair"
+ },
+ "reframe": {
+ "v": "6003e3f7",
+ "kind": "reframe",
+ "rect": [
+ 0.3418,
+ 0,
+ 0.3164,
+ 1
+ ]
+ },
"upscale": {
"v": "68c98961",
"kind": "loupe",
diff --git a/tests/fx-pairs.test.ts b/tests/fx-pairs.test.ts
index c888d7f6..a03f4db1 100644
--- a/tests/fx-pairs.test.ts
+++ b/tests/fx-pairs.test.ts
@@ -26,7 +26,10 @@ describe("Fuobe FX cover pairs", () => {
if (pair.kind === "matte") expect((await sharp(path.join(dir(id), "after.480.webp")).metadata()).hasAlpha, id).toBe(true);
if (pair.kind === "loupe") for (const f of ["before.loupe.webp", "after.loupe.webp", "before.loupe2x.webp", "after.loupe2x.webp"]) expect(fs.existsSync(path.join(dir(id), f)), `${id} ${f}`).toBe(true);
if (pair.kind === "strip") expect((await sharp(path.join(dir(id), "strip.webp")).metadata()).width, id).toBe(480 * 6);
- if (pair.kind === "reframe") expect(pair.rect?.length, id).toBe(4);
+ if (pair.kind === "reframe") {
+ expect(pair.rect?.length, id).toBe(4);
+ expect((await sharp(path.join(dir(id), "wide.480.webp")).metadata()).height, id).toBe(270);
+ }
expect(fxPairSrc(id, "after.480.webp"), id).toBe(`/previews/fx/${id}/after.480.webp?v=${pair.v}`);
}
});