add dpm-solver support (much faster than plms)#440
Merged
rromb merged 2 commits intoCompVis:mainfrom Nov 16, 2022
Merged
Conversation
Contributor
Author
|
An example command for sampling by DPM-Solver: |
This was referenced Nov 2, 2022
Collaborator
|
This is great, thank you very much 👍 |
rajbala
reviewed
Nov 16, 2022
There was a problem hiding this comment.
I used the instructions to install the dependencies:
conda env create -f environment.yaml
conda activate ldm
But I get the following error when I try to run python scripts/txt2img.py --prompt "a photograph of an astronaut riding a horse"
[Traceback (most recent call last):
File "scripts/txt2img.py", line 20, in <module>
from ldm.models.diffusion.dpm_solver import DPMSolverSampler
File "/home/opc/stable-diffusion/ldm/models/diffusion/dpm_solver/__init__.py", line 1, in <module>
from .sampler import DPMSolverSampler
File "/home/opc/stable-diffusion/ldm/models/diffusion/dpm_solver/sampler.py", line 5, in <module>
from .solver import NoiseScheduleVP, model_wrapper, DPM_Solver
ModuleNotFoundError: No module named 'ldm.models.diffusion.dpm_solver.solver'
]
Any ideas as to what is happening?
Collaborator
|
should be fixed in 21f890f |
|
It is fixed indeed! :) |
smile-struggler
pushed a commit
to smile-struggler/stable-diffusion
that referenced
this pull request
Jul 5, 2024
add dpm-solver support (much faster than plms)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DPM-Solver (https://github.com/LuChengTHU/dpm-solver) is much faster than PLMS and DDIM, which can generate almost converged samples in only 20-25 steps.
Example images of the difference between DDIM, PLMS, and DPM-Solver can be found in: https://github.com/LuChengTHU/dpm-solver/tree/main/example_v2/stable-diffusion