stable_diffusion_gen(pretrained: bool = False, overrides: object = {})v1 posed as a sampler.
Model Size
Parameters
pretrainedbool= FalseLoad the released v1 checkpoint into the sampler. This is the
factory that produces images, so it is the one that most wants
the weights — it loads the same entry
stable_diffusion does, into the model held inside.**overridesobject= {}Optional
StableDiffusionConfig field overrides.Returns
StableDiffusionForImageGenerationExposes generate with classifier-free guidance.
Notes
Reference: Rombach et al., CVPR 2022 (arXiv:2112.10752), §4.3.
Examples
>>> from lucid.models import stable_diffusion_gen
>>> model = stable_diffusion_gen()
Read from the configuration for the same reason as
stable_diffusion — the sampler holds the same network:
>>> from lucid.models.generative.stable_diffusion import (
... StableDiffusionConfig)
>>> StableDiffusionConfig().sample_size
512