text
stringlengths
7
328k
id
stringlengths
14
166
metadata
dict
__index_level_0__
int64
0
459
FROM nvidia/cuda:12.1.0-runtime-ubuntu20.04 LABEL maintainer="Hugging Face" LABEL repository="diffusers" ENV DEBIAN_FRONTEND=noninteractive RUN apt update && \ apt install -y bash \ build-essential \ git \ git-lfs \ curl \ ca-certificates \ libsndfile1-dev \ libgl1 \ python3.9 \ ...
diffusers/docker/diffusers-pytorch-compile-cuda/Dockerfile/0
{ "file_path": "diffusers/docker/diffusers-pytorch-compile-cuda/Dockerfile", "repo_id": "diffusers", "token_count": 442 }
86
<!--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/loaders/single_file.md/0
{ "file_path": "diffusers/docs/source/en/api/loaders/single_file.md", "repo_id": "diffusers", "token_count": 479 }
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/en/api/pipelines/dance_diffusion.md/0
{ "file_path": "diffusers/docs/source/en/api/pipelines/dance_diffusion.md", "repo_id": "diffusers", "token_count": 369 }
88
<!--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": 1199 }
89
<!--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/conceptual/evaluation.md/0
{ "file_path": "diffusers/docs/source/en/conceptual/evaluation.md", "repo_id": "diffusers", "token_count": 8299 }
90
<!--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/torch2.0.md/0
{ "file_path": "diffusers/docs/source/en/optimization/torch2.0.md", "repo_id": "diffusers", "token_count": 7491 }
91
<!--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/sdxl.md/0
{ "file_path": "diffusers/docs/source/en/training/sdxl.md", "repo_id": "diffusers", "token_count": 4389 }
92
<!--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/controlnet.md/0
{ "file_path": "diffusers/docs/source/en/using-diffusers/controlnet.md", "repo_id": "diffusers", "token_count": 8642 }
93
<!--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_overview.md/0
{ "file_path": "diffusers/docs/source/en/using-diffusers/loading_overview.md", "repo_id": "diffusers", "token_count": 359 }
94
<!--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/unconditional_image_generation.md/0
{ "file_path": "diffusers/docs/source/en/using-diffusers/unconditional_image_generation.md", "repo_id": "diffusers", "token_count": 635 }
95
<!--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/coreml.md/0
{ "file_path": "diffusers/docs/source/ko/optimization/coreml.md", "repo_id": "diffusers", "token_count": 8285 }
96
# 여러 GPU를 사용한 분산 추론 분산 설정에서는 여러 개의 프롬프트를 동시에 생성할 때 유용한 🤗 [Accelerate](https://huggingface.co/docs/accelerate/index) 또는 [PyTorch Distributed](https://pytorch.org/tutorials/beginner/dist_overview.html)를 사용하여 여러 GPU에서 추론을 실행할 수 있습니다. 이 가이드에서는 분산 추론을 위해 🤗 Accelerate와 PyTorch Distributed를 사용하는 방법을 보여드립니다. ## 🤗 Acceler...
diffusers/docs/source/ko/training/distributed_inference.md/0
{ "file_path": "diffusers/docs/source/ko/training/distributed_inference.md", "repo_id": "diffusers", "token_count": 2604 }
97
<!--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/depth2img.md/0
{ "file_path": "diffusers/docs/source/ko/using-diffusers/depth2img.md", "repo_id": "diffusers", "token_count": 1376 }
98
- sections: - local: index title: 🧨 Diffusers - local: quicktour title: Tour rápido - local: installation title: Instalação title: Primeiros passos
diffusers/docs/source/pt/_toctree.yml/0
{ "file_path": "diffusers/docs/source/pt/_toctree.yml", "repo_id": "diffusers", "token_count": 77 }
99
# 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/pipeline_animatediff_img2video.py/0
{ "file_path": "diffusers/examples/community/pipeline_animatediff_img2video.py", "repo_id": "diffusers", "token_count": 20576 }
100
# Copyright 2024 UC Berkeley 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 ...
diffusers/examples/community/scheduling_ufogen.py/0
{ "file_path": "diffusers/examples/community/scheduling_ufogen.py", "repo_id": "diffusers", "token_count": 10846 }
101
# DreamBooth training example [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.py` script shows how to implement the training procedure and adapt it for stable diffusion. ## Running local...
diffusers/examples/dreambooth/README.md/0
{ "file_path": "diffusers/examples/dreambooth/README.md", "repo_id": "diffusers", "token_count": 9833 }
102
# InstructPix2Pix SDXL training example ***This is based on the original InstructPix2Pix training example.*** [Stable Diffusion XL](https://huggingface.co/papers/2307.01952) (or SDXL) is the latest image generation model that is tailored towards more photorealistic outputs with more detailed imagery and composition c...
diffusers/examples/instruct_pix2pix/README_sdxl.md/0
{ "file_path": "diffusers/examples/instruct_pix2pix/README_sdxl.md", "repo_id": "diffusers", "token_count": 3490 }
103
# Stable Diffusion text-to-image fine-tuning This extended LoRA training script was authored by [haofanwang](https://github.com/haofanwang). This is an experimental LoRA extension of [this example](https://github.com/huggingface/diffusers/blob/main/examples/text_to_image/train_text_to_image_lora.py). We further support...
diffusers/examples/research_projects/lora/README.md/0
{ "file_path": "diffusers/examples/research_projects/lora/README.md", "repo_id": "diffusers", "token_count": 1628 }
104
# Stable Diffusion text-to-image fine-tuning The `train_text_to_image.py` script shows how to fine-tune stable diffusion model on your own dataset. ___Note___: ___This script is experimental. The script fine-tunes the whole model and often times the model overfits and runs into issues like catastrophic forgetting. I...
diffusers/examples/research_projects/onnxruntime/text_to_image/README.md/0
{ "file_path": "diffusers/examples/research_projects/onnxruntime/text_to_image/README.md", "repo_id": "diffusers", "token_count": 847 }
105
# RealFill [RealFill](https://arxiv.org/abs/2309.16668) is a method to personalize text2image inpainting models like stable diffusion inpainting given just a few(1~5) images of a scene. The `train_realfill.py` script shows how to implement the training procedure for stable diffusion inpainting. ## Running locally wi...
diffusers/examples/research_projects/realfill/README.md/0
{ "file_path": "diffusers/examples/research_projects/realfill/README.md", "repo_id": "diffusers", "token_count": 1321 }
106
import inspect import os from argparse import ArgumentParser import numpy as np import torch from muse import MaskGiTUViT, VQGANModel from muse import PipelineMuse as OldPipelineMuse from transformers import CLIPTextModelWithProjection, CLIPTokenizer from diffusers import VQModel from diffusers.models.attention_proce...
diffusers/scripts/convert_amused.py/0
{ "file_path": "diffusers/scripts/convert_amused.py", "repo_id": "diffusers", "token_count": 12883 }
107
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 }
108
import argparse import os import torch from transformers import T5EncoderModel, T5Tokenizer from diffusers import AutoencoderKL, DPMSolverMultistepScheduler, PixArtAlphaPipeline, Transformer2DModel ckpt_id = "PixArt-alpha/PixArt-alpha" # https://github.com/PixArt-alpha/PixArt-alpha/blob/0f55e922376d8b797edd44d25d0e...
diffusers/scripts/convert_pixart_alpha_to_diffusers.py/0
{ "file_path": "diffusers/scripts/convert_pixart_alpha_to_diffusers.py", "repo_id": "diffusers", "token_count": 4082 }
109
""" This script modified from https://github.com/huggingface/diffusers/blob/bc691231360a4cbc7d19a58742ebb8ed0f05e027/scripts/convert_original_stable_diffusion_to_diffusers.py Convert original Zero1to3 checkpoint to diffusers checkpoint. # run the convert script $ python convert_zero123_to_diffusers.py \ --checkpoi...
diffusers/scripts/convert_zero123_to_diffusers.py/0
{ "file_path": "diffusers/scripts/convert_zero123_to_diffusers.py", "repo_id": "diffusers", "token_count": 15250 }
110
# 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/image_processor.py/0
{ "file_path": "diffusers/src/diffusers/image_processor.py", "repo_id": "diffusers", "token_count": 18506 }
111
# Copyright 2022 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
diffusers/src/diffusers/models/adapter.py/0
{ "file_path": "diffusers/src/diffusers/models/adapter.py", "repo_id": "diffusers", "token_count": 10101 }
112
# 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/embeddings_flax.py/0
{ "file_path": "diffusers/src/diffusers/models/embeddings_flax.py", "repo_id": "diffusers", "token_count": 1401 }
113
from dataclasses import dataclass from typing import Dict, Optional, Union import torch import torch.nn.functional as F from torch import nn from ...configuration_utils import ConfigMixin, register_to_config from ...loaders import PeftAdapterMixin, UNet2DConditionLoadersMixin from ...utils import BaseOutput from ..at...
diffusers/src/diffusers/models/transformers/prior_transformer.py/0
{ "file_path": "diffusers/src/diffusers/models/transformers/prior_transformer.py", "repo_id": "diffusers", "token_count": 7388 }
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/unets/unet_2d_condition_flax.py/0
{ "file_path": "diffusers/src/diffusers/models/unets/unet_2d_condition_flax.py", "repo_id": "diffusers", "token_count": 10105 }
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/pipelines/amused/pipeline_amused.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/amused/pipeline_amused.py", "repo_id": "diffusers", "token_count": 6937 }
116
# Copyright 2024 Salesforce.com, inc. # 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/LICENS...
diffusers/src/diffusers/pipelines/blip_diffusion/modeling_ctx_clip.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/blip_diffusion/modeling_ctx_clip.py", "repo_id": "diffusers", "token_count": 3809 }
117
from typing import TYPE_CHECKING from ...utils import DIFFUSERS_SLOW_IMPORT, _LazyModule _import_structure = {"pipeline_ddim": ["DDIMPipeline"]} if TYPE_CHECKING or DIFFUSERS_SLOW_IMPORT: from .pipeline_ddim import DDIMPipeline else: import sys sys.modules[__name__] = _LazyModule( __name__, ...
diffusers/src/diffusers/pipelines/ddim/__init__.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/ddim/__init__.py", "repo_id": "diffusers", "token_count": 180 }
118
from typing import TYPE_CHECKING from ...utils import ( DIFFUSERS_SLOW_IMPORT, OptionalDependencyNotAvailable, _LazyModule, get_objects_from_module, is_librosa_available, is_note_seq_available, is_torch_available, is_transformers_available, ) _dummy_objects = {} _import_structure = {}...
diffusers/src/diffusers/pipelines/deprecated/__init__.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/deprecated/__init__.py", "repo_id": "diffusers", "token_count": 2227 }
119
# 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/score_sde_ve/pipeline_score_sde_ve.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/deprecated/score_sde_ve/pipeline_score_sde_ve.py", "repo_id": "diffusers", "token_count": 1759 }
120
from typing import Any, Dict, List, Optional, Tuple, Union import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from diffusers.utils import deprecate from ....configuration_utils import ConfigMixin, register_to_config from ....models import ModelMixin from ....models.activations impo...
diffusers/src/diffusers/pipelines/deprecated/versatile_diffusion/modeling_text_unet.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/deprecated/versatile_diffusion/modeling_text_unet.py", "repo_id": "diffusers", "token_count": 55515 }
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/kandinsky/pipeline_kandinsky_inpaint.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/kandinsky/pipeline_kandinsky_inpaint.py", "repo_id": "diffusers", "token_count": 12786 }
122
# 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": 10927 }
123
# 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/pipeline_stable_diffusion_depth2img.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_depth2img.py", "repo_id": "diffusers", "token_count": 18944 }
124
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/stable_diffusion_gligen/__init__.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/stable_diffusion_gligen/__init__.py", "repo_id": "diffusers", "token_count": 613 }
125
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 = {} _additional_imports = {} _import_structure = {"pipel...
diffusers/src/diffusers/pipelines/stable_diffusion_xl/__init__.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/stable_diffusion_xl/__init__.py", "repo_id": "diffusers", "token_count": 1202 }
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/text_to_video_synthesis/pipeline_text_to_video_synth_img2img.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth_img2img.py", "repo_id": "diffusers", "token_count": 16060 }
127
# 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/wuerstchen/pipeline_wuerstchen.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/wuerstchen/pipeline_wuerstchen.py", "repo_id": "diffusers", "token_count": 9229 }
128
# 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_ipndm.py/0
{ "file_path": "diffusers/src/diffusers/schedulers/scheduling_ipndm.py", "repo_id": "diffusers", "token_count": 3643 }
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/schedulers/scheduling_utils.py/0
{ "file_path": "diffusers/src/diffusers/schedulers/scheduling_utils.py", "repo_id": "diffusers", "token_count": 3227 }
130
# This file is autogenerated by the command `make fix-copies`, do not edit. from ..utils import DummyObject, requires_backends class DPMSolverSDEScheduler(metaclass=DummyObject): _backends = ["torch", "torchsde"] def __init__(self, *args, **kwargs): requires_backends(self, ["torch", "torchsde"]) ...
diffusers/src/diffusers/utils/dummy_torch_and_torchsde_objects.py/0
{ "file_path": "diffusers/src/diffusers/utils/dummy_torch_and_torchsde_objects.py", "repo_id": "diffusers", "token_count": 224 }
131
import functools import importlib import inspect import io import logging import multiprocessing import os import random import re import struct import sys import tempfile import time import unittest import urllib.parse from contextlib import contextmanager from distutils.util import strtobool from io import BytesIO, S...
diffusers/src/diffusers/utils/testing_utils.py/0
{ "file_path": "diffusers/src/diffusers/utils/testing_utils.py", "repo_id": "diffusers", "token_count": 14068 }
132
import unittest import torch from torch import nn from diffusers.models.activations import get_activation class ActivationsTests(unittest.TestCase): def test_swish(self): act = get_activation("swish") self.assertIsInstance(act, nn.SiLU) self.assertEqual(act(torch.tensor(-100, dtype=tor...
diffusers/tests/models/test_activations.py/0
{ "file_path": "diffusers/tests/models/test_activations.py", "repo_id": "diffusers", "token_count": 845 }
133
# 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_unet_2d_blocks.py/0
{ "file_path": "diffusers/tests/models/unets/test_unet_2d_blocks.py", "repo_id": "diffusers", "token_count": 5186 }
134
# 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/amused/test_amused_inpaint.py/0
{ "file_path": "diffusers/tests/pipelines/amused/test_amused_inpaint.py", "repo_id": "diffusers", "token_count": 4713 }
135
# 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_inpaint.py/0
{ "file_path": "diffusers/tests/pipelines/controlnet/test_controlnet_inpaint.py", "repo_id": "diffusers", "token_count": 10750 }
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/pipelines/kandinsky2_2/test_kandinsky_controlnet.py/0
{ "file_path": "diffusers/tests/pipelines/kandinsky2_2/test_kandinsky_controlnet.py", "repo_id": "diffusers", "token_count": 4262 }
137
# coding=utf-8 # Copyright 2023 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
diffusers/tests/pipelines/ledits_pp/test_ledits_pp_stable_diffusion.py/0
{ "file_path": "diffusers/tests/pipelines/ledits_pp/test_ledits_pp_stable_diffusion.py", "repo_id": "diffusers", "token_count": 4188 }
138
# 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/pipelines/shap_e/test_shap_e.py/0
{ "file_path": "diffusers/tests/pipelines/shap_e/test_shap_e.py", "repo_id": "diffusers", "token_count": 3729 }
139
# 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.py/0
{ "file_path": "diffusers/tests/pipelines/stable_diffusion_2/test_stable_diffusion.py", "repo_id": "diffusers", "token_count": 12056 }
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/stable_diffusion_xl/test_stable_diffusion_xl_inpaint.py/0
{ "file_path": "diffusers/tests/pipelines/stable_diffusion_xl/test_stable_diffusion_xl_inpaint.py", "repo_id": "diffusers", "token_count": 15670 }
141
# 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/text_to_video_synthesis/test_text_to_video.py/0
{ "file_path": "diffusers/tests/pipelines/text_to_video_synthesis/test_text_to_video.py", "repo_id": "diffusers", "token_count": 3422 }
142
import torch from diffusers import DDIMInverseScheduler from .test_schedulers import SchedulerCommonTest class DDIMInverseSchedulerTest(SchedulerCommonTest): scheduler_classes = (DDIMInverseScheduler,) forward_default_kwargs = (("num_inference_steps", 50),) def get_scheduler_config(self, **kwargs): ...
diffusers/tests/schedulers/test_scheduler_ddim_inverse.py/0
{ "file_path": "diffusers/tests/schedulers/test_scheduler_ddim_inverse.py", "repo_id": "diffusers", "token_count": 2258 }
143
import torch from diffusers import KDPM2AncestralDiscreteScheduler from diffusers.utils.testing_utils import torch_device from .test_schedulers import SchedulerCommonTest class KDPM2AncestralDiscreteSchedulerTest(SchedulerCommonTest): scheduler_classes = (KDPM2AncestralDiscreteScheduler,) num_inference_step...
diffusers/tests/schedulers/test_scheduler_kdpm2_ancestral.py/0
{ "file_path": "diffusers/tests/schedulers/test_scheduler_kdpm2_ancestral.py", "repo_id": "diffusers", "token_count": 2516 }
144
# 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/check_inits.py/0
{ "file_path": "diffusers/utils/check_inits.py", "repo_id": "diffusers", "token_count": 5410 }
145
# Modèle de diffusion conditionné par la classe <CourseFloatingBanner unit={2} classNames="absolute z-10 right-0 top-0" notebooks={[ {label: "Modèle de diffusion conditionné par la classe", value: "https://colab.research.google.com/github/huggingface/diffusion-models-class/blob/main/units/fr/unit3/class_condition...
diffusion-models-class/units/fr/unit2/3.mdx/0
{ "file_path": "diffusion-models-class/units/fr/unit2/3.mdx", "repo_id": "diffusion-models-class", "token_count": 4505 }
146
# Débruitage inverse des modèles de diffusion implicites (DDIM) <CourseFloatingBanner unit={4} classNames="absolute z-10 right-0 top-0" notebooks={[ {label: "Débruitage inverse des modèles de diffusion implicites (DDIM)", value: "https://colab.research.google.com/github/huggingface/diffusion-models-class/blob/mai...
diffusion-models-class/units/fr/unit4/2.mdx/0
{ "file_path": "diffusion-models-class/units/fr/unit4/2.mdx", "repo_id": "diffusion-models-class", "token_count": 9611 }
147
<jupyter_start><jupyter_text>Tokenizers (PyTorch) Installez la bibliothèque 🤗 *Transformers* pour exécuter ce *notebook*.<jupyter_code>!pip install transformers[sentencepiece] tokenized_text = "Jim Henson était marionnettiste".split() print(tokenized_text) from transformers import CamembertTokenizer tokenizer = Camem...
notebooks/course/fr/chapter2/section4_pt.ipynb/0
{ "file_path": "notebooks/course/fr/chapter2/section4_pt.ipynb", "repo_id": "notebooks", "token_count": 314 }
148
<jupyter_start><jupyter_text>Unigram tokenizationNous gardons un modèle en anglais ici car il n'existe pas de modèle en français utilisant la tokenisation Unigram. Installez les bibliothèques 🤗 *Transformers* et 🤗 *Datasets* pour exécuter ce *notebook*.<jupyter_code>!pip install datasets transformers[sentencepiece] c...
notebooks/course/fr/chapter6/section7.ipynb/0
{ "file_path": "notebooks/course/fr/chapter6/section7.ipynb", "repo_id": "notebooks", "token_count": 1959 }
149
<jupyter_start><jupyter_text>Déboguer le pipeline d'entraînementCe chapitre portant sur le débogage, la langue nous importe peu ici. Nous nous intéressons surtout à la logique du code pour comprendre d'où provient l'erreur. Installez les bibliothèques 🤗 Transformers et 🤗 Datasets pour exécuter ce *notebook*.<jupyter_...
notebooks/course/fr/chapter8/section4.ipynb/0
{ "file_path": "notebooks/course/fr/chapter8/section4.ipynb", "repo_id": "notebooks", "token_count": 3404 }
150
<jupyter_start><jupyter_code>!pip install -q datasets diffusers transformers accelerate torchmetrics[image]<jupyter_output><empty_output><jupyter_text>Evaluating Diffusion ModelsEvaluation of generative models like [Stable Diffusion](https://huggingface.co/docs/diffusers/stable_diffusion) is subjective in nature. But a...
notebooks/diffusers/evaluation.ipynb/0
{ "file_path": "notebooks/diffusers/evaluation.ipynb", "repo_id": "notebooks", "token_count": 7554 }
151
<jupyter_start><jupyter_text>🤗 Training with DiffusersIn recent months, it has become clear that diffusion models have taken the throne as the state-of-the-art generative models. Here, we will use Hugging Face's brand new [Diffusers](https://github.com/huggingface/diffusers) library to train a simple diffusion model. ...
notebooks/diffusers/training_example.ipynb/0
{ "file_path": "notebooks/diffusers/training_example.ipynb", "repo_id": "notebooks", "token_count": 6473 }
152
<jupyter_start><jupyter_text>Yes, Transformers are Effective for Time Series Forecasting (+ Autoformer) IntroductionA few months ago, we introduced the [Informer](https://huggingface.co/blog/informer) model ([Zhou, Haoyi, et al., 2021](https://arxiv.org/abs/2012.07436)), which is a Time Series Transformer that won the ...
notebooks/examples/autoformer-transformers-are-effective.ipynb/0
{ "file_path": "notebooks/examples/autoformer-transformers-are-effective.ipynb", "repo_id": "notebooks", "token_count": 13600 }
153
<jupyter_start><jupyter_text>**Fine-tuning for Image Classification with 🤗 Transformers**This notebook shows how to fine-tune any pretrained Vision model for Image Classification on a custom dataset. The idea is to add a randomly initialized classification head on top of a pre-trained encoder, and fine-tune the model ...
notebooks/examples/image_classification_albumentations.ipynb/0
{ "file_path": "notebooks/examples/image_classification_albumentations.ipynb", "repo_id": "notebooks", "token_count": 7695 }
154
<jupyter_start><jupyter_text>**Fine-tuning Multi-Lingual Speech Model with 🤗 Transformers** This notebook shows how to fine-tune multi-lingual pretrained speech models for Automatic Speech Recognition. This notebook is built to run on the [Common Voice dataset](https://huggingface.co/datasets/common_voice) with any mu...
notebooks/examples/multi_lingual_speech_recognition.ipynb/0
{ "file_path": "notebooks/examples/multi_lingual_speech_recognition.ipynb", "repo_id": "notebooks", "token_count": 11516 }
155
<jupyter_start><jupyter_text>Fine-tuning for Semantic Segmentation with 🤗 TransformersThis tutorial shows how to fine-tune a SegFormer model in TensorFlow for the task of semantic segmentation. The tutorial is a TensorFlow port of this [blog post](https://huggingface.co/blog/fine-tune-segformer). As such, the notebook...
notebooks/examples/semantic_segmentation-tf.ipynb/0
{ "file_path": "notebooks/examples/semantic_segmentation-tf.ipynb", "repo_id": "notebooks", "token_count": 7206 }
156
<jupyter_start><jupyter_text>If you're opening this Notebook on colab, you will probably need to install 🤗 Transformers and 🤗 Datasets. Uncomment the following cell and execute it:<jupyter_code>#! pip install datasets transformers[sentencepiece]<jupyter_output><empty_output><jupyter_text>If you're opening this notebo...
notebooks/examples/tokenizer_training.ipynb/0
{ "file_path": "notebooks/examples/tokenizer_training.ipynb", "repo_id": "notebooks", "token_count": 5402 }
157
<jupyter_start><jupyter_text>Fine-tune BLIP using Hugging Face `transformers`, `datasets`, `peft` 🤗 and `bitsandbytes`Let's leverage recent advances from Parameter Efficient Fine-Tuning methods to fine-tune a large image to text model! We will show through this tutorial that it is possible to fine-tune a 3B scale mode...
notebooks/peft/Fine_tune_BLIP2_on_an_image_captioning_dataset_PEFT.ipynb/0
{ "file_path": "notebooks/peft/Fine_tune_BLIP2_on_an_image_captioning_dataset_PEFT.ipynb", "repo_id": "notebooks", "token_count": 4011 }
158
<jupyter_start><jupyter_text>Hugging Face x Amazon SageMaker - Asynchronous Inference with Hugging Face's Transformers Welcome to this getting started guide. We will use the Hugging Face Inference DLCs and Amazon SageMaker Python SDK to run an [Asynchronous Inference](https://docs.aws.amazon.com/sagemaker/latest/dg/asy...
notebooks/sagemaker/16_async_inference_hf_hub/sagemaker-notebook.ipynb/0
{ "file_path": "notebooks/sagemaker/16_async_inference_hf_hub/sagemaker-notebook.ipynb", "repo_id": "notebooks", "token_count": 4049 }
159
.PHONY: quality style test docs check_dirs := src tests examples docs scripts docker # Check that source code meets quality standards # this target runs checks on all files quality: ruff $(check_dirs) ruff format --check $(check_dirs) doc-builder style src/peft tests docs/source --max_len 119 --check_only # Form...
peft/Makefile/0
{ "file_path": "peft/Makefile", "repo_id": "peft", "token_count": 909 }
160
<!--Copyright 2023 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
peft/docs/source/developer_guides/custom_models.md/0
{ "file_path": "peft/docs/source/developer_guides/custom_models.md", "repo_id": "peft", "token_count": 3721 }
161
<!--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/tutorial/peft_integrations.md/0
{ "file_path": "peft/docs/source/tutorial/peft_integrations.md", "repo_id": "peft", "token_count": 2014 }
162
import os 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, default_data_collator, get_linear_schedule_with_warmup from peft import LoraConfig, TaskType, get_pef...
peft/examples/conditional_generation/peft_lora_seq2seq_accelerate_fsdp.py/0
{ "file_path": "peft/examples/conditional_generation/peft_lora_seq2seq_accelerate_fsdp.py", "repo_id": "peft", "token_count": 2543 }
163
<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 }
164
<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 }
165
compute_environment: LOCAL_MACHINE debug: false distributed_type: FSDP downcast_bf16: 'no' fsdp_config: fsdp_auto_wrap_policy: TRANSFORMER_BASED_WRAP fsdp_backward_prefetch: BACKWARD_PRE fsdp_cpu_ram_efficient_loading: true fsdp_forward_prefetch: false fsdp_offload_params: false fsdp_sharding_strategy: FULL...
peft/examples/sft/configs/fsdp_config.yaml/0
{ "file_path": "peft/examples/sft/configs/fsdp_config.yaml", "repo_id": "peft", "token_count": 265 }
166
# 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 u...
peft/src/peft/tuners/__init__.py/0
{ "file_path": "peft/src/peft/tuners/__init__.py", "repo_id": "peft", "token_count": 443 }
167
# 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/ia3/model.py/0
{ "file_path": "peft/src/peft/tuners/ia3/model.py", "repo_id": "peft", "token_count": 7389 }
168
# Copyright 2023-present the HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
peft/src/peft/tuners/lora/model.py/0
{ "file_path": "peft/src/peft/tuners/lora/model.py", "repo_id": "peft", "token_count": 16010 }
169
# 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/poly/config.py/0
{ "file_path": "peft/src/peft/tuners/poly/config.py", "repo_id": "peft", "token_count": 1408 }
170
# Copyright 2023-present the HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
peft/src/peft/utils/other.py/0
{ "file_path": "peft/src/peft/utils/other.py", "repo_id": "peft", "token_count": 9876 }
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/tests/test_initialization.py/0
{ "file_path": "peft/tests/test_initialization.py", "repo_id": "peft", "token_count": 6394 }
172
title: Model Pages
pytorch-image-models/docs/models/.pages/0
{ "file_path": "pytorch-image-models/docs/models/.pages", "repo_id": "pytorch-image-models", "token_count": 4 }
173
# ESE-VoVNet **VoVNet** is a convolutional neural network that seeks to make [DenseNet](https://paperswithcode.com/method/densenet) more efficient by concatenating all features only once in the last feature map, which makes input size constant and enables enlarging new output channel. Read about [one-shot aggregatio...
pytorch-image-models/docs/models/.templates/models/ese-vovnet.md/0
{ "file_path": "pytorch-image-models/docs/models/.templates/models/ese-vovnet.md", "repo_id": "pytorch-image-models", "token_count": 1127 }
174
# 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). {% include 'code_snippets.md' %} ## How do I train this model? ...
pytorch-image-models/docs/models/.templates/models/mixnet.md/0
{ "file_path": "pytorch-image-models/docs/models/.templates/models/mixnet.md", "repo_id": "pytorch-image-models", "token_count": 1878 }
175
# 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. {% include 'code_snippets.md' %} ...
pytorch-image-models/docs/models/.templates/models/se-resnet.md/0
{ "file_path": "pytorch-image-models/docs/models/.templates/models/se-resnet.md", "repo_id": "pytorch-image-models", "token_count": 1371 }
176
# TResNet A **TResNet** is a variant on a [ResNet](https://paperswithcode.com/method/resnet) that aim to boost accuracy while maintaining GPU training and inference efficiency. They contain several design tricks including a SpaceToDepth stem, [Anti-Alias downsampling](https://paperswithcode.com/method/anti-alias-down...
pytorch-image-models/docs/models/.templates/models/tresnet.md/0
{ "file_path": "pytorch-image-models/docs/models/.templates/models/tresnet.md", "repo_id": "pytorch-image-models", "token_count": 3391 }
177
# AdvProp (EfficientNet) **AdvProp** is an adversarial training scheme which treats adversarial examples as additional examples, to prevent overfitting. Key to the method is the usage of a separate auxiliary batch norm for adversarial examples, as they have different underlying distributions to normal examples. The w...
pytorch-image-models/hfdocs/source/models/advprop.mdx/0
{ "file_path": "pytorch-image-models/hfdocs/source/models/advprop.mdx", "repo_id": "pytorch-image-models", "token_count": 6032 }
178
# (Gluon) ResNeXt A **ResNeXt** repeats a [building block](https://paperswithcode.com/method/resnext-block) that aggregates a set of transformations with the same topology. Compared to a [ResNet](https://paperswithcode.com/method/resnet), it exposes a new dimension, *cardinality* (the size of the set of transformatio...
pytorch-image-models/hfdocs/source/models/gloun-resnext.mdx/0
{ "file_path": "pytorch-image-models/hfdocs/source/models/gloun-resnext.mdx", "repo_id": "pytorch-image-models", "token_count": 2709 }
179
# NASNet **NASNet** is a type of convolutional neural network discovered through neural architecture search. The building blocks consist of normal and reduction cells. ## How do I use this model on an image? To load a pretrained model: ```py >>> import timm >>> model = timm.create_model('nasnetalarge', pretrained=T...
pytorch-image-models/hfdocs/source/models/nasnet.mdx/0
{ "file_path": "pytorch-image-models/hfdocs/source/models/nasnet.mdx", "repo_id": "pytorch-image-models", "token_count": 1536 }
180
# SK-ResNeXt **SK ResNeXt** is a variant of a [ResNeXt](https://www.paperswithcode.com/method/resnext) that employs a [Selective Kernel](https://paperswithcode.com/method/selective-kernel) unit. In general, all the large kernel convolutions in the original bottleneck blocks in ResNext are replaced by the proposed [SK ...
pytorch-image-models/hfdocs/source/models/skresnext.mdx/0
{ "file_path": "pytorch-image-models/hfdocs/source/models/skresnext.mdx", "repo_id": "pytorch-image-models", "token_count": 1643 }
181
# Models [[autodoc]] timm.create_model [[autodoc]] timm.list_models
pytorch-image-models/hfdocs/source/reference/models.mdx/0
{ "file_path": "pytorch-image-models/hfdocs/source/reference/models.mdx", "repo_id": "pytorch-image-models", "token_count": 29 }
182
import os from typing import Optional from .reader_image_folder import ReaderImageFolder from .reader_image_in_tar import ReaderImageInTar def create_reader( name: str, root: Optional[str] = None, split: str = 'train', **kwargs, ): kwargs = {k: v for k, v in kwargs.items() if v is...
pytorch-image-models/timm/data/readers/reader_factory.py/0
{ "file_path": "pytorch-image-models/timm/data/readers/reader_factory.py", "repo_id": "pytorch-image-models", "token_count": 694 }
183
""" Activations (memory-efficient w/ custom autograd) A collection of activations fn and modules with a common interface so that they can easily be swapped. All have an `inplace` arg even if not used. These activations are not compatible with jit scripting or ONNX export of the model, please use either the JIT or bas...
pytorch-image-models/timm/layers/activations_me.py/0
{ "file_path": "pytorch-image-models/timm/layers/activations_me.py", "repo_id": "pytorch-image-models", "token_count": 2598 }
184
""" NormAct (Normalizaiton + Activation Layer) Factory Create norm + act combo modules that attempt to be backwards compatible with separate norm + act isntances in models. Where these are used it will be possible to swap separate BN + act layers with combined modules like IABN or EvoNorms. Hacked together by / Copyr...
pytorch-image-models/timm/layers/create_norm_act.py/0
{ "file_path": "pytorch-image-models/timm/layers/create_norm_act.py", "repo_id": "pytorch-image-models", "token_count": 1594 }
185