text stringlengths 96 319k | id stringlengths 14 178 | metadata dict |
|---|---|---|
<!--Copyright 2024 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | diffusers/docs/source/en/api/pipelines/stable_diffusion/depth2img.md/0 | {
"file_path": "diffusers/docs/source/en/api/pipelines/stable_diffusion/depth2img.md",
"repo_id": "diffusers",
"token_count": 502
} |
<!--Copyright 2024 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | diffusers/docs/source/en/api/pipelines/stable_diffusion/upscale.md/0 | {
"file_path": "diffusers/docs/source/en/api/pipelines/stable_diffusion/upscale.md",
"repo_id": "diffusers",
"token_count": 475
} |
<!--Copyright 2024 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | diffusers/docs/source/en/optimization/torch2.0.md/0 | {
"file_path": "diffusers/docs/source/en/optimization/torch2.0.md",
"repo_id": "diffusers",
"token_count": 7527
} |
<!--Copyright 2024 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | diffusers/docs/source/en/training/dreambooth.md/0 | {
"file_path": "diffusers/docs/source/en/training/dreambooth.md",
"repo_id": "diffusers",
"token_count": 8860
} |
<!--Copyright 2024 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | diffusers/docs/source/en/using-diffusers/inpaint.md/0 | {
"file_path": "diffusers/docs/source/en/using-diffusers/inpaint.md",
"repo_id": "diffusers",
"token_count": 14189
} |
<!--Copyright 2024 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | diffusers/docs/source/en/using-diffusers/shap-e.md/0 | {
"file_path": "diffusers/docs/source/en/using-diffusers/shap-e.md",
"repo_id": "diffusers",
"token_count": 2540
} |
- sections:
- local: index
title: 🧨 Diffusers
- local: quicktour
title: "훑어보기"
- local: stable_diffusion
title: Stable Diffusion
- local: installation
title: 설치
title: 시작하기
- sections:
- local: tutorials/tutorial_overview
title: 개요
- local: using-diffusers/write_own_pipeline
title... | diffusers/docs/source/ko/_toctree.yml/0 | {
"file_path": "diffusers/docs/source/ko/_toctree.yml",
"repo_id": "diffusers",
"token_count": 3468
} |
<!--Copyright 2024 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | diffusers/docs/source/ko/optimization/torch2.0.md/0 | {
"file_path": "diffusers/docs/source/ko/optimization/torch2.0.md",
"repo_id": "diffusers",
"token_count": 10806
} |
<!--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 agree... | diffusers/docs/source/ko/tutorials/basic_training.md/0 | {
"file_path": "diffusers/docs/source/ko/tutorials/basic_training.md",
"repo_id": "diffusers",
"token_count": 11285
} |
<!--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... | diffusers/docs/source/ko/using-diffusers/shap-e.md/0 | {
"file_path": "diffusers/docs/source/ko/using-diffusers/shap-e.md",
"repo_id": "diffusers",
"token_count": 4198
} |
<!--Copyright 2024 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | diffusers/docs/source/zh/stable_diffusion.md/0 | {
"file_path": "diffusers/docs/source/zh/stable_diffusion.md",
"repo_id": "diffusers",
"token_count": 6142
} |
"""
modeled after the textual_inversion.py / train_dreambooth.py and the work
of justinpinkney here: https://github.com/justinpinkney/stable-diffusion/blob/main/notebooks/imagic.ipynb
"""
import inspect
import warnings
from typing import List, Optional, Union
import numpy as np
import PIL.Image
import torch
import to... | diffusers/examples/community/imagic_stable_diffusion.py/0 | {
"file_path": "diffusers/examples/community/imagic_stable_diffusion.py",
"repo_id": "diffusers",
"token_count": 9825
} |
from typing import Any, Callable, Dict, List, Optional, Tuple, Union
import numpy as np
import torch
from PIL import Image, ImageFilter
from diffusers.image_processor import PipelineImageInput
from diffusers.pipelines.stable_diffusion_xl.pipeline_output import StableDiffusionXLPipelineOutput
from diffusers.pipelines.... | diffusers/examples/community/masked_stable_diffusion_xl_img2img.py/0 | {
"file_path": "diffusers/examples/community/masked_stable_diffusion_xl_img2img.py",
"repo_id": "diffusers",
"token_count": 15124
} |
import math
from typing import Dict, Optional
import torch
import torchvision.transforms.functional as FF
from transformers import CLIPImageProcessor, CLIPTextModel, CLIPTokenizer, CLIPVisionModelWithProjection
from diffusers import StableDiffusionPipeline
from diffusers.models import AutoencoderKL, UNet2DConditionMo... | diffusers/examples/community/regional_prompting_stable_diffusion.py/0 | {
"file_path": "diffusers/examples/community/regional_prompting_stable_diffusion.py",
"repo_id": "diffusers",
"token_count": 14936
} |
# Inspired by: https://github.com/Mikubill/sd-webui-controlnet/discussions/1236 and https://github.com/Mikubill/sd-webui-controlnet/discussions/1280
import inspect
from typing import Any, Callable, Dict, List, Optional, Tuple, Union
import numpy as np
import PIL.Image
import torch
from packaging import version
from tr... | diffusers/examples/community/stable_diffusion_reference.py/0 | {
"file_path": "diffusers/examples/community/stable_diffusion_reference.py",
"repo_id": "diffusers",
"token_count": 34508
} |
# coding=utf-8
# Copyright 2024 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | diffusers/examples/controlnet/test_controlnet.py/0 | {
"file_path": "diffusers/examples/controlnet/test_controlnet.py",
"repo_id": "diffusers",
"token_count": 3284
} |
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
} |
import argparse
import logging
import math
import os
from pathlib import Path
import jax
import jax.numpy as jnp
import numpy as np
import optax
import torch
import torch.utils.checkpoint
import transformers
from flax import jax_utils
from flax.training import train_state
from flax.training.common_utils import shard
f... | diffusers/examples/dreambooth/train_dreambooth_flax.py/0 | {
"file_path": "diffusers/examples/dreambooth/train_dreambooth_flax.py",
"repo_id": "diffusers",
"token_count": 11967
} |
# InstructPix2Pix SDXL training example
***This is based on the original InstructPix2Pix training example.***
[Stable Diffusion XL](https://huggingface.co/papers/2307.01952) (or SDXL) is the latest image generation model that is tailored towards more photorealistic outputs with more detailed imagery and composition c... | diffusers/examples/instruct_pix2pix/README_sdxl.md/0 | {
"file_path": "diffusers/examples/instruct_pix2pix/README_sdxl.md",
"repo_id": "diffusers",
"token_count": 3484
} |
import d4rl # noqa
import gym
import tqdm
from diffusers.experimental import ValueGuidedRLPipeline
config = {
"n_samples": 64,
"horizon": 32,
"num_inference_steps": 20,
"n_guide_steps": 2, # can set to 0 for faster sampling, does not use value network
"scale_grad_by_std": True,
"scale": 0.1,... | diffusers/examples/reinforcement_learning/run_diffuser_locomotion.py/0 | {
"file_path": "diffusers/examples/reinforcement_learning/run_diffuser_locomotion.py",
"repo_id": "diffusers",
"token_count": 724
} |
# 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": 1748
} |
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
} |
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
} |
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": 12783
} |
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": 10499
} |
# coding=utf-8
# Copyright 2024 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | diffusers/examples/unconditional_image_generation/test_unconditional.py/0 | {
"file_path": "diffusers/examples/unconditional_image_generation/test_unconditional.py",
"repo_id": "diffusers",
"token_count": 2492
} |
import argparse
import torch
from huggingface_hub import hf_hub_download
from diffusers.models.transformers.auraflow_transformer_2d import AuraFlowTransformer2DModel
def load_original_state_dict(args):
model_pt = hf_hub_download(repo_id=args.original_state_dict_repo_id, filename="aura_diffusion_pytorch_model.bi... | diffusers/scripts/convert_aura_flow_to_diffusers.py/0 | {
"file_path": "diffusers/scripts/convert_aura_flow_to_diffusers.py",
"repo_id": "diffusers",
"token_count": 2540
} |
import argparse
from typing import Any, Dict
import torch
from accelerate import init_empty_weights
from transformers import AutoModel, AutoTokenizer, CLIPTextModel, CLIPTokenizer
from diffusers import (
AutoencoderKLHunyuanVideo,
FlowMatchEulerDiscreteScheduler,
HunyuanVideoPipeline,
HunyuanVideoTran... | diffusers/scripts/convert_hunyuan_video_to_diffusers.py/0 | {
"file_path": "diffusers/scripts/convert_hunyuan_video_to_diffusers.py",
"repo_id": "diffusers",
"token_count": 4691
} |
#!/usr/bin/env python3
import argparse
import os
import jax as jnp
import numpy as onp
import torch
import torch.nn as nn
from music_spectrogram_diffusion import inference
from t5x import checkpoints
from diffusers import DDPMScheduler, OnnxRuntimeModel, SpectrogramDiffusionPipeline
from diffusers.pipelines.spectrogr... | diffusers/scripts/convert_music_spectrogram_to_diffusers.py/0 | {
"file_path": "diffusers/scripts/convert_music_spectrogram_to_diffusers.py",
"repo_id": "diffusers",
"token_count": 4350
} |
# Copyright 2024 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | diffusers/setup.py/0 | {
"file_path": "diffusers/setup.py",
"repo_id": "diffusers",
"token_count": 3930
} |
# 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/hooks/layerwise_casting.py/0 | {
"file_path": "diffusers/src/diffusers/hooks/layerwise_casting.py",
"repo_id": "diffusers",
"token_count": 2844
} |
# 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/unet_loader_utils.py/0 | {
"file_path": "diffusers/src/diffusers/loaders/unet_loader_utils.py",
"repo_id": "diffusers",
"token_count": 2650
} |
# Copyright 2024 The Lightricks 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
#
# Un... | diffusers/src/diffusers/models/autoencoders/autoencoder_kl_ltx.py/0 | {
"file_path": "diffusers/src/diffusers/models/autoencoders/autoencoder_kl_ltx.py",
"repo_id": "diffusers",
"token_count": 26075
} |
# 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/controlnets/controlnet_flux.py/0 | {
"file_path": "diffusers/src/diffusers/models/controlnets/controlnet_flux.py",
"repo_id": "diffusers",
"token_count": 10380
} |
# coding=utf-8
# Copyright 2025 The HuggingFace Inc. team.
# Copyright (c) 2022, NVIDIA CORPORATION. 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.a... | diffusers/src/diffusers/models/modeling_utils.py/0 | {
"file_path": "diffusers/src/diffusers/models/modeling_utils.py",
"repo_id": "diffusers",
"token_count": 35518
} |
# Copyright 2024 Stability 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 requ... | diffusers/src/diffusers/models/transformers/stable_audio_transformer.py/0 | {
"file_path": "diffusers/src/diffusers/models/transformers/stable_audio_transformer.py",
"repo_id": "diffusers",
"token_count": 8065
} |
# Copyright 2024 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | diffusers/src/diffusers/models/unets/unet_2d_blocks_flax.py/0 | {
"file_path": "diffusers/src/diffusers/models/unets/unet_2d_blocks_flax.py",
"repo_id": "diffusers",
"token_count": 6961
} |
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_librosa_available,
is_note_seq_available,
is_onnx_available,
is_sentencepiece_avail... | diffusers/src/diffusers/pipelines/__init__.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/__init__.py",
"repo_id": "diffusers",
"token_count": 14146
} |
from typing import TYPE_CHECKING
from ...utils import (
DIFFUSERS_SLOW_IMPORT,
OptionalDependencyNotAvailable,
_LazyModule,
is_torch_available,
is_transformers_available,
is_transformers_version,
)
_dummy_objects = {}
_import_structure = {}
try:
if not (is_transformers_available() and is... | diffusers/src/diffusers/pipelines/audioldm/__init__.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/audioldm/__init__.py",
"repo_id": "diffusers",
"token_count": 581
} |
# 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/controlnet_xs/pipeline_controlnet_xs_sd_xl.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/controlnet_xs/pipeline_controlnet_xs_sd_xl.py",
"repo_id": "diffusers",
"token_count": 25419
} |
fast27_timesteps = [
999,
800,
799,
600,
599,
500,
400,
399,
377,
355,
333,
311,
288,
266,
244,
222,
200,
199,
177,
155,
133,
111,
88,
66,
44,
22,
0,
]
smart27_timesteps = [
999,
976,
952,
928,
... | diffusers/src/diffusers/pipelines/deepfloyd_if/timesteps.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/deepfloyd_if/timesteps.py",
"repo_id": "diffusers",
"token_count": 3772
} |
from typing import TYPE_CHECKING
from ....utils import DIFFUSERS_SLOW_IMPORT, _LazyModule
_import_structure = {"pipeline_repaint": ["RePaintPipeline"]}
if TYPE_CHECKING or DIFFUSERS_SLOW_IMPORT:
from .pipeline_repaint import RePaintPipeline
else:
import sys
sys.modules[__name__] = _LazyModule(
... | diffusers/src/diffusers/pipelines/deprecated/repaint/__init__.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/deprecated/repaint/__init__.py",
"repo_id": "diffusers",
"token_count": 183
} |
from typing import TYPE_CHECKING
from ....utils import DIFFUSERS_SLOW_IMPORT, _LazyModule
_import_structure = {"pipeline_stochastic_karras_ve": ["KarrasVePipeline"]}
if TYPE_CHECKING or DIFFUSERS_SLOW_IMPORT:
from .pipeline_stochastic_karras_ve import KarrasVePipeline
else:
import sys
sys.modules[__na... | diffusers/src/diffusers/pipelines/deprecated/stochastic_karras_ve/__init__.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/deprecated/stochastic_karras_ve/__init__.py",
"repo_id": "diffusers",
"token_count": 199
} |
# Copyright 2024 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/flux/pipeline_flux_control_img2img.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/flux/pipeline_flux_control_img2img.py",
"repo_id": "diffusers",
"token_count": 19580
} |
# 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/kandinsky2_2/pipeline_kandinsky2_2_inpainting.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_inpainting.py",
"repo_id": "diffusers",
"token_count": 11161
} |
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
} |
# Copyright 2024 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/pipeline_shap_e_img2img.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/shap_e/pipeline_shap_e_img2img.py",
"repo_id": "diffusers",
"token_count": 5823
} |
# 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_onnx_stable_diffusion.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion.py",
"repo_id": "diffusers",
"token_count": 10659
} |
# 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/safety_checker_flax.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/stable_diffusion/safety_checker_flax.py",
"repo_id": "diffusers",
"token_count": 1822
} |
# 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_k_diffusion/pipeline_stable_diffusion_xl_k_diffusion.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/stable_diffusion_k_diffusion/pipeline_stable_diffusion_xl_k_diffusion.py",
"repo_id": "diffusers",
"token_count": 20267
} |
# Copyright 2024 Kakao Brain 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/unclip/pipeline_unclip.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/unclip/pipeline_unclip.py",
"repo_id": "diffusers",
"token_count": 10049
} |
# Copyright 2024 Google Brain and The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | diffusers/src/diffusers/schedulers/deprecated/scheduling_sde_vp.py/0 | {
"file_path": "diffusers/src/diffusers/schedulers/deprecated/scheduling_sde_vp.py",
"repo_id": "diffusers",
"token_count": 1693
} |
# Copyright 2024 TSAIL 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 requir... | diffusers/src/diffusers/schedulers/scheduling_dpmsolver_multistep.py/0 | {
"file_path": "diffusers/src/diffusers/schedulers/scheduling_dpmsolver_multistep.py",
"repo_id": "diffusers",
"token_count": 25622
} |
# Copyright 2024 NVIDIA 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 b... | diffusers/src/diffusers/schedulers/scheduling_karras_ve_flax.py/0 | {
"file_path": "diffusers/src/diffusers/schedulers/scheduling_karras_ve_flax.py",
"repo_id": "diffusers",
"token_count": 3948
} |
import contextlib
import copy
import gc
import math
import random
from typing import Any, Dict, Iterable, List, Optional, Tuple, Union
import numpy as np
import torch
from .models import UNet2DConditionModel
from .schedulers import SchedulerMixin
from .utils import (
convert_state_dict_to_diffusers,
convert_s... | diffusers/src/diffusers/training_utils.py/0 | {
"file_path": "diffusers/src/diffusers/training_utils.py",
"repo_id": "diffusers",
"token_count": 11140
} |
# This file is autogenerated by the command `make fix-copies`, do not edit.
from ..utils import DummyObject, requires_backends
class KolorsImg2ImgPipeline(metaclass=DummyObject):
_backends = ["torch", "transformers", "sentencepiece"]
def __init__(self, *args, **kwargs):
requires_backends(self, ["torc... | diffusers/src/diffusers/utils/dummy_torch_and_transformers_and_sentencepiece_objects.py/0 | {
"file_path": "diffusers/src/diffusers/utils/dummy_torch_and_transformers_and_sentencepiece_objects.py",
"repo_id": "diffusers",
"token_count": 636
} |
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | diffusers/src/diffusers/utils/versions.py/0 | {
"file_path": "diffusers/src/diffusers/utils/versions.py",
"repo_id": "diffusers",
"token_count": 1699
} |
# 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/lora/test_lora_layers_sd3.py/0 | {
"file_path": "diffusers/tests/lora/test_lora_layers_sd3.py",
"repo_id": "diffusers",
"token_count": 2745
} |
# 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_vq.py/0 | {
"file_path": "diffusers/tests/models/autoencoders/test_models_vq.py",
"repo_id": "diffusers",
"token_count": 1611
} |
# 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_transformer_flux.py/0 | {
"file_path": "diffusers/tests/models/transformers/test_models_transformer_flux.py",
"repo_id": "diffusers",
"token_count": 2680
} |
# coding=utf-8
# Copyright 2024 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | diffusers/tests/models/unets/test_models_unet_controlnetxs.py/0 | {
"file_path": "diffusers/tests/models/unets/test_models_unet_controlnetxs.py",
"repo_id": "diffusers",
"token_count": 6217
} |
import gc
import unittest
import numpy as np
import torch
from torch.backends.cuda import sdp_kernel
from diffusers import (
CMStochasticIterativeScheduler,
ConsistencyModelPipeline,
UNet2DModel,
)
from diffusers.utils.testing_utils import (
enable_full_determinism,
nightly,
require_torch_2,
... | diffusers/tests/pipelines/consistency_models/test_consistency_models.py/0 | {
"file_path": "diffusers/tests/pipelines/consistency_models/test_consistency_models.py",
"repo_id": "diffusers",
"token_count": 5052
} |
# coding=utf-8
# Copyright 2024 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | diffusers/tests/pipelines/deepfloyd_if/test_if_inpainting.py/0 | {
"file_path": "diffusers/tests/pipelines/deepfloyd_if/test_if_inpainting.py",
"repo_id": "diffusers",
"token_count": 2352
} |
# 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_img2img.py/0 | {
"file_path": "diffusers/tests/pipelines/kandinsky2_2/test_kandinsky_img2img.py",
"repo_id": "diffusers",
"token_count": 4477
} |
# 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/musicldm/test_musicldm.py/0 | {
"file_path": "diffusers/tests/pipelines/musicldm/test_musicldm.py",
"repo_id": "diffusers",
"token_count": 8059
} |
# coding=utf-8
# Copyright 2024 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | diffusers/tests/pipelines/stable_diffusion/test_stable_diffusion.py/0 | {
"file_path": "diffusers/tests/pipelines/stable_diffusion/test_stable_diffusion.py",
"repo_id": "diffusers",
"token_count": 29204
} |
import gc
import unittest
import numpy as np
import pytest
import torch
from transformers import AutoTokenizer, CLIPTextConfig, CLIPTextModelWithProjection, CLIPTokenizer, T5EncoderModel
from diffusers import AutoencoderKL, FlowMatchEulerDiscreteScheduler, SD3Transformer2DModel, StableDiffusion3Pipeline
from diffuser... | diffusers/tests/pipelines/stable_diffusion_3/test_pipeline_stable_diffusion_3.py/0 | {
"file_path": "diffusers/tests/pipelines/stable_diffusion_3/test_pipeline_stable_diffusion_3.py",
"repo_id": "diffusers",
"token_count": 5784
} |
# coding=utf-8
# Copyright 2024 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | diffusers/tests/pipelines/stable_diffusion_panorama/test_stable_diffusion_panorama.py/0 | {
"file_path": "diffusers/tests/pipelines/stable_diffusion_panorama/test_stable_diffusion_panorama.py",
"repo_id": "diffusers",
"token_count": 7706
} |
import gc
import random
import tempfile
import unittest
import numpy as np
import torch
from transformers import (
CLIPImageProcessor,
CLIPVisionConfig,
CLIPVisionModelWithProjection,
)
import diffusers
from diffusers import (
AutoencoderKLTemporalDecoder,
EulerDiscreteScheduler,
StableVideoDi... | diffusers/tests/pipelines/stable_video_diffusion/test_stable_video_diffusion.py/0 | {
"file_path": "diffusers/tests/pipelines/stable_video_diffusion/test_stable_video_diffusion.py",
"repo_id": "diffusers",
"token_count": 9611
} |
# 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_flux_transformer_single_file.py/0 | {
"file_path": "diffusers/tests/single_file/test_model_flux_transformer_single_file.py",
"repo_id": "diffusers",
"token_count": 958
} |
# coding=utf-8
# Copyright 2025 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | diffusers/utils/check_config_docstrings.py/0 | {
"file_path": "diffusers/utils/check_config_docstrings.py",
"repo_id": "diffusers",
"token_count": 1113
} |
#!/usr/bin/env python3
# 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
#
# Unles... | diffusers/utils/print_env.py/0 | {
"file_path": "diffusers/utils/print_env.py",
"repo_id": "diffusers",
"token_count": 511
} |
This tutorial will explain the training script, how to use it, and particularly how to configure everything needed for the training run.
> **Note:** The following assume you're running these commands on a machine equipped with a cuda GPU. If you don't have one (or if you're using a Mac), you can add `--device=cpu` (`--... | lerobot/examples/4_train_policy_with_script.md/0 | {
"file_path": "lerobot/examples/4_train_policy_with_script.md",
"repo_id": "lerobot",
"token_count": 4790
} |
## Using / Updating `CODEBASE_VERSION` (for maintainers)
Since our dataset pushed to the hub are decoupled with the evolution of this repo, we ensure compatibility of
the datasets with our code, we use a `CODEBASE_VERSION` (defined in
lerobot/common/datasets/lerobot_dataset.py) variable.
For instance, [`lerobot/pusht... | lerobot/lerobot/common/datasets/push_dataset_to_hub/CODEBASE_VERSION.md/0 | {
"file_path": "lerobot/lerobot/common/datasets/push_dataset_to_hub/CODEBASE_VERSION.md",
"repo_id": "lerobot",
"token_count": 1078
} |
#!/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/dora_parquet_format.py/0 | {
"file_path": "lerobot/lerobot/common/datasets/push_dataset_to_hub/dora_parquet_format.py",
"repo_id": "lerobot",
"token_count": 3622
} |
#!/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/logger.py/0 | {
"file_path": "lerobot/lerobot/common/logger.py",
"repo_id": "lerobot",
"token_count": 4048
} |
"""
Convert pi0 parameters from Jax to Pytorch
Follow [README of openpi](https://github.com/Physical-Intelligence/openpi) to create a new environment
and install the required librairies.
```bash
cd ~/code/openpi
source .venv/bin/activate
```
Example downloading parameters:
```bash
python
>>> import openpi.shared.dow... | lerobot/lerobot/common/policies/pi0/conversion_scripts/convert_pi0_to_hf_lerobot.py/0 | {
"file_path": "lerobot/lerobot/common/policies/pi0/conversion_scripts/convert_pi0_to_hf_lerobot.py",
"repo_id": "lerobot",
"token_count": 9301
} |
########################################################################################
# Utilities
########################################################################################
import logging
import time
import traceback
from contextlib import nullcontext
from copy import copy
from functools import cache... | lerobot/lerobot/common/robot_devices/control_utils.py/0 | {
"file_path": "lerobot/lerobot/common/robot_devices/control_utils.py",
"repo_id": "lerobot",
"token_count": 4701
} |
#!/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/utils.py/0 | {
"file_path": "lerobot/lerobot/common/utils/utils.py",
"repo_id": "lerobot",
"token_count": 3291
} |
#!/usr/bin/env python
# Copyright 2024 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | lerobot/lerobot/scripts/visualize_dataset.py/0 | {
"file_path": "lerobot/lerobot/scripts/visualize_dataset.py",
"repo_id": "lerobot",
"token_count": 4010
} |
"""Mocked classes and functions from dynamixel_sdk to allow for continuous integration
and testing code logic that requires hardware and devices (e.g. robot arms, cameras)
Warning: These mocked versions are minimalist. They do not exactly mock every behaviors
from the original classes and functions (e.g. return types ... | lerobot/tests/mock_scservo_sdk.py/0 | {
"file_path": "lerobot/tests/mock_scservo_sdk.py",
"repo_id": "lerobot",
"token_count": 1411
} |
"""
This file contains generic tests to ensure that nothing breaks if we modify the push_dataset_to_hub API.
Also, this file contains backward compatibility tests. Because they are slow and require to download the raw datasets,
we skip them for now in our CI.
Example to run backward compatiblity tests locally:
```
pyt... | lerobot/tests/test_push_dataset_to_hub.py/0 | {
"file_path": "lerobot/tests/test_push_dataset_to_hub.py",
"repo_id": "lerobot",
"token_count": 6380
} |
import subprocess
from typing import TYPE_CHECKING, Dict, Union
from .hub import get_gpu_count_for_vllm, get_param_count_from_repo_id
if TYPE_CHECKING:
from trl import GRPOConfig, SFTConfig, ModelConfig
import os
# We need a special environment setup to launch vLLM from within Slurm training jobs.
# - Referen... | open-r1/src/open_r1/utils/evaluation.py/0 | {
"file_path": "open-r1/src/open_r1/utils/evaluation.py",
"repo_id": "open-r1",
"token_count": 1659
} |
<!--⚠️ 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.
-->
# DeepSpeed
[DeepSpeed](https://www.deepspeed.ai/) is a library designed for speed and scale for distributed training of large models with billions ... | peft/docs/source/accelerate/deepspeed.md/0 | {
"file_path": "peft/docs/source/accelerate/deepspeed.md",
"repo_id": "peft",
"token_count": 7354
} |
<!--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/index.md/0 | {
"file_path": "peft/docs/source/index.md",
"repo_id": "peft",
"token_count": 1162
} |
<!--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/quicktour.md/0 | {
"file_path": "peft/docs/source/quicktour.md",
"repo_id": "peft",
"token_count": 2384
} |
import argparse
import os
from typing import Optional
from huggingface_hub import HfFolder, whoami
from transformers import PretrainedConfig
def get_full_repo_name(model_id: str, organization: Optional[str] = None, token: Optional[str] = None):
if token is None:
token = HfFolder.get_token()
if organi... | peft/examples/boft_controlnet/utils/args_loader.py/0 | {
"file_path": "peft/examples/boft_controlnet/utils/args_loader.py",
"repo_id": "peft",
"token_count": 7255
} |
import gc
import threading
import psutil
import torch
# Converting Bytes to Megabytes
def b2mb(x):
return int(x / 2**20)
# This context manager is used to track the peak memory usage of the process
class TorchTracemalloc:
def __enter__(self):
gc.collect()
torch.cuda.empty_cache()
to... | peft/examples/boft_dreambooth/utils/tracemalloc.py/0 | {
"file_path": "peft/examples/boft_dreambooth/utils/tracemalloc.py",
"repo_id": "peft",
"token_count": 786
} |
<jupyter_start><jupyter_code>from transformers import AutoModelForSeq2SeqLM
from peft import PeftModel, PeftConfig
import torch
from datasets import load_dataset
import os
from transformers import AutoTokenizer
from torch.utils.data import DataLoader
from transformers import default_data_collator, get_linear_schedule_w... | peft/examples/conditional_generation/peft_lora_seq2seq_accelerate_big_model_inference.ipynb/0 | {
"file_path": "peft/examples/conditional_generation/peft_lora_seq2seq_accelerate_big_model_inference.ipynb",
"repo_id": "peft",
"token_count": 1695
} |
import os
import torch
from datasets import load_dataset
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
DataCollatorForLanguageModeling,
Trainer,
TrainingArguments,
)
from peft import LoraConfig, get_peft_model, prepare_model_for_kbit_training
def train_m... | peft/examples/dora_finetuning/dora_finetuning.py/0 | {
"file_path": "peft/examples/dora_finetuning/dora_finetuning.py",
"repo_id": "peft",
"token_count": 3111
} |
# 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/examples/loftq_finetuning/quantize_save_load.py/0 | {
"file_path": "peft/examples/loftq_finetuning/quantize_save_load.py",
"repo_id": "peft",
"token_count": 2835
} |
# 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/olora_finetuning/olora_finetuning.py/0 | {
"file_path": "peft/examples/olora_finetuning/olora_finetuning.py",
"repo_id": "peft",
"token_count": 3090
} |
import argparse
import evaluate
import torch
from accelerate import Accelerator, DistributedDataParallelKwargs
from datasets import load_dataset
from torch.optim import AdamW
from torch.utils.data import DataLoader
from tqdm import tqdm
from transformers import AutoModelForSequenceClassification, AutoTokenizer, get_li... | peft/examples/sequence_classification/peft_no_lora_accelerate.py/0 | {
"file_path": "peft/examples/sequence_classification/peft_no_lora_accelerate.py",
"repo_id": "peft",
"token_count": 3361
} |
# 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 applicabl... | peft/setup.py/0 | {
"file_path": "peft/setup.py",
"repo_id": "peft",
"token_count": 1652
} |
# Copyright 2023-present the HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | peft/src/peft/tuners/adalora/bnb.py/0 | {
"file_path": "peft/src/peft/tuners/adalora/bnb.py",
"repo_id": "peft",
"token_count": 2655
} |
# 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/lycoris_utils.py/0 | {
"file_path": "peft/src/peft/tuners/lycoris_utils.py",
"repo_id": "peft",
"token_count": 7452
} |
# Copyright 2023-present the HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | peft/src/peft/tuners/poly/model.py/0 | {
"file_path": "peft/src/peft/tuners/poly/model.py",
"repo_id": "peft",
"token_count": 2976
} |
# 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/layer.py/0 | {
"file_path": "peft/src/peft/tuners/vera/layer.py",
"repo_id": "peft",
"token_count": 5648
} |
# Copyright 2023-present the HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | peft/src/peft/utils/save_and_load.py/0 | {
"file_path": "peft/src/peft/utils/save_and_load.py",
"repo_id": "peft",
"token_count": 11971
} |
# 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 a... | peft/tests/test_gpu_examples.py/0 | {
"file_path": "peft/tests/test_gpu_examples.py",
"repo_id": "peft",
"token_count": 83336
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.