Giter Club home page Giter Club logo

diffsynth-studio's Introduction

DiffSynth Studio

Introduction

DiffSynth is a new Diffusion engine. We have restructured architectures including Text Encoder, UNet, VAE, among others, maintaining compatibility with models from the open-source community while enhancing computational performance. This version is currently in its initial stage, supporting SD and SDXL architectures. In the future, we plan to develop more interesting features based on this new codebase.

Installation

Create Python environment:

conda env create -f environment.yml

We find that sometimes conda cannot install cupy correctly, please install it manually. See this document for more details.

Enter the Python environment:

conda activate DiffSynthStudio

Usage (in WebUI)

python -m streamlit run Diffsynth_Studio.py
sdxl_turbo_ui.mp4

Usage (in Python code)

Example 1: Stable Diffusion

We can generate images with very high resolution. Please see examples/sd_text_to_image.py for more details.

512*512 1024*1024 2048*2048 4096*4096
512 1024 2048 4096

Example 2: Stable Diffusion XL

Generate images with Stable Diffusion XL. Please see examples/sdxl_text_to_image.py for more details.

1024*1024 2048*2048
1024 2048

Example 3: Stable Diffusion XL Turbo

Generate images with Stable Diffusion XL Turbo. You can see examples/sdxl_turbo.py for more details, but we highly recommend you to use it in the WebUI.

"black car" "red car"
black_car black_car_to_red_car

Example 4: Toon Shading (Diffutoon)

This example is implemented based on Diffutoon. This approach is adept for rendering high-resoluton videos with rapid motion. You can easily modify the parameters in the config dict. See examples/diffutoon_toon_shading.py. We also provide an example on Colab.

Diffutoon.mp4

Example 5: Toon Shading with Editing Signals (Diffutoon)

Coming soon.

Diffutoon_edit.mp4

Example 6: Toon Shading (in native Python code)

This example is provided for developers. If you don't want to use the config to manage parameters, you can see examples/sd_toon_shading.py to learn how to use it in native Python code.

toon_dancing_girl.mp4

Example 7: Text to Video

Given a prompt, DiffSynth Studio can generate a video using a Stable Diffusion model and an AnimateDiff model. We can break the limitation of number of frames! See examples/sd_text_to_video.py.

lightning.mp4

Example 8: Video Stylization

We provide an example for video stylization. In this pipeline, the rendered video is completely different from the original video, thus we need a powerful deflickering algorithm. We use FastBlend to implement the deflickering module. Please see examples/sd_video_rerender.py for more details.

winter_stone.mp4

Example 9: Prompt Processing

If you are not native English user, we provide translation service for you. Our prompter can translate other language to English and refine it using "BeautifulPrompt" models. Please see examples/sd_prompt_refining.py for more details.

Prompt: "一个漂亮的女孩". The translation model will translate it to English.

seed=0 seed=1 seed=2 seed=3
0_ 1_ 2_ 3_

Prompt: "一个漂亮的女孩". The translation model will translate it to English. Then the refining model will refine the translated prompt for better visual quality.

seed=0 seed=1 seed=2 seed=3
0 1 2 3

diffsynth-studio's People

Contributors

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