autoforge 1.9.7__tar.gz → 2.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. {autoforge-1.9.7/src/AutoForge.egg-info → autoforge-2.0.1}/PKG-INFO +40 -10
  2. autoforge-1.9.7/PKG-INFO → autoforge-2.0.1/README.md +32 -39
  3. {autoforge-1.9.7 → autoforge-2.0.1}/pyproject.toml +17 -2
  4. autoforge-1.9.7/README.md → autoforge-2.0.1/src/AutoForge.egg-info/PKG-INFO +69 -8
  5. {autoforge-1.9.7 → autoforge-2.0.1}/src/AutoForge.egg-info/SOURCES.txt +22 -9
  6. {autoforge-1.9.7 → autoforge-2.0.1}/src/AutoForge.egg-info/requires.txt +7 -0
  7. {autoforge-1.9.7 → autoforge-2.0.1}/src/autoforge/Helper/AmpUtils.py +58 -19
  8. autoforge-2.0.1/src/autoforge/Helper/DeviceUtils.py +259 -0
  9. {autoforge-1.9.7 → autoforge-2.0.1}/src/autoforge/Helper/Heightmaps/DepthEstimateHeightMap.py +21 -4
  10. {autoforge-1.9.7 → autoforge-2.0.1}/src/autoforge/Helper/Heightmaps/FastTSPHeightMap.py +42 -24
  11. {autoforge-1.9.7 → autoforge-2.0.1}/src/autoforge/Helper/ImageHelper.py +29 -0
  12. {autoforge-1.9.7 → autoforge-2.0.1}/src/autoforge/Helper/OptimizerHelper.py +94 -23
  13. {autoforge-1.9.7 → autoforge-2.0.1}/src/autoforge/Helper/OtherHelper.py +30 -9
  14. {autoforge-1.9.7 → autoforge-2.0.1}/src/autoforge/Helper/OutputHelper.py +128 -145
  15. {autoforge-1.9.7 → autoforge-2.0.1}/src/autoforge/Helper/PruningHelper.py +45 -28
  16. autoforge-2.0.1/src/autoforge/Helper/filamentcolors_library.py +345 -0
  17. {autoforge-1.9.7 → autoforge-2.0.1}/src/autoforge/Loss/LossFunctions.py +5 -3
  18. {autoforge-1.9.7 → autoforge-2.0.1}/src/autoforge/Modules/Optimizer.py +464 -64
  19. {autoforge-1.9.7 → autoforge-2.0.1}/src/autoforge/auto_forge.py +79 -22
  20. autoforge-2.0.1/src/autoforge/data/filamentcolors_catalog.json +10216 -0
  21. autoforge-2.0.1/src/autoforge/webui/api/filaments.py +280 -0
  22. autoforge-2.0.1/src/autoforge/webui/api/images.py +49 -0
  23. autoforge-2.0.1/src/autoforge/webui/api/init.py +369 -0
  24. {autoforge-1.9.7 → autoforge-2.0.1}/src/autoforge/webui/api/optimization.py +125 -22
  25. autoforge-2.0.1/src/autoforge/webui/api/outputs.py +212 -0
  26. autoforge-2.0.1/src/autoforge/webui/api/preview.py +163 -0
  27. {autoforge-1.9.7 → autoforge-2.0.1}/src/autoforge/webui/api/project.py +6 -1
  28. autoforge-2.0.1/src/autoforge/webui/api/pruning.py +471 -0
  29. autoforge-2.0.1/src/autoforge/webui/api/sliders.py +107 -0
  30. autoforge-2.0.1/src/autoforge/webui/api/state.py +63 -0
  31. autoforge-2.0.1/src/autoforge/webui/api/system.py +189 -0
  32. {autoforge-1.9.7 → autoforge-2.0.1}/src/autoforge/webui/api/ws.py +28 -6
  33. autoforge-2.0.1/src/autoforge/webui/config.py +80 -0
  34. {autoforge-1.9.7 → autoforge-2.0.1}/src/autoforge/webui/helpers/colored_mesh.py +141 -21
  35. autoforge-2.0.1/src/autoforge/webui/helpers/gpu_memory.py +80 -0
  36. autoforge-2.0.1/src/autoforge/webui/helpers/mesh_persist.py +78 -0
  37. {autoforge-1.9.7 → autoforge-2.0.1}/src/autoforge/webui/helpers/pipeline_runner.py +216 -59
  38. {autoforge-1.9.7 → autoforge-2.0.1}/src/autoforge/webui/helpers/slider_render.py +161 -28
  39. autoforge-2.0.1/src/autoforge/webui/helpers/sliders.py +233 -0
  40. autoforge-2.0.1/src/autoforge/webui/helpers/telemetry.py +113 -0
  41. autoforge-2.0.1/src/autoforge/webui/models.py +219 -0
  42. {autoforge-1.9.7 → autoforge-2.0.1}/src/autoforge/webui/server.py +21 -4
  43. autoforge-2.0.1/src/autoforge/webui/services/catalog_service.py +150 -0
  44. autoforge-2.0.1/src/autoforge/webui/services/filament_service.py +418 -0
  45. {autoforge-1.9.7 → autoforge-2.0.1}/src/autoforge/webui/services/image_service.py +14 -2
  46. autoforge-2.0.1/src/autoforge/webui/services/optimization_service.py +455 -0
  47. {autoforge-1.9.7 → autoforge-2.0.1}/src/autoforge/webui/services/project_service.py +39 -1
  48. autoforge-2.0.1/tests/test_amp_utils.py +94 -0
  49. autoforge-2.0.1/tests/test_auto_forge_cli.py +60 -0
  50. autoforge-2.0.1/tests/test_bug_regressions.py +413 -0
  51. autoforge-2.0.1/tests/test_bugfixes_2026_09_26.py +413 -0
  52. autoforge-2.0.1/tests/test_cadamw.py +148 -0
  53. autoforge-2.0.1/tests/test_christofides_heightmap.py +183 -0
  54. autoforge-2.0.1/tests/test_composite_image.py +269 -0
  55. {autoforge-1.9.7 → autoforge-2.0.1}/tests/test_depth_adjusted_height_map.py +1 -1
  56. autoforge-2.0.1/tests/test_device_utils.py +287 -0
  57. autoforge-2.0.1/tests/test_fasttsp_heightmap.py +149 -0
  58. autoforge-2.0.1/tests/test_filament_helper.py +186 -0
  59. autoforge-2.0.1/tests/test_filamentcolors_library.py +345 -0
  60. autoforge-2.0.1/tests/test_image_helper.py +118 -0
  61. autoforge-2.0.1/tests/test_loss_functions.py +166 -0
  62. autoforge-2.0.1/tests/test_optimizer_training.py +361 -0
  63. autoforge-2.0.1/tests/test_other_helper.py +81 -0
  64. autoforge-2.0.1/tests/test_output_helper.py +160 -0
  65. autoforge-2.0.1/tests/test_perception_loss.py +65 -0
  66. autoforge-2.0.1/tests/test_pipeline_smoke.py +209 -0
  67. autoforge-2.0.1/tests/test_prune_repeatability.py +375 -0
  68. autoforge-2.0.1/tests/test_pruning_helper.py +102 -0
  69. autoforge-2.0.1/tests/test_webui_backend.py +505 -0
  70. autoforge-2.0.1/tests/test_webui_regressions.py +351 -0
  71. autoforge-1.9.7/src/autoforge/Helper/filamentcolors_library.py +0 -164
  72. autoforge-1.9.7/src/autoforge/webui/api/filaments.py +0 -128
  73. autoforge-1.9.7/src/autoforge/webui/api/images.py +0 -24
  74. autoforge-1.9.7/src/autoforge/webui/api/init.py +0 -37
  75. autoforge-1.9.7/src/autoforge/webui/api/outputs.py +0 -96
  76. autoforge-1.9.7/src/autoforge/webui/api/preview.py +0 -84
  77. autoforge-1.9.7/src/autoforge/webui/api/pruning.py +0 -175
  78. autoforge-1.9.7/src/autoforge/webui/api/sliders.py +0 -30
  79. autoforge-1.9.7/src/autoforge/webui/api/state.py +0 -38
  80. autoforge-1.9.7/src/autoforge/webui/api/system.py +0 -103
  81. autoforge-1.9.7/src/autoforge/webui/config.py +0 -27
  82. autoforge-1.9.7/src/autoforge/webui/helpers/sliders.py +0 -104
  83. autoforge-1.9.7/src/autoforge/webui/models.py +0 -118
  84. autoforge-1.9.7/src/autoforge/webui/services/filament_service.py +0 -261
  85. autoforge-1.9.7/src/autoforge/webui/services/optimization_service.py +0 -212
  86. autoforge-1.9.7/tests/test_amp_autocast_probe.py +0 -52
  87. autoforge-1.9.7/tests/test_cadamw.py +0 -50
  88. autoforge-1.9.7/tests/test_christofides_height_map.py +0 -63
  89. autoforge-1.9.7/tests/test_christofides_heightmap.py +0 -70
  90. autoforge-1.9.7/tests/test_filament_and_output.py +0 -105
  91. autoforge-1.9.7/tests/test_filament_helper.py +0 -75
  92. autoforge-1.9.7/tests/test_heightmap_init.py +0 -54
  93. autoforge-1.9.7/tests/test_image_helper.py +0 -42
  94. autoforge-1.9.7/tests/test_loss_functions.py +0 -33
  95. autoforge-1.9.7/tests/test_optimizer_helper.py +0 -65
  96. autoforge-1.9.7/tests/test_optimizer_smoke.py +0 -59
  97. autoforge-1.9.7/tests/test_output_helper.py +0 -105
  98. autoforge-1.9.7/tests/test_output_helper_extended.py +0 -88
  99. autoforge-1.9.7/tests/test_perception_and_pruning.py +0 -103
  100. autoforge-1.9.7/tests/test_pruning_helper.py +0 -89
  101. {autoforge-1.9.7 → autoforge-2.0.1}/setup.cfg +0 -0
  102. {autoforge-1.9.7 → autoforge-2.0.1}/src/AutoForge.egg-info/dependency_links.txt +0 -0
  103. {autoforge-1.9.7 → autoforge-2.0.1}/src/AutoForge.egg-info/entry_points.txt +0 -0
  104. {autoforge-1.9.7 → autoforge-2.0.1}/src/AutoForge.egg-info/top_level.txt +0 -0
  105. {autoforge-1.9.7 → autoforge-2.0.1}/src/autoforge/Helper/CAdamW.py +0 -0
  106. {autoforge-1.9.7 → autoforge-2.0.1}/src/autoforge/Helper/FilamentHelper.py +0 -0
  107. {autoforge-1.9.7 → autoforge-2.0.1}/src/autoforge/Helper/Heightmaps/ChristofidesHeightMap.py +0 -0
  108. {autoforge-1.9.7 → autoforge-2.0.1}/src/autoforge/Helper/Heightmaps/__init__.py +0 -0
  109. {autoforge-1.9.7 → autoforge-2.0.1}/src/autoforge/Helper/__init__.py +0 -0
  110. {autoforge-1.9.7 → autoforge-2.0.1}/src/autoforge/Init_comparer/__init__.py +0 -0
  111. {autoforge-1.9.7 → autoforge-2.0.1}/src/autoforge/Init_comparer/auto_forge_init_check.py +0 -0
  112. {autoforge-1.9.7 → autoforge-2.0.1}/src/autoforge/Init_comparer/plot_results.py +0 -0
  113. {autoforge-1.9.7 → autoforge-2.0.1}/src/autoforge/Loss/PerceptionLoss.py +0 -0
  114. {autoforge-1.9.7 → autoforge-2.0.1}/src/autoforge/Loss/__init__.py +0 -0
  115. {autoforge-1.9.7 → autoforge-2.0.1}/src/autoforge/Misc/__init__.py +0 -0
  116. {autoforge-1.9.7 → autoforge-2.0.1}/src/autoforge/Misc/color_fit_all.py +0 -0
  117. {autoforge-1.9.7 → autoforge-2.0.1}/src/autoforge/Modules/__init__.py +0 -0
  118. {autoforge-1.9.7 → autoforge-2.0.1}/src/autoforge/__init__.py +0 -0
  119. {autoforge-1.9.7 → autoforge-2.0.1}/src/autoforge/__main__.py +0 -0
  120. {autoforge-1.9.7 → autoforge-2.0.1}/src/autoforge/priority_mask_editor.py +0 -0
  121. {autoforge-1.9.7 → autoforge-2.0.1}/src/autoforge/webui/__init__.py +0 -0
  122. {autoforge-1.9.7 → autoforge-2.0.1}/src/autoforge/webui/api/__init__.py +0 -0
  123. {autoforge-1.9.7 → autoforge-2.0.1}/src/autoforge/webui/api/settings.py +0 -0
  124. {autoforge-1.9.7 → autoforge-2.0.1}/src/autoforge/webui/helpers/__init__.py +0 -0
  125. {autoforge-1.9.7 → autoforge-2.0.1}/src/autoforge/webui/services/__init__.py +0 -0
  126. {autoforge-1.9.7 → autoforge-2.0.1}/tests/test_depth_estimate_height_map.py +0 -0
  127. {autoforge-1.9.7 → autoforge-2.0.1}/tests/test_end_to_end_optimizer.py +0 -0
  128. {autoforge-1.9.7 → autoforge-2.0.1}/tests/test_flatforge.py +0 -0
  129. {autoforge-1.9.7 → autoforge-2.0.1}/tests/test_optimizer_module.py +0 -0
  130. {autoforge-1.9.7 → autoforge-2.0.1}/tests/test_property_based.py +0 -0
  131. {autoforge-1.9.7 → autoforge-2.0.1}/tests/test_remove_height_spikes.py +0 -0
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: AutoForge
3
- Version: 1.9.7
4
- Summary: AutoForge is a Python tool for generating 3D printed layered models from an input image.
3
+ Version: 2.0.1
4
+ Summary: AutoForge - 3D color images made easy
5
5
  Author-email: Hendric Voss <hvoss@techfak.uni-bielefeld.de>
