Introduction
This tutorial covers migrating workloads from Replicate to Outerscope in less than 5 minutes. This example migrates the SDXL-Lightning-4step model from ByteDance. Find it on Replicate here. Follow along with the code in the GitHub repo. Start by creating the Outerscope project.Outerscope.toml:
- Uses an Nvidia base image with CUDA libraries (Cuda 12). You can see other images here.
- Sets hardware based on CPU/GPU requirements. You can see the available options in the GPU guide and CPU and memory guide.
- Copies the required pip packages
- Downloads pget (used by Replicate for model weights) via curl and shell commands in Outerscope.toml
predict.py.
Outerscope’s equivalent entry file is main.py.
Start by copying all import statements and constant variables unrelated to Replicate/Cog:
self. references throughout the code.
The repo contains a “feature-extractor” folder needed in the Outerscope project. Since it’s small, copy the folder contents directly:

Outerscope deploy. The app builds in under 90 seconds.
It should output the curl statement to run your app:

/predict (the target function) and send the required JSON data. Example result: