source
stringclasses
273 values
url
stringlengths
47
172
file_type
stringclasses
1 value
chunk
stringlengths
1
512
chunk_id
stringlengths
5
9
/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
.md
image representations improves image diversity with minimal loss in photorealism and caption similarity. Our decoders conditioned on image representations can also produce variations of an image that preserve both its semantics and style, while varying the non-essential details absent from the image representation. Mor...
98_1_2
/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
.md
image manipulations in a zero-shot fashion. We use diffusion models for the decoder and experiment with both autoregressive and diffusion models for the prior, finding that the latter are computationally more efficient and produce higher-quality samples.*
98_1_3
/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
.md
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`).
98_2_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/#text-to-image-generation
.md
Stable unCLIP can be leveraged for text-to-image generation by pipelining it with the prior model of KakaoBrain's open source DALL-E 2 replication [Karlo](https://huggingface.co/kakaobrain/karlo-v1-alpha): ```python import torch from diffusers import UnCLIPScheduler, DDPMScheduler, StableUnCLIPPipeline from diffusers...
98_3_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/#text-to-image-generation
.md
prior_model_id = "kakaobrain/karlo-v1-alpha" data_type = torch.float16 prior = PriorTransformer.from_pretrained(prior_model_id, subfolder="prior", torch_dtype=data_type)
98_3_1
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/stable_unclip.md
https://huggingface.co/docs/diffusers/en/api/pipelines/stable_unclip/#text-to-image-generation
.md
prior_text_model_id = "openai/clip-vit-large-patch14" prior_tokenizer = CLIPTokenizer.from_pretrained(prior_text_model_id) prior_text_model = CLIPTextModelWithProjection.from_pretrained(prior_text_model_id, torch_dtype=data_type) prior_scheduler = UnCLIPScheduler.from_pretrained(prior_model_id, subfolder="prior_schedul...
98_3_2
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/stable_unclip.md
https://huggingface.co/docs/diffusers/en/api/pipelines/stable_unclip/#text-to-image-generation
.md
stable_unclip_model_id = "stabilityai/stable-diffusion-2-1-unclip-small" pipe = StableUnCLIPPipeline.from_pretrained( stable_unclip_model_id, torch_dtype=data_type, variant="fp16", prior_tokenizer=prior_tokenizer, prior_text_encoder=prior_text_model, prior=prior, prior_scheduler=prior_scheduler, )
98_3_3
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/stable_unclip.md
https://huggingface.co/docs/diffusers/en/api/pipelines/stable_unclip/#text-to-image-generation
.md
pipe = pipe.to("cuda") wave_prompt = "dramatic wave, the Oceans roar, Strong wave spiral across the oceans as the waves unfurl into roaring crests; perfect wave form; perfect wave shape; dramatic wave shape; wave shape unbelievable; wave; wave shape spectacular"
98_3_4
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/stable_unclip.md
https://huggingface.co/docs/diffusers/en/api/pipelines/stable_unclip/#text-to-image-generation
.md
image = pipe(prompt=wave_prompt).images[0] image ``` <Tip warning={true}> For text-to-image we use `stabilityai/stable-diffusion-2-1-unclip-small` as it was trained on CLIP ViT-L/14 embedding, the same as the Karlo model prior. [stabilityai/stable-diffusion-2-1-unclip](https://hf.co/stabilityai/stable-diffusion-2-1-u...
98_3_5
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/stable_unclip.md
https://huggingface.co/docs/diffusers/en/api/pipelines/stable_unclip/#text-guided-image-to-image-variation
.md
```python from diffusers import StableUnCLIPImg2ImgPipeline from diffusers.utils import load_image import torch pipe = StableUnCLIPImg2ImgPipeline.from_pretrained( "stabilityai/stable-diffusion-2-1-unclip", torch_dtype=torch.float16, variation="fp16" ) pipe = pipe.to("cuda") url = "https://huggingface.co/datasets/hf-...
98_4_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/#text-guided-image-to-image-variation
.md
images = pipe(init_image).images images[0].save("variation_image.png") ``` Optionally, you can also pass a prompt to `pipe` such as: ```python prompt = "A fantasy landscape, trending on artstation"
98_4_1
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/stable_unclip.md
https://huggingface.co/docs/diffusers/en/api/pipelines/stable_unclip/#text-guided-image-to-image-variation
.md
image = pipe(init_image, prompt=prompt).images[0] image ``` <Tip> Make sure to check out the Schedulers [guide](../../using-diffusers/schedulers) to learn how to explore the tradeoff between scheduler speed and quality, and see the [reuse components across pipelines](../../using-diffusers/loading#reuse-a-pipeline) ...
98_4_2
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/stable_unclip.md
https://huggingface.co/docs/diffusers/en/api/pipelines/stable_unclip/#stableunclippipeline
.md
StableUnCLIPPipeline Pipeline for text-to-image generation using stable unCLIP. This model inherits from [`DiffusionPipeline`]. Check the superclass documentation for the generic methods implemented for all pipelines (downloading, saving, running on a particular device, etc.). The pipeline also inherits the follo...
98_5_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/#stableunclippipeline
.md
- [`~loaders.TextualInversionLoaderMixin.load_textual_inversion`] for loading textual inversion embeddings - [`~loaders.StableDiffusionLoraLoaderMixin.load_lora_weights`] for loading LoRA weights - [`~loaders.StableDiffusionLoraLoaderMixin.save_lora_weights`] for saving LoRA weights Args: prior_tokenizer ([`CLIPToken...
98_5_1
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/stable_unclip.md
https://huggingface.co/docs/diffusers/en/api/pipelines/stable_unclip/#stableunclippipeline
.md
Frozen [`CLIPTextModelWithProjection`] text-encoder. prior ([`PriorTransformer`]): The canonical unCLIP prior to approximate the image embedding from the text embedding. prior_scheduler ([`KarrasDiffusionSchedulers`]): Scheduler used in the prior denoising process. image_normalizer ([`StableUnCLIPImageNormalizer`]): Us...
98_5_2
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/stable_unclip.md
https://huggingface.co/docs/diffusers/en/api/pipelines/stable_unclip/#stableunclippipeline
.md
embeddings after the noise has been applied. image_noising_scheduler ([`KarrasDiffusionSchedulers`]): Noise schedule for adding noise to the predicted image embeddings. The amount of noise to add is determined by the `noise_level`. tokenizer ([`CLIPTokenizer`]): A [`CLIPTokenizer`]. text_encoder ([`CLIPTextModel`]): Fr...
98_5_3
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/stable_unclip.md
https://huggingface.co/docs/diffusers/en/api/pipelines/stable_unclip/#stableunclippipeline
.md
A [`UNet2DConditionModel`] to denoise the encoded image latents. scheduler ([`KarrasDiffusionSchedulers`]): A scheduler to be used in combination with `unet` to denoise the encoded image latents. vae ([`AutoencoderKL`]): Variational Auto-Encoder (VAE) Model to encode and decode images to and from latent representations...
98_5_4
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/stable_unclip.md
https://huggingface.co/docs/diffusers/en/api/pipelines/stable_unclip/#stableunclippipeline
.md
- disable_attention_slicing - enable_vae_slicing - disable_vae_slicing - enable_xformers_memory_efficient_attention - disable_xformers_memory_efficient_attention
98_5_5
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/stable_unclip.md
https://huggingface.co/docs/diffusers/en/api/pipelines/stable_unclip/#stableunclipimg2imgpipeline
.md
StableUnCLIPImg2ImgPipeline Pipeline for text-guided image-to-image generation using stable unCLIP. This model inherits from [`DiffusionPipeline`]. Check the superclass documentation for the generic methods implemented for all pipelines (downloading, saving, running on a particular device, etc.). The pipeline als...
98_6_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/#stableunclipimg2imgpipeline
.md
- [`~loaders.TextualInversionLoaderMixin.load_textual_inversion`] for loading textual inversion embeddings - [`~loaders.StableDiffusionLoraLoaderMixin.load_lora_weights`] for loading LoRA weights - [`~loaders.StableDiffusionLoraLoaderMixin.save_lora_weights`] for saving LoRA weights Args: feature_extractor ([`CLIPIma...
98_6_1
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/stable_unclip.md
https://huggingface.co/docs/diffusers/en/api/pipelines/stable_unclip/#stableunclipimg2imgpipeline
.md
image_encoder ([`CLIPVisionModelWithProjection`]): CLIP vision model for encoding images. image_normalizer ([`StableUnCLIPImageNormalizer`]): Used to normalize the predicted image embeddings before the noise is applied and un-normalize the image embeddings after the noise has been applied. image_noising_scheduler ([`Ka...
98_6_2
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/stable_unclip.md
https://huggingface.co/docs/diffusers/en/api/pipelines/stable_unclip/#stableunclipimg2imgpipeline
.md
by the `noise_level`. tokenizer (`~transformers.CLIPTokenizer`): A [`~transformers.CLIPTokenizer`)]. text_encoder ([`~transformers.CLIPTextModel`]): Frozen [`~transformers.CLIPTextModel`] text-encoder. unet ([`UNet2DConditionModel`]): A [`UNet2DConditionModel`] to denoise the encoded image latents. scheduler ([`KarrasD...
98_6_3
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/stable_unclip.md
https://huggingface.co/docs/diffusers/en/api/pipelines/stable_unclip/#stableunclipimg2imgpipeline
.md
A scheduler to be used in combination with `unet` to denoise the encoded image latents. vae ([`AutoencoderKL`]): Variational Auto-Encoder (VAE) Model to encode and decode images to and from latent representations. - all - __call__ - enable_attention_slicing - disable_attention_slicing - enable_vae_slicing - disable_v...
98_6_4
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/stable_unclip.md
https://huggingface.co/docs/diffusers/en/api/pipelines/stable_unclip/#imagepipelineoutput
.md
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)`.
98_7_0
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/unidiffuser.md
https://huggingface.co/docs/diffusers/en/api/pipelines/unidiffuser/
.md
<!--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...
99_0_0
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/unidiffuser.md
https://huggingface.co/docs/diffusers/en/api/pipelines/unidiffuser/
.md
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -->
99_0_1
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/unidiffuser.md
https://huggingface.co/docs/diffusers/en/api/pipelines/unidiffuser/#unidiffuser
.md
The UniDiffuser model was proposed in [One Transformer Fits All Distributions in Multi-Modal Diffusion at Scale](https://huggingface.co/papers/2303.06555) by Fan Bao, Shen Nie, Kaiwen Xue, Chongxuan Li, Shi Pu, Yaole Wang, Gang Yue, Yue Cao, Hang Su, Jun Zhu. The abstract from the paper is:
99_1_0
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/unidiffuser.md
https://huggingface.co/docs/diffusers/en/api/pipelines/unidiffuser/#unidiffuser
.md
*This paper proposes a unified diffusion framework (dubbed UniDiffuser) to fit all distributions relevant to a set of multi-modal data in one model. Our key insight is -- learning diffusion models for marginal, conditional, and joint distributions can be unified as predicting the noise in the perturbed data, where the ...
99_1_1
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/unidiffuser.md
https://huggingface.co/docs/diffusers/en/api/pipelines/unidiffuser/#unidiffuser
.md
modalities. Inspired by the unified view, UniDiffuser learns all distributions simultaneously with a minimal modification to the original diffusion model -- perturbs data in all modalities instead of a single modality, inputs individual timesteps in different modalities, and predicts the noise of all modalities instead...
99_1_2
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/unidiffuser.md
https://huggingface.co/docs/diffusers/en/api/pipelines/unidiffuser/#unidiffuser
.md
for diffusion models to handle input types of different modalities. Implemented on large-scale paired image-text data, UniDiffuser is able to perform image, text, text-to-image, image-to-text, and image-text pair generation by setting proper timesteps without additional overhead. In particular, UniDiffuser is able to p...
99_1_3
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/unidiffuser.md
https://huggingface.co/docs/diffusers/en/api/pipelines/unidiffuser/#unidiffuser
.md
results (e.g., the FID and CLIP score) are not only superior to existing general-purpose models but also comparable to the bespoken models (e.g., Stable Diffusion and DALL-E 2) in representative tasks (e.g., text-to-image generation).*
99_1_4
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/unidiffuser.md
https://huggingface.co/docs/diffusers/en/api/pipelines/unidiffuser/#unidiffuser
.md
You can find the original codebase at [thu-ml/unidiffuser](https://github.com/thu-ml/unidiffuser) and additional checkpoints at [thu-ml](https://huggingface.co/thu-ml). <Tip warning={true}> There is currently an issue on PyTorch 1.X where the output images are all black or the pixel values become `NaNs`. This issue...
99_1_5
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/unidiffuser.md
https://huggingface.co/docs/diffusers/en/api/pipelines/unidiffuser/#usage-examples
.md
Because the UniDiffuser model is trained to model the joint distribution of (image, text) pairs, it is capable of performing a diverse range of generation tasks:
99_2_0
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/unidiffuser.md
https://huggingface.co/docs/diffusers/en/api/pipelines/unidiffuser/#unconditional-image-and-text-generation
.md
Unconditional generation (where we start from only latents sampled from a standard Gaussian prior) from a [`UniDiffuserPipeline`] will produce a (image, text) pair: ```python import torch from diffusers import UniDiffuserPipeline device = "cuda" model_id_or_path = "thu-ml/unidiffuser-v1" pipe = UniDiffuserPipeline....
99_3_0
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/unidiffuser.md
https://huggingface.co/docs/diffusers/en/api/pipelines/unidiffuser/#unconditional-image-and-text-generation
.md
# Unconditional image and text generation. The generation task is automatically inferred. sample = pipe(num_inference_steps=20, guidance_scale=8.0) image = sample.images[0] text = sample.text[0] image.save("unidiffuser_joint_sample_image.png") print(text) ``` This is also called "joint" generation in the UniDiffuser ...
99_3_1
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/unidiffuser.md
https://huggingface.co/docs/diffusers/en/api/pipelines/unidiffuser/#unconditional-image-and-text-generation
.md
Note that the generation task is inferred from the inputs used when calling the pipeline. It is also possible to manually specify the unconditional generation task ("mode") manually with [`UniDiffuserPipeline.set_joint_mode`]: ```python # Equivalent to the above. pipe.set_joint_mode() sample = pipe(num_inference_step...
99_3_2
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/unidiffuser.md
https://huggingface.co/docs/diffusers/en/api/pipelines/unidiffuser/#unconditional-image-and-text-generation
.md
When the mode is set manually, subsequent calls to the pipeline will use the set mode without attempting to infer the mode. You can reset the mode with [`UniDiffuserPipeline.reset_mode`], after which the pipeline will once again infer the mode. You can also generate only an image or only text (which the UniDiffuser p...
99_3_3
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/unidiffuser.md
https://huggingface.co/docs/diffusers/en/api/pipelines/unidiffuser/#unconditional-image-and-text-generation
.md
```python # Unlike other generation tasks, image-only and text-only generation don't use classifier-free guidance # Image-only generation pipe.set_image_mode() sample_image = pipe(num_inference_steps=20).images[0] # Text-only generation pipe.set_text_mode() sample_text = pipe(num_inference_steps=20).text[0] ```
99_3_4
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/unidiffuser.md
https://huggingface.co/docs/diffusers/en/api/pipelines/unidiffuser/#text-to-image-generation
.md
UniDiffuser is also capable of sampling from conditional distributions; that is, the distribution of images conditioned on a text prompt or the distribution of texts conditioned on an image. Here is an example of sampling from the conditional image distribution (text-to-image generation or text-conditioned image genera...
99_4_0
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/unidiffuser.md
https://huggingface.co/docs/diffusers/en/api/pipelines/unidiffuser/#text-to-image-generation
.md
from diffusers import UniDiffuserPipeline device = "cuda" model_id_or_path = "thu-ml/unidiffuser-v1" pipe = UniDiffuserPipeline.from_pretrained(model_id_or_path, torch_dtype=torch.float16) pipe.to(device) # Text-to-image generation prompt = "an elephant under the sea"
99_4_1
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/unidiffuser.md
https://huggingface.co/docs/diffusers/en/api/pipelines/unidiffuser/#text-to-image-generation
.md
# Text-to-image generation prompt = "an elephant under the sea" sample = pipe(prompt=prompt, num_inference_steps=20, guidance_scale=8.0) t2i_image = sample.images[0] t2i_image ``` The `text2img` mode requires that either an input `prompt` or `prompt_embeds` be supplied. You can set the `text2img` mode manually with ...
99_4_2
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/unidiffuser.md
https://huggingface.co/docs/diffusers/en/api/pipelines/unidiffuser/#image-to-text-generation
.md
Similarly, UniDiffuser can also produce text samples given an image (image-to-text or image-conditioned text generation): ```python import torch from diffusers import UniDiffuserPipeline from diffusers.utils import load_image device = "cuda" model_id_or_path = "thu-ml/unidiffuser-v1" pipe = UniDiffuserPipeline.from...
99_5_0
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/unidiffuser.md
https://huggingface.co/docs/diffusers/en/api/pipelines/unidiffuser/#image-to-text-generation
.md
# Image-to-text generation image_url = "https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/unidiffuser/unidiffuser_example_image.jpg" init_image = load_image(image_url).resize((512, 512)) sample = pipe(image=init_image, num_inference_steps=20, guidance_scale=8.0) i2t_text = sample.text[0...
99_5_1
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/unidiffuser.md
https://huggingface.co/docs/diffusers/en/api/pipelines/unidiffuser/#image-variation
.md
The UniDiffuser authors suggest performing image variation through a "round-trip" generation method, where given an input image, we first perform an image-to-text generation, and then perform a text-to-image generation on the outputs of the first generation. This produces a new image which is semantically similar to th...
99_6_0
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/unidiffuser.md
https://huggingface.co/docs/diffusers/en/api/pipelines/unidiffuser/#image-variation
.md
from diffusers import UniDiffuserPipeline from diffusers.utils import load_image device = "cuda" model_id_or_path = "thu-ml/unidiffuser-v1" pipe = UniDiffuserPipeline.from_pretrained(model_id_or_path, torch_dtype=torch.float16) pipe.to(device)
99_6_1
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/unidiffuser.md
https://huggingface.co/docs/diffusers/en/api/pipelines/unidiffuser/#image-variation
.md
# Image variation can be performed with an image-to-text generation followed by a text-to-image generation: # 1. Image-to-text generation image_url = "https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/unidiffuser/unidiffuser_example_image.jpg" init_image = load_image(image_url).resize((5...
99_6_2
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/unidiffuser.md
https://huggingface.co/docs/diffusers/en/api/pipelines/unidiffuser/#image-variation
.md
sample = pipe(image=init_image, num_inference_steps=20, guidance_scale=8.0) i2t_text = sample.text[0] print(i2t_text) # 2. Text-to-image generation sample = pipe(prompt=i2t_text, num_inference_steps=20, guidance_scale=8.0) final_image = sample.images[0] final_image.save("unidiffuser_image_variation_sample.png") ```
99_6_3
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/unidiffuser.md
https://huggingface.co/docs/diffusers/en/api/pipelines/unidiffuser/#text-variation
.md
Similarly, text variation can be performed on an input prompt with a text-to-image generation followed by a image-to-text generation: ```python import torch from diffusers import UniDiffuserPipeline device = "cuda" model_id_or_path = "thu-ml/unidiffuser-v1" pipe = UniDiffuserPipeline.from_pretrained(model_id_or_pat...
99_7_0
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/unidiffuser.md
https://huggingface.co/docs/diffusers/en/api/pipelines/unidiffuser/#text-variation
.md
# Text variation can be performed with a text-to-image generation followed by a image-to-text generation: # 1. Text-to-image generation prompt = "an elephant under the sea" sample = pipe(prompt=prompt, num_inference_steps=20, guidance_scale=8.0) t2i_image = sample.images[0] t2i_image.save("unidiffuser_text2img_sample_...
99_7_1
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/unidiffuser.md
https://huggingface.co/docs/diffusers/en/api/pipelines/unidiffuser/#text-variation
.md
# 2. Image-to-text generation sample = pipe(image=t2i_image, num_inference_steps=20, guidance_scale=8.0) final_prompt = sample.text[0] print(final_prompt) ``` <Tip> Make sure to check out the Schedulers [guide](../../using-diffusers/schedulers) to learn how to explore the tradeoff between scheduler speed and qualit...
99_7_2
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/unidiffuser.md
https://huggingface.co/docs/diffusers/en/api/pipelines/unidiffuser/#text-variation
.md
</Tip>
99_7_3
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/unidiffuser.md
https://huggingface.co/docs/diffusers/en/api/pipelines/unidiffuser/#unidiffuserpipeline
.md
UniDiffuserPipeline Pipeline for a bimodal image-text model which supports unconditional text and image generation, text-conditioned image generation, image-conditioned text generation, and joint image-text generation. This model inherits from [`DiffusionPipeline`]. Check the superclass documentation for the generi...
99_8_0
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/unidiffuser.md
https://huggingface.co/docs/diffusers/en/api/pipelines/unidiffuser/#unidiffuserpipeline
.md
implemented for all pipelines (downloading, saving, running on a particular device, etc.). Args: vae ([`AutoencoderKL`]): Variational Auto-Encoder (VAE) model to encode and decode images to and from latent representations. This is part of the UniDiffuser image representation along with the CLIP vision encoding. text_...
99_8_1
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/unidiffuser.md
https://huggingface.co/docs/diffusers/en/api/pipelines/unidiffuser/#unidiffuserpipeline
.md
image_encoder ([`CLIPVisionModel`]): A [`~transformers.CLIPVisionModel`] to encode images as part of its image representation along with the VAE latent representation. image_processor ([`CLIPImageProcessor`]): [`~transformers.CLIPImageProcessor`] to preprocess an image before CLIP encoding it with `image_encoder`. clip...
99_8_2
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/unidiffuser.md
https://huggingface.co/docs/diffusers/en/api/pipelines/unidiffuser/#unidiffuserpipeline
.md
text_decoder ([`UniDiffuserTextDecoder`]): Frozen text decoder. This is a GPT-style model which is used to generate text from the UniDiffuser embedding. text_tokenizer ([`GPT2Tokenizer`]): A [`~transformers.GPT2Tokenizer`] to decode text for text generation; used along with the `text_decoder`. unet ([`UniDiffuserModel`...
99_8_3
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/unidiffuser.md
https://huggingface.co/docs/diffusers/en/api/pipelines/unidiffuser/#unidiffuserpipeline
.md
layers to denoise the encoded image latents. scheduler ([`SchedulerMixin`]): A scheduler to be used in combination with `unet` to denoise the encoded image and/or text latents. The original UniDiffuser paper uses the [`DPMSolverMultistepScheduler`] scheduler. - all - __call__
99_8_4
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/unidiffuser.md
https://huggingface.co/docs/diffusers/en/api/pipelines/unidiffuser/#imagetextpipelineoutput
.md
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...
99_9_0
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/semantic_stable_diffusion.md
https://huggingface.co/docs/diffusers/en/api/pipelines/semantic_stable_diffusion/
.md
<!--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...
100_0_0
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/semantic_stable_diffusion.md
https://huggingface.co/docs/diffusers/en/api/pipelines/semantic_stable_diffusion/
.md
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -->
100_0_1
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/semantic_stable_diffusion.md
https://huggingface.co/docs/diffusers/en/api/pipelines/semantic_stable_diffusion/#semantic-guidance
.md
Semantic Guidance for Diffusion Models was proposed in [SEGA: Instructing Text-to-Image Models using Semantic Guidance](https://huggingface.co/papers/2301.12247) and provides strong semantic control over image generation. Small changes to the text prompt usually result in entirely different output images. However, with...
100_1_0
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/semantic_stable_diffusion.md
https://huggingface.co/docs/diffusers/en/api/pipelines/semantic_stable_diffusion/#semantic-guidance
.md
*Text-to-image diffusion models have recently received a lot of interest for their astonishing ability to produce high-fidelity images from text only. However, achieving one-shot generation that aligns with the user's intent is nearly impossible, yet small changes to the input prompt often result in very different imag...
100_1_1
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/semantic_stable_diffusion.md
https://huggingface.co/docs/diffusers/en/api/pipelines/semantic_stable_diffusion/#semantic-guidance
.md
the user in control, we show how to interact with the diffusion process to flexibly steer it along semantic directions. This semantic guidance (SEGA) generalizes to any generative architecture using classifier-free guidance. More importantly, it allows for subtle and extensive edits, changes in composition and style, a...
100_1_2
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/semantic_stable_diffusion.md
https://huggingface.co/docs/diffusers/en/api/pipelines/semantic_stable_diffusion/#semantic-guidance
.md
SEGA's effectiveness on both latent and pixel-based diffusion models such as Stable Diffusion, Paella, and DeepFloyd-IF using a variety of tasks, thus providing strong evidence for its versatility, flexibility, and improvements over existing methods.*
100_1_3
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/semantic_stable_diffusion.md
https://huggingface.co/docs/diffusers/en/api/pipelines/semantic_stable_diffusion/#semantic-guidance
.md
<Tip> Make sure to check out the Schedulers [guide](../../using-diffusers/schedulers) to learn how to explore the tradeoff between scheduler speed and quality, and see the [reuse components across pipelines](../../using-diffusers/loading#reuse-a-pipeline) section to learn how to efficiently load the same components i...
100_1_4
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/semantic_stable_diffusion.md
https://huggingface.co/docs/diffusers/en/api/pipelines/semantic_stable_diffusion/#semanticstablediffusionpipeline
.md
SemanticStableDiffusionPipeline Pipeline for text-to-image generation using Stable Diffusion with latent editing. This model inherits from [`DiffusionPipeline`] and builds on the [`StableDiffusionPipeline`]. Check the superclass documentation for the generic methods implemented for all pipelines (downloading, savin...
100_2_0
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/semantic_stable_diffusion.md
https://huggingface.co/docs/diffusers/en/api/pipelines/semantic_stable_diffusion/#semanticstablediffusionpipeline
.md
vae ([`AutoencoderKL`]): Variational Auto-Encoder (VAE) model to encode and decode images to and from latent representations. text_encoder ([`~transformers.CLIPTextModel`]): Frozen text-encoder ([clip-vit-large-patch14](https://huggingface.co/openai/clip-vit-large-patch14)). tokenizer ([`~transformers.CLIPTokenizer`]):...
100_2_1
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/semantic_stable_diffusion.md
https://huggingface.co/docs/diffusers/en/api/pipelines/semantic_stable_diffusion/#semanticstablediffusionpipeline
.md
unet ([`UNet2DConditionModel`]): A `UNet2DConditionModel` 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 ([`Q16Sa...
100_2_2
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/semantic_stable_diffusion.md
https://huggingface.co/docs/diffusers/en/api/pipelines/semantic_stable_diffusion/#semanticstablediffusionpipeline
.md
Classification module that estimates whether generated images could be considered offensive or harmful. Please refer to the [model card](https://huggingface.co/runwayml/stable-diffusion-v1-5) for more details about a model's potential harms. feature_extractor ([`~transformers.CLIPImageProcessor`]): A `CLIPImageProcesso...
100_2_3
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/semantic_stable_diffusion.md
https://huggingface.co/docs/diffusers/en/api/pipelines/semantic_stable_diffusion/#semanticstablediffusionpipelineoutput
.md
SemanticStableDiffusionPipelineOutput Output class for Stable Diffusion 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)`. nsfw_content_detected (`List[bool]`) List indicating wheth...
100_3_0
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/controlnet_union.md
https://huggingface.co/docs/diffusers/en/api/pipelines/controlnet_union/
.md
<!--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...
101_0_0
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/controlnet_union.md
https://huggingface.co/docs/diffusers/en/api/pipelines/controlnet_union/
.md
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -->
101_0_1
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/controlnet_union.md
https://huggingface.co/docs/diffusers/en/api/pipelines/controlnet_union/#controlnetunion
.md
ControlNetUnionModel is an implementation of ControlNet for Stable Diffusion XL. The ControlNet model was introduced in [ControlNetPlus](https://github.com/xinsir6/ControlNetPlus) by xinsir6. It supports multiple conditioning inputs without increasing computation.
101_1_0
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/controlnet_union.md
https://huggingface.co/docs/diffusers/en/api/pipelines/controlnet_union/#controlnetunion
.md
*We design a new architecture that can support 10+ control types in condition text-to-image generation and can generate high resolution images visually comparable with midjourney. The network is based on the original ControlNet architecture, we propose two new modules to: 1 Extend the original ControlNet to support dif...
101_1_1
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/controlnet_union.md
https://huggingface.co/docs/diffusers/en/api/pipelines/controlnet_union/#controlnetunion
.md
multiple conditions input without increasing computation offload, which is especially important for designers who want to edit image in detail, different conditions use the same condition encoder, without adding extra computations or parameters.*
101_1_2
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/controlnet_union.md
https://huggingface.co/docs/diffusers/en/api/pipelines/controlnet_union/#stablediffusionxlcontrolnetunionpipeline
.md
StableDiffusionXLControlNetUnionPipeline Pipeline for text-to-image generation using Stable Diffusion XL with ControlNet guidance. This model inherits from [`DiffusionPipeline`]. Check the superclass documentation for the generic methods implemented for all pipelines (downloading, saving, running on a particular de...
101_2_0
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/controlnet_union.md
https://huggingface.co/docs/diffusers/en/api/pipelines/controlnet_union/#stablediffusionxlcontrolnetunionpipeline
.md
- [`~loaders.TextualInversionLoaderMixin.load_textual_inversion`] for loading textual inversion embeddings - [`~loaders.StableDiffusionXLLoraLoaderMixin.load_lora_weights`] for loading LoRA weights - [`~loaders.StableDiffusionXLLoraLoaderMixin.save_lora_weights`] for saving LoRA weights - [`~loaders.FromSingleFileMixin...
101_2_1
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/controlnet_union.md
https://huggingface.co/docs/diffusers/en/api/pipelines/controlnet_union/#stablediffusionxlcontrolnetunionpipeline
.md
- [`~loaders.IPAdapterMixin.load_ip_adapter`] for loading IP Adapters Args: vae ([`AutoencoderKL`]): Variational Auto-Encoder (VAE) model to encode and decode images to and from latent representations. text_encoder ([`~transformers.CLIPTextModel`]): Frozen text-encoder ([clip-vit-large-patch14](https://huggingface.co...
101_2_2
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/controlnet_union.md
https://huggingface.co/docs/diffusers/en/api/pipelines/controlnet_union/#stablediffusionxlcontrolnetunionpipeline
.md
text_encoder_2 ([`~transformers.CLIPTextModelWithProjection`]): Second frozen text-encoder ([laion/CLIP-ViT-bigG-14-laion2B-39B-b160k](https://huggingface.co/laion/CLIP-ViT-bigG-14-laion2B-39B-b160k)). tokenizer ([`~transformers.CLIPTokenizer`]): A `CLIPTokenizer` to tokenize text. tokenizer_2 ([`~transformers.CLIPToke...
101_2_3
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/controlnet_union.md
https://huggingface.co/docs/diffusers/en/api/pipelines/controlnet_union/#stablediffusionxlcontrolnetunionpipeline
.md
A `UNet2DConditionModel` to denoise the encoded image latents. controlnet ([`ControlNetUnionModel`]`): Provides additional conditioning to the `unet` during the denoising process. scheduler ([`SchedulerMixin`]): A scheduler to be used in combination with `unet` to denoise the encoded image latents. Can be one of [`DDIM...
101_2_4
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/controlnet_union.md
https://huggingface.co/docs/diffusers/en/api/pipelines/controlnet_union/#stablediffusionxlcontrolnetunionpipeline
.md
force_zeros_for_empty_prompt (`bool`, *optional*, defaults to `"True"`): Whether the negative prompt embeddings should always be set to 0. Also see the config of `stabilityai/stable-diffusion-xl-base-1-0`. add_watermarker (`bool`, *optional*): Whether to use the [invisible_watermark](https://github.com/ShieldMnt/invisi...
101_2_5
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/controlnet_union.md
https://huggingface.co/docs/diffusers/en/api/pipelines/controlnet_union/#stablediffusionxlcontrolnetunionimg2imgpipeline
.md
StableDiffusionXLControlNetUnionImg2ImgPipeline Pipeline for image-to-image generation using Stable Diffusion XL with ControlNet guidance. This model inherits from [`DiffusionPipeline`]. Check the superclass documentation for the generic methods the library implements for all the pipelines (such as downloading or s...
101_3_0
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/controlnet_union.md
https://huggingface.co/docs/diffusers/en/api/pipelines/controlnet_union/#stablediffusionxlcontrolnetunionimg2imgpipeline
.md
The pipeline also inherits the following loading methods: - [`~loaders.TextualInversionLoaderMixin.load_textual_inversion`] for loading textual inversion embeddings - [`~loaders.StableDiffusionXLLoraLoaderMixin.load_lora_weights`] for loading LoRA weights - [`~loaders.StableDiffusionXLLoraLoaderMixin.save_lora_weights`...
101_3_1
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/controlnet_union.md
https://huggingface.co/docs/diffusers/en/api/pipelines/controlnet_union/#stablediffusionxlcontrolnetunionimg2imgpipeline
.md
- [`~loaders.IPAdapterMixin.load_ip_adapter`] for loading IP Adapters Args: vae ([`AutoencoderKL`]): Variational Auto-Encoder (VAE) Model to encode and decode images to and from latent representations. text_encoder ([`CLIPTextModel`]): Frozen text-encoder. Stable Diffusion uses the text portion of [CLIP](https://hugg...
101_3_2
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/controlnet_union.md
https://huggingface.co/docs/diffusers/en/api/pipelines/controlnet_union/#stablediffusionxlcontrolnetunionimg2imgpipeline
.md
the [clip-vit-large-patch14](https://huggingface.co/openai/clip-vit-large-patch14) variant. text_encoder_2 ([` CLIPTextModelWithProjection`]): Second frozen text-encoder. Stable Diffusion XL uses the text and pool portion of [CLIP](https://huggingface.co/docs/transformers/model_doc/clip#transformers.CLIPTextModelWithPr...
101_3_3
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/controlnet_union.md
https://huggingface.co/docs/diffusers/en/api/pipelines/controlnet_union/#stablediffusionxlcontrolnetunionimg2imgpipeline
.md
variant. tokenizer (`CLIPTokenizer`): Tokenizer of class [CLIPTokenizer](https://huggingface.co/docs/transformers/v4.21.0/en/model_doc/clip#transformers.CLIPTokenizer). tokenizer_2 (`CLIPTokenizer`): Second Tokenizer of class [CLIPTokenizer](https://huggingface.co/docs/transformers/v4.21.0/en/model_doc/clip#transformer...
101_3_4
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/controlnet_union.md
https://huggingface.co/docs/diffusers/en/api/pipelines/controlnet_union/#stablediffusionxlcontrolnetunionimg2imgpipeline
.md
controlnet ([`ControlNetUnionModel`]): Provides additional conditioning to the unet during the denoising process. 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`]. requi...
101_3_5
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/controlnet_union.md
https://huggingface.co/docs/diffusers/en/api/pipelines/controlnet_union/#stablediffusionxlcontrolnetunionimg2imgpipeline
.md
Whether the `unet` requires an `aesthetic_score` condition to be passed during inference. Also see the config of `stabilityai/stable-diffusion-xl-refiner-1-0`. force_zeros_for_empty_prompt (`bool`, *optional*, defaults to `"True"`): Whether the negative prompt embeddings shall be forced to always be set to 0. Also see ...
101_3_6
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/controlnet_union.md
https://huggingface.co/docs/diffusers/en/api/pipelines/controlnet_union/#stablediffusionxlcontrolnetunionimg2imgpipeline
.md
`stabilityai/stable-diffusion-xl-base-1-0`. add_watermarker (`bool`, *optional*): Whether to use the [invisible_watermark library](https://github.com/ShieldMnt/invisible-watermark/) to watermark output images. If not defined, it will default to True if the package is installed, otherwise no watermarker will be used. fe...
101_3_7
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/controlnet_union.md
https://huggingface.co/docs/diffusers/en/api/pipelines/controlnet_union/#stablediffusionxlcontrolnetunioninpaintpipeline
.md
StableDiffusionXLControlNetUnionInpaintPipeline Pipeline for text-to-image generation using Stable Diffusion XL. 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 partic...
101_4_0
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/controlnet_union.md
https://huggingface.co/docs/diffusers/en/api/pipelines/controlnet_union/#stablediffusionxlcontrolnetunioninpaintpipeline
.md
- [`~loaders.TextualInversionLoaderMixin.load_textual_inversion`] for loading textual inversion embeddings - [`~loaders.StableDiffusionXLLoraLoaderMixin.load_lora_weights`] for loading LoRA weights - [`~loaders.StableDiffusionXLLoraLoaderMixin.save_lora_weights`] for saving LoRA weights - [`~loaders.FromSingleFileMixin...
101_4_1
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/controlnet_union.md
https://huggingface.co/docs/diffusers/en/api/pipelines/controlnet_union/#stablediffusionxlcontrolnetunioninpaintpipeline
.md
- [`~loaders.IPAdapterMixin.load_ip_adapter`] for loading IP Adapters Args: vae ([`AutoencoderKL`]): Variational Auto-Encoder (VAE) Model to encode and decode images to and from latent representations. text_encoder ([`CLIPTextModel`]): Frozen text-encoder. Stable Diffusion XL uses the text portion of [CLIP](https://h...
101_4_2
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/controlnet_union.md
https://huggingface.co/docs/diffusers/en/api/pipelines/controlnet_union/#stablediffusionxlcontrolnetunioninpaintpipeline
.md
the [clip-vit-large-patch14](https://huggingface.co/openai/clip-vit-large-patch14) variant. text_encoder_2 ([` CLIPTextModelWithProjection`]): Second frozen text-encoder. Stable Diffusion XL uses the text and pool portion of [CLIP](https://huggingface.co/docs/transformers/model_doc/clip#transformers.CLIPTextModelWithPr...
101_4_3
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/controlnet_union.md
https://huggingface.co/docs/diffusers/en/api/pipelines/controlnet_union/#stablediffusionxlcontrolnetunioninpaintpipeline
.md
variant. tokenizer (`CLIPTokenizer`): Tokenizer of class [CLIPTokenizer](https://huggingface.co/docs/transformers/v4.21.0/en/model_doc/clip#transformers.CLIPTokenizer). tokenizer_2 (`CLIPTokenizer`): Second Tokenizer of class [CLIPTokenizer](https://huggingface.co/docs/transformers/v4.21.0/en/model_doc/clip#transformer...
101_4_4
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/controlnet_union.md
https://huggingface.co/docs/diffusers/en/api/pipelines/controlnet_union/#stablediffusionxlcontrolnetunioninpaintpipeline
.md
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`]. - all - __call__
101_4_5
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/overview.md
https://huggingface.co/docs/diffusers/en/api/pipelines/overview/
.md
<!--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...
102_0_0
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/overview.md
https://huggingface.co/docs/diffusers/en/api/pipelines/overview/
.md
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -->
102_0_1
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/overview.md
https://huggingface.co/docs/diffusers/en/api/pipelines/overview/#pipelines
.md
Pipelines provide a simple way to run state-of-the-art diffusion models in inference by bundling all of the necessary components (multiple independently-trained models, schedulers, and processors) into a single end-to-end class. Pipelines are flexible and they can be adapted to use different schedulers or even model co...
102_1_0
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/overview.md
https://huggingface.co/docs/diffusers/en/api/pipelines/overview/#pipelines
.md
All pipelines are built from the base [`DiffusionPipeline`] class which provides basic functionality for loading, downloading, and saving all the components. Specific pipeline types (for example [`StableDiffusionPipeline`]) loaded with [`~DiffusionPipeline.from_pretrained`] are automatically detected and the pipeline c...
102_1_1
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/overview.md
https://huggingface.co/docs/diffusers/en/api/pipelines/overview/#pipelines
.md
<Tip warning={true}> You shouldn't use the [`DiffusionPipeline`] class for training. Individual components (for example, [`UNet2DModel`] and [`UNet2DConditionModel`]) of diffusion pipelines are usually trained individually, so we suggest directly working with them instead. <br>
102_1_2
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/api/pipelines/overview.md
https://huggingface.co/docs/diffusers/en/api/pipelines/overview/#pipelines
.md
<br> Pipelines do not offer any training functionality. You'll notice PyTorch's autograd is disabled by decorating the [`~DiffusionPipeline.__call__`] method with a [`torch.no_grad`](https://pytorch.org/docs/stable/generated/torch.no_grad.html) decorator because pipelines should not be used for training. If you're in...
102_1_3