Giter Club home page Giter Club logo

kigo's Introduction

Kigo

Kigo implements a diffusion model using Jax, DM-Haiku and Optax.

Images of sheep

Setup

Because each JAX installation is different depending on your CUDA version, Jax is not listed as a requirement in requirements.txt and thus needs to be manually installed.

Kigo was developed using pip install "jax[cuda11_cudnn805]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html.

To install all other dependencies, run either make or pip3 install -r requirements.txt. The former will also do type-checking, linting and unit-testing.

Usage

All interactions with Kigo are done through the ./cli.py. Run ./cli.py --help for more information.

A typical workflow to create, train and then sample from a model could look like this:

# Create and save a new model to `zoo/my-model`, including its EMA, optimizer
# and a copy of the config from `configs/my-config.yaml`.
./cli.py init zoo/my-model/ configs/my-config.yaml

# Train the model until interrupted with e.g. Ctrl+c.
./cli.py train zoo/my-model/

# Sample from the model, with 64 steps, mixing DDIM and DDPM (ema=0.5) and
# saving the result to my-image.png.
./cli.py syn zoo/my-model/ --steps 64 --ema 0.5 --out my-image.png

The configuration specified in the ./cli.py init command should be self-explanatory. A copy of it is stored with the initial and all later checkpoints stored inside the working directory, which is zoo/my-model/ in this case. Using symlinks, Kigo will automatically find the latest checkpoint inside of a working directory, however, one can sample from a specific checkpoint by running e.g. ./cli.py syn zoo/my-model/001000/.

Other

This project was implemented using tools from the DeepMind Jax ecosystem.

Images of faces

kigo's People

Contributors

nlsfnr avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.