Migrate from Replicate
turion migrate imports a model from Replicate: it reads the version’s metadata, tries to pull
the exact image Replicate runs, and delivers it to --to: Turion, a private box over SSH, or a
local directory for review.
turion migrate --from replicate:you/your-model --to turion --fleet acme/labSources are replicate:owner/name (latest version) or replicate:owner/name:version-id to pin
a specific version. --from cog:<path-or-image> also works for a local Cog project directory or
an already-built Cog image. Other platforms, such as fal, are not supported.
Short form: turion host
Section titled “Short form: turion host”When the target is Turion, turion host is the same
pipeline with --to turion implied, and it takes the model page URL from your browser:
turion host https://replicate.com/you/your-model --fleet acme/lab# hosted acme/your-model@v1 https://turion.ai/members/models/acme/your-modelIt adds one thing migrate does not: it records where the model came from on the registered
version (the workspace and GET /v1/models show the source and link back to it).
Use turion migrate for the other targets, --to ssh://user@host and --to ./dir, which never
touch a Turion account. Everything below applies to both commands.
Prerequisites
Section titled “Prerequisites”REPLICATE_API_TOKEN: anr8_…key, used to read the model’s metadata and to attempt the image pull. Required for everyreplicate:source.- Docker running, for the pull attempt and any build or push.
- For
--to turion: a Turion account,turion login, and a fleet of your own with a machine enrolled, passed as--fleet. The image is your own code, and the sharedturionpool runs only Turion’s own runtimes. A directory target needs no Turion account.
How it works
Section titled “How it works”- Metadata: fetches the model version from
api.replicate.com(its id, Cog version, and OpenAPI input/output schema). - Pull attempt:
docker login r8.imwith your Replicate token, then a digest-pinned pull ofr8.im/owner/name@sha256:<version-id>, the exact image Replicate serves. - Deliver: if the pull succeeds, the image goes to your target. With
--to turionthat is a push to the Turion registry plus a registered version, as withturion cog push:
turion migrate --from replicate:acme/whisper-demo --to turion --fleet acme/lab# done: turion: acme/whisper-demo@v1 (registry.turion.ai/acme/whisper-demo@sha256:…)When the pull is denied: the scaffold fallback
Section titled “When the pull is denied: the scaffold fallback”Pulling from r8.im is not a documented Replicate feature: it usually works for models you own
and is usually denied for models you do not. When the pull is denied, turion migrate does not
fail; it scaffolds a Cog project from the version’s OpenAPI schema instead, under --workdir
(default .turion-migrate/<name>):
schema.json: the version’s full input/output schemapredict.py: aPredictorstub with a typedpredict()signature generated from the schema, defaults included;setup()andpredict()raiseNotImplementedErroruntil you port the modelcog.yaml: a starting build config (GPU, Python 3.11)MIGRATION.md: what was migrated, what is missing, and what to do next
The scaffold keeps the model’s interface; you supply the implementation and weights from the
model’s source repository. A scaffold is not runnable, so --to turion refuses it with
scaffold_only: implement predict() first, then turion cog build and turion cog push, or
emit to a directory target and finish it there.
Ownership and licensing
Section titled “Ownership and licensing”For models you do not own, you may not be entitled to the image or the weights, so do not try to
work around a denied pull. Rebuild from the model’s source repository, get the weights through the
channel its licence allows, and respect that licence wherever you serve the model. The generated
MIGRATION.md repeats this.
Other targets
Section titled “Other targets”A directory: write a reviewable copy without touching any account:
turion migrate --from replicate:acme/whisper-demo --to ./migratedFor a pulled image you get IMAGE (the digest-pinned reference), schema.json and
MIGRATION.md; for a scaffold you get the project files and MIGRATION.md.
A private box over SSH: load and serve the image on your own Docker host:
turion migrate --from replicate:acme/whisper-demo --to ssh://user@gpu-box# done: http://gpu-box:5000The SSH target needs a runnable image (not a scaffold). See
Self-host on your own box for prerequisites, --port/--gpus, and how to
call the server.
turion host always delivers to Turion, so use migrate for these two targets. All flags for
both commands are in the CLI reference.