text stringlengths 0 5.54k |
|---|
Frozen text-encoder. Stable Diffusion uses the text portion of |
CLIP, specifically |
the clip-vit-large-patch14 variant. tokenizer (CLIPTokenizer) — |
Tokenizer of class |
CLIPTokenizer. unet (UNet2DConditionModel) — Conditional U-Net architecture to denoise the encoded image latents. scheduler (SchedulerMixin) — |
A scheduler to be used in combination with unet to denoise the encoded image latents. Can be one of |
DDIMScheduler, LMSDiscreteScheduler, or PNDMScheduler. safety_checker (StableDiffusionSafetyChecker) — |
Classification module that estimates whether generated images could be considered offensive or harmful. |
Please, refer to the model card for details. feature_extractor (CLIPFeatureExtractor) — |
Model that extracts features from generated images to be used as inputs for the safety_checker. Pipeline for text-to-image generation using Stable Diffusion augmented with T2I-Adapter |
https://arxiv.org/abs/2302.08453 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.) The pipeline also inherits the following loading methods: load_textual_inversion() for loading textual inversion embeddings from_single_file() for loading .ckpt files load_lora_weights() for loading LoRA weigh... |
The prompt or prompts to guide the image generation. If not defined, one has to pass prompt_embeds. |
instead. prompt_2 (str or List[str], optional) — |
The prompt or prompts to be sent to the tokenizer_2 and text_encoder_2. If not defined, prompt is |
used in both text-encoders image (torch.FloatTensor, PIL.Image.Image, List[torch.FloatTensor] or List[PIL.Image.Image] or List[List[PIL.Image.Image]]) — |
The Adapter input condition. Adapter uses this input condition to generate guidance to Unet. If the |
type is specified as Torch.FloatTensor, it is passed to Adapter as is. PIL.Image.Image` can also be |
accepted as an image. The control image is automatically resized to fit the output image. height (int, optional, defaults to self.unet.config.sample_size * self.vae_scale_factor) — |
The height in pixels of the generated image. Anything below 512 pixels won’t work well for |
stabilityai/stable-diffusion-xl-base-1.0 |
and checkpoints that are not specifically fine-tuned on low resolutions. width (int, optional, defaults to self.unet.config.sample_size * self.vae_scale_factor) — |
The width in pixels of the generated image. Anything below 512 pixels won’t work well for |
stabilityai/stable-diffusion-xl-base-1.0 |
and checkpoints that are not specifically fine-tuned on low resolutions. 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. timesteps (List[int], optional) — |
Custom timesteps to use for the denoising process with schedulers which support a timesteps argument |
in their set_timesteps method. If not defined, the default behavior when num_inference_steps is |
passed will be used. Must be in descending order. denoising_end (float, optional) — |
When specified, determines the fraction (between 0.0 and 1.0) of the total denoising process to be |
completed before it is intentionally prematurely terminated. As a result, the returned sample will |
still retain a substantial amount of noise as determined by the discrete timesteps selected by the |
scheduler. The denoising_end parameter should ideally be utilized when this pipeline forms a part of a |
“Mixture of Denoisers” multi-pipeline setup, as elaborated in Refining the Image |
Output guidance_scale (float, optional, defaults to 5.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, |
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. If not defined, one has to pass |
negative_prompt_embeds instead. Ignored when not using guidance (i.e., ignored if guidance_scale is |
less than 1). negative_prompt_2 (str or List[str], optional) — |
The prompt or prompts not to guide the image generation to be sent to tokenizer_2 and |
text_encoder_2. If not defined, negative_prompt is used in both text-encoders 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 or List[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. prompt_embeds (torch.FloatTensor, optional) — |
Pre-generated text embeddings. Can be used to easily tweak text inputs, e.g. prompt weighting. If not |
provided, text embeddings will be generated from prompt input argument. negative_prompt_embeds (torch.FloatTensor, optional) — |
Pre-generated negative text embeddings. Can be used to easily tweak text inputs, e.g. prompt |
weighting. If not provided, negative_prompt_embeds will be generated from negative_prompt input |
argument. pooled_prompt_embeds (torch.FloatTensor, optional) — |
Pre-generated pooled text embeddings. Can be used to easily tweak text inputs, e.g. prompt weighting. |
If not provided, pooled text embeddings will be generated from prompt input argument. negative_pooled_prompt_embeds (torch.FloatTensor, optional) — |
Pre-generated negative pooled text embeddings. Can be used to easily tweak text inputs, e.g. prompt |
weighting. If not provided, pooled negative_prompt_embeds will be generated from negative_prompt |
input argument. |
ip_adapter_image — (PipelineImageInput, optional): Optional image input to work with IP Adapters. 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 ~pipelines.stable_diffusion_xl.StableDiffusionAdapterPipelineOutput |
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. cross_attention_kwargs (dict, optional) — |
A kwargs dictionary that if specified is passed along to the AttentionProcessor as defined under |
self.processor in |
diffusers.models.attention_processor. guidance_rescale (float, optional, defaults to 0.0) — |
Guidance rescale factor proposed by Common Diffusion Noise Schedules and Sample Steps are |
Flawed guidance_scale is defined as φ in equation 16. of |
Common Diffusion Noise Schedules and Sample Steps are Flawed. |
Guidance rescale factor should fix overexposure when using zero terminal SNR. original_size (Tuple[int], optional, defaults to (1024, 1024)) — |
If original_size is not the same as target_size the image will appear to be down- or upsampled. |
original_size defaults to (height, width) if not specified. Part of SDXL’s micro-conditioning as |
explained in section 2.2 of |
https://huggingface.co/papers/2307.01952. crops_coords_top_left (Tuple[int], optional, defaults to (0, 0)) — |
crops_coords_top_left can be used to generate an image that appears to be “cropped” from the position |
crops_coords_top_left downwards. Favorable, well-centered images are usually achieved by setting |
crops_coords_top_left to (0, 0). Part of SDXL’s micro-conditioning as explained in section 2.2 of |
https://huggingface.co/papers/2307.01952. target_size (Tuple[int], optional, defaults to (1024, 1024)) — |
For most cases, target_size should be set to the desired height and width of the generated image. If |
not specified it will default to (height, width). Part of SDXL’s micro-conditioning as explained in |
section 2.2 of https://huggingface.co/papers/2307.01952. |
section 2.2 of https://huggingface.co/papers/2307.01952. negative_original_size (Tuple[int], optional, defaults to (1024, 1024)) — |
To negatively condition the generation process based on a specific image resolution. Part of SDXL’s |
micro-conditioning as explained in section 2.2 of |
https://huggingface.co/papers/2307.01952. For more |
information, refer to this issue thread: https://github.com/huggingface/diffusers/issues/4208. negative_crops_coords_top_left (Tuple[int], optional, defaults to (0, 0)) — |
To negatively condition the generation process based on a specific crop coordinates. Part of SDXL’s |
micro-conditioning as explained in section 2.2 of |
https://huggingface.co/papers/2307.01952. For more |
information, refer to this issue thread: https://github.com/huggingface/diffusers/issues/4208. negative_target_size (Tuple[int], optional, defaults to (1024, 1024)) — |
To negatively condition the generation process based on a target image resolution. It should be as same |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.