repo
stringclasses
454 values
file_path
stringlengths
5
201
extension
stringclasses
1 value
content
stringlengths
8
509k
num_lines
int64
3
16.9k
size_bytes
int64
8
511k
diffusers
src/diffusers/modular_pipelines/ltx2/utils.py
.py
# Copyright 2026 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...
99
6,682
diffusers
src/diffusers/modular_pipelines/ltx2/denoise.py
.py
# Copyright 2026 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...
680
30,986
diffusers
src/diffusers/modular_pipelines/ltx2/__init__.py
.py
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...
62
1,886
diffusers
src/diffusers/modular_pipelines/ltx2/before_denoise.py
.py
# Copyright 2026 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...
1,761
78,976
diffusers
src/diffusers/modular_pipelines/ltx2/decoders.py
.py
# Copyright 2026 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...
388
16,224
diffusers
src/diffusers/modular_pipelines/ltx2/modular_blocks_ltx25.py
.py
# Copyright 2026 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...
390
18,782
diffusers
src/diffusers/modular_pipelines/ltx2/encoders.py
.py
# Copyright 2026 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...
1,313
58,653
diffusers
src/diffusers/modular_pipelines/ltx2/guider.py
.py
# Copyright 2026 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...
163
8,925
diffusers
src/diffusers/modular_pipelines/ltx2/modular_blocks_ltx2.py
.py
# Copyright 2026 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...
1,895
95,329
diffusers
src/diffusers/modular_pipelines/ltx2/modular_pipeline.py
.py
# Copyright 2026 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...
137
4,822
diffusers
src/diffusers/modular_pipelines/stable_diffusion_xl/modular_blocks_stable_diffusion_xl.py
.py
# Copyright 2026 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...
513
25,136
diffusers
src/diffusers/modular_pipelines/stable_diffusion_xl/denoise.py
.py
# Copyright 2026 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...
799
35,621
diffusers
src/diffusers/modular_pipelines/stable_diffusion_xl/__init__.py
.py
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...
48
1,512
diffusers
src/diffusers/modular_pipelines/stable_diffusion_xl/before_denoise.py
.py
# Copyright 2026 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...
1,875
85,972
diffusers
src/diffusers/modular_pipelines/stable_diffusion_xl/decoders.py
.py
# Copyright 2026 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...
199
7,763
diffusers
src/diffusers/modular_pipelines/stable_diffusion_xl/encoders.py
.py
# Copyright 2026 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...
886
41,208
diffusers
src/diffusers/modular_pipelines/stable_diffusion_xl/modular_pipeline.py
.py
# Copyright 2026 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...
361
15,512
diffusers
src/diffusers/modular_pipelines/anima/modular_blocks_anima.py
.py
# Copyright 2026 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...
382
15,895
diffusers
src/diffusers/modular_pipelines/anima/denoise.py
.py
# Copyright 2026 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...
212
8,412
diffusers
src/diffusers/modular_pipelines/anima/__init__.py
.py
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...
48
1,436
diffusers
src/diffusers/modular_pipelines/anima/before_denoise.py
.py
# Copyright 2026 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...
715
28,469
diffusers
src/diffusers/modular_pipelines/anima/decoders.py
.py
# Copyright 2026 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...
121
4,219
diffusers
src/diffusers/modular_pipelines/anima/encoders.py
.py
# Copyright 2026 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...
405
15,856
diffusers
src/diffusers/modular_pipelines/anima/modular_pipeline.py
.py
# Copyright 2026 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...
53
1,682
diffusers
src/diffusers/modular_pipelines/cosmos/after_decode.py
.py
import torch from ...utils import encode_video, export_to_video from ..modular_pipeline import ModularPipelineBlocks, PipelineState from ..modular_pipeline_utils import InputParam, OutputParam from .modular_pipeline import Cosmos3OmniModularPipeline class Cosmos3ActionOutputStep(ModularPipelineBlocks): model_nam...
114
4,545
diffusers
src/diffusers/modular_pipelines/cosmos/before_encoder.py
.py
import math import torch from ...configuration_utils import FrozenDict from ...video_processor import VideoProcessor from ..modular_pipeline import ModularPipelineBlocks, PipelineState from ..modular_pipeline_utils import ComponentSpec, InputParam, OutputParam from .modular_pipeline import Cosmos3OmniModularPipeline ...
167
7,669
diffusers
src/diffusers/modular_pipelines/cosmos/denoise.py
.py
import inspect import torch from ...models.transformers.transformer_cosmos3 import Cosmos3OmniTransformer from ...schedulers import FlowMatchEulerDiscreteScheduler, UniPCMultistepScheduler from ..modular_pipeline import ( BlockState, LoopSequentialPipelineBlocks, ModularPipelineBlocks, PipelineState, ...
890
35,811
diffusers
src/diffusers/modular_pipelines/cosmos/__init__.py
.py
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...
50
1,688
diffusers
src/diffusers/modular_pipelines/cosmos/before_denoise.py
.py
import copy import numpy as np import torch from ...models.transformers.transformer_cosmos3 import Cosmos3OmniTransformer from ...pipelines.cosmos.pipeline_cosmos3_omni import _EMBODIMENT_TO_DOMAIN_ID, CosmosActionCondition from ...schedulers import FlowMatchEulerDiscreteScheduler, UniPCMultistepScheduler from ...uti...
1,332
55,386
diffusers
src/diffusers/modular_pipelines/cosmos/decoders.py
.py
import torch from ...configuration_utils import FrozenDict from ...models.autoencoders.autoencoder_cosmos3_audio import Cosmos3AVAEAudioTokenizer from ...models.autoencoders.autoencoder_kl_wan import AutoencoderKLWan from ...utils import logging from ...video_processor import VideoProcessor from ..modular_pipeline imp...
260
10,594
diffusers
src/diffusers/modular_pipelines/cosmos/encoders.py
.py
import torch from transformers import AutoTokenizer from ...configuration_utils import FrozenDict from ...models.autoencoders.autoencoder_kl_wan import AutoencoderKLWan from ...pipelines.cosmos.pipeline_cosmos3_omni import ( _ACTION_RESOLUTION_BINS, CosmosActionCondition, ) from ...utils import logging from .....
1,057
46,010
diffusers
src/diffusers/modular_pipelines/cosmos/modular_blocks_cosmos3_distilled.py
.py
from ..modular_pipeline import ConditionalPipelineBlocks, SequentialPipelineBlocks from ..modular_pipeline_utils import OutputParam from .before_denoise import ( Cosmos3DistilledSetTimestepsStep, Cosmos3PrepareTextSegmentsStep, Cosmos3VisionDenoiseInputStep, Cosmos3VisionPackSequenceStep, Cosmos3Vis...
241
9,849
diffusers
src/diffusers/modular_pipelines/cosmos/modular_blocks_cosmos3.py
.py
import torch from ..modular_pipeline import ( AutoPipelineBlocks, ConditionalPipelineBlocks, PipelineState, SequentialPipelineBlocks, ) from ..modular_pipeline_utils import InputParam, OutputParam from .after_decode import Cosmos3ActionOutputStep from .before_denoise import ( Cosmos3ActionDenoiseIn...
1,302
55,845
diffusers
src/diffusers/modular_pipelines/cosmos/modular_pipeline.py
.py
import torch from ...pipelines.cosmos.pipeline_cosmos3_omni import Cosmos3OmniPipeline, CosmosSafetyChecker from ..modular_pipeline import ModularPipeline class Cosmos3OmniModularPipeline(ModularPipeline): """ A ModularPipeline for Cosmos 3 omni generation. """ default_blocks_name = "Cosmos3OmniBloc...
131
5,100
diffusers
src/diffusers/modular_pipelines/flux/modular_blocks_flux_kontext.py
.py
# Copyright 2026 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...
586
23,149
diffusers
src/diffusers/modular_pipelines/flux/denoise.py
.py
# Copyright 2026 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...
323
11,852
diffusers
src/diffusers/modular_pipelines/flux/__init__.py
.py
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...
50
1,640
diffusers
src/diffusers/modular_pipelines/flux/modular_blocks_flux.py
.py
# Copyright 2026 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...
587
22,540
diffusers
src/diffusers/modular_pipelines/flux/before_denoise.py
.py
# Copyright 2026 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...
619
24,732
diffusers
src/diffusers/modular_pipelines/flux/decoders.py
.py
# Copyright 2026 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...
110
3,886
diffusers
src/diffusers/modular_pipelines/flux/encoders.py
.py
# Copyright 2026 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...
481
19,360
diffusers
src/diffusers/modular_pipelines/flux/inputs.py
.py
# Copyright 2026 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...
364
15,165
diffusers
src/diffusers/modular_pipelines/flux/modular_pipeline.py
.py
# Copyright 2026 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...
68
2,133
diffusers
src/diffusers/models/attention_dispatch.py
.py
# Copyright 2026 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...
4,160
147,128
diffusers
src/diffusers/models/model_loading_utils.py
.py
# 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...
762
30,459
diffusers
src/diffusers/models/attention_processor.py
.py
# Copyright 2026 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...
5,680
239,322
diffusers
src/diffusers/models/resnet.py
.py
# Copyright 2026 The HuggingFace Team. All rights reserved. # `TemporalConvLayer` Copyright 2025 Alibaba DAMO-VILAB, The ModelScope 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. #...
802
32,512
diffusers
src/diffusers/models/attention.py
.py
# Copyright 2026 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...
1,743
73,696
diffusers
src/diffusers/models/__init__.py
.py
# Copyright 2026 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...
321
18,322
diffusers
src/diffusers/models/embeddings.py
.py
# Copyright 2026 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...
2,622
104,234
diffusers
src/diffusers/models/lora.py
.py
# Copyright 2026 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...
456
18,761
diffusers
src/diffusers/models/vq_model.py
.py
# Copyright 2026 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...
30
1,524
diffusers
src/diffusers/models/normalization.py
.py
# 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...
648
24,518
diffusers
src/diffusers/models/downsampling.py
.py
# Copyright 2026 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...
400
15,831
diffusers
src/diffusers/models/auto_model.py
.py
# Copyright 2026 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...
346
17,729
diffusers
src/diffusers/models/modeling_outputs.py
.py
from dataclasses import dataclass from ..utils import BaseOutput @dataclass class AutoencoderKLOutput(BaseOutput): """ Output of AutoencoderKL encoding method. Args: latent_dist (`DiagonalGaussianDistribution`): Encoded outputs of `Encoder` represented as the mean and logvar of `Diag...
32
1,042
diffusers
src/diffusers/models/modeling_utils.py
.py
# 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...
2,139
100,536
diffusers
src/diffusers/models/cache_utils.py
.py
# Copyright 2026 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...
165
6,875
diffusers
src/diffusers/models/adapter.py
.py
# Copyright 2022 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...
597
24,986
diffusers
src/diffusers/models/_modeling_parallel.py
.py
# 🚨🚨🚨 Experimental parallelism support for Diffusers 🚨🚨🚨 # Experimental changes are subject to change and APIs may break without warning. # Copyright 2026 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complianc...
326
14,932
diffusers
src/diffusers/models/activations.py
.py
# 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...
179
6,511
diffusers
src/diffusers/models/upsampling.py
.py
# Copyright 2026 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...
516
19,568
diffusers
src/diffusers/models/controlnets/controlnet_xs.py
.py
# Copyright 2026 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...
1,836
82,186
diffusers
src/diffusers/models/controlnets/controlnet_qwenimage.py
.py
# Copyright 2025 Black Forest Labs, The HuggingFace Team and The InstantX 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/LIC...
351
15,708
diffusers
src/diffusers/models/controlnets/controlnet_cosmos.py
.py
from dataclasses import dataclass from typing import List, Optional, Tuple, Union import torch import torch.nn as nn from ...configuration_utils import ConfigMixin, register_to_config from ...loaders import FromOriginalModelMixin from ...utils import BaseOutput, is_torchvision_available, logging from ..modeling_utils...
318
13,070
diffusers
src/diffusers/models/controlnets/multicontrolnet.py
.py
import os from typing import Any, Callable import torch from torch import nn from ...utils import logging from ..controlnets.controlnet import ControlNetModel, ControlNetOutput from ..modeling_utils import ModelMixin logger = logging.get_logger(__name__) class MultiControlNetModel(ModelMixin): r""" Multip...
215
11,017
diffusers
src/diffusers/models/controlnets/__init__.py
.py
from ...utils import is_torch_available if is_torch_available(): from .controlnet import ControlNetModel, ControlNetOutput from .controlnet_cosmos import CosmosControlNetModel from .controlnet_flux import FluxControlNetModel, FluxControlNetOutput, FluxMultiControlNetModel from .controlnet_hunyuan impo...
26
1,170
diffusers
src/diffusers/models/controlnets/multicontrolnet_union.py
.py
import os from typing import Any, Callable import torch from torch import nn from ...utils import logging from ..controlnets.controlnet import ControlNetOutput from ..controlnets.controlnet_union import ControlNetUnionModel from ..modeling_utils import ModelMixin logger = logging.get_logger(__name__) class MultiC...
232
12,161
diffusers
src/diffusers/models/controlnets/controlnet_z_image.py
.py
# Copyright 2025 Alibaba Z-Image 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 # # Unl...
863
35,272
diffusers
src/diffusers/models/controlnets/controlnet_hunyuan.py
.py
# Copyright 2025 HunyuanDiT Authors, Qixun Wang 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...
401
16,868
diffusers
src/diffusers/models/controlnets/controlnet_flux.py
.py
# Copyright 2025 Black Forest Labs, The HuggingFace Team and The InstantX 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/LIC...
475
21,667
diffusers
src/diffusers/models/controlnets/controlnet_sd3.py
.py
# Copyright 2025 Stability AI, The HuggingFace Team and The InstantX 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-...
453
21,043
diffusers
src/diffusers/models/controlnets/controlnet_sparsectrl.py
.py
# Copyright 2026 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...
722
35,288
diffusers
src/diffusers/models/controlnets/controlnet.py
.py
# Copyright 2026 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...
808
40,305
diffusers
src/diffusers/models/controlnets/controlnet_union.py
.py
# Copyright 2026 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...
780
38,753
diffusers
src/diffusers/models/controlnets/controlnet_sana.py
.py
# Copyright 2026 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...
242
10,666
diffusers
src/diffusers/models/unets/unet_dreamlite.py
.py
# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates. # # 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...
2,042
82,050
diffusers
src/diffusers/models/unets/unet_3d_blocks.py
.py
# Copyright 2026 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...
1,420
51,462
diffusers
src/diffusers/models/unets/unet_2d.py
.py
# Copyright 2026 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...
354
16,819
diffusers
src/diffusers/models/unets/unet_2d_condition.py
.py
# Copyright 2026 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...
1,236
63,489
diffusers
src/diffusers/models/unets/unet_kandinsky3.py
.py
# Copyright 2026 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...
486
18,708
diffusers
src/diffusers/models/unets/unet_i2vgen_xl.py
.py
# Copyright 2025 Alibaba DAMO-VILAB 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 # # Unles...
653
29,797
diffusers
src/diffusers/models/unets/uvit_2d.py
.py
# 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...
421
15,291
diffusers
src/diffusers/models/unets/unet_1d.py
.py
# Copyright 2026 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...
266
11,331
diffusers
src/diffusers/models/unets/unet_2d_blocks.py
.py
# Copyright 2026 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...
3,584
141,380
diffusers
src/diffusers/models/unets/unet_stable_cascade.py
.py
# Copyright 2026 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...
606
28,374
diffusers
src/diffusers/models/unets/unet_3d_condition.py
.py
# Copyright 2025 Alibaba DAMO-VILAB and The HuggingFace Team. All rights reserved. # Copyright 2025 The ModelScope 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.apa...
674
31,366
diffusers
src/diffusers/models/unets/unet_spatio_temporal_condition.py
.py
from dataclasses import dataclass import torch import torch.nn as nn from ...configuration_utils import ConfigMixin, register_to_config from ...loaders import UNet2DConditionLoadersMixin from ...utils import BaseOutput, logging from ...utils.torch_utils import maybe_adjust_dtype_for_device from ..attention import Att...
449
20,518
diffusers
src/diffusers/models/unets/unet_motion_model.py
.py
# Copyright 2026 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...
2,113
96,351
diffusers
src/diffusers/models/unets/unet_1d_blocks.py
.py
# Copyright 2026 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...
702
26,684
diffusers
src/diffusers/models/condition_embedders/condition_embedder_anima.py
.py
# Copyright 2026 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...
347
14,613
diffusers
src/diffusers/models/condition_embedders/condition_embedder_minimax_music3.py
.py
# Copyright 2026 The MiniMax 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 ...
77
3,386
diffusers
src/diffusers/models/transformers/transformer_hunyuan_video_framepack.py
.py
# Copyright 2025 The Framepack Team, The Hunyuan 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/LIC...
443
20,652
diffusers
src/diffusers/models/transformers/transformer_wan_animate.py
.py
# Copyright 2025 The Wan 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 requ...
1,307
53,970
diffusers
src/diffusers/models/transformers/hunyuan_transformer_2d.py
.py
# Copyright 2025 HunyuanDiT Authors, Qixun Wang 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...
512
21,607
diffusers
src/diffusers/models/transformers/transformer_kandinsky.py
.py
# Copyright 2025 The Kandinsky 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 # # Unles...
669
24,676
diffusers
src/diffusers/models/transformers/transformer_chroma.py
.py
# Copyright 2025 Black Forest Labs, The HuggingFace Team and loadstone-rock . 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/LICEN...
635
26,928
diffusers
src/diffusers/models/transformers/transformer_2d.py
.py
# Copyright 2026 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...
552
28,250
diffusers
src/diffusers/models/transformers/transformer_cogview4.py
.py
# Copyright 2025 The CogView team, Tsinghua University & ZhipuAI 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/l...
797
35,841
diffusers
src/diffusers/models/transformers/transformer_cogview3plus.py
.py
# Copyright 2025 The CogView team, Tsinghua University & ZhipuAI 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/l...
309
13,051