| --- |
| title: Quarter V5 Inverse Design |
| sdk: gradio |
| python_version: "3.10" |
| app_file: app.py |
| suggested_hardware: t4-small |
| startup_duration_timeout: 1h |
| pinned: false |
| --- |
| |
| # Quarter V5 Inverse Design |
|
|
| Local Gradio-first scaffold for the `aim4composites` Hugging Face Space. |
|
|
| Key points: |
|
|
| - uses the quarter-v5 cubic model |
| - keeps the `7`-curve requirement flow |
| - keeps `vxy` and `vyx` as `2`-input requirements |
| - generates `3` candidates and selects the closest one |
| - runs thermoforming from the selected design |
| - supports either Hugging Face ZeroGPU or a dedicated `Nvidia T4 small` Space |
|
|
| ## Local run |
|
|
| ```bash |
| python app.py |
| ``` |
|
|
| ## Notes for HF Space deployment |
|
|
| - This folder now bundles the quarter-v5 checkpoint, the minimal metadata/test files needed for inference, and the quarter simulation assets under `assets/`. |
| - Local absolute paths are optional overrides through `MG_CHECKPOINT_DIR`, `MG_DATA_DIR`, `MG_CURVE_DIR`, and `MG_QUARTER_DATA_GEN_DIR`. |
| - The Space recommends `t4-small` via `suggested_hardware`, but Hugging Face will not assign paid hardware automatically. The actual hardware still needs to be selected in the Space settings. |
| - For ZeroGPU, keep `spaces` installed and keep generation wrapped by `@spaces.GPU`; that decorator is effect-free on non-ZeroGPU hardware. |
| - Thermoforming latency is mostly CPU-bound. Dedicated tuning knobs are exposed through: |
| - `MG_DEFAULT_N_GENERATE` |
| - `MG_MAX_GENERATE` |
| - `MG_THERMO_RESTARTS` |
| - `MG_THERMO_EPOCHS` |
| - Default settings are chosen to stay practical on `Nvidia T4 small` while keeping the main inverse-design path compatible with ZeroGPU. |
|
|