text
stringlengths
3
14.4k
source
stringclasses
273 values
url
stringlengths
47
172
source_section
stringlengths
0
95
file_type
stringclasses
1 value
id
stringlengths
3
6
<!--Copyright 2024 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/using-diffusers/img2img.md
https://huggingface.co/docs/diffusers/en/using-diffusers/img2img/
.md
83_0
[[open-in-colab]] Image-to-image is similar to [text-to-image](conditional_image_generation), but in addition to a prompt, you can also pass an initial image as a starting point for the diffusion process. The initial image is encoded to latent space and noise is added to it. Then the latent diffusion model takes a pr...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/using-diffusers/img2img.md
https://huggingface.co/docs/diffusers/en/using-diffusers/img2img/#image-to-image
#image-to-image
.md
83_1
The most popular image-to-image models are [Stable Diffusion v1.5](https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5), [Stable Diffusion XL (SDXL)](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0), and [Kandinsky 2.2](https://huggingface.co/kandinsky-community/kandinsky-2-2-decoder). Th...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/using-diffusers/img2img.md
https://huggingface.co/docs/diffusers/en/using-diffusers/img2img/#popular-models
#popular-models
.md
83_2
Stable Diffusion v1.5 is a latent diffusion model initialized from an earlier checkpoint, and further finetuned for 595K steps on 512x512 images. To use this pipeline for image-to-image, you'll need to prepare an initial image to pass to the pipeline. Then you can pass a prompt and the image to the pipeline to generate...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/using-diffusers/img2img.md
https://huggingface.co/docs/diffusers/en/using-diffusers/img2img/#stable-diffusion-v15
#stable-diffusion-v15
.md
83_3
SDXL is a more powerful version of the Stable Diffusion model. It uses a larger base model, and an additional refiner model to increase the quality of the base model's output. Read the [SDXL](sdxl) guide for a more detailed walkthrough of how to use this model, and other techniques it uses to produce high quality image...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/using-diffusers/img2img.md
https://huggingface.co/docs/diffusers/en/using-diffusers/img2img/#stable-diffusion-xl-sdxl
#stable-diffusion-xl-sdxl
.md
83_4
The Kandinsky model is different from the Stable Diffusion models because it uses an image prior model to create image embeddings. The embeddings help create a better alignment between text and images, allowing the latent diffusion model to generate better images. The simplest way to use Kandinsky 2.2 is: ```py imp...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/using-diffusers/img2img.md
https://huggingface.co/docs/diffusers/en/using-diffusers/img2img/#kandinsky-22
#kandinsky-22
.md
83_5
There are several important parameters you can configure in the pipeline that'll affect the image generation process and image quality. Let's take a closer look at what these parameters do and how changing them affects the output.
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/using-diffusers/img2img.md
https://huggingface.co/docs/diffusers/en/using-diffusers/img2img/#configure-pipeline-parameters
#configure-pipeline-parameters
.md
83_6
`strength` is one of the most important parameters to consider and it'll have a huge impact on your generated image. It determines how much the generated image resembles the initial image. In other words: - 📈 a higher `strength` value gives the model more "creativity" to generate an image that's different from the i...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/using-diffusers/img2img.md
https://huggingface.co/docs/diffusers/en/using-diffusers/img2img/#strength
#strength
.md
83_7
The `guidance_scale` parameter is used to control how closely aligned the generated image and text prompt are. A higher `guidance_scale` value means your generated image is more aligned with the prompt, while a lower `guidance_scale` value means your generated image has more space to deviate from the prompt. You can ...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/using-diffusers/img2img.md
https://huggingface.co/docs/diffusers/en/using-diffusers/img2img/#guidance-scale
#guidance-scale
.md
83_8
A negative prompt conditions the model to *not* include things in an image, and it can be used to improve image quality or modify an image. For example, you can improve image quality by including negative prompts like "poor details" or "blurry" to encourage the model to generate a higher quality image. Or you can modif...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/using-diffusers/img2img.md
https://huggingface.co/docs/diffusers/en/using-diffusers/img2img/#negative-prompt
#negative-prompt
.md
83_9
There are some other interesting ways you can use an image-to-image pipeline aside from just generating an image (although that is pretty cool too). You can take it a step further and chain it with other pipelines.
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/using-diffusers/img2img.md
https://huggingface.co/docs/diffusers/en/using-diffusers/img2img/#chained-image-to-image-pipelines
#chained-image-to-image-pipelines
.md
83_10
Chaining a text-to-image and image-to-image pipeline allows you to generate an image from text and use the generated image as the initial image for the image-to-image pipeline. This is useful if you want to generate an image entirely from scratch. For example, let's chain a Stable Diffusion and a Kandinsky model. Sta...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/using-diffusers/img2img.md
https://huggingface.co/docs/diffusers/en/using-diffusers/img2img/#text-to-image-to-image
#text-to-image-to-image
.md
83_11
You can also chain multiple image-to-image pipelines together to create more interesting images. This can be useful for iteratively performing style transfer on an image, generating short GIFs, restoring color to an image, or restoring missing areas of an image. Start by generating an image: ```py import torch from...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/using-diffusers/img2img.md
https://huggingface.co/docs/diffusers/en/using-diffusers/img2img/#image-to-image-to-image
#image-to-image-to-image
.md
83_12
Another way you can chain your image-to-image pipeline is with an upscaler and super-resolution pipeline to really increase the level of details in an image. Start with an image-to-image pipeline: ```py import torch from diffusers import AutoPipelineForImage2Image from diffusers.utils import make_image_grid, load_i...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/using-diffusers/img2img.md
https://huggingface.co/docs/diffusers/en/using-diffusers/img2img/#image-to-upscaler-to-super-resolution
#image-to-upscaler-to-super-resolution
.md
83_13
Trying to generate an image that looks exactly the way you want can be difficult, which is why controlled generation techniques and models are so useful. While you can use the `negative_prompt` to partially control image generation, there are more robust methods like prompt weighting and ControlNets.
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/using-diffusers/img2img.md
https://huggingface.co/docs/diffusers/en/using-diffusers/img2img/#control-image-generation
#control-image-generation
.md
83_14
Prompt weighting allows you to scale the representation of each concept in a prompt. For example, in a prompt like "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k", you can choose to increase or decrease the embeddings of "astronaut" and "jungle". The [Compel](https://github.com/damian0815/compel...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/using-diffusers/img2img.md
https://huggingface.co/docs/diffusers/en/using-diffusers/img2img/#prompt-weighting
#prompt-weighting
.md
83_15
ControlNets provide a more flexible and accurate way to control image generation because you can use an additional conditioning image. The conditioning image can be a canny image, depth map, image segmentation, and even scribbles! Whatever type of conditioning image you choose, the ControlNet generates an image that pr...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/using-diffusers/img2img.md
https://huggingface.co/docs/diffusers/en/using-diffusers/img2img/#controlnet
#controlnet
.md
83_16
Running diffusion models is computationally expensive and intensive, but with a few optimization tricks, it is entirely possible to run them on consumer and free-tier GPUs. For example, you can use a more memory-efficient form of attention such as PyTorch 2.0's [scaled-dot product attention](../optimization/torch2.0#sc...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/using-diffusers/img2img.md
https://huggingface.co/docs/diffusers/en/using-diffusers/img2img/#optimize
#optimize
.md
83_17
<!--Copyright 2024 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/using-diffusers/unconditional_image_generation.md
https://huggingface.co/docs/diffusers/en/using-diffusers/unconditional_image_generation/
.md
84_0
[[open-in-colab]] Unconditional image generation generates images that look like a random sample from the training data the model was trained on because the denoising process is not guided by any additional context like text or image. To get started, use the [`DiffusionPipeline`] to load the [anton-l/ddpm-butterfli...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/using-diffusers/unconditional_image_generation.md
https://huggingface.co/docs/diffusers/en/using-diffusers/unconditional_image_generation/#unconditional-image-generation
#unconditional-image-generation
.md
84_1
Diffusers' pipelines can be used as an inference engine for a server. It supports concurrent and multithreaded requests to generate images that may be requested by multiple users at the same time. This guide will show you how to use the [`StableDiffusion3Pipeline`] in a server, but feel free to use any pipeline you w...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/using-diffusers/create_a_server.md
https://huggingface.co/docs/diffusers/en/using-diffusers/create_a_server/#create-a-server
#create-a-server
.md
85_0
<!--Copyright 2024 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/advanced_inference/outpaint.md
https://huggingface.co/docs/diffusers/en/advanced_inference/outpaint/
.md
86_0
Outpainting extends an image beyond its original boundaries, allowing you to add, replace, or modify visual elements in an image while preserving the original image. Like [inpainting](../using-diffusers/inpaint), you want to fill the white area (in this case, the area outside of the original image) with new visual elem...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/advanced_inference/outpaint.md
https://huggingface.co/docs/diffusers/en/advanced_inference/outpaint/#outpainting
#outpainting
.md
86_1
Start by picking an image to outpaint with and remove the background with a Space like [BRIA-RMBG-1.4](https://hf.co/spaces/briaai/BRIA-RMBG-1.4). <iframe src="https://briaai-bria-rmbg-1-4.hf.space" frameborder="0" width="850" height="450" ></iframe> For example, remove the background from this image of a pair of s...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/advanced_inference/outpaint.md
https://huggingface.co/docs/diffusers/en/advanced_inference/outpaint/#image-preparation
#image-preparation
.md
86_2
Once your image is ready, you can generate content in the white area around the shoes with [controlnet-inpaint-dreamer-sdxl](https://hf.co/destitech/controlnet-inpaint-dreamer-sdxl), a SDXL ControlNet trained for inpainting. Load the inpainting ControlNet, ZoeDepth model, VAE and pass them to the [`StableDiffusionXLC...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/advanced_inference/outpaint.md
https://huggingface.co/docs/diffusers/en/advanced_inference/outpaint/#outpaint
#outpaint
.md
86_3
<!--Copyright 2024 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/outputs.md
https://huggingface.co/docs/diffusers/en/api/outputs/
.md
87_0
All model outputs are subclasses of [`~utils.BaseOutput`], data structures containing all the information returned by the model. The outputs can also be used as tuples or dictionaries. For example: ```python from diffusers import DDIMPipeline pipeline = DDIMPipeline.from_pretrained("google/ddpm-cifar10-32") output...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/outputs.md
https://huggingface.co/docs/diffusers/en/api/outputs/#outputs
#outputs
.md
87_1
BaseOutput Base class for all model outputs as dataclass. Has a `__getitem__` that allows indexing by integer or slice (like a tuple) or strings (like a dictionary) that will ignore the `None` attributes. Otherwise behaves like a regular Python dictionary. <Tip warning={true}> You can't unpack a [`BaseOutput`] di...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/outputs.md
https://huggingface.co/docs/diffusers/en/api/outputs/#baseoutput
#baseoutput
.md
87_2
ImagePipelineOutput Output class for image pipelines. Args: images (`List[PIL.Image.Image]` or `np.ndarray`) List of denoised PIL images of length `batch_size` or NumPy array of shape `(batch_size, height, width, num_channels)`.
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/outputs.md
https://huggingface.co/docs/diffusers/en/api/outputs/#imagepipelineoutput
#imagepipelineoutput
.md
87_3
[[autodoc]] FlaxImagePipelineOutput: No module named 'flax'
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/outputs.md
https://huggingface.co/docs/diffusers/en/api/outputs/#flaximagepipelineoutput
#flaximagepipelineoutput
.md
87_4
AudioPipelineOutput Output class for audio pipelines. Args: audios (`np.ndarray`) List of denoised audio samples of a NumPy array of shape `(batch_size, num_channels, sample_rate)`.
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/outputs.md
https://huggingface.co/docs/diffusers/en/api/outputs/#audiopipelineoutput
#audiopipelineoutput
.md
87_5
ImageTextPipelineOutput Output class for joint image-text pipelines. Args: images (`List[PIL.Image.Image]` or `np.ndarray`) List of denoised PIL images of length `batch_size` or NumPy array of shape `(batch_size, height, width, num_channels)`. text (`List[str]` or `List[List[str]]`) List of generated text strings o...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/outputs.md
https://huggingface.co/docs/diffusers/en/api/outputs/#imagetextpipelineoutput
#imagetextpipelineoutput
.md
87_6
<!--Copyright 2024 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/attnprocessor.md
https://huggingface.co/docs/diffusers/en/api/attnprocessor/
.md
88_0
An attention processor is a class for applying different types of attention mechanisms.
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/attnprocessor.md
https://huggingface.co/docs/diffusers/en/api/attnprocessor/#attention-processor
#attention-processor
.md
88_1
AttnProcessor Default processor for performing attention-related computations. AttnProcessor Default processor for performing attention-related computations. 2_0 AttnAddedKVProcessor Processor for performing attention-related computations with extra learnable key and value matrices for the text encoder. Att...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/attnprocessor.md
https://huggingface.co/docs/diffusers/en/api/attnprocessor/#attnprocessor
#attnprocessor
.md
88_2
AllegroAttnProcessor2_0 Processor for implementing scaled dot-product attention (enabled by default if you're using PyTorch 2.0). This is used in the Allegro model. It applies a normalization layer and rotary embedding on the query and key vector.
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/attnprocessor.md
https://huggingface.co/docs/diffusers/en/api/attnprocessor/#allegro
#allegro
.md
88_3
AuraFlowAttnProcessor2_0 Attention processor used typically in processing Aura Flow. FusedAuraFlowAttnProcessor2_0 Attention processor used typically in processing Aura Flow with fused projections.
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/attnprocessor.md
https://huggingface.co/docs/diffusers/en/api/attnprocessor/#auraflow
#auraflow
.md
88_4
CogVideoXAttnProcessor2_0 Processor for implementing scaled dot-product attention for the CogVideoX model. It applies a rotary embedding on query and key vectors, but does not include spatial normalization. FusedCogVideoXAttnProcessor2_0 Processor for implementing scaled dot-product attention for the CogVideoX mo...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/attnprocessor.md
https://huggingface.co/docs/diffusers/en/api/attnprocessor/#cogvideox
#cogvideox
.md
88_5
CrossFrameAttnProcessor Cross frame attention processor. Each frame attends the first frame. Args: batch_size: The number that represents actual batch size, other than the frames. For example, calling unet with a single prompt and num_images_per_prompt=1, batch_size should be equal to 2, due to classifier-free guid...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/attnprocessor.md
https://huggingface.co/docs/diffusers/en/api/attnprocessor/#crossframeattnprocessor
#crossframeattnprocessor
.md
88_6
CustomDiffusionAttnProcessor Processor for implementing attention for the Custom Diffusion method. Args: train_kv (`bool`, defaults to `True`): Whether to newly train the key and value matrices corresponding to the text features. train_q_out (`bool`, defaults to `True`): Whether to newly train query matrices corres...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/attnprocessor.md
https://huggingface.co/docs/diffusers/en/api/attnprocessor/#custom-diffusion
#custom-diffusion
.md
88_7
FluxAttnProcessor2_0 Attention processor used typically in processing the SD3-like self-attention projections. FusedFluxAttnProcessor2_0 Attention processor used typically in processing the SD3-like self-attention projections. FluxSingleAttnProcessor2_0 Processor for implementing scaled dot-product attention (ena...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/attnprocessor.md
https://huggingface.co/docs/diffusers/en/api/attnprocessor/#flux
#flux
.md
88_8
HunyuanAttnProcessor2_0 Processor for implementing scaled dot-product attention (enabled by default if you're using PyTorch 2.0). This is used in the HunyuanDiT model. It applies a s normalization layer and rotary embedding on query and key vector. FusedHunyuanAttnProcessor2_0 Processor for implementing scaled do...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/attnprocessor.md
https://huggingface.co/docs/diffusers/en/api/attnprocessor/#hunyuan
#hunyuan
.md
88_9
PAGIdentitySelfAttnProcessor2_0 Processor for implementing PAG using scaled dot-product attention (enabled by default if you're using PyTorch 2.0). PAG reference: https://arxiv.org/abs/2403.17377 PAGCFGIdentitySelfAttnProcessor2_0 Processor for implementing PAG using scaled dot-product attention (enabled by defau...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/attnprocessor.md
https://huggingface.co/docs/diffusers/en/api/attnprocessor/#identityselfattnprocessor20
#identityselfattnprocessor20
.md
88_10
IPAdapterAttnProcessor Attention processor for Multiple IP-Adapters. Args: hidden_size (`int`): The hidden size of the attention layer. cross_attention_dim (`int`): The number of channels in the `encoder_hidden_states`. num_tokens (`int`, `Tuple[int]` or `List[int]`, defaults to `(4,)`): The context length of the i...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/attnprocessor.md
https://huggingface.co/docs/diffusers/en/api/attnprocessor/#ip-adapter
#ip-adapter
.md
88_11
JointAttnProcessor2_0 Attention processor used typically in processing the SD3-like self-attention projections. PAGJointAttnProcessor2_0 Attention processor used typically in processing the SD3-like self-attention projections. PAGCFGJointAttnProcessor2_0 Attention processor used typically in processing the SD3-like...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/attnprocessor.md
https://huggingface.co/docs/diffusers/en/api/attnprocessor/#jointattnprocessor20
#jointattnprocessor20
.md
88_12
LoRAAttnProcessor Processor for implementing attention with LoRA. LoRAAttnProcessor Processor for implementing attention with LoRA. 2_0 LoRAAttnAddedKVProcessor Processor for implementing attention with LoRA with extra learnable key and value matrices for the text encoder. LoRAXFormersAttnProcessor Proces...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/attnprocessor.md
https://huggingface.co/docs/diffusers/en/api/attnprocessor/#lora
#lora
.md
88_13
LuminaAttnProcessor2_0 Processor for implementing scaled dot-product attention (enabled by default if you're using PyTorch 2.0). This is used in the LuminaNextDiT model. It applies a s normalization layer and rotary embedding on query and key vector.
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/attnprocessor.md
https://huggingface.co/docs/diffusers/en/api/attnprocessor/#lumina-t2x
#lumina-t2x
.md
88_14
MochiAttnProcessor2_0 Attention processor used in Mochi. MochiVaeAttnProcessor2_0 Attention processor used in Mochi VAE.
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/attnprocessor.md
https://huggingface.co/docs/diffusers/en/api/attnprocessor/#mochi
#mochi
.md
88_15
SanaLinearAttnProcessor2_0 Processor for implementing scaled dot-product linear attention. SanaMultiscaleAttnProcessor2_0 Processor for implementing multiscale quadratic attention. PAGCFGSanaLinearAttnProcessor2_0 Processor for implementing scaled dot-product linear attention. PAGIdentitySanaLinearAttnProce...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/attnprocessor.md
https://huggingface.co/docs/diffusers/en/api/attnprocessor/#sana
#sana
.md
88_16
StableAudioAttnProcessor2_0 Processor for implementing scaled dot-product attention (enabled by default if you're using PyTorch 2.0). This is used in the Stable Audio model. It applies rotary embedding on query and key vector, and allows MHA, GQA or MQA.
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/attnprocessor.md
https://huggingface.co/docs/diffusers/en/api/attnprocessor/#stable-audio
#stable-audio
.md
88_17
SlicedAttnProcessor Processor for implementing sliced attention. Args: slice_size (`int`, *optional*): The number of steps to compute attention. Uses as many slices as `attention_head_dim // slice_size`, and `attention_head_dim` must be a multiple of the `slice_size`. SlicedAttnAddedKVProcessor Processor for im...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/attnprocessor.md
https://huggingface.co/docs/diffusers/en/api/attnprocessor/#slicedattnprocessor
#slicedattnprocessor
.md
88_18
XFormersAttnProcessor Processor for implementing memory efficient attention using xFormers. Args: attention_op (`Callable`, *optional*, defaults to `None`): The base [operator](https://facebookresearch.github.io/xformers/components/ops.html#xformers.ops.AttentionOpBase) to use as the attention operator. It is recom...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/attnprocessor.md
https://huggingface.co/docs/diffusers/en/api/attnprocessor/#xformersattnprocessor
#xformersattnprocessor
.md
88_19
XLAFlashAttnProcessor2_0 Processor for implementing scaled dot-product attention with pallas flash attention kernel if using `torch_xla`.
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/attnprocessor.md
https://huggingface.co/docs/diffusers/en/api/attnprocessor/#xlaflashattnprocessor20
#xlaflashattnprocessor20
.md
88_20
<!--Copyright 2024 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/normalization.md
https://huggingface.co/docs/diffusers/en/api/normalization/
.md
89_0
Customized normalization layers for supporting various models in 🤗 Diffusers.
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/normalization.md
https://huggingface.co/docs/diffusers/en/api/normalization/#normalization-layers
#normalization-layers
.md
89_1
AdaLayerNorm Norm layer modified to incorporate timestep embeddings. Parameters: embedding_dim (`int`): The size of each embedding vector. num_embeddings (`int`, *optional*): The size of the embeddings dictionary. output_dim (`int`, *optional*): norm_elementwise_affine (`bool`, defaults to `False): norm_eps (`bool`...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/normalization.md
https://huggingface.co/docs/diffusers/en/api/normalization/#adalayernorm
#adalayernorm
.md
89_2
AdaLayerNorm Norm layer modified to incorporate timestep embeddings. Parameters: embedding_dim (`int`): The size of each embedding vector. num_embeddings (`int`, *optional*): The size of the embeddings dictionary. output_dim (`int`, *optional*): norm_elementwise_affine (`bool`, defaults to `False): norm_eps (`bool`...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/normalization.md
https://huggingface.co/docs/diffusers/en/api/normalization/#adalayernormzero
#adalayernormzero
.md
89_3
AdaLayerNorm Norm layer modified to incorporate timestep embeddings. Parameters: embedding_dim (`int`): The size of each embedding vector. num_embeddings (`int`, *optional*): The size of the embeddings dictionary. output_dim (`int`, *optional*): norm_elementwise_affine (`bool`, defaults to `False): norm_eps (`bool`...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/normalization.md
https://huggingface.co/docs/diffusers/en/api/normalization/#adalayernormsingle
#adalayernormsingle
.md
89_4
AdaGroupNorm GroupNorm layer modified to incorporate timestep embeddings. Parameters: embedding_dim (`int`): The size of each embedding vector. num_embeddings (`int`): The size of the embeddings dictionary. num_groups (`int`): The number of groups to separate the channels into. act_fn (`str`, *optional*, defaults t...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/normalization.md
https://huggingface.co/docs/diffusers/en/api/normalization/#adagroupnorm
#adagroupnorm
.md
89_5
<!--Copyright 2024 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/utilities.md
https://huggingface.co/docs/diffusers/en/api/utilities/
.md
90_0
Utility and helper functions for working with 🤗 Diffusers.
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/utilities.md
https://huggingface.co/docs/diffusers/en/api/utilities/#utilities
#utilities
.md
90_1
numpy_to_pil Convert a numpy image or a batch of images to a PIL image.
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/utilities.md
https://huggingface.co/docs/diffusers/en/api/utilities/#numpytopil
#numpytopil
.md
90_2
pt_to_pil Convert a torch image to a PIL image.
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/utilities.md
https://huggingface.co/docs/diffusers/en/api/utilities/#pttopil
#pttopil
.md
90_3
load_image Loads `image` to a PIL Image. Args: image (`str` or `PIL.Image.Image`): The image to convert to the PIL Image format. convert_method (Callable[[PIL.Image.Image], PIL.Image.Image], *optional*): A conversion method to apply to the image after loading it. When set to `None` the image will be converted "RGB"...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/utilities.md
https://huggingface.co/docs/diffusers/en/api/utilities/#loadimage
#loadimage
.md
90_4
export_to_gif
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/utilities.md
https://huggingface.co/docs/diffusers/en/api/utilities/#exporttogif
#exporttogif
.md
90_5
export_to_video
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/utilities.md
https://huggingface.co/docs/diffusers/en/api/utilities/#exporttovideo
#exporttovideo
.md
90_6
make_image_grid Prepares a single grid of images. Useful for visualization purposes.
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/utilities.md
https://huggingface.co/docs/diffusers/en/api/utilities/#makeimagegrid
#makeimagegrid
.md
90_7
randn_tensor A helper function to create random tensors on the desired `device` with the desired `dtype`. When passing a list of generators, you can seed each batch size individually. If CPU generators are passed, the tensor is always created on the CPU.
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/utilities.md
https://huggingface.co/docs/diffusers/en/api/utilities/#randntensor
#randntensor
.md
90_8
<!--Copyright 2024 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/configuration.md
https://huggingface.co/docs/diffusers/en/api/configuration/
.md
91_0
Schedulers from [`~schedulers.scheduling_utils.SchedulerMixin`] and models from [`ModelMixin`] inherit from [`ConfigMixin`] which stores all the parameters that are passed to their respective `__init__` methods in a JSON-configuration file. <Tip> To use private or [gated](https://huggingface.co/docs/hub/models-gate...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/configuration.md
https://huggingface.co/docs/diffusers/en/api/configuration/#configuration
#configuration
.md
91_1
ConfigMixin Base class for all configuration classes. All configuration parameters are stored under `self.config`. Also provides the [`~ConfigMixin.from_config`] and [`~ConfigMixin.save_config`] methods for loading, downloading, and saving classes that inherit from [`ConfigMixin`]. Class attributes: - **config_name...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/configuration.md
https://huggingface.co/docs/diffusers/en/api/configuration/#configmixin
#configmixin
.md
91_2
<!--Copyright 2024 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/internal_classes_overview.md
https://huggingface.co/docs/diffusers/en/api/internal_classes_overview/
.md
92_0
The APIs in this section are more experimental and prone to breaking changes. Most of them are used internally for development, but they may also be useful to you if you're interested in building a diffusion model with some custom parts or if you're interested in some of our helper utilities for working with 🤗 Diffuse...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/internal_classes_overview.md
https://huggingface.co/docs/diffusers/en/api/internal_classes_overview/#overview
#overview
.md
92_1
<!--Copyright 2024 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/logging.md
https://huggingface.co/docs/diffusers/en/api/logging/
.md
93_0
🤗 Diffusers has a centralized logging system to easily manage the verbosity of the library. The default verbosity is set to `WARNING`. To change the verbosity level, use one of the direct setters. For instance, to change the verbosity to the `INFO` level. ```python import diffusers diffusers.logging.set_verbosity...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/logging.md
https://huggingface.co/docs/diffusers/en/api/logging/#logging
#logging
.md
93_1
set_verbosity_error Set the verbosity to the `ERROR` level. set_verbosity_warning Set the verbosity to the `WARNING` level. set_verbosity_info Set the verbosity to the `INFO` level. set_verbosity_debug Set the verbosity to the `DEBUG` level.
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/logging.md
https://huggingface.co/docs/diffusers/en/api/logging/#base-setters
#base-setters
.md
93_2
get_verbosity Return the current level for the 🤗 Diffusers' root logger as an `int`. Returns: `int`: Logging level integers which can be one of: - `50`: `diffusers.logging.CRITICAL` or `diffusers.logging.FATAL` - `40`: `diffusers.logging.ERROR` - `30`: `diffusers.logging.WARNING` or `diffusers.logging.WARN` - `2...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/logging.md
https://huggingface.co/docs/diffusers/en/api/logging/#other-functions
#other-functions
.md
93_3
<!--Copyright 2024 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/image_processor.md
https://huggingface.co/docs/diffusers/en/api/image_processor/
.md
94_0
The [`VaeImageProcessor`] provides a unified API for [`StableDiffusionPipeline`]s to prepare image inputs for VAE encoding and post-processing outputs once they're decoded. This includes transformations such as resizing, normalization, and conversion between PIL Image, PyTorch, and NumPy arrays. All pipelines with [`...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/image_processor.md
https://huggingface.co/docs/diffusers/en/api/image_processor/#vae-image-processor
#vae-image-processor
.md
94_1
VaeImageProcessor Image processor for VAE. Args: do_resize (`bool`, *optional*, defaults to `True`): Whether to downscale the image's (height, width) dimensions to multiples of `vae_scale_factor`. Can accept `height` and `width` arguments from [`image_processor.VaeImageProcessor.preprocess`] method. vae_scale_facto...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/image_processor.md
https://huggingface.co/docs/diffusers/en/api/image_processor/#vaeimageprocessor
#vaeimageprocessor
.md
94_2
The [`VaeImageProcessorLDM3D`] accepts RGB and depth inputs and returns RGB and depth outputs. VaeImageProcessor Image processor for VAE. Args: do_resize (`bool`, *optional*, defaults to `True`): Whether to downscale the image's (height, width) dimensions to multiples of `vae_scale_factor`. Can accept `height` an...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/image_processor.md
https://huggingface.co/docs/diffusers/en/api/image_processor/#vaeimageprocessorldm3d
#vaeimageprocessorldm3d
.md
94_3
PixArtImageProcessor Image processor for PixArt image resize and crop. Args: do_resize (`bool`, *optional*, defaults to `True`): Whether to downscale the image's (height, width) dimensions to multiples of `vae_scale_factor`. Can accept `height` and `width` arguments from [`image_processor.VaeImageProcessor.preproce...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/image_processor.md
https://huggingface.co/docs/diffusers/en/api/image_processor/#pixartimageprocessor
#pixartimageprocessor
.md
94_4
IPAdapterMaskProcessor Image processor for IP Adapter image masks. Args: do_resize (`bool`, *optional*, defaults to `True`): Whether to downscale the image's (height, width) dimensions to multiples of `vae_scale_factor`. vae_scale_factor (`int`, *optional*, defaults to `8`): VAE scale factor. If `do_resize` is `Tru...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/image_processor.md
https://huggingface.co/docs/diffusers/en/api/image_processor/#ipadaptermaskprocessor
#ipadaptermaskprocessor
.md
94_5
<!--Copyright 2024 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/quantization.md
https://huggingface.co/docs/diffusers/en/api/quantization/
.md
95_0
Quantization techniques reduce memory and computational costs by representing weights and activations with lower-precision data types like 8-bit integers (int8). This enables loading larger models you normally wouldn't be able to fit into memory, and speeding up inference. Diffusers supports 8-bit and 4-bit quantizatio...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/quantization.md
https://huggingface.co/docs/diffusers/en/api/quantization/#quantization
#quantization
.md
95_1
BitsAndBytesConfig This is a wrapper class about all possible attributes and features that you can play with a model that has been loaded using `bitsandbytes`. This replaces `load_in_8bit` or `load_in_4bit`therefore both options are mutually exclusive. Currently only supports `LLM.int8()`, `FP4`, and `NF4` quanti...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/quantization.md
https://huggingface.co/docs/diffusers/en/api/quantization/#bitsandbytesconfig
#bitsandbytesconfig
.md
95_2
GGUFQuantizationConfig This is a config class for GGUF Quantization techniques. Args: compute_dtype: (`torch.dtype`, defaults to `torch.float32`): This sets the computational type which might be different than the input type. For example, inputs might be fp32, but computation can be set to bf16 for speedups.
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/quantization.md
https://huggingface.co/docs/diffusers/en/api/quantization/#ggufquantizationconfig
#ggufquantizationconfig
.md
95_3
TorchAoConfig This is a config class for torchao quantization/sparsity techniques. Args: quant_type (`str`): The type of quantization we want to use, currently supporting: - **Integer quantization:** - Full function names: `int4_weight_only`, `int8_dynamic_activation_int4_weight`, `int8_weight_only`, `int8_dynamic_ac...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/quantization.md
https://huggingface.co/docs/diffusers/en/api/quantization/#torchaoconfig
#torchaoconfig
.md
95_4
DiffusersQuantizer Abstract class of the HuggingFace quantizer. Supports for now quantizing HF diffusers models for inference and/or quantization. This class is used only for diffusers.models.modeling_utils.ModelMixin.from_pretrained and cannot be easily used outside the scope of that method yet. Attributes quantiz...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/quantization.md
https://huggingface.co/docs/diffusers/en/api/quantization/#diffusersquantizer
#diffusersquantizer
.md
95_5
<!--Copyright 2024 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/video_processor.md
https://huggingface.co/docs/diffusers/en/api/video_processor/
.md
96_0
The [`VideoProcessor`] provides a unified API for video pipelines to prepare inputs for VAE encoding and post-processing outputs once they're decoded. The class inherits [`VaeImageProcessor`] so it includes transformations such as resizing, normalization, and conversion between PIL Image, PyTorch, and NumPy arrays.
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/video_processor.md
https://huggingface.co/docs/diffusers/en/api/video_processor/#video-processor
#video-processor
.md
96_1
[[autodoc]] preprocess_video: No module named 'diffusers.video_processor.VideoProcessor'; 'diffusers.video_processor' is not a package [[autodoc]] postprocess_video: No module named 'diffusers.video_processor.VideoProcessor'; 'diffusers.video_processor' is not a package
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/video_processor.md
https://huggingface.co/docs/diffusers/en/api/video_processor/#videoprocessor
#videoprocessor
.md
96_2
<!--Copyright 2024 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/activations.md
https://huggingface.co/docs/diffusers/en/api/activations/
.md
97_0
Customized activation functions for supporting various models in 🤗 Diffusers.
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/activations.md
https://huggingface.co/docs/diffusers/en/api/activations/#activation-functions
#activation-functions
.md
97_1
GELU GELU activation function with tanh approximation support with `approximate="tanh"`. Parameters: dim_in (`int`): The number of channels in the input. dim_out (`int`): The number of channels in the output. approximate (`str`, *optional*, defaults to `"none"`): If `"tanh"`, use tanh approximation. bias (`bool`, d...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/activations.md
https://huggingface.co/docs/diffusers/en/api/activations/#gelu
#gelu
.md
97_2
GEGLU A [variant](https://arxiv.org/abs/2002.05202) of the gated linear unit activation function. Parameters: dim_in (`int`): The number of channels in the input. dim_out (`int`): The number of channels in the output. bias (`bool`, defaults to True): Whether to use a bias in the linear layer.
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/activations.md
https://huggingface.co/docs/diffusers/en/api/activations/#geglu
#geglu
.md
97_3
ApproximateGELU The approximate form of the Gaussian Error Linear Unit (GELU). For more details, see section 2 of this [paper](https://arxiv.org/abs/1606.08415). Parameters: dim_in (`int`): The number of channels in the input. dim_out (`int`): The number of channels in the output. bias (`bool`, defaults to True): W...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/activations.md
https://huggingface.co/docs/diffusers/en/api/activations/#approximategelu
#approximategelu
.md
97_4
<!--Copyright 2024 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/stable_unclip.md
https://huggingface.co/docs/diffusers/en/api/pipelines/stable_unclip/
.md
98_0
Stable unCLIP checkpoints are finetuned from [Stable Diffusion 2.1](./stable_diffusion/stable_diffusion_2) checkpoints to condition on CLIP image embeddings. Stable unCLIP still conditions on text embeddings. Given the two separate conditionings, stable unCLIP can be used for text guided image variation. When combined ...
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/stable_unclip.md
https://huggingface.co/docs/diffusers/en/api/pipelines/stable_unclip/#stable-unclip
#stable-unclip
.md
98_1
Stable unCLIP takes `noise_level` as input during inference which determines how much noise is added to the image embeddings. A higher `noise_level` increases variation in the final un-noised images. By default, we do not add any additional noise to the image embeddings (`noise_level = 0`).
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/stable_unclip.md
https://huggingface.co/docs/diffusers/en/api/pipelines/stable_unclip/#tips
#tips
.md
98_2