Spaces:
Running
Running
Commit History
-
Survive a server restart instead of dying on a stale token Running
AimeeThe image cache is in memory, so every restart invalidates every token at once. On the HF free tier the Space sleeps and wakes on its own, so this is Marshalls normal experience, not an edge case. - the browser keeps the uploaded bytes and, on unknown image_token, re-uploads and retries the mask once, transparently - /compose no longer silently drops layers it cannot resolve. It returns skipped_layers, because dropping the only layer renders an empty panel and explains nothing, which is exactly what a blank canvas with a dashed placeholder looks like from the users side.943fe07 -
Line-art import defaults, and simplify exports
AimeeDetect line art on upload (histogram sits at both ends) and pick defaults that do not destroy it: Auto Threshold instead of rembg, Invert on so the drawn black stays steel, and fill the panel width. Measured on a real 120x28 panel drawing: rembg composed to 28 contours, threshold to 322. rembg is a photo segmentation net; fed a line drawing it fills the fine white gaps between the lines and returns blobs. Verified it does NOT fire on photographs. Simplify export polylines (Douglas-Peucker, default 0.01in, 0 disables). Flattening beziers at 32 steps is finer than a torch can follow and at the new resolution a 120in panel exported as a 35.4MB DXF; it is now 1.5MB, and 0.01in is well inside a plasma kerf so the part is unchanged.b1f344e -
Raise resolution ceiling and add the 4" gap test
AimeeMAX_IMAGE_DIM 1200 -> 4200, MAX_PANEL_PX 2200 -> 6000. The old caps were sized for a client photo traced onto a two-foot sign. On a ten-foot fence panel they landed at ~9 px/inch on import and 18 px/inch composed, which is one pixel per 0.055in and destroys fine linework (snow cracks, treeline needles, a fly line) before the trace runs. A 120in panel now holds the full 40 px/inch. Measured on a real 120x28 job: compose 8.5s, analyze 9.2s. /analyze gains a gap test: the largest ball that fits through any opening, which is the pool-barrier rule Marshalls client is working to. Distance transform of the cut area, doubled. Only openings enclosed by steel are measured, so a bare traced image does not report its own background. Reported as a warning with per-region widest/area, and painted blue on the overlay beside the existing red thin-features and orange islands. UI: Max gap (in) input, 0 turns it off.3ce01e2
-
AIMEE_CONTEXT.md: Aimee-to-Aimee operational notes (stack, deploy target, workflow)
Aimee +1: Aimee SpenceCo-Authored-By: Aimee Spence <addressforaimee@gmail.com>4f4b5d7
-
Invert KEEP layer preview color to match its meaning
KEEP layers now render dark (blending with the steel-panel background) with a green outline, instead of cream like CUT layers. The canvas now reads honestly: cream = will become a hole, dark = will stay as steel. Same logic in non-steel/schematic mode using a light gray fill against the gray panel. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>c507c14 -
Add Gemini Flash image generation as a layer source
New /generate endpoint takes a text prompt, calls Gemini 3.1 Flash image preview (mirrors the PS Designs Studio client setup), caches the result with an image_token and a source data URL so it slots into the existing layer pipeline (mask extraction, crop, position, polarity, etc.). Plasma-friendly style toggle auto-appends a suffix to steer Gemini toward high-contrast silhouettes that subject-extract cleanly. UI: prompt box + Generate button below the upload dropzone in the Layers panel. Enter submits. Requires GEMINI_API_KEY env var or HF Space secret. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>fbcaabd -
Per-layer Keep/Cut polarity for compose
Each layer now has a polarity ("add"=keep steel or "subtract"=cut, default subtract). Layers compose in order and later layers override earlier ones on the pixels they touch, so a Keep layer can preserve steel inside a previously cut region (e.g., an eagle steel inside a moon hole), and a Cut layer can punch holes inside a previously kept region (e.g., FSF text holes inside the steel area of a wolf body). Layer-preview shows a green KEEP badge or corten CUT badge above each layer so the role is obvious at a glance. Compose re-runs when polarity changes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>c8ac6b3 -
Add cut-size readout, measure tool, and per-layer crop
- /layer/preview now returns subject_bbox in source pixels; frontend converts to inches using the layer's panel placement to show 'actual cut size' next to the placeholder rectangle. - New Measure mode (button + ruler overlay) lets you click two points on the panel and see the calculated distance in inches plus dx/dy components. - New Crop tool: drag a rectangle on the source image in a modal; the backend applies the crop before mask extraction. Reset Crop restores the original. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>30ea689 -
Fix layer drag: stop rebuilding DOM during drag and select
renderStageLayers() was being called on every selectLayer, every pointermove, and every refreshLayerMask, which destroyed the DOM node that had pointer capture, killing the drag mid-stream. Split into renderStageLayers (full rebuild, only when layer set changes) plus lightweight updateLayerTransforms, updateLayerSelection, and updateLayerMaskImage helpers that mutate existing nodes in place. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>fc7788d -
FSF Plasma Design Studio: layered composition, cuttability checks, FSF branding
- Multi-image layered composition (upload, segment, position, scale) - Smart subject extraction via rembg/U-2-Net - Cuttability analysis: thin-feature + floating-island detection - DXF/SVG export at panel scale - Full Send Fabrication branding Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>b16e4fc