Supported Machines
The fal runtime lets you specify the size of the machine that your fal functions run on. This is done using the machine_type
argument in the fal.function
decorator. Currently, the following following options are available:
Value | Description |
---|---|
XS | 0.25 CPU cores, 256MB RAM (default) |
S | 0.50 CPU cores, 1GB RAM |
M | 2 CPU cores, 8GB RAM |
L | 4 CPU cores, 32GB RAM |
GPU | 8 CPU cores, 64GB RAM, 1 GPU core (A100, 40GB VRAM) |
For example:
By default, the machine_type
is set to XS
.
You can also switch the machine type of an existing fal function by using the on
method.
In the above example, my_function_S
is a new fal function that has the same contents as my_function
, but it will run on a machine type S
.
Both functions can be called:
my_function
is executed on machine type GPU
. And my_function_S
, which has the same logic as my_function
, is now executed on machine type S
.