How rinste/turbo-mlx works
Turbo MLX is a local Apple-Silicon generative-media app. A user configures a model and prompt, downloads model files when needed, submits generation through the app’s backend process, and reviews or reuses results in history. The engine supports image creation and editing, video, audio, and upscaling through model-family implementations. README capabilities and indexed module references establish the broad subsystem map; sampled excerpts show only selected call paths, so unverified engine-to-family dispatch is omitted.
Main entry points: Engine.swift Engine runtime · AppModel.swift App coordinator · BackendController.swift Worker controller · Qwen3Prompter.swift Prompt tokenization
Components 26
macOS App
- Generation controls
TurboMLX/Views/ControlPanel.swift - App coordinator
TurboMLX/App/AppModel.swift - Results viewer
TurboMLX/Views/OutputPanel.swift - History browser
TurboMLX/Views/HistoryStrip.swift - History store
TurboMLX/Services/HistoryStore.swift
Model Management
- Model catalog
TurboMLX/Models/ModelCatalog.swift - Model downloads
TurboMLX/Services/DownloadCenter.swift - Hub access
TurboMLX/Services/HubDownloader.swift - Model locator
TurboMLX/Services/ModelLocator.swift - LoRA library
TurboMLX/Services/LoRALibrary.swift
Generation Engine
- Worker controller
TurboMLX/Services/BackendController.swift - Worker protocol
TurboMLX/Services/WorkerProtocol.swift - Line process
TurboMLX/Services/LineProcess.swift - Engine runtime
Engine/Sources/TurboEngineCore/Engine.swift - Checkpoint loading
Engine/Sources/TurboEngineCore/Checkpoint.swift - Prompt tokenization
Engine/Sources/TurboEngineCore/Families/Shared/Qwen3Prompter.swift - LoRA adapters
Engine/Sources/TurboEngineCore/LoRA/LoRAAdapters.swift
Media Workflows
- Image generation
Engine/Sources/TurboEngineCore/Families - Image editing
Engine/Sources/TurboEngineCore/Families/QwenImage/QwenImageEditPipeline.swift - Video generation
Engine/Sources/TurboEngineCore/Families/LTX/LTXPipeline.swift - Image upscaling
Engine/Sources/TurboEngineCore/Families/SeedVR2/SeedVR2Pipeline.swift - Audio generation
Engine/Sources/TurboEngineCore/Families/MiniMaxMusic3 - Media output
Engine/Sources/TurboEngineCore/ImageOutput.swift - Live preview
Engine/Sources/TurboEngineCore/Families/Shared/LatentPreview.swift
Other components
- Mac user
- Model hub
Connections 28
- Mac user → Generation controls: configures
README.md - Generation controls → App coordinator: updates settings
TurboMLX/Views/ControlPanel.swift - App coordinator → Model catalog: selects model
TurboMLX/App/AppModel.swift - App coordinator → Model downloads: starts downloads
TurboMLX/App/AppModel.swift - Model downloads → Hub access: downloads from
TurboMLX/Services/DownloadCenter.swift - Model hub → Hub access: serves models
README.md - App coordinator → Model locator: locates model
TurboMLX/App/AppModel.swift - App coordinator → Worker controller: sends jobs
TurboMLX/App/AppModel.swift - Worker controller → Line process: starts process
TurboMLX/Services/BackendController.swift - Worker controller → Worker protocol: sends commands
TurboMLX/Services/BackendController.swift - Worker controller → App coordinator: forwards events
TurboMLX/Services/BackendController.swift - App coordinator → LoRA library: manages LoRAs
TurboMLX/App/AppModel.swift - Engine runtime → Checkpoint loading: loads weights
- Engine runtime → LoRA adapters: applies adapters
Engine/Sources/TurboEngineCore/Engine.swift - Engine runtime → Media output: writes image
Engine/Sources/TurboEngineCore/Engine.swift - Engine runtime → Image generation: generates images
Engine/Sources/TurboEngineCore/Engine.swift - Engine runtime → Image editing: runs edits
- Engine runtime → Video generation: generates video
- Engine runtime → Image upscaling: upscales images
- Engine runtime → Audio generation: generates audio
- Image editing → Prompt tokenization: uses prompt
Engine/Sources/TurboEngineCore/Families/QwenImage/QwenImageEditPipeline.swift - Image generation → Prompt tokenization: tokenizes prompt
Engine/Sources/TurboEngineCore/Families/LTX/LTXPipeline.swift - Video generation → Prompt tokenization: tokenizes prompt
Engine/Sources/TurboEngineCore/Families/LTX/LTXPipeline.swift - Engine runtime → Live preview: emits previews
- App coordinator → History store: stores results
TurboMLX/App/AppModel.swift - History browser → History store: browses items
- History browser → Results viewer: selects result
TurboMLX/Views/OutputPanel.swift - Results viewer → Mac user: shows media
README.md