text
stringlengths
5
409k
id
stringlengths
14
178
metadata
dict
__index_level_0__
int64
0
572
import argparse import json import pathlib parser = argparse.ArgumentParser() parser.add_argument( "--path", type=str, required=True, help="Path to folder with image-text pairs.", ) parser.add_argument("--caption_column", type=str, default="prompt", help="Name of caption column.") args = parser.parse_...
diffusers/examples/dreambooth/convert_to_imagefolder.py/0
{ "file_path": "diffusers/examples/dreambooth/convert_to_imagefolder.py", "repo_id": "diffusers", "token_count": 367 }
100
import warnings from diffusers import StableDiffusionInpaintPipeline as StableDiffusionInpaintPipeline # noqa F401 warnings.warn( "The `inpainting.py` script is outdated. Please use directly `from diffusers import" " StableDiffusionInpaintPipeline` instead." )
diffusers/examples/inference/inpainting.py/0
{ "file_path": "diffusers/examples/inference/inpainting.py", "repo_id": "diffusers", "token_count": 89 }
101
## Diffusion-based Policy Learning for RL `diffusion_policy` implements [Diffusion Policy](https://diffusion-policy.cs.columbia.edu/), a diffusion model that predicts robot action sequences in reinforcement learning tasks. This example implements a robot control model for pushing a T-shaped block into a target area....
diffusers/examples/reinforcement_learning/README.md/0
{ "file_path": "diffusers/examples/reinforcement_learning/README.md", "repo_id": "diffusers", "token_count": 465 }
102
# GeoDiff > [!TIP] > This notebook is not actively maintained by the Diffusers team. For any questions or comments, please contact [natolambert](https://twitter.com/natolambert). This is an experimental research notebook demonstrating how to generate stable 3D structures of molecules with [GeoDiff](https://github.com...
diffusers/examples/research_projects/geodiff/README.md/0
{ "file_path": "diffusers/examples/research_projects/geodiff/README.md", "repo_id": "diffusers", "token_count": 95 }
103
# Distillation for quantization on Textual Inversion models to personalize text2image [Textual inversion](https://arxiv.org/abs/2208.01618) is a method to personalize text2image models like stable diffusion on your own images._By using just 3-5 images new concepts can be taught to Stable Diffusion and the model person...
diffusers/examples/research_projects/intel_opts/textual_inversion_dfq/README.md/0
{ "file_path": "diffusers/examples/research_projects/intel_opts/textual_inversion_dfq/README.md", "repo_id": "diffusers", "token_count": 1443 }
104
# Multi Subject Dreambooth for Inpainting Models Please note that this project is not actively maintained. However, you can open an issue and tag @gzguevara. [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. Thi...
diffusers/examples/research_projects/multi_subject_dreambooth_inpainting/README.md/0
{ "file_path": "diffusers/examples/research_projects/multi_subject_dreambooth_inpainting/README.md", "repo_id": "diffusers", "token_count": 1665 }
105
## Training examples Creating a training image set is [described in a different document](https://huggingface.co/docs/datasets/image_process#image-datasets). ### Installing the dependencies Before running the scripts, make sure to install the library's training dependencies: **Important** To make sure you can succ...
diffusers/examples/research_projects/onnxruntime/unconditional_image_generation/README.md/0
{ "file_path": "diffusers/examples/research_projects/onnxruntime/unconditional_image_generation/README.md", "repo_id": "diffusers", "token_count": 500 }
106
# Stable Diffusion text-to-image fine-tuning using PyTorch/XLA The `train_text_to_image_xla.py` script shows how to fine-tune stable diffusion model on TPU devices using PyTorch/XLA. It has been tested on v4 and v5p TPU versions. Training code has been tested on multi-host. This script implements Distributed Data P...
diffusers/examples/research_projects/pytorch_xla/training/text_to_image/README.md/0
{ "file_path": "diffusers/examples/research_projects/pytorch_xla/training/text_to_image/README.md", "repo_id": "diffusers", "token_count": 2275 }
107
#!/usr/bin/env python # coding=utf-8 # Copyright 2025 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LI...
diffusers/examples/research_projects/scheduled_huber_loss_training/text_to_image/train_text_to_image_lora_sdxl.py/0
{ "file_path": "diffusers/examples/research_projects/scheduled_huber_loss_training/text_to_image/train_text_to_image_lora_sdxl.py", "repo_id": "diffusers", "token_count": 26445 }
108
#!/usr/bin/env python # coding=utf-8 # Copyright 2025 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LI...
diffusers/examples/text_to_image/test_text_to_image.py/0
{ "file_path": "diffusers/examples/text_to_image/test_text_to_image.py", "repo_id": "diffusers", "token_count": 7427 }
109
## Training an unconditional diffusion model Creating a training image set is [described in a different document](https://huggingface.co/docs/datasets/image_process#image-datasets). ### Installing the dependencies Before running the scripts, make sure to install the library's training dependencies: **Important** T...
diffusers/examples/unconditional_image_generation/README.md/0
{ "file_path": "diffusers/examples/unconditional_image_generation/README.md", "repo_id": "diffusers", "token_count": 1939 }
110
import argparse from typing import Dict import torch import torch.nn as nn from diffusers import SparseControlNetModel KEYS_RENAME_MAPPING = { ".attention_blocks.0": ".attn1", ".attention_blocks.1": ".attn2", ".attn1.pos_encoder": ".pos_embed", ".ff_norm": ".norm3", ".norms.0": ".norm1", ".n...
diffusers/scripts/convert_animatediff_sparsectrl_to_diffusers.py/0
{ "file_path": "diffusers/scripts/convert_animatediff_sparsectrl_to_diffusers.py", "repo_id": "diffusers", "token_count": 1144 }
111
import argparse import os import torch from torchvision.datasets.utils import download_url from diffusers import AutoencoderKL, DDIMScheduler, DiTPipeline, Transformer2DModel pretrained_models = {512: "DiT-XL-2-512x512.pt", 256: "DiT-XL-2-256x256.pt"} def download_model(model_name): """ Downloads a pre-tr...
diffusers/scripts/convert_dit_to_diffusers.py/0
{ "file_path": "diffusers/scripts/convert_dit_to_diffusers.py", "repo_id": "diffusers", "token_count": 3037 }
112
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 }
113
""" A script to convert Stable Diffusion 3.5 ControlNet checkpoints to the Diffusers format. Example: Convert a SD3.5 ControlNet checkpoint to Diffusers format using local file: ```bash python scripts/convert_sd3_controlnet_to_diffusers.py \ --checkpoint_path "path/to/local/sd3.5_large_controlnet_c...
diffusers/scripts/convert_sd3_controlnet_to_diffusers.py/0
{ "file_path": "diffusers/scripts/convert_sd3_controlnet_to_diffusers.py", "repo_id": "diffusers", "token_count": 3453 }
114
""" This script ports models from VQ-diffusion (https://github.com/microsoft/VQ-Diffusion) to diffusers. It currently only supports porting the ITHQ dataset. ITHQ dataset: ```sh # From the root directory of diffusers. # Download the VQVAE checkpoint $ wget https://facevcstandard.blob.core.windows.net/v-zhictang/Impr...
diffusers/scripts/convert_vq_diffusion_to_diffusers.py/0
{ "file_path": "diffusers/scripts/convert_vq_diffusion_to_diffusers.py", "repo_id": "diffusers", "token_count": 14916 }
115
from .rl import ValueGuidedRLPipeline
diffusers/src/diffusers/experimental/__init__.py/0
{ "file_path": "diffusers/src/diffusers/experimental/__init__.py", "repo_id": "diffusers", "token_count": 12 }
116
# 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/single_file_model.py/0
{ "file_path": "diffusers/src/diffusers/loaders/single_file_model.py", "repo_id": "diffusers", "token_count": 8234 }
117
# Copyright 2024 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
diffusers/src/diffusers/models/autoencoders/autoencoder_asym_kl.py/0
{ "file_path": "diffusers/src/diffusers/models/autoencoders/autoencoder_asym_kl.py", "repo_id": "diffusers", "token_count": 3202 }
118
# Copyright 2024 Black Forest Labs, The HuggingFace Team and The InstantX Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LIC...
diffusers/src/diffusers/models/controlnet_flux.py/0
{ "file_path": "diffusers/src/diffusers/models/controlnet_flux.py", "repo_id": "diffusers", "token_count": 1280 }
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/models/embeddings_flax.py/0
{ "file_path": "diffusers/src/diffusers/models/embeddings_flax.py", "repo_id": "diffusers", "token_count": 1749 }
120
# 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/dual_transformer_2d.py/0
{ "file_path": "diffusers/src/diffusers/models/transformers/dual_transformer_2d.py", "repo_id": "diffusers", "token_count": 3174 }
121
# Copyright 2024 Alpha-VLLM Authors and The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unles...
diffusers/src/diffusers/models/transformers/transformer_lumina2.py/0
{ "file_path": "diffusers/src/diffusers/models/transformers/transformer_lumina2.py", "repo_id": "diffusers", "token_count": 10374 }
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/models/unets/unet_kandinsky3.py/0
{ "file_path": "diffusers/src/diffusers/models/unets/unet_kandinsky3.py", "repo_id": "diffusers", "token_count": 9581 }
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/amused/pipeline_amused_img2img.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/amused/pipeline_amused_img2img.py", "repo_id": "diffusers", "token_count": 7695 }
124
# Copyright 2024 AuraFlow Authors and The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
diffusers/src/diffusers/pipelines/aura_flow/pipeline_aura_flow.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/aura_flow/pipeline_aura_flow.py", "repo_id": "diffusers", "token_count": 13778 }
125
from typing import TYPE_CHECKING from ...utils import ( DIFFUSERS_SLOW_IMPORT, OptionalDependencyNotAvailable, _LazyModule, get_objects_from_module, is_torch_available, is_transformers_available, ) _dummy_objects = {} _additional_imports = {} _import_structure = {"pipeline_output": ["CogView4...
diffusers/src/diffusers/pipelines/cogview4/__init__.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/cogview4/__init__.py", "repo_id": "diffusers", "token_count": 590 }
126
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 }
127
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 }
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/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 }
129
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": 54027 }
130
# Copyright 2024 Alibaba DAMO-VILAB and The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unles...
diffusers/src/diffusers/pipelines/i2vgen_xl/pipeline_i2vgen_xl.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/i2vgen_xl/pipeline_i2vgen_xl.py", "repo_id": "diffusers", "token_count": 16480 }
131
from typing import List, Optional, Union import PIL.Image import torch from transformers import CLIPImageProcessor, CLIPTextModelWithProjection, CLIPTokenizer, CLIPVisionModelWithProjection from ...models import PriorTransformer from ...schedulers import UnCLIPScheduler from ...utils import ( is_torch_xla_availab...
diffusers/src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_prior_emb2emb.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_prior_emb2emb.py", "repo_id": "diffusers", "token_count": 11343 }
132
import inspect from typing import List, Optional, Tuple, Union import numpy as np import PIL.Image import torch import torch.utils.checkpoint from ...models import UNet2DModel, VQModel from ...schedulers import ( DDIMScheduler, DPMSolverMultistepScheduler, EulerAncestralDiscreteScheduler, EulerDiscret...
diffusers/src/diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion_superresolution.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion_superresolution.py", "repo_id": "diffusers", "token_count": 3566 }
133
from typing import List, Optional, Tuple, Union import numpy as np import PIL import torch import torch.nn.functional as F from PIL import Image from ... import ConfigMixin from ...configuration_utils import register_to_config from ...image_processor import PipelineImageInput from ...utils import CONFIG_NAME, logging...
diffusers/src/diffusers/pipelines/marigold/marigold_image_processing.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/marigold/marigold_image_processing.py", "repo_id": "diffusers", "token_count": 11971 }
134
# 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/paint_by_example/image_encoder.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/paint_by_example/image_encoder.py", "repo_id": "diffusers", "token_count": 942 }
135
from typing import TYPE_CHECKING from ...utils import ( DIFFUSERS_SLOW_IMPORT, OptionalDependencyNotAvailable, _LazyModule, get_objects_from_module, is_torch_available, is_transformers_available, ) _dummy_objects = {} _import_structure = {} try: if not (is_transformers_available() and is...
diffusers/src/diffusers/pipelines/shap_e/__init__.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/shap_e/__init__.py", "repo_id": "diffusers", "token_count": 939 }
136
# 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_flax_stable_diffusion.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/stable_diffusion/pipeline_flax_stable_diffusion.py", "repo_id": "diffusers", "token_count": 9111 }
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/stable_diffusion/pipeline_stable_unclip.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/stable_diffusion/pipeline_stable_unclip.py", "repo_id": "diffusers", "token_count": 19926 }
138
from dataclasses import dataclass from typing import List, Union import numpy as np import PIL.Image from ...utils import BaseOutput, is_flax_available @dataclass class StableDiffusionXLPipelineOutput(BaseOutput): """ Output class for Stable Diffusion pipelines. Args: images (`List[PIL.Image.Im...
diffusers/src/diffusers/pipelines/stable_diffusion_xl/pipeline_output.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/stable_diffusion_xl/pipeline_output.py", "repo_id": "diffusers", "token_count": 401 }
139
import copy import inspect from dataclasses import dataclass from typing import Any, Callable, Dict, List, Optional, Tuple, Union import numpy as np import PIL import torch import torch.nn.functional as F from torch.nn.functional import grid_sample from transformers import ( CLIPImageProcessor, CLIPTextModel, ...
diffusers/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_zero_sdxl.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_zero_sdxl.py", "repo_id": "diffusers", "token_count": 28929 }
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/schedulers/__init__.py/0
{ "file_path": "diffusers/src/diffusers/schedulers/__init__.py", "repo_id": "diffusers", "token_count": 4369 }
141
# Copyright (c) 2022 Pablo PernΓ­as MIT License # 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://...
diffusers/src/diffusers/schedulers/scheduling_ddpm_wuerstchen.py/0
{ "file_path": "diffusers/src/diffusers/schedulers/scheduling_ddpm_wuerstchen.py", "repo_id": "diffusers", "token_count": 3645 }
142
# 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": 3642 }
143
# 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": 3405 }
144
# This file is autogenerated by the command `make fix-copies`, do not edit. from ..utils import DummyObject, requires_backends class CosineDPMSolverMultistepScheduler(metaclass=DummyObject): _backends = ["torch", "torchsde"] def __init__(self, *args, **kwargs): requires_backends(self, ["torch", "torc...
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": 416 }
145
import ast import importlib import inspect import textwrap class ReturnNameVisitor(ast.NodeVisitor): """Thanks to ChatGPT for pairing.""" def __init__(self): self.return_names = [] def visit_Return(self, node): # Check if the return value is a tuple. if isinstance(node.value, ast...
diffusers/src/diffusers/utils/source_code_parsing_utils.py/0
{ "file_path": "diffusers/src/diffusers/utils/source_code_parsing_utils.py", "repo_id": "diffusers", "token_count": 901 }
146
# 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/lora/test_lora_layers_hunyuanvideo.py/0
{ "file_path": "diffusers/tests/lora/test_lora_layers_hunyuanvideo.py", "repo_id": "diffusers", "token_count": 3774 }
147
# 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/autoencoders/test_models_autoencoder_kl_temporal_decoder.py/0
{ "file_path": "diffusers/tests/models/autoencoders/test_models_autoencoder_kl_temporal_decoder.py", "repo_id": "diffusers", "token_count": 873 }
148
# 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/transformers/test_models_prior.py/0
{ "file_path": "diffusers/tests/models/transformers/test_models_prior.py", "repo_id": "diffusers", "token_count": 2687 }
149
# Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
diffusers/tests/models/transformers/test_models_transformer_sana.py/0
{ "file_path": "diffusers/tests/models/transformers/test_models_transformer_sana.py", "repo_id": "diffusers", "token_count": 1065 }
150
import os import sys import unittest from unittest.mock import mock_open, patch git_repo_path = os.path.abspath(os.path.dirname(os.path.dirname(os.path.dirname(__file__)))) sys.path.append(os.path.join(git_repo_path, "utils")) from check_support_list import check_documentation # noqa: E402 class TestCheckSupportL...
diffusers/tests/others/test_check_support_list.py/0
{ "file_path": "diffusers/tests/others/test_check_support_list.py", "repo_id": "diffusers", "token_count": 1074 }
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/pipelines/amused/test_amused_inpaint.py/0
{ "file_path": "diffusers/tests/pipelines/amused/test_amused_inpaint.py", "repo_id": "diffusers", "token_count": 4672 }
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_img2img.py/0
{ "file_path": "diffusers/tests/pipelines/controlnet/test_controlnet_img2img.py", "repo_id": "diffusers", "token_count": 7935 }
153
# 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/controlnet_xs/test_controlnetxs.py/0
{ "file_path": "diffusers/tests/pipelines/controlnet_xs/test_controlnetxs.py", "repo_id": "diffusers", "token_count": 6786 }
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/dit/test_dit.py/0
{ "file_path": "diffusers/tests/pipelines/dit/test_dit.py", "repo_id": "diffusers", "token_count": 2394 }
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/i2vgen_xl/test_i2vgenxl.py/0
{ "file_path": "diffusers/tests/pipelines/i2vgen_xl/test_i2vgenxl.py", "repo_id": "diffusers", "token_count": 4354 }
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/kandinsky2_2/test_kandinsky_prior_emb2emb.py/0
{ "file_path": "diffusers/tests/pipelines/kandinsky2_2/test_kandinsky_prior_emb2emb.py", "repo_id": "diffusers", "token_count": 3328 }
157
# 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": 4193 }
158
# Copyright 2024 The HuggingFace Team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
diffusers/tests/pipelines/sana/test_sana.py/0
{ "file_path": "diffusers/tests/pipelines/sana/test_sana.py", "repo_id": "diffusers", "token_count": 6382 }
159
# coding=utf-8 # Copyright 2022 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
diffusers/tests/pipelines/stable_diffusion/test_onnx_stable_diffusion_upscale.py/0
{ "file_path": "diffusers/tests/pipelines/stable_diffusion/test_onnx_stable_diffusion_upscale.py", "repo_id": "diffusers", "token_count": 3917 }
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_image_variation.py/0
{ "file_path": "diffusers/tests/pipelines/unclip/test_unclip_image_variation.py", "repo_id": "diffusers", "token_count": 8242 }
161
import torch from diffusers import DDIMScheduler from .test_schedulers import SchedulerCommonTest class DDIMSchedulerTest(SchedulerCommonTest): scheduler_classes = (DDIMScheduler,) forward_default_kwargs = (("eta", 0.0), ("num_inference_steps", 50)) def get_scheduler_config(self, **kwargs): con...
diffusers/tests/schedulers/test_scheduler_ddim.py/0
{ "file_path": "diffusers/tests/schedulers/test_scheduler_ddim.py", "repo_id": "diffusers", "token_count": 3127 }
162
import tempfile import unittest import torch from diffusers import IPNDMScheduler from .test_schedulers import SchedulerCommonTest class IPNDMSchedulerTest(SchedulerCommonTest): scheduler_classes = (IPNDMScheduler,) forward_default_kwargs = (("num_inference_steps", 50),) def get_scheduler_config(self,...
diffusers/tests/schedulers/test_scheduler_ipndm.py/0
{ "file_path": "diffusers/tests/schedulers/test_scheduler_ipndm.py", "repo_id": "diffusers", "token_count": 3140 }
163
# 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/single_file/test_model_autoencoder_dc_single_file.py/0
{ "file_path": "diffusers/tests/single_file/test_model_autoencoder_dc_single_file.py", "repo_id": "diffusers", "token_count": 2113 }
164
import gc import unittest import torch from diffusers import StableDiffusionXLInstructPix2PixPipeline from diffusers.utils.testing_utils import ( backend_empty_cache, enable_full_determinism, require_torch_accelerator, slow, torch_device, ) enable_full_determinism() @slow @require_torch_accele...
diffusers/tests/single_file/test_stable_diffusion_xl_instruct_pix2pix.py/0
{ "file_path": "diffusers/tests/single_file/test_stable_diffusion_xl_instruct_pix2pix.py", "repo_id": "diffusers", "token_count": 685 }
165
""" 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. It requires the installation of the 'gym_pusht' simulation environment. Install it by running: ```bash pi...
lerobot/examples/2_evaluate_pretrained_policy.py/0
{ "file_path": "lerobot/examples/2_evaluate_pretrained_policy.py", "repo_id": "lerobot", "token_count": 1312 }
166
#!/usr/bin/env python # Copyright 2024 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
lerobot/lerobot/common/datasets/lerobot_dataset.py/0
{ "file_path": "lerobot/lerobot/common/datasets/lerobot_dataset.py", "repo_id": "lerobot", "token_count": 20806 }
167
#!/usr/bin/env python # Copyright 2024 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
lerobot/lerobot/common/datasets/push_dataset_to_hub/aloha_hdf5_format.py/0
{ "file_path": "lerobot/lerobot/common/datasets/push_dataset_to_hub/aloha_hdf5_format.py", "repo_id": "lerobot", "token_count": 3851 }
168
#!/usr/bin/env python # Copyright 2024 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
lerobot/lerobot/common/envs/factory.py/0
{ "file_path": "lerobot/lerobot/common/envs/factory.py", "repo_id": "lerobot", "token_count": 913 }
169
from transformers import GemmaConfig, PaliGemmaConfig def get_paligemma_config(precision: str): config = { "image_token_index": None, "pad_token_id": 0, "bos_token_id": 2, "eos_token_id": 1, } # image_sizes = {"2b-test": 224, "3b-224px": 224, "3b-448px": 448, "3b-896px": 8...
lerobot/lerobot/common/policies/pi0/conversion_scripts/conversion_utils.py/0
{ "file_path": "lerobot/lerobot/common/policies/pi0/conversion_scripts/conversion_utils.py", "repo_id": "lerobot", "token_count": 999 }
170
import logging from dataclasses import dataclass from pathlib import Path import draccus from lerobot.common.robot_devices.robots.configs import RobotConfig from lerobot.common.utils.utils import auto_select_torch_device, is_amp_available, is_torch_device_available from lerobot.configs import parser from lerobot.conf...
lerobot/lerobot/common/robot_devices/control_configs.py/0
{ "file_path": "lerobot/lerobot/common/robot_devices/control_configs.py", "repo_id": "lerobot", "token_count": 2306 }
171
#!/usr/bin/env python # Copyright 2024 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
lerobot/lerobot/common/utils/io_utils.py/0
{ "file_path": "lerobot/lerobot/common/utils/io_utils.py", "repo_id": "lerobot", "token_count": 1707 }
172
#!/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/eval.py/0
{ "file_path": "lerobot/lerobot/scripts/eval.py", "repo_id": "lerobot", "token_count": 8134 }
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:07c5c1a63998884ee747a6d0aa8f49217da3c32af2760dad2a9da794d3517003 size 85353
lerobot/tests/data/save_dataset_to_safetensors/lerobot/xarm_lift_medium/frame_23.safetensors/0
{ "file_path": "lerobot/tests/data/save_dataset_to_safetensors/lerobot/xarm_lift_medium/frame_23.safetensors", "repo_id": "lerobot", "token_count": 65 }
175
version https://git-lfs.github.com/spec/v1 oid sha256:0c259ea9c40aab3841ca35b2a2e708d8829b0a9163b2f9e5efd28f1c65848293 size 4600
lerobot/tests/data/save_policy_to_safetensors/pusht_diffusion/actions.safetensors/0
{ "file_path": "lerobot/tests/data/save_policy_to_safetensors/pusht_diffusion/actions.safetensors", "repo_id": "lerobot", "token_count": 69 }
176
import pytest import torch from lerobot.common.optim.optimizers import AdamConfig from lerobot.common.optim.schedulers import VQBeTSchedulerConfig @pytest.fixture def model_params(): return [torch.nn.Parameter(torch.randn(10, 10))] @pytest.fixture def optimizer(model_params): optimizer = AdamConfig().build...
lerobot/tests/fixtures/optimizers.py/0
{ "file_path": "lerobot/tests/fixtures/optimizers.py", "repo_id": "lerobot", "token_count": 252 }
177
#!/usr/bin/env python # Copyright 2024 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
lerobot/tests/test_image_transforms.py/0
{ "file_path": "lerobot/tests/test_image_transforms.py", "repo_id": "lerobot", "token_count": 5944 }
178
#!/usr/bin/env python # Copyright 2024 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
lerobot/tests/utils.py/0
{ "file_path": "lerobot/tests/utils.py", "repo_id": "lerobot", "token_count": 4768 }
179
# Open R1 *A fully open reproduction of DeepSeek-R1. This repo is a work in progress, let's build it together!* **Table of Contents** 1. [Overview](#overview) 2. [Plan of attack](#plan-of-attack) 3. [Installation](#installation) 4. [Training models](#training-models) - [SFT](#sft) - [GRPO](#grpo) ...
open-r1/README.md/0
{ "file_path": "open-r1/README.md", "repo_id": "open-r1", "token_count": 9400 }
180
[isort] default_section = FIRSTPARTY ensure_newline_before_comments = True force_grid_wrap = 0 include_trailing_comma = True known_first_party = open_r1 known_third_party = transformers datasets fugashi git h5py matplotlib nltk numpy packaging pandas psutil pytest rou...
open-r1/setup.cfg/0
{ "file_path": "open-r1/setup.cfg", "repo_id": "open-r1", "token_count": 300 }
181
from .import_utils import is_e2b_available from .model_utils import get_tokenizer __all__ = ["get_tokenizer", "is_e2b_available"]
open-r1/src/open_r1/utils/__init__.py/0
{ "file_path": "open-r1/src/open_r1/utils/__init__.py", "repo_id": "open-r1", "token_count": 46 }
182
<!--- 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 ...
peft/docs/README.md/0
{ "file_path": "peft/docs/README.md", "repo_id": "peft", "token_count": 2889 }
183
<!--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/quantization.md/0
{ "file_path": "peft/docs/source/developer_guides/quantization.md", "repo_id": "peft", "token_count": 3748 }
184
#!/usr/bin/env python # 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 require...
peft/examples/boft_controlnet/train_controlnet.py/0
{ "file_path": "peft/examples/boft_controlnet/train_controlnet.py", "repo_id": "peft", "token_count": 10032 }
185
import os import torch 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 AdaLoraConfig, PeftConfig, PeftModel, TaskType, get_peft_model ...
peft/examples/conditional_generation/peft_adalora_seq2seq.py/0
{ "file_path": "peft/examples/conditional_generation/peft_adalora_seq2seq.py", "repo_id": "peft", "token_count": 2253 }
186
<jupyter_start><jupyter_text>PEFT with DNA Language Models This notebook demonstrates how to utilize parameter-efficient fine-tuning techniques (PEFT) from the PEFT library to fine-tune a DNA Language Model (DNA-LM). The fine-tuned DNA-LM will be applied to solve a task from the nucleotide benchmark dataset. Parameter-...
peft/examples/dna_language_models/dna_lm.ipynb/0
{ "file_path": "peft/examples/dna_language_models/dna_lm.ipynb", "repo_id": "peft", "token_count": 3782 }
187
<jupyter_start><jupyter_code>import os from PIL import Image import torch from accelerate.logging import get_logger from diffusers import StableDiffusionPipeline from diffusers.utils import check_min_version from peft import PeftModel # Will error if the minimal version of diffusers is not installed. Remove at your...
peft/examples/hra_dreambooth/dreambooth_inference.ipynb/0
{ "file_path": "peft/examples/hra_dreambooth/dreambooth_inference.ipynb", "repo_id": "peft", "token_count": 1113 }
188
accelerate launch --config_file config.yaml peft_adalora_whisper_large_training.py \ --model_name_or_path "openai/whisper-large-v2" \ --language "Marathi" \ --language_abbr "mr" \ --task "transcribe" \ --dataset_name "mozilla-foundation/common_voice_11_0" \ --push_to_hub \ --preprocessing_nu...
peft/examples/int8_training/run_adalora_whisper_int8.sh/0
{ "file_path": "peft/examples/int8_training/run_adalora_whisper_int8.sh", "repo_id": "peft", "token_count": 509 }
189
<jupyter_start><jupyter_text>Dreambooth with OFTThis Notebook assumes that you already ran the train_dreambooth.py script to create your own adapter.<jupyter_code>from diffusers import DiffusionPipeline from diffusers.utils import check_min_version, get_logger from peft import PeftModel # Will error if the minimal ver...
peft/examples/oft_dreambooth/oft_dreambooth_inference.ipynb/0
{ "file_path": "peft/examples/oft_dreambooth/oft_dreambooth_inference.ipynb", "repo_id": "peft", "token_count": 376 }
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/scripts/launch_notebook_mp.py/0
{ "file_path": "peft/scripts/launch_notebook_mp.py", "repo_id": "peft", "token_count": 474 }
191
# Copyright 2023-present the HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
peft/src/peft/tuners/__init__.py/0
{ "file_path": "peft/src/peft/tuners/__init__.py", "repo_id": "peft", "token_count": 1113 }
192
#include <torch/torch.h> #include <vector> #include <iostream> #include <torch/extension.h> std::vector<at::Tensor> forward_fast_block_diag_cuda( at::Tensor input); std::vector<at::Tensor> forward_fast_block_diag( at::Tensor input ) { return forward_fast_block_diag_cuda(input); } std::vec...
peft/src/peft/tuners/boft/fbd/fbd_cuda.cpp/0
{ "file_path": "peft/src/peft/tuners/boft/fbd/fbd_cuda.cpp", "repo_id": "peft", "token_count": 370 }
193
# 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": 20051 }
194
# 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/__init__.py/0
{ "file_path": "peft/src/peft/tuners/vera/__init__.py", "repo_id": "peft", "token_count": 419 }
195
# 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/utils/merge_utils.py/0
{ "file_path": "peft/src/peft/utils/merge_utils.py", "repo_id": "peft", "token_count": 3819 }
196
# Copyright 2023-present the HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
peft/tests/test_encoder_decoder_models.py/0
{ "file_path": "peft/tests/test_encoder_decoder_models.py", "repo_id": "peft", "token_count": 5682 }
197
#!/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_poly.py/0
{ "file_path": "peft/tests/test_poly.py", "repo_id": "peft", "token_count": 1541 }
198
# Feature Extraction All of the models in `timm` have consistent mechanisms for obtaining various types of features from the model for tasks besides classification. ## Penultimate Layer Features (Pre-Classifier Features) The features from the penultimate model layer can be obtained in several ways without requiring ...
pytorch-image-models/hfdocs/source/feature_extraction.mdx/0
{ "file_path": "pytorch-image-models/hfdocs/source/feature_extraction.mdx", "repo_id": "pytorch-image-models", "token_count": 3391 }
199