Model Configuration
Fabric uses a centralized model configuration system that determines which AI model handles each operation. This applies across all workflows, not just video generation.
Resolution Order
Section titled “Resolution Order”Models are resolved with a 6-level priority chain. The first match wins:
- Per-run input override —
--input image_model="gemini-2.5-flash-image" - Environment variable —
FABRIC_IMAGE_MODEL=gemini-2.5-flash-image - Project config —
./models.yaml(walks up from cwd) - Global config —
~/.fabric/models.yaml - Quality profile —
--input quality=cheap - Built-in defaults
Operations
Section titled “Operations”Each pipeline stage maps to a named operation:
| Operation | Default Model | Description |
|---|---|---|
text | gemini-2.5-flash | Script generation, LLM calls |
image | gemini-3.1-flash-image-preview | Image generation |
image_fast | imagen-4.0-fast-generate-001 | Fast image generation (thumbnails, stills) |
video | veo-2.0-generate-001 | Video generation |
broll | fal-ai/veo3.1/fast | B-roll video generation |
broll_i2v | fal-ai/kling-video/v3/pro/image-to-video | B-roll image-to-video |
keyframe_grid | imagen-4.0-fast-generate-001 | Keyframe grid generation |
tts | elevenlabs/eleven_multilingual_v2 | Text-to-speech |
avatar | fal-ai/kling-video/ai-avatar/v2/standard | AI avatar / talking head |
lipsync | veed/lipsync | Lip synchronization |
music | fal-ai/stable-audio | Background music |
transcription | faster-whisper/large-v3 | Audio transcription |
thumbnail | gemini-3.1-flash-image-preview | Thumbnail generation |
Config File
Section titled “Config File”Create models.yaml in your project root or at ~/.fabric/models.yaml:
# Override individual operationstext: gemini-2.5-flashimage: gemini-3.1-flash-image-previewtts: elevenlabs/eleven_multilingual_v2broll: fal-ai/veo3.1/fastkeyframe_grid: imagen-4.0-fast-generate-001
# Define custom quality profilesprofiles: my-custom: tts: fal-ai/kokoro/american-english broll: wan:1.3b keyframe_grid: sdxl-turboProject-level config overrides global config. Top-level keys override profile keys.
Quality Profiles
Section titled “Quality Profiles”Profiles bundle model selections for common use cases:
Remote Profiles
Section titled “Remote Profiles”Budget-friendly with acceptable quality. Uses faster/cheaper model variants.
| Operation | Model |
|---|---|
tts | fal-ai/kokoro/american-english |
lipsync | fal-ai/lipsync |
keyframe_grid | skip |
All other operations use defaults.
Default models across the board. No overrides — uses the built-in defaults.
Local Profiles
Section titled “Local Profiles”Full local pipeline with good quality. Requires 8+ GB VRAM.
| Operation | Model |
|---|---|
text | qwen3:8b (Ollama) |
image | sdxl-turbo |
video | wan:1.3b |
broll | wan:1.3b |
tts | kokoro |
avatar | wav2lip |
lipsync | wav2lip |
music | musicgen-small |
keyframe_grid | sdxl-turbo |
broll_i2v | skip |
Best local quality. Requires more compute.
| Operation | Model |
|---|---|
text | qwen3:latest (Ollama) |
image | flux-schnell |
video | wan:1.3b |
broll | wan:1.3b |
tts | voxtral |
avatar | wav2lip |
lipsync | wav2lip |
music | musicgen-small |
keyframe_grid | flux-schnell |
Minimal resource usage. Skips heavy operations.
| Operation | Model |
|---|---|
text | gemma3:4b (Ollama) |
image | sdxl-turbo |
video | skip |
broll | skip |
tts | piper |
avatar | skip |
lipsync | skip |
music | skip |
keyframe_grid | skip |
Skip Behavior
Section titled “Skip Behavior”Setting any operation to "skip" disables it entirely. The pipeline gracefully handles skipped operations — for example, skipping broll means no b-roll videos are generated, and the final composition uses only talking-head segments.
Environment Variables
Section titled “Environment Variables”Every operation maps to a FABRIC_<OPERATION>_MODEL environment variable:
export FABRIC_TEXT_MODEL=gemini-2.5-flashexport FABRIC_IMAGE_MODEL=sdxl-turboexport FABRIC_TTS_MODEL=kokoroexport FABRIC_BROLL_MODEL=wan:1.3bexport FABRIC_KEYFRAME_GRID_MODEL=imagen-4.0-fast-generate-001Per-Run Overrides
Section titled “Per-Run Overrides”Override any model for a single run:
fabric run global/ai-shorts \ --input topic="AI productivity" \ --input quality=local \ --input tts_model=elevenlabs/eleven_turbo_v2_5 \ --input broll_model="fal-ai/veo3.1/fast"Per-run overrides take highest priority and override both quality profiles and config files.
Using in Custom Workflows
Section titled “Using in Custom Workflows”from fabric_workflow_sdk import get_model
# Resolves through the full priority chainmodel = get_model(input, "text") # "gemini-2.5-flash"model = get_model(input, "broll") # depends on quality profilemodel = get_model(input, "keyframe_grid") # "skip" or an image model
# With fallback for unknown operationsmodel = get_model(input, "my_custom_op", fallback="gemini-2.5-flash")