6
6
  License: CC BY-NC-SA 4.0
7
7
  Requires-Python: >=3.10
@@ -28,17 +28,22 @@ Requires-Dist: python-multipart>=0.0.12
28
28
  Requires-Dist: aiofiles>=24.1.0
29
29
  Requires-Dist: websockets>=15.0
30
30
  Requires-Dist: pydantic-settings>=2.0.0
31
+ Requires-Dist: posthog>=3.7.0
32
+ Provides-Extra: test
33
+ Requires-Dist: pytest>=7.4; extra == "test"
34
+ Requires-Dist: pytest-cov; extra == "test"
35
+ Requires-Dist: hypothesis; extra == "test"
36
+ Requires-Dist: httpx>=0.27; extra == "test"
31
37
 
32
38
  # AutoForge
33
39
 
34
40
  AutoForge is a Python tool for generating 3D printed layered models from an input image. Using a learned optimization strategy with a Gumbel softmax formulation, AutoForge assigns materials per layer and produces both a discretized composite image and a 3D-printable STL file. It also generates swap instructions to guide the printer through material changes during a multi-material print.
35
41
 
36
- **TLDR:** It uses a picture to generate a 3D layer image that you can print with a 3d printer. Similar to [Hueforge](https://shop.thehueforge.com/), but without the manual work (and without the artistic control).
42
+ **TLDR:** It uses a picture to generate a 3D layer image that you can print with a 3d printer. Similar to [Hueforge](https://shop.thehueforge.com/), but without the manual work.
43
+
44
+ ![2.0_webui.png](images/webui/2.0_webui.png)
37
45
 
38
46
 
39
- ## You can now run Autoforge for free in your browser thanks to [Huggingface space support](https://huggingface.co/spaces/hvoss-techfak/Autoforge).
40
- This includes the option to run it locally if you have a powerful pc and don't want to limit yourself to the Huggingface computing limits. \
41
- For this simply go to the [Huggingface](https://huggingface.co/spaces/hvoss-techfak/Autoforge) space and pull the docker container for this project (upper right corner -> three dots -> "run locally")
42
47
 
43
48
  ## Example
44
49
  All examples use only the 27 BambuLab Basic PLA filaments, currently available in Hueforge 0.9.0, the background color is set to black.
@@ -74,19 +79,29 @@ The pruning is set to a maximum of 8 color and 20 swaps, so each image uses at m
74
79
 
75
80
  ## Web UI: One-Click Install & Run
76
81
 
77
- The easiest way to use AutoForge is the web UI — a local app (like ComfyUI) with drag-and-drop image upload, a filament library, live sliders for adjusting colors after optimization, and pruning. No command-line arguments needed.
82
+
83
+ The easiest way to use AutoForge is the web UI, a local app with drag-and-drop image upload, a filament library, live sliders for adjusting colors after optimization, and pruning. No command-line arguments needed.
78
84
 
79
85
  1. **Clone this repository** (or download and extract the ZIP from the green "Code" button on GitHub).
80
86
  2. **Install**, from the project folder:
81
87
  - Linux/macOS: `./install.sh`
82
88
  - Windows: double-click `install.bat` (or run it from a terminal)
83
89
 
84
- This installs [`uv`](https://docs.astral.sh/uv/) (a fast Python package manager) if you don't already have it, installs all Python dependencies, and builds the web UI. You'll need [Node.js](https://nodejs.org/) installed for that last step — the installer will tell you if it's missing.
90
+ This installs [`uv`](https://docs.astral.sh/uv/) (a fast Python package manager) if you don't already have it, installs all Python dependencies, and builds the web UI. You'll need [Node.js](https://nodejs.org/) installed for that last step, the installer will tell you if it's missing.
85
91
  3. **Run**:
86
92
  - Linux/macOS: `./run_webui.sh`
87
93
  - Windows: double-click `run_webui.bat`
88
94
 
89
95
  This starts the server and opens the web UI in your browser automatically (usually at `http://localhost:8000`).
96
+
97
+ To make some parts of the picture come out closer than the rest (a face, the eyes, lettering), click **Focus** in the image panel and paint over them; a slider sets how much more they count (2× to 100×, default 10×). After a run, the **Differences** view shows where the print strays furthest from the picture.
98
+
99
+ If HueForge is installed on the same computer, the web UI finds your HueForge personal filament library and offers to import it once, on its first start.
100
+
101
+ To find a filament you own without measuring it yourself, click **Catalog** in the filament library. It searches every filament on [filamentcolors.xyz](https://filamentcolors.xyz) that has a measured TD (search by brand, color name, type or hex code; filter by type, brand or color family; or pick a color to see the closest matches first), and **Add** puts it straight into your library.
102
+
103
+ The web UI sends anonymous usage telemetry to the project via [PostHog](https://posthog.com/) by default, to notify me of problems and any bugs. This includes crash reports (unhandled errors from both the browser frontend and the backend server, with the error type, message, and stack trace) so bugs can get fixed faster. No image data, filament data, or personal information is sent. To disable it, pass `--no-telemetry` (e.g. `./run_webui.sh --no-telemetry` / `run_webui.bat --no-telemetry`), or set `AUTOFORGE_WEBUI_TELEMETRY_ENABLED=false` permanently in your environment.
104
+
90
105
  4. **Update to the latest release** whenever you want, from the project folder:
91
106
  - Linux/macOS: `./update.sh`
92
107
  - Windows: double-click `update.bat`
@@ -94,7 +109,7 @@ The easiest way to use AutoForge is the web UI — a local app (like ComfyUI) wi
94
109
  This checks GitHub for a newer release and, if one exists, pulls it and reinstalls dependencies for you. Add `--check` to only check without applying it (e.g. `./update.sh --check`).
95
110
 
96
111
  If you have problems running the code on your GPU, please refer to the [Pytorch Homepage](https://pytorch.org/) for help. \
97
- CUDA, ROCm, and MPS (Apple Metal) are supported, but you need to install the correct version of pytorch for your system — `install.sh`/`install.bat` install whatever `uv sync` resolves by default, so swap in a GPU-specific PyTorch build afterwards if you need one.
112
+ CUDA, ROCm, and MPS (Apple Metal) are supported, but you need to install the correct version of pytorch for your system — `install.sh`/`install.bat` install whatever `uv sync` resolves by default, so swap in a GPU-specific PyTorch build afterwards if you need one. (`install.sh` handles older NVIDIA GPUs automatically, see below.)
98
113
 
99
114
  ## Manual Installation (CLI only)
100
115
 
@@ -170,6 +185,8 @@ This will generate separate STL files for each color, allowing you to print face
170
185
  - `--nozzle_diameter` Diameter of the printer nozzle in millimeters (default: 0.4).
171
186
  **Note:** Details smaller than half this value will be ignored.
172
187
  - `--early_stopping` Number of steps without improvement before stopping (default: 10000).
188
+ - `--priority_mask` *(Optional)* Path to a greyscale image the size of the input that marks the parts that matter most: white areas are matched more closely, black areas still count, just less.
189
+ - `--priority_mask_strength` How many times more a white pixel of `--priority_mask` counts than a black one (default: 10; must be at least 1). Raise it if the marked areas still come out off, lower it for a gentler nudge.
173
190
 
174
191
  - `--flatforge` Enable FlatForge mode to generate separate STL files for each color (default: False).
175
192
  **Note:** FlatForge creates flat prints where each color is its own STL file, allowing face-down printing for smooth, resin-like finishes. Requires a multi-material printer (AMS, MMU, or tool changer).
@@ -187,7 +204,8 @@ This will generate separate STL files for each color, allowing you to print face
187
204
  - `--pruning_max_swaps` Max number of swaps allowed after pruning (default: 100).
188
205
  - `--pruning_max_layer` Max number of layers allowed after pruning (default: 75).
189
206
  - `--random_seed` Random seed for reproducibility (default: 0 (disabled)).
190
- - `--mps` Flag to use the Metal Performance Shaders (MPS) backend if available.
207
+ - `--device` Torch device to run on, e.g. `cuda`, `cuda:1`, `mps`, `cpu`. Defaults to auto-detection: CUDA/ROCm first, then Apple Metal (MPS), then CPU. Can also be set with the `AUTOFORGE_DEVICE` environment variable.
208
+ - `--mps` *Deprecated* — Apple Metal is now detected automatically, so this flag is no longer needed. It still works, and forces MPS on a machine that also exposes a CUDA GPU; prefer `--device mps`.
191
209
  - `--no-spike-removal` Disable spike removal for the final STL (not recommended).
192
210
 
193
211
  - `--tensorboard` Flag to enable TensorBoard logging.
@@ -216,6 +234,10 @@ After running, the following files will be created in your specified output fold
216
234
 
217
235
  *Note:* FlatForge generates multiple STL files that align perfectly when loaded together in your slicer, creating a solid rectangular print with each color as a separate object.
218
236
 
237
+ ## You can now run Autoforge for free in your browser thanks to [Huggingface space support](https://huggingface.co/spaces/hvoss-techfak/Autoforge).
238
+ This includes the option to run it locally if you have a powerful pc and don't want to limit yourself to the Huggingface computing limits. \
239
+ For this simply go to the [Huggingface](https://huggingface.co/spaces/hvoss-techfak/Autoforge) space and pull the docker container for this project (upper right corner -> three dots -> "run locally")
240
+
219
241
  ## Development
220
242
 
221
243
  To have a "nightly" version of the repository or have live updating changes during development please do the following:
@@ -228,6 +250,8 @@ conda activate forge
228
250
  pip install -e .
229
251
  ```
230
252
 
253
+ To refresh the bundled filamentcolors.xyz catalog (`src/autoforge/data/filamentcolors_catalog.json`) before a release, run `./generate_filamentcolors_library.sh`. It downloads the whole catalog once, pausing 2 seconds between pages (`--delay` sets the pause; requests are never less than 1 second apart), and keeps only the filaments that have a TD.
254
+
231
255
  If the installed pytorch version has no cuda support execute the following:
232
256
 
233
257
  ```bash
@@ -245,12 +269,18 @@ pip install torch torchvision torchaudio --index-url https://download.pytorch.or
245
269
  AutoForge © 2025 by Hendric Voss is licensed under [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/).
246
270
  The software is provided as-is and comes with no warranty or guarantee of support.
247
271
 
272
+ The above license applies to the software itself. How you use the generated files and prints is entirely up to you. If you want to print them for your friends or family, that's great. If you want to sell them, that's fine by me too.
273
+
274
+ From a licensing standpoint, this means that the prints you create are entirely subject to the [MIT License](https://opensource.org/licenses/MIT), and you can do whatever you like with them. The only thing the MIT License does not give you is a warranty, and it also frees me from any liability with regard to your 3D prints. Otherwise, do whatever you like.
275
+
276
+ I would love to see what you have done with the software, so it would be great if you could send me a link to your work (even if it's just for selling). However, this is not necessary if you do not want to.
248
277
 
249
278
  ## Acknowledgements
250
279
 
251
280
  First and foremost:
252
281
  - [Hueforge](https://shop.thehueforge.com/) for providing the inspiration for this project.
253
282
  Without it, this project would not have been possible.
283
+ - [filamentcolors.xyz](https://filamentcolors.xyz) and its community for the measured filament swatches and TD values in the web UI's filament catalog.
254
284
 
255
285
  AutoForge makes use of several open source libraries:
256
286
 
@@ -1,44 +1,12 @@
1
- Metadata-Version: 2.4
2
- Name: AutoForge
3
- Version: 1.9.7
4
- Summary: AutoForge is a Python tool for generating 3D printed layered models from an input image.
5
- Author-email: Hendric Voss <hvoss@techfak.uni-bielefeld.de>
6
- License: CC BY-NC-SA 4.0
7
- Requires-Python: >=3.10
8
- Description-Content-Type: text/markdown
9
- Requires-Dist: numpy
10
- Requires-Dist: torch>=2.9.1
11
- Requires-Dist: torchvision>=0.21.0
12
- Requires-Dist: transformers>=4.48.1
13
- Requires-Dist: opencv-python>=4.2.0.32
14
- Requires-Dist: matplotlib>=3.3.0
15
- Requires-Dist: configargparse>=1.2.3
16
- Requires-Dist: tqdm>=4.50.0
17
- Requires-Dist: pandas>=1.1.0
18
- Requires-Dist: scikit-image
19
- Requires-Dist: scikit-learn
20
- Requires-Dist: tensorboard
21
- Requires-Dist: pillow>=11.1.0
22
- Requires-Dist: shapely>=2.0.7
23
- Requires-Dist: trimesh>=4.6.4
24
- Requires-Dist: joblib>=1.4.2
25
- Requires-Dist: uvicorn[standard]>=0.44.0
26
- Requires-Dist: fastapi>=0.115.0
27
- Requires-Dist: python-multipart>=0.0.12
28
- Requires-Dist: aiofiles>=24.1.0
29
- Requires-Dist: websockets>=15.0
30
- Requires-Dist: pydantic-settings>=2.0.0
31
-
32
1
  # AutoForge
33
2
 
34
3
  AutoForge is a Python tool for generating 3D printed layered models from an input image. Using a learned optimization strategy with a Gumbel softmax formulation, AutoForge assigns materials per layer and produces both a discretized composite image and a 3D-printable STL file. It also generates swap instructions to guide the printer through material changes during a multi-material print.
35
4
 
36
- **TLDR:** It uses a picture to generate a 3D layer image that you can print with a 3d printer. Similar to [Hueforge](https://shop.thehueforge.com/), but without the manual work (and without the artistic control).
5
+ **TLDR:** It uses a picture to generate a 3D layer image that you can print with a 3d printer. Similar to [Hueforge](https://shop.thehueforge.com/), but without the manual work.
6
+
7
+ ![2.0_webui.png](images/webui/2.0_webui.png)
37
8
 
38
9
 
39
- ## You can now run Autoforge for free in your browser thanks to [Huggingface space support](https://huggingface.co/spaces/hvoss-techfak/Autoforge).
40
- This includes the option to run it locally if you have a powerful pc and don't want to limit yourself to the Huggingface computing limits. \
41
- For this simply go to the [Huggingface](https://huggingface.co/spaces/hvoss-techfak/Autoforge) space and pull the docker container for this project (upper right corner -> three dots -> "run locally")
42
10
 
43
11
  ## Example
44
12
  All examples use only the 27 BambuLab Basic PLA filaments, currently available in Hueforge 0.9.0, the background color is set to black.
@@ -74,19 +42,29 @@ The pruning is set to a maximum of 8 color and 20 swaps, so each image uses at m
74
42
 
75
43
  ## Web UI: One-Click Install & Run
76
44
 
77
- The easiest way to use AutoForge is the web UI — a local app (like ComfyUI) with drag-and-drop image upload, a filament library, live sliders for adjusting colors after optimization, and pruning. No command-line arguments needed.
45
+
46
+ The easiest way to use AutoForge is the web UI, a local app with drag-and-drop image upload, a filament library, live sliders for adjusting colors after optimization, and pruning. No command-line arguments needed.
78
47
 
79
48
  1. **Clone this repository** (or download and extract the ZIP from the green "Code" button on GitHub).
80
49
  2. **Install**, from the project folder:
81
50
  - Linux/macOS: `./install.sh`
82
51
  - Windows: double-click `install.bat` (or run it from a terminal)
83
52
 
84
- This installs [`uv`](https://docs.astral.sh/uv/) (a fast Python package manager) if you don't already have it, installs all Python dependencies, and builds the web UI. You'll need [Node.js](https://nodejs.org/) installed for that last step — the installer will tell you if it's missing.
53
+ This installs [`uv`](https://docs.astral.sh/uv/) (a fast Python package manager) if you don't already have it, installs all Python dependencies, and builds the web UI. You'll need [Node.js](https://nodejs.org/) installed for that last step, the installer will tell you if it's missing.
85
54
  3. **Run**:
86
55
  - Linux/macOS: `./run_webui.sh`
87
56
  - Windows: double-click `run_webui.bat`
88
57
 
89
58
  This starts the server and opens the web UI in your browser automatically (usually at `http://localhost:8000`).
59
+
60
+ To make some parts of the picture come out closer than the rest (a face, the eyes, lettering), click **Focus** in the image panel and paint over them; a slider sets how much more they count (2× to 100×, default 10×). After a run, the **Differences** view shows where the print strays furthest from the picture.
61
+
62
+ If HueForge is installed on the same computer, the web UI finds your HueForge personal filament library and offers to import it once, on its first start.
63
+
64
+ To find a filament you own without measuring it yourself, click **Catalog** in the filament library. It searches every filament on [filamentcolors.xyz](https://filamentcolors.xyz) that has a measured TD (search by brand, color name, type or hex code; filter by type, brand or color family; or pick a color to see the closest matches first), and **Add** puts it straight into your library.
65
+
66
+ The web UI sends anonymous usage telemetry to the project via [PostHog](https://posthog.com/) by default, to notify me of problems and any bugs. This includes crash reports (unhandled errors from both the browser frontend and the backend server, with the error type, message, and stack trace) so bugs can get fixed faster. No image data, filament data, or personal information is sent. To disable it, pass `--no-telemetry` (e.g. `./run_webui.sh --no-telemetry` / `run_webui.bat --no-telemetry`), or set `AUTOFORGE_WEBUI_TELEMETRY_ENABLED=false` permanently in your environment.
67
+
90
68
  4. **Update to the latest release** whenever you want, from the project folder:
91
69
  - Linux/macOS: `./update.sh`
92
70
  - Windows: double-click `update.bat`
@@ -94,7 +72,7 @@ The easiest way to use AutoForge is the web UI — a local app (like ComfyUI) wi
94
72
  This checks GitHub for a newer release and, if one exists, pulls it and reinstalls dependencies for you. Add `--check` to only check without applying it (e.g. `./update.sh --check`).
95
73
 
96
74
  If you have problems running the code on your GPU, please refer to the [Pytorch Homepage](https://pytorch.org/) for help. \
97
- CUDA, ROCm, and MPS (Apple Metal) are supported, but you need to install the correct version of pytorch for your system — `install.sh`/`install.bat` install whatever `uv sync` resolves by default, so swap in a GPU-specific PyTorch build afterwards if you need one.
75
+ CUDA, ROCm, and MPS (Apple Metal) are supported, but you need to install the correct version of pytorch for your system — `install.sh`/`install.bat` install whatever `uv sync` resolves by default, so swap in a GPU-specific PyTorch build afterwards if you need one. (`install.sh` handles older NVIDIA GPUs automatically, see below.)
98
76
 
99
77
  ## Manual Installation (CLI only)
100
78
 
@@ -170,6 +148,8 @@ This will generate separate STL files for each color, allowing you to print face
170
148
  - `--nozzle_diameter` Diameter of the printer nozzle in millimeters (default: 0.4).
171
149
  **Note:** Details smaller than half this value will be ignored.
172
150
  - `--early_stopping` Number of steps without improvement before stopping (default: 10000).
151
+ - `--priority_mask` *(Optional)* Path to a greyscale image the size of the input that marks the parts that matter most: white areas are matched more closely, black areas still count, just less.
152
+ - `--priority_mask_strength` How many times more a white pixel of `--priority_mask` counts than a black one (default: 10; must be at least 1). Raise it if the marked areas still come out off, lower it for a gentler nudge.
173
153
 
174
154
  - `--flatforge` Enable FlatForge mode to generate separate STL files for each color (default: False).
175
155
  **Note:** FlatForge creates flat prints where each color is its own STL file, allowing face-down printing for smooth, resin-like finishes. Requires a multi-material printer (AMS, MMU, or tool changer).
@@ -187,7 +167,8 @@ This will generate separate STL files for each color, allowing you to print face
187
167
  - `--pruning_max_swaps` Max number of swaps allowed after pruning (default: 100).
188
168
  - `--pruning_max_layer` Max number of layers allowed after pruning (default: 75).
189
169
  - `--random_seed` Random seed for reproducibility (default: 0 (disabled)).
190
- - `--mps` Flag to use the Metal Performance Shaders (MPS) backend if available.
170
+ - `--device` Torch device to run on, e.g. `cuda`, `cuda:1`, `mps`, `cpu`. Defaults to auto-detection: CUDA/ROCm first, then Apple Metal (MPS), then CPU. Can also be set with the `AUTOFORGE_DEVICE` environment variable.
171
+ - `--mps` *Deprecated* — Apple Metal is now detected automatically, so this flag is no longer needed. It still works, and forces MPS on a machine that also exposes a CUDA GPU; prefer `--device mps`.
191
172
  - `--no-spike-removal` Disable spike removal for the final STL (not recommended).
192
173
 
193
174
  - `--tensorboard` Flag to enable TensorBoard logging.
@@ -216,6 +197,10 @@ After running, the following files will be created in your specified output fold
216
197
 
217
198
  *Note:* FlatForge generates multiple STL files that align perfectly when loaded together in your slicer, creating a solid rectangular print with each color as a separate object.
218
199
 
200
+ ## You can now run Autoforge for free in your browser thanks to [Huggingface space support](https://huggingface.co/spaces/hvoss-techfak/Autoforge).
201
+ This includes the option to run it locally if you have a powerful pc and don't want to limit yourself to the Huggingface computing limits. \
202
+ For this simply go to the [Huggingface](https://huggingface.co/spaces/hvoss-techfak/Autoforge) space and pull the docker container for this project (upper right corner -> three dots -> "run locally")
203
+
219
204
  ## Development
220
205
 
221
206
  To have a "nightly" version of the repository or have live updating changes during development please do the following:
@@ -228,6 +213,8 @@ conda activate forge
228
213
  pip install -e .
229
214
  ```
230
215
 
216
+ To refresh the bundled filamentcolors.xyz catalog (`src/autoforge/data/filamentcolors_catalog.json`) before a release, run `./generate_filamentcolors_library.sh`. It downloads the whole catalog once, pausing 2 seconds between pages (`--delay` sets the pause; requests are never less than 1 second apart), and keeps only the filaments that have a TD.
217
+
231
218
  If the installed pytorch version has no cuda support execute the following:
232
219
 
233
220
  ```bash
@@ -245,12 +232,18 @@ pip install torch torchvision torchaudio --index-url https://download.pytorch.or
245
232
  AutoForge © 2025 by Hendric Voss is licensed under [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/).
246
233
  The software is provided as-is and comes with no warranty or guarantee of support.
247
234
 
235
+ The above license applies to the software itself. How you use the generated files and prints is entirely up to you. If you want to print them for your friends or family, that's great. If you want to sell them, that's fine by me too.
236
+
237
+ From a licensing standpoint, this means that the prints you create are entirely subject to the [MIT License](https://opensource.org/licenses/MIT), and you can do whatever you like with them. The only thing the MIT License does not give you is a warranty, and it also frees me from any liability with regard to your 3D prints. Otherwise, do whatever you like.
238
+
239
+ I would love to see what you have done with the software, so it would be great if you could send me a link to your work (even if it's just for selling). However, this is not necessary if you do not want to.
248
240
 
249
241
  ## Acknowledgements
250
242
 
251
243
  First and foremost:
252
244
  - [Hueforge](https://shop.thehueforge.com/) for providing the inspiration for this project.
253
245
  Without it, this project would not have been possible.
246
+ - [filamentcolors.xyz](https://filamentcolors.xyz) and its community for the measured filament swatches and TD values in the web UI's filament catalog.
254
247
 
255
248
  AutoForge makes use of several open source libraries:
256
249
 
@@ -4,8 +4,8 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "AutoForge"
7
- version="1.9.7"
8
- description = "AutoForge is a Python tool for generating 3D printed layered models from an input image."
7
+ version="2.0.1"
8
+ description = "AutoForge - 3D color images made easy"
9
9
  authors = [{ name = "Hendric Voss", email = "hvoss@techfak.uni-bielefeld.de" }]
10
10
  readme = "README.md"
11
11
  requires-python = ">=3.10"
@@ -33,11 +33,26 @@ dependencies = [
33
33
  "aiofiles>=24.1.0",
34
34
  "websockets>=15.0",
35
35
  "pydantic-settings>=2.0.0",
36
+ "posthog>=3.7.0",
37
+ ]
38
+
39
+ [project.optional-dependencies]
40
+ # httpx isn't a runtime dependency of the app itself, but fastapi's
41
+ # TestClient needs it installed, and tests/webui/test_review_2026_09_23.py
42
+ # uses httpx.AsyncClient/ASGITransport directly to test concurrent requests.
43
+ test = [
44
+ "pytest>=7.4",
45
+ "pytest-cov",
46
+ "hypothesis",
47
+ "httpx>=0.27",
36
48
  ]
37
49
 
38
50
  [tool.setuptools]
39
51
  package-dir = {"" = "src"}
40
52
 
53
+ [tool.setuptools.package-data]
54
+ autoforge = ["data/*.json"]
55
+
41
56
  [project.scripts]
42
57
  autoforge = "autoforge.auto_forge:main"
43
58
 
@@ -1,13 +1,49 @@
1
+ Metadata-Version: 2.4
2
+ Name: AutoForge
3
+ Version: 2.0.1
4
+ Summary: AutoForge - 3D color images made easy
5
+ Author-email: Hendric Voss <hvoss@techfak.uni-bielefeld.de>
6
+ License: CC BY-NC-SA 4.0
7
+ Requires-Python: >=3.10
8
+ Description-Content-Type: text/markdown
9
+ Requires-Dist: numpy
10
+ Requires-Dist: torch>=2.9.1
11
+ Requires-Dist: torchvision>=0.21.0
12
+ Requires-Dist: transformers>=4.48.1
13
+ Requires-Dist: opencv-python>=4.2.0.32
14
+ Requires-Dist: matplotlib>=3.3.0
15
+ Requires-Dist: configargparse>=1.2.3
16
+ Requires-Dist: tqdm>=4.50.0
17
+ Requires-Dist: pandas>=1.1.0
18
+ Requires-Dist: scikit-image
19
+ Requires-Dist: scikit-learn
20
+ Requires-Dist: tensorboard
21
+ Requires-Dist: pillow>=11.1.0
22
+ Requires-Dist: shapely>=2.0.7
23
+ Requires-Dist: trimesh>=4.6.4
24
+ Requires-Dist: joblib>=1.4.2
25
+ Requires-Dist: uvicorn[standard]>=0.44.0
26
+ Requires-Dist: fastapi>=0.115.0
27
+ Requires-Dist: python-multipart>=0.0.12
28
+ Requires-Dist: aiofiles>=24.1.0
29
+ Requires-Dist: websockets>=15.0
30
+ Requires-Dist: pydantic-settings>=2.0.0
31
+ Requires-Dist: posthog>=3.7.0
32
+ Provides-Extra: test
33
+ Requires-Dist: pytest>=7.4; extra == "test"
34
+ Requires-Dist: pytest-cov; extra == "test"
35
+ Requires-Dist: hypothesis; extra == "test"
36
+ Requires-Dist: httpx>=0.27; extra == "test"
37
+
1
38
  # AutoForge
2
39
 
3
40
  AutoForge is a Python tool for generating 3D printed layered models from an input image. Using a learned optimization strategy with a Gumbel softmax formulation, AutoForge assigns materials per layer and produces both a discretized composite image and a 3D-printable STL file. It also generates swap instructions to guide the printer through material changes during a multi-material print.
4
41
 
5
- **TLDR:** It uses a picture to generate a 3D layer image that you can print with a 3d printer. Similar to [Hueforge](https://shop.thehueforge.com/), but without the manual work (and without the artistic control).
42
+ **TLDR:** It uses a picture to generate a 3D layer image that you can print with a 3d printer. Similar to [Hueforge](https://shop.thehueforge.com/), but without the manual work.
43
+
44
+ ![2.0_webui.png](images/webui/2.0_webui.png)
6
45
 
7
46
 
8
- ## You can now run Autoforge for free in your browser thanks to [Huggingface space support](https://huggingface.co/spaces/hvoss-techfak/Autoforge).
9
- This includes the option to run it locally if you have a powerful pc and don't want to limit yourself to the Huggingface computing limits. \
10
- For this simply go to the [Huggingface](https://huggingface.co/spaces/hvoss-techfak/Autoforge) space and pull the docker container for this project (upper right corner -> three dots -> "run locally")
11
47
 
12
48
  ## Example
13
49
  All examples use only the 27 BambuLab Basic PLA filaments, currently available in Hueforge 0.9.0, the background color is set to black.
@@ -43,19 +79,29 @@ The pruning is set to a maximum of 8 color and 20 swaps, so each image uses at m
43
79
 
44
80
  ## Web UI: One-Click Install & Run
45
81
 
46
- The easiest way to use AutoForge is the web UI — a local app (like ComfyUI) with drag-and-drop image upload, a filament library, live sliders for adjusting colors after optimization, and pruning. No command-line arguments needed.
82
+
83
+ The easiest way to use AutoForge is the web UI, a local app with drag-and-drop image upload, a filament library, live sliders for adjusting colors after optimization, and pruning. No command-line arguments needed.
47
84
 
48
85
  1. **Clone this repository** (or download and extract the ZIP from the green "Code" button on GitHub).
49
86
  2. **Install**, from the project folder:
50
87
  - Linux/macOS: `./install.sh`
51
88
  - Windows: double-click `install.bat` (or run it from a terminal)
52
89
 
53
- This installs [`uv`](https://docs.astral.sh/uv/) (a fast Python package manager) if you don't already have it, installs all Python dependencies, and builds the web UI. You'll need [Node.js](https://nodejs.org/) installed for that last step — the installer will tell you if it's missing.
90
+ This installs [`uv`](https://docs.astral.sh/uv/) (a fast Python package manager) if you don't already have it, installs all Python dependencies, and builds the web UI. You'll need [Node.js](https://nodejs.org/) installed for that last step, the installer will tell you if it's missing.
54
91
  3. **Run**:
55
92
  - Linux/macOS: `./run_webui.sh`
56
93
  - Windows: double-click `run_webui.bat`
57
94
 
58
95
  This starts the server and opens the web UI in your browser automatically (usually at `http://localhost:8000`).
96
+
97
+ To make some parts of the picture come out closer than the rest (a face, the eyes, lettering), click **Focus** in the image panel and paint over them; a slider sets how much more they count (2× to 100×, default 10×). After a run, the **Differences** view shows where the print strays furthest from the picture.
98
+
99
+ If HueForge is installed on the same computer, the web UI finds your HueForge personal filament library and offers to import it once, on its first start.
100
+
101
+ To find a filament you own without measuring it yourself, click **Catalog** in the filament library. It searches every filament on [filamentcolors.xyz](https://filamentcolors.xyz) that has a measured TD (search by brand, color name, type or hex code; filter by type, brand or color family; or pick a color to see the closest matches first), and **Add** puts it straight into your library.
102
+
103
+ The web UI sends anonymous usage telemetry to the project via [PostHog](https://posthog.com/) by default, to notify me of problems and any bugs. This includes crash reports (unhandled errors from both the browser frontend and the backend server, with the error type, message, and stack trace) so bugs can get fixed faster. No image data, filament data, or personal information is sent. To disable it, pass `--no-telemetry` (e.g. `./run_webui.sh --no-telemetry` / `run_webui.bat --no-telemetry`), or set `AUTOFORGE_WEBUI_TELEMETRY_ENABLED=false` permanently in your environment.
104
+
59
105
  4. **Update to the latest release** whenever you want, from the project folder:
60
106
  - Linux/macOS: `./update.sh`
61
107
  - Windows: double-click `update.bat`
@@ -63,7 +109,7 @@ The easiest way to use AutoForge is the web UI — a local app (like ComfyUI) wi
63
109
  This checks GitHub for a newer release and, if one exists, pulls it and reinstalls dependencies for you. Add `--check` to only check without applying it (e.g. `./update.sh --check`).
64
110
 
65
111
  If you have problems running the code on your GPU, please refer to the [Pytorch Homepage](https://pytorch.org/) for help. \
66
- CUDA, ROCm, and MPS (Apple Metal) are supported, but you need to install the correct version of pytorch for your system — `install.sh`/`install.bat` install whatever `uv sync` resolves by default, so swap in a GPU-specific PyTorch build afterwards if you need one.
112
+ CUDA, ROCm, and MPS (Apple Metal) are supported, but you need to install the correct version of pytorch for your system — `install.sh`/`install.bat` install whatever `uv sync` resolves by default, so swap in a GPU-specific PyTorch build afterwards if you need one. (`install.sh` handles older NVIDIA GPUs automatically, see below.)
67
113
 
68
114
  ## Manual Installation (CLI only)
69
115
 
@@ -139,6 +185,8 @@ This will generate separate STL files for each color, allowing you to print face
139
185
  - `--nozzle_diameter` Diameter of the printer nozzle in millimeters (default: 0.4).
140
186
  **Note:** Details smaller than half this value will be ignored.
141
187
  - `--early_stopping` Number of steps without improvement before stopping (default: 10000).
188
+ - `--priority_mask` *(Optional)* Path to a greyscale image the size of the input that marks the parts that matter most: white areas are matched more closely, black areas still count, just less.
189
+ - `--priority_mask_strength` How many times more a white pixel of `--priority_mask` counts than a black one (default: 10; must be at least 1). Raise it if the marked areas still come out off, lower it for a gentler nudge.
142
190
 
143
191
  - `--flatforge` Enable FlatForge mode to generate separate STL files for each color (default: False).
144
192
  **Note:** FlatForge creates flat prints where each color is its own STL file, allowing face-down printing for smooth, resin-like finishes. Requires a multi-material printer (AMS, MMU, or tool changer).
@@ -156,7 +204,8 @@ This will generate separate STL files for each color, allowing you to print face
156
204
  - `--pruning_max_swaps` Max number of swaps allowed after pruning (default: 100).
157
205
  - `--pruning_max_layer` Max number of layers allowed after pruning (default: 75).
158
206
  - `--random_seed` Random seed for reproducibility (default: 0 (disabled)).
159
- - `--mps` Flag to use the Metal Performance Shaders (MPS) backend if available.
207
+ - `--device` Torch device to run on, e.g. `cuda`, `cuda:1`, `mps`, `cpu`. Defaults to auto-detection: CUDA/ROCm first, then Apple Metal (MPS), then CPU. Can also be set with the `AUTOFORGE_DEVICE` environment variable.
208
+ - `--mps` *Deprecated* — Apple Metal is now detected automatically, so this flag is no longer needed. It still works, and forces MPS on a machine that also exposes a CUDA GPU; prefer `--device mps`.
160
209
  - `--no-spike-removal` Disable spike removal for the final STL (not recommended).
161
210
 
162
211
  - `--tensorboard` Flag to enable TensorBoard logging.
@@ -185,6 +234,10 @@ After running, the following files will be created in your specified output fold
185
234
 
186
235
  *Note:* FlatForge generates multiple STL files that align perfectly when loaded together in your slicer, creating a solid rectangular print with each color as a separate object.
187
236
 
237
+ ## You can now run Autoforge for free in your browser thanks to [Huggingface space support](https://huggingface.co/spaces/hvoss-techfak/Autoforge).
238
+ This includes the option to run it locally if you have a powerful pc and don't want to limit yourself to the Huggingface computing limits. \
239
+ For this simply go to the [Huggingface](https://huggingface.co/spaces/hvoss-techfak/Autoforge) space and pull the docker container for this project (upper right corner -> three dots -> "run locally")
240
+
188
241
  ## Development
189
242
 
190
243
  To have a "nightly" version of the repository or have live updating changes during development please do the following:
@@ -197,6 +250,8 @@ conda activate forge
197
250
  pip install -e .
198
251
  ```
199
252
 
253
+ To refresh the bundled filamentcolors.xyz catalog (`src/autoforge/data/filamentcolors_catalog.json`) before a release, run `./generate_filamentcolors_library.sh`. It downloads the whole catalog once, pausing 2 seconds between pages (`--delay` sets the pause; requests are never less than 1 second apart), and keeps only the filaments that have a TD.
254
+
200
255
  If the installed pytorch version has no cuda support execute the following:
201
256
 
202
257
  ```bash
@@ -214,12 +269,18 @@ pip install torch torchvision torchaudio --index-url https://download.pytorch.or
214
269
  AutoForge © 2025 by Hendric Voss is licensed under [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/).
215
270
  The software is provided as-is and comes with no warranty or guarantee of support.
216
271
 
272
+ The above license applies to the software itself. How you use the generated files and prints is entirely up to you. If you want to print them for your friends or family, that's great. If you want to sell them, that's fine by me too.
273
+
274
+ From a licensing standpoint, this means that the prints you create are entirely subject to the [MIT License](https://opensource.org/licenses/MIT), and you can do whatever you like with them. The only thing the MIT License does not give you is a warranty, and it also frees me from any liability with regard to your 3D prints. Otherwise, do whatever you like.
275
+
276
+ I would love to see what you have done with the software, so it would be great if you could send me a link to your work (even if it's just for selling). However, this is not necessary if you do not want to.
217
277
 
218
278
  ## Acknowledgements
219
279
 
220
280
  First and foremost:
221
281
  - [Hueforge](https://shop.thehueforge.com/) for providing the inspiration for this project.
222
282
  Without it, this project would not have been possible.
283
+ - [filamentcolors.xyz](https://filamentcolors.xyz) and its community for the measured filament swatches and TD values in the web UI's filament catalog.
223
284
 
224
285
  AutoForge makes use of several open source libraries:
225
286
 
@@ -12,6 +12,7 @@ src/autoforge/auto_forge.py
12
12
  src/autoforge/priority_mask_editor.py
13
13
  src/autoforge/Helper/AmpUtils.py
14
14
  src/autoforge/Helper/CAdamW.py
15
+ src/autoforge/Helper/DeviceUtils.py
15
16
  src/autoforge/Helper/FilamentHelper.py
16
17
  src/autoforge/Helper/ImageHelper.py
17
18
  src/autoforge/Helper/OptimizerHelper.py
@@ -34,6 +35,7 @@ src/autoforge/Misc/__init__.py
34
35
  src/autoforge/Misc/color_fit_all.py
35
36
  src/autoforge/Modules/Optimizer.py
36
37
  src/autoforge/Modules/__init__.py
38
+ src/autoforge/data/filamentcolors_catalog.json
37
39
  src/autoforge/webui/__init__.py
38
40
  src/autoforge/webui/config.py
39
41
  src/autoforge/webui/models.py
@@ -54,33 +56,44 @@ src/autoforge/webui/api/system.py
54
56
  src/autoforge/webui/api/ws.py
55
57
  src/autoforge/webui/helpers/__init__.py
56
58
  src/autoforge/webui/helpers/colored_mesh.py
59
+ src/autoforge/webui/helpers/gpu_memory.py
60
+ src/autoforge/webui/helpers/mesh_persist.py
57
61
  src/autoforge/webui/helpers/pipeline_runner.py
58
62
  src/autoforge/webui/helpers/slider_render.py
59
63
  src/autoforge/webui/helpers/sliders.py
64
+ src/autoforge/webui/helpers/telemetry.py
60
65
  src/autoforge/webui/services/__init__.py
66
+ src/autoforge/webui/services/catalog_service.py
61
67
  src/autoforge/webui/services/filament_service.py
62
68
  src/autoforge/webui/services/image_service.py
63
69
  src/autoforge/webui/services/optimization_service.py
64
70
  src/autoforge/webui/services/project_service.py
65
- tests/test_amp_autocast_probe.py
71
+ tests/test_amp_utils.py
72
+ tests/test_auto_forge_cli.py
73
+ tests/test_bug_regressions.py
74
+ tests/test_bugfixes_2026_09_26.py
66
75
  tests/test_cadamw.py
67
- tests/test_christofides_height_map.py
68
76
  tests/test_christofides_heightmap.py
77
+ tests/test_composite_image.py
69
78
  tests/test_depth_adjusted_height_map.py
70
79
  tests/test_depth_estimate_height_map.py
80
+ tests/test_device_utils.py
71
81
  tests/test_end_to_end_optimizer.py
72
- tests/test_filament_and_output.py
82
+ tests/test_fasttsp_heightmap.py
73
83
  tests/test_filament_helper.py
84
+ tests/test_filamentcolors_library.py
74
85
  tests/test_flatforge.py
75
- tests/test_heightmap_init.py
76
86
  tests/test_image_helper.py
77
87
  tests/test_loss_functions.py
78
- tests/test_optimizer_helper.py
79
88
  tests/test_optimizer_module.py
80
- tests/test_optimizer_smoke.py
89
+ tests/test_optimizer_training.py
90
+ tests/test_other_helper.py
81
91
  tests/test_output_helper.py
82
- tests/test_output_helper_extended.py
83
- tests/test_perception_and_pruning.py
92
+ tests/test_perception_loss.py
93
+ tests/test_pipeline_smoke.py
84
94
  tests/test_property_based.py
95
+ tests/test_prune_repeatability.py
85
96
  tests/test_pruning_helper.py
86
- tests/test_remove_height_spikes.py
97
+ tests/test_remove_height_spikes.py
98
+ tests/test_webui_backend.py
99
+ tests/test_webui_regressions.py
@@ -20,3 +20,10 @@ python-multipart>=0.0.12
20
20
  aiofiles>=24.1.0
21
21
  websockets>=15.0
22
22
  pydantic-settings>=2.0.0
23
+ posthog>=3.7.0
24
+
25
+ [test]
26
+ pytest>=7.4
27
+ pytest-cov
28
+ hypothesis
29
+ httpx>=0.27