Instant Film Frame (Caption & Emulation)
Simulates authentic instant film (Polaroid/instax style) frames, physical marker handwriting captions, and adjustable chemical film emulation (0-100) in ComfyUI.
📷 InstantFilmFrame
Authentic instant film physical frame textures, 0–100 chemical development emulation, and expressive handwritten margin typography for ComfyUI.
🇺🇸 English | 🇯🇵 日本語 (Japanese)
Why Physical Modeling? • Showcase Gallery • 0–100 Chemical Development • Paper Texture Slider • Handwriting Wobble Slider • Handwritten Typography • Parameters • Installation
<br>
Beyond pasting flat white overlays: Physical millimeter die-cut bevels, 0–100 photochemical development, and realistic capillary ink bleeding that breathes tangible life into both anime illustrations and photorealistic snapshots.
</div>🔬 Why Physical Modeling?
Real instant photographs (such as Polaroid or instax prints) are never just a photo with a flat white border on top.
In reality, a real print is a multi-layered mechanical assembly: photosensitive emulsion viewed through a die-cut cardboard window with subtle die-cut rounded corners, a gentle inner drop shadow and edge highlight cast by the paper thickness onto the photograph, and a bottom reservoir bulging slightly where the chemical reagent pod sits. Furthermore, handwritten margin notes are not clean digital vectors; they exhibit capillary ink absorption into paper fibers, micro-rotation, and organic pressure variations.
Naive digital composites (such as pasting a transparent PNG or stamping uniform digital fonts) suffer from an artificial "sticker overlay" look. InstantFilmFrame restores authentic physical presence through a unified multi-layer optical, geometric, and ink-physics pipeline:
| Aspect & Philosophy | Naive Digital Overlay | Generic Framing Nodes | InstantFilmFrame (Physical Modeling) |
| :--- | :---: | :---: | :---: |
| Photo Window Corners (Die-Cut) | ❌ Sharp 90° pin corners | ⚠️ Simple CSS-style round rect | ✅ Millimeter Die-Cut Microradius (inner_radius: 0.45%) |
| Frame Thickness & Depth | ❌ Flat fill with no depth | ⚠️ Uniform drop shadow | ✅ Inner Drop Shadow & Cross-Section Highlight (Paper card depth) |
| Margin Handwriting | ❌ Mechanically aligned digital text | ❌ Uniform font stamp | ✅ Organic Per-Glyph Jitter (Subtle rotation, Y-jitter, baseline preservation) |
| Pen Ink Physics | ❌ Flat RGB solid fill | ❌ Alpha blending only | ✅ Capillary Ink Bleed & Physical Profiles (Permanent marker, opaque paint, glitter reflection) |
| Photo & Frame Integration | ❌ Input image sits detached on top | ⚠️ Static LUT overlay | ✅ 0–100 Photochemical Emulation (Lifted toe, highlight roll-off, dye clouds, vignetting) |
| Modern AI Compositions | ❌ Rigid 1:1 square crop only | ⚠️ Stretched fixed bounds | ✅ Composition-First (Portrait 3:4 / Square 1:1 / Landscape 16:10) |

🎨 Showcase Gallery
InstantFilmFrame is engineered to breathe organic photochemical warmth and tangible paper depth into any visual medium — from vibrant anime and character illustrations to delicate, grain-rich photorealistic photography.

