Code Monkey home page Code Monkey logo

diffusion-progressive-rendering's Introduction

Progressive Rendering for Diffusion

This is a prototype for demonstrating progressive rendering for Diffusion and Latent Consistency Models. We implement progressive rendering by running several inference runs (one for each number of steps in the range [1, 4]) simultaneously in parallel. This enables the previewing of the diffusion model's outputs in real-time (1 sample per second).

ProgressiveRendering.mov

This demonstration applies to both Diffusion models and Latent Consistency Models, however, we demonstrate it with Latent Consistency Models. We combine the fast inference capabilities of LMCs, which require on the order of 4 diffusion steps to generate high-quality samples. LMCs trade-off time for generation fidelity: more sample steps generate higher quality samples, but fewer sample steps take less time. We run each of these sampling processes in parallel and show each of the samples as they are generated. Further, because of the self-consistency constraint of Latent Consistency Model's samples with the same prompt and initial latent have the same high-level structure. This gives the effect of the composition becoming progressively more detailed as more sample steps are taken. It is worth noting that there is not a need to run parallel inference for Latent Consistency Models because of their multistep scheduler, but it is necessary for diffusion models.

Installation

    pip install -r requirements.txt

Usage

You can test out the prototype on an NVIDIA GPU by running the following command:

    python main.py

diffusion-progressive-rendering's People

Contributors

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