text
stringlengths
5
409k
id
stringlengths
14
178
metadata
dict
__index_level_0__
int64
0
572
<!--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...
diffusers/docs/source/ko/optimization/habana.md/0
{ "file_path": "diffusers/docs/source/ko/optimization/habana.md", "repo_id": "diffusers", "token_count": 1911 }
87
<!--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...
diffusers/docs/source/ko/training/lora.md/0
{ "file_path": "diffusers/docs/source/ko/training/lora.md", "repo_id": "diffusers", "token_count": 4756 }
88
<!--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...
diffusers/docs/source/ko/using-diffusers/loading_adapters.md/0
{ "file_path": "diffusers/docs/source/ko/using-diffusers/loading_adapters.md", "repo_id": "diffusers", "token_count": 12272 }
89
- sections: - local: index title: ๐Ÿงจ Diffusers - local: quicktour title: ๅฟซ้€Ÿๅ…ฅ้—จ - local: stable_diffusion title: ๆœ‰ๆ•ˆๅ’Œ้ซ˜ๆ•ˆ็š„ๆ‰ฉๆ•ฃ - local: consisid title: ่บซไปฝไฟๆŒ็š„ๆ–‡ๆœฌๅˆฐ่ง†้ข‘็”Ÿๆˆ - local: installation title: ๅฎ‰่ฃ… title: ๅผ€ๅง‹
diffusers/docs/source/zh/_toctree.yml/0
{ "file_path": "diffusers/docs/source/zh/_toctree.yml", "repo_id": "diffusers", "token_count": 141 }
90
# 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/examples/amused/train_amused.py/0
{ "file_path": "diffusers/examples/amused/train_amused.py", "repo_id": "diffusers", "token_count": 17513 }
91
from typing import Optional import torch from PIL import Image from tqdm.auto import tqdm from transformers import CLIPTextModel, CLIPTokenizer from diffusers import AutoencoderKL, DDIMScheduler, DiffusionPipeline, UNet2DConditionModel from diffusers.image_processor import VaeImageProcessor from diffusers.utils impor...
diffusers/examples/community/edict_pipeline.py/0
{ "file_path": "diffusers/examples/community/edict_pipeline.py", "repo_id": "diffusers", "token_count": 4682 }
92
import inspect import re from typing import Callable, List, Optional, Union import numpy as np import PIL.Image import torch from packaging import version from transformers import CLIPImageProcessor, CLIPTokenizer import diffusers from diffusers import OnnxRuntimeModel, OnnxStableDiffusionPipeline, SchedulerMixin fro...
diffusers/examples/community/lpw_stable_diffusion_onnx.py/0
{ "file_path": "diffusers/examples/community/lpw_stable_diffusion_onnx.py", "repo_id": "diffusers", "token_count": 24240 }
93
# Copyright 2024 FABRIC 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 re...
diffusers/examples/community/pipeline_fabric.py/0
{ "file_path": "diffusers/examples/community/pipeline_fabric.py", "repo_id": "diffusers", "token_count": 16559 }
94
# Copyright 2024 Jake Babbidge, TencentARC and The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
diffusers/examples/community/pipeline_stable_diffusion_xl_controlnet_adapter_inpaint.py/0
{ "file_path": "diffusers/examples/community/pipeline_stable_diffusion_xl_controlnet_adapter_inpaint.py", "repo_id": "diffusers", "token_count": 41957 }
95
# Inspired by: https://github.com/haofanwang/ControlNet-for-Diffusers/ import inspect from typing import Any, Callable, Dict, List, Optional, Tuple, Union import numpy as np import PIL.Image import torch from transformers import CLIPImageProcessor, CLIPTextModel, CLIPTokenizer from diffusers import AutoencoderKL, Co...
diffusers/examples/community/stable_diffusion_controlnet_img2img.py/0
{ "file_path": "diffusers/examples/community/stable_diffusion_controlnet_img2img.py", "repo_id": "diffusers", "token_count": 19382 }
96
import inspect from typing import List, Optional, Union import PIL.Image import torch from torch.nn import functional as F from transformers import ( CLIPImageProcessor, CLIPTextModelWithProjection, CLIPTokenizer, CLIPVisionModelWithProjection, ) from diffusers import ( DiffusionPipeline, Imag...
diffusers/examples/community/unclip_image_interpolation.py/0
{ "file_path": "diffusers/examples/community/unclip_image_interpolation.py", "repo_id": "diffusers", "token_count": 9324 }
97
# ControlNet training example for Stable Diffusion XL (SDXL) The `train_controlnet_sdxl.py` script shows how to implement the ControlNet training procedure and adapt it for [Stable Diffusion XL](https://huggingface.co/papers/2307.01952). ## Running locally with PyTorch ### Installing the dependencies Before running...
diffusers/examples/controlnet/README_sdxl.md/0
{ "file_path": "diffusers/examples/controlnet/README_sdxl.md", "repo_id": "diffusers", "token_count": 1698 }
98
#!/usr/bin/env python # coding=utf-8 # Copyright 2024 Custom Diffusion authors 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 # # http...
diffusers/examples/custom_diffusion/train_custom_diffusion.py/0
{ "file_path": "diffusers/examples/custom_diffusion/train_custom_diffusion.py", "repo_id": "diffusers", "token_count": 27032 }
99
# coding=utf-8 # 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 ag...
diffusers/examples/dreambooth/test_dreambooth_lora.py/0
{ "file_path": "diffusers/examples/dreambooth/test_dreambooth_lora.py", "repo_id": "diffusers", "token_count": 8107 }
100
# InstructPix2Pix text-to-edit-image fine-tuning This extended LoRA training script was authored by [Aiden-Frost](https://github.com/Aiden-Frost). This is an experimental LoRA extension of [this example](https://github.com/huggingface/diffusers/blob/main/examples/instruct_pix2pix/train_instruct_pix2pix.py). This script...
diffusers/examples/research_projects/instructpix2pix_lora/README.md/0
{ "file_path": "diffusers/examples/research_projects/instructpix2pix_lora/README.md", "repo_id": "diffusers", "token_count": 1406 }
101
import argparse import itertools import json import os import random import time from pathlib import Path import numpy as np import torch import torch.nn.functional as F from accelerate import Accelerator from accelerate.utils import ProjectConfiguration from ip_adapter.ip_adapter import ImageProjModel from ip_adapter...
diffusers/examples/research_projects/ip_adapter/tutorial_train_sdxl.py/0
{ "file_path": "diffusers/examples/research_projects/ip_adapter/tutorial_train_sdxl.py", "repo_id": "diffusers", "token_count": 9382 }
102
## Diffusers examples with ONNXRuntime optimizations **This research project is not actively maintained by the diffusers team. For any questions or comments, please contact Prathik Rao (prathikr), Sunghoon Choi (hanbitmyths), Ashwini Khade (askhade), or Peng Wang (pengwa) on github with any questions.** This aims to ...
diffusers/examples/research_projects/onnxruntime/README.md/0
{ "file_path": "diffusers/examples/research_projects/onnxruntime/README.md", "repo_id": "diffusers", "token_count": 134 }
103
# coding=utf-8 # Copyright 2023 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 r...
diffusers/examples/research_projects/pixart/train_pixart_controlnet_hf.py/0
{ "file_path": "diffusers/examples/research_projects/pixart/train_pixart_controlnet_hf.py", "repo_id": "diffusers", "token_count": 21169 }
104
import argparse import copy import itertools import logging import math import os import random import shutil from pathlib import Path import numpy as np import torch import torch.nn.functional as F import torch.utils.checkpoint import torchvision.transforms.v2 as transforms_v2 import transformers from accelerate impo...
diffusers/examples/research_projects/realfill/train_realfill.py/0
{ "file_path": "diffusers/examples/research_projects/realfill/train_realfill.py", "repo_id": "diffusers", "token_count": 16396 }
105
# VAE `vae_roundtrip.py` Demonstrates the use of a VAE by roundtripping an image through the encoder and decoder. Original and reconstructed images are displayed side by side. ``` cd examples/research_projects/vae python vae_roundtrip.py \ --pretrained_model_name_or_path="stable-diffusion-v1-5/stable-diffusion-v1...
diffusers/examples/research_projects/vae/README.md/0
{ "file_path": "diffusers/examples/research_projects/vae/README.md", "repo_id": "diffusers", "token_count": 140 }
106
[tool.ruff] line-length = 119 [tool.ruff.lint] # Never enforce `E501` (line length violations). ignore = ["C901", "E501", "E741", "F402", "F823"] select = ["C", "E", "F", "I", "W"] # Ignore import violations in all `__init__.py` files. [tool.ruff.lint.per-file-ignores] "__init__.py" = ["E402", "F401", "F403", "F811"]...
diffusers/pyproject.toml/0
{ "file_path": "diffusers/pyproject.toml", "repo_id": "diffusers", "token_count": 286 }
107
import argparse import os import torch from diffusers import ( CMStochasticIterativeScheduler, ConsistencyModelPipeline, UNet2DModel, ) TEST_UNET_CONFIG = { "sample_size": 32, "in_channels": 3, "out_channels": 3, "layers_per_block": 2, "num_class_embeds": 1000, "block_out_channel...
diffusers/scripts/convert_consistency_to_diffusers.py/0
{ "file_path": "diffusers/scripts/convert_consistency_to_diffusers.py", "repo_id": "diffusers", "token_count": 5773 }
108
import argparse import huggingface_hub import k_diffusion as K import torch from diffusers import UNet2DConditionModel UPSCALER_REPO = "pcuenq/k-upscaler" def resnet_to_diffusers_checkpoint(resnet, checkpoint, *, diffusers_resnet_prefix, resnet_prefix): rv = { # norm1 f"{diffusers_resnet_prefi...
diffusers/scripts/convert_k_upscaler_to_diffusers.py/0
{ "file_path": "diffusers/scripts/convert_k_upscaler_to_diffusers.py", "repo_id": "diffusers", "token_count": 5645 }
109
# 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/scripts/convert_original_controlnet_to_diffusers.py/0
{ "file_path": "diffusers/scripts/convert_original_controlnet_to_diffusers.py", "repo_id": "diffusers", "token_count": 1608 }
110
from diffusers.utils import is_accelerate_available, logging if is_accelerate_available(): pass logger = logging.get_logger(__name__) # pylint: disable=invalid-name def create_unet_diffusers_config(original_config, image_size: int, controlnet=False): """ Creates a config for the diffusers based on the...
diffusers/scripts/convert_svd_to_diffusers.py/0
{ "file_path": "diffusers/scripts/convert_svd_to_diffusers.py", "repo_id": "diffusers", "token_count": 14781 }
111
#!/usr/bin/env python # 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...
diffusers/src/diffusers/commands/diffusers_cli.py/0
{ "file_path": "diffusers/src/diffusers/commands/diffusers_cli.py", "repo_id": "diffusers", "token_count": 411 }
112
from typing import TYPE_CHECKING from ..utils import DIFFUSERS_SLOW_IMPORT, _LazyModule, deprecate from ..utils.import_utils import is_peft_available, is_torch_available, is_transformers_available def text_encoder_lora_state_dict(text_encoder): deprecate( "text_encoder_load_state_dict in `models`", ...
diffusers/src/diffusers/loaders/__init__.py/0
{ "file_path": "diffusers/src/diffusers/loaders/__init__.py", "repo_id": "diffusers", "token_count": 2321 }
113
# 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 applicabl...
diffusers/src/diffusers/models/__init__.py/0
{ "file_path": "diffusers/src/diffusers/models/__init__.py", "repo_id": "diffusers", "token_count": 3812 }
114
# 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 applicabl...
diffusers/src/diffusers/models/autoencoders/autoencoder_oobleck.py/0
{ "file_path": "diffusers/src/diffusers/models/autoencoders/autoencoder_oobleck.py", "repo_id": "diffusers", "token_count": 7331 }
115
# 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 applicabl...
diffusers/src/diffusers/models/controlnets/controlnet_sparsectrl.py/0
{ "file_path": "diffusers/src/diffusers/models/controlnets/controlnet_sparsectrl.py", "repo_id": "diffusers", "token_count": 16688 }
116
# Copyright 2024 The HuggingFace Team. All rights reserved. # `TemporalConvLayer` Copyright 2024 Alibaba DAMO-VILAB, The ModelScope Team and The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. #...
diffusers/src/diffusers/models/resnet.py/0
{ "file_path": "diffusers/src/diffusers/models/resnet.py", "repo_id": "diffusers", "token_count": 14442 }
117
# 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 applicabl...
diffusers/src/diffusers/models/transformers/transformer_2d.py/0
{ "file_path": "diffusers/src/diffusers/models/transformers/transformer_2d.py", "repo_id": "diffusers", "token_count": 12696 }
118
# 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 applicabl...
diffusers/src/diffusers/models/unets/unet_2d_blocks.py/0
{ "file_path": "diffusers/src/diffusers/models/unets/unet_2d_blocks.py", "repo_id": "diffusers", "token_count": 74343 }
119
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/__init__.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/controlnet/__init__.py", "repo_id": "diffusers", "token_count": 1545 }
120
from typing import TYPE_CHECKING from ....utils import DIFFUSERS_SLOW_IMPORT, _LazyModule _import_structure = {"pipeline_latent_diffusion_uncond": ["LDMPipeline"]} if TYPE_CHECKING or DIFFUSERS_SLOW_IMPORT: from .pipeline_latent_diffusion_uncond import LDMPipeline else: import sys sys.modules[__name__]...
diffusers/src/diffusers/pipelines/deprecated/latent_diffusion_uncond/__init__.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/deprecated/latent_diffusion_uncond/__init__.py", "repo_id": "diffusers", "token_count": 190 }
121
# 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 applicabl...
diffusers/src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_stable_diffusion_inpaint_legacy.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_stable_diffusion_inpaint_legacy.py", "repo_id": "diffusers", "token_count": 18223 }
122
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": ["FluxPipe...
diffusers/src/diffusers/pipelines/flux/__init__.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/flux/__init__.py", "repo_id": "diffusers", "token_count": 1276 }
123
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 i...
diffusers/src/diffusers/pipelines/hunyuan_video/__init__.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/hunyuan_video/__init__.py", "repo_id": "diffusers", "token_count": 599 }
124
# Copyright 2024 ChatGLM3-6B Model Team, Kwai-Kolors 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...
diffusers/src/diffusers/pipelines/kolors/text_encoder.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/kolors/text_encoder.py", "repo_id": "diffusers", "token_count": 16301 }
125
# Copyright 2024 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/pipeline_omnigen.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/omnigen/pipeline_omnigen.py", "repo_id": "diffusers", "token_count": 10098 }
126
# 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 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": 11854 }
127
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 }
128
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": 31161 }
129
from .gguf_quantizer import GGUFQuantizer
diffusers/src/diffusers/quantizers/gguf/__init__.py/0
{ "file_path": "diffusers/src/diffusers/quantizers/gguf/__init__.py", "repo_id": "diffusers", "token_count": 13 }
130
# Copyright 2024 Katherine Crowson 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/schedulers/scheduling_edm_euler.py/0
{ "file_path": "diffusers/src/diffusers/schedulers/scheduling_edm_euler.py", "repo_id": "diffusers", "token_count": 8158 }
131
# Copyright 2024 ETH Zurich Computer Vision Lab 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/schedulers/scheduling_repaint.py/0
{ "file_path": "diffusers/src/diffusers/schedulers/scheduling_repaint.py", "repo_id": "diffusers", "token_count": 6642 }
132
# This file is autogenerated by the command `make fix-copies`, do not edit. from ..utils import DummyObject, requires_backends class FlaxStableDiffusionControlNetPipeline(metaclass=DummyObject): _backends = ["flax", "transformers"] def __init__(self, *args, **kwargs): requires_backends(self, ["flax",...
diffusers/src/diffusers/utils/dummy_flax_and_transformers_objects.py/0
{ "file_path": "diffusers/src/diffusers/utils/dummy_flax_and_transformers_objects.py", "repo_id": "diffusers", "token_count": 957 }
133
# 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 applicabl...
diffusers/src/diffusers/utils/import_utils.py/0
{ "file_path": "diffusers/src/diffusers/utils/import_utils.py", "repo_id": "diffusers", "token_count": 12188 }
134
import tempfile import unittest import numpy as np import pytest import torch from diffusers import DiffusionPipeline from diffusers.models.attention_processor import Attention, AttnAddedKVProcessor from diffusers.utils.testing_utils import torch_device class AttnAddedKVProcessorTests(unittest.TestCase): def ge...
diffusers/tests/models/test_attention_processor.py/0
{ "file_path": "diffusers/tests/models/test_attention_processor.py", "repo_id": "diffusers", "token_count": 2019 }
135
# 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_hunyuan_video.py/0
{ "file_path": "diffusers/tests/models/transformers/test_models_transformer_hunyuan_video.py", "repo_id": "diffusers", "token_count": 2465 }
136
# coding=utf-8 # 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 ag...
diffusers/tests/models/unets/test_models_unet_controlnetxs.py/0
{ "file_path": "diffusers/tests/models/unets/test_models_unet_controlnetxs.py", "repo_id": "diffusers", "token_count": 6217 }
137
# coding=utf-8 # 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 ag...
diffusers/tests/others/test_video_processor.py/0
{ "file_path": "diffusers/tests/others/test_video_processor.py", "repo_id": "diffusers", "token_count": 3484 }
138
# coding=utf-8 # 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 ag...
diffusers/tests/pipelines/audioldm/test_audioldm.py/0
{ "file_path": "diffusers/tests/pipelines/audioldm/test_audioldm.py", "repo_id": "diffusers", "token_count": 7655 }
139
import random import unittest import numpy as np import torch # torch_device, # {{ edit_1 }} Removed unused import from transformers import ( AutoTokenizer, CLIPTextConfig, CLIPTextModel, CLIPTokenizer, T5EncoderModel, ) from diffusers import ( AutoencoderKL, FlowMatchEulerDiscreteSchedu...
diffusers/tests/pipelines/controlnet_flux/test_controlnet_flux_inpaint.py/0
{ "file_path": "diffusers/tests/pipelines/controlnet_flux/test_controlnet_flux_inpaint.py", "repo_id": "diffusers", "token_count": 3792 }
140
# coding=utf-8 # 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 ag...
diffusers/tests/pipelines/deepfloyd_if/test_if.py/0
{ "file_path": "diffusers/tests/pipelines/deepfloyd_if/test_if.py", "repo_id": "diffusers", "token_count": 2036 }
141
import gc import unittest import numpy as np import pytest import torch from diffusers import FluxPipeline, FluxPriorReduxPipeline from diffusers.utils import load_image from diffusers.utils.testing_utils import ( numpy_cosine_similarity_distance, require_big_gpu_with_torch_cuda, slow, torch_device, )...
diffusers/tests/pipelines/flux/test_pipeline_flux_redux.py/0
{ "file_path": "diffusers/tests/pipelines/flux/test_pipeline_flux_redux.py", "repo_id": "diffusers", "token_count": 1828 }
142
import gc import inspect import random import unittest import numpy as np import torch from transformers import CLIPTextConfig, CLIPTextModel, CLIPTokenizer from diffusers import ( AutoencoderKL, LatentConsistencyModelImg2ImgPipeline, LCMScheduler, UNet2DConditionModel, ) from diffusers.utils.testing_...
diffusers/tests/pipelines/latent_consistency_models/test_latent_consistency_models_img2img.py/0
{ "file_path": "diffusers/tests/pipelines/latent_consistency_models/test_latent_consistency_models_img2img.py", "repo_id": "diffusers", "token_count": 5273 }
143
# coding=utf-8 # 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 ag...
diffusers/tests/pipelines/stable_cascade/test_stable_cascade_combined.py/0
{ "file_path": "diffusers/tests/pipelines/stable_cascade/test_stable_cascade_combined.py", "repo_id": "diffusers", "token_count": 4571 }
144
# coding=utf-8 # 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 ag...
diffusers/tests/pipelines/stable_diffusion_2/test_stable_diffusion_diffedit.py/0
{ "file_path": "diffusers/tests/pipelines/stable_diffusion_2/test_stable_diffusion_diffedit.py", "repo_id": "diffusers", "token_count": 7537 }
145
# coding=utf-8 # 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 ag...
diffusers/tests/pipelines/stable_diffusion_gligen_text_image/test_stable_diffusion_gligen_text_image.py/0
{ "file_path": "diffusers/tests/pipelines/stable_diffusion_gligen_text_image/test_stable_diffusion_gligen_text_image.py", "repo_id": "diffusers", "token_count": 3536 }
146
# coding=utf-8 # 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 ag...
diffusers/tests/pipelines/stable_diffusion_xl/test_stable_diffusion_xl_img2img.py/0
{ "file_path": "diffusers/tests/pipelines/stable_diffusion_xl/test_stable_diffusion_xl_img2img.py", "repo_id": "diffusers", "token_count": 12461 }
147
# coding=utf-8 # Copyright 2024 The HuggingFace Team 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 clone of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
diffusers/tests/quantization/bnb/test_4bit.py/0
{ "file_path": "diffusers/tests/quantization/bnb/test_4bit.py", "repo_id": "diffusers", "token_count": 14432 }
148
import tempfile import unittest import torch from diffusers import ( DEISMultistepScheduler, DPMSolverMultistepScheduler, DPMSolverSinglestepScheduler, UniPCMultistepScheduler, ) from .test_schedulers import SchedulerCommonTest class DPMSolverSinglestepSchedulerTest(SchedulerCommonTest): schedu...
diffusers/tests/schedulers/test_scheduler_dpm_single.py/0
{ "file_path": "diffusers/tests/schedulers/test_scheduler_dpm_single.py", "repo_id": "diffusers", "token_count": 7204 }
149
import unittest import torch from diffusers import UnCLIPScheduler from .test_schedulers import SchedulerCommonTest # UnCLIPScheduler is a modified DDPMScheduler with a subset of the configuration. class UnCLIPSchedulerTest(SchedulerCommonTest): scheduler_classes = (UnCLIPScheduler,) def get_scheduler_con...
diffusers/tests/schedulers/test_scheduler_unclip.py/0
{ "file_path": "diffusers/tests/schedulers/test_scheduler_unclip.py", "repo_id": "diffusers", "token_count": 2263 }
150
import gc import unittest import torch from diffusers import ( StableDiffusionImg2ImgPipeline, ) from diffusers.utils import load_image from diffusers.utils.testing_utils import ( backend_empty_cache, enable_full_determinism, require_torch_accelerator, slow, torch_device, ) from .single_file_...
diffusers/tests/single_file/test_stable_diffusion_img2img_single_file.py/0
{ "file_path": "diffusers/tests/single_file/test_stable_diffusion_img2img_single_file.py", "repo_id": "diffusers", "token_count": 1604 }
151
# 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_table.py/0
{ "file_path": "diffusers/utils/check_table.py", "repo_id": "diffusers", "token_count": 3011 }
152
#!/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/benchmarks/video/run_video_benchmark.py/0
{ "file_path": "lerobot/benchmarks/video/run_video_benchmark.py", "repo_id": "lerobot", "token_count": 8154 }
153
#!/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/lerobot/__init__.py/0
{ "file_path": "lerobot/lerobot/__init__.py", "repo_id": "lerobot", "token_count": 3253 }
154
#!/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/lerobot/common/datasets/transforms.py/0
{ "file_path": "lerobot/lerobot/common/datasets/transforms.py", "repo_id": "lerobot", "token_count": 3919 }
155
#!/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/lerobot/common/policies/diffusion/configuration_diffusion.py/0
{ "file_path": "lerobot/lerobot/common/policies/diffusion/configuration_diffusion.py", "repo_id": "lerobot", "token_count": 4538 }
156
#!/usr/bin/env python # Copyright 2024 Seungjae Lee and Yibin Wang and Haritheja Etukuru # and H. Jin Kim and Nur Muhammad Mahi Shafiullah and Lerrel Pinto # 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 com...
lerobot/lerobot/common/policies/vqbet/configuration_vqbet.py/0
{ "file_path": "lerobot/lerobot/common/policies/vqbet/configuration_vqbet.py", "repo_id": "lerobot", "token_count": 3678 }
157
"""Contains logic to instantiate a robot, read information from its motors and cameras, and send orders to its motors. """ # TODO(rcadene, aliberts): reorganize the codebase into one file per robot, with the associated # calibration procedure, to make it easy for people to add their own robot. import json import loggi...
lerobot/lerobot/common/robot_devices/robots/manipulator.py/0
{ "file_path": "lerobot/lerobot/common/robot_devices/robots/manipulator.py", "repo_id": "lerobot", "token_count": 11680 }
158
import abc import os from dataclasses import dataclass, field from pathlib import Path from typing import Type, TypeVar import draccus from huggingface_hub import hf_hub_download from huggingface_hub.constants import CONFIG_NAME from huggingface_hub.errors import HfHubHTTPError from lerobot.common.optim.optimizers im...
lerobot/lerobot/configs/policies.py/0
{ "file_path": "lerobot/lerobot/configs/policies.py", "repo_id": "lerobot", "token_count": 2214 }
159
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- # TODO(rcadene, mishig25): store the js files locally --> <script src="https://cdnjs.cloudflare.com/ajax/libs/alpinejs/3.13.5/cdn.min.js" defer></script> <scrip...
lerobot/lerobot/templates/visualize_dataset_template.html/0
{ "file_path": "lerobot/lerobot/templates/visualize_dataset_template.html", "repo_id": "lerobot", "token_count": 12426 }
160
version https://git-lfs.github.com/spec/v1 oid sha256:c8d9f9cc9e232820760fe4a46b47000c921fa5d868420e55d8dbc05dae56e8bd size 111338
lerobot/tests/data/save_dataset_to_safetensors/lerobot/pusht/frame_160.safetensors/0
{ "file_path": "lerobot/tests/data/save_dataset_to_safetensors/lerobot/pusht/frame_160.safetensors", "repo_id": "lerobot", "token_count": 69 }
161
version https://git-lfs.github.com/spec/v1 oid sha256:50303d05caea725c4a240f1389424d6c2361961f2cee729a0010e909ebffed81 size 31672
lerobot/tests/data/save_policy_to_safetensors/aloha_act_1000_steps/grad_stats.safetensors/0
{ "file_path": "lerobot/tests/data/save_policy_to_safetensors/aloha_act_1000_steps/grad_stats.safetensors", "repo_id": "lerobot", "token_count": 61 }
162
#!/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/test_available.py/0
{ "file_path": "lerobot/tests/test_available.py", "repo_id": "lerobot", "token_count": 810 }
163
import random import numpy as np import pytest import torch from lerobot.common.utils.random_utils import ( deserialize_numpy_rng_state, deserialize_python_rng_state, deserialize_rng_state, deserialize_torch_rng_state, get_rng_state, seeded_context, serialize_numpy_rng_state, serialize...
lerobot/tests/test_random_utils.py/0
{ "file_path": "lerobot/tests/test_random_utils.py", "repo_id": "lerobot", "token_count": 1297 }
164
# PEFT Docker images Here we store all PEFT Docker images used in our testing infrastructure. We use python 3.11 for now on all our images. - `peft-cpu`: PEFT compiled on CPU with all other HF libraries installed on main branch - `peft-gpu`: PEFT complied for NVIDIA GPUs wih all other HF libraries installed on main b...
peft/docker/README.md/0
{ "file_path": "peft/docker/README.md", "repo_id": "peft", "token_count": 261 }
165
<!--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/developer_guides/checkpoint.md/0
{ "file_path": "peft/docs/source/developer_guides/checkpoint.md", "repo_id": "peft", "token_count": 4146 }
166
<!--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 }
167
<jupyter_start><jupyter_text>Peft model evaluation using [lm-eval-harness](https://github.com/EleutherAI/lm-evaluation-harness)In this notebook, we are going to learn how to evaluate the finetuned lora model on the hellaswag task using lm-eval-harness toolkit.<jupyter_code># Install LM-Eval !pip install -q datasets eva...
peft/examples/evaluation/lora-lm-eval.ipynb/0
{ "file_path": "peft/examples/evaluation/lora-lm-eval.ipynb", "repo_id": "peft", "token_count": 2454 }
168
<jupyter_start><jupyter_text>IntroductionIn this notebook, we will learn how to use [LoRA](https://arxiv.org/abs/2106.09685) from ๐Ÿค— PEFT to fine-tune an image classification model by ONLY using **0.77%** of the original trainable parameters of the model. LoRA adds low-rank "update matrices" to certain blocks in the un...
peft/examples/image_classification/image_classification_peft_lora.ipynb/0
{ "file_path": "peft/examples/image_classification/image_classification_peft_lora.ipynb", "repo_id": "peft", "token_count": 6372 }
169
<jupyter_start><jupyter_text>IntroductionIn this notebook, we will learn how to use [LoRA](https://arxiv.org/abs/2106.09685) from ๐Ÿค— PEFT to fine-tune a SegFormer model variant for semantic segmentation by ONLY using **14%** of the original trainable parameters of the model. LoRA adds low-rank "update matrices" to cert...
peft/examples/semantic_segmentation/semantic_segmentation_peft_lora.ipynb/0
{ "file_path": "peft/examples/semantic_segmentation/semantic_segmentation_peft_lora.ipynb", "repo_id": "peft", "token_count": 8322 }
170
<jupyter_start><jupyter_text>IntroductionIn this notebook, we are going to fine-tune the LayoutLM model by Microsoft Research on the [FUNSD](https://guillaumejaume.github.io/FUNSD/) dataset, which is a collection of annotated form documents. The goal of our model is to learn the annotations of a number of labels ("ques...
peft/examples/token_classification/peft_lora_token_cls.ipynb/0
{ "file_path": "peft/examples/token_classification/peft_lora_token_cls.ipynb", "repo_id": "peft", "token_count": 11949 }
171
# 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": 1133 }
172
# 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/adaption_prompt/config.py/0
{ "file_path": "peft/src/peft/tuners/adaption_prompt/config.py", "repo_id": "peft", "token_count": 1010 }
173
# 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/cpt/config.py/0
{ "file_path": "peft/src/peft/tuners/cpt/config.py", "repo_id": "peft", "token_count": 1463 }
174
# 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/config.py/0
{ "file_path": "peft/src/peft/tuners/ln_tuning/config.py", "repo_id": "peft", "token_count": 1153 }
175
# 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/corda.py/0
{ "file_path": "peft/src/peft/tuners/lora/corda.py", "repo_id": "peft", "token_count": 6527 }
176
# 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/prompt_tuning/config.py/0
{ "file_path": "peft/src/peft/tuners/prompt_tuning/config.py", "repo_id": "peft", "token_count": 1410 }
177
# 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/xlora/model.py/0
{ "file_path": "peft/src/peft/tuners/xlora/model.py", "repo_id": "peft", "token_count": 9093 }
178
# 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": 3615 }
179
#!/usr/bin/env python3 # coding=utf-8 # 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 #...
peft/tests/test_lora_megatron.py/0
{ "file_path": "peft/tests/test_lora_megatron.py", "repo_id": "peft", "token_count": 2989 }
180
# 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": 2055 }
181
#!/usr/bin/env python3 """ Checkpoint Cleaning Script Takes training checkpoints with GPU tensors, optimizer state, extra dict keys, etc. and outputs a CPU tensor checkpoint with only the `state_dict` along with SHA256 calculation for model zoo compatibility. Hacked together by / Copyright 2020 Ross Wightman (https:...
pytorch-image-models/clean_checkpoint.py/0
{ "file_path": "pytorch-image-models/clean_checkpoint.py", "repo_id": "pytorch-image-models", "token_count": 1771 }
182
# RegNetX **RegNetX** is a convolutional network design space with simple, regular models with parameters: depth \\( d \\), initial width \\( w_{0} > 0 \\), and slope \\( w_{a} > 0 \\), and generates a different block width \\( u_{j} \\) for each block \\( j < d \\). The key restriction for the RegNet types of model i...
pytorch-image-models/hfdocs/source/models/regnetx.mdx/0
{ "file_path": "pytorch-image-models/hfdocs/source/models/regnetx.mdx", "repo_id": "pytorch-image-models", "token_count": 6565 }
183
# Results CSV files containing an ImageNet-1K and out-of-distribution (OOD) test set validation results for all models with pretrained weights is located in the repository [results folder](https://github.com/rwightman/pytorch-image-models/tree/master/results). ## Self-trained Weights The table below includes ImageNe...
pytorch-image-models/hfdocs/source/results.mdx/0
{ "file_path": "pytorch-image-models/hfdocs/source/results.mdx", "repo_id": "pytorch-image-models", "token_count": 2259 }
184
import logging from .constants import * _logger = logging.getLogger(__name__) def resolve_data_config( args=None, pretrained_cfg=None, model=None, use_test_size=False, verbose=False ): assert model or args or pretrained_cfg, "At least one of model, args, or pretrained_cfg...
pytorch-image-models/timm/data/config.py/0
{ "file_path": "pytorch-image-models/timm/data/config.py", "repo_id": "pytorch-image-models", "token_count": 1927 }
185
""" Dataset reader for HF IterableDataset """ import math import os from itertools import repeat, chain from typing import Optional import torch import torch.distributed as dist from PIL import Image try: import datasets from datasets.distributed import split_dataset_by_node from datasets.splits import Sp...
pytorch-image-models/timm/data/readers/reader_hfids.py/0
{ "file_path": "pytorch-image-models/timm/data/readers/reader_hfids.py", "repo_id": "pytorch-image-models", "token_count": 3798 }
186