This guide translates the repository’s existing Colab/T4 trial path into a practical Lightning.ai workflow.
The short version:
configs/profiles/colab_t4_demo.yamlIf you are using a single A100 80 GB, the advanced path in this guide now has a dedicated profile: configs/profiles/lightning_a100_80gb_full.yaml.
Across the repository docs, three facts matter most for Lightning.ai:
Use this decision table instead of choosing the largest GPU blindly.
| Goal | Best Choice | Why |
|---|---|---|
| First successful run | T4 |
Cheapest path, enough for the repo’s low-VRAM profile |
| Better stability for short demos | L4 |
More VRAM than T4, still practical for trial work |
| Advanced end-to-end tests with fewer compromises | A100 40 GB, A100 80 GB, or L40S |
Enough headroom for larger models and fewer unload/reload cycles |
| Serious lip-sync + heavier post-processing + bigger batches | H100, H200, RTXP 6000 |
This is where the full-stack ambition becomes more realistic |
If you have already chosen 1x A100 80 GB, use that as the main machine for advanced validation. It is a strong single-GPU option in Lightning for this repository and is enough for the best practical one-box path here.
T4 if your goal is only to prove the pipeline can runL4 if your goal is to test with fewer out-of-memory failuresFor Lightning free tier work, L4 is the best balance if it is available within your credits. For pure smoke testing, T4 is enough.
Based on the repository docs and Lightning’s current Studio/free-tier limits, this is the realistic boundary:
large-v3The H100 path remains useful if you later want even more headroom, but the A100 80GB path is the right target for your current setup.
Do not use one dataset for every purpose. The cleanest testing plan is staged.
Use one short English source video with:
This is the fastest way to validate the full pipeline behavior.
Use Mozilla Common Voice Armenian as the first training source when you have Mozilla Data Collective access.
Why:
Existing helper:
python scripts/data_collection/download_cv_tiny.py \
--output-dir data/common_voice \
--max-train 80 \
--max-val 20 \
--mdc-dataset-id YOUR_MDC_DATASET_ID
Notes:
MDC_API_KEY.data/common_voice/manifests so the smoke test can run.Use FLEURS Armenian for evaluation.
Why:
Repository helper added for this workflow:
python scripts/data_collection/download_fleurs_eval.py \
--output-dir data/fleurs_hy \
--lang-config hy_am
Use FLORES-200 English-Armenian text pairs for translation evaluation.
Why:
Repository helper added for this workflow:
python3 scripts/data_collection/download_flores_eval.py \
--output-dir data/flores_hye \
--pair-config eng_Latn-hye_Armn
After the smoke path works, scale ASR with the repository’s YouTube crawl pipeline.
Why:
For TTS quality, the best data is not Common Voice.
Use:
Use Common Voice only for TTS plumbing checks, not for your best voice-cloning result.
Use:
This part is better postponed until ASR, translation, and TTS are stable.
In Lightning.ai:
Why CPU first:
git clone https://github.com/Edmon02/armenian-video-dubbing.git
cd armenian-video-dubbing
If you are using your own fork, clone that instead.
Lightning Studios expose terminal access and current plans advertise sudo access. Install only the small set this repo needs for the low-resource path.
sudo apt-get update
sudo apt-get install -y ffmpeg rubberband-cli libsndfile1
For Lightning testing, use the lighter dependency set that the repository already prepared for Colab/T4.
python3 -m pip install --upgrade pip setuptools wheel
python3 -m pip install -r requirements-colab.txt
python3 -m pip install -e . --no-deps
Why not start with the full production environment:
For an A100 80 GB Studio, this tradeoff changes. After the first environment sanity check, install the full project dependencies or your training extras before you start long runs.
You can also bootstrap the Studio with one command from the repository root:
bash scripts/deployment/setup_lightning_a100.sh
At minimum, make sure Hugging Face publishing support is available in the environment you use for release packaging:
python3 -m pip install huggingface_hub
Set your Hugging Face token before downloading models or gated assets.
export HF_TOKEN=your_huggingface_token
Optional:
export WANDB_API_KEY=your_wandb_key
export WANDB_PROJECT=armenian-video-dubbing
Run a minimal check before requesting a GPU.
python3 scripts/verify_setup.py
Then switch the Studio machine to T4 or L4.
After the GPU starts:
python3 -c "import torch; print(torch.cuda.is_available()); print(torch.cuda.get_device_name(0) if torch.cuda.is_available() else 'no-gpu')"
If you do not already have a test clip:
python3 scripts/inference/prepare_demo_video.py \
--mode generate \
--output outputs/temp/input_short.mp4
If you already uploaded a longer video:
python3 scripts/inference/prepare_demo_video.py \
--mode trim \
--input path/to/your_video.mp4 \
--duration 15 \
--output outputs/temp/input_short.mp4
Use the existing low-resource profile exactly as intended.
python3 -m src.pipeline outputs/temp/input_short.mp4 \
--output outputs/video/dubbed_short.mp4 \
--src-lang eng \
--dialect eastern \
--emotion neutral \
--skip-lipsync \
--no-background \
--config-override configs/profiles/colab_t4_demo.yaml
This is the most important first milestone. Do not enable lip-sync or background preservation until this succeeds.
If you are on L4 and want a slightly less constrained profile after the first success:
python3 -m src.pipeline outputs/temp/input_short.mp4 \
--output outputs/video/dubbed_short_l4.mp4 \
--src-lang eng \
--dialect eastern \
--emotion neutral \
--skip-lipsync \
--no-background \
--config-override configs/profiles/lightning_l4_demo.yaml
If you are on A100 80 GB and want the best single-GPU path for your current setup:
python3 -m src.pipeline outputs/temp/input_short.mp4 \
--output outputs/video/dubbed_short_a100.mp4 \
--src-lang eng \
--dialect eastern \
--emotion neutral \
--config-override configs/profiles/lightning_a100_80gb_full.yaml
For A100 bring-up, still start with a short clip. After that succeeds, move to longer clips and selectively test lip-sync and Demucs-heavy runs.
Tiny Armenian ASR smoke-train dataset:
python3 scripts/data_collection/download_cv_tiny.py \
--output-dir data/common_voice \
--max-train 80 \
--max-val 20 \
--mdc-dataset-id YOUR_MDC_DATASET_ID
If MDC is not configured yet, the same command falls back to FLEURS Armenian and keeps the rest of the training commands unchanged.
FLEURS Armenian for cleaner evaluation:
python3 scripts/data_collection/download_fleurs_eval.py \
--output-dir data/fleurs_hy \
--lang-config hy_am \
--max-test 100
FLORES English→Armenian for translation evaluation:
python3 scripts/data_collection/download_flores_eval.py \
--output-dir data/flores_hye \
--pair-config eng_Latn-hye_Armn \
--max-devtest 200
python3 scripts/training/train_asr.py \
--dataset-type common_voice \
--cv-dir data/common_voice/manifests \
--output-dir models/asr/whisper-hy-lightning-smoke \
--max-train-samples 64 \
--max-eval-samples 16 \
--config-override configs/profiles/colab_t4_demo.yaml
Expected result:
For a stronger A100 run, increase sample counts and use the A100 profile:
python3 scripts/training/train_asr.py \
--dataset-type common_voice \
--cv-dir data/common_voice/manifests \
--output-dir models/asr/whisper-hy-a100 \
--max-train-samples 2000 \
--max-eval-samples 200 \
--config-override configs/profiles/lightning_a100_80gb_full.yaml
Use this only after ASR smoke training works.
python3 scripts/training/train_tts.py \
--dataset-type common_voice \
--cv-dir data/common_voice/manifests \
--output-dir models/tts/fish-speech-hy-lightning-smoke \
--max-train-samples 16 \
--config-override configs/profiles/colab_t4_demo.yaml
Interpret this as a pipeline test, not a final TTS-quality benchmark.
For an A100-quality pass, prefer consented studio speech rather than Common Voice and run with the A100 profile.
Use the export utility to stage local model folders into release bundles and publish them to your Hugging Face account.
Environment:
export HF_TOKEN=your_huggingface_token
Example upload for ASR, TTS, and translation artifacts:
python3 scripts/training/export_models.py \
--models asr tts translation \
--asr-model models/asr/whisper-hy-a100 \
--tts-model models/tts/fish-speech-hy-lightning-smoke \
--translation-model models/translation/seamless-m4t-v2-large \
--output-dir models/releases/a100 \
--profile configs/profiles/lightning_a100_80gb_full.yaml \
--push-to-hub \
--hf-namespace YOUR_HF_USERNAME \
--repo-prefix armenian-video-dubbing \
--private
This creates or reuses these model repositories:
YOUR_HF_USERNAME/armenian-video-dubbing-asrYOUR_HF_USERNAME/armenian-video-dubbing-ttsYOUR_HF_USERNAME/armenian-video-dubbing-translationIf you want public repos, remove --private.
For repeated A100 releases, use the wrapper script instead of retyping the full command:
export HF_NAMESPACE=YOUR_HF_USERNAME
export HF_TOKEN=your_huggingface_token
export VISIBILITY_FLAG=
bash scripts/training/publish_a100_release.sh
If you want private repos through the wrapper, set:
export VISIBILITY_FLAG=--private
Run the repository evaluation entry point after you have a first model artifact or demo output.
python3 scripts/evaluation/evaluate_full.py
For translation-specific checks:
python3 scripts/training/evaluate_translation.py \
--test-data data/flores_hye/manifests/combined.jsonl \
--output-dir outputs/translation_eval
Do this when:
Do this when:
Do this when:
If you want the highest signal with the fewest wasted credits, use this order:
T4T4L4 with a slightly less constrained trialThis gives you a clean progression from proof-of-life to meaningful testing.