text stringlengths 0 5.54k |
|---|
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 7.5) β |
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, |
usually at the expense of lower image quality. |
negative_prompt (str or List[str], optional) β |
The prompt or prompts not to guide the image generation. Ignored when not using guidance (i.e., ignored |
if guidance_scale is less than 1). |
num_images_per_prompt (int, optional, defaults to 1) β |
The number of images to generate per prompt. |
eta (float, optional, defaults to 0.0) β |
Corresponds to parameter eta (Ξ·) in the DDIM paper: https://arxiv.org/abs/2010.02502. Only applies to |
schedulers.DDIMScheduler, will be ignored for others. |
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, defaults to True) β |
Whether or not to return a StableDiffusionPipelineOutput instead of a |
plain tuple. |
callback (Callable, optional) β |
A function that will be called every callback_steps steps during inference. The function will be |
called with the following arguments: callback(step: int, timestep: int, latents: torch.FloatTensor). |
callback_steps (int, optional, defaults to 1) β |
The frequency at which the callback function will be called. If not specified, the callback will be |
called at every step. |
sld_guidance_scale (float, optional, defaults to 1000) β |
Safe latent guidance as defined in Safe Latent Diffusion. |
sld_guidance_scale is defined as sS of Eq. 6. If set to be less than 1, safety guidance will be |
disabled. |
sld_warmup_steps (int, optional, defaults to 10) β |
Number of warmup steps for safety guidance. SLD will only be applied for diffusion steps greater than |
sld_warmup_steps. sld_warmup_steps is defined as delta of Safe Latent |
Diffusion. |
sld_threshold (float, optional, defaults to 0.01) β |
Threshold that separates the hyperplane between appropriate and inappropriate images. sld_threshold |
is defined as lamda of Eq. 5 in Safe Latent Diffusion. |
sld_momentum_scale (float, optional, defaults to 0.3) β |
Scale of the SLD momentum to be added to the safety guidance at each diffusion step. If set to 0.0 |
momentum will be disabled. Momentum is already built up during warmup, i.e. for diffusion steps smaller |
than sld_warmup_steps. sld_momentum_scale is defined as sm of Eq. 7 in Safe Latent |
Diffusion. |
sld_mom_beta (float, optional, defaults to 0.4) β |
Defines how safety guidance momentum builds up. sld_mom_beta indicates how much of the previous |
momentum will be kept. Momentum is already built up during warmup, i.e. for diffusion steps smaller |
than sld_warmup_steps. sld_mom_beta is defined as beta m of Eq. 8 in Safe Latent |
Diffusion. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.