Troubleshooting
Quick Triage
Most common issues:
- Missing or incorrect API tokens
RILO_REPLICATE_API_TOKEN - ffmpeg/ffprobe not in PATH or misconfigured
- Model IDs or modelOptions invalid or incompatible with selected adapters
- Predictions timing out (increase
PREDICTION_MAX_WAIT_MS) - Download failures (check
DOWNLOAD_ALLOWED_HOSTS, timeout, and max-bytes settings)
Start here:
rilo settings
# Verify Replicate API Token is set ✓
# Verify ffmpeg and ffprobe paths are correct ✓
# Check Max Prediction Wait (increase if needed) ✓
CLI Errors
"Missing --project argument"
Error message:
Error: Missing --project argument
Cause: The --project flag was omitted.
Solution:
# Correct usage:
rilo --project housing-case --story-file ./story.txt
# Not:
rilo --story-file ./story.txt # Missing --project
"Project story.md not found"
Error message:
Error: Project story.md not found. Provide --story-file once to initialize the project.
Cause: The project exists but has no story.md. Rilo either couldn't find the story or it wasn't saved on first run.
Solutions:
-
Provide
--story-fileon the next run:rilo --project housing-case --story-file ./my-story.txt -
Manually check the project directory:
ls -la projects/housing-case/If
story.mdis missing, recreate it from a text file. -
Verify the project directory was created successfully:
cat projects/housing-case/config.json # Should exist
"Validation error: invalid model ID" or "Unknown model"
Error message:
Error: Model "invalid-model-name" is not recognized or not supported
Cause: A model ID in projects/<project>/config.json doesn't exist in the model catalog.
Solution:
-
List available models:
ls models/ | head -10
# See: deepseek-ai__deepseek-v3.json, minimax__speech-02-turbo.json, etc. -
Edit the config with valid model IDs:
cat projects/housing-case/config.json | jq '.models'
# Check format: "org/name" becomes "org__name" in models/ directory -
Use
rilo settingsto verify available defaults (not yet UI-driven, but documented in the model catalog).
"Invalid modelOption parameter"
Error message:
Warning: modelOption "unknown_param" for textToImage is not recognized
Cause: A parameter in modelOptions is not supported by the selected model's adapter.
Solution:
-
See Model Adapters and Options for valid parameters per model and category.
-
Common model options that work:
- textToImage (Flux):
num_inference_steps,guidance_scale,output_format - textToImage (Z-Image):
num_inference_steps,output_format,output_quality - imageTextToVideo (Kling):
interpolate_output,go_fast - imageTextToVideo (Wan):
sample_shift,go_fast,disable_safety_checker
- textToImage (Flux):
-
Remove unrecognized parameters or update the model selection.
"unauthorized" or "invalid API token"
Error message:
Error: Replicate API returned: unauthorized
Cause:
- API token missing or incorrect
- Token doesn't have permission or is revoked
- Token precedence issue (env var vs. saved setting)
Solutions:
-
Check token is set:
echo $RILO_REPLICATE_API_TOKEN # or $REPLICATE_API_TOKEN -
Verify via
rilo settings:rilo settings
# Navigate to "Replicate API Token" and check it's populated -
If setting via env var, ensure it's exported:
export RILO_REPLICATE_API_TOKEN=r8_xxxxx
rilo --project demo --story-file ./story.txt
# Not:
RILO_REPLICATE_API_TOKEN=r8_xxxxx rilo ... # May not work in all shells -
Verify token on replicate.com.
-
Precedence: Env var > ~/.rilo/config.json > default. If an env var is set, the
rilo settingsmenu shows it as read-only.
"ffmpeg/ffprobe not found" or "command not found"
Error message:
Error: ffmpeg not found. Install ffmpeg or set FFMPEG_BIN in settings.
Cause:
- ffmpeg/ffprobe not in PATH
- Binary path misconfigured in settings
- Binary not installed
Solutions:
-
Install ffmpeg (if not already installed):
# macOS
brew install ffmpeg
# Linux (Ubuntu/Debian)
sudo apt-get install ffmpeg
# Windows
choco install ffmpeg
# Or download from ffmpeg.org -
Verify installation:
which ffmpeg
which ffprobe
ffmpeg -version -
Configure in
rilo settings:rilo settings
# Navigate to "ffmpeg Binary", enter full path: /usr/local/bin/ffmpeg
# Or if in PATH, just: ffmpeg -
Set via env var:
export FFMPEG_BIN=/usr/local/bin/ffmpeg
rilo --project demo --story-file ./story.txt
Prediction & Network Issues
"Prediction timed out"
Error message:
Error: Prediction timed out after 600000ms
Cause:
- Prediction takes longer than
PREDICTION_MAX_WAIT_MS - Network connectivity issues
- Provider experiencing slow inference
- High queue on the provider's side
Solutions:
-
Increase timeout:
rilo settings
# Navigate to "Max Prediction Wait (ms)"
# Increase from 600000 to 900000 (15 min) or higherOr via env var:
export PREDICTION_MAX_WAIT_MS=900000
rilo --project demo --story-file ./story.txt -
Retry with
--force:rilo --project demo --force
# Restarts from the failed stage -
Check network and provider status:
- Verify internet connectivity
- Check Replicate status page
"Download failed" or "exceeds max file size"
Error message:
Error: Downloaded file (120MB) exceeds DOWNLOAD_MAX_BYTES (104857600)
Cause:
- File is larger than
DOWNLOAD_MAX_BYTES - Download timeout exceeded
- Download host not in
DOWNLOAD_ALLOWED_HOSTS
Solutions:
-
Increase max download size:
rilo settings
# Navigate to "Download Max Size (bytes)"
# Increase from 104857600 (100 MB) to 209715200 (200 MB) or moreOr via env var:
export DOWNLOAD_MAX_BYTES=209715200
rilo --project demo --story-file ./story.txt -
Increase download timeout:
export DOWNLOAD_TIMEOUT_MS=30000 -
Check allowed hosts:
rilo settings
# View "Download Allowed Hosts" — should include domains where files are hosted
# Default: replicate.delivery,replicate.com -
Add custom hosts if needed:
cat ~/.rilo/config.json | jq .downloadAllowedHosts
# Edit if necessary to include your CDN
Generation & Stage Failures
"Story validation failed" or "Story is too short"
Error message:
Error: Story is required and must be at least 50 characters
Cause:
- Story is empty or too short
- Story doesn't have enough detail for script generation
Solution:
- Provide a longer, clearer story (aim for 200+ characters):
cat > story.txt <<'EOF'
A young couple discovers they share a love of gardening when they meet at a community plot.
Over months, they grow vegetables and flowers together, learning about each other through patient care.
When spring arrives, their garden blooms in full colour, and so does their relationship.
They decide to get married and promise to grow old together, like the perennial plants they've nurtured.
EOF
rilo --project garden-case --story-file ./story.txt
"Script generation failed" or "LLM returned error"
Error message:
Error: Script generation failed: LLM returned status 400
Cause:
- Script model (e.g., DeepSeek) returned an error
- LLM-specific issue (rate limit, invalid parameters, quota exceeded)
- Network error reaching model provider
Solutions:
-
Wait and retry:
rilo --project demo --force
# Restarts from script stage -
Increase retry count:
export MAX_RETRIES=5
export RETRY_DELAY_MS=5000
rilo --project demo --force -
Check LLM model options compatibility:
cat projects/demo/config.json | jq '.modelOptions.textToText'
# Verify parameters like max_tokens, temperature, etc. are valid for the model -
Try a different model:
# Edit projects/demo/config.json
# Change "models.textToText" to another model (e.g., "gpt-4" if available)
rilo --project demo --force
"Keyframe/segment generation failure"
Error message:
Error: Image generation failed: model returned error
Cause:
- Image/video model returned error or timeout
- Model parameters incompatible with the selected model
- Safety checker or output format not supported
Solutions:
-
Retry with increased timeout:
export PREDICTION_MAX_WAIT_MS=900000
rilo --project demo --force -
Review and adjust model options:
cat projects/demo/config.json | jq '.modelOptions'
# Remove problematic parameters
rilo --project demo --force -
Switch to a faster/more stable model:
# Edit projects/demo/config.json
# "textToImage": "black-forest-labs/flux-schnell" # Faster than flux-pro
rilo --project demo --force -
Check composition/output settings:
cat projects/demo/config.json | jq '{aspectRatio, keyframeWidth, keyframeHeight}'
# Verify dimensions are reasonable (≥ 512 each)
"Composition failed" or "Final video creation error"
Error message:
Error: Composition failed: could not create final video
Cause:
- ffmpeg error during composition
- Audio/video codec mismatch
- Disk space issue
- Subtitle burn-in failed (if enabled)
Solutions:
-
Check disk space:
df -h
# Should have at least 2–5 GB free for a typical video -
Verify ffmpeg:
ffmpeg -version
ffprobe -version -
If subtitles are enabled, disable and retry:
cat projects/demo/config.json | jq '.subtitleOptions.enabled'
# Set to false and remove subtitleOptions or set enabled: false
rilo --project demo --force -
Check assets:
ls -lh projects/demo/assets/
# Verify audio and video segments exist and are not empty
Logging and Debugging
Check project logs endpoint (HTTP API)
curl -H "Authorization: Bearer $RILO_API_BEARER_TOKEN" \
http://localhost:3000/projects/demo/logs?limit=50
Inspect run-state.json
cat projects/demo/run-state.json | jq '.stages'
# Shows which stages completed successfully
# Last stage indicates where it failed
Inspect artifacts.json
cat projects/demo/artifacts.json | jq 'keys'
# Lists all saved artifacts (audio, keyframes, segments, final video, etc.)
# Missing keys indicate which stage failed
Enable verbose logging (environment-based)
Set DEBUG=rilo:* to see detailed logs:
export DEBUG=rilo:*
rilo --project demo --force
Or check the generated logs directory:
ls -la projects/demo/logs/
cat projects/demo/logs/generation-YYYY-MM-DD.log
Fast Triage Checklist
-
✓ Check project logs endpoint for the latest error:
curl http://localhost:3000/projects/demo/logs -
✓ Inspect
run-state.jsonfor the last completed stage:cat projects/demo/run-state.json | jq '.stages | keys[-1]' -
✓ Inspect
artifacts.jsonfor missing output paths/URLs:cat projects/demo/artifacts.json | jq 'keys' -
✓ Retry targeted regeneration from the failed stage:
rilo --project demo --force -
✓ Verify app settings:
rilo settings
# Review tokens, timeouts, binary paths
See Also
- CLI Reference — All commands and flags
- Configuration — Project and app settings
- Environment Variables — Setting precedence and examples
- Regeneration and Invalidation — When to use
--force - Pipeline Stages — Detailed stage breakdown and outputs