text
stringlengths
7
1.24M
id
stringlengths
14
166
metadata
dict
__index_level_0__
int64
0
519
<!--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 to...
diffusers/docs/source/en/api/pipelines/kandinsky.md/0
{ "file_path": "diffusers/docs/source/en/api/pipelines/kandinsky.md", "repo_id": "diffusers", "token_count": 850 }
100
<!--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/en/api/pipelines/pix2pix.md/0
{ "file_path": "diffusers/docs/source/en/api/pipelines/pix2pix.md", "repo_id": "diffusers", "token_count": 707 }
101
<!--Copyright 2024 The Intel Labs Team Authors and 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...
diffusers/docs/source/en/api/pipelines/stable_diffusion/ldm3d_diffusion.md/0
{ "file_path": "diffusers/docs/source/en/api/pipelines/stable_diffusion/ldm3d_diffusion.md", "repo_id": "diffusers", "token_count": 1196 }
102
<!--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/en/optimization/memory.md/0
{ "file_path": "diffusers/docs/source/en/optimization/memory.md", "repo_id": "diffusers", "token_count": 4133 }
103
<!--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/en/training/dreambooth.md/0
{ "file_path": "diffusers/docs/source/en/training/dreambooth.md", "repo_id": "diffusers", "token_count": 8848 }
104
<!--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/en/tutorials/tutorial_overview.md/0
{ "file_path": "diffusers/docs/source/en/tutorials/tutorial_overview.md", "repo_id": "diffusers", "token_count": 412 }
105
<!--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/en/using-diffusers/loading.md/0
{ "file_path": "diffusers/docs/source/en/using-diffusers/loading.md", "repo_id": "diffusers", "token_count": 8497 }
106
<!--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/en/using-diffusers/t2i_adapter.md/0
{ "file_path": "diffusers/docs/source/en/using-diffusers/t2i_adapter.md", "repo_id": "diffusers", "token_count": 2765 }
107
<!--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/conceptual/ethical_guidelines.md/0
{ "file_path": "diffusers/docs/source/ko/conceptual/ethical_guidelines.md", "repo_id": "diffusers", "token_count": 4083 }
108
<!--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/stable_diffusion.md/0
{ "file_path": "diffusers/docs/source/ko/stable_diffusion.md", "repo_id": "diffusers", "token_count": 8885 }
109
<!--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/controlling_generation.md/0
{ "file_path": "diffusers/docs/source/ko/using-diffusers/controlling_generation.md", "repo_id": "diffusers", "token_count": 14036 }
110
# Textual inversion [[open-in-colab]] [`StableDiffusionPipeline`]은 textual-inversion을 지원하는데, 이는 몇 개의 샘플 이미지만으로 stable diffusion과 같은 모델이 새로운 컨셉을 학습할 수 있도록 하는 기법입니다. 이를 통해 생성된 이미지를 더 잘 제어하고 특정 컨셉에 맞게 모델을 조정할 수 있습니다. 커뮤니티에서 만들어진 컨셉들의 컬렉션은 [Stable Diffusion Conceptualizer](https://huggingface.co/spaces/sd-concepts-libra...
diffusers/docs/source/ko/using-diffusers/textual_inversion_inference.md/0
{ "file_path": "diffusers/docs/source/ko/using-diffusers/textual_inversion_inference.md", "repo_id": "diffusers", "token_count": 2018 }
111
#!/usr/bin/env python # coding=utf-8 # 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/LI...
diffusers/examples/advanced_diffusion_training/train_dreambooth_lora_sd15_advanced.py/0
{ "file_path": "diffusers/examples/advanced_diffusion_training/train_dreambooth_lora_sd15_advanced.py", "repo_id": "diffusers", "token_count": 38517 }
112
import inspect from typing import Any, Dict, List, Optional, Union import torch import torch.nn as nn from transformers import AutoModel, AutoTokenizer, CLIPImageProcessor from diffusers import DiffusionPipeline from diffusers.image_processor import VaeImageProcessor from diffusers.loaders import StableDiffusionLoraL...
diffusers/examples/community/gluegen.py/0
{ "file_path": "diffusers/examples/community/gluegen.py", "repo_id": "diffusers", "token_count": 16726 }
113
from typing import Union import torch from PIL import Image from torchvision import transforms as tfms from tqdm.auto import tqdm from transformers import CLIPTextModel, CLIPTokenizer from diffusers import ( AutoencoderKL, DDIMScheduler, DiffusionPipeline, LMSDiscreteScheduler, PNDMScheduler, ...
diffusers/examples/community/magic_mix.py/0
{ "file_path": "diffusers/examples/community/magic_mix.py", "repo_id": "diffusers", "token_count": 2446 }
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/examples/community/sd_text2img_k_diffusion.py/0
{ "file_path": "diffusers/examples/community/sd_text2img_k_diffusion.py", "repo_id": "diffusers", "token_count": 8535 }
115
# Based on stable_diffusion_reference.py from typing import Any, Callable, Dict, List, Optional, Tuple, Union import numpy as np import PIL.Image import torch from diffusers import StableDiffusionXLPipeline from diffusers.models.attention import BasicTransformerBlock from diffusers.models.unets.unet_2d_blocks import...
diffusers/examples/community/stable_diffusion_xl_reference.py/0
{ "file_path": "diffusers/examples/community/stable_diffusion_xl_reference.py", "repo_id": "diffusers", "token_count": 18953 }
116
# DreamBooth training example for FLUX.1 [dev] [DreamBooth](https://arxiv.org/abs/2208.12242) is a method to personalize text2image models like stable diffusion given just a few (3~5) images of a subject. The `train_dreambooth_flux.py` script shows how to implement the training procedure and adapt it for [FLUX.1 [dev...
diffusers/examples/dreambooth/README_flux.md/0
{ "file_path": "diffusers/examples/dreambooth/README_flux.md", "repo_id": "diffusers", "token_count": 2350 }
117
import argparse import logging import math import os from pathlib import Path import jax import jax.numpy as jnp import numpy as np import optax import torch import torch.utils.checkpoint import transformers from flax import jax_utils from flax.training import train_state from flax.training.common_utils import shard f...
diffusers/examples/dreambooth/train_dreambooth_flax.py/0
{ "file_path": "diffusers/examples/dreambooth/train_dreambooth_flax.py", "repo_id": "diffusers", "token_count": 11967 }
118
# Kandinsky2.2 text-to-image fine-tuning Kandinsky 2.2 includes a prior pipeline that generates image embeddings from text prompts, and a decoder pipeline that generates the output image based on the image embeddings. We provide `train_text_to_image_prior.py` and `train_text_to_image_decoder.py` scripts to show you ho...
diffusers/examples/kandinsky2_2/text_to_image/README.md/0
{ "file_path": "diffusers/examples/kandinsky2_2/text_to_image/README.md", "repo_id": "diffusers", "token_count": 4393 }
119
import os import random import torch import torchvision.transforms as transforms from PIL import Image def recalculate_box_and_verify_if_valid(x, y, w, h, image_size, original_image_size, min_box_size): scale = image_size / min(original_image_size) crop_y = (original_image_size[1] * scale - image_size) // 2 ...
diffusers/examples/research_projects/gligen/dataset.py/0
{ "file_path": "diffusers/examples/research_projects/gligen/dataset.py", "repo_id": "diffusers", "token_count": 1897 }
120
import argparse import itertools import math import os import random from pathlib import Path from typing import Iterable import numpy as np import PIL import torch import torch.nn.functional as F import torch.utils.checkpoint from accelerate import Accelerator from accelerate.utils import ProjectConfiguration, set_se...
diffusers/examples/research_projects/intel_opts/textual_inversion_dfq/textual_inversion.py/0
{ "file_path": "diffusers/examples/research_projects/intel_opts/textual_inversion_dfq/textual_inversion.py", "repo_id": "diffusers", "token_count": 18301 }
121
## 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 }
122
import os from typing import List import faiss import numpy as np import torch from datasets import Dataset, load_dataset from PIL import Image from transformers import CLIPImageProcessor, CLIPModel, PretrainedConfig from diffusers import logging logger = logging.get_logger(__name__) # pylint: disable=invalid-name...
diffusers/examples/research_projects/rdm/retriever.py/0
{ "file_path": "diffusers/examples/research_projects/rdm/retriever.py", "repo_id": "diffusers", "token_count": 3929 }
123
#!/usr/bin/env python # coding=utf-8 # 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/LI...
diffusers/examples/research_projects/sd3_lora_colab/train_dreambooth_lora_sd3_miniature.py/0
{ "file_path": "diffusers/examples/research_projects/sd3_lora_colab/train_dreambooth_lora_sd3_miniature.py", "repo_id": "diffusers", "token_count": 19445 }
124
[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 }
125
# Script for converting a Hugging Face Diffusers trained SDXL LoRAs to Kohya format # This means that you can input your diffusers-trained LoRAs and # Get the output to work with WebUIs such as AUTOMATIC1111, ComfyUI, SD.Next and others. # To get started you can find some cool `diffusers` trained LoRAs such as this cu...
diffusers/scripts/convert_diffusers_sdxl_lora_to_webui.py/0
{ "file_path": "diffusers/scripts/convert_diffusers_sdxl_lora_to_webui.py", "repo_id": "diffusers", "token_count": 1027 }
126
import argparse import os import torch from safetensors.torch import load_file from transformers import AutoModel, AutoTokenizer from diffusers import AutoencoderKL, FlowMatchEulerDiscreteScheduler, LuminaNextDiT2DModel, LuminaText2ImgPipeline def main(args): # checkpoint from https://huggingface.co/Alpha-VLLM/...
diffusers/scripts/convert_lumina_to_diffusers.py/0
{ "file_path": "diffusers/scripts/convert_lumina_to_diffusers.py", "repo_id": "diffusers", "token_count": 3156 }
127
# Run this script to convert the Stable Cascade model weights to a diffusers pipeline. import argparse from contextlib import nullcontext import torch from safetensors.torch import load_file from transformers import ( AutoTokenizer, CLIPConfig, CLIPImageProcessor, CLIPTextModelWithProjection, CLIPV...
diffusers/scripts/convert_stable_cascade.py/0
{ "file_path": "diffusers/scripts/convert_stable_cascade.py", "repo_id": "diffusers", "token_count": 3605 }
128
# 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/setup.py/0
{ "file_path": "diffusers/setup.py", "repo_id": "diffusers", "token_count": 3910 }
129
# 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/loaders/ip_adapter.py/0
{ "file_path": "diffusers/src/diffusers/loaders/ip_adapter.py", "repo_id": "diffusers", "token_count": 8065 }
130
# 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/attention.py/0
{ "file_path": "diffusers/src/diffusers/models/attention.py", "repo_id": "diffusers", "token_count": 22931 }
131
# Copyright 2024 HunyuanDiT Authors, Qixun Wang and The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2...
diffusers/src/diffusers/models/controlnet_hunyuan.py/0
{ "file_path": "diffusers/src/diffusers/models/controlnet_hunyuan.py", "repo_id": "diffusers", "token_count": 7435 }
132
# 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/resnet_flax.py/0
{ "file_path": "diffusers/src/diffusers/models/resnet_flax.py", "repo_id": "diffusers", "token_count": 1884 }
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/models/transformers/transformer_temporal.py/0
{ "file_path": "diffusers/src/diffusers/models/transformers/transformer_temporal.py", "repo_id": "diffusers", "token_count": 7332 }
134
# coding=utf-8 # Copyright 2024 The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
diffusers/src/diffusers/models/unets/uvit_2d.py/0
{ "file_path": "diffusers/src/diffusers/models/unets/uvit_2d.py", "repo_id": "diffusers", "token_count": 8280 }
135
# Copyright 2024 The CogVideoX team, Tsinghua University & ZhipuAI and The HuggingFace Team. # All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.o...
diffusers/src/diffusers/pipelines/cogvideo/pipeline_cogvideox.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/cogvideo/pipeline_cogvideox.py", "repo_id": "diffusers", "token_count": 15644 }
136
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 }
137
# 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": 18152 }
138
import torch from transformers import PreTrainedModel, XLMRobertaConfig, XLMRobertaModel class MCLIPConfig(XLMRobertaConfig): model_type = "M-CLIP" def __init__(self, transformerDimSize=1024, imageDimSize=768, **kwargs): self.transformerDimensions = transformerDimSize self.numDims = imageDimS...
diffusers/src/diffusers/pipelines/kandinsky/text_encoder.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/kandinsky/text_encoder.py", "repo_id": "diffusers", "token_count": 405 }
139
# Copyright 2024 PixArt-Sigma 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 # # Unl...
diffusers/src/diffusers/pipelines/pag/pipeline_pag_pixart_sigma.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/pag/pipeline_pag_pixart_sigma.py", "repo_id": "diffusers", "token_count": 19029 }
140
# 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_prior.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/stable_cascade/pipeline_stable_cascade_prior.py", "repo_id": "diffusers", "token_count": 14212 }
141
# 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_diffusion_attend_and_excite/pipeline_stable_diffusion_attend_and_excite.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/stable_diffusion_attend_and_excite/pipeline_stable_diffusion_attend_and_excite.py", "repo_id": "diffusers", "token_count": 22761 }
142
# 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_diffusion_safe/safety_checker.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/stable_diffusion_safe/safety_checker.py", "repo_id": "diffusers", "token_count": 1962 }
143
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/text_to_video_synthesis/__init__.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/text_to_video_synthesis/__init__.py", "repo_id": "diffusers", "token_count": 788 }
144
import torch import torch.nn as nn from ...models.attention_processor import Attention class WuerstchenLayerNorm(nn.LayerNorm): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) def forward(self, x): x = x.permute(0, 2, 3, 1) x = super().forward(x) return...
diffusers/src/diffusers/pipelines/wuerstchen/modeling_wuerstchen_common.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/wuerstchen/modeling_wuerstchen_common.py", "repo_id": "diffusers", "token_count": 1322 }
145
# Copyright 2024 Stanford University Team and The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # #...
diffusers/src/diffusers/schedulers/scheduling_ddim.py/0
{ "file_path": "diffusers/src/diffusers/schedulers/scheduling_ddim.py", "repo_id": "diffusers", "token_count": 10394 }
146
# Copyright 2024 Zhejiang University Team and The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # #...
diffusers/src/diffusers/schedulers/scheduling_pndm_flax.py/0
{ "file_path": "diffusers/src/diffusers/schedulers/scheduling_pndm_flax.py", "repo_id": "diffusers", "token_count": 9597 }
147
# 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/doc_utils.py/0
{ "file_path": "diffusers/src/diffusers/utils/doc_utils.py", "repo_id": "diffusers", "token_count": 506 }
148
# coding=utf-8 # Copyright 2024 The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
diffusers/src/diffusers/utils/hub_utils.py/0
{ "file_path": "diffusers/src/diffusers/utils/hub_utils.py", "repo_id": "diffusers", "token_count": 11110 }
149
import inspect from diffusers.utils import is_flax_available from diffusers.utils.testing_utils import require_flax if is_flax_available(): import jax @require_flax class FlaxModelTesterMixin: def test_output(self): init_dict, inputs_dict = self.prepare_init_args_and_inputs_for_common() mo...
diffusers/tests/models/test_modeling_common_flax.py/0
{ "file_path": "diffusers/tests/models/test_modeling_common_flax.py", "repo_id": "diffusers", "token_count": 1124 }
150
# 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_2d_condition.py/0
{ "file_path": "diffusers/tests/models/unets/test_models_unet_2d_condition.py", "repo_id": "diffusers", "token_count": 28278 }
151
# 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_training.py/0
{ "file_path": "diffusers/tests/others/test_training.py", "repo_id": "diffusers", "token_count": 1481 }
152
# 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/controlnet/test_controlnet_sdxl.py/0
{ "file_path": "diffusers/tests/pipelines/controlnet/test_controlnet_sdxl.py", "repo_id": "diffusers", "token_count": 20606 }
153
# 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/ddim/test_ddim.py/0
{ "file_path": "diffusers/tests/pipelines/ddim/test_ddim.py", "repo_id": "diffusers", "token_count": 2218 }
154
# 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/kandinsky2_2/test_kandinsky_prior.py/0
{ "file_path": "diffusers/tests/pipelines/kandinsky2_2/test_kandinsky_prior.py", "repo_id": "diffusers", "token_count": 4051 }
155
# 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/pag/test_pag_kolors.py/0
{ "file_path": "diffusers/tests/pipelines/pag/test_pag_kolors.py", "repo_id": "diffusers", "token_count": 4755 }
156
# 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/test_onnx_stable_diffusion_inpaint.py/0
{ "file_path": "diffusers/tests/pipelines/stable_diffusion/test_onnx_stable_diffusion_inpaint.py", "repo_id": "diffusers", "token_count": 2242 }
157
# 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_v_pred.py/0
{ "file_path": "diffusers/tests/pipelines/stable_diffusion_2/test_stable_diffusion_v_pred.py", "repo_id": "diffusers", "token_count": 9716 }
158
# 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_ldm3d/test_stable_diffusion_ldm3d.py/0
{ "file_path": "diffusers/tests/pipelines/stable_diffusion_ldm3d/test_stable_diffusion_ldm3d.py", "repo_id": "diffusers", "token_count": 5675 }
159
import gc import random import unittest import numpy as np import torch from transformers import ( CLIPImageProcessor, CLIPTextConfig, CLIPTextModel, CLIPTokenizer, CLIPVisionConfig, CLIPVisionModelWithProjection, ) from diffusers import AutoencoderKL, DDIMScheduler, DDPMScheduler, StableUnCLI...
diffusers/tests/pipelines/stable_unclip/test_stable_unclip_img2img.py/0
{ "file_path": "diffusers/tests/pipelines/stable_unclip/test_stable_unclip_img2img.py", "repo_id": "diffusers", "token_count": 5063 }
160
# 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/unclip/test_unclip.py/0
{ "file_path": "diffusers/tests/pipelines/unclip/test_unclip.py", "repo_id": "diffusers", "token_count": 7983 }
161
import torch from diffusers import SASolverScheduler from diffusers.utils.testing_utils import require_torchsde, torch_device from .test_schedulers import SchedulerCommonTest @require_torchsde class SASolverSchedulerTest(SchedulerCommonTest): scheduler_classes = (SASolverScheduler,) forward_default_kwargs =...
diffusers/tests/schedulers/test_scheduler_sasolver.py/0
{ "file_path": "diffusers/tests/schedulers/test_scheduler_sasolver.py", "repo_id": "diffusers", "token_count": 3629 }
162
import gc import unittest import torch from diffusers import ( StableDiffusionImg2ImgPipeline, ) from diffusers.utils import load_image from diffusers.utils.testing_utils import ( enable_full_determinism, require_torch_gpu, slow, ) from .single_file_testing_utils import SDSingleFileTesterMixin enab...
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": 1546 }
163
# coding=utf-8 # Copyright 2024 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/custom_init_isort.py/0
{ "file_path": "diffusers/utils/custom_init_isort.py", "repo_id": "diffusers", "token_count": 5346 }
164
""" This scripts demonstrates how to evaluate a pretrained policy from the HuggingFace Hub or from your local training outputs directory. In the latter case, you might want to run examples/3_train_policy.py first. """ from pathlib import Path import gym_pusht # noqa: F401 import gymnasium as gym import imageio impor...
lerobot/examples/2_evaluate_pretrained_policy.py/0
{ "file_path": "lerobot/examples/2_evaluate_pretrained_policy.py", "repo_id": "lerobot", "token_count": 1310 }
165
OPENX_DATASET_CONFIGS: fractal20220817_data: image_obs_keys: - image depth_obs_keys: - null state_obs_keys: - base_pose_tool_reached - gripper_closed fps: 3 kuka: image_obs_keys: - image depth_obs_keys: - null state_obs_keys: - clip_function_i...
lerobot/lerobot/common/datasets/push_dataset_to_hub/openx/configs.yaml/0
{ "file_path": "lerobot/lerobot/common/datasets/push_dataset_to_hub/openx/configs.yaml", "repo_id": "lerobot", "token_count": 5970 }
166
#!/usr/bin/env python # Copyright 2024 Tony Z. Zhao 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://www.apache.org/licenses...
lerobot/lerobot/common/policies/act/configuration_act.py/0
{ "file_path": "lerobot/lerobot/common/policies/act/configuration_act.py", "repo_id": "lerobot", "token_count": 3252 }
167
from typing import Protocol class MotorsBus(Protocol): def motor_names(self): ... def set_calibration(self): ... def apply_calibration(self): ... def revert_calibration(self): ... def read(self): ... def write(self): ...
lerobot/lerobot/common/robot_devices/motors/utils.py/0
{ "file_path": "lerobot/lerobot/common/robot_devices/motors/utils.py", "repo_id": "lerobot", "token_count": 88 }
168
# @package _global_ # Use `act_koch_real.yaml` to train on real-world datasets collected on Alexander Koch's robots. # Compared to `act.yaml`, it contains 2 cameras (i.e. laptop, phone) instead of 1 camera (i.e. top). # Also, `training.eval_freq` is set to -1. This config is used to evaluate checkpoints at a certain f...
lerobot/lerobot/configs/policy/act_koch_real.yaml/0
{ "file_path": "lerobot/lerobot/configs/policy/act_koch_real.yaml", "repo_id": "lerobot", "token_count": 1161 }
169
#!/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/scripts/visualize_dataset_html.py/0
{ "file_path": "lerobot/lerobot/scripts/visualize_dataset_html.py", "repo_id": "lerobot", "token_count": 4248 }
170
version https://git-lfs.github.com/spec/v1 oid sha256:79c2a3da1024fa140d23e8438b2756d27cf5db65ac70d7ac4215260b55ca55f8 size 1477064
lerobot/tests/data/lerobot/aloha_mobile_shrimp/train/data-00000-of-00001.arrow/0
{ "file_path": "lerobot/tests/data/lerobot/aloha_mobile_shrimp/train/data-00000-of-00001.arrow", "repo_id": "lerobot", "token_count": 65 }
171
version https://git-lfs.github.com/spec/v1 oid sha256:fb6de86fee6ff3cc5d61d591fe480a50feb289c05770e3f4b76e24138b571c65 size 136
lerobot/tests/data/lerobot/aloha_static_coffee/meta_data/episode_data_index.safetensors/0
{ "file_path": "lerobot/tests/data/lerobot/aloha_static_coffee/meta_data/episode_data_index.safetensors", "repo_id": "lerobot", "token_count": 63 }
172
version https://git-lfs.github.com/spec/v1 oid sha256:a11f160c819a5b5ab2cbb7d7cc60d6eb6cfbbde32a5646fad0d2e04c1c7fa796 size 4752
lerobot/tests/data/lerobot/aloha_static_fork_pick_up/meta_data/stats.safetensors/0
{ "file_path": "lerobot/tests/data/lerobot/aloha_static_fork_pick_up/meta_data/stats.safetensors", "repo_id": "lerobot", "token_count": 71 }
173
version https://git-lfs.github.com/spec/v1 oid sha256:6bdf22208d49cd36d24bc844d4d8bda5e321eafe39d2b470e4fc95c7812fdb24 size 3687117
lerobot/tests/data/save_dataset_to_safetensors/lerobot/aloha_sim_insertion_human/frame_0.safetensors/0
{ "file_path": "lerobot/tests/data/save_dataset_to_safetensors/lerobot/aloha_sim_insertion_human/frame_0.safetensors", "repo_id": "lerobot", "token_count": 67 }
174
version https://git-lfs.github.com/spec/v1 oid sha256:b5a9f73a2356aff9c717cdfd0d37a6da08b0cf2cc09c98edbc9492501b7f64a5 size 5104
lerobot/tests/data/save_policy_to_safetensors/dora_aloha_real_act_real_no_state/actions.safetensors/0
{ "file_path": "lerobot/tests/data/save_policy_to_safetensors/dora_aloha_real_act_real_no_state/actions.safetensors", "repo_id": "lerobot", "token_count": 70 }
175
#!/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/scripts/save_dataset_to_safetensors.py/0
{ "file_path": "lerobot/tests/scripts/save_dataset_to_safetensors.py", "repo_id": "lerobot", "token_count": 1375 }
176
import random from typing import Callable from uuid import uuid4 import numpy as np import pytest import torch from datasets import Dataset from lerobot.common.datasets.utils import ( calculate_episode_data_index, hf_transform_to_torch, reset_episode_index, ) from lerobot.common.utils.utils import ( g...
lerobot/tests/test_utils.py/0
{ "file_path": "lerobot/tests/test_utils.py", "repo_id": "lerobot", "token_count": 1215 }
177
from .configuration_dac import DACConfig from .modeling_dac import DACModel
parler-tts/parler_tts/dac_wrapper/__init__.py/0
{ "file_path": "parler-tts/parler_tts/dac_wrapper/__init__.py", "repo_id": "parler-tts", "token_count": 22 }
178
<!--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/low_level_api.md/0
{ "file_path": "peft/docs/source/developer_guides/low_level_api.md", "repo_id": "peft", "token_count": 1262 }
179
from pathlib import Path import torch from PIL import Image from torch.utils.data import Dataset from torchvision import transforms class DreamBoothDataset(Dataset): """ A dataset to prepare the instance and class images with the prompts for fine-tuning the model. It pre-processes the images and the toke...
peft/examples/boft_dreambooth/utils/dataset.py/0
{ "file_path": "peft/examples/boft_dreambooth/utils/dataset.py", "repo_id": "peft", "token_count": 1884 }
180
import gc import os import sys import threading import psutil import torch from accelerate import Accelerator from datasets import load_dataset from torch.utils.data import DataLoader from tqdm import tqdm from transformers import AutoModelForSeq2SeqLM, AutoTokenizer, get_linear_schedule_with_warmup, set_seed from pe...
peft/examples/conditional_generation/peft_lora_seq2seq_accelerate_ds_zero3_offload.py/0
{ "file_path": "peft/examples/conditional_generation/peft_lora_seq2seq_accelerate_ds_zero3_offload.py", "repo_id": "peft", "token_count": 5607 }
181
<jupyter_start><jupyter_text>Finetuning Whisper-large-V2 on Colab using PEFT-Lora + BNB INT8 training In this Colab, we present a step-by-step guide on how to fine-tune Whisper for any multilingual ASR dataset using Hugging Face 🤗 Transformers and 🤗 PEFT. Using 🤗 PEFT and `bitsandbytes`, you can train the `whisper-l...
peft/examples/int8_training/peft_bnb_whisper_large_v2_training.ipynb/0
{ "file_path": "peft/examples/int8_training/peft_bnb_whisper_large_v2_training.ipynb", "repo_id": "peft", "token_count": 7713 }
182
<jupyter_start><jupyter_text>Using PEFT with custom models `peft` allows us to fine-tune models efficiently with LoRA. In this short notebook, we will demonstrate how to train a simple multilayer perceptron (MLP) using `peft`. Imports Make sure that you have the latest version of `peft` installed. To ensure that, run ...
peft/examples/multilayer_perceptron/multilayer_perceptron_lora.ipynb/0
{ "file_path": "peft/examples/multilayer_perceptron/multilayer_perceptron_lora.ipynb", "repo_id": "peft", "token_count": 4094 }
183
<jupyter_start><jupyter_text>Using VeRA for sequence classification In this example, we fine-tune Roberta on a sequence classification task using VeRA. Imports<jupyter_code>import torch from torch.optim import AdamW from torch.utils.data import DataLoader from peft import ( get_peft_model, VeraConfig, Peft...
peft/examples/sequence_classification/VeRA.ipynb/0
{ "file_path": "peft/examples/sequence_classification/VeRA.ipynb", "repo_id": "peft", "token_count": 2545 }
184
# flake8: noqa # There's no way to ignore "F401 '...' imported but unused" warnings in this # module, but to preserve other warnings. So, don't check this module at all. # coding=utf-8 # Copyright 2023-present the HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not ...
peft/src/peft/__init__.py/0
{ "file_path": "peft/src/peft/__init__.py", "repo_id": "peft", "token_count": 1084 }
185
# 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/adalora/gptq.py/0
{ "file_path": "peft/src/peft/tuners/adalora/gptq.py", "repo_id": "peft", "token_count": 1173 }
186
# 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/fourierft/config.py/0
{ "file_path": "peft/src/peft/tuners/fourierft/config.py", "repo_id": "peft", "token_count": 4021 }
187
# 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/hqq.py/0
{ "file_path": "peft/src/peft/tuners/lora/hqq.py", "repo_id": "peft", "token_count": 5285 }
188
# 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/model.py/0
{ "file_path": "peft/src/peft/tuners/p_tuning/model.py", "repo_id": "peft", "token_count": 2476 }
189
# Copyright 2023-present the HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
peft/src/peft/tuners/vera/model.py/0
{ "file_path": "peft/src/peft/tuners/vera/model.py", "repo_id": "peft", "token_count": 8260 }
190
# 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/conftest.py/0
{ "file_path": "peft/tests/conftest.py", "repo_id": "peft", "token_count": 356 }
191
#!/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_low_level_api.py/0
{ "file_path": "peft/tests/test_low_level_api.py", "repo_id": "peft", "token_count": 1280 }
192
# Changelog ### Aug 8, 2024 * Add RDNet ('DenseNets Reloaded', https://arxiv.org/abs/2403.19588), thanks [Donghyun Kim](https://github.com/dhkim0225) ### July 28, 2024 * Add `mobilenet_edgetpu_v2_m` weights w/ `ra4` mnv4-small based recipe. 80.1% top-1 @ 224 and 80.7 @ 256. * Release 1.0.8 ### July 26, 2024 * More M...
pytorch-image-models/hfdocs/source/changes.mdx/0
{ "file_path": "pytorch-image-models/hfdocs/source/changes.mdx", "repo_id": "pytorch-image-models", "token_count": 43611 }
193
# 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": 2777 }
194
# (Legacy) SE-ResNet **SE ResNet** is a variant of a [ResNet](https://www.paperswithcode.com/method/resnet) that employs [squeeze-and-excitation blocks](https://paperswithcode.com/method/squeeze-and-excitation-block) to enable the network to perform dynamic channel-wise feature recalibration. ## How do I use this mod...
pytorch-image-models/hfdocs/source/models/legacy-se-resnet.mdx/0
{ "file_path": "pytorch-image-models/hfdocs/source/models/legacy-se-resnet.mdx", "repo_id": "pytorch-image-models", "token_count": 3701 }
195
# (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": 2359 }
196
[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 }
197
""" Optimzier Tests These tests were adapted from PyTorch' optimizer tests. """ import math import pytest import functools from copy import deepcopy import torch from torch.testing._internal.common_utils import TestCase from torch.nn import Parameter from timm.scheduler import PlateauLRScheduler from timm.optim imp...
pytorch-image-models/tests/test_optim.py/0
{ "file_path": "pytorch-image-models/tests/test_optim.py", "repo_id": "pytorch-image-models", "token_count": 11722 }
198
""" Mixup and Cutmix Papers: mixup: Beyond Empirical Risk Minimization (https://arxiv.org/abs/1710.09412) CutMix: Regularization Strategy to Train Strong Classifiers with Localizable Features (https://arxiv.org/abs/1905.04899) Code Reference: CutMix: https://github.com/clovaai/CutMix-PyTorch Hacked together by / Co...
pytorch-image-models/timm/data/mixup.py/0
{ "file_path": "pytorch-image-models/timm/data/mixup.py", "repo_id": "pytorch-image-models", "token_count": 7225 }
199