# Ref2Font V2 — Contextual Font Atlas Generator (FLUX.2 Klein)
Ref2Font V2 is a specialized LoRA for FLUX.2-klein-9B designed to expand a small reference into a full typography set. Give it a stylized sample of letters ("Aa"), and it will generate a consistent 1280x1280 font atlas including uppercase, lowercase, numbers, and punctuation.
### ✨ V2 Updates
- Fixed Alignment: Letters no longer "jump" or dance; the baseline is much more stable.
- Higher Resolution: Native resolution increased to 1280x1280 (previously 1024).
- Improved Scripts: Updated pipeline for better vectorization (see GitHub).
---
### 🚀 Quick Start (ComfyUI)
1. Input Image: Prepare a 1280x1280 image. It MUST be pure black & white (no gray, no shadows).
2. The "Aa" Rule: For best results, your input image should contain the English letters "A" and "a" in your desired style (see example images). These serve as the stylistic foundation for the rest of the atlas.
3. ⚠️ Mandatory Prompt: To get the correct grid layout, you MUST use this exact prompt:
> Generate letters and symbols "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!?.,;:-" in the style of the letters given to you as a reference.
---
### 🛠️ Required Technical Setup
This LoRA is built for the Klein architecture. You will need these specific models in ComfyUI:
* Base Model: FLUX.2 Klein Base 9B
* Text Encoder: Qwen 3 8B
* VAE: FLUX.2 VAE
---
### 📦 Post-Processing: Create your own .TTF
The output is an image (atlas). To turn this image into a functional font file you can install on your PC, use the automation scripts provided in the GitHub repository.
👉 Get Scripts & Workflow here (GitHub)
TTF Conversion Command (Example):
python flux_pipeline.py ^
--input "path\to\your_atlas.png" ^
--output-dir "output\folder" ^
--no-upscale ^
--use-grid ^
--simplify 0.5 ^
--canvas 1280 ^
--contour-level 0.5 ^
--trace-scale 4 ^
--trace-blur 1.0 ^
--smooth-iters 2 ^
--baseline-mode auto ^
--keep-components 4 ^
--min-component-area 3 ^
--component-center-bias 0.65 ^
--cell-bleed 0.4 ^
--cell-bleed-max 10 ^
--core-overlap-min 0.35 ^
--no-auto-invertDescription
Fixed dataset generation issues
Increased resolution to 1280px
Improved vectorization scripts