This work is a port of the python version of mini-dalle to OCaml
- In the first run, it downloads the pretrained weights from the HF repo for mini-dalle and saves them in a directory called “pretrained”.
- The weights take up about 7GB of space.
- Runs inference path using the pretrained weights to produce the image
- The subsequence runs reuse the existing weights to generate the image.
# Sets up a docker container with everything installed.
make mini-dalle
# set Opam env
eval $(opam env)
# Runs the mini dalle image generation steps
dune exec mini_dalle -- generate "cactus in a corn field" "cactus.png" --device=1
- On Nvidia A100, ocaml version takes 28 seconds to generate 3x3 grid of images wheras the python version takes around 60 seconds to generate the 3x3 grid image
- On a 12 core Intel CPU, it takes about 11 minutes to generate 3x3 grid of images