text
stringlengths
0
5.54k
This model inherits from DiffusionPipeline. Check the superclass documentation for the generic methods the
library implements for all the pipelines (such as downloading or saving, running on a particular device, etc.)
__call__
<
source
>
(
prompt: typing.Union[str, typing.List[str]]
height: typing.Optional[int] = None
width: typing.Optional[int] = None
num_inference_steps: typing.Optional[int] = 50
guidance_scale: typing.Optional[float] = 1.0
eta: typing.Optional[float] = 0.0
generator: typing.Union[torch._C.Generator, typing.List[torch._C.Generator], NoneType] = None
latents: typing.Optional[torch.FloatTensor] = None
output_type: typing.Optional[str] = 'pil'
return_dict: bool = True
**kwargs
)
β†’
ImagePipelineOutput or tuple
Parameters
prompt (str or List[str]) β€”
The prompt or prompts to guide the image generation.
height (int, optional, defaults to self.unet.config.sample_size * self.vae_scale_factor) β€”
The height in pixels of the generated image.
width (int, optional, defaults to self.unet.config.sample_size * self.vae_scale_factor) β€”
The width in pixels of the generated image.
num_inference_steps (int, optional, defaults to 50) β€”
The number of denoising steps. More denoising steps usually lead to a higher quality image at the
expense of slower inference.
guidance_scale (float, optional, defaults to 1.0) β€”
Guidance scale as defined in Classifier-Free Diffusion Guidance.
guidance_scale is defined as w of equation 2. of Imagen
Paper. Guidance scale is enabled by setting guidance_scale > 1. Higher guidance scale encourages to generate images that are closely linked to the text prompt at
the, usually at the expense of lower image quality.
generator (torch.Generator, optional) β€”
One or a list of torch generator(s)
to make generation deterministic.
latents (torch.FloatTensor, optional) β€”
Pre-generated noisy latents, sampled from a Gaussian distribution, to be used as inputs for image
generation. Can be used to tweak the same generation with different prompts. If not provided, a latents
tensor will ge generated by sampling using the supplied random generator.
output_type (str, optional, defaults to "pil") β€”
The output format of the generate image. Choose between
PIL: PIL.Image.Image or np.array.
return_dict (bool, optional) β€”
Whether or not to return a ImagePipelineOutput instead of a plain tuple.
Returns
ImagePipelineOutput or tuple
~pipelines.utils.ImagePipelineOutput if return_dict is
True, otherwise a `tuple. When returning a tuple, the first element is a list with the generated images.
LDMSuperResolutionPipeline
class diffusers.LDMSuperResolutionPipeline
<
source
>
(
vqvae: VQModel
unet: UNet2DModel
scheduler: typing.Union[diffusers.schedulers.scheduling_ddim.DDIMScheduler, diffusers.schedulers.scheduling_pndm.PNDMScheduler, diffusers.schedulers.scheduling_lms_discrete.LMSDiscreteScheduler, diffusers.schedulers.scheduling_euler_discrete.EulerDiscreteScheduler, diffusers.schedulers.scheduling_euler_ancestral_discrete.EulerAncestralDiscreteScheduler, diffusers.schedulers.scheduling_dpmsolver_multistep.DPMSolverMultistepScheduler]
)