📊 10-Shot Configuration Matrix (Anime & Photorealistic Pairs)
| Case | Theme & Format | Film Tone (film_tone) | Paper Stock (paper_tone) | Pen Ink & Typography (ink_color / font_choice) | Handwritten Caption & Date |
| :---: | :--- | :--- | :--- | :--- | :--- |
| 01 | Summer Memory<br>Portrait (Vertical)<br>instax mini (3:4) | Modern Clear (instax)<br>Strength: 60% | Pure White<br>Texture: 35 | Posca Pink (Opaque Paint)<br>• Anime: Seto Font<br>• Real: Zen Kurenaido | • Anime: 夏休み初日! (2026.08.01)<br>• Real: 縁側のサイダー、夏の午後。 ('26 08.01) |
| 02 | Sunset Nostalgia<br>Portrait (Vertical)<br>instax mini (3:4) | Warm Amber (70s Vintage)<br>Strength: 70% | Aged Vintage<br>Texture: 55 | Marker Black (Permanent)<br>• Both: Zen Kurenaido | • Anime: 放課後、いつもの場所で。 (17:45)<br>• Real: 夕暮れの防波堤にて。 (17:45) |
| 03 | Retro Diner & Soda<br>Square (Polaroid)<br>Polaroid 600 (1:1) | • Anime: Vivid Pop (65%)<br>• Real: Warm Amber (65%) | Warm Ivory<br>Texture: 45 | Marker Black (Permanent)<br>• Anime: 851 MakaPop<br>• Real: Slackside One | • Anime: お気に入りの純喫茶にて☆ ('83 07 14)<br>• Real: Classic Diner on Route 66 ('75 06 20) |
| 04 | Midnight Noir<br>Square (Polaroid)<br>Polaroid Black (1:1) | Cinematic Teal (Moody Film)<br>Strength: 75% | Matte Black<br>Texture: 40 | Metallic Silver (Glitter)<br>• Both: Cinecaption | • Anime: Midnight wanderer. (02:15 AM)<br>• Real: Midnight sanctuary. (01:45 AM) |
| 05 | Coastal Roadtrip<br>Landscape (Wide)<br>instax WIDE (16:10) | Cool Cyan (90s Snap)<br>Strength: 65% | Pure White<br>Texture: 40 | Marker Blue (Permanent)<br>• Both: Tekitou Poem | • Anime: 風が気持ちいい!海沿いドライブ ('98 08 12)<br>• Real: 海沿いハイウェイ、夏の午後。 ('98 08 14) |
🔍 Side-by-Side Visual Comparisons (Anime vs. Photorealistic)
Case 01 — Summer Memory (Portrait / instax mini 3:4)
Crisp summer daylight paired with Modern Clear (instax) high-key skin tone preservation, Pure White polymer card stock, and opaque acrylic Posca Pink lettering.

Case 02 — Sunset Nostalgia (Portrait / instax mini 3:4)
Golden hour warmth enhanced by Warm Amber (70s Vintage) optical vignetting, oxidized Aged Vintage card stock (paper_texture: 55), and Zen Kurenaido ballpoint notes.

Case 03 — Retro Diner & Cream Soda (Square / Polaroid 600 1:1)
Classic 1:1 Polaroid proportions on Warm Ivory paper, pairing Showa-era retro cafe pop (Vivid Pop + 851 MakaPop) with a 1970s Route 66 diner snapshot (Warm Amber + Slackside One).

Case 04 — Midnight Cinematic Noir (Square / Polaroid Black 1:1)
Moody urban night scenes developed with Cinematic Teal (Moody Film) (75%), framed in Matte Black card stock with specular Metallic Silver glitter ink and Cinecaption cinema subtitle typography.

Case 05 — Coastal Highway Roadtrip (Landscape / instax WIDE 16:10)
Expansive 16:10 wide-angle roadtrip snapshots graded with Cool Cyan (90s Snap) chemistry and signed with Marker Blue (Permanent) chisel-tip ink in Tekitou Poem.

See candidate-photo/SHOWCASE_PARAMETERS.md for the complete parameter reference and Python InstantFrameConfig definitions, or regenerate all showcase graphics directly via:
python scripts/render_candidate_photos.py
</details>
🧪 0–100 Photochemical Development Emulation (emulation_strength)
A continuous slider providing complete control over chemical film development. From non-destructive bypass (0) for creators grading in external nodes to rich vintage chemistry (100):

0%(Non-Destructive Bypass): Preserves input image pixels 100% untouched. Composes the physical card and handwritten notes while leaving all source color grading intact.25%(Subtle Tone): Gentle optical softening and contrast relaxation. Removes digital harshness while maintaining natural color tonality.50%(Balanced Film - Recommended Everyday Setting): Authentic lifted blacks (toe) and plastic lens peripheral vignetting. The golden balance for everyday snapshots.75%(Vivid Instant): Creamy highlight roll-off (shoulder) and distinctive cyan-purple / warm amber split toning characteristic of instant chemistry.100%(Deep Chemistry): Dense luminance-weighted dye cloud grain, chemical reagent roller spread variations, and pronounced tunnel vignetting.
📜 0–100 Paper Texture & Aging Slider (paper_texture)
Smoothly controls the tactile card surface and temporal aging through a dual-separated mathematical curve:

0%(Flat Digital): Completely flat digital solid color with zero paper noise or texture.25%(Smooth Polymer): Sleek industrial polymer card feel resembling a brand-new instax print (clean die-cut bevel and subtle satin sheen).50%(Natural Fiber - Recommended Balance): Natural pulp fiber embossing, gentle card waviness, and balanced warmth of an authentic photographic print.75%(Mild Aging): Gentle sun tanning from album storage and delicate amber oxidation around card borders.100%(Vintage Patina): Heavy yellowing, foxing spots (fungal & oxidation marks), and rich fibrous texture accumulated across decades.
✍️ 0–100 Organic Handwriting Wobble Slider (handwriting_wobble)
Controls the organic human micro-jitter, per-glyph angle rotation, and wrist pivot arcs across margin handwriting. Transforms rigid digital alignment into lively, authentic handwritten memories:

0%(Mechanical Alignment): Zero per-character rotation, rigid baseline adherence, and perfectly uniform character spacing. Resembles modern precision typography or machine label prints.25%(Neat Penmanship): Careful, tidy handwriting with subtle micro-jitter. Ideal for neat photo albums, formal signatures, and delicate journal entries.50%(Natural Hand - Recommended Default): Authentic wrist pivot curvature, natural per-glyph tilt variations, and balanced baseline wandering found in everyday snapshots.75%(Casual Scribble): Lively upward baseline inclination, dynamic letter spacing, and spirited character rhythm capturing the spontaneous thrill of travel.100%(Kinetic Freehand): Pronounced slant, dramatic per-character rotation, and expressive kinetic drift reminiscent of quick scribbles on the go.
✒️ Expressive Handwritten Typography & Pen Physics
Margin notes in instant photos are not mere text labels; they convey who captured the memory and wrote the note.
1. 2-Tier Smart Selector (handwriting_style ⇄ font_choice)
Select a style category (Tier 1) to automatically load curated signature fonts (Tier 2):
Diary Pen (Casual Notes):Tekitou Poem(Recommended),Zen Kurenaido,Yomogi,851 Tegaki Zatsu,MushinHeisei Pop (Round Cheki):Seto Font(Recommended),Hachi Maru Pop,FZ KorotaTraveler Marker (Chisel Tip):Tekitou Poem Bold(Recommended),RocknRoll One,Yusei Magic,851 MakaPopArchivist Note (Fountain Pen):Yuji Syuku(Recommended),Klee One,Nani Font,851 ChikaraCinema Monologue (Subtitles & Script):Cinecaption(Recommended - movie subtitles),Caveat Brush,Pinyon Script,Slackside OneAll Fonts (Direct Access): Flat direct selection across all 20 bundled typefaces.
2. Zero-Missing-Glyph Pipeline (~16,100 Kanji Auto-Fallback)
Even when inputting Japanese kanji into Latin or kana-focused typefaces, no broken missing glyph boxes (□) will appear. The engine automatically routes unmapped characters to Tekitou Poem (~16,100 glyphs covering full JIS Levels 1–4).
3. Authentic Pen Ink Physics (14 Color Profiles)
Simulates physical permanent marker bleed into paper fibers, opaque acrylic paint buildup (Posca), specular metallic glitter flakes (Silver pen), fountain pen shading, and rubber stamp gradations.
⚙️ Parameters
| Parameter | Type / Options | Default | Description |
|---|---|---|---|
| frame_format | Portrait (Vertical), Square (Polaroid), Landscape (Wide) | Portrait (Vertical) | Authentic film composition format (instax mini / Polaroid 600 / instax WIDE) |
| fit_mode | Crop to Window, Auto Aspect, Keep Aspect | Crop to Window | Aspect ratio fitting mode (Fill window / Auto detect / Keep source ratio) |
| crop_position | Combo (9 directions) | Center | Composition framing anchor (Center, Top, Bottom, Left, Right, etc.) |
| pan_x / pan_y | FLOAT (-1.0 to 1.0) | 0.0 | Fine position pan offset from the anchor |
| film_tone | Combo (9 profiles) | Auto (Match Format) | Standalone film development tone profile (Auto, Modern Clear, Warm Amber, Cool Cyan, Pastel Muted, Vivid Pop, Classic B&W, Cinematic Teal, Bypass) |
| emulation_strength | INT Slider (0 to 100) | 65 | 0 = non-destructive bypass, 1-100 = photochemical film emulation |
| paper_tone | Auto (Match Format), Pure White, Warm Ivory, Aged Vintage, Matte Black | Auto (Match Format) | Instant card paper color (Smart default linked to composition) |
| paper_texture | INT Slider (0 to 100) | 30 | Physical paper scan texture (Material tactile feel & aging separated engine) |
| caption_text | STRING | "" | Handwritten text on bottom margin (supports Japanese, English, and symbols) |
| date_string | STRING | today | Date text (today, random, or any custom date string) |
| handwriting_style | Combo (5 Styles + All) | Diary Pen (Casual Notes) | Handwriting personality & worldview style category |
| font_choice | Combo (Style-linked) | Auto | Font variant linked to style category (Auto applies recommended default) |
| ink_color | Combo (14 colors) | Marker Black (Permanent) | Pen ink color and physical physics profile (Marker, Posca, Metallic, etc.) |
| layout_mode | Combo (4 Layouts) | Center Caption + Right Date | Margin layout positioning (Center, Left Stacked 2-line, Caption only, Date only) |
| font_scale | FLOAT (0.5 to 2.0) | 1.0 | Font size multiplier |
| handwriting_wobble | INT Slider (0 to 100) | 50 | Handwriting organic wobble (0 = mechanical align, 50 = natural, 100 = rough scribble) |
| seed | INT | 0 | Reproducible seed for random date generation and organic handwriting jitter |
| subject_mask | MASK (optional) | None | Subject mask for automatic composition tracking (SAM / Detector mask support) |
📤 Outputs
image(IMAGE): Rendered instant photo tensor[B, H, W, C].window_mask(MASK): High-precision mask of the photo window with inner die-cut corners[B, H, W].card_mask(MASK): High-precision mask of the outer rounded instant card[B, H, W].caption_out(STRING): The resolved caption and date text.
📦 Installation
Via ComfyUI Manager (Recommended)
- Open ComfyUI Manager.
- Search for
InstantFilmFrameand clickInstall. - Restart ComfyUI.
Manual Installation (Git)
cd ComfyUI/custom_nodes
git clone https://github.com/treeturtlefall-arch/InstantFilmFrame.git
Restart ComfyUI and find the node under image > film > Instant Film Frame (Caption & Emulation).
📄 License
- Source Code: MIT License
- Bundled Fonts: Distributed under open licenses such as SIL Open Font License 1.1, suitable for both personal and commercial use.