Coder Social home page Coder Social logo

Comments (5)

cly avatar cly commented on August 18, 2024 1

I tested the following and got back the exact same otter as the first example. This is basically img2img with an empty input image latent.

start_step = 0
noise = torch.randn((1, 4, 64, 64), generator=generator).to(torch_device)
latents = scheduler.add_noise(torch.zeros(1, 4, 64, 64).to(torch_device), noise, timesteps=torch.tensor([scheduler.timesteps[start_step]]))
latents = latents.to(torch_device).float()

# Loop
for i, t in tqdm(enumerate(scheduler.timesteps)):
    if i >= start_step: # << This is the only modification to the loop we do

Using the existing code, it doesn't work. Also, I noticed fewer artifacts with i >= start_step for some other samples!

from diffusion-nbs.

johnowhitaker avatar johnowhitaker commented on August 18, 2024 1

Sure, that would be great!
Please make sure only the relevant part of the notebook has been changed so that we don't end up storing a new set of cell outputs and such.

from diffusion-nbs.

johnowhitaker avatar johnowhitaker commented on August 18, 2024

I wasn't sure, to be honest! I think either works fine since we can decide what start_step means. I have vague recollections of there being some sort of off-by-one thing with the timesteps but I remember my specific rationale :) I'll check it out next time I have the notebook out and running, and will leave this issue open n the meantime in case anyone else has thoughts

from diffusion-nbs.

cly avatar cly commented on August 18, 2024

I can put up a PR if you'd like!

from diffusion-nbs.

cly avatar cly commented on August 18, 2024

Fixed in #21

from diffusion-nbs.

Related Issues (14)

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.