Fabric try-on · 料色试贴

The fabric, on your window.

Upload a room photo and one clear photo of the curtain you want, confirm how it is installed, add a sentence if you like, then generate. The preview is composited in your browser — no upload, no server. If the result is installed the wrong way (the model's default is inside the reveal, one panel per window), use Continue editing with the current result as the base image instead of starting over.

  1. Reference
  2. Install
  3. Prompt
  4. Generate
  5. Continue editing
Available now

Fabric try-on

A woven fabric texture, warped into the area you mark, with parametric Korean pleats (pressed creases, heading tape, pleat tips), soft edges, a floor shadow and an optional concealed-track top. Runs entirely on this device — your photo never leaves the browser. Only the fabric changes; everything around it stays as photographed. The install choices (inside / wall, per-window / one piece, sheer / opaque), the default-correction prompt and Continue editing all drive this local composite and are written into the export JSON.

AI 通道:检测中…

AI lighting render

Checking the local bridge at 127.0.0.1:8791…

桥接 = projects/inpaint/bridge.py:把房间照片 + 参考图 + 提示词转给 qwen-image-3.0-pro,结果存进 projects/site/out/。

1. Your room · 房间照片

Drop a photo here, or click to browse JPG, PNG or WebP · up to 15 MB · stays in your browser

2. Curtain reference · 窗帘参考(最重要)

主入口是一张最清晰的窗帘实拍 —— 一张好照片比填满六个类型格子有用。 绑扎造型、花边、纱的透光感都能被学到。 参考图会作为 AI 的 image 2;类型只是提示,可选。

上传一张最清晰的窗帘实拍 JPG / PNG / WebP · 只在本机读取 · 作为 AI 参考图(image 2)

未上传参考图也能出图,但造型只能由 AI 猜。

类型标签可选:不选就让 AI 按参考图判断。

3. Mark the whole wall · 位置标记

框只作参考 —— AI 可能按默认方式安装。结果不对时,用下方「继续编辑」调整。 The box is a hint, not a command — fix it with Continue editing.

Drag all four corners out to the wall corners and down to the floor. Curtains hang wall-to-wall and reach the floor: if you mark only the window, the AI paints fabric outside your box. Wall-to-wall detects the wall corners and the curtain-box / ceiling line for you; each corner also snaps to the nearest strong edge (wall corner, dark wall panel, curtain-box lower edge) within about 3.5%. Keep the top edge on the curtain-box lower edge — not at the top of the photo — or the model repaints the box.

把四个角拖到墙角和地面——不是只圈窗户。窗帘是整墙落地的,只圈窗会让 AI 把布画到框外。整墙按钮会按墙角吸附;上沿要停在窗帘盒下沿,不是画面顶端, 否则模型会把盒子一起重画。

No photo yet.

4. Installation · 安装方式(必选)

默认值 = 扶摇那套(窗洞内 + 每窗一幅)。但多数客户要的是满墙 + 整块, 选错会得到完全不同结果。

安装位置 Install position

分片方式 Panels

透光效果 Light 必选

先上传房间照片,并选择透光效果。

5. Prompt · 提示词

最终提示词 · final prompt(写进导出参数)

—

出图方式取决于 AI 通道:桥接起来 = 真调模型;没起来 = 本机合成。这段提示词两种情况都会写进「导出参数 JSON」。

本地料色微调(可选)fabric · weave · 3D finish · 褶形
Ivory Linen Linen-look · 280 cm

No weave image loaded — this is exactly the T-31 procedural render.

3D finish · 体积感

报价与工艺参数褶数 / 褶深 / 压条 / 布宽 —— 效果图不参与

效果图只看「装在哪、怎么分、透不透」。褶数与尺寸只进报价和生产 —— 我们的报价引擎能精确算,AI 出图给不了这个。 去报价页

≈ 26 道褶 · 10.8 cm 褶距 · 280 cm 布宽

6. Result · 效果图

Local · draft

Upload a room photo and one clear curtain photo, choose the installation, then press 生成效果图. The draft below updates as soon as the room photo is read — the version you can keep, export and continue editing is the one you generate.

Export mask writes two files at your photo's own size: <name>-room.png and <name>-mask.png. White = the area to replace, black = keep. It is the input an AI inpaint model needs — the mask is generated in this tab, nothing is uploaded.

导出参数(JSON)安装位置 / 分片 / 透光 / 提示词 / 继续编辑请求

这是「导出参数 JSON」按钮会下载的内容。aiChannel.connected 是真实状态;aiChannel.request 是下一次要发出去的请求(图片只留元信息,像素在 wire body 里)。

{}

Waiting for a photo. Nothing is uploaded; the try-on is composited on this device.

Two engines, one button. If the local AI bridge on 127.0.0.1:8791 answers /health, Generate and Continue editing call qwen-image-3.0-pro for real (about 45 s, ¥0.3–0.5 per image) and show that image. If the bridge is not running they run the local compositor instead and the page says so. Nothing is ever faked either way.

What works now

  • Reference-first upload — one clear curtain photo is the main entry; the six curtain-type tags are optional hints for the AI
  • Installation is a required choice — position (inside the reveal / wall-hung), panels (one per window / one piece) and light (see-through / light only). Nothing is generated until every group is answered
  • Four-corner curtain-area selection with snapping — mouse, touch or arrow keys. The box is a hint, not a command
  • Default correction — the negative defaults (do not replace the existing curtain in place, do not install inside the reveal, keep the panels together) are appended to the prompt and can be switched off
  • Continue editing — the current result becomes image 1, the reference photo image 2, and one correction is applied on the same mask/inpaint path
  • PNG export of the composite, a mask pack, and a parameters JSON carrying the install choices, the compiled prompt and every continue-edit request
  • Pleat count, pleat depth and finished width live in the quote module, not on the effect page; the render itself is procedural

What this is not

  • Only the pixels inside your marked area are replaced — the room is not re-rendered
  • Room lighting, wall colour and shadows are not re-rendered; the room stays exactly as photographed
  • One layer, one quad — no sheer-plus-drape double layer
  • Fabrics are look-alike textures, not supplier photography
  • No real fabric library, price or stock data on this page
  • No save, share or lead capture
  • An image model is called only when the local bridge is running. Generate and Continue editing POST the request (room photo, reference photo, install parameters, prompt) to 127.0.0.1:8791, which forwards it to qwen-image-3.0-pro. With the bridge down they run the local compositor, and the status badge above the result says which engine produced the image
  • Continue editing with the bridge down changes only what the local renderer can express — install geometry, light transmission, rod, hem. Style words that only a model can act on stay in the exported request

What AI mode still needs

The render itself is real now: a local bridge (projects/inpaint/bridge.py) forwards the request to qwen-image-3.0-pro and saves the result. What is still missing for customers, not for this demo: explicit consent for photo processing, a retention/deletion policy for uploaded rooms, content moderation, and a render queue with a cost/latency budget.

The front half stays local: Export mask produces the room + mask pair, and Export parameters JSON carries the install choices, the compiled prompt, each continue-edit request and the exact AI request body (minus the pixels). The bridge is a localhost helper — this page never holds the API key.