GithubHelp home page GithubHelp logo

uyzhang / jdiffusion Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jittorrepos/jdiffusion

0.0 0.0 0.0 10.02 MB

JDiffusion is a diffusion model library for generating images or videos based on Diffusers and Jittor.

License: Apache License 2.0

Python 100.00%

jdiffusion's Introduction

JDiffusion

Introduction

JDiffusion is a diffusion model library for generating images or videos based on Jittor, Jtorch, diffusers.

Installation

0. Clone JDiffusion & Prepare Env

git clone https://github.com/JittorRepos/JDiffusion.git
#We recommend using conda to configure the Python environment.
conda create -n jdiffusion python=3.9
conda activate jdiffusion

1. Install Requirements

Our code is based on JTorch, a high-performance dynamically compiled deep learning framework fully compatible with the PyTorch interface, please install our version of library.

pip install git+https://github.com/JittorRepos/jittor
pip install git+https://github.com/JittorRepos/jtorch
pip install git+https://github.com/JittorRepos/diffusers_jittor
pip install git+https://github.com/JittorRepos/transformers_jittor

or just

pip install -r requirement.txt

2. Install JDiffusion

cd JDiffusion
pip install -e .

We also provide a docker image about our environment.

3.Optional Requirements

If you encounter No module named 'cupy':

# Install CuPy from source
pip install cupy

Usage

Use just like diffusers, our scripts are in ./examples/test_*.py, you can try on it.

Some example outputs on these scripts are in ./examples/output.

Stable Diffusion

"a photo of a cat"

image

Latent Consistency Model(LCM)

"Self-portrait oil painting, a beautiful cyborg with golden hair, 8k"

image

Control-Net

input image :

image

"the mona lisa"

image

SDXL

  • text to image

    "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"

    image

  • refiner

    "A majestic lion jumping from a big stone at night"

    image

Instruct-Pix2Pix

input image :

image

"make the mountains snowy":

image

AnimateDiff

"masterpiece, bestquality, highlydetailed, ultradetailed, sunset, moon on the sky"
"orange sky, warm lighting, fishing boats, ocean waves seagulls, "
"rippling water, wharf, silhouette, serene atmosphere, dusk, evening glow, "
"golden hour, coastal landscape, seaside scenery"

gif

Level of Support

We now support inference.

Some acceleration tools and memory-saving tools are currently unavailable, like offload, vae_slicing, accelerators..., but you can use jittor's shared memory system.

We welcome more individuals to contribute additional code and models to this repository, in support of the Jittor community.

jdiffusion's People

Contributors

ldyang694 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.