text
stringlengths
5
631k
id
stringlengths
14
178
metadata
dict
__index_level_0__
int64
0
647
# Use with PyArrow This document is a quick introduction to using `datasets` with PyArrow, with a particular focus on how to process datasets using Arrow compute functions, and how to convert a dataset to PyArrow or from PyArrow. This is particularly useful as it allows fast zero-copy operations, since `datasets` use...
datasets/docs/source/use_with_pyarrow.mdx/0
{ "file_path": "datasets/docs/source/use_with_pyarrow.mdx", "repo_id": "datasets", "token_count": 1257 }
100
#!/usr/bin/env python from argparse import ArgumentParser from datasets.commands.delete_from_hub import DeleteFromHubCommand from datasets.commands.env import EnvironmentCommand from datasets.commands.test import TestCommand from datasets.utils.logging import set_verbosity_info def parse_unknown_args(unknown_args): ...
datasets/src/datasets/commands/datasets_cli.py/0
{ "file_path": "datasets/src/datasets/commands/datasets_cli.py", "repo_id": "datasets", "token_count": 411 }
101
# Copyright 2020 The HuggingFace Datasets Authors and the TensorFlow Datasets Authors. # # 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 # # U...
datasets/src/datasets/features/features.py/0
{ "file_path": "datasets/src/datasets/features/features.py", "repo_id": "datasets", "token_count": 41301 }
102
# Copyright 2020 The HuggingFace Datasets Authors and the TensorFlow Datasets Authors. # # 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 # # U...
datasets/src/datasets/info.py/0
{ "file_path": "datasets/src/datasets/info.py", "repo_id": "datasets", "token_count": 8405 }
103
from typing import Callable def is_documented_by(function_with_docstring: Callable): """Decorator to share docstrings across common functions. Args: function_with_docstring (`Callable`): Name of the function with the docstring. """ def wrapper(target_function): target_function.__doc_...
datasets/src/datasets/utils/doc_utils.py/0
{ "file_path": "datasets/src/datasets/utils/doc_utils.py", "repo_id": "datasets", "token_count": 137 }
104
[ "unknown", "n<1K", "1K<n<10K", "10K<n<100K", "100K<n<1M", "1M<n<10M", "10M<n<100M", "100M<n<1B", "1B<n<10B", "10B<n<100B", "100B<n<1T", "n>1T" ]
datasets/src/datasets/utils/resources/size_categories.json/0
{ "file_path": "datasets/src/datasets/utils/resources/size_categories.json", "repo_id": "datasets", "token_count": 124 }
105
import os from argparse import ArgumentParser from typing import List import torch.utils.data from datasets import Dataset, IterableDataset from datasets.distributed import split_dataset_by_node NUM_SHARDS = 4 NUM_ITEMS_PER_SHARD = 3 class FailedTestError(RuntimeError): pass def gen(shards: List[str]): ...
datasets/tests/distributed_scripts/run_torch_distributed.py/0
{ "file_path": "datasets/tests/distributed_scripts/run_torch_distributed.py", "repo_id": "datasets", "token_count": 617 }
106
import pytest from datasets import Column, Dataset, Features, Value, Video, load_dataset from ..utils import require_torchcodec @require_torchcodec @pytest.mark.parametrize( "build_example", [ lambda video_path: video_path, lambda video_path: open(video_path, "rb").read(), lambda vid...
datasets/tests/features/test_video.py/0
{ "file_path": "datasets/tests/features/test_video.py", "repo_id": "datasets", "token_count": 2431 }
107
import shutil import textwrap import numpy as np import pytest from datasets import Audio, ClassLabel, Features from datasets.builder import InvalidConfigName from datasets.data_files import DataFilesDict, DataFilesList, get_data_patterns from datasets.download.streaming_download_manager import StreamingDownloadManag...
datasets/tests/packaged_modules/test_audiofolder.py/0
{ "file_path": "datasets/tests/packaged_modules/test_audiofolder.py", "repo_id": "datasets", "token_count": 6716 }
108
import importlib import os import tempfile import types from contextlib import nullcontext as does_not_raise from multiprocessing import Process from pathlib import Path from unittest import TestCase from unittest.mock import patch import numpy as np import pyarrow as pa import pyarrow.parquet as pq import pytest from...
datasets/tests/test_builder.py/0
{ "file_path": "datasets/tests/test_builder.py", "repo_id": "datasets", "token_count": 25362 }
109
import pytest import datasets.config from datasets.utils.info_utils import is_small_dataset @pytest.mark.parametrize("dataset_size", [None, 400 * 2**20, 600 * 2**20]) @pytest.mark.parametrize("input_in_memory_max_size", ["default", 0, 100 * 2**20, 900 * 2**20]) def test_is_small_dataset(dataset_size, input_in_memory...
datasets/tests/test_info_utils.py/0
{ "file_path": "datasets/tests/test_info_utils.py", "repo_id": "datasets", "token_count": 366 }
110
import pytest from datasets.utils.version import Version @pytest.mark.parametrize( "other, expected_equality", [ (Version("1.0.0"), True), ("1.0.0", True), (Version("2.0.0"), False), ("2.0.0", False), ("1", False), ("a", False), (1, False), (Non...
datasets/tests/test_version.py/0
{ "file_path": "datasets/tests/test_version.py", "repo_id": "datasets", "token_count": 254 }
111
from functools import partial import torch from benchmarking_utils import BenchmarkMixin, BenchmarkScenario, model_init_fn from diffusers import BitsAndBytesConfig, FluxTransformer2DModel from diffusers.utils.testing_utils import torch_device CKPT_ID = "black-forest-labs/FLUX.1-dev" RESULT_FILENAME = "flux.csv" d...
diffusers/benchmarks/benchmarking_flux.py/0
{ "file_path": "diffusers/benchmarks/benchmarking_flux.py", "repo_id": "diffusers", "token_count": 1946 }
112
FROM nvidia/cuda:12.1.0-runtime-ubuntu20.04 LABEL maintainer="Hugging Face" LABEL repository="diffusers" ENV DEBIAN_FRONTEND=noninteractive ENV MINIMUM_SUPPORTED_TORCH_VERSION="2.1.0" ENV MINIMUM_SUPPORTED_TORCHVISION_VERSION="0.16.0" ENV MINIMUM_SUPPORTED_TORCHAUDIO_VERSION="2.1.0" RUN apt-get -y update \ && apt...
diffusers/docker/diffusers-pytorch-minimum-cuda/Dockerfile/0
{ "file_path": "diffusers/docker/diffusers-pytorch-minimum-cuda/Dockerfile", "repo_id": "diffusers", "token_count": 622 }
113
<!--Copyright 2025 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 agreed...
diffusers/docs/source/en/api/loaders/single_file.md/0
{ "file_path": "diffusers/docs/source/en/api/loaders/single_file.md", "repo_id": "diffusers", "token_count": 804 }
114
<!--Copyright 2025 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 agreed...
diffusers/docs/source/en/api/models/autoencoderkl_cogvideox.md/0
{ "file_path": "diffusers/docs/source/en/api/models/autoencoderkl_cogvideox.md", "repo_id": "diffusers", "token_count": 450 }
115
<!--Copyright 2025 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 agreed...
diffusers/docs/source/en/api/pipelines/controlnet_sd3.md/0
{ "file_path": "diffusers/docs/source/en/api/pipelines/controlnet_sd3.md", "repo_id": "diffusers", "token_count": 1150 }
116
<!-- Copyright 2025 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 applic...
diffusers/docs/source/en/api/pipelines/hunyuan_video.md/0
{ "file_path": "diffusers/docs/source/en/api/pipelines/hunyuan_video.md", "repo_id": "diffusers", "token_count": 2320 }
117
<!--Copyright 2025 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 agreed...
diffusers/docs/source/en/api/schedulers/consistency_decoder.md/0
{ "file_path": "diffusers/docs/source/en/api/schedulers/consistency_decoder.md", "repo_id": "diffusers", "token_count": 274 }
118
<!--Copyright 2025 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 agreed...
diffusers/docs/source/en/api/schedulers/heun.md/0
{ "file_path": "diffusers/docs/source/en/api/schedulers/heun.md", "repo_id": "diffusers", "token_count": 306 }
119
<!--Copyright 2025 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 agreed...
diffusers/docs/source/en/modular_diffusers/auto_pipeline_blocks.md/0
{ "file_path": "diffusers/docs/source/en/modular_diffusers/auto_pipeline_blocks.md", "repo_id": "diffusers", "token_count": 1958 }
120
<!--Copyright 2025 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 agreed...
diffusers/docs/source/en/optimization/mps.md/0
{ "file_path": "diffusers/docs/source/en/optimization/mps.md", "repo_id": "diffusers", "token_count": 1245 }
121
<!--Copyright 2025 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 agreed...
diffusers/docs/source/en/quicktour.md/0
{ "file_path": "diffusers/docs/source/en/quicktour.md", "repo_id": "diffusers", "token_count": 3215 }
122
<!--Copyright 2025 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 agreed...
diffusers/docs/source/en/training/t2i_adapters.md/0
{ "file_path": "diffusers/docs/source/en/training/t2i_adapters.md", "repo_id": "diffusers", "token_count": 3501 }
123
<!--Copyright 2025 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 agreed...
diffusers/docs/source/en/using-diffusers/depth2img.md/0
{ "file_path": "diffusers/docs/source/en/using-diffusers/depth2img.md", "repo_id": "diffusers", "token_count": 878 }
124
<!--Copyright 2025 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 agreed...
diffusers/docs/source/en/using-diffusers/reusing_seeds.md/0
{ "file_path": "diffusers/docs/source/en/using-diffusers/reusing_seeds.md", "repo_id": "diffusers", "token_count": 2201 }
125
<!--Copyright 2025 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 agreed...
diffusers/docs/source/ja/installation.md/0
{ "file_path": "diffusers/docs/source/ja/installation.md", "repo_id": "diffusers", "token_count": 2493 }
126
<!--Copyright 2025 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 agreed...
diffusers/docs/source/ko/optimization/habana.md/0
{ "file_path": "diffusers/docs/source/ko/optimization/habana.md", "repo_id": "diffusers", "token_count": 1910 }
127
<!--Copyright 2025 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 agreed...
diffusers/docs/source/ko/training/lora.md/0
{ "file_path": "diffusers/docs/source/ko/training/lora.md", "repo_id": "diffusers", "token_count": 4754 }
128
<!--Copyright 2025 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 agreed...
diffusers/docs/source/ko/using-diffusers/loading_adapters.md/0
{ "file_path": "diffusers/docs/source/ko/using-diffusers/loading_adapters.md", "repo_id": "diffusers", "token_count": 12272 }
129
- title: 开始Diffusers sections: - local: index title: Diffusers - local: installation title: 安装 - local: quicktour title: 快速入门 - local: stable_diffusion title: 有效和高效的扩散 - title: DiffusionPipeline isExpanded: false sections: - local: using-diffusers/schedulers title: Load schedulers a...
diffusers/docs/source/zh/_toctree.yml/0
{ "file_path": "diffusers/docs/source/zh/_toctree.yml", "repo_id": "diffusers", "token_count": 1405 }
130
<!--版权 2025 HuggingFace 团队。保留所有权利。 根据 Apache 许可证 2.0 版(“许可证”)授权;除非符合许可证的规定,否则不得使用此文件。您可以在 http://www.apache.org/licenses/LICENSE-2.0 获取许可证的副本。 除非适用法律要求或书面同意,根据许可证分发的软件是基于“按原样”分发的,没有任何形式的明示或暗示的保证或条件。有关许可证的特定语言,请参阅许可证。 --> # 模块化管道 [`ModularPipeline`] 将 [`~modular_pipelines.ModularPipelineBlocks`] 转换为可执行的管道,加载模型并执行块...
diffusers/docs/source/zh/modular_diffusers/modular_pipeline.md/0
{ "file_path": "diffusers/docs/source/zh/modular_diffusers/modular_pipeline.md", "repo_id": "diffusers", "token_count": 6590 }
131
# Pruna [Pruna](https://github.com/PrunaAI/pruna) 是一个模型优化框架,提供多种优化方法——量化、剪枝、缓存、编译——以加速推理并减少内存使用。以下是优化方法的概览。 | 技术 | 描述 | 速度 | 内存 | 质量 | |------------|---------------------------------------------------------------------------------...
diffusers/docs/source/zh/optimization/pruna.md/0
{ "file_path": "diffusers/docs/source/zh/optimization/pruna.md", "repo_id": "diffusers", "token_count": 4516 }
132
<!--Copyright 2025 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 agreed...
diffusers/docs/source/zh/training/text2image.md/0
{ "file_path": "diffusers/docs/source/zh/training/text2image.md", "repo_id": "diffusers", "token_count": 5802 }
133
# LoRA finetuning example for CogVideoX Low-Rank Adaption of Large Language Models was first introduced by Microsoft in [LoRA: Low-Rank Adaptation of Large Language Models](https://huggingface.co/papers/2106.09685) by *Edward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, Weizhu...
diffusers/examples/cogvideo/README.md/0
{ "file_path": "diffusers/examples/cogvideo/README.md", "repo_id": "diffusers", "token_count": 4728 }
134
# Copyright 2025 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 applicabl...
diffusers/examples/community/composable_stable_diffusion.py/0
{ "file_path": "diffusers/examples/community/composable_stable_diffusion.py", "repo_id": "diffusers", "token_count": 11961 }
135
# Copyright 2025 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 applicabl...
diffusers/examples/community/pipeline_kolors_inpainting.py/0
{ "file_path": "diffusers/examples/community/pipeline_kolors_inpainting.py", "repo_id": "diffusers", "token_count": 39503 }
136
# Copyright Philip Brown, ppbrown@github # # 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 ...
diffusers/examples/community/pipeline_stable_diffusion_xl_t5.py/0
{ "file_path": "diffusers/examples/community/pipeline_stable_diffusion_xl_t5.py", "repo_id": "diffusers", "token_count": 3297 }
137
import inspect from typing import Callable, List, Optional, Union import torch from transformers import ( CLIPImageProcessor, CLIPTextModel, CLIPTokenizer, WhisperForConditionalGeneration, WhisperProcessor, ) from diffusers import ( AutoencoderKL, DDIMScheduler, DiffusionPipeline, ...
diffusers/examples/community/speech_to_image_diffusion.py/0
{ "file_path": "diffusers/examples/community/speech_to_image_diffusion.py", "repo_id": "diffusers", "token_count": 5031 }
138
from typing import Callable, List, Optional, Union import PIL.Image import torch from transformers import ( CLIPImageProcessor, CLIPSegForImageSegmentation, CLIPSegProcessor, CLIPTextModel, CLIPTokenizer, ) from diffusers import DiffusionPipeline from diffusers.configuration_utils import FrozenDic...
diffusers/examples/community/text_inpainting.py/0
{ "file_path": "diffusers/examples/community/text_inpainting.py", "repo_id": "diffusers", "token_count": 5460 }
139
# ControlNet training example for FLUX The `train_controlnet_flux.py` script shows how to implement the ControlNet training procedure and adapt it for [FLUX](https://github.com/black-forest-labs/flux). Training script provided by LibAI, which is an institution dedicated to the progress and achievement of artificial g...
diffusers/examples/controlnet/README_flux.md/0
{ "file_path": "diffusers/examples/controlnet/README_flux.md", "repo_id": "diffusers", "token_count": 7208 }
140
# Copyright 2025 Custom Diffusion authors. 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 appl...
diffusers/examples/custom_diffusion/retrieve.py/0
{ "file_path": "diffusers/examples/custom_diffusion/retrieve.py", "repo_id": "diffusers", "token_count": 1446 }
141
import argparse import logging import math import os from pathlib import Path import jax import jax.numpy as jnp import numpy as np import optax import torch import torch.utils.checkpoint import transformers from flax import jax_utils from flax.training import train_state from flax.training.common_utils import shard f...
diffusers/examples/dreambooth/train_dreambooth_flax.py/0
{ "file_path": "diffusers/examples/dreambooth/train_dreambooth_flax.py", "repo_id": "diffusers", "token_count": 11967 }
142
# Inference Examples **The inference examples folder is deprecated and will be removed in a future version**. **Officially supported inference examples can be found in the [Pipelines folder](https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines)**. - For `Image-to-Image text-guided generation wit...
diffusers/examples/inference/README.md/0
{ "file_path": "diffusers/examples/inference/README.md", "repo_id": "diffusers", "token_count": 252 }
143
# coding=utf-8 # Copyright 2025 suzukimain # # 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 t...
diffusers/examples/model_search/pipeline_easy.py/0
{ "file_path": "diffusers/examples/model_search/pipeline_easy.py", "repo_id": "diffusers", "token_count": 39415 }
144
# AutoencoderKL training example ## Installing the dependencies Before running the scripts, make sure to install the library's training dependencies: **Important** To make sure you can successfully run the latest versions of the example scripts, we highly recommend **installing from source** and keeping the install...
diffusers/examples/research_projects/autoencoderkl/README.md/0
{ "file_path": "diffusers/examples/research_projects/autoencoderkl/README.md", "repo_id": "diffusers", "token_count": 580 }
145
<jupyter_start><jupyter_code>%load_ext autoreload %autoreload 2 from diffusers import StableDiffusionGLIGENPipeline from transformers import CLIPTextModel, CLIPTokenizer import diffusers from diffusers import ( AutoencoderKL, DDPMScheduler, EulerDiscreteScheduler, UNet2DConditionModel, ) # pretraine...
diffusers/examples/research_projects/gligen/demo.ipynb/0
{ "file_path": "diffusers/examples/research_projects/gligen/demo.ipynb", "repo_id": "diffusers", "token_count": 1156 }
146
# IP Adapter Training Example [IP Adapter](https://huggingface.co/papers/2308.06721) is a novel approach designed to enhance text-to-image models such as Stable Diffusion by enabling them to generate images based on image prompts rather than text prompts alone. Unlike traditional methods that rely solely on complex t...
diffusers/examples/research_projects/ip_adapter/README.md/0
{ "file_path": "diffusers/examples/research_projects/ip_adapter/README.md", "repo_id": "diffusers", "token_count": 2605 }
147
""" The main idea for this code is to provide a way for users to not need to bother with the hassle of multiple tokens for a concept by typing a photo of <concept>_0 <concept>_1 ... and so on and instead just do a photo of <concept> which gets translated to the above. This needs to work for both inference and training....
diffusers/examples/research_projects/multi_token_textual_inversion/multi_token_clip.py/0
{ "file_path": "diffusers/examples/research_projects/multi_token_textual_inversion/multi_token_clip.py", "repo_id": "diffusers", "token_count": 1828 }
148
from typing import Any, Dict, Optional import torch from torch import nn from diffusers.configuration_utils import ConfigMixin, register_to_config from diffusers.models import PixArtTransformer2DModel from diffusers.models.attention import BasicTransformerBlock from diffusers.models.modeling_outputs import Transforme...
diffusers/examples/research_projects/pixart/controlnet_pixart_alpha.py/0
{ "file_path": "diffusers/examples/research_projects/pixart/controlnet_pixart_alpha.py", "repo_id": "diffusers", "token_count": 5561 }
149
import inspect from typing import Callable, List, Optional, Union import torch from PIL import Image from retriever import Retriever, normalize_images, preprocess_images from transformers import CLIPImageProcessor, CLIPModel, CLIPTokenizer from diffusers import ( AutoencoderKL, DDIMScheduler, DiffusionPip...
diffusers/examples/research_projects/rdm/pipeline_rdm.py/0
{ "file_path": "diffusers/examples/research_projects/rdm/pipeline_rdm.py", "repo_id": "diffusers", "token_count": 7216 }
150
#!/usr/bin/env python # coding=utf-8 # Copyright 2025 The HuggingFace Inc. 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/LI...
diffusers/examples/research_projects/scheduled_huber_loss_training/text_to_image/train_text_to_image_sdxl.py/0
{ "file_path": "diffusers/examples/research_projects/scheduled_huber_loss_training/text_to_image/train_text_to_image_sdxl.py", "repo_id": "diffusers", "token_count": 26772 }
151
#!/usr/bin/env python # coding=utf-8 # Copyright 2025 The HuggingFace Inc. 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/LI...
diffusers/examples/text_to_image/test_text_to_image_lora.py/0
{ "file_path": "diffusers/examples/text_to_image/test_text_to_image_lora.py", "repo_id": "diffusers", "token_count": 6179 }
152
import argparse import time from pathlib import Path from typing import Any, Dict, Literal import torch from diffusers import AsymmetricAutoencoderKL ASYMMETRIC_AUTOENCODER_KL_x_1_5_CONFIG = { "in_channels": 3, "out_channels": 3, "down_block_types": [ "DownEncoderBlock2D", "DownEncoderBl...
diffusers/scripts/convert_asymmetric_vqgan_to_diffusers.py/0
{ "file_path": "diffusers/scripts/convert_asymmetric_vqgan_to_diffusers.py", "repo_id": "diffusers", "token_count": 3351 }
153
import argparse import os import torch from torchvision.datasets.utils import download_url from diffusers import AutoencoderKL, DDIMScheduler, DiTPipeline, Transformer2DModel pretrained_models = {512: "DiT-XL-2-512x512.pt", 256: "DiT-XL-2-256x256.pt"} def download_model(model_name): """ Downloads a pre-tr...
diffusers/scripts/convert_dit_to_diffusers.py/0
{ "file_path": "diffusers/scripts/convert_dit_to_diffusers.py", "repo_id": "diffusers", "token_count": 3037 }
154
import argparse import os import torch from safetensors.torch import load_file from transformers import AutoModel, AutoTokenizer from diffusers import AutoencoderKL, FlowMatchEulerDiscreteScheduler, LuminaNextDiT2DModel, LuminaPipeline def main(args): # checkpoint from https://huggingface.co/Alpha-VLLM/Lumina-N...
diffusers/scripts/convert_lumina_to_diffusers.py/0
{ "file_path": "diffusers/scripts/convert_lumina_to_diffusers.py", "repo_id": "diffusers", "token_count": 3148 }
155
#!/usr/bin/env python from __future__ import annotations import argparse import os from contextlib import nullcontext import torch from accelerate import init_empty_weights from huggingface_hub import hf_hub_download, snapshot_download from termcolor import colored from transformers import AutoModelForCausalLM, AutoT...
diffusers/scripts/convert_sana_to_diffusers.py/0
{ "file_path": "diffusers/scripts/convert_sana_to_diffusers.py", "repo_id": "diffusers", "token_count": 9521 }
156
import argparse import io import requests import torch import yaml from diffusers import AutoencoderKL from diffusers.pipelines.stable_diffusion.convert_from_ckpt import ( assign_to_checkpoint, conv_attn_to_linear, create_vae_diffusers_config, renew_vae_attention_paths, renew_vae_resnet_paths, ) f...
diffusers/scripts/convert_vae_pt_to_diffusers.py/0
{ "file_path": "diffusers/scripts/convert_vae_pt_to_diffusers.py", "repo_id": "diffusers", "token_count": 3572 }
157
# coding=utf-8 # Copyright 2025 The HuggingFace Inc. team. # Copyright (c) 2022, NVIDIA CORPORATION. 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.a...
diffusers/src/diffusers/configuration_utils.py/0
{ "file_path": "diffusers/src/diffusers/configuration_utils.py", "repo_id": "diffusers", "token_count": 14943 }
158
# Copyright 2025 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 applicabl...
diffusers/src/diffusers/guiders/smoothed_energy_guidance.py/0
{ "file_path": "diffusers/src/diffusers/guiders/smoothed_energy_guidance.py", "repo_id": "diffusers", "token_count": 5166 }
159
# Copyright 2025 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 applicabl...
diffusers/src/diffusers/loaders/ip_adapter.py/0
{ "file_path": "diffusers/src/diffusers/loaders/ip_adapter.py", "repo_id": "diffusers", "token_count": 26696 }
160
# coding=utf-8 # Copyright 2025 HuggingFace Inc. # # 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 ag...
diffusers/src/diffusers/models/activations.py/0
{ "file_path": "diffusers/src/diffusers/models/activations.py", "repo_id": "diffusers", "token_count": 2593 }
161
# Copyright 2025 The EasyAnimate team and 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 # # U...
diffusers/src/diffusers/models/autoencoders/autoencoder_kl_magvit.py/0
{ "file_path": "diffusers/src/diffusers/models/autoencoders/autoencoder_kl_magvit.py", "repo_id": "diffusers", "token_count": 21371 }
162
# Copyright 2025 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 applicabl...
diffusers/src/diffusers/models/controlnets/controlnet.py/0
{ "file_path": "diffusers/src/diffusers/models/controlnets/controlnet.py", "repo_id": "diffusers", "token_count": 18811 }
163
# coding=utf-8 # Copyright 2025 The HuggingFace Inc. team. # Copyright (c) 2022, NVIDIA CORPORATION. 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.a...
diffusers/src/diffusers/models/model_loading_utils.py/0
{ "file_path": "diffusers/src/diffusers/models/model_loading_utils.py", "repo_id": "diffusers", "token_count": 13197 }
164
# Copyright 2025 the Latte Team and 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 re...
diffusers/src/diffusers/models/transformers/latte_transformer_3d.py/0
{ "file_path": "diffusers/src/diffusers/models/transformers/latte_transformer_3d.py", "repo_id": "diffusers", "token_count": 7180 }
165
from typing import Any, Dict, List, Optional, Tuple, Union import torch import torch.nn as nn import torch.nn.functional as F from ...configuration_utils import ConfigMixin, register_to_config from ...loaders import FromOriginalModelMixin, PeftAdapterMixin from ...models.modeling_outputs import Transformer2DModelOutp...
diffusers/src/diffusers/models/transformers/transformer_hidream_image.py/0
{ "file_path": "diffusers/src/diffusers/models/transformers/transformer_hidream_image.py", "repo_id": "diffusers", "token_count": 19295 }
166
# Copyright 2025 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 applicabl...
diffusers/src/diffusers/models/unets/unet_2d.py/0
{ "file_path": "diffusers/src/diffusers/models/unets/unet_2d.py", "repo_id": "diffusers", "token_count": 7439 }
167
from typing import TYPE_CHECKING from ..utils import ( DIFFUSERS_SLOW_IMPORT, OptionalDependencyNotAvailable, _LazyModule, get_objects_from_module, is_torch_available, is_transformers_available, logging, ) logger = logging.get_logger(__name__) logger.warning( "Modular Diffusers is cur...
diffusers/src/diffusers/modular_pipelines/__init__.py/0
{ "file_path": "diffusers/src/diffusers/modular_pipelines/__init__.py", "repo_id": "diffusers", "token_count": 1122 }
168
# Copyright 2025 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 applicabl...
diffusers/src/diffusers/modular_pipelines/stable_diffusion_xl/encoders.py/0
{ "file_path": "diffusers/src/diffusers/modular_pipelines/stable_diffusion_xl/encoders.py", "repo_id": "diffusers", "token_count": 18510 }
169
from typing import TYPE_CHECKING from ...utils import ( DIFFUSERS_SLOW_IMPORT, OptionalDependencyNotAvailable, _LazyModule, is_torch_available, is_transformers_available, ) _dummy_objects = {} _import_structure = {} try: if not (is_transformers_available() and is_torch_available()): ...
diffusers/src/diffusers/pipelines/amused/__init__.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/amused/__init__.py", "repo_id": "diffusers", "token_count": 796 }
170
# Copyright 2025 CVSSP, ByteDance and 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 ...
diffusers/src/diffusers/pipelines/audioldm2/pipeline_audioldm2.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/audioldm2/pipeline_audioldm2.py", "repo_id": "diffusers", "token_count": 24403 }
171
from typing import TYPE_CHECKING from ...utils import DIFFUSERS_SLOW_IMPORT, _LazyModule _import_structure = {"pipeline_ddim": ["DDIMPipeline"]} if TYPE_CHECKING or DIFFUSERS_SLOW_IMPORT: from .pipeline_ddim import DDIMPipeline else: import sys sys.modules[__name__] = _LazyModule( __name__, ...
diffusers/src/diffusers/pipelines/ddim/__init__.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/ddim/__init__.py", "repo_id": "diffusers", "token_count": 180 }
172
from typing import TYPE_CHECKING from ...utils import ( DIFFUSERS_SLOW_IMPORT, OptionalDependencyNotAvailable, _LazyModule, get_objects_from_module, is_librosa_available, is_note_seq_available, is_torch_available, is_transformers_available, ) _dummy_objects = {} _import_structure = {}...
diffusers/src/diffusers/pipelines/deprecated/__init__.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/deprecated/__init__.py", "repo_id": "diffusers", "token_count": 2227 }
173
# Copyright 2025 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 applicabl...
diffusers/src/diffusers/pipelines/deprecated/score_sde_ve/pipeline_score_sde_ve.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/deprecated/score_sde_ve/pipeline_score_sde_ve.py", "repo_id": "diffusers", "token_count": 1759 }
174
from typing import Any, Dict, List, Optional, Tuple, Union import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from diffusers.utils import deprecate from ....configuration_utils import ConfigMixin, register_to_config from ....models import ModelMixin from ....models.activations impo...
diffusers/src/diffusers/pipelines/deprecated/versatile_diffusion/modeling_text_unet.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/deprecated/versatile_diffusion/modeling_text_unet.py", "repo_id": "diffusers", "token_count": 54027 }
175
from typing import TYPE_CHECKING from ...utils import ( DIFFUSERS_SLOW_IMPORT, OptionalDependencyNotAvailable, _LazyModule, get_objects_from_module, is_torch_available, is_transformers_available, ) _dummy_objects = {} _additional_imports = {} _import_structure = {"pipeline_output": ["HiDreamI...
diffusers/src/diffusers/pipelines/hidream_image/__init__.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/hidream_image/__init__.py", "repo_id": "diffusers", "token_count": 586 }
176
# Copyright 2025 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 applicabl...
diffusers/src/diffusers/pipelines/kandinsky/pipeline_kandinsky_img2img.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/kandinsky/pipeline_kandinsky_img2img.py", "repo_id": "diffusers", "token_count": 9822 }
177
import inspect import math from itertools import repeat from typing import Any, Callable, Dict, List, Optional, Tuple, Union import torch import torch.nn.functional as F from packaging import version from transformers import CLIPImageProcessor, CLIPTextModel, CLIPTokenizer from ...configuration_utils import FrozenDic...
diffusers/src/diffusers/pipelines/ledits_pp/pipeline_leditspp_stable_diffusion.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/ledits_pp/pipeline_leditspp_stable_diffusion.py", "repo_id": "diffusers", "token_count": 36659 }
178
# Copyright 2023-2025 Marigold Team, ETH Zürich. All rights reserved. # Copyright 2024-2025 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 # # ...
diffusers/src/diffusers/pipelines/marigold/pipeline_marigold_depth.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/marigold/pipeline_marigold_depth.py", "repo_id": "diffusers", "token_count": 17538 }
179
# Copyright 2025 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 applicabl...
diffusers/src/diffusers/pipelines/paint_by_example/image_encoder.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/paint_by_example/image_encoder.py", "repo_id": "diffusers", "token_count": 942 }
180
# coding=utf-8 # Copyright 2025 The HuggingFace Inc. team. # # 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...
diffusers/src/diffusers/pipelines/stable_diffusion/convert_from_ckpt.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/stable_diffusion/convert_from_ckpt.py", "repo_id": "diffusers", "token_count": 36488 }
181
# Copyright 2025 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 applicabl...
diffusers/src/diffusers/pipelines/stable_diffusion_xl/pipeline_flax_stable_diffusion_xl.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/stable_diffusion_xl/pipeline_flax_stable_diffusion_xl.py", "repo_id": "diffusers", "token_count": 5263 }
182
import copy import inspect from dataclasses import dataclass from typing import Callable, List, Optional, Union import numpy as np import PIL.Image import torch import torch.nn.functional as F from torch.nn.functional import grid_sample from transformers import CLIPImageProcessor, CLIPTextModel, CLIPTokenizer from .....
diffusers/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_zero.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_zero.py", "repo_id": "diffusers", "token_count": 20339 }
183
# Copyright 2025 The HuggingFace Inc. 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 appl...
diffusers/src/diffusers/quantizers/base.py/0
{ "file_path": "diffusers/src/diffusers/quantizers/base.py", "repo_id": "diffusers", "token_count": 3858 }
184
from typing import TYPE_CHECKING from ...utils import ( DIFFUSERS_SLOW_IMPORT, OptionalDependencyNotAvailable, _LazyModule, get_objects_from_module, is_torch_available, is_transformers_available, ) _dummy_objects = {} _import_structure = {} try: if not (is_transformers_available() and is...
diffusers/src/diffusers/schedulers/deprecated/__init__.py/0
{ "file_path": "diffusers/src/diffusers/schedulers/deprecated/__init__.py", "repo_id": "diffusers", "token_count": 555 }
185
# Copyright 2025 Zhejiang University Team and 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 # #...
diffusers/src/diffusers/schedulers/scheduling_ipndm.py/0
{ "file_path": "diffusers/src/diffusers/schedulers/scheduling_ipndm.py", "repo_id": "diffusers", "token_count": 3641 }
186
# This file is autogenerated by the command `make fix-copies`, do not edit. from ..utils import DummyObject, requires_backends class QuantoConfig(metaclass=DummyObject): _backends = ["optimum_quanto"] def __init__(self, *args, **kwargs): requires_backends(self, ["optimum_quanto"]) @classmethod ...
diffusers/src/diffusers/utils/dummy_optimum_quanto_objects.py/0
{ "file_path": "diffusers/src/diffusers/utils/dummy_optimum_quanto_objects.py", "repo_id": "diffusers", "token_count": 208 }
187
import os import tempfile from typing import Any, Callable, List, Optional, Tuple, Union from urllib.parse import unquote, urlparse import PIL.Image import PIL.ImageOps import requests from .constants import DIFFUSERS_REQUEST_TIMEOUT from .import_utils import BACKENDS_MAPPING, is_imageio_available def load_image( ...
diffusers/src/diffusers/utils/loading_utils.py/0
{ "file_path": "diffusers/src/diffusers/utils/loading_utils.py", "repo_id": "diffusers", "token_count": 2331 }
188
# Copyright 2025 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 applicabl...
diffusers/tests/fixtures/custom_pipeline/pipeline.py/0
{ "file_path": "diffusers/tests/fixtures/custom_pipeline/pipeline.py", "repo_id": "diffusers", "token_count": 1767 }
189
# coding=utf-8 # Copyright 2025 HuggingFace Inc. # # 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 ag...
diffusers/tests/lora/test_lora_layers_sd3.py/0
{ "file_path": "diffusers/tests/lora/test_lora_layers_sd3.py", "repo_id": "diffusers", "token_count": 2798 }
190
# coding=utf-8 # Copyright 2025 HuggingFace Inc. # # 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 ag...
diffusers/tests/models/autoencoders/test_models_autoencoder_mochi.py/0
{ "file_path": "diffusers/tests/models/autoencoders/test_models_autoencoder_mochi.py", "repo_id": "diffusers", "token_count": 1581 }
191
# coding=utf-8 # Copyright 2025 HuggingFace Inc. # # 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 ag...
diffusers/tests/models/transformers/test_models_pixart_transformer2d.py/0
{ "file_path": "diffusers/tests/models/transformers/test_models_pixart_transformer2d.py", "repo_id": "diffusers", "token_count": 1656 }
192
# Copyright 2025 HuggingFace Inc. # # 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 writ...
diffusers/tests/models/transformers/test_models_transformer_hunyuan_video_framepack.py/0
{ "file_path": "diffusers/tests/models/transformers/test_models_transformer_hunyuan_video_framepack.py", "repo_id": "diffusers", "token_count": 2028 }
193
# coding=utf-8 # Copyright 2025 HuggingFace Inc. # # 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 ag...
diffusers/tests/models/unets/test_models_unet_2d_condition.py/0
{ "file_path": "diffusers/tests/models/unets/test_models_unet_2d_condition.py", "repo_id": "diffusers", "token_count": 27765 }
194
# Copyright 2025 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 applicabl...
diffusers/tests/others/test_dependencies.py/0
{ "file_path": "diffusers/tests/others/test_dependencies.py", "repo_id": "diffusers", "token_count": 835 }
195
import unittest import numpy as np import torch from PIL import Image from transformers import CLIPTextConfig, CLIPTextModel, CLIPTokenizer import diffusers from diffusers import ( AnimateDiffVideoToVideoPipeline, AutoencoderKL, DDIMScheduler, DPMSolverMultistepScheduler, LCMScheduler, MotionA...
diffusers/tests/pipelines/animatediff/test_animatediff_video2video.py/0
{ "file_path": "diffusers/tests/pipelines/animatediff/test_animatediff_video2video.py", "repo_id": "diffusers", "token_count": 10423 }
196
# coding=utf-8 # Copyright 2025 HuggingFace Inc. # # 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 ag...
diffusers/tests/pipelines/ddim/test_ddim.py/0
{ "file_path": "diffusers/tests/pipelines/ddim/test_ddim.py", "repo_id": "diffusers", "token_count": 2222 }
197
import unittest import numpy as np import torch from PIL import Image from transformers import AutoTokenizer, CLIPTextConfig, CLIPTextModel, CLIPTokenizer, T5EncoderModel from diffusers import AutoencoderKL, FlowMatchEulerDiscreteScheduler, FluxControlPipeline, FluxTransformer2DModel from diffusers.utils.testing_util...
diffusers/tests/pipelines/flux/test_pipeline_flux_control.py/0
{ "file_path": "diffusers/tests/pipelines/flux/test_pipeline_flux_control.py", "repo_id": "diffusers", "token_count": 3089 }
198
# coding=utf-8 # Copyright 2025 HuggingFace Inc. # # 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 ag...
diffusers/tests/pipelines/kandinsky2_2/test_kandinsky_prior.py/0
{ "file_path": "diffusers/tests/pipelines/kandinsky2_2/test_kandinsky_prior.py", "repo_id": "diffusers", "token_count": 4062 }
199