microsoft / microsoft/TRELLIS.2
[QoL Mod] app_watcher.py: Real-time progress heartbeat & automatic GLB export to outputs folder
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 11.3k
- Forks
- 1.4k
- PR merge metrics
- No merged PRs in 30d
Description
Hi everyone,
While testing TRELLIS.2 locally on Linux, I noticed that during the GLB extraction stage (mesh decimation, remeshing, and baking), the single-core CPU workload takes quite a while and the console stays completely silent. This often makes it hard to tell whether the process is actively working or completely frozen.
To make local runs and unattended batch workflows much smoother, I made a modified script called app_watcher.py with two quality-of-life additions:
Key Features
-
Console Heartbeat Monitor (
_GLBWatcher):- Spawns a lightweight daemon thread during
extract_glb. - Displays a dynamic ASCII spinner, elapsed time, and real-time RAM usage in the console so you can confirm the process is alive without touching the main pipeline thread.
- Gracefully falls back if
psutilis not installed.
- Spawns a lightweight daemon thread during
-
Automatic GLB Auto-Save:
- Automatically saves every exported GLB into an
./outputsdirectory next to the script with a unique timestamp. - Eliminates the need to wait in front of the browser just to hit the "Download" button.
- Automatically saves every exported GLB into an
Code (app_watcher.py)
Save the snippet below as app_watcher.py inside your TRELLIS.2 root directory and launch it with:
#
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the attached app_watcher.py and tracing the existing extract_glb path in TRELLIS.2. Confirm how _GLBWatcher reports progress and how exported GLBs are returned, then verify that extraction shows heartbeat information and each export is saved with a unique timestamp under ./outputs, including the psutil fallback.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 62/100