| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
|
||
| output, new_output = sample, sample | ||
| for t in range(time_step, time_step + scheduler.config.solver_order + 1): | ||
| t = scheduler.timesteps[t] |
There was a problem hiding this comment.
We used 0,1,2 directly as timestep index here, but they are not even in the self.timestepes. In the previous implementation, it will default to the last timesteps when it is outside of the timesteps range, but I don't think it is intended. I changed it here, I think it makes more sense this way. Let me know if it's not the case
Sorry, something went wrong.
|
|
||
| assert sample.dtype == torch.float16 | ||
|
|
||
| def test_unique_timesteps(self, **config): |
There was a problem hiding this comment.
don't need this test anymore because we allow duplicated timesteps now
Sorry, something went wrong.
|
@patrickvonplaten another review please :) |
Sorry, something went wrong.
|
|
||
| scheduler.set_timesteps(scheduler.config.num_train_timesteps) | ||
| assert len(scheduler.timesteps.unique()) == scheduler.num_inference_steps | ||
| assert len(scheduler.timesteps) == scheduler.num_inference_steps |
There was a problem hiding this comment.
nice!
Sorry, something went wrong.
There was a problem hiding this comment.
Very nice!
Sorry, something went wrong.
|
@yiyixuxu This refactor has broken stable diffusion (1.5) img2img for unipc both use denoising strength = 0.6 |
Sorry, something went wrong.
Same with DPMSolverMultistepScheduler using Karras sigmas. Just returns noise with anything under 1.0 denoising strength. Havent tested it without Karras sigmas. |
Sorry, something went wrong.
|
@ljk1291 |
Sorry, something went wrong.
|
it seems like this bug still resurfaces somehow when using the legacy inpainting pipeline for some reason |
Sorry, something went wrong.
|
Hi @burgalon can you be more specific? could you maybe open a bug report and provide an example? thanks! YiYi |
Sorry, something went wrong.
|
@yiyixuxu |
Sorry, something went wrong.
--------- Co-authored-by: yiyixuxu <yixu310@gmail,com> Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
--------- Co-authored-by: yiyixuxu <yixu310@gmail,com> Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
| Back | FazBrowse Home | New Git URL |
I think I overcomplicated things with this #4690 by trying to follow k-diffusion implementation.
trying it again with a simpler approach here: we simply calculate lambda_t, sigma_t and alpha_t from sigma
to-do
testing
Notes:
I compared the results against the current implementation (for dpm multistep only). There is some slight numerical difference when using k-sigmas; for example, in the last testing examples below on the 4th row (sde-dpmsolver++, use_karras_sigma=True), you can visually see the outputs are slightly different.
Also, I had to loosen a test here #4986 (comment).
However, the new implementation is more accurate by using the sigma directly.