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/pipelines/controlnet/pipeline_controlnet_sd_xl.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/controlnet/pipeline_controlnet_sd_xl.py",
"repo_id": "diffusers",
"token_count": 37208
} | 165 |
# 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/latent_diffusion_uncond/pipeline_latent_diffusion_uncond.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/deprecated/latent_diffusion_uncond/pipeline_latent_diffusion_uncond.py",
"repo_id": "diffusers",
"token_count": 2148
} | 166 |
# 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/pipelines/easyanimate/pipeline_easyanimate.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/easyanimate/pipeline_easyanimate.py",
"repo_id": "diffusers",
"token_count": 15875
} | 167 |
# Copyright 2025 HunyuanDiT 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
#
# Unles... | diffusers/src/diffusers/pipelines/hunyuandit/pipeline_hunyuandit.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/hunyuandit/pipeline_hunyuandit.py",
"repo_id": "diffusers",
"token_count": 19406
} | 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/pipelines/kandinsky2_2/pipeline_kandinsky2_2_inpainting.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_inpainting.py",
"repo_id": "diffusers",
"token_count": 11160
} | 169 |
# Copyright 2025 OmniGen 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... | diffusers/src/diffusers/pipelines/omnigen/processor_omnigen.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/omnigen/processor_omnigen.py",
"repo_id": "diffusers",
"token_count": 6675
} | 170 |
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": ["QwenImag... | diffusers/src/diffusers/pipelines/qwenimage/__init__.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/qwenimage/__init__.py",
"repo_id": "diffusers",
"token_count": 874
} | 171 |
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/pipelines/shap_e/__init__.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/shap_e/__init__.py",
"repo_id": "diffusers",
"token_count": 939
} | 172 |
# 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_cascade/pipeline_stable_cascade.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/stable_cascade/pipeline_stable_cascade.py",
"repo_id": "diffusers",
"token_count": 11856
} | 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/stable_diffusion/pipeline_stable_diffusion_depth2img.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_depth2img.py",
"repo_id": "diffusers",
"token_count": 19606
} | 174 |
# Copyright 2025 Stability AI 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/pipelines/stable_diffusion_3/pipeline_stable_diffusion_3_inpaint.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/stable_diffusion_3/pipeline_stable_diffusion_3_inpaint.py",
"repo_id": "diffusers",
"token_count": 31196
} | 175 |
from dataclasses import dataclass
from typing import List, Optional, Union
import numpy as np
import PIL.Image
from ...utils import (
BaseOutput,
)
@dataclass
class StableDiffusionSafePipelineOutput(BaseOutput):
"""
Output class for Safe Stable Diffusion pipelines.
Args:
images (`List[PIL.I... | diffusers/src/diffusers/pipelines/stable_diffusion_safe/pipeline_output.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/stable_diffusion_safe/pipeline_output.py",
"repo_id": "diffusers",
"token_count": 527
} | 176 |
import inspect
from dataclasses import dataclass
from typing import Callable, List, Optional, Union
import numpy as np
import PIL.Image
import torch
from transformers import (
CLIPImageProcessor,
CLIPTextModel,
CLIPTokenizer,
CLIPVisionModelWithProjection,
GPT2Tokenizer,
)
from ...image_processor ... | diffusers/src/diffusers/pipelines/unidiffuser/pipeline_unidiffuser.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/unidiffuser/pipeline_unidiffuser.py",
"repo_id": "diffusers",
"token_count": 31194
} | 177 |
# 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/wuerstchen/pipeline_wuerstchen.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/wuerstchen/pipeline_wuerstchen.py",
"repo_id": "diffusers",
"token_count": 9354
} | 178 |
from typing import TYPE_CHECKING, Any, Dict, List, Union
from diffusers.utils.import_utils import is_optimum_quanto_version
from ...utils import (
get_module_from_name,
is_accelerate_available,
is_accelerate_version,
is_optimum_quanto_available,
is_torch_available,
logging,
)
from ..base impor... | diffusers/src/diffusers/quantizers/quanto/quanto_quantizer.py/0 | {
"file_path": "diffusers/src/diffusers/quantizers/quanto/quanto_quantizer.py",
"repo_id": "diffusers",
"token_count": 2803
} | 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/schedulers/scheduling_ddim_inverse.py/0 | {
"file_path": "diffusers/src/diffusers/schedulers/scheduling_ddim_inverse.py",
"repo_id": "diffusers",
"token_count": 7304
} | 180 |
# Copyright 2025 Shuchen Xue, etc. in University of Chinese Academy of Sciences 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
#
# htt... | diffusers/src/diffusers/schedulers/scheduling_sasolver.py/0 | {
"file_path": "diffusers/src/diffusers/schedulers/scheduling_sasolver.py",
"repo_id": "diffusers",
"token_count": 26434
} | 181 |
# This file is autogenerated by the command `make fix-copies`, do not edit.
from ..utils import DummyObject, requires_backends
class BitsAndBytesConfig(metaclass=DummyObject):
_backends = ["bitsandbytes"]
def __init__(self, *args, **kwargs):
requires_backends(self, ["bitsandbytes"])
@classmethod... | diffusers/src/diffusers/utils/dummy_bitsandbytes_objects.py/0 | {
"file_path": "diffusers/src/diffusers/utils/dummy_bitsandbytes_objects.py",
"repo_id": "diffusers",
"token_count": 201
} | 182 |
# This file is autogenerated by the command `make fix-copies`, do not edit.
from ..utils import DummyObject, requires_backends
class TorchAoConfig(metaclass=DummyObject):
_backends = ["torchao"]
def __init__(self, *args, **kwargs):
requires_backends(self, ["torchao"])
@classmethod
def from_c... | diffusers/src/diffusers/utils/dummy_torchao_objects.py/0 | {
"file_path": "diffusers/src/diffusers/utils/dummy_torchao_objects.py",
"repo_id": "diffusers",
"token_count": 201
} | 183 |
# 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/utils/torch_utils.py/0 | {
"file_path": "diffusers/src/diffusers/utils/torch_utils.py",
"repo_id": "diffusers",
"token_count": 2982
} | 184 |
# 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_ltx_video.py/0 | {
"file_path": "diffusers/tests/lora/test_lora_layers_ltx_video.py",
"repo_id": "diffusers",
"token_count": 2180
} | 185 |
# 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_hunyuan_video.py/0 | {
"file_path": "diffusers/tests/models/autoencoders/test_models_autoencoder_hunyuan_video.py",
"repo_id": "diffusers",
"token_count": 3393
} | 186 |
# 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/test_layers_utils.py/0 | {
"file_path": "diffusers/tests/models/test_layers_utils.py",
"repo_id": "diffusers",
"token_count": 10834
} | 187 |
# 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_cosmos.py/0 | {
"file_path": "diffusers/tests/models/transformers/test_models_transformer_cosmos.py",
"repo_id": "diffusers",
"token_count": 2346
} | 188 |
# Copyright 2024 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_skyreels_v2.py/0 | {
"file_path": "diffusers/tests/models/transformers/test_models_transformer_skyreels_v2.py",
"repo_id": "diffusers",
"token_count": 1132
} | 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/modular_pipelines/stable_diffusion_xl/test_modular_pipeline_stable_diffusion_xl.py/0 | {
"file_path": "diffusers/tests/modular_pipelines/stable_diffusion_xl/test_modular_pipeline_stable_diffusion_xl.py",
"repo_id": "diffusers",
"token_count": 8154
} | 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/pipelines/controlnet/test_controlnet_img2img.py/0 | {
"file_path": "diffusers/tests/pipelines/controlnet/test_controlnet_img2img.py",
"repo_id": "diffusers",
"token_count": 7949
} | 191 |
# Copyright 2025 The HuggingFace 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 agreed to in... | diffusers/tests/pipelines/cosmos/cosmos_guardrail.py/0 | {
"file_path": "diffusers/tests/pipelines/cosmos/cosmos_guardrail.py",
"repo_id": "diffusers",
"token_count": 461
} | 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/pipelines/hidream_image/test_pipeline_hidream.py/0 | {
"file_path": "diffusers/tests/pipelines/hidream_image/test_pipeline_hidream.py",
"repo_id": "diffusers",
"token_count": 2632
} | 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/pipelines/kandinsky2_2/test_kandinsky.py/0 | {
"file_path": "diffusers/tests/pipelines/kandinsky2_2/test_kandinsky.py",
"repo_id": "diffusers",
"token_count": 4112
} | 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/pipelines/pag/test_pag_hunyuan_dit.py/0 | {
"file_path": "diffusers/tests/pipelines/pag/test_pag_hunyuan_dit.py",
"repo_id": "diffusers",
"token_count": 6511
} | 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/pixart_sigma/test_pixart.py/0 | {
"file_path": "diffusers/tests/pipelines/pixart_sigma/test_pixart.py",
"repo_id": "diffusers",
"token_count": 6930
} | 196 |
# coding=utf-8
# Copyright 2022 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/test_onnx_stable_diffusion_upscale.py/0 | {
"file_path": "diffusers/tests/pipelines/stable_diffusion/test_onnx_stable_diffusion_upscale.py",
"repo_id": "diffusers",
"token_count": 3971
} | 197 |
import gc
import random
import unittest
import numpy as np
import torch
from transformers import AutoTokenizer, CLIPTextConfig, CLIPTextModelWithProjection, CLIPTokenizer, T5EncoderModel
from diffusers import (
AutoencoderKL,
FlowMatchEulerDiscreteScheduler,
SD3Transformer2DModel,
StableDiffusion3Img2... | diffusers/tests/pipelines/stable_diffusion_3/test_pipeline_stable_diffusion_3_img2img.py/0 | {
"file_path": "diffusers/tests/pipelines/stable_diffusion_3/test_pipeline_stable_diffusion_3_img2img.py",
"repo_id": "diffusers",
"token_count": 3870
} | 198 |
import gc
import random
import tempfile
import unittest
import numpy as np
import torch
from transformers import (
CLIPImageProcessor,
CLIPVisionConfig,
CLIPVisionModelWithProjection,
)
import diffusers
from diffusers import (
AutoencoderKLTemporalDecoder,
EulerDiscreteScheduler,
StableVideoDi... | diffusers/tests/pipelines/stable_video_diffusion/test_stable_video_diffusion.py/0 | {
"file_path": "diffusers/tests/pipelines/stable_video_diffusion/test_stable_video_diffusion.py",
"repo_id": "diffusers",
"token_count": 9636
} | 199 |
# Copyright 2025 The HuggingFace 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 agreed to in... | diffusers/tests/pipelines/wan/test_wan_vace.py/0 | {
"file_path": "diffusers/tests/pipelines/wan/test_wan_vace.py",
"repo_id": "diffusers",
"token_count": 3480
} | 200 |
from diffusers.utils import is_torch_available
from diffusers.utils.testing_utils import (
backend_empty_cache,
backend_max_memory_allocated,
backend_reset_peak_memory_stats,
torch_device,
)
if is_torch_available():
import torch
import torch.nn as nn
class LoRALayer(nn.Module):
""... | diffusers/tests/quantization/utils.py/0 | {
"file_path": "diffusers/tests/quantization/utils.py",
"repo_id": "diffusers",
"token_count": 725
} | 201 |
import gc
import tempfile
import unittest
import torch
from diffusers import ControlNetModel, StableDiffusionControlNetInpaintPipeline
from diffusers.loaders.single_file_utils import _extract_repo_id_and_weights_name
from diffusers.utils import load_image
from diffusers.utils.testing_utils import (
backend_empty_... | diffusers/tests/single_file/test_stable_diffusion_controlnet_inpaint_single_file.py/0 | {
"file_path": "diffusers/tests/single_file/test_stable_diffusion_controlnet_inpaint_single_file.py",
"repo_id": "diffusers",
"token_count": 3691
} | 202 |
# 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/utils/check_repo.py/0 | {
"file_path": "diffusers/utils/check_repo.py",
"repo_id": "diffusers",
"token_count": 12370
} | 203 |
# Copyright 2025 The HuggingFace Team, the AllenNLP library 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
#
... | diffusers/utils/stale.py/0 | {
"file_path": "diffusers/utils/stale.py",
"repo_id": "diffusers",
"token_count": 1008
} | 204 |
<p align="center">
<img alt="LeRobot, Hugging Face Robotics Library" src="https://raw.githubusercontent.com/huggingface/lerobot/main/media/lerobot-logo-thumbnail.png" width="100%">
<br/>
<br/>
</p>
<div align="center">
[;
# 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/examples/1_load_lerobot_dataset.py/0 | {
"file_path": "lerobot/examples/1_load_lerobot_dataset.py",
"repo_id": "lerobot",
"token_count": 2021
} | 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/cameras/opencv/configuration_opencv.py/0 | {
"file_path": "lerobot/src/lerobot/cameras/opencv/configuration_opencv.py",
"repo_id": "lerobot",
"token_count": 1100
} | 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/image_writer.py/0 | {
"file_path": "lerobot/src/lerobot/datasets/image_writer.py",
"repo_id": "lerobot",
"token_count": 2712
} | 209 |
#!/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/envs/factory.py/0 | {
"file_path": "lerobot/src/lerobot/envs/factory.py",
"repo_id": "lerobot",
"token_count": 946
} | 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/optim/factory.py/0 | {
"file_path": "lerobot/src/lerobot/optim/factory.py",
"repo_id": "lerobot",
"token_count": 512
} | 211 |
# 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/policies/pi0/conversion_scripts/convert_pi0_to_hf_lerobot.py/0 | {
"file_path": "lerobot/src/lerobot/policies/pi0/conversion_scripts/convert_pi0_to_hf_lerobot.py",
"repo_id": "lerobot",
"token_count": 9448
} | 212 |
#!/usr/bin/env python
# Copyright 2024 Nicklas Hansen, Xiaolong Wang, Hao Su,
# 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
#
# ht... | lerobot/src/lerobot/policies/tdmpc/configuration_tdmpc.py/0 | {
"file_path": "lerobot/src/lerobot/policies/tdmpc/configuration_tdmpc.py",
"repo_id": "lerobot",
"token_count": 4265
} | 213 |
#!/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/robots/lekiwi/lekiwi.py/0 | {
"file_path": "lerobot/src/lerobot/robots/lekiwi/lekiwi.py",
"repo_id": "lerobot",
"token_count": 7410
} | 214 |
#!/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/robots/stretch3/robot_stretch3.py/0 | {
"file_path": "lerobot/src/lerobot/robots/stretch3/robot_stretch3.py",
"repo_id": "lerobot",
"token_count": 2634
} | 215 |
# 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/src/lerobot/scripts/server/constants.py/0 | {
"file_path": "lerobot/src/lerobot/scripts/server/constants.py",
"repo_id": "lerobot",
"token_count": 328
} | 216 |
#!/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/teleoperators/so100_leader/so100_leader.py/0 | {
"file_path": "lerobot/src/lerobot/teleoperators/so100_leader/so100_leader.py",
"repo_id": "lerobot",
"token_count": 2559
} | 217 |
#!/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/utils/transition.py/0 | {
"file_path": "lerobot/src/lerobot/utils/transition.py",
"repo_id": "lerobot",
"token_count": 1183
} | 218 |
#!/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/datasets/test_image_transforms.py/0 | {
"file_path": "lerobot/tests/datasets/test_image_transforms.py",
"repo_id": "lerobot",
"token_count": 6067
} | 219 |
#!/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/mocks/mock_robot.py/0 | {
"file_path": "lerobot/tests/mocks/mock_robot.py",
"repo_id": "lerobot",
"token_count": 1646
} | 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/processor/test_rename_processor.py/0 | {
"file_path": "lerobot/tests/processor/test_rename_processor.py",
"repo_id": "lerobot",
"token_count": 5991
} | 221 |
# 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/utils/test_train_utils.py/0 | {
"file_path": "lerobot/tests/utils/test_train_utils.py",
"repo_id": "lerobot",
"token_count": 1236
} | 222 |
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
... | open-r1/LICENSE/0 | {
"file_path": "open-r1/LICENSE",
"repo_id": "open-r1",
"token_count": 3168
} | 223 |
[isort]
default_section = FIRSTPARTY
ensure_newline_before_comments = True
force_grid_wrap = 0
include_trailing_comma = True
known_first_party = open_r1
known_third_party =
transformers
datasets
fugashi
git
h5py
matplotlib
nltk
numpy
packaging
pandas
psutil
pytest
rou... | open-r1/setup.cfg/0 | {
"file_path": "open-r1/setup.cfg",
"repo_id": "open-r1",
"token_count": 300
} | 224 |
# coding=utf-8
# 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 requir... | open-r1/src/open_r1/configs.py/0 | {
"file_path": "open-r1/src/open_r1/configs.py",
"repo_id": "open-r1",
"token_count": 5294
} | 225 |
import logging
import datasets
from datasets import DatasetDict, concatenate_datasets
from ..configs import ScriptArguments
logger = logging.getLogger(__name__)
def get_dataset(args: ScriptArguments) -> DatasetDict:
"""Load a dataset or a mixture of datasets based on the configuration.
Args:
args... | open-r1/src/open_r1/utils/data.py/0 | {
"file_path": "open-r1/src/open_r1/utils/data.py",
"repo_id": "open-r1",
"token_count": 1203
} | 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/developer_guides/custom_models.md/0 | {
"file_path": "peft/docs/source/developer_guides/custom_models.md",
"repo_id": "peft",
"token_count": 4859
} | 227 |
<!--⚠️ 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.
-->
# Configuration
[`PeftConfigMixin`] is the base configuration class for storing the adapter configuration of a [`PeftModel`], and [`PromptLearningCo... | peft/docs/source/package_reference/config.md/0 | {
"file_path": "peft/docs/source/package_reference/config.md",
"repo_id": "peft",
"token_count": 224
} | 228 |
<!--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/package_reference/p_tuning.md/0 | {
"file_path": "peft/docs/source/package_reference/p_tuning.md",
"repo_id": "peft",
"token_count": 540
} | 229 |
<!--Copyright 2024 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/task_guides/lora_based_methods.md/0 | {
"file_path": "peft/docs/source/task_guides/lora_based_methods.md",
"repo_id": "peft",
"token_count": 4896
} | 230 |
# 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 applicabl... | peft/examples/boft_controlnet/utils/light_controlnet.py/0 | {
"file_path": "peft/examples/boft_controlnet/utils/light_controlnet.py",
"repo_id": "peft",
"token_count": 4308
} | 231 |
# 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/examples/bone_finetuning/bone_finetuning.py/0 | {
"file_path": "peft/examples/bone_finetuning/bone_finetuning.py",
"repo_id": "peft",
"token_count": 1491
} | 232 |
# Copyright 2024-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/examples/eva_finetuning/eva_finetuning_multi_accelerator.py/0 | {
"file_path": "peft/examples/eva_finetuning/eva_finetuning_multi_accelerator.py",
"repo_id": "peft",
"token_count": 1443
} | 233 |
# adapted from [peft's boft_dreambooth](https://github.com/huggingface/peft/tree/main/examples/boft_dreambooth)
import gc
import threading
import psutil
import torch
# Converting Bytes to Megabytes
def b2mb(x):
return int(x / 2**20)
# This context manager is used to track the peak memory usage of the process
... | peft/examples/hra_dreambooth/utils/tracemalloc.py/0 | {
"file_path": "peft/examples/hra_dreambooth/utils/tracemalloc.py",
"repo_id": "peft",
"token_count": 910
} | 234 |
<jupyter_start><jupyter_code>!git clone https://huggingface.co/spaces/smangrul/peft-lora-sd-dreambooth
%cd "peft-lora-sd-dreambooth"
!pip install -r requirements.txt
!python colab.py<jupyter_output><empty_output> | peft/examples/lora_dreambooth/colab_notebook.ipynb/0 | {
"file_path": "peft/examples/lora_dreambooth/colab_notebook.ipynb",
"repo_id": "peft",
"token_count": 91
} | 235 |
import argparse
import gc
import hashlib
import itertools
import logging
import math
import os
import threading
import warnings
from contextlib import nullcontext
from pathlib import Path
import datasets
import diffusers
import numpy as np
import psutil
import torch
import torch.nn.functional as F
import torch.utils.c... | peft/examples/oft_dreambooth/train_dreambooth.py/0 | {
"file_path": "peft/examples/oft_dreambooth/train_dreambooth.py",
"repo_id": "peft",
"token_count": 20454
} | 236 |
<jupyter_start><jupyter_text>Using C3A for sequence classification In this example, we fine-tune Roberta (base) on a sequence classification task using C3A. Imports<jupyter_code># To run this notebook, please run `pip install evaluate` to install additional dependencies not covered by PEFT.
import torch
from torch.op... | peft/examples/sequence_classification/C3A.ipynb/0 | {
"file_path": "peft/examples/sequence_classification/C3A.ipynb",
"repo_id": "peft",
"token_count": 2373
} | 237 |
compute_environment: LOCAL_MACHINE
debug: false
distributed_type: FSDP
downcast_bf16: 'no'
fsdp_config:
fsdp_auto_wrap_policy: TRANSFORMER_BASED_WRAP
fsdp_backward_prefetch: BACKWARD_PRE
fsdp_cpu_ram_efficient_loading: true
fsdp_forward_prefetch: false
fsdp_offload_params: false
fsdp_sharding_strategy: FULL... | peft/examples/sft/configs/fsdp_config.yaml/0 | {
"file_path": "peft/examples/sft/configs/fsdp_config.yaml",
"repo_id": "peft",
"token_count": 265
} | 238 |
# 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/examples/shira_finetuning/shira_finetuning.py/0 | {
"file_path": "peft/examples/shira_finetuning/shira_finetuning.py",
"repo_id": "peft",
"token_count": 3546
} | 239 |
{
"optimizer_kwargs": {
"lr": 5e-4
}
}
| peft/method_comparison/MetaMathQA/experiments/adaptionprompt/llama-3.2-3B-lr_0.0005/training_params.json/0 | {
"file_path": "peft/method_comparison/MetaMathQA/experiments/adaptionprompt/llama-3.2-3B-lr_0.0005/training_params.json",
"repo_id": "peft",
"token_count": 28
} | 240 |
{
"alpha_pattern": {},
"auto_mapping": null,
"base_model_name_or_path": null,
"bias": "none",
"corda_config": null,
"eva_config": null,
"exclude_modules": null,
"fan_in_fan_out": false,
"inference_mode": false,
"init_lora_weights": true,
"layer_replication": null,
"layers_pattern": null,
"laye... | peft/method_comparison/MetaMathQA/experiments/lora/llama-3.2-3B-rank32-lorafa/adapter_config.json/0 | {
"file_path": "peft/method_comparison/MetaMathQA/experiments/lora/llama-3.2-3B-rank32-lorafa/adapter_config.json",
"repo_id": "peft",
"token_count": 304
} | 241 |
# Copyright 2023 The HuggingFace Team, the AllenNLP library 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
#
... | peft/scripts/stale.py/0 | {
"file_path": "peft/scripts/stale.py",
"repo_id": "peft",
"token_count": 890
} | 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/tuners/__init__.py/0 | {
"file_path": "peft/src/peft/tuners/__init__.py",
"repo_id": "peft",
"token_count": 1311
} | 243 |
#include <torch/torch.h>
#include <vector>
#include <iostream>
#include <torch/extension.h>
std::vector<at::Tensor> forward_fast_block_diag_cuda(
at::Tensor input);
std::vector<at::Tensor> forward_fast_block_diag(
at::Tensor input
) {
return forward_fast_block_diag_cuda(input);
}
std::vec... | peft/src/peft/tuners/boft/fbd/fbd_cuda.cpp/0 | {
"file_path": "peft/src/peft/tuners/boft/fbd/fbd_cuda.cpp",
"repo_id": "peft",
"token_count": 370
} | 244 |
# Copyright 2024-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/ln_tuning/model.py/0 | {
"file_path": "peft/src/peft/tuners/ln_tuning/model.py",
"repo_id": "peft",
"token_count": 3309
} | 245 |
# Copyright 2024-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/eetq.py/0 | {
"file_path": "peft/src/peft/tuners/lora/eetq.py",
"repo_id": "peft",
"token_count": 1926
} | 246 |
# 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/mixed/model.py/0 | {
"file_path": "peft/src/peft/tuners/mixed/model.py",
"repo_id": "peft",
"token_count": 6912
} | 247 |
# 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/p_tuning/config.py/0 | {
"file_path": "peft/src/peft/tuners/p_tuning/config.py",
"repo_id": "peft",
"token_count": 748
} | 248 |
# 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/randlora/layer.py/0 | {
"file_path": "peft/src/peft/tuners/randlora/layer.py",
"repo_id": "peft",
"token_count": 6797
} | 249 |
# 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/tuners_utils.py/0 | {
"file_path": "peft/src/peft/tuners/tuners_utils.py",
"repo_id": "peft",
"token_count": 28362
} | 250 |
# 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/constants.py/0 | {
"file_path": "peft/src/peft/utils/constants.py",
"repo_id": "peft",
"token_count": 7641
} | 251 |
# 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_auto.py/0 | {
"file_path": "peft/tests/test_auto.py",
"repo_id": "peft",
"token_count": 4124
} | 252 |
# Copyright 2024-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_integrations.py/0 | {
"file_path": "peft/tests/test_integrations.py",
"repo_id": "peft",
"token_count": 1367
} | 253 |
# Copyright 2024-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_torch_compile.py/0 | {
"file_path": "peft/tests/test_torch_compile.py",
"repo_id": "peft",
"token_count": 11218
} | 254 |
message: "If you use this software, please cite it as below."
title: "PyTorch Image Models"
version: "1.2.2"
doi: "10.5281/zenodo.4414861"
authors:
- family-names: Wightman
given-names: Ross
version: 1.0.11
year: "2019"
url: "https://github.com/huggingface/pytorch-image-models"
license: "Apache 2.0" | pytorch-image-models/CITATION.cff/0 | {
"file_path": "pytorch-image-models/CITATION.cff",
"repo_id": "pytorch-image-models",
"token_count": 122
} | 255 |
# Changelog
## Jan 19, 2025
* Fix loading of LeViT safetensor weights, remove conversion code which should have been deactivated
* Add 'SO150M' ViT weights trained with SBB recipes, decent results, but not optimal shape for ImageNet-12k/1k pretrain/ft
* `vit_so150m_patch16_reg4_gap_256.sbb_e250_in12k_ft_in1k` - 86.7... | pytorch-image-models/hfdocs/source/changes.mdx/0 | {
"file_path": "pytorch-image-models/hfdocs/source/changes.mdx",
"repo_id": "pytorch-image-models",
"token_count": 50077
} | 256 |
# EfficientNet (Knapsack Pruned)
**EfficientNet** is a convolutional neural network architecture and scaling method that uniformly scales all dimensions of depth/width/resolution using a *compound coefficient*. Unlike conventional practice that arbitrary scales these factors, the EfficientNet scaling method uniformly ... | pytorch-image-models/hfdocs/source/models/efficientnet-pruned.mdx/0 | {
"file_path": "pytorch-image-models/hfdocs/source/models/efficientnet-pruned.mdx",
"repo_id": "pytorch-image-models",
"token_count": 2778
} | 257 |
# ResNet
**Residual Networks**, or **ResNets**, learn residual functions with reference to the layer inputs, instead of learning unreferenced functions. Instead of hoping each few stacked layers directly fit a desired underlying mapping, residual nets let these layers fit a residual mapping. They stack [residual block... | pytorch-image-models/hfdocs/source/models/resnet.mdx/0 | {
"file_path": "pytorch-image-models/hfdocs/source/models/resnet.mdx",
"repo_id": "pytorch-image-models",
"token_count": 5077
} | 258 |
# (Tensorflow) MixNet
**MixNet** is a type of convolutional neural network discovered via AutoML that utilises [MixConvs](https://paperswithcode.com/method/mixconv) instead of regular [depthwise convolutions](https://paperswithcode.com/method/depthwise-convolution).
The weights from this model were ported from [Tenso... | pytorch-image-models/hfdocs/source/models/tf-mixnet.mdx/0 | {
"file_path": "pytorch-image-models/hfdocs/source/models/tf-mixnet.mdx",
"repo_id": "pytorch-image-models",
"token_count": 2362
} | 259 |
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
[project]
name = "timm"
authors = [
{name = "Ross Wightman", email = "ross@huggingface.co"},
]
description = "PyTorch Image Models"
readme = "README.md"
requires-python = ">=3.8"
keywords = ["pytorch", "image-classification"]
license = {text =... | pytorch-image-models/pyproject.toml/0 | {
"file_path": "pytorch-image-models/pyproject.toml",
"repo_id": "pytorch-image-models",
"token_count": 800
} | 260 |
""" Optimzier Tests
These tests were adapted from PyTorch' optimizer tests.
"""
import functools
import importlib
import os
from copy import deepcopy
import pytest
import torch
from torch.nn import Parameter
from torch.testing._internal.common_utils import TestCase
from timm.optim import create_optimizer_v2, list_o... | pytorch-image-models/tests/test_optim.py/0 | {
"file_path": "pytorch-image-models/tests/test_optim.py",
"repo_id": "pytorch-image-models",
"token_count": 9463
} | 261 |
import csv
import os
import pkgutil
import re
from typing import Dict, List, Optional, Union
from .dataset_info import DatasetInfo
# NOTE no ambiguity wrt to mapping from # classes to ImageNet subset so far, but likely to change
_NUM_CLASSES_TO_SUBSET = {
1000: 'imagenet-1k',
11221: 'imagenet-21k-miil', # m... | pytorch-image-models/timm/data/imagenet_info.py/0 | {
"file_path": "pytorch-image-models/timm/data/imagenet_info.py",
"repo_id": "pytorch-image-models",
"token_count": 1732
} | 262 |
""" A dataset reader that extracts images from folders
Folders are scanned recursively to find image files. Labels are based
on the folder hierarchy, just leaf folders by default.
Hacked together by / Copyright 2020 Ross Wightman
"""
import os
from typing import Dict, List, Optional, Set, Tuple, Union
from timm.util... | pytorch-image-models/timm/data/readers/reader_image_folder.py/0 | {
"file_path": "pytorch-image-models/timm/data/readers/reader_image_folder.py",
"repo_id": "pytorch-image-models",
"token_count": 1510
} | 263 |
from typing import List, Optional, Type, Union
import torch
from torch import nn as nn
from torch.nn import functional as F
from .config import use_fused_attn
from .create_conv2d import create_conv2d
from .helpers import to_2tuple
from .pool2d_same import create_pool2d
class MultiQueryAttentionV2(nn.Module):
""... | pytorch-image-models/timm/layers/attention2d.py/0 | {
"file_path": "pytorch-image-models/timm/layers/attention2d.py",
"repo_id": "pytorch-image-models",
"token_count": 6678
} | 264 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.