"vscode:/vscode.git/clone" did not exist on "63d82a776adbbf10a4343f0ad6d873be45ca0ef6"
alt_diffusion.mdx 2.38 KB
Newer Older
Patrick von Platen's avatar
Patrick von Platen committed
1
<!--Copyright 2023 The HuggingFace Team. All rights reserved.
Patrick von Platen's avatar
Patrick von Platen committed
2
3
4
5
6
7
8
9
10
11
12
13
14

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 agreed to in writing, software distributed under the License is distributed on
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.
-->

# AltDiffusion

15
AltDiffusion was proposed in [AltCLIP: Altering the Language Encoder in CLIP for Extended Language Capabilities](https://huggingface.co/papers/2211.06679) by Zhongzhi Chen, Guang Liu, Bo-Wen Zhang, Fulong Ye, Qinghong Yang, Ledell Wu.
Patrick von Platen's avatar
Patrick von Platen committed
16

17
The abstract from the paper is:
Patrick von Platen's avatar
Patrick von Platen committed
18
19
20
21
22

*In this work, we present a conceptually simple and effective method to train a strong bilingual multimodal representation model. Starting from the pretrained multimodal representation model CLIP released by OpenAI, we switched its text encoder with a pretrained multilingual text encoder XLM-R, and aligned both languages and image representations by a two-stage training schema consisting of teacher learning and contrastive learning. We validate our method through evaluations of a wide range of tasks. We set new state-of-the-art performances on a bunch of tasks including ImageNet-CN, Flicker30k- CN, and COCO-CN. Further, we obtain very close performances with CLIP on almost all tasks, suggesting that one can simply alter the text encoder in CLIP for extended capabilities such as multilingual understanding.*

## Tips

23
`AltDiffusion` is conceptually the same as [Stable Diffusion](./stable_diffusion/overview).
Patrick von Platen's avatar
Patrick von Platen committed
24

25
<Tip>
Patrick von Platen's avatar
Patrick von Platen committed
26

27
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-components-across-pipelines) section to learn how to efficiently load the same components into multiple pipelines.
Patrick von Platen's avatar
Patrick von Platen committed
28

29
</Tip>
Patrick von Platen's avatar
Patrick von Platen committed
30
31

## AltDiffusionPipeline
32

Patrick von Platen's avatar
Patrick von Platen committed
33
[[autodoc]] AltDiffusionPipeline
34
	- all
Patrick von Platen's avatar
Patrick von Platen committed
35
36
37
	- __call__

## AltDiffusionImg2ImgPipeline
38

Patrick von Platen's avatar
Patrick von Platen committed
39
[[autodoc]] AltDiffusionImg2ImgPipeline
40
	- all
Patrick von Platen's avatar
Patrick von Platen committed
41
	- __call__
42
43
44
45
46
47

## AltDiffusionPipelineOutput

[[autodoc]] pipelines.alt_diffusion.AltDiffusionPipelineOutput
	- all
	- __call__