text stringlengths 5 409k | id stringlengths 14 178 | metadata dict | __index_level_0__ int64 0 572 |
|---|---|---|---|
import importlib
import os
import fsspec
import pytest
from fsspec import register_implementation
from fsspec.core import url_to_fs
from fsspec.registry import _registry as _fsspec_registry
from datasets.filesystems import COMPRESSION_FILESYSTEMS, is_remote_filesystem
from .utils import require_lz4, require_zstandar... | datasets/tests/test_filesystem.py/0 | {
"file_path": "datasets/tests/test_filesystem.py",
"repo_id": "datasets",
"token_count": 1145
} | 72 |
import inspect
import pytest
from datasets.splits import Split, SplitDict, SplitInfo
from datasets.utils.py_utils import asdict
@pytest.mark.parametrize(
"split_dict",
[
SplitDict(),
SplitDict({"train": SplitInfo(name="train", num_bytes=1337, num_examples=42, dataset_name="my_dataset")}),
... | datasets/tests/test_splits.py/0 | {
"file_path": "datasets/tests/test_splits.py",
"repo_id": "datasets",
"token_count": 678
} | 73 |
import argparse
import sys
sys.path.append(".")
from base_classes import ControlNetBenchmark, ControlNetSDXLBenchmark # noqa: E402
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument(
"--ckpt",
type=str,
default="lllyasviel/sd-controlnet-canny",
... | diffusers/benchmarks/benchmark_controlnet.py/0 | {
"file_path": "diffusers/benchmarks/benchmark_controlnet.py",
"repo_id": "diffusers",
"token_count": 352
} | 74 |
<!--Copyright 2024 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | diffusers/docs/source/en/api/loaders/lora.md/0 | {
"file_path": "diffusers/docs/source/en/api/loaders/lora.md",
"repo_id": "diffusers",
"token_count": 1338
} | 75 |
<!--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/models/autoencoderkl_cogvideox.md/0 | {
"file_path": "diffusers/docs/source/en/api/models/autoencoderkl_cogvideox.md",
"repo_id": "diffusers",
"token_count": 450
} | 76 |
<!--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/aura_flow.md/0 | {
"file_path": "diffusers/docs/source/en/api/pipelines/aura_flow.md",
"repo_id": "diffusers",
"token_count": 1165
} | 77 |
<!--Copyright 2024 The Intel Labs Team Authors and HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required... | diffusers/docs/source/en/api/pipelines/stable_diffusion/ldm3d_diffusion.md/0 | {
"file_path": "diffusers/docs/source/en/api/pipelines/stable_diffusion/ldm3d_diffusion.md",
"repo_id": "diffusers",
"token_count": 1252
} | 78 |
<!--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/habana.md/0 | {
"file_path": "diffusers/docs/source/en/optimization/habana.md",
"repo_id": "diffusers",
"token_count": 1405
} | 79 |
<!--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/quicktour.md/0 | {
"file_path": "diffusers/docs/source/en/quicktour.md",
"repo_id": "diffusers",
"token_count": 4860
} | 80 |
<!--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/t2i_adapters.md/0 | {
"file_path": "diffusers/docs/source/en/training/t2i_adapters.md",
"repo_id": "diffusers",
"token_count": 3502
} | 81 |
<!--Copyright 2024 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | diffusers/docs/source/en/using-diffusers/controlnet.md/0 | {
"file_path": "diffusers/docs/source/en/using-diffusers/controlnet.md",
"repo_id": "diffusers",
"token_count": 8675
} | 82 |
<!--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/omnigen.md/0 | {
"file_path": "diffusers/docs/source/en/using-diffusers/omnigen.md",
"repo_id": "diffusers",
"token_count": 4741
} | 83 |
<!--Copyright 2024 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | diffusers/docs/source/en/using-diffusers/unconditional_image_generation.md/0 | {
"file_path": "diffusers/docs/source/en/using-diffusers/unconditional_image_generation.md",
"repo_id": "diffusers",
"token_count": 635
} | 84 |
# 학습을 위한 데이터셋 만들기
[Hub](https://huggingface.co/datasets?task_categories=task_categories:text-to-image&sort=downloads) 에는 모델 교육을 위한 많은 데이터셋이 있지만,
관심이 있거나 사용하고 싶은 데이터셋을 찾을 수 없는 경우 🤗 [Datasets](https://huggingface.co/docs/datasets) 라이브러리를 사용하여 데이터셋을 만들 수 있습니다.
데이터셋 구조는 모델을 학습하려는 작업에 따라 달라집니다.
가장 기본적인 데이터셋 구조는 unconditio... | diffusers/docs/source/ko/training/create_dataset.md/0 | {
"file_path": "diffusers/docs/source/ko/training/create_dataset.md",
"repo_id": "diffusers",
"token_count": 3224
} | 85 |
<!--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/diffedit.md/0 | {
"file_path": "diffusers/docs/source/ko/using-diffusers/diffedit.md",
"repo_id": "diffusers",
"token_count": 6631
} | 86 |
<!--Copyright 2024 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | diffusers/docs/source/ko/using-diffusers/write_own_pipeline.md/0 | {
"file_path": "diffusers/docs/source/ko/using-diffusers/write_own_pipeline.md",
"repo_id": "diffusers",
"token_count": 9960
} | 87 |
import inspect
from typing import List, Optional, Union
import torch
from torch import nn
from torch.nn import functional as F
from torchvision import transforms
from transformers import CLIPImageProcessor, CLIPModel, CLIPTextModel, CLIPTokenizer
from diffusers import (
AutoencoderKL,
DDIMScheduler,
DPMSo... | diffusers/examples/community/clip_guided_stable_diffusion.py/0 | {
"file_path": "diffusers/examples/community/clip_guided_stable_diffusion.py",
"repo_id": "diffusers",
"token_count": 6483
} | 88 |
# Copyright 2024 Stanford University Team and The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#... | diffusers/examples/community/latent_consistency_img2img.py/0 | {
"file_path": "diffusers/examples/community/latent_consistency_img2img.py",
"repo_id": "diffusers",
"token_count": 16098
} | 89 |
#!/usr/bin/env python3
import torch
from diffusers import DiffusionPipeline
class UnetSchedulerOneForwardPipeline(DiffusionPipeline):
def __init__(self, unet, scheduler):
super().__init__()
self.register_modules(unet=unet, scheduler=scheduler)
def __call__(self):
image = torch.randn... | diffusers/examples/community/one_step_unet.py/0 | {
"file_path": "diffusers/examples/community/one_step_unet.py",
"repo_id": "diffusers",
"token_count": 299
} | 90 |
# Copyright 2024 Jingyang Zhang 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/examples/community/pipeline_stable_diffusion_boxdiff.py/0 | {
"file_path": "diffusers/examples/community/pipeline_stable_diffusion_boxdiff.py",
"repo_id": "diffusers",
"token_count": 36200
} | 91 |
# Copyright 2024 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | diffusers/examples/community/sd_text2img_k_diffusion.py/0 | {
"file_path": "diffusers/examples/community/sd_text2img_k_diffusion.py",
"repo_id": "diffusers",
"token_count": 8535
} | 92 |
# Based on stable_diffusion_xl_reference.py and stable_diffusion_controlnet_reference.py
import inspect
from typing import Any, Callable, Dict, List, Optional, Tuple, Union
import numpy as np
import PIL.Image
import torch
from diffusers import StableDiffusionXLControlNetPipeline
from diffusers.callbacks import Multi... | diffusers/examples/community/stable_diffusion_xl_controlnet_reference.py/0 | {
"file_path": "diffusers/examples/community/stable_diffusion_xl_controlnet_reference.py",
"repo_id": "diffusers",
"token_count": 34133
} | 93 |
#!/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/consistency_distillation/train_lcm_distill_sd_wds.py/0 | {
"file_path": "diffusers/examples/consistency_distillation/train_lcm_distill_sd_wds.py",
"repo_id": "diffusers",
"token_count": 26577
} | 94 |
#!/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/controlnet/train_controlnet_sdxl.py/0 | {
"file_path": "diffusers/examples/controlnet/train_controlnet_sdxl.py",
"repo_id": "diffusers",
"token_count": 23859
} | 95 |
#!/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/dreambooth/train_dreambooth_lora_flux.py/0 | {
"file_path": "diffusers/examples/dreambooth/train_dreambooth_lora_flux.py",
"repo_id": "diffusers",
"token_count": 35000
} | 96 |
# 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/instruct_pix2pix/test_instruct_pix2pix.py/0 | {
"file_path": "diffusers/examples/instruct_pix2pix/test_instruct_pix2pix.py",
"repo_id": "diffusers",
"token_count": 1823
} | 97 |
# AutoencoderKL training example
## Installing the dependencies
Before running the scripts, make sure to install the library's training dependencies:
**Important**
To make sure you can successfully run the latest versions of the example scripts, we highly recommend **installing from source** and keeping the install... | diffusers/examples/research_projects/autoencoderkl/README.md/0 | {
"file_path": "diffusers/examples/research_projects/autoencoderkl/README.md",
"repo_id": "diffusers",
"token_count": 580
} | 98 |
<jupyter_start><jupyter_code>%load_ext autoreload
%autoreload 2
import torch
from diffusers import StableDiffusionGLIGENTextImagePipeline, StableDiffusionGLIGENPipeline
import os
import diffusers
from diffusers import (
AutoencoderKL,
DDPMScheduler,
UNet2DConditionModel,
UniPCMultistepScheduler,
Eu... | diffusers/examples/research_projects/gligen/demo.ipynb/0 | {
"file_path": "diffusers/examples/research_projects/gligen/demo.ipynb",
"repo_id": "diffusers",
"token_count": 1210
} | 99 |
# IP Adapter Training Example
[IP Adapter](https://arxiv.org/abs/2308.06721) is a novel approach designed to enhance text-to-image models such as Stable Diffusion by enabling them to generate images based on image prompts rather than text prompts alone. Unlike traditional methods that rely solely on complex text prom... | diffusers/examples/research_projects/ip_adapter/README.md/0 | {
"file_path": "diffusers/examples/research_projects/ip_adapter/README.md",
"repo_id": "diffusers",
"token_count": 2604
} | 100 |
"""
The main idea for this code is to provide a way for users to not need to bother with the hassle of multiple tokens for a concept by typing
a photo of <concept>_0 <concept>_1 ... and so on
and instead just do
a photo of <concept>
which gets translated to the above. This needs to work for both inference and training.... | diffusers/examples/research_projects/multi_token_textual_inversion/multi_token_clip.py/0 | {
"file_path": "diffusers/examples/research_projects/multi_token_textual_inversion/multi_token_clip.py",
"repo_id": "diffusers",
"token_count": 1828
} | 101 |
from typing import Any, Dict, Optional
import torch
from torch import nn
from diffusers.configuration_utils import ConfigMixin, register_to_config
from diffusers.models import PixArtTransformer2DModel
from diffusers.models.attention import BasicTransformerBlock
from diffusers.models.modeling_outputs import Transforme... | diffusers/examples/research_projects/pixart/controlnet_pixart_alpha.py/0 | {
"file_path": "diffusers/examples/research_projects/pixart/controlnet_pixart_alpha.py",
"repo_id": "diffusers",
"token_count": 5561
} | 102 |
<jupyter_start><jupyter_text>Running Stable Diffusion 3 (SD3) DreamBooth LoRA training under 16GB GPU VRAM Install Dependencies<jupyter_code>!pip install -q -U git+https://github.com/huggingface/diffusers
!pip install -q -U \
transformers \
accelerate \
wandb \
bitsandbytes \
peft<jupyter_output><e... | diffusers/examples/research_projects/sd3_lora_colab/sd3_dreambooth_lora_16gb.ipynb/0 | {
"file_path": "diffusers/examples/research_projects/sd3_lora_colab/sd3_dreambooth_lora_16gb.ipynb",
"repo_id": "diffusers",
"token_count": 1074
} | 103 |
import asyncio
import logging
import os
import random
import tempfile
import traceback
import uuid
import aiohttp
import torch
from fastapi import FastAPI, HTTPException
from fastapi.middleware.cors import CORSMiddleware
from fastapi.staticfiles import StaticFiles
from pydantic import BaseModel
from diffusers.pipelin... | diffusers/examples/server/server.py/0 | {
"file_path": "diffusers/examples/server/server.py",
"repo_id": "diffusers",
"token_count": 1691
} | 104 |
## Training an VQGAN VAE
VQVAEs were first introduced in [Neural Discrete Representation Learning](https://arxiv.org/abs/1711.00937) and was combined with a GAN in the paper [Taming Transformers for High-Resolution Image Synthesis](https://arxiv.org/abs/2012.09841). The basic idea of a VQVAE is it's a type of a variati... | diffusers/examples/vqgan/README.md/0 | {
"file_path": "diffusers/examples/vqgan/README.md",
"repo_id": "diffusers",
"token_count": 1948
} | 105 |
import argparse
from typing import Any, Dict
import torch
from transformers import T5EncoderModel, T5Tokenizer
from diffusers import (
AutoencoderKLCogVideoX,
CogVideoXDDIMScheduler,
CogVideoXImageToVideoPipeline,
CogVideoXPipeline,
CogVideoXTransformer3DModel,
)
def reassign_query_key_value_inp... | diffusers/scripts/convert_cogvideox_to_diffusers.py/0 | {
"file_path": "diffusers/scripts/convert_cogvideox_to_diffusers.py",
"repo_id": "diffusers",
"token_count": 5698
} | 106 |
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
} | 107 |
#!/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
} | 108 |
# Run this script to convert the Stable Cascade model weights to a diffusers pipeline.
import argparse
from contextlib import nullcontext
import torch
from safetensors.torch import load_file
from transformers import (
AutoTokenizer,
CLIPConfig,
CLIPImageProcessor,
CLIPTextModelWithProjection,
CLIPV... | diffusers/scripts/convert_stable_cascade.py/0 | {
"file_path": "diffusers/scripts/convert_stable_cascade.py",
"repo_id": "diffusers",
"token_count": 3605
} | 109 |
import random
import torch
from huggingface_hub import HfApi
from diffusers import UNet2DModel
api = HfApi()
results = {}
# fmt: off
results["google_ddpm_cifar10_32"] = torch.tensor([
-0.7515, -1.6883, 0.2420, 0.0300, 0.6347, 1.3433, -1.1743, -3.7467,
1.2342, -2.2485, 0.4636, 0.8076, -0.7991, 0.3969, 0.849... | diffusers/scripts/generate_logits.py/0 | {
"file_path": "diffusers/scripts/generate_logits.py",
"repo_id": "diffusers",
"token_count": 3530
} | 110 |
# Copyright 2024 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | diffusers/src/diffusers/hooks/group_offloading.py/0 | {
"file_path": "diffusers/src/diffusers/hooks/group_offloading.py",
"repo_id": "diffusers",
"token_count": 11933
} | 111 |
# 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/transformer_sd3.py/0 | {
"file_path": "diffusers/src/diffusers/loaders/transformer_sd3.py",
"repo_id": "diffusers",
"token_count": 3848
} | 112 |
# Copyright 2024 The CogVideoX team, Tsinghua University & ZhipuAI and The HuggingFace Team.
# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.o... | diffusers/src/diffusers/models/autoencoders/autoencoder_kl_cogvideox.py/0 | {
"file_path": "diffusers/src/diffusers/models/autoencoders/autoencoder_kl_cogvideox.py",
"repo_id": "diffusers",
"token_count": 28358
} | 113 |
# 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/controlnets/controlnet.py/0 | {
"file_path": "diffusers/src/diffusers/models/controlnets/controlnet.py",
"repo_id": "diffusers",
"token_count": 18810
} | 114 |
# 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/models/modeling_flax_utils.py/0 | {
"file_path": "diffusers/src/diffusers/models/modeling_flax_utils.py",
"repo_id": "diffusers",
"token_count": 11809
} | 115 |
# Copyright 2024 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | diffusers/src/diffusers/models/transformers/pixart_transformer_2d.py/0 | {
"file_path": "diffusers/src/diffusers/models/transformers/pixart_transformer_2d.py",
"repo_id": "diffusers",
"token_count": 8737
} | 116 |
# Copyright 2024 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | diffusers/src/diffusers/models/transformers/transformer_temporal.py/0 | {
"file_path": "diffusers/src/diffusers/models/transformers/transformer_temporal.py",
"repo_id": "diffusers",
"token_count": 7189
} | 117 |
# 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/models/unets/uvit_2d.py/0 | {
"file_path": "diffusers/src/diffusers/models/unets/uvit_2d.py",
"repo_id": "diffusers",
"token_count": 8249
} | 118 |
# 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/animatediff/pipeline_animatediff_controlnet.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/animatediff/pipeline_animatediff_controlnet.py",
"repo_id": "diffusers",
"token_count": 25106
} | 119 |
# Copyright 2024 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | diffusers/src/diffusers/pipelines/blip_diffusion/modeling_blip2.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/blip_diffusion/modeling_blip2.py",
"repo_id": "diffusers",
"token_count": 12021
} | 120 |
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": 5859
} | 121 |
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 = {
"timesteps": [
"fast27_timesteps",
... | diffusers/src/diffusers/pipelines/deepfloyd_if/__init__.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/deepfloyd_if/__init__.py",
"repo_id": "diffusers",
"token_count": 1266
} | 122 |
# Copyright 2022 The Music Spectrogram Diffusion Authors.
# 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... | diffusers/src/diffusers/pipelines/deprecated/spectrogram_diffusion/notes_encoder.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/deprecated/spectrogram_diffusion/notes_encoder.py",
"repo_id": "diffusers",
"token_count": 1254
} | 123 |
# Copyright 2024 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | diffusers/src/diffusers/pipelines/deprecated/versatile_diffusion/pipeline_versatile_diffusion_text_to_image.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/deprecated/versatile_diffusion/pipeline_versatile_diffusion_text_to_image.py",
"repo_id": "diffusers",
"token_count": 9882
} | 124 |
# Copyright 2024 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | diffusers/src/diffusers/pipelines/kandinsky/pipeline_kandinsky_img2img.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/kandinsky/pipeline_kandinsky_img2img.py",
"repo_id": "diffusers",
"token_count": 9873
} | 125 |
import inspect
from typing import Callable, Dict, List, Optional, Union
import numpy as np
import PIL
import PIL.Image
import torch
from transformers import T5EncoderModel, T5Tokenizer
from ...loaders import StableDiffusionLoraLoaderMixin
from ...models import Kandinsky3UNet, VQModel
from ...schedulers import DDPMSch... | diffusers/src/diffusers/pipelines/kandinsky3/pipeline_kandinsky3_img2img.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/kandinsky3/pipeline_kandinsky3_img2img.py",
"repo_id": "diffusers",
"token_count": 14142
} | 126 |
import inspect
import math
from itertools import repeat
from typing import Any, Callable, Dict, List, Optional, Tuple, Union
import torch
import torch.nn.functional as F
from packaging import version
from transformers import CLIPImageProcessor, CLIPTextModel, CLIPTokenizer
from ...configuration_utils import FrozenDic... | diffusers/src/diffusers/pipelines/ledits_pp/pipeline_leditspp_stable_diffusion.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/ledits_pp/pipeline_leditspp_stable_diffusion.py",
"repo_id": "diffusers",
"token_count": 36663
} | 127 |
# Copyright 2024 Genmo 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 by... | diffusers/src/diffusers/pipelines/mochi/pipeline_mochi.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/mochi/pipeline_mochi.py",
"repo_id": "diffusers",
"token_count": 15555
} | 128 |
# Copyright 2024 PixArt-Sigma Authors and The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unl... | diffusers/src/diffusers/pipelines/pag/pipeline_pag_pixart_sigma.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/pag/pipeline_pag_pixart_sigma.py",
"repo_id": "diffusers",
"token_count": 19124
} | 129 |
# 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/pipelines/pipeline_flax_utils.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/pipeline_flax_utils.py",
"repo_id": "diffusers",
"token_count": 12080
} | 130 |
# 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/renderer.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/shap_e/renderer.py",
"repo_id": "diffusers",
"token_count": 18167
} | 131 |
# 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_img2img.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion_img2img.py",
"repo_id": "diffusers",
"token_count": 12275
} | 132 |
# Copyright 2024 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | diffusers/src/diffusers/pipelines/stable_diffusion/stable_unclip_image_normalizer.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/stable_diffusion/stable_unclip_image_normalizer.py",
"repo_id": "diffusers",
"token_count": 674
} | 133 |
# 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_image_variation.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/unclip/pipeline_unclip_image_variation.py",
"repo_id": "diffusers",
"token_count": 8478
} | 134 |
# 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... | diffusers/src/diffusers/quantizers/auto.py/0 | {
"file_path": "diffusers/src/diffusers/quantizers/auto.py",
"repo_id": "diffusers",
"token_count": 2206
} | 135 |
import math
from dataclasses import dataclass
from typing import List, Optional, Tuple, Union
import torch
from ..configuration_utils import ConfigMixin, register_to_config
from ..utils import BaseOutput
from .scheduling_utils import SchedulerMixin
def gumbel_noise(t, generator=None):
device = generator.device ... | diffusers/src/diffusers/schedulers/scheduling_amused.py/0 | {
"file_path": "diffusers/src/diffusers/schedulers/scheduling_amused.py",
"repo_id": "diffusers",
"token_count": 2775
} | 136 |
# 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_flax.py/0 | {
"file_path": "diffusers/src/diffusers/schedulers/scheduling_dpmsolver_multistep_flax.py",
"repo_id": "diffusers",
"token_count": 13613
} | 137 |
# 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... | diffusers/src/diffusers/utils/__init__.py/0 | {
"file_path": "diffusers/src/diffusers/utils/__init__.py",
"repo_id": "diffusers",
"token_count": 1727
} | 138 |
# This file is autogenerated by the command `make fix-copies`, do not edit.
from ..utils import DummyObject, requires_backends
class AllegroPipeline(metaclass=DummyObject):
_backends = ["torch", "transformers"]
def __init__(self, *args, **kwargs):
requires_backends(self, ["torch", "transformers"])
... | diffusers/src/diffusers/utils/dummy_torch_and_transformers_objects.py/0 | {
"file_path": "diffusers/src/diffusers/utils/dummy_torch_and_transformers_objects.py",
"repo_id": "diffusers",
"token_count": 31704
} | 139 |
# coding=utf-8
# Copyright 2024 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | diffusers/tests/lora/test_lora_layers_sana.py/0 | {
"file_path": "diffusers/tests/lora/test_lora_layers_sana.py",
"repo_id": "diffusers",
"token_count": 2016
} | 140 |
# coding=utf-8
# Copyright 2024 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | diffusers/tests/models/autoencoders/test_models_consistency_decoder_vae.py/0 | {
"file_path": "diffusers/tests/models/autoencoders/test_models_consistency_decoder_vae.py",
"repo_id": "diffusers",
"token_count": 5101
} | 141 |
# coding=utf-8
# Copyright 2024 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | diffusers/tests/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
} | 142 |
# coding=utf-8
# Copyright 2024 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | diffusers/tests/others/test_hub_utils.py/0 | {
"file_path": "diffusers/tests/others/test_hub_utils.py",
"repo_id": "diffusers",
"token_count": 399
} | 143 |
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
} | 144 |
# coding=utf-8
# Copyright 2024 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | diffusers/tests/pipelines/controlnet/test_controlnet_sdxl_img2img.py/0 | {
"file_path": "diffusers/tests/pipelines/controlnet/test_controlnet_sdxl_img2img.py",
"repo_id": "diffusers",
"token_count": 5626
} | 145 |
import unittest
import numpy as np
import torch
from PIL import Image
from transformers import AutoTokenizer, CLIPTextConfig, CLIPTextModel, CLIPTokenizer, T5EncoderModel
from diffusers import (
AutoencoderKL,
FlowMatchEulerDiscreteScheduler,
FluxControlImg2ImgPipeline,
FluxTransformer2DModel,
)
from ... | diffusers/tests/pipelines/flux/test_pipeline_flux_control_img2img.py/0 | {
"file_path": "diffusers/tests/pipelines/flux/test_pipeline_flux_control_img2img.py",
"repo_id": "diffusers",
"token_count": 2800
} | 146 |
# 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/kandinsky/test_kandinsky_combined.py/0 | {
"file_path": "diffusers/tests/pipelines/kandinsky/test_kandinsky_combined.py",
"repo_id": "diffusers",
"token_count": 5607
} | 147 |
# coding=utf-8
# Copyright 2024 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | diffusers/tests/pipelines/pag/test_pag_controlnet_sd.py/0 | {
"file_path": "diffusers/tests/pipelines/pag/test_pag_controlnet_sd.py",
"repo_id": "diffusers",
"token_count": 4391
} | 148 |
# Copyright 2024 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | diffusers/tests/pipelines/shap_e/test_shap_e.py/0 | {
"file_path": "diffusers/tests/pipelines/shap_e/test_shap_e.py",
"repo_id": "diffusers",
"token_count": 3799
} | 149 |
# 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_instruction_pix2pix.py/0 | {
"file_path": "diffusers/tests/pipelines/stable_diffusion/test_stable_diffusion_instruction_pix2pix.py",
"repo_id": "diffusers",
"token_count": 7726
} | 150 |
# coding=utf-8
# Copyright 2024 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | diffusers/tests/pipelines/test_pipelines_auto.py/0 | {
"file_path": "diffusers/tests/pipelines/test_pipelines_auto.py",
"repo_id": "diffusers",
"token_count": 12243
} | 151 |
# coding=utf-8
# Copyright 2024 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | diffusers/tests/pipelines/wuerstchen/test_wuerstchen_combined.py/0 | {
"file_path": "diffusers/tests/pipelines/wuerstchen/test_wuerstchen_combined.py",
"repo_id": "diffusers",
"token_count": 3572
} | 152 |
# Copyright 2024 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/tests/schedulers/test_scheduler_ddpm_parallel.py/0 | {
"file_path": "diffusers/tests/schedulers/test_scheduler_ddpm_parallel.py",
"repo_id": "diffusers",
"token_count": 4271
} | 153 |
import torch
from diffusers import LMSDiscreteScheduler
from diffusers.utils.testing_utils import torch_device
from .test_schedulers import SchedulerCommonTest
class LMSDiscreteSchedulerTest(SchedulerCommonTest):
scheduler_classes = (LMSDiscreteScheduler,)
num_inference_steps = 10
def get_scheduler_con... | diffusers/tests/schedulers/test_scheduler_lms.py/0 | {
"file_path": "diffusers/tests/schedulers/test_scheduler_lms.py",
"repo_id": "diffusers",
"token_count": 2782
} | 154 |
# coding=utf-8
# Copyright 2024 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | diffusers/tests/single_file/test_model_sd_cascade_unet_single_file.py/0 | {
"file_path": "diffusers/tests/single_file/test_model_sd_cascade_unet_single_file.py",
"repo_id": "diffusers",
"token_count": 1955
} | 155 |
# 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_doc_toc.py/0 | {
"file_path": "diffusers/utils/check_doc_toc.py",
"repo_id": "diffusers",
"token_count": 2177
} | 156 |
# coding=utf-8
# Copyright 2021 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/utils/release.py/0 | {
"file_path": "diffusers/utils/release.py",
"repo_id": "diffusers",
"token_count": 2306
} | 157 |
This tutorial explains how to use [Stretch 3](https://hello-robot.com/stretch-3-product) with LeRobot.
## Setup
Familiarize yourself with Stretch by following its [tutorials](https://docs.hello-robot.com/0.3/getting_started/hello_robot/) (recommended).
To use LeRobot on Stretch, 3 options are available:
- [tethered ... | lerobot/examples/8_use_stretch.md/0 | {
"file_path": "lerobot/examples/8_use_stretch.md",
"repo_id": "lerobot",
"token_count": 2135
} | 158 |
#!/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/pusht_zarr_format.py/0 | {
"file_path": "lerobot/lerobot/common/datasets/push_dataset_to_hub/pusht_zarr_format.py",
"repo_id": "lerobot",
"token_count": 4650
} | 159 |
#!/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/optim/optimizers.py/0 | {
"file_path": "lerobot/lerobot/common/optim/optimizers.py",
"repo_id": "lerobot",
"token_count": 1440
} | 160 |
from typing import List, Optional, Union
import torch
import torch.version
from pytest import Cache
from torch import nn
from transformers import (
AutoConfig,
GemmaForCausalLM,
PaliGemmaForConditionalGeneration,
PretrainedConfig,
PreTrainedModel,
)
from transformers.models.auto import CONFIG_MAPPI... | lerobot/lerobot/common/policies/pi0/paligemma_with_expert.py/0 | {
"file_path": "lerobot/lerobot/common/policies/pi0/paligemma_with_expert.py",
"repo_id": "lerobot",
"token_count": 8043
} | 161 |
#!/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": 2563
} | 162 |
#!/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/train.py/0 | {
"file_path": "lerobot/lerobot/scripts/train.py",
"repo_id": "lerobot",
"token_count": 4561
} | 163 |
version https://git-lfs.github.com/spec/v1
oid sha256:58a5d91573e7dd2352a1454a5c9118c9ad3798428a0104e5e0b57fc01f780ae7
size 3687117
| lerobot/tests/data/save_dataset_to_safetensors/lerobot/aloha_sim_insertion_human/frame_498.safetensors/0 | {
"file_path": "lerobot/tests/data/save_dataset_to_safetensors/lerobot/aloha_sim_insertion_human/frame_498.safetensors",
"repo_id": "lerobot",
"token_count": 68
} | 164 |
version https://git-lfs.github.com/spec/v1
oid sha256:eb7b74f919adf8d4478585f65c54997e6f3bccab67eadb4048300108586a4163
size 5104
| lerobot/tests/data/save_policy_to_safetensors/aloha_act/actions.safetensors/0 | {
"file_path": "lerobot/tests/data/save_policy_to_safetensors/aloha_act/actions.safetensors",
"repo_id": "lerobot",
"token_count": 64
} | 165 |
version https://git-lfs.github.com/spec/v1
oid sha256:81457cfd193d9d46b6871071a3971c2901fefa544ab225576132772087b4cf3a
size 472
| lerobot/tests/data/save_policy_to_safetensors/xarm_tdmpcuse_mpc/actions.safetensors/0 | {
"file_path": "lerobot/tests/data/save_policy_to_safetensors/xarm_tdmpcuse_mpc/actions.safetensors",
"repo_id": "lerobot",
"token_count": 63
} | 166 |
import enum
import numpy as np
class stream(enum.Enum): # noqa: N801
color = 0
depth = 1
class format(enum.Enum): # noqa: N801
rgb8 = 0
z16 = 1
class config: # noqa: N801
def enable_device(self, device_id: str):
self.device_enabled = device_id
def enable_stream(self, stream_ty... | lerobot/tests/mock_pyrealsense2.py/0 | {
"file_path": "lerobot/tests/mock_pyrealsense2.py",
"repo_id": "lerobot",
"token_count": 1261
} | 167 |
"""
Tests for physical motors and their mocked versions.
If the physical motors are not connected to the computer, or not working,
the test will be skipped.
Example of running a specific test:
```bash
pytest -sx tests/test_motors.py::test_find_port
pytest -sx tests/test_motors.py::test_motors_bus
```
Example of runni... | lerobot/tests/test_motors.py/0 | {
"file_path": "lerobot/tests/test_motors.py",
"repo_id": "lerobot",
"token_count": 1793
} | 168 |
# To start the training, run the following command:
# sbatch -N 4 --job-name=mistral_sft slurm/train.slurm Mistral-Small-24B-Instruct-2501 sft numina zero3
model_name_or_path: mistralai/Mistral-Small-24B-Instruct-2501
model_revision: main
torch_dtype: bfloat16
attn_implementation: flash_attention_2
# Data training ar... | open-r1/recipes/Mistral-Small-24B-Instruct-2501/sft/config_openr1_math.yaml/0 | {
"file_path": "open-r1/recipes/Mistral-Small-24B-Instruct-2501/sft/config_openr1_math.yaml",
"repo_id": "open-r1",
"token_count": 450
} | 169 |
#!/bin/bash
#SBATCH --job-name=r1-vllm
#SBATCH --partition=hopper-prod
#SBATCH --qos=normal
#SBATCH --nodes=4
#SBATCH --gpus-per-node=8
#SBATCH --exclusive
#SBATCH --output=./logs/%x_%j_%n.out
#SBATCH --error=./logs/%x_%j_%n.err
#SBATCH --time=7-00:00:00
#SBATCH --ntasks-per-node=1
set -exuo pipefail
MODEL_PATH="deep... | open-r1/slurm/experimental/serve_r1_vllm.slurm/0 | {
"file_path": "open-r1/slurm/experimental/serve_r1_vllm.slurm",
"repo_id": "open-r1",
"token_count": 1729
} | 170 |
<!--⚠️ 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.
-->
# Fully Sharded Data Parallel
[Fully sharded data parallel](https://pytorch.org/docs/stable/fsdp.html) (FSDP) is developed for distributed training ... | peft/docs/source/accelerate/fsdp.md/0 | {
"file_path": "peft/docs/source/accelerate/fsdp.md",
"repo_id": "peft",
"token_count": 4780
} | 171 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.