text
stringlengths
5
631k
id
stringlengths
14
178
metadata
dict
__index_level_0__
int64
0
647
# 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/lora_conversion_utils.py/0
{ "file_path": "diffusers/src/diffusers/loaders/lora_conversion_utils.py", "repo_id": "diffusers", "token_count": 56583 }
160
# 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/attention.py/0
{ "file_path": "diffusers/src/diffusers/models/attention.py", "repo_id": "diffusers", "token_count": 33109 }
161
# Copyright 2025 The Qwen-Image Team, 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....
diffusers/src/diffusers/models/autoencoders/autoencoder_kl_qwenimage.py/0
{ "file_path": "diffusers/src/diffusers/models/autoencoders/autoencoder_kl_qwenimage.py", "repo_id": "diffusers", "token_count": 20051 }
162
# 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...
diffusers/src/diffusers/models/controlnets/controlnet_flux.py/0
{ "file_path": "diffusers/src/diffusers/models/controlnets/controlnet_flux.py", "repo_id": "diffusers", "token_count": 10519 }
163
# 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/models/modeling_flax_utils.py/0
{ "file_path": "diffusers/src/diffusers/models/modeling_flax_utils.py", "repo_id": "diffusers", "token_count": 11784 }
164
# 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/transformers/pixart_transformer_2d.py/0
{ "file_path": "diffusers/src/diffusers/models/transformers/pixart_transformer_2d.py", "repo_id": "diffusers", "token_count": 8739 }
165
# 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...
diffusers/src/diffusers/models/transformers/transformer_hunyuan_video_framepack.py/0
{ "file_path": "diffusers/src/diffusers/models/transformers/transformer_hunyuan_video_framepack.py", "repo_id": "diffusers", "token_count": 8440 }
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_blocks_flax.py/0
{ "file_path": "diffusers/src/diffusers/models/unets/unet_2d_blocks_flax.py", "repo_id": "diffusers", "token_count": 6971 }
167
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/modular_pipelines/flux/__init__.py/0
{ "file_path": "diffusers/src/diffusers/modular_pipelines/flux/__init__.py", "repo_id": "diffusers", "token_count": 868 }
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/modular_pipeline.py/0
{ "file_path": "diffusers/src/diffusers/modular_pipelines/stable_diffusion_xl/modular_pipeline.py", "repo_id": "diffusers", "token_count": 6005 }
169
# 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/amused/pipeline_amused_img2img.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/amused/pipeline_amused_img2img.py", "repo_id": "diffusers", "token_count": 7731 }
170
# Copyright 2025 AuraFlow Authors 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/aura_flow/pipeline_aura_flow.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/aura_flow/pipeline_aura_flow.py", "repo_id": "diffusers", "token_count": 14552 }
171
# 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/consistency_models/pipeline_consistency_models.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/consistency_models/pipeline_consistency_models.py", "repo_id": "diffusers", "token_count": 5314 }
172
from typing import TYPE_CHECKING from ...utils import ( DIFFUSERS_SLOW_IMPORT, OptionalDependencyNotAvailable, _LazyModule, get_objects_from_module, is_flax_available, is_torch_available, is_transformers_available, ) _dummy_objects = {} _import_structure = {} try: if not (is_transfor...
diffusers/src/diffusers/pipelines/controlnet_sd3/__init__.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/controlnet_sd3/__init__.py", "repo_id": "diffusers", "token_count": 741 }
173
from typing import TYPE_CHECKING from ...utils import ( DIFFUSERS_SLOW_IMPORT, _LazyModule, ) _import_structure = {"pipeline_ddpm": ["DDPMPipeline"]} if TYPE_CHECKING or DIFFUSERS_SLOW_IMPORT: from .pipeline_ddpm import DDPMPipeline else: import sys sys.modules[__name__] = _LazyModule( ...
diffusers/src/diffusers/pipelines/ddpm/__init__.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/ddpm/__init__.py", "repo_id": "diffusers", "token_count": 193 }
174
from dataclasses import dataclass from typing import Optional, Tuple import torch from torch import nn from transformers import RobertaPreTrainedModel, XLMRobertaConfig, XLMRobertaModel from transformers.utils import ModelOutput @dataclass class TransformationModelOutput(ModelOutput): """ Base class for text...
diffusers/src/diffusers/pipelines/deprecated/alt_diffusion/modeling_roberta_series.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/deprecated/alt_diffusion/modeling_roberta_series.py", "repo_id": "diffusers", "token_count": 2322 }
175
# Copyright 2022 The Music Spectrogram Diffusion Authors. # 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...
diffusers/src/diffusers/pipelines/deprecated/spectrogram_diffusion/continuous_encoder.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/deprecated/spectrogram_diffusion/continuous_encoder.py", "repo_id": "diffusers", "token_count": 1329 }
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/deprecated/versatile_diffusion/pipeline_versatile_diffusion_dual_guided.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/deprecated/versatile_diffusion/pipeline_versatile_diffusion_dual_guided.py", "repo_id": "diffusers", "token_count": 11633 }
177
from dataclasses import dataclass from typing import List, Optional, Union import numpy as np import PIL.Image from ...utils import BaseOutput @dataclass class LEditsPPDiffusionPipelineOutput(BaseOutput): """ Output class for LEdits++ Diffusion pipelines. Args: images (`List[PIL.Image.Image]` o...
diffusers/src/diffusers/pipelines/ledits_pp/pipeline_output.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/ledits_pp/pipeline_output.py", "repo_id": "diffusers", "token_count": 613 }
178
# Copyright 2025 The SkyReels-V2 Team, 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/LICEN...
diffusers/src/diffusers/pipelines/skyreels_v2/pipeline_skyreels_v2_diffusion_forcing.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/skyreels_v2/pipeline_skyreels_v2_diffusion_forcing.py", "repo_id": "diffusers", "token_count": 21569 }
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/stable_diffusion/pipeline_flax_stable_diffusion_img2img.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/stable_diffusion/pipeline_flax_stable_diffusion_img2img.py", "repo_id": "diffusers", "token_count": 9920 }
180
# 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/pipeline_stable_unclip_img2img.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/stable_diffusion/pipeline_stable_unclip_img2img.py", "repo_id": "diffusers", "token_count": 17506 }
181
from typing import TYPE_CHECKING from ...utils import ( DIFFUSERS_SLOW_IMPORT, OptionalDependencyNotAvailable, _LazyModule, get_objects_from_module, is_k_diffusion_available, is_k_diffusion_version, is_torch_available, is_transformers_available, ) _dummy_objects = {} _import_structure...
diffusers/src/diffusers/pipelines/stable_diffusion_k_diffusion/__init__.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/stable_diffusion_k_diffusion/__init__.py", "repo_id": "diffusers", "token_count": 812 }
182
# 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/transformers_loading_utils.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/transformers_loading_utils.py", "repo_id": "diffusers", "token_count": 2082 }
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/bitsandbytes/bnb_quantizer.py/0
{ "file_path": "diffusers/src/diffusers/quantizers/bitsandbytes/bnb_quantizer.py", "repo_id": "diffusers", "token_count": 11346 }
184
# Copyright 2025 Google Brain 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...
diffusers/src/diffusers/schedulers/deprecated/scheduling_sde_vp.py/0
{ "file_path": "diffusers/src/diffusers/schedulers/deprecated/scheduling_sde_vp.py", "repo_id": "diffusers", "token_count": 1693 }
185
# Copyright 2025 TSAIL 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 requir...
diffusers/src/diffusers/schedulers/scheduling_dpmsolver_multistep.py/0
{ "file_path": "diffusers/src/diffusers/schedulers/scheduling_dpmsolver_multistep.py", "repo_id": "diffusers", "token_count": 25871 }
186
# 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/schedulers/scheduling_utils_flax.py/0
{ "file_path": "diffusers/src/diffusers/schedulers/scheduling_utils_flax.py", "repo_id": "diffusers", "token_count": 4945 }
187
# This file is autogenerated by the command `make fix-copies`, do not edit. from ..utils import DummyObject, requires_backends class AudioDiffusionPipeline(metaclass=DummyObject): _backends = ["torch", "librosa"] def __init__(self, *args, **kwargs): requires_backends(self, ["torch", "librosa"]) ...
diffusers/src/diffusers/utils/dummy_torch_and_librosa_objects.py/0
{ "file_path": "diffusers/src/diffusers/utils/dummy_torch_and_librosa_objects.py", "repo_id": "diffusers", "token_count": 397 }
188
--- {{ card_data }} --- <!-- This model card has been generated automatically according to the information the training script had access to. You should probably proofread and complete it, then remove this comment. --> {{ model_description }} ## Intended uses & limitations #### How to use ```python # TODO: add an ...
diffusers/src/diffusers/utils/model_card_template.md/0
{ "file_path": "diffusers/src/diffusers/utils/model_card_template.md", "repo_id": "diffusers", "token_count": 138 }
189
# 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/lora/test_lora_layers_wan.py/0
{ "file_path": "diffusers/tests/lora/test_lora_layers_wan.py", "repo_id": "diffusers", "token_count": 1957 }
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_tiny.py/0
{ "file_path": "diffusers/tests/models/autoencoders/test_models_autoencoder_tiny.py", "repo_id": "diffusers", "token_count": 4073 }
191
# 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_allegro.py/0
{ "file_path": "diffusers/tests/models/transformers/test_models_transformer_allegro.py", "repo_id": "diffusers", "token_count": 1079 }
192
# 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_transformer_ltx.py/0
{ "file_path": "diffusers/tests/models/transformers/test_models_transformer_ltx.py", "repo_id": "diffusers", "token_count": 1224 }
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_3d_condition.py/0
{ "file_path": "diffusers/tests/models/unets/test_models_unet_3d_condition.py", "repo_id": "diffusers", "token_count": 2728 }
194
# 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/others/test_hub_utils.py/0
{ "file_path": "diffusers/tests/others/test_hub_utils.py", "repo_id": "diffusers", "token_count": 399 }
195
# 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/ddpm/test_ddpm.py/0
{ "file_path": "diffusers/tests/pipelines/ddpm/test_ddpm.py", "repo_id": "diffusers", "token_count": 1764 }
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/ip_adapters/test_ip_adapter_stable_diffusion.py/0
{ "file_path": "diffusers/tests/pipelines/ip_adapters/test_ip_adapter_stable_diffusion.py", "repo_id": "diffusers", "token_count": 15564 }
197
# coding=utf-8 # Copyright 2023 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/ledits_pp/test_ledits_pp_stable_diffusion_xl.py/0
{ "file_path": "diffusers/tests/pipelines/ledits_pp/test_ledits_pp_stable_diffusion_xl.py", "repo_id": "diffusers", "token_count": 5041 }
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/pag/test_pag_sd_inpaint.py/0
{ "file_path": "diffusers/tests/pipelines/pag/test_pag_sd_inpaint.py", "repo_id": "diffusers", "token_count": 6097 }
199
# 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/stable_diffusion_2/test_stable_diffusion_flax.py/0
{ "file_path": "diffusers/tests/pipelines/stable_diffusion_2/test_stable_diffusion_flax.py", "repo_id": "diffusers", "token_count": 1668 }
200
# 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/stable_diffusion_xl/test_stable_diffusion_xl_adapter.py/0
{ "file_path": "diffusers/tests/pipelines/stable_diffusion_xl/test_stable_diffusion_xl_adapter.py", "repo_id": "diffusers", "token_count": 12835 }
201
import gc import unittest import numpy as np import torch import torch.nn as nn from diffusers import ( AuraFlowPipeline, AuraFlowTransformer2DModel, DiffusionPipeline, FluxControlPipeline, FluxPipeline, FluxTransformer2DModel, GGUFQuantizationConfig, HiDreamImageTransformer2DModel, ...
diffusers/tests/quantization/gguf/test_gguf.py/0
{ "file_path": "diffusers/tests/quantization/gguf/test_gguf.py", "repo_id": "diffusers", "token_count": 14853 }
202
# 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/single_file/test_model_flux_transformer_single_file.py/0
{ "file_path": "diffusers/tests/single_file/test_model_flux_transformer_single_file.py", "repo_id": "diffusers", "token_count": 959 }
203
import gc import unittest import torch from diffusers import ( DDIMScheduler, StableDiffusionXLImg2ImgPipeline, ) from diffusers.utils import load_image from diffusers.utils.testing_utils import ( backend_empty_cache, enable_full_determinism, numpy_cosine_similarity_distance, require_torch_acc...
diffusers/tests/single_file/test_stable_diffusion_xl_img2img_single_file.py/0
{ "file_path": "diffusers/tests/single_file/test_stable_diffusion_xl_img2img_single_file.py", "repo_id": "diffusers", "token_count": 1770 }
204
- sections: - local: index title: LeRobot - local: installation title: Installation title: Get started - sections: - local: il_robots title: Imitation Learning for Robots - local: il_sim title: Imitation Learning in Sim - local: cameras title: Cameras - local: integrate_hardware ti...
lerobot/docs/source/_toctree.yml/0
{ "file_path": "lerobot/docs/source/_toctree.yml", "repo_id": "lerobot", "token_count": 383 }
205
import time from lerobot.robots.lekiwi import LeKiwiClient, LeKiwiClientConfig from lerobot.teleoperators.keyboard.teleop_keyboard import KeyboardTeleop, KeyboardTeleopConfig from lerobot.teleoperators.so100_leader import SO100Leader, SO100LeaderConfig from lerobot.utils.robot_utils import busy_wait from lerobot.utils...
lerobot/examples/lekiwi/teleoperate.py/0
{ "file_path": "lerobot/examples/lekiwi/teleoperate.py", "repo_id": "lerobot", "token_count": 634 }
206
#!/usr/bin/env python # Copyright 2024 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 # # ...
lerobot/src/lerobot/__init__.py/0
{ "file_path": "lerobot/src/lerobot/__init__.py", "repo_id": "lerobot", "token_count": 3211 }
207
# Copyright 2024 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...
lerobot/src/lerobot/configs/policies.py/0
{ "file_path": "lerobot/src/lerobot/configs/policies.py", "repo_id": "lerobot", "token_count": 3141 }
208
#!/usr/bin/env python # Copyright 2024 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 # # ...
lerobot/src/lerobot/datasets/v2/convert_dataset_v1_to_v2.py/0
{ "file_path": "lerobot/src/lerobot/datasets/v2/convert_dataset_v1_to_v2.py", "repo_id": "lerobot", "token_count": 10869 }
209
#!/usr/bin/env python # Copyright 2024 Columbia Artificial Intelligence, Robotics Lab, # and 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 #...
lerobot/src/lerobot/policies/diffusion/configuration_diffusion.py/0
{ "file_path": "lerobot/src/lerobot/policies/diffusion/configuration_diffusion.py", "repo_id": "lerobot", "token_count": 4577 }
210
#!/usr/bin/env python # Copyright 2024 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 # ...
lerobot/src/lerobot/policies/sac/modeling_sac.py/0
{ "file_path": "lerobot/src/lerobot/policies/sac/modeling_sac.py", "repo_id": "lerobot", "token_count": 19182 }
211
#!/usr/bin/env python # 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 # # ...
lerobot/src/lerobot/processor/device_processor.py/0
{ "file_path": "lerobot/src/lerobot/processor/device_processor.py", "repo_id": "lerobot", "token_count": 1172 }
212
#!/usr/bin/env python # 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 # # ...
lerobot/src/lerobot/robots/hope_jr/hope_jr_hand.py/0
{ "file_path": "lerobot/src/lerobot/robots/hope_jr/hope_jr_hand.py", "repo_id": "lerobot", "token_count": 3306 }
213
# !/usr/bin/env python # 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 # #...
lerobot/src/lerobot/robots/so100_follower/so100_follower_end_effector.py/0
{ "file_path": "lerobot/src/lerobot/robots/so100_follower/so100_follower_end_effector.py", "repo_id": "lerobot", "token_count": 3520 }
214
#!/usr/bin/env python # 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 # # ...
lerobot/src/lerobot/scripts/find_joint_limits.py/0
{ "file_path": "lerobot/src/lerobot/scripts/find_joint_limits.py", "repo_id": "lerobot", "token_count": 1529 }
215
# Copyright 2024 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...
lerobot/src/lerobot/setup_motors.py/0
{ "file_path": "lerobot/src/lerobot/setup_motors.py", "repo_id": "lerobot", "token_count": 773 }
216
# Copyright 2024 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...
lerobot/src/lerobot/teleoperators/utils.py/0
{ "file_path": "lerobot/src/lerobot/teleoperators/utils.py", "repo_id": "lerobot", "token_count": 832 }
217
#!/usr/bin/env python # Copyright 2024 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 # # ...
lerobot/src/lerobot/utils/import_utils.py/0
{ "file_path": "lerobot/src/lerobot/utils/import_utils.py", "repo_id": "lerobot", "token_count": 1132 }
218
# 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...
lerobot/tests/async_inference/test_robot_client.py/0
{ "file_path": "lerobot/tests/async_inference/test_robot_client.py", "repo_id": "lerobot", "token_count": 3039 }
219
# Copyright 2024 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...
lerobot/tests/fixtures/constants.py/0
{ "file_path": "lerobot/tests/fixtures/constants.py", "repo_id": "lerobot", "token_count": 637 }
220
# !/usr/bin/env python # 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 # #...
lerobot/tests/policies/hilserl/test_modeling_classifier.py/0
{ "file_path": "lerobot/tests/policies/hilserl/test_modeling_classifier.py", "repo_id": "lerobot", "token_count": 1766 }
221
#!/usr/bin/env python # Copyright 2024 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 # # ...
lerobot/tests/utils.py/0
{ "file_path": "lerobot/tests/utils.py", "repo_id": "lerobot", "token_count": 2376 }
222
import argparse import asyncio import hashlib import json import os import random from asyncio import Lock from typing import Set from datasets import load_dataset from tqdm.asyncio import tqdm import aiofiles import aiohttp import uvloop file_lock = Lock() async def generate_completion(session, prompt, args): ...
open-r1/scripts/generate_reasoning.py/0
{ "file_path": "open-r1/scripts/generate_reasoning.py", "repo_id": "open-r1", "token_count": 2800 }
223
#!/bin/bash #SBATCH --partition=hopper-cpu #SBATCH --mem=16g #SBATCH --cpus-per-task=16 #SBATCH --output=/fsx/open-r1/logs/morph_router/%x-%j.out #SBATCH --err=/fsx/open-r1/logs/morph_router/%x-%j.err #SBATCH --requeue #SBATCH --time=7-00:00:00 echo "Starting job" set -x -e source ~/.bashrc source openr1/bin/activa...
open-r1/slurm/morph_router.slurm/0
{ "file_path": "open-r1/slurm/morph_router.slurm", "repo_id": "open-r1", "token_count": 175 }
224
from .cf_scoring import score_submission from .code_patcher import patch_code from .ioi_scoring import SubtaskResult, score_subtask, score_subtasks from .ioi_utils import add_includes from .morph_client import get_morph_client_from_env from .piston_client import get_piston_client_from_env, get_slurm_piston_endpoints ...
open-r1/src/open_r1/utils/competitive_programming/__init__.py/0
{ "file_path": "open-r1/src/open_r1/utils/competitive_programming/__init__.py", "repo_id": "open-r1", "token_count": 216 }
225
<!--⚠️ Note that this file is in Markdown but contain specific syntax for our doc-builder (similar to MDX) that may not be rendered properly in your Markdown viewer. --> # DeepSpeed [DeepSpeed](https://www.deepspeed.ai/) is a library designed for speed and scale for distributed training of large models with billions ...
peft/docs/source/accelerate/deepspeed.md/0
{ "file_path": "peft/docs/source/accelerate/deepspeed.md", "repo_id": "peft", "token_count": 7520 }
226
<!--Copyright 2023 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...
peft/docs/source/index.md/0
{ "file_path": "peft/docs/source/index.md", "repo_id": "peft", "token_count": 1162 }
227
<jupyter_start><jupyter_text>CPT Training and InferenceThis notebook demonstrates the training and evaluation process of Context-Aware Prompt Tuning (CPT) using the Hugging Face Trainer. For more details, refer to the [Paper](https://huggingface.co/papers/2410.17222). Sections Overview:1. **Setup**: Import libraries an...
peft/examples/cpt_finetuning/cpt_train_and_inference.ipynb/0
{ "file_path": "peft/examples/cpt_finetuning/cpt_train_and_inference.ipynb", "repo_id": "peft", "token_count": 6573 }
228
import argparse import gc import json import logging import math import os from dataclasses import dataclass from datetime import datetime from pathlib import Path from random import randint from typing import Any, Union # datasets imports import datasets # metric imports import evaluate import numpy as np import tor...
peft/examples/int8_training/peft_adalora_whisper_large_training.py/0
{ "file_path": "peft/examples/int8_training/peft_adalora_whisper_large_training.py", "repo_id": "peft", "token_count": 14189 }
229
# MiSS: Balancing LoRA Performance and Efficiency with Simple Shard Sharing ## Introduction ([Paper](https://huggingface.co/papers/2409.15371), [code](https://github.com/JL-er/MiSS)) MiSS (Matrix Shard Sharing) is a novel PEFT method that adopts a low-rank structure, requires only a single trainable matrix, and introdu...
peft/examples/miss_finetuning/README.md/0
{ "file_path": "peft/examples/miss_finetuning/README.md", "repo_id": "peft", "token_count": 1236 }
230
#!/usr/bin/env python3 """ Training script for fine-tuning language models with QALoRA using GPTQ quantization. This script supports cached quantization to avoid repeating expensive quantization processes. """ import argparse import os import torch from datasets import load_dataset from transformers import ( Auto...
peft/examples/qalora_finetuning/qalora_gptq_finetuning.py/0
{ "file_path": "peft/examples/qalora_finetuning/qalora_gptq_finetuning.py", "repo_id": "peft", "token_count": 5177 }
231
<jupyter_start><jupyter_text>Using VB-LoRA for sequence classification In this example, we fine-tune Roberta on a sequence classification task using VB-LoRA.This notebook is adapted from `examples/sequence_classification/VeRA.ipynb`. Imports<jupyter_code>import torch from torch.optim import AdamW from torch.utils.data...
peft/examples/sequence_classification/VBLoRA.ipynb/0
{ "file_path": "peft/examples/sequence_classification/VBLoRA.ipynb", "repo_id": "peft", "token_count": 2895 }
232
accelerate launch --config_file "configs/fsdp_config.yaml" train.py \ --seed 100 \ --model_name_or_path "hugging-quants/Meta-Llama-3.1-8B-Instruct-GPTQ-INT4" \ --dataset_name "smangrul/ultrachat-10k-chatml" \ --chat_template_format "chatml" \ --add_special_tokens False \ --append_concat_token False \ --splits "train,t...
peft/examples/sft/run_peft_fsdp_gptq.sh/0
{ "file_path": "peft/examples/sft/run_peft_fsdp_gptq.sh", "repo_id": "peft", "token_count": 469 }
233
from mistralrs import ChatCompletionRequest, Runner, Which runner = Runner( which=Which.XLora( tok_model_id=None, # Automatically determine from ordering file model_id=..., # Model ID of the base model (local path of HF model ID) xlora_model_id=..., # X-LoRA Model ID of the base model (...
peft/examples/xlora/xlora_inference_mistralrs.py/0
{ "file_path": "peft/examples/xlora/xlora_inference_mistralrs.py", "repo_id": "peft", "token_count": 356 }
234
{ "auto_mapping": null, "base_model_name_or_path": null, "inference_mode": false, "num_attention_heads": 24, "num_layers": 28, "num_transformer_submodules": 1, "num_virtual_tokens": 200, "peft_type": "PROMPT_TUNING", "prompt_tuning_init": "RANDOM", "prompt_tuning_init_text": null, "revision": null...
peft/method_comparison/MetaMathQA/experiments/prompt_tuning/llama-3.2-3B-default/adapter_config.json/0
{ "file_path": "peft/method_comparison/MetaMathQA/experiments/prompt_tuning/llama-3.2-3B-default/adapter_config.json", "repo_id": "peft", "token_count": 190 }
235
--- title: PEFT Method Comparison sdk: gradio app_file: app.py pinned: false emoji: ⚖️ --- # Comparison of PEFT Methods The goal of this project is to provide replicable experiments that produce outcomes allowing us to compare different PEFT methods with one another. This gives you more information to make an informe...
peft/method_comparison/README.md/0
{ "file_path": "peft/method_comparison/README.md", "repo_id": "peft", "token_count": 2232 }
236
# Copyright 2023-present 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 law or...
peft/src/peft/mapping.py/0
{ "file_path": "peft/src/peft/mapping.py", "repo_id": "peft", "token_count": 1345 }
237
# Copyright 2023-present 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 law or...
peft/src/peft/tuners/lora/tp_layer.py/0
{ "file_path": "peft/src/peft/tuners/lora/tp_layer.py", "repo_id": "peft", "token_count": 6508 }
238
# Copyright 2023-present 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 law or...
peft/src/peft/tuners/oft/config.py/0
{ "file_path": "peft/src/peft/tuners/oft/config.py", "repo_id": "peft", "token_count": 3754 }
239
# Copyright 2023-present 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 law or...
peft/src/peft/tuners/prefix_tuning/config.py/0
{ "file_path": "peft/src/peft/tuners/prefix_tuning/config.py", "repo_id": "peft", "token_count": 463 }
240
# Copyright 2025-present 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 law or...
peft/src/peft/tuners/shira/config.py/0
{ "file_path": "peft/src/peft/tuners/shira/config.py", "repo_id": "peft", "token_count": 2491 }
241
# Copyright 2023-present 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 law or...
peft/src/peft/tuners/vera/layer.py/0
{ "file_path": "peft/src/peft/tuners/vera/layer.py", "repo_id": "peft", "token_count": 5541 }
242
# Copyright 2023-present 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 law or...
peft/src/peft/utils/save_and_load.py/0
{ "file_path": "peft/src/peft/utils/save_and_load.py", "repo_id": "peft", "token_count": 15268 }
243
# Copyright 2023-present 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 law or...
peft/tests/test_encoder_decoder_models.py/0
{ "file_path": "peft/tests/test_encoder_decoder_models.py", "repo_id": "peft", "token_count": 7431 }
244
# Copyright 2023-present 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 law or...
peft/tests/test_multitask_prompt_tuning.py/0
{ "file_path": "peft/tests/test_multitask_prompt_tuning.py", "repo_id": "peft", "token_count": 5520 }
245
# Copyright 2023-present 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 law or...
peft/tests/testing_utils.py/0
{ "file_path": "peft/tests/testing_utils.py", "repo_id": "peft", "token_count": 3986 }
246
#!/usr/bin/env python3 """ Model Benchmark Script An inference and train step benchmark script for timm models. Hacked together by Ross Wightman (https://github.com/rwightman) """ import argparse import csv import json import logging import time from collections import OrderedDict from contextlib import suppress from...
pytorch-image-models/benchmark.py/0
{ "file_path": "pytorch-image-models/benchmark.py", "repo_id": "pytorch-image-models", "token_count": 13297 }
247
# Big Transfer (BiT) **Big Transfer (BiT)** is a type of pretraining recipe that pre-trains on a large supervised source dataset, and fine-tunes the weights on the target task. Models are trained on the JFT-300M dataset. The finetuned models contained in this collection are finetuned on ImageNet. ## How do I use thi...
pytorch-image-models/hfdocs/source/models/big-transfer.mdx/0
{ "file_path": "pytorch-image-models/hfdocs/source/models/big-transfer.mdx", "repo_id": "pytorch-image-models", "token_count": 4104 }
248
# Noisy Student (EfficientNet) **Noisy Student Training** is a semi-supervised learning approach. It extends the idea of self-training and distillation with the use of equal-or-larger student models and noise added to the student during learning. It has three main steps: 1. train a teacher model on labeled images 2....
pytorch-image-models/hfdocs/source/models/noisy-student.mdx/0
{ "file_path": "pytorch-image-models/hfdocs/source/models/noisy-student.mdx", "repo_id": "pytorch-image-models", "token_count": 6686 }
249
# SPNASNet **Single-Path NAS** is a novel differentiable NAS method for designing hardware-efficient ConvNets in less than 4 hours. ## How do I use this model on an image? To load a pretrained model: ```py >>> import timm >>> model = timm.create_model('spnasnet_100', pretrained=True) >>> model.eval() ``` To load a...
pytorch-image-models/hfdocs/source/models/spnasnet.mdx/0
{ "file_path": "pytorch-image-models/hfdocs/source/models/spnasnet.mdx", "repo_id": "pytorch-image-models", "token_count": 1511 }
250
# Optimization This page contains the API reference documentation for learning rate optimizers included in `timm`. ## Optimizers ### Factory functions [[autodoc]] timm.optim.create_optimizer_v2 [[autodoc]] timm.optim.list_optimizers [[autodoc]] timm.optim.get_optimizer_class ### Optimizer Classes [[autodoc]] timm...
pytorch-image-models/hfdocs/source/reference/optimizers.mdx/0
{ "file_path": "pytorch-image-models/hfdocs/source/reference/optimizers.mdx", "repo_id": "pytorch-image-models", "token_count": 425 }
251
""" Random Erasing (Cutout) Originally inspired by impl at https://github.com/zhunzhong07/Random-Erasing, Apache 2.0 Copyright Zhun Zhong & Liang Zheng Hacked together by / Copyright 2019, Ross Wightman """ import random import math import torch def _get_pixels(per_pixel, rand_color, patch_size, dtype=torch.float3...
pytorch-image-models/timm/data/random_erasing.py/0
{ "file_path": "pytorch-image-models/timm/data/random_erasing.py", "repo_id": "pytorch-image-models", "token_count": 2258 }
252
import math import numbers import random import warnings from typing import List, Sequence, Tuple, Union import torch import torchvision.transforms as transforms import torchvision.transforms.functional as F try: from torchvision.transforms.functional import InterpolationMode has_interpolation_mode = True exce...
pytorch-image-models/timm/data/transforms.py/0
{ "file_path": "pytorch-image-models/timm/data/transforms.py", "repo_id": "pytorch-image-models", "token_count": 9216 }
253
""" Model / Layer Config singleton state """ import os import warnings from typing import Any, Optional import torch __all__ = [ 'is_exportable', 'is_scriptable', 'is_no_jit', 'use_fused_attn', 'set_exportable', 'set_scriptable', 'set_no_jit', 'set_layer_config', 'set_fused_attn', 'set_reentrant_ckpt', 'u...
pytorch-image-models/timm/layers/config.py/0
{ "file_path": "pytorch-image-models/timm/layers/config.py", "repo_id": "pytorch-image-models", "token_count": 1974 }
254
from typing import Tuple import torch def ndgrid(*tensors) -> Tuple[torch.Tensor, ...]: """generate N-D grid in dimension order. The ndgrid function is like meshgrid except that the order of the first two input arguments are switched. That is, the statement [X1,X2,X3] = ndgrid(x1,x2,x3) produc...
pytorch-image-models/timm/layers/grid.py/0
{ "file_path": "pytorch-image-models/timm/layers/grid.py", "repo_id": "pytorch-image-models", "token_count": 565 }
255
""" Normalization + Activation Layers Provides Norm+Act fns for standard PyTorch norm layers such as * BatchNorm * GroupNorm * LayerNorm This allows swapping with alternative layers that are natively both norm + act such as * EvoNorm (evo_norm.py) * FilterResponseNorm (filter_response_norm.py) * InplaceABN (inplace_a...
pytorch-image-models/timm/layers/norm_act.py/0
{ "file_path": "pytorch-image-models/timm/layers/norm_act.py", "repo_id": "pytorch-image-models", "token_count": 11966 }
256
""" Test Time Pooling (Average-Max Pool) Hacked together by / Copyright 2020 Ross Wightman """ import logging from torch import nn import torch.nn.functional as F from .adaptive_avgmax_pool import adaptive_avgmax_pool2d _logger = logging.getLogger(__name__) class TestTimePoolHead(nn.Module): def __init__(sel...
pytorch-image-models/timm/layers/test_time_pool.py/0
{ "file_path": "pytorch-image-models/timm/layers/test_time_pool.py", "repo_id": "pytorch-image-models", "token_count": 881 }
257
""" Model creation / weight loading / state_dict helpers Hacked together by / Copyright 2020 Ross Wightman """ import logging import os from typing import Any, Callable, Dict, Optional, Union import torch try: import safetensors.torch _has_safetensors = True except ImportError: _has_safetensors = False ...
pytorch-image-models/timm/models/_helpers.py/0
{ "file_path": "pytorch-image-models/timm/models/_helpers.py", "repo_id": "pytorch-image-models", "token_count": 3370 }
258
""" ConViT Model @article{d2021convit, title={ConViT: Improving Vision Transformers with Soft Convolutional Inductive Biases}, author={d'Ascoli, St{\'e}phane and Touvron, Hugo and Leavitt, Matthew and Morcos, Ari and Biroli, Giulio and Sagun, Levent}, journal={arXiv preprint arXiv:2103.10697}, year={2021} } P...
pytorch-image-models/timm/models/convit.py/0
{ "file_path": "pytorch-image-models/timm/models/convit.py", "repo_id": "pytorch-image-models", "token_count": 7721 }
259