GithubHelp home page GithubHelp logo

Comments (10)

LaurentMazare avatar LaurentMazare commented on May 29, 2024

Ah the readme was actually out of date as this was the case in the very first version but this bit was then removed from the default example. We could add this back if it's helpful but for now I've just fixed the readme.

from diffusers-rs.

JohnAlcatraz avatar JohnAlcatraz commented on May 29, 2024

In that case, it would be great if you could add it back, yes! That feature would be very useful for me.

from diffusers-rs.

JohnAlcatraz avatar JohnAlcatraz commented on May 29, 2024

I'm still really interested in this feature being added back in.

from diffusers-rs.

LaurentMazare avatar LaurentMazare commented on May 29, 2024

Sorry for the delay, I've just pushed some changes that add a --intermediary-images flag. When set, these images should be generated again.

from diffusers-rs.

JohnAlcatraz avatar JohnAlcatraz commented on May 29, 2024

Awesome, thanks!

from diffusers-rs.

JohnAlcatraz avatar JohnAlcatraz commented on May 29, 2024

At first glance, the new flag seems to work great, but there is something weird going on with --intermediary-images.

Firstly, the two last images it generates seem to always be fully identical. So if I run a generation with --n-steps 5, then sd_final-4.png and sd_final-5.png look fully identical to the eye. The SHA-256 hash of the files is not identical, but they look pixel-perfect identical to the eye.

But what's most weird is, the intermediary images make it look as if the speed at which the image converges seems to change depending on what --n-steps you use? That makes no sense at all, but look at this, this is an image generated with --n-steps 10:

image

You can see the last two images are identical, but more importantly, the first "perfect" looking image is number 9.

But now the magic comes, this is the exact same image generated with --n-steps 5:

image

So now, the image looks way better already after just 4 steps, where it was just mostly noise before. How can that be?

The final image generated with --n-steps 5 looks less good than the final image generated with --n-steps 10, so that's as expected. But the first 5 intermediary images should look fully identical in both cases, right? And they certainly don't.

from diffusers-rs.

LaurentMazare avatar LaurentMazare commented on May 29, 2024

I might be misunderstanding what you say but I wouldn't think the intermediary images should look the same: the scheduler is there to ensure that more progress is made during each step for lower values of --n-steps (but as it takes "larger" steps the diffusion process is less precise than with larger --n-steps values).

from diffusers-rs.

JohnAlcatraz avatar JohnAlcatraz commented on May 29, 2024

Ok, I guess I simply misunderstand how the scheduler works then.

So then the only issue is why the two last images generated by --intermediary-images always look fully identical, that appears to be a bug. For example, if you run with --n-steps 2, you will get two intermediary images and 1 final output image, and they're all fully identical. But there should be at least 2 different images.

from diffusers-rs.

LaurentMazare avatar LaurentMazare commented on May 29, 2024

With this scheduling process, it's likely for the last step to only make very tiny adjustments so it's unclear to me whether this is expected or not. Could you try comparing this to the python version and see if it happens there too?

from diffusers-rs.

LaurentMazare avatar LaurentMazare commented on May 29, 2024

Closing this as it has been a while and the main issue adding an option to get the intermediary images has been implemented.

from diffusers-rs.

Related Issues (20)

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.