From Prompt to CAD: Text-to-Floor-Plan with FLUX
A two-stage pipeline for layout generation: fine-tuned FLUX.1-dev for raster plans, then OpenCV raster-to-vector export for DXF and JSON metadata.
Architects and designers need draft layouts fast — but PNG outputs from generative models are not CAD-ready. FloorGen AI bridges that gap with a pipeline from natural language to editable geometry.
Stage one uses structured prompt engineering and a fine-tuned FLUX.1-dev model trained on professional floor plans. Stage two runs raster-to-vector conversion with OpenCV and exports layered DXF plus JSON room metadata.
Exports that matter in practice
DXF files with walls, doors, furniture, and text layers import into AutoCAD, Revit, and Blender. JSON stores rooms, areas, labels, and dimensions for downstream automation.
Annotated PNGs support quick review before handoff to detailed drafting.
Open source details
The FloorGen repository documents training data scale, Hugging Face Diffusers setup, ezdxf export, and a Gradio demo for interactive generation.
See the FloorGen AI case study for screenshots, GitHub facts, and the full stack.