utilities.md 1.21 KB
Newer Older
Aryan's avatar
Aryan committed
1
<!--Copyright 2025 The HuggingFace Team. All rights reserved.
2
3
4
5
6
7
8
9
10
11
12

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.
-->

Steven Liu's avatar
Steven Liu committed
13
14
15
16
17
18
# Utilities

Utility and helper functions for working with 🤗 Diffusers.

## numpy_to_pil

Dhruv Nair's avatar
Dhruv Nair committed
19
[[autodoc]] utils.numpy_to_pil
Steven Liu's avatar
Steven Liu committed
20
21
22

## pt_to_pil

Dhruv Nair's avatar
Dhruv Nair committed
23
[[autodoc]] utils.pt_to_pil
Steven Liu's avatar
Steven Liu committed
24
25
26

## load_image

Dhruv Nair's avatar
Dhruv Nair committed
27
[[autodoc]] utils.load_image
Steven Liu's avatar
Steven Liu committed
28

29
30
31
32
## load_video

[[autodoc]] utils.load_video

Steven Liu's avatar
Steven Liu committed
33
34
## export_to_gif

Dhruv Nair's avatar
Dhruv Nair committed
35
[[autodoc]] utils.export_to_gif
Steven Liu's avatar
Steven Liu committed
36

Steven Liu's avatar
Steven Liu committed
37
38
## export_to_video

Dhruv Nair's avatar
Dhruv Nair committed
39
[[autodoc]] utils.export_to_video
40
41
42

## make_image_grid

43
[[autodoc]] utils.make_image_grid
44
45
46
47

## randn_tensor

[[autodoc]] utils.torch_utils.randn_tensor
Aryan's avatar
Aryan committed
48
49
50
51

## apply_layerwise_casting

[[autodoc]] hooks.layerwise_casting.apply_layerwise_casting
Aryan's avatar
Aryan committed
52
53
54
55

## apply_group_offloading

[[autodoc]] hooks.group_offloading.apply_group_offloading