GithubHelp home page GithubHelp logo

navezjt / diffusers-play Goto Github PK

View Code? Open in Web Editor NEW

This project forked from birch-san/diffusers-play

0.0 0.0 0.0 520 KB

Repository with which to explore k-diffusion and diffusers, and within which changes to said packages may be tested.

License: BSD 3-Clause "New" or "Revised" License

Python 100.00%

diffusers-play's Introduction

Setup Python environment

Mac

git submodule update --init --recursive
conda create -n diffnightly -c pytorch-nightly -c defaults python==3.10.6 pytorch
conda activate diffnightly

Linux + CUDA

Install Python 3.11 + CUDA 11.8 + Nvidia drivers 525 + latest pytorch + torchvision + xformers like so:
https://gist.github.com/Birch-san/8ec1f5073b117737cda86a70b01973ba

Install dependencies

Having activated your conda env, install dependencies:

cd src/k-diffusion
pip install -r requirements.txt
cd ../..
cd src/diffusers
# strictly speaking it may be sufficient to just build rather than install, since we're gonna PYTHONPATH diffusers anyway
python setup.py install
cd ../..
# and everything else we missed
pip install transformers safetensors easing-functions opencv-python

Treat yourself to ipython:

pip install ipython

CUDA-only:

pip install triton

Run

Invoke play.py like so:

PYTHONPATH=src/diffusers/src:src/k-diffusion:src python scripts/play.py

Add PYTORCH_ENABLE_MPS_FALLBACK=1 to this if you're using Mac.
Mac users in particular should prefer my fork of k-diffusion (the local git submodule) because it has Mac-specific fixes.

And most of the time this repository points at a fork of diffusers, usually for customizing how attention works (e.g. adding support for cross-attention-only masks, or memory-efficient attention).

diffusers-play's People

Contributors

birch-san 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.