Git Product home page Git Product logo

paradigms's People

Contributors

andyshih12 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

paradigms's Issues

Concern about the speed

It seems that paradigms is only support for DDPM and DDIM. When testing on 2*V100 with batch_size=10 and DDPM, it achieves 1.5 times speed up. But if I use UniPCMultistepScheduler, the time cost is similar to DDPMParallelScheduler.

Any plan for support UniPCMultistepScheduler? @AndyShih12

Inconsistency with DDIM

Ideally running paradigms with a window size of 1 should be identical to running sequential DDIM given that there is no added noise in DDIM. But I am not observing this. Here is the code I used for testing. Please let me know if I am missing something.

import torch
from diffusers import DDIMParallelScheduler, DDIMScheduler
from diffusers import StableDiffusionParadigmsPipeline, StableDiffusionPipeline
import numpy as np


torch.manual_seed(1)
scheduler = DDIMParallelScheduler.from_pretrained("runwayml/stable-diffusion-v1-5", subfolder="scheduler", timestep_spacing="trailing")
pipe = StableDiffusionParadigmsPipeline.from_pretrained(
    "runwayml/stable-diffusion-v1-5", scheduler=scheduler, torch_dtype=torch.float16
)
pipe = pipe.to("cuda")
prompt = "a photo of an astronaut riding a horse on mars"

image1 = pipe(prompt, parallel=1, num_inference_steps=50).images[0]

torch.manual_seed(1)
scheduler = DDIMScheduler.from_pretrained("runwayml/stable-diffusion-v1-5", subfolder="scheduler", timestep_spacing="trailing")
pipe = StableDiffusionPipeline.from_pretrained(
    "runwayml/stable-diffusion-v1-5", scheduler=scheduler, torch_dtype=torch.float16
)
pipe = pipe.to("cuda")
prompt = "a photo of an astronaut riding a horse on mars"

image2 = pipe(prompt, num_inference_steps=50).images[0]

img1 = np.asarray(image1)
img2 = np.asarray(image2)

print((img1-img2).mean())

The output should be ideally 0 but that is not what I am observing. Please help.

Inpainting

Is it possible to run this with inpainting?

Also, any noticeable deterioration of images?

Thanks for your work!

Congrats! - Licensing

We'd love to incorporate this into InvokeAI, but would like to request a license be added so we know how (and whether) we can use it.

Thanks for the excellent work, and congrats on the accomplishment @AndyShih12 et. al

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.