text
stringlengths
5
631k
id
stringlengths
14
178
metadata
dict
__index_level_0__
int64
0
647
<!--版权所有 2025 HuggingFace 团队。保留所有权利。 根据 Apache 许可证 2.0 版本("许可证")授权;除非遵守许可证,否则不得使用此文件。您可以在以下网址获取许可证副本: http://www.apache.org/licenses/LICENSE-2.0 除非适用法律要求或书面同意,根据许可证分发的软件按"原样"分发,无任何明示或暗示的担保或条件。请参阅许可证以了解具体的语言管理权限和限制。 --> # OpenVINO 🤗 [Optimum](https://github.com/huggingface/optimum-intel) 提供与 OpenVINO 兼容的 Stable Di...
diffusers/docs/source/zh/optimization/open_vino.md/0
{ "file_path": "diffusers/docs/source/zh/optimization/open_vino.md", "repo_id": "diffusers", "token_count": 1748 }
138
<!--Copyright 2025 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
diffusers/docs/source/zh/training/lora.md/0
{ "file_path": "diffusers/docs/source/zh/training/lora.md", "repo_id": "diffusers", "token_count": 4791 }
139
## Amused training Amused can be finetuned on simple datasets relatively cheaply and quickly. Using 8bit optimizers, lora, and gradient accumulation, amused can be finetuned with as little as 5.5 GB. Here are a set of examples for finetuning amused on some relatively simple datasets. These training recipes are aggress...
diffusers/examples/amused/README.md/0
{ "file_path": "diffusers/examples/amused/README.md", "repo_id": "diffusers", "token_count": 5918 }
140
# Copyright 2025 Stanford University Team and The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # #...
diffusers/examples/community/latent_consistency_img2img.py/0
{ "file_path": "diffusers/examples/community/latent_consistency_img2img.py", "repo_id": "diffusers", "token_count": 16096 }
141
import inspect from typing import Callable, List, Optional, Union import torch from transformers import ( CLIPImageProcessor, CLIPTextModel, CLIPTokenizer, MBart50TokenizerFast, MBartForConditionalGeneration, pipeline, ) from diffusers.configuration_utils import FrozenDict from diffusers.model...
diffusers/examples/community/multilingual_stable_diffusion.py/0
{ "file_path": "diffusers/examples/community/multilingual_stable_diffusion.py", "repo_id": "diffusers", "token_count": 9164 }
142
import math import tempfile from typing import List, Optional import numpy as np import PIL.Image import torch from accelerate import Accelerator from torchvision import transforms from tqdm.auto import tqdm from transformers import CLIPTextModel, CLIPTokenizer from diffusers import AutoencoderKL, DiffusionPipeline, ...
diffusers/examples/community/sde_drag.py/0
{ "file_path": "diffusers/examples/community/sde_drag.py", "repo_id": "diffusers", "token_count": 11671 }
143
# Custom Diffusion training example [Custom Diffusion](https://huggingface.co/papers/2212.04488) is a method to customize text-to-image models like Stable Diffusion given just a few (4~5) images of a subject. The `train_custom_diffusion.py` script shows how to implement the training procedure and adapt it for stable d...
diffusers/examples/custom_diffusion/README.md/0
{ "file_path": "diffusers/examples/custom_diffusion/README.md", "repo_id": "diffusers", "token_count": 3534 }
144
# coding=utf-8 # Copyright 2025 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
diffusers/examples/dreambooth/test_dreambooth_sd3.py/0
{ "file_path": "diffusers/examples/dreambooth/test_dreambooth_sd3.py", "repo_id": "diffusers", "token_count": 3854 }
145
#!/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/flux-control/train_control_flux.py/0
{ "file_path": "diffusers/examples/flux-control/train_control_flux.py", "repo_id": "diffusers", "token_count": 22988 }
146
import torch import torch.nn as nn import torch.nn.functional as F class Hswish(nn.Module): def __init__(self, inplace=True): super(Hswish, self).__init__() self.inplace = inplace def forward(self, x): return x * F.relu6(x + 3.0, inplace=self.inplace) / 6.0 # out = max(0, min(1, slo...
diffusers/examples/research_projects/anytext/ocr_recog/common.py/0
{ "file_path": "diffusers/examples/research_projects/anytext/ocr_recog/common.py", "repo_id": "diffusers", "token_count": 1092 }
147
# GLIGEN: Open-Set Grounded Text-to-Image Generation These scripts contain the code to prepare the grounding data and train the GLIGEN model on COCO dataset. ### Install the requirements ```bash conda create -n diffusers python==3.10 conda activate diffusers pip install -r requirements.txt ``` And initialize an [🤗...
diffusers/examples/research_projects/gligen/README.md/0
{ "file_path": "diffusers/examples/research_projects/gligen/README.md", "repo_id": "diffusers", "token_count": 1720 }
148
import argparse import math import os import torch from neural_compressor.utils.pytorch import load from PIL import Image from transformers import CLIPTextModel, CLIPTokenizer from diffusers import AutoencoderKL, StableDiffusionPipeline, UNet2DConditionModel def parse_args(): parser = argparse.ArgumentParser() ...
diffusers/examples/research_projects/intel_opts/textual_inversion_dfq/text2images.py/0
{ "file_path": "diffusers/examples/research_projects/intel_opts/textual_inversion_dfq/text2images.py", "repo_id": "diffusers", "token_count": 1518 }
149
import argparse import copy import itertools import logging import math import os import random from pathlib import Path import numpy as np import torch import torch.nn.functional as F import torch.utils.checkpoint from accelerate import Accelerator from accelerate.logging import get_logger from accelerate.utils impor...
diffusers/examples/research_projects/multi_subject_dreambooth_inpainting/train_multi_subject_dreambooth_inpainting.py/0
{ "file_path": "diffusers/examples/research_projects/multi_subject_dreambooth_inpainting/train_multi_subject_dreambooth_inpainting.py", "repo_id": "diffusers", "token_count": 10829 }
150
import argparse import inspect import logging import math import os from pathlib import Path import accelerate import datasets import torch import torch.nn.functional as F from accelerate import Accelerator from accelerate.logging import get_logger from accelerate.utils import ProjectConfiguration from datasets import...
diffusers/examples/research_projects/onnxruntime/unconditional_image_generation/train_unconditional.py/0
{ "file_path": "diffusers/examples/research_projects/onnxruntime/unconditional_image_generation/train_unconditional.py", "repo_id": "diffusers", "token_count": 12780 }
151
import argparse import os import random import time from pathlib import Path import datasets import numpy as np import torch import torch.nn.functional as F import torch.utils.checkpoint import torch_xla.core.xla_model as xm import torch_xla.debug.profiler as xp import torch_xla.distributed.parallel_loader as pl impor...
diffusers/examples/research_projects/pytorch_xla/training/text_to_image/train_text_to_image_xla.py/0
{ "file_path": "diffusers/examples/research_projects/pytorch_xla/training/text_to_image/train_text_to_image_xla.py", "repo_id": "diffusers", "token_count": 10501 }
152
#!/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.py/0
{ "file_path": "diffusers/examples/research_projects/scheduled_huber_loss_training/text_to_image/train_text_to_image_lora.py", "repo_id": "diffusers", "token_count": 19852 }
153
import argparse import torch from safetensors.torch import load_file from diffusers import MotionAdapter def convert_motion_module(original_state_dict): converted_state_dict = {} for k, v in original_state_dict.items(): if "pos_encoder" in k: continue else: converted...
diffusers/scripts/convert_animatediff_motion_module_to_diffusers.py/0
{ "file_path": "diffusers/scripts/convert_animatediff_motion_module_to_diffusers.py", "repo_id": "diffusers", "token_count": 873 }
154
# Script for converting a HF Diffusers saved pipeline to a Stable Diffusion checkpoint. # *Only* converts the UNet, VAE, and Text Encoder. # Does not convert optimizer state or any other thing. import argparse import os.path as osp import re import torch from safetensors.torch import load_file, save_file # ========...
diffusers/scripts/convert_diffusers_to_original_sdxl.py/0
{ "file_path": "diffusers/scripts/convert_diffusers_to_original_sdxl.py", "repo_id": "diffusers", "token_count": 6297 }
155
# coding=utf-8 # Copyright 2024, Haofan Wang, Qixun Wang, All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless re...
diffusers/scripts/convert_lora_safetensor_to_diffusers.py/0
{ "file_path": "diffusers/scripts/convert_lora_safetensor_to_diffusers.py", "repo_id": "diffusers", "token_count": 2130 }
156
# Convert the original UniDiffuser checkpoints into diffusers equivalents. import argparse from argparse import Namespace import torch from transformers import ( CLIPImageProcessor, CLIPTextConfig, CLIPTextModel, CLIPTokenizer, CLIPVisionConfig, CLIPVisionModelWithProjection, GPT2Tokenizer...
diffusers/scripts/convert_unidiffuser_to_diffusers.py/0
{ "file_path": "diffusers/scripts/convert_unidiffuser_to_diffusers.py", "repo_id": "diffusers", "token_count": 13871 }
157
# Copyright 2025 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
diffusers/src/diffusers/commands/env.py/0
{ "file_path": "diffusers/src/diffusers/commands/env.py", "repo_id": "diffusers", "token_count": 2858 }
158
# Copyright 2025 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
diffusers/src/diffusers/guiders/perturbed_attention_guidance.py/0
{ "file_path": "diffusers/src/diffusers/guiders/perturbed_attention_guidance.py", "repo_id": "diffusers", "token_count": 5273 }
159
# Copyright 2025 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
diffusers/src/diffusers/image_processor.py/0
{ "file_path": "diffusers/src/diffusers/image_processor.py", "repo_id": "diffusers", "token_count": 24254 }
160
# Models For more detail on the models, please refer to the [docs](https://huggingface.co/docs/diffusers/api/models/overview).
diffusers/src/diffusers/models/README.md/0
{ "file_path": "diffusers/src/diffusers/models/README.md", "repo_id": "diffusers", "token_count": 39 }
161
# Copyright 2025 The Hunyuan 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/src/diffusers/models/autoencoders/autoencoder_kl_hunyuan_video.py/0
{ "file_path": "diffusers/src/diffusers/models/autoencoders/autoencoder_kl_hunyuan_video.py", "repo_id": "diffusers", "token_count": 21290 }
162
# Copyright 2025 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
diffusers/src/diffusers/models/controlnet_sparsectrl.py/0
{ "file_path": "diffusers/src/diffusers/models/controlnet_sparsectrl.py", "repo_id": "diffusers", "token_count": 2376 }
163
# Copyright 2025 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
diffusers/src/diffusers/models/embeddings_flax.py/0
{ "file_path": "diffusers/src/diffusers/models/embeddings_flax.py", "repo_id": "diffusers", "token_count": 1750 }
164
# Copyright 2025 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
diffusers/src/diffusers/models/transformers/dual_transformer_2d.py/0
{ "file_path": "diffusers/src/diffusers/models/transformers/dual_transformer_2d.py", "repo_id": "diffusers", "token_count": 3174 }
165
# Copyright 2025 The EasyAnimate team and The HuggingFace Team. # All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # U...
diffusers/src/diffusers/models/transformers/transformer_easyanimate.py/0
{ "file_path": "diffusers/src/diffusers/models/transformers/transformer_easyanimate.py", "repo_id": "diffusers", "token_count": 10296 }
166
# Copyright 2025 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
diffusers/src/diffusers/models/unets/unet_1d.py/0
{ "file_path": "diffusers/src/diffusers/models/unets/unet_1d.py", "repo_id": "diffusers", "token_count": 4887 }
167
# Copyright 2025 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
diffusers/src/diffusers/models/vae_flax.py/0
{ "file_path": "diffusers/src/diffusers/models/vae_flax.py", "repo_id": "diffusers", "token_count": 14480 }
168
# Copyright 2025 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
diffusers/src/diffusers/modular_pipelines/stable_diffusion_xl/decoders.py/0
{ "file_path": "diffusers/src/diffusers/modular_pipelines/stable_diffusion_xl/decoders.py", "repo_id": "diffusers", "token_count": 3649 }
169
# Copyright 2025 The RhymesAI and The HuggingFace Team. # All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless re...
diffusers/src/diffusers/pipelines/allegro/pipeline_allegro.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/allegro/pipeline_allegro.py", "repo_id": "diffusers", "token_count": 19783 }
170
from typing import TYPE_CHECKING from ...utils import ( DIFFUSERS_SLOW_IMPORT, OptionalDependencyNotAvailable, _LazyModule, get_objects_from_module, is_torch_available, is_transformers_available, is_transformers_version, ) _dummy_objects = {} _import_structure = {} try: if not (is_tr...
diffusers/src/diffusers/pipelines/audioldm2/__init__.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/audioldm2/__init__.py", "repo_id": "diffusers", "token_count": 637 }
171
# Copyright 2025 Black Forest Labs 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/chroma/pipeline_chroma_img2img.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/chroma/pipeline_chroma_img2img.py", "repo_id": "diffusers", "token_count": 21576 }
172
import importlib.util import os import cv2 import numpy as np import torch from PIL import Image, ImageOps from torchvision.transforms import InterpolationMode from torchvision.transforms.functional import normalize, resize from ...utils import get_logger, load_image logger = get_logger(__name__) _insightface_avai...
diffusers/src/diffusers/pipelines/consisid/consisid_utils.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/consisid/consisid_utils.py", "repo_id": "diffusers", "token_count": 5863 }
173
from typing import TYPE_CHECKING from ...utils import DIFFUSERS_SLOW_IMPORT, _LazyModule _import_structure = {"pipeline_dance_diffusion": ["DanceDiffusionPipeline"]} if TYPE_CHECKING or DIFFUSERS_SLOW_IMPORT: from .pipeline_dance_diffusion import DanceDiffusionPipeline else: import sys sys.modules[__na...
diffusers/src/diffusers/pipelines/dance_diffusion/__init__.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/dance_diffusion/__init__.py", "repo_id": "diffusers", "token_count": 189 }
174
from typing import List import PIL.Image import torch from PIL import Image from ...configuration_utils import ConfigMixin from ...models.modeling_utils import ModelMixin from ...utils import PIL_INTERPOLATION class IFWatermarker(ModelMixin, ConfigMixin): def __init__(self): super().__init__() ...
diffusers/src/diffusers/pipelines/deepfloyd_if/watermark.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/deepfloyd_if/watermark.py", "repo_id": "diffusers", "token_count": 737 }
175
# Copyright 2025 ETH Zurich Computer Vision Lab and The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2...
diffusers/src/diffusers/pipelines/deprecated/repaint/pipeline_repaint.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/deprecated/repaint/pipeline_repaint.py", "repo_id": "diffusers", "token_count": 4227 }
176
# Copyright 2025 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
diffusers/src/diffusers/pipelines/deprecated/stochastic_karras_ve/pipeline_stochastic_karras_ve.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/deprecated/stochastic_karras_ve/pipeline_stochastic_karras_ve.py", "repo_id": "diffusers", "token_count": 2264 }
177
from typing import TYPE_CHECKING from ...utils import ( DIFFUSERS_SLOW_IMPORT, OptionalDependencyNotAvailable, _LazyModule, get_objects_from_module, is_torch_available, is_transformers_available, ) _dummy_objects = {} _additional_imports = {} _import_structure = {"pipeline_output": ["FluxPipe...
diffusers/src/diffusers/pipelines/flux/__init__.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/flux/__init__.py", "repo_id": "diffusers", "token_count": 1412 }
178
# Copyright 2025 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
diffusers/src/diffusers/pipelines/free_init_utils.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/free_init_utils.py", "repo_id": "diffusers", "token_count": 3468 }
179
# Copyright 2025 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
diffusers/src/diffusers/pipelines/kandinsky/pipeline_kandinsky.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/kandinsky/pipeline_kandinsky.py", "repo_id": "diffusers", "token_count": 8056 }
180
# Copyright 2025 the Latte 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/src/diffusers/pipelines/latte/pipeline_latte.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/latte/pipeline_latte.py", "repo_id": "diffusers", "token_count": 19156 }
181
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/marigold/__init__.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/marigold/__init__.py", "repo_id": "diffusers", "token_count": 748 }
182
# Copyright 2025 Open AI and The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required ...
diffusers/src/diffusers/pipelines/shap_e/renderer.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/shap_e/renderer.py", "repo_id": "diffusers", "token_count": 18168 }
183
from typing import TYPE_CHECKING from ...utils import ( DIFFUSERS_SLOW_IMPORT, OptionalDependencyNotAvailable, _LazyModule, get_objects_from_module, is_flax_available, is_k_diffusion_available, is_k_diffusion_version, is_onnx_available, is_torch_available, is_transformers_availa...
diffusers/src/diffusers/pipelines/stable_diffusion/__init__.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/stable_diffusion/__init__.py", "repo_id": "diffusers", "token_count": 3484 }
184
# Copyright 2025 The InstructPix2Pix 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 ...
diffusers/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_instruct_pix2pix.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_instruct_pix2pix.py", "repo_id": "diffusers", "token_count": 20329 }
185
# Copyright 2025 DiffEdit Authors and Pix2Pix Zero 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/license...
diffusers/src/diffusers/pipelines/stable_diffusion_diffedit/pipeline_stable_diffusion_diffedit.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/stable_diffusion_diffedit/pipeline_stable_diffusion_diffedit.py", "repo_id": "diffusers", "token_count": 34433 }
186
# Copyright 2025 Susung Hong 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 requi...
diffusers/src/diffusers/pipelines/stable_diffusion_sag/pipeline_stable_diffusion_sag.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/stable_diffusion_sag/pipeline_stable_diffusion_sag.py", "repo_id": "diffusers", "token_count": 21796 }
187
# Copyright 2025 VisualCloze 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/src/diffusers/pipelines/visualcloze/visualcloze_utils.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/visualcloze/visualcloze_utils.py", "repo_id": "diffusers", "token_count": 4856 }
188
# Schedulers For more information on the schedulers, please refer to the [docs](https://huggingface.co/docs/diffusers/api/schedulers/overview).
diffusers/src/diffusers/schedulers/README.md/0
{ "file_path": "diffusers/src/diffusers/schedulers/README.md", "repo_id": "diffusers", "token_count": 46 }
189
# Copyright 2025 ParaDiGMS 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/schedulers/scheduling_ddpm_parallel.py/0
{ "file_path": "diffusers/src/diffusers/schedulers/scheduling_ddpm_parallel.py", "repo_id": "diffusers", "token_count": 13203 }
190
# Copyright 2025 Stanford University Team and The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # #...
diffusers/src/diffusers/schedulers/scheduling_tcd.py/0
{ "file_path": "diffusers/src/diffusers/schedulers/scheduling_tcd.py", "repo_id": "diffusers", "token_count": 14671 }
191
# This file is autogenerated by the command `make fix-copies`, do not edit. from ..utils import DummyObject, requires_backends class MidiProcessor(metaclass=DummyObject): _backends = ["note_seq"] def __init__(self, *args, **kwargs): requires_backends(self, ["note_seq"]) @classmethod def from...
diffusers/src/diffusers/utils/dummy_note_seq_objects.py/0
{ "file_path": "diffusers/src/diffusers/utils/dummy_note_seq_objects.py", "repo_id": "diffusers", "token_count": 201 }
192
# coding=utf-8 # Copyright 2025 The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
diffusers/src/diffusers/utils/hub_utils.py/0
{ "file_path": "diffusers/src/diffusers/utils/hub_utils.py", "repo_id": "diffusers", "token_count": 10574 }
193
# coding=utf-8 # Copyright 2025 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
diffusers/tests/lora/test_lora_layers_sana.py/0
{ "file_path": "diffusers/tests/lora/test_lora_layers_sana.py", "repo_id": "diffusers", "token_count": 2016 }
194
# coding=utf-8 # Copyright 2025 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
diffusers/tests/models/autoencoders/test_models_autoencoder_ltx_video.py/0
{ "file_path": "diffusers/tests/models/autoencoders/test_models_autoencoder_ltx_video.py", "repo_id": "diffusers", "token_count": 3070 }
195
# coding=utf-8 # Copyright 2025 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
diffusers/tests/models/transformers/test_models_transformer_hunyuan_dit.py/0
{ "file_path": "diffusers/tests/models/transformers/test_models_transformer_hunyuan_dit.py", "repo_id": "diffusers", "token_count": 1790 }
196
# coding=utf-8 # Copyright 2025 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
diffusers/tests/models/unets/test_models_unet_1d.py/0
{ "file_path": "diffusers/tests/models/unets/test_models_unet_1d.py", "repo_id": "diffusers", "token_count": 5072 }
197
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 }
198
import unittest import numpy as np import torch from transformers import CLIPTextConfig, CLIPTextModel, CLIPTextModelWithProjection, CLIPTokenizer import diffusers from diffusers import ( AnimateDiffSDXLPipeline, AutoencoderKL, DDIMScheduler, MotionAdapter, UNet2DConditionModel, UNetMotionMode...
diffusers/tests/pipelines/animatediff/test_animatediff_sdxl.py/0
{ "file_path": "diffusers/tests/pipelines/animatediff/test_animatediff_sdxl.py", "repo_id": "diffusers", "token_count": 4909 }
199
# coding=utf-8 # Copyright 2025 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
diffusers/tests/pipelines/kandinsky2_2/test_kandinsky_img2img.py/0
{ "file_path": "diffusers/tests/pipelines/kandinsky2_2/test_kandinsky_img2img.py", "repo_id": "diffusers", "token_count": 4518 }
200
# Copyright 2023-2025 Marigold Team, ETH Zürich. All rights reserved. # Copyright 2024-2025 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # ...
diffusers/tests/pipelines/marigold/test_marigold_intrinsics.py/0
{ "file_path": "diffusers/tests/pipelines/marigold/test_marigold_intrinsics.py", "repo_id": "diffusers", "token_count": 10790 }
201
# coding=utf-8 # Copyright 2025 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
diffusers/tests/pipelines/pag/test_pag_sd.py/0
{ "file_path": "diffusers/tests/pipelines/pag/test_pag_sd.py", "repo_id": "diffusers", "token_count": 6496 }
202
# Copyright 2025 The HuggingFace Team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
diffusers/tests/pipelines/qwenimage/test_qwenimage.py/0
{ "file_path": "diffusers/tests/pipelines/qwenimage/test_qwenimage.py", "repo_id": "diffusers", "token_count": 4000 }
203
# Copyright 2025 The HuggingFace Team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
diffusers/tests/pipelines/skyreels_v2/test_skyreels_v2_df_video_to_video.py/0
{ "file_path": "diffusers/tests/pipelines/skyreels_v2/test_skyreels_v2_df_video_to_video.py", "repo_id": "diffusers", "token_count": 3081 }
204
# coding=utf-8 # Copyright 2025 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
diffusers/tests/pipelines/stable_diffusion/test_stable_diffusion_instruction_pix2pix.py/0
{ "file_path": "diffusers/tests/pipelines/stable_diffusion/test_stable_diffusion_instruction_pix2pix.py", "repo_id": "diffusers", "token_count": 7801 }
205
# coding=utf-8 # Copyright 2025 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
diffusers/tests/pipelines/test_pipelines_combined.py/0
{ "file_path": "diffusers/tests/pipelines/test_pipelines_combined.py", "repo_id": "diffusers", "token_count": 2384 }
206
# coding=utf-8 # Copyright 2025 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
diffusers/tests/schedulers/test_scheduler_flax.py/0
{ "file_path": "diffusers/tests/schedulers/test_scheduler_flax.py", "repo_id": "diffusers", "token_count": 18884 }
207
import tempfile from io import BytesIO import requests import torch from huggingface_hub import hf_hub_download, snapshot_download from diffusers.loaders.single_file_utils import _extract_repo_id_and_weights_name from diffusers.models.attention_processor import AttnProcessor from diffusers.utils.testing_utils import ...
diffusers/tests/single_file/single_file_testing_utils.py/0
{ "file_path": "diffusers/tests/single_file/single_file_testing_utils.py", "repo_id": "diffusers", "token_count": 7713 }
208
import gc import tempfile import unittest import torch from diffusers import EulerDiscreteScheduler, StableDiffusionInstructPix2PixPipeline, StableDiffusionPipeline from diffusers.loaders.single_file_utils import _extract_repo_id_and_weights_name from diffusers.utils import load_image from diffusers.utils.testing_uti...
diffusers/tests/single_file/test_stable_diffusion_single_file.py/0
{ "file_path": "diffusers/tests/single_file/test_stable_diffusion_single_file.py", "repo_id": "diffusers", "token_count": 2682 }
209
# coding=utf-8 # Copyright 2025 The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
diffusers/utils/custom_init_isort.py/0
{ "file_path": "diffusers/utils/custom_init_isort.py", "repo_id": "diffusers", "token_count": 5345 }
210
# Copyright 2025 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
lerobot/docker/Dockerfile.internal/0
{ "file_path": "lerobot/docker/Dockerfile.internal", "repo_id": "lerobot", "token_count": 1118 }
211
# Bring Your Own Hardware This tutorial will explain how to integrate your own robot design into the LeRobot ecosystem and have it access all of our tools (data collection, control pipelines, policy training and inference). To that end, we provide the [`Robot`](https://github.com/huggingface/lerobot/blob/main/src/ler...
lerobot/docs/source/integrate_hardware.mdx/0
{ "file_path": "lerobot/docs/source/integrate_hardware.mdx", "repo_id": "lerobot", "token_count": 4759 }
212
# Copyright 2024 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
lerobot/examples/backward_compatibility/replay.py/0
{ "file_path": "lerobot/examples/backward_compatibility/replay.py", "repo_id": "lerobot", "token_count": 1132 }
213
# Copyright 2024 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
lerobot/pyproject.toml/0
{ "file_path": "lerobot/pyproject.toml", "repo_id": "lerobot", "token_count": 3769 }
214
#!/usr/bin/env python # Copyright 2024 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
lerobot/src/lerobot/cameras/utils.py/0
{ "file_path": "lerobot/src/lerobot/cameras/utils.py", "repo_id": "lerobot", "token_count": 762 }
215
#!/usr/bin/env python # Copyright 2024 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
lerobot/src/lerobot/datasets/sampler.py/0
{ "file_path": "lerobot/src/lerobot/datasets/sampler.py", "repo_id": "lerobot", "token_count": 949 }
216
# Copyright 2024 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
lerobot/src/lerobot/find_port.py/0
{ "file_path": "lerobot/src/lerobot/find_port.py", "repo_id": "lerobot", "token_count": 698 }
217
## Paper https://tonyzhaozh.github.io/aloha ## Citation ```bibtex @article{zhao2023learning, title={Learning fine-grained bimanual manipulation with low-cost hardware}, author={Zhao, Tony Z and Kumar, Vikash and Levine, Sergey and Finn, Chelsea}, journal={arXiv preprint arXiv:2304.13705}, year={2023} } ```
lerobot/src/lerobot/policies/act/README.md/0
{ "file_path": "lerobot/src/lerobot/policies/act/README.md", "repo_id": "lerobot", "token_count": 113 }
218
from dataclasses import dataclass, field from lerobot.configs.policies import PreTrainedConfig from lerobot.configs.types import FeatureType, NormalizationMode, PolicyFeature from lerobot.optim.optimizers import AdamWConfig from lerobot.optim.schedulers import ( CosineDecayWithWarmupSchedulerConfig, ) @PreTraine...
lerobot/src/lerobot/policies/pi0fast/configuration_pi0fast.py/0
{ "file_path": "lerobot/src/lerobot/policies/pi0fast/configuration_pi0fast.py", "repo_id": "lerobot", "token_count": 1855 }
219
#!/usr/bin/env python # Copyright 2024 Seungjae Lee and Yibin Wang and Haritheja Etukuru # and H. Jin Kim and Nur Muhammad Mahi Shafiullah and Lerrel Pinto # and The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in com...
lerobot/src/lerobot/policies/vqbet/configuration_vqbet.py/0
{ "file_path": "lerobot/src/lerobot/policies/vqbet/configuration_vqbet.py", "repo_id": "lerobot", "token_count": 3672 }
220
# Copyright 2024 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
lerobot/src/lerobot/robots/viperx/config_viperx.py/0
{ "file_path": "lerobot/src/lerobot/robots/viperx/config_viperx.py", "repo_id": "lerobot", "token_count": 584 }
221
#!/usr/bin/env python # Copyright 2024 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
lerobot/src/lerobot/scripts/train.py/0
{ "file_path": "lerobot/src/lerobot/scripts/train.py", "repo_id": "lerobot", "token_count": 4652 }
222
#!/usr/bin/env python # Copyright 2025 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
lerobot/src/lerobot/teleoperators/homunculus/config_homunculus.py/0
{ "file_path": "lerobot/src/lerobot/teleoperators/homunculus/config_homunculus.py", "repo_id": "lerobot", "token_count": 387 }
223
#!/usr/bin/env python # Copyright 2025 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
lerobot/src/lerobot/utils/buffer.py/0
{ "file_path": "lerobot/src/lerobot/utils/buffer.py", "repo_id": "lerobot", "token_count": 15570 }
224
#!/usr/bin/env python # Copyright 2024 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
lerobot/tests/datasets/test_utils.py/0
{ "file_path": "lerobot/tests/datasets/test_utils.py", "repo_id": "lerobot", "token_count": 734 }
225
#!/usr/bin/env python # Copyright 2025 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
lerobot/tests/motors/test_feetech.py/0
{ "file_path": "lerobot/tests/motors/test_feetech.py", "repo_id": "lerobot", "token_count": 6945 }
226
#!/usr/bin/env python # Copyright 2025 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
lerobot/tests/robots/test_so100_follower.py/0
{ "file_path": "lerobot/tests/robots/test_so100_follower.py", "repo_id": "lerobot", "token_count": 1218 }
227
# Model arguments model_name_or_path: open-r1/R1-Distill-Qwen-Math-7B-Merges model_revision: v00.00-step-000003660_v01.00-step-000002600_weights-0.50-0.50 torch_dtype: bfloat16 attn_implementation: flash_attention_2 # Data training arguments # We edit the DeepSeek chat template to ensure (a) the reasoning block within...
open-r1/recipes/dataset_filtering/filter_python.yaml/0
{ "file_path": "open-r1/recipes/dataset_filtering/filter_python.yaml", "repo_id": "open-r1", "token_count": 316 }
228
#!/bin/bash #SBATCH --partition=hopper-cpu #SBATCH --mem=16g #SBATCH --cpus-per-task=16 #SBATCH --output=/fsx/open-r1/logs/e2b_router/%x-%j.out #SBATCH --error=/fsx/open-r1/logs/e2b_router/%x-%j.err #SBATCH --requeue #SBATCH --time=7-00:00:00 echo "Starting job" set -x -e source ~/.bashrc source openr1/bin/activate ...
open-r1/slurm/e2b_router.slurm/0
{ "file_path": "open-r1/slurm/e2b_router.slurm", "repo_id": "open-r1", "token_count": 168 }
229
# Copyright 2025 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
open-r1/src/open_r1/sft.py/0
{ "file_path": "open-r1/src/open_r1/sft.py", "repo_id": "open-r1", "token_count": 2252 }
230
import torch from transformers import AutoModelForCausalLM, AutoTokenizer, PreTrainedTokenizer from trl import ModelConfig, get_kbit_device_map, get_quantization_config from ..configs import GRPOConfig, SFTConfig def get_tokenizer(model_args: ModelConfig, training_args: SFTConfig | GRPOConfig) -> PreTrainedTokenize...
open-r1/src/open_r1/utils/model_utils.py/0
{ "file_path": "open-r1/src/open_r1/utils/model_utils.py", "repo_id": "open-r1", "token_count": 608 }
231
# Minimal makefile for Sphinx documentation # # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = sphinx-build SOURCEDIR = source BUILDDIR = _build # Put it first so that "make" without argument is like "make help". help: @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" ...
peft/docs/Makefile/0
{ "file_path": "peft/docs/Makefile", "repo_id": "peft", "token_count": 237 }
232
<!--Copyright 2024 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
peft/docs/source/developer_guides/model_merging.md/0
{ "file_path": "peft/docs/source/developer_guides/model_merging.md", "repo_id": "peft", "token_count": 2644 }
233
<!--⚠️ Note that this file is in Markdown but contain specific syntax for our doc-builder (similar to MDX) that may not be rendered properly in your Markdown viewer. --> # Hotswapping adapters The idea of hotswapping an adapter is the following: We can already load multiple adapters, e.g. two LoRAs, at the same time....
peft/docs/source/package_reference/hotswap.md/0
{ "file_path": "peft/docs/source/package_reference/hotswap.md", "repo_id": "peft", "token_count": 928 }
234
<!--Copyright 2023 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
peft/docs/source/package_reference/prefix_tuning.md/0
{ "file_path": "peft/docs/source/package_reference/prefix_tuning.md", "repo_id": "peft", "token_count": 514 }
235
<jupyter_start><jupyter_text>Training PEFT models with new tokens being added to the embedding layers and tokenizerIn this example, we will learn how to train a LoRA model when adding new tokens to the tokenizer and model. This is a common usecase when doing the following:1. Instruction finetuning with new tokens beind...
peft/examples/causal_language_modeling/peft_lora_clm_with_additional_tokens.ipynb/0
{ "file_path": "peft/examples/causal_language_modeling/peft_lora_clm_with_additional_tokens.ipynb", "repo_id": "peft", "token_count": 4589 }
236
# Copyright 2024-present the HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
peft/examples/corda_finetuning/corda_finetuning.py/0
{ "file_path": "peft/examples/corda_finetuning/corda_finetuning.py", "repo_id": "peft", "token_count": 4220 }
237