fboulnois / stable-diffusion-docker

Run the official Stable Diffusion releases in a Docker container with txt2img, img2img, depth2img, pix2pix, upscale4x, and inpaint.
GNU Affero General Public License v3.0
735 stars 127 forks source link

Addition of Samplers #58

Closed azher-alnabi closed 1 year ago

azher-alnabi commented 1 year ago

Hello!

I was curious if there would be an addition to change what samplers you would be able to use at ./build.sh run. I am particularly interested in adding the following sampler: (DPM++ 2S a Karras). The reason why I ask is so that I could minimize the step count while maintaining a high-fidelity image as this would allow for a quicker rendering of these images.

Thank you for this docker file!

fboulnois commented 1 year ago

Hello! This is already implemented in the underlying diffusers library as DPMSolverSinglestepScheduler: https://github.com/huggingface/diffusers/issues/277#issuecomment-1371428672 . More information on that scheduler can be found here: https://huggingface.co/docs/diffusers/api/schedulers/singlestep_dpm_solver

You'll want to use the option --scheduler DPMSolverSinglestepScheduler with ./build run.

azher-alnabi commented 1 year ago

Works solid, thank you!