Python
Batch 1 examples carry their inputs, so "Load this example" fills the form
neuregex695905f9bdab
diff --git a/lab/publish.py b/lab/publish.pyindex 4e6aeee..45359fa 100644--- a/lab/publish.py+++ b/lab/publish.py@@ -197,6 +197,15 @@ def main(argv: list[str] | None = None) -> int:inputs.append({"id": input_id, "label": labels.get(input_id, {}).get("label", input_id),"type": w.get("type"), "src": src, "full": playable, "from_case": source["id"]})continue+ if isinstance(raw, str) and raw.startswith("asset:") and (ROOT / "lab" / "assets" / raw[len("asset:"):]).exists():+ # a file kept in lab/assets (inpaint's painted mask): copied as it is, so "Load this example" fills it in too+ asset = ROOT / "lab" / "assets" / raw[len("asset:"):]+ name = f"input-{input_id}-full{asset.suffix.lower()}"+ shutil.copy(asset, dest / name)+ rel = f"examples/{app_id}/{name}"+ inputs.append({"id": input_id, "label": labels.get(input_id, {}).get("label", input_id),+ "type": labels.get(input_id, {}).get("type"), "src": rel, "full": rel, "from": raw})+ continueinputs.append({"id": input_id, "label": labels.get(input_id, {}).get("label", input_id),"type": labels.get(input_id, {}).get("type"), "src": None, "full": None, "from": raw})diff --git a/web/examples/character-3/input-photo1-full.jpg b/web/examples/character-3/input-photo1-full.jpgnew file mode 100644index 0000000..4616bceBinary files /dev/null and b/web/examples/character-3/input-photo1-full.jpg differdiff --git a/web/examples/character-3/input-photo1.jpg b/web/examples/character-3/input-photo1.jpgnew file mode 100644index 0000000..d5245c5Binary files /dev/null and b/web/examples/character-3/input-photo1.jpg differdiff --git a/web/examples/character-3/input-photo2-full.jpg b/web/examples/character-3/input-photo2-full.jpgnew file mode 100644index 0000000..aa3dcbfBinary files /dev/null and b/web/examples/character-3/input-photo2-full.jpg differdiff --git a/web/examples/character-3/input-photo2.jpg b/web/examples/character-3/input-photo2.jpgnew file mode 100644index 0000000..7a48a6aBinary files /dev/null and b/web/examples/character-3/input-photo2.jpg differdiff --git a/web/examples/character-3/input-photo3-full.jpg b/web/examples/character-3/input-photo3-full.jpgnew file mode 100644index 0000000..c126430Binary files /dev/null and b/web/examples/character-3/input-photo3-full.jpg differdiff --git a/web/examples/character-3/input-photo3.jpg b/web/examples/character-3/input-photo3.jpgnew file mode 100644index 0000000..451d6d6Binary files /dev/null and b/web/examples/character-3/input-photo3.jpg differdiff --git a/web/examples/index.json b/web/examples/index.jsonindex 89f8faf..3ceae1f 100644--- a/web/examples/index.json+++ b/web/examples/index.json@@ -4413,25 +4413,25 @@"id": "photo1","label": "Photo 1","type": "image",- "src": null,- "full": null,- "from": "@case:ref-face-a"+ "src": "examples/character-3/input-photo1.jpg",+ "full": "examples/character-3/input-photo1-full.jpg",+ "from_case": "ref-face-a"},{"id": "photo2","label": "Photo 2","type": "image",- "src": null,- "full": null,- "from": "@case:ref-face-a-side"+ "src": "examples/character-3/input-photo2.jpg",+ "full": "examples/character-3/input-photo2-full.jpg",+ "from_case": "ref-face-a-side"},{"id": "photo3","label": "Photo 3","type": "image",- "src": null,- "full": null,- "from": "@case:ref-face-a-outdoor"+ "src": "examples/character-3/input-photo3.jpg",+ "full": "examples/character-3/input-photo3-full.jpg",+ "from_case": "ref-face-a-outdoor"}],"values": {@@ -4457,16 +4457,16 @@"id": "image","label": "Photo","type": "image",- "src": null,- "full": null,- "from": "@case:ref-face-a"+ "src": "examples/inpaint/input-image.jpg",+ "full": "examples/inpaint/input-image-full.jpg",+ "from_case": "ref-face-a"},{"id": "mask","label": "Area to change","type": "image",- "src": null,- "full": null,+ "src": "examples/inpaint/input-mask-full.png",+ "full": "examples/inpaint/input-mask-full.png","from": "asset:mask-face-a-jacket.png"}],@@ -4491,9 +4491,9 @@"id": "photo","label": "Your photo","type": "image",- "src": null,- "full": null,- "from": "@case:ref-face-a"+ "src": "examples/photodump/input-photo.jpg",+ "full": "examples/photodump/input-photo-full.jpg",+ "from_case": "ref-face-a"}],"values": {@@ -4518,25 +4518,25 @@"id": "style1","label": "Reference 1","type": "image",- "src": null,- "full": null,- "from": "@case:ref-mood-diner"+ "src": "examples/moodboard/input-style1.jpg",+ "full": "examples/moodboard/input-style1-full.jpg",+ "from_case": "ref-mood-diner"},{"id": "style2","label": "Reference 2","type": "image",- "src": null,- "full": null,- "from": "@case:ref-mood-wagon"+ "src": "examples/moodboard/input-style2.jpg",+ "full": "examples/moodboard/input-style2-full.jpg",+ "from_case": "ref-mood-wagon"},{"id": "style3","label": "Reference 3","type": "image",- "src": null,- "full": null,- "from": "@case:ref-mood-coffee"+ "src": "examples/moodboard/input-style3.jpg",+ "full": "examples/moodboard/input-style3-full.jpg",+ "from_case": "ref-mood-coffee"}],"values": {@@ -4552,5 +4552,5 @@"run": "20261026-003153-l40s"}},- "updated_from": "20261026-003153-l40s"+ "updated_from": "20261026-003753-l40s"}diff --git a/web/examples/inpaint/input-image-full.jpg b/web/examples/inpaint/input-image-full.jpgnew file mode 100644index 0000000..4616bceBinary files /dev/null and b/web/examples/inpaint/input-image-full.jpg differdiff --git a/web/examples/inpaint/input-image.jpg b/web/examples/inpaint/input-image.jpgnew file mode 100644index 0000000..d5245c5Binary files /dev/null and b/web/examples/inpaint/input-image.jpg differdiff --git a/web/examples/inpaint/input-mask-full.png b/web/examples/inpaint/input-mask-full.pngnew file mode 100644index 0000000..16ffdb0Binary files /dev/null and b/web/examples/inpaint/input-mask-full.png differdiff --git a/web/examples/moodboard/input-style1-full.jpg b/web/examples/moodboard/input-style1-full.jpgnew file mode 100644index 0000000..294a139Binary files /dev/null and b/web/examples/moodboard/input-style1-full.jpg differdiff --git a/web/examples/moodboard/input-style1.jpg b/web/examples/moodboard/input-style1.jpgnew file mode 100644index 0000000..a1ea353Binary files /dev/null and b/web/examples/moodboard/input-style1.jpg differdiff --git a/web/examples/moodboard/input-style2-full.jpg b/web/examples/moodboard/input-style2-full.jpgnew file mode 100644index 0000000..4cffbecBinary files /dev/null and b/web/examples/moodboard/input-style2-full.jpg differdiff --git a/web/examples/moodboard/input-style2.jpg b/web/examples/moodboard/input-style2.jpgnew file mode 100644index 0000000..5758620Binary files /dev/null and b/web/examples/moodboard/input-style2.jpg differdiff --git a/web/examples/moodboard/input-style3-full.jpg b/web/examples/moodboard/input-style3-full.jpgnew file mode 100644index 0000000..444564eBinary files /dev/null and b/web/examples/moodboard/input-style3-full.jpg differdiff --git a/web/examples/moodboard/input-style3.jpg b/web/examples/moodboard/input-style3.jpgnew file mode 100644index 0000000..46aa06cBinary files /dev/null and b/web/examples/moodboard/input-style3.jpg differdiff --git a/web/examples/photodump/input-photo-full.jpg b/web/examples/photodump/input-photo-full.jpgnew file mode 100644index 0000000..4616bceBinary files /dev/null and b/web/examples/photodump/input-photo-full.jpg differdiff --git a/web/examples/photodump/input-photo.jpg b/web/examples/photodump/input-photo.jpgnew file mode 100644index 0000000..d5245c5Binary files /dev/null and b/web/examples/photodump/input-photo.jpg differ