agentleFS
Seeed-ProjectsSeeed-Projects/Seeed-Jetson-DevelopTool/skills/codex/deploy-dia/AGENTS.md

Seeed-Jetson-DevelopTool / deploy-dia

AGENTS.md57 starsChanged 4 months agoMITView on GitHub

Deploy the Dia neural text-to-speech model on reComputer Jetson for expressive, multi-speaker audio generation. Installs custom aarch64 PyTorch/torchaudio/triton wheels, clones the Dia repo, patches pyproject.toml, and launches a Gradio WebUI. Requires Jetson with 8GB+ RAM and JetPack 6.1+.

  • Installs packages

The file

We split this AGENTS.md into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run one phase at a time. After each phase:

    line 14
  2. Very specific:

    If output contains [STOP] → stop immediately, consult the failure decision tree.

    line 16
  3. Very specific:

    If output ends with [OK] → tell the user "Phase N complete" and proceed to the next phase.

    line 17

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

Deploy Dia TTS on reComputer Jetson

Dia is an expressive neural speech generation model that produces natural multi-speaker audio from text. This skill deploys it on Jetson with a Gradio web interface.


Execution model

Run one phase at a time. After each phase:

  • Relay all output to the user.
  • If output contains [STOP] → stop immediately, consult the failure decision tree.
  • If output ends with [OK] → tell the user "Phase N complete" and proceed to the next phase.

Prerequisites

RequirementDetail
Jetson device8GB+ RAM (e.g. reComputer J4012 with Orin NX 16GB)
JetPack6.1 or later
Python3.10 with pip
NetworkInternet access for downloading wheels and cloning repo

Phase 1 — Download and install aarch64 PyTorch wheels (~5–10 min)

Download the following wheels from the Seeed shared drive:

  • torch-2.7.0-cp310-cp310-linux_aarch64.whl
  • torchaudio-2.7.0-cp310-cp310-linux_aarch64.whl
  • triton-3.3.0-cp310-cp310-linux_aarch64.whl

Install them:

pip install torch-2.7.0-cp310-cp310-linux_aarch64.whl
pip install torchaudio-2.7.0-cp310-cp310-linux_aarch64.whl
pip install triton-3.3.0-cp310-cp310-linux_aarch64.whl

Verify:

python3 -c "import torch; print(torch.__version__); print('CUDA:', torch.cuda.is_available())"

[OK] when torch imports and CUDA is available. [STOP] if wheel install fails.


Phase 2 — Clone Dia and patch dependencies (~2 min)

git clone https://github.com/nari-labs/dia.git
cd dia

Edit pyproject.toml to comment out the torch, torchaudio, and triton dependency lines (lines 19–22) since we installed custom Jetson wheels:

sed -i 's/^\(\s*"torch.*\)/#\1/' pyproject.toml
sed -i 's/^\(\s*"torchaudio.*\)/#\1/' pyproject.toml
sed -i 's/^\(\s*"triton.*\)/#\1/' pyproject.toml

Install Dia and fix numpy:

pip install -e .
pip install numpy==1.26.4

[OK] when pip install -e . completes without error. [STOP] if dependency resolution fails.


Phase 3 — Launch Dia Gradio WebUI (~2 min to start, model download on first run)

export GRADIO_SERVER_NAME=0.0.0.0
cd dia
python app.py

Open a browser and navigate to http://<jetson-ip>:7860.

[OK] when the Gradio interface loads and you can generate audio from text.


Failure decision tree

SymptomAction
Wheel install fails — platform mismatchConfirm you are on aarch64 with Python 3.10: python3 --version and uname -m.
import torch fails after installCheck pip target: python3 -m pip show torch. Ensure no conflicting system torch.
CUDA not available in torchVerify JetPack 6.1+ is installed: cat /etc/nv_tegra_release. Check nvcc --version.
pip install -e . fails on dependencyEnsure torch/torchaudio/triton lines are commented out in pyproject.toml.
Gradio WebUI not accessible remotelyConfirm GRADIO_SERVER_NAME=0.0.0.0 is set. Check firewall: sudo ufw allow 7860.
OOM when generating audioClose other GPU processes. 8GB is minimum — larger models may need 16GB.
Model download hangs on first runCheck internet connectivity. Retry or manually download model weights.

Reference files

  • references/source.body.md — Full Seeed Wiki tutorial with screenshots, demo video, and sample dialogue text (reference only)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.