EmbodiFlowDocs
Open console
Get startedAlgorithms and workflowsDataTrainingReference
  • Algorithms and workflows

Tutorials

  • Your first algorithm
  • Your first algorithm from the terminal
  • Customize your project's workflow

Algorithms

  • How custom algorithms work
  • Test your algorithm
  • Parameters
  • Python packages
  • Versions and compatibility
  • GPU algorithms
  • Models and files
  • Use your algorithm in a workflow
  • Built-in algorithms

Workflows

  • How workflows work
  • Runs and logs

© 2026 EmbodiFlow

Open consolellms.txtOpenAPI JSON
  1. Algorithms and workflows
  2. Algorithms
  3. Models and files

Models and files

How to bring model weights and other files to your algorithm today, and what works in a test run versus a workflow step.

Many algorithms need more than code: model weights, a lookup table, a config file. A Python algorithm today is a single main.py of at most 32 KiB plus Python packages, with no place to upload other files. This page shows the options that work now, and their limits.

Beta. Custom algorithms and workflows are in the product and ready to try, but they haven't been through a full acceptance on real data yet. Expect some rough edges, and check results before you rely on them.

Choose an option

OptionGood forTest runWorkflow step
A Python package in RequirementsLibraries, and models that ship inside a packageWorksWorks
Download in setup()Weights you host, up to a few hundred MBFails: no networkWorks where the deployment allows outbound traffic
An image algorithmLarge weights, many files, any languageRuns the saved imageWorks

A Python package

List the package in Requirements, one per line, such as opencv-python-headless>=4.9; up to 50 packages, as prebuilt wheels. The platform builds an image for the version when you save, so everything is in place before a step starts. Packages that bundle their weights, or download them only when you call them, fall under the next option.

Download in setup()

Define setup(ctx) in main.py. It runs once before run, and what it returns reaches run as the state argument. Load or download your weights there.

def setup(ctx):
    # Runs once per step, before run(). Download or load your weights here.
    return load_model("https://models.example.com/hand-boxes-v3.onnx")

def run(recording, out, state):
    model = state
    ...

A workflow step can reach public internet addresses, so this works in a workflow on EmbodiFlow Cloud and on deployments that allow outbound traffic; an air-gapped deployment does not. A test run has no network access at all, so the same code fails there. Raise a clear error when the download fails, so the step tells you why instead of writing an empty result.

The download counts toward the step's time limit, and it happens in every step that runs the algorithm. Host the file close to your deployment.

An image algorithm

For large weights, many files or another language, build a container image with everything in it, on your machine, and push the image. ef algorithm init <dir> --lang image writes an algorithm.yaml, a Dockerfile and an entry script; ef algorithm test <dir> --build builds and tests it with Docker; ef algorithm push <dir> --archive <image.tar> imports a saved image into your team's registry and registers the version. See Image algorithms.

EmbodiFlow Cloud does not build Dockerfiles for teams (ALGORITHM_DOCKERFILE_BUILD_UNAVAILABLE): build the image yourself and push it. A deployment can also turn image pushes off, and then push is refused with ALGORITHM_IMAGE_PUSH_UNAVAILABLE.

Next

  • GPU algorithms
  • Algorithm interface and manifest
  • How custom algorithms work
Previous

GPU algorithms

Next

Use your algorithm in a workflow