Edit photos by describing the change, on your own GPU. A free, open-source alternative to Nano Banana and ChatGPT image editing: photos stay on your computer, no daily limit. One installer for Windows, Mac and Linux sets up the best open model (Qwen-Image 2.1). MCP server for AI agents.
TypeScript ai-photo-editorcomfyui-alternativegenerative-fillimage-editingimage-generationinpaintinglinuxlocal-aimacosmcpmcp-servernano-banana-alternativeofflinephoto-editorprivacyqwen-imageqwen-image-2-1stable-diffusion-cppvulkanwindows
Use real before/after captures for the README examples
Gabriele Lozupone737fd6f7d25f
diff --git a/README.md b/README.mdindex 61d557e..d69f935 100644--- a/README.md+++ b/README.md@@ -96,7 +96,7 @@ Every result below came from one sentence in Kokon, with default settings.| :---: | :---: || <img src="docs/media/examples/remove.jpg" alt="Remove people from a beach"><br>**Remove** · *“Remove all the people from the beach”* | <img src="docs/media/examples/replace.jpg" alt="Replace an object"><br>**Replace** · *“Replace the orange car with a blue vintage Vespa scooter”* || <img src="docs/media/examples/relight.jpg" alt="Relight a scene"><br>**Relight** · *“Make it golden hour, warm low sunlight”* | <img src="docs/media/examples/restyle.jpg" alt="Restyle a photo"><br>**Restyle** · *“Turn it into a watercolor illustration”* |-| <img src="docs/media/examples/text.jpg" alt="Change text in a photo"><br>**Text** · *“Change the neon sign to say ‘OPEN LATE’”* | <img src="docs/media/examples/expand.jpg" alt="Expand a photo"><br>**Expand** · *“Expand to 16:9, continue the beach”* |+| <img src="docs/media/examples/text.jpg" alt="Change text in a photo"><br>**Text** · *“Change the neon sign to say ‘OPEN LATE’”* | <img src="docs/media/examples/expand.jpg" alt="Expand a photo"><br>**Expand** · Expand → 16:9 · *“continue the beach”* |## Installdiff --git a/docs/media/examples/expand.jpg b/docs/media/examples/expand.jpgindex fb033e7..6f25519 100644Binary files a/docs/media/examples/expand.jpg and b/docs/media/examples/expand.jpg differdiff --git a/docs/media/examples/relight.jpg b/docs/media/examples/relight.jpgindex 98ecef0..6c8d496 100644Binary files a/docs/media/examples/relight.jpg and b/docs/media/examples/relight.jpg differdiff --git a/docs/media/examples/remove.jpg b/docs/media/examples/remove.jpgindex 8b80377..06a692f 100644Binary files a/docs/media/examples/remove.jpg and b/docs/media/examples/remove.jpg differdiff --git a/docs/media/examples/replace.jpg b/docs/media/examples/replace.jpgindex c075b8e..55fe261 100644Binary files a/docs/media/examples/replace.jpg and b/docs/media/examples/replace.jpg differdiff --git a/docs/media/examples/restyle.jpg b/docs/media/examples/restyle.jpgindex 78202c1..d3382f5 100644Binary files a/docs/media/examples/restyle.jpg and b/docs/media/examples/restyle.jpg differdiff --git a/docs/media/examples/text.jpg b/docs/media/examples/text.jpgindex 4984b68..10633b9 100644Binary files a/docs/media/examples/text.jpg and b/docs/media/examples/text.jpg differdiff --git a/scripts/readme/compose_examples.py b/scripts/readme/compose_examples.pynew file mode 100644index 0000000..e4bd5e4--- /dev/null+++ b/scripts/readme/compose_examples.py@@ -0,0 +1,28 @@+"""Builds the README before/after images.++Usage: python scripts/readme/compose_examples.py docs/media/raw docs/media/examples+Reads <name>-before.jpg and <name>-after.png from the first folder and writes+<name>.jpg (1200x600, side by side, labelled) into the second.+"""+import sys, os+from PIL import Image, ImageOps, ImageDraw, ImageFont+R, OUT = sys.argv[1], sys.argv[2]+W, H, GAP = 1200, 600, 12+PAPER = (247,246,242)+f = ImageFont.truetype("C:/Windows/Fonts/segoeuib.ttf", 20)+def tag(im, text, x, y):+ d = ImageDraw.Draw(im, "RGBA"); w = d.textlength(text, font=f)+ d.rounded_rectangle([x, y, x+w+20, y+32], 8, fill=(13,13,13,190)); d.text((x+10, y+3), text, font=f, fill="white")+for n in ["remove","replace","relight","restyle","text","expand"]:+ b, a = os.path.join(R, f"{n}-before.jpg"), os.path.join(R, f"{n}-after.png")+ if not os.path.exists(a): print("skip", n); continue+ cw = (W - GAP) // 2+ canvas = Image.new("RGB", (W, H), PAPER)+ for i, p in enumerate([b, a]):+ im = Image.open(p).convert("RGB")+ if n == "expand": # keep whole frames: square before, 16:9 after, letterboxed on paper+ im.thumbnail((cw, H)); x = i*(cw+GAP) + (cw-im.width)//2; y = (H-im.height)//2+ else:+ im = ImageOps.fit(im, (cw, H), Image.LANCZOS); x, y = i*(cw+GAP), 0+ canvas.paste(im, (x, y)); tag(canvas, ["Before","After"][i], x+12, y+12)+ canvas.save(os.path.join(OUT, f"{n}.jpg"), quality=88, optimize=True); print("ok", n)