--- title: HiFi-BRep Generation emoji: 📐 colorFrom: pink colorTo: purple sdk: gradio sdk_version: 5.50.0 app_file: app.py short_description: Generate 3D B-Rep CAD structures with HiFi-BRep python_version: "3.10" startup_duration_timeout: 10m --- # HiFi-BRep: High-Fidelity Latent Representation for Robust B-Rep Generation This Space demonstrates unconditional generation of 3D B-Rep CAD structures using the [HiFi-BRep](https://huggingface.co/papers/2608.16485) diffusion model. ## How it works 1. A DiT (Diffusion Transformer) model generates latent representations via DDIM sampling 2. A VAE decoder transforms latents into B-spline surface/edge control points, bounding boxes, and face-edge adjacency predictions 3. The geometry is reconstructed as a 3D point cloud and mesh for visualization ## Model - **Weights**: [1nnoh/HiFi-BRep](https://huggingface.co/1nnoh/HiFi-BRep) - **Variant**: DeepCAD 4-30 (4-30 faces range) - **Code**: [github.com/1nnoh/HiFi-BRep](https://github.com/1nnoh/HiFi-BRep) ## Note The original reconstruction pipeline uses OpenCascade (pythonocc-core) for full B-Rep solid construction and STEP file export. Since pythonocc-core is conda-only and not pip-installable on Hugging Face Spaces, this demo reconstructs the geometry using pure numpy B-spline evaluation and displays it as a 3D mesh. The diffusion + decoder pipeline runs identically to the original code.