text
stringlengths
96
319k
id
stringlengths
14
178
metadata
dict
import { assert, it, describe, afterEach, vi, expect } from "vitest"; import type { Cookies } from "@sveltejs/kit"; import { collections } from "$lib/server/database"; import { updateUser } from "./updateUser"; import { ObjectId } from "mongodb"; import { DEFAULT_SETTINGS } from "$lib/types/Settings"; import { defaultM...
chat-ui/src/routes/login/callback/updateUser.spec.ts/0
{ "file_path": "chat-ui/src/routes/login/callback/updateUser.spec.ts", "repo_id": "chat-ui", "token_count": 1408 }
<script lang="ts"> import { enhance } from "$app/forms"; import { base } from "$app/paths"; import { page } from "$app/state"; import { goto } from "$app/navigation"; import { env as envPublic } from "$env/dynamic/public"; import { useSettingsStore } from "$lib/stores/settings"; import type { PageData } from "./...
chat-ui/src/routes/settings/(nav)/assistants/[assistantId]/+page.svelte/0
{ "file_path": "chat-ui/src/routes/settings/(nav)/assistants/[assistantId]/+page.svelte", "repo_id": "chat-ui", "token_count": 5426 }
import { base } from "$app/paths"; import { collections } from "$lib/server/database.js"; import { toolFromConfigs } from "$lib/server/tools/index.js"; import { ReviewStatus } from "$lib/types/Review.js"; import { redirect } from "@sveltejs/kit"; import { ObjectId } from "mongodb"; export const load = async ({ params,...
chat-ui/src/routes/tools/[toolId]/+layout.server.ts/0
{ "file_path": "chat-ui/src/routes/tools/[toolId]/+layout.server.ts", "repo_id": "chat-ui", "token_count": 450 }
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" fill="none"> <path fill="#FFD21E" d="M4 15.55C4 9.72 8.72 5 14.55 5h4.11a9.34 9.34 0 1 1 0 18.68H7.58l-2.89 2.8a.41.41 0 0 1-.69-.3V15.55Z" /> <path fill="#32343D" d="M19.63 12.48c.37.14.52.9.9.7.71-.38.98-1.27.6-1.98a1.46 1.46 0 0 0-1.98-.61 1.4...
chat-ui/static/huggingchat/logo.svg/0
{ "file_path": "chat-ui/static/huggingchat/logo.svg", "repo_id": "chat-ui", "token_count": 523 }
<p align="center"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://huggingface.co/datasets/huggingface/documentation-images/raw/main/datasets-logo-dark.svg"> <source media="(prefers-color-scheme: light)" srcset="https://huggingface.co/datasets/huggingface/documentation-images/raw/main/d...
datasets/README.md/0
{ "file_path": "datasets/README.md", "repo_id": "datasets", "token_count": 3918 }
# docstyle-ignore INSTALL_CONTENT = """ # Datasets installation ! pip install datasets transformers # To install from source instead of the last release, comment the command above and uncomment the following one. # ! pip install git+https://github.com/huggingface/datasets.git """ notebook_first_cells = [{"type": "code...
datasets/docs/source/_config.py/0
{ "file_path": "datasets/docs/source/_config.py", "repo_id": "datasets", "token_count": 118 }
# Load text data This guide shows you how to load text datasets. To learn how to load any type of dataset, take a look at the <a class="underline decoration-sky-400 decoration-2 font-semibold" href="./loading">general loading guide</a>. Text files are one of the most common file types for storing a dataset. By defaul...
datasets/docs/source/nlp_load.mdx/0
{ "file_path": "datasets/docs/source/nlp_load.mdx", "repo_id": "datasets", "token_count": 613 }
# Copyright 2020 The HuggingFace Datasets Authors and the TensorFlow Datasets Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # U...
datasets/src/datasets/__init__.py/0
{ "file_path": "datasets/src/datasets/__init__.py", "repo_id": "datasets", "token_count": 513 }
from typing import TypeVar from .arrow_dataset import Dataset, _split_by_node_map_style_dataset from .iterable_dataset import IterableDataset, _split_by_node_iterable_dataset DatasetType = TypeVar("DatasetType", Dataset, IterableDataset) def split_dataset_by_node(dataset: DatasetType, rank: int, world_size: int) -...
datasets/src/datasets/distributed.py/0
{ "file_path": "datasets/src/datasets/distributed.py", "repo_id": "datasets", "token_count": 582 }
# Copyright 2020 The HuggingFace Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this 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...
datasets/src/datasets/formatting/formatting.py/0
{ "file_path": "datasets/src/datasets/formatting/formatting.py", "repo_id": "datasets", "token_count": 11243 }
import multiprocessing from typing import TYPE_CHECKING, Optional, Union from .. import Dataset, Features, config from ..formatting import query_table from ..packaged_modules.sql.sql import Sql from ..utils import tqdm as hf_tqdm from .abc import AbstractDatasetInputStream if TYPE_CHECKING: import sqlite3 i...
datasets/src/datasets/io/sql.py/0
{ "file_path": "datasets/src/datasets/io/sql.py", "repo_id": "datasets", "token_count": 2007 }
import collections import itertools import os from dataclasses import dataclass from typing import List, Optional, Tuple, Type import pandas as pd import pyarrow as pa import pyarrow.json as paj import datasets from datasets.features.features import FeatureType logger = datasets.utils.logging.get_logger(__name__) ...
datasets/src/datasets/packaged_modules/folder_based_builder/folder_based_builder.py/0
{ "file_path": "datasets/src/datasets/packaged_modules/folder_based_builder/folder_based_builder.py", "repo_id": "datasets", "token_count": 11915 }
import itertools from dataclasses import dataclass from io import StringIO from typing import Optional import pyarrow as pa import datasets from datasets.features.features import require_storage_cast from datasets.table import table_cast logger = datasets.utils.logging.get_logger(__name__) @dataclass class TextCo...
datasets/src/datasets/packaged_modules/text/text.py/0
{ "file_path": "datasets/src/datasets/packaged_modules/text/text.py", "repo_id": "datasets", "token_count": 2703 }
# 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...
datasets/src/datasets/utils/_dill.py/0
{ "file_path": "datasets/src/datasets/utils/_dill.py", "repo_id": "datasets", "token_count": 8494 }
{ "code": "Programming language (C++, Java, Javascript, Python, etc.)", "aa": "Afar", "aaa": "Ghotuo", "aab": "Alumu-Tesu", "aac": "Ari", "aad": "Amal", "aae": "Arbëreshë Albanian", "aaf": "Aranadan", "aag": "Ambrak", "aah": "Abu' Arapesh", "aai": "Arifama-Miniafia", "aak...
datasets/src/datasets/utils/resources/languages.json/0
{ "file_path": "datasets/src/datasets/utils/resources/languages.json", "repo_id": "datasets", "token_count": 111198 }
# ruff: noqa: F401 # This is the module that test_patching.py uses to test patch_submodule() import os import os as renamed_os from os import path from os import path as renamed_path from os.path import join from os.path import join as renamed_join open = open # we just need to have a builtin inside this module to t...
datasets/tests/_test_patching.py/0
{ "file_path": "datasets/tests/_test_patching.py", "repo_id": "datasets", "token_count": 95 }
import os import tarfile import pyarrow as pa import pytest from datasets import Dataset, concatenate_datasets, load_dataset from datasets.features import Audio, Features, Sequence, Value from ..utils import ( require_librosa, require_sndfile, ) @pytest.fixture() def tar_wav_path(shared_datadir, tmp_path_f...
datasets/tests/features/test_audio.py/0
{ "file_path": "datasets/tests/features/test_audio.py", "repo_id": "datasets", "token_count": 11701 }
import pytest from datasets import Dataset, DatasetDict, Features, NamedSplit, Value from datasets.io.text import TextDatasetReader from ..utils import assert_arrow_memory_doesnt_increase, assert_arrow_memory_increases def _check_text_dataset(dataset, expected_features): assert isinstance(dataset, Dataset) ...
datasets/tests/io/test_text.py/0
{ "file_path": "datasets/tests/io/test_text.py", "repo_id": "datasets", "token_count": 1833 }
import os import tempfile from pathlib import Path from unittest import TestCase import pyarrow as pa import pytest from datasets.arrow_dataset import Dataset from datasets.arrow_reader import ArrowReader, BaseReader, FileInstructions, ReadInstruction, make_file_instructions from datasets.info import DatasetInfo from...
datasets/tests/test_arrow_reader.py/0
{ "file_path": "datasets/tests/test_arrow_reader.py", "repo_id": "datasets", "token_count": 5688 }
from textwrap import dedent from types import SimpleNamespace from unittest.mock import patch from urllib.parse import quote import pytest from huggingface_hub import CommitOperationAdd, CommitOperationDelete from packaging import version import datasets from datasets.config import METADATA_CONFIGS_FIELD, PYARROW_VER...
datasets/tests/test_hub.py/0
{ "file_path": "datasets/tests/test_hub.py", "repo_id": "datasets", "token_count": 3742 }
import unittest from unittest.mock import patch import pytest from pytest import CaptureFixture from datasets.utils import ( are_progress_bars_disabled, disable_progress_bars, enable_progress_bars, tqdm, ) class TestTqdmUtils(unittest.TestCase): @pytest.fixture(autouse=True) def capsys(self,...
datasets/tests/test_tqdm.py/0
{ "file_path": "datasets/tests/test_tqdm.py", "repo_id": "datasets", "token_count": 1804 }
import argparse import sys sys.path.append(".") from base_classes import T2IAdapterBenchmark, T2IAdapterSDXLBenchmark # noqa: E402 if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument( "--ckpt", type=str, default="TencentARC/t2iadapter_canny_sd14v1", ...
diffusers/benchmarks/benchmark_t2i_adapter.py/0
{ "file_path": "diffusers/benchmarks/benchmark_t2i_adapter.py", "repo_id": "diffusers", "token_count": 393 }
<!--- 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...
diffusers/docs/README.md/0
{ "file_path": "diffusers/docs/README.md", "repo_id": "diffusers", "token_count": 3142 }
<!--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/transformer_sd3.md/0
{ "file_path": "diffusers/docs/source/en/api/loaders/transformer_sd3.md", "repo_id": "diffusers", "token_count": 379 }
<!-- 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/en/api/models/mochi_transformer3d.md/0
{ "file_path": "diffusers/docs/source/en/api/models/mochi_transformer3d.md", "repo_id": "diffusers", "token_count": 340 }
<!--Copyright 2024 The HuggingFace Team, The Black Forest 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 a...
diffusers/docs/source/en/api/pipelines/control_flux_inpaint.md/0
{ "file_path": "diffusers/docs/source/en/api/pipelines/control_flux_inpaint.md", "repo_id": "diffusers", "token_count": 1298 }
<!--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/overview.md/0
{ "file_path": "diffusers/docs/source/en/api/pipelines/overview.md", "repo_id": "diffusers", "token_count": 1935 }
<!--Copyright 2024 The GLIGEN 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 required by a...
diffusers/docs/source/en/api/pipelines/stable_diffusion/gligen.md/0
{ "file_path": "diffusers/docs/source/en/api/pipelines/stable_diffusion/gligen.md", "repo_id": "diffusers", "token_count": 1049 }
# xDiT [xDiT](https://github.com/xdit-project/xDiT) is an inference engine designed for the large scale parallel deployment of Diffusion Transformers (DiTs). xDiT provides a suite of efficient parallel approaches for Diffusion Models, as well as GPU kernel accelerations. There are four parallel methods supported in x...
diffusers/docs/source/en/optimization/xdit.md/0
{ "file_path": "diffusers/docs/source/en/optimization/xdit.md", "repo_id": "diffusers", "token_count": 1813 }
<!--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/instructpix2pix.md/0
{ "file_path": "diffusers/docs/source/en/training/instructpix2pix.md", "repo_id": "diffusers", "token_count": 4157 }
<!--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/tutorials/using_peft_for_inference.md/0
{ "file_path": "diffusers/docs/source/en/tutorials/using_peft_for_inference.md", "repo_id": "diffusers", "token_count": 3467 }
<!--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/ip_adapter.md/0
{ "file_path": "diffusers/docs/source/en/using-diffusers/ip_adapter.md", "repo_id": "diffusers", "token_count": 12486 }
<!--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/stable_diffusion_jax_how_to.md/0
{ "file_path": "diffusers/docs/source/en/using-diffusers/stable_diffusion_jax_how_to.md", "repo_id": "diffusers", "token_count": 3095 }
<!--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/api/pipelines/stable_diffusion/stable_diffusion_xl.md/0
{ "file_path": "diffusers/docs/source/ko/api/pipelines/stable_diffusion/stable_diffusion_xl.md", "repo_id": "diffusers", "token_count": 10962 }
<!--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/xformers.md/0
{ "file_path": "diffusers/docs/source/ko/optimization/xformers.md", "repo_id": "diffusers", "token_count": 1049 }
<!--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/tutorials/tutorial_overview.md/0
{ "file_path": "diffusers/docs/source/ko/tutorials/tutorial_overview.md", "repo_id": "diffusers", "token_count": 1209 }
<!--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/stable_diffusion_jax_how_to.md/0
{ "file_path": "diffusers/docs/source/ko/using-diffusers/stable_diffusion_jax_how_to.md", "repo_id": "diffusers", "token_count": 8474 }
# Community Scripts **Community scripts** consist of inference examples using Diffusers pipelines that have been added by the community. Please have a look at the following table to get an overview of all community examples. Click on the **Code Example** to get a copy-and-paste code example that you can try out. If a ...
diffusers/examples/community/README_community_scripts.md/0
{ "file_path": "diffusers/examples/community/README_community_scripts.md", "repo_id": "diffusers", "token_count": 9428 }
import inspect from typing import Callable, List, Optional, Tuple, Union import numpy as np import PIL.Image import torch from transformers import CLIPImageProcessor, CLIPTextModel, CLIPTokenizer from diffusers import DiffusionPipeline from diffusers.configuration_utils import FrozenDict from diffusers.models import ...
diffusers/examples/community/img2img_inpainting.py/0
{ "file_path": "diffusers/examples/community/img2img_inpainting.py", "repo_id": "diffusers", "token_count": 9669 }
# 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/matryoshka.py/0
{ "file_path": "diffusers/examples/community/matryoshka.py", "repo_id": "diffusers", "token_count": 100492 }
import inspect import os import numpy as np import torch import torch.nn.functional as nnf from PIL import Image from torch.optim.adam import Adam from tqdm import tqdm from diffusers import StableDiffusionPipeline from diffusers.pipelines.stable_diffusion import StableDiffusionPipelineOutput def retrieve_timesteps...
diffusers/examples/community/pipeline_null_text_inversion.py/0
{ "file_path": "diffusers/examples/community/pipeline_null_text_inversion.py", "repo_id": "diffusers", "token_count": 5423 }
# 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/rerender_a_video.py/0
{ "file_path": "diffusers/examples/community/rerender_a_video.py", "repo_id": "diffusers", "token_count": 27315 }
# 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/stable_diffusion_repaint.py/0
{ "file_path": "diffusers/examples/community/stable_diffusion_repaint.py", "repo_id": "diffusers", "token_count": 19673 }
# 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/consistency_distillation/test_lcm_lora.py/0
{ "file_path": "diffusers/examples/consistency_distillation/test_lcm_lora.py", "repo_id": "diffusers", "token_count": 2105 }
# Research projects This folder contains various research projects using 🧨 Diffusers. They are not really maintained by the core maintainers of this library and often require a specific version of Diffusers that is indicated in the requirements file of each folder. Updating them to the most recent version of the libr...
diffusers/examples/research_projects/README.md/0
{ "file_path": "diffusers/examples/research_projects/README.md", "repo_id": "diffusers", "token_count": 144 }
import os import random import torch import torchvision.transforms as transforms from PIL import Image def recalculate_box_and_verify_if_valid(x, y, w, h, image_size, original_image_size, min_box_size): scale = image_size / min(original_image_size) crop_y = (original_image_size[1] * scale - image_size) // 2 ...
diffusers/examples/research_projects/gligen/dataset.py/0
{ "file_path": "diffusers/examples/research_projects/gligen/dataset.py", "repo_id": "diffusers", "token_count": 1897 }
import argparse import itertools import math import os import random from pathlib import Path from typing import Iterable import numpy as np import PIL import torch import torch.nn.functional as F import torch.utils.checkpoint from accelerate import Accelerator from accelerate.utils import ProjectConfiguration, set_se...
diffusers/examples/research_projects/intel_opts/textual_inversion_dfq/textual_inversion.py/0
{ "file_path": "diffusers/examples/research_projects/intel_opts/textual_inversion_dfq/textual_inversion.py", "repo_id": "diffusers", "token_count": 18301 }
## [Deprecated] Multi Token Textual Inversion **IMPORTART: This research project is deprecated. Multi Token Textual Inversion is now supported natively in [the official textual inversion example](https://github.com/huggingface/diffusers/tree/main/examples/textual_inversion#running-locally-with-pytorch).** The author ...
diffusers/examples/research_projects/multi_token_textual_inversion/README.md/0
{ "file_path": "diffusers/examples/research_projects/multi_token_textual_inversion/README.md", "repo_id": "diffusers", "token_count": 1854 }
#!/usr/bin/env python # coding=utf-8 # Copyright 2025 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LI...
diffusers/examples/research_projects/sd3_lora_colab/compute_embeddings.py/0
{ "file_path": "diffusers/examples/research_projects/sd3_lora_colab/compute_embeddings.py", "repo_id": "diffusers", "token_count": 1605 }
#!/usr/bin/env python # coding=utf-8 # Copyright 2025 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LI...
diffusers/examples/text_to_image/train_text_to_image_flax.py/0
{ "file_path": "diffusers/examples/text_to_image/train_text_to_image_flax.py", "repo_id": "diffusers", "token_count": 10030 }
""" This script requires you to build `LAVIS` from source, since the pip version doesn't have BLIP Diffusion. Follow instructions here: https://github.com/salesforce/LAVIS/tree/main. """ import argparse import os import tempfile import torch from lavis.models import load_model_and_preprocess from transformers import ...
diffusers/scripts/convert_blipdiffusion_to_diffusers.py/0
{ "file_path": "diffusers/scripts/convert_blipdiffusion_to_diffusers.py", "repo_id": "diffusers", "token_count": 5958 }
import argparse import torch from diffusers import HunyuanDiT2DControlNetModel def main(args): state_dict = torch.load(args.pt_checkpoint_path, map_location="cpu") if args.load_key != "none": try: state_dict = state_dict[args.load_key] except KeyError: raise KeyError...
diffusers/scripts/convert_hunyuandit_controlnet_to_diffusers.py/0
{ "file_path": "diffusers/scripts/convert_hunyuandit_controlnet_to_diffusers.py", "repo_id": "diffusers", "token_count": 5703 }
# 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/scripts/convert_ncsnpp_original_checkpoint_to_diffusers.py/0
{ "file_path": "diffusers/scripts/convert_ncsnpp_original_checkpoint_to_diffusers.py", "repo_id": "diffusers", "token_count": 3608 }
# 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/scripts/convert_stable_diffusion_checkpoint_to_onnx.py/0
{ "file_path": "diffusers/scripts/convert_stable_diffusion_checkpoint_to_onnx.py", "repo_id": "diffusers", "token_count": 4384 }
__version__ = "0.33.0.dev0" from typing import TYPE_CHECKING from .utils import ( DIFFUSERS_SLOW_IMPORT, OptionalDependencyNotAvailable, _LazyModule, is_flax_available, is_k_diffusion_available, is_librosa_available, is_note_seq_available, is_onnx_available, is_scipy_available, ...
diffusers/src/diffusers/__init__.py/0
{ "file_path": "diffusers/src/diffusers/__init__.py", "repo_id": "diffusers", "token_count": 19348 }
# 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/pyramid_attention_broadcast.py/0
{ "file_path": "diffusers/src/diffusers/hooks/pyramid_attention_broadcast.py", "repo_id": "diffusers", "token_count": 5684 }
# 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/utils.py/0
{ "file_path": "diffusers/src/diffusers/loaders/utils.py", "repo_id": "diffusers", "token_count": 1031 }
# Copyright 2024 The Mochi team and The HuggingFace Team. # All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
diffusers/src/diffusers/models/autoencoders/autoencoder_kl_mochi.py/0
{ "file_path": "diffusers/src/diffusers/models/autoencoders/autoencoder_kl_mochi.py", "repo_id": "diffusers", "token_count": 21465 }
# Copyright 2024 HunyuanDiT Authors, Qixun Wang and The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2...
diffusers/src/diffusers/models/controlnets/controlnet_hunyuan.py/0
{ "file_path": "diffusers/src/diffusers/models/controlnets/controlnet_hunyuan.py", "repo_id": "diffusers", "token_count": 7435 }
# 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/src/diffusers/models/normalization.py/0
{ "file_path": "diffusers/src/diffusers/models/normalization.py", "repo_id": "diffusers", "token_count": 10215 }
# 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/t5_film_transformer.py/0
{ "file_path": "diffusers/src/diffusers/models/transformers/t5_film_transformer.py", "repo_id": "diffusers", "token_count": 7110 }
# Copyright 2024 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
diffusers/src/diffusers/models/unets/unet_2d_condition.py/0
{ "file_path": "diffusers/src/diffusers/models/unets/unet_2d_condition.py", "repo_id": "diffusers", "token_count": 29830 }
# 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/audioldm/pipeline_audioldm.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/audioldm/pipeline_audioldm.py", "repo_id": "diffusers", "token_count": 11663 }
from typing import TYPE_CHECKING from ...utils import DIFFUSERS_SLOW_IMPORT, _LazyModule _import_structure = {"pipeline_dance_diffusion": ["DanceDiffusionPipeline"]} if TYPE_CHECKING or DIFFUSERS_SLOW_IMPORT: from .pipeline_dance_diffusion import DanceDiffusionPipeline else: import sys sys.modules[__na...
diffusers/src/diffusers/pipelines/dance_diffusion/__init__.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/dance_diffusion/__init__.py", "repo_id": "diffusers", "token_count": 189 }
from typing import List import PIL.Image import torch from PIL import Image from ...configuration_utils import ConfigMixin from ...models.modeling_utils import ModelMixin from ...utils import PIL_INTERPOLATION class IFWatermarker(ModelMixin, ConfigMixin): def __init__(self): super().__init__() ...
diffusers/src/diffusers/pipelines/deepfloyd_if/watermark.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/deepfloyd_if/watermark.py", "repo_id": "diffusers", "token_count": 737 }
# Copyright 2024 ETH Zurich Computer Vision Lab and The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2...
diffusers/src/diffusers/pipelines/deprecated/repaint/pipeline_repaint.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/deprecated/repaint/pipeline_repaint.py", "repo_id": "diffusers", "token_count": 4200 }
# 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/stochastic_karras_ve/pipeline_stochastic_karras_ve.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/deprecated/stochastic_karras_ve/pipeline_stochastic_karras_ve.py", "repo_id": "diffusers", "token_count": 2264 }
# 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/latent_diffusion/pipeline_latent_diffusion.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion.py", "repo_id": "diffusers", "token_count": 14243 }
# Copyright 2024 Marigold authors, PRS ETH Zurich. All rights reserved. # 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 # # htt...
diffusers/src/diffusers/pipelines/marigold/pipeline_marigold_depth.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/marigold/pipeline_marigold_depth.py", "repo_id": "diffusers", "token_count": 17444 }
# 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 }
# 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 }
# 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 }
# 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 }
# 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 }
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 }
# 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 }
# 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 }
# 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": 30978 }
# 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/video_processor.py/0
{ "file_path": "diffusers/src/diffusers/video_processor.py", "repo_id": "diffusers", "token_count": 2251 }
# 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_sdxl.py/0
{ "file_path": "diffusers/tests/lora/test_lora_layers_sdxl.py", "repo_id": "diffusers", "token_count": 11643 }
def get_autoencoder_kl_config(block_out_channels=None, norm_num_groups=None): block_out_channels = block_out_channels or [2, 4] norm_num_groups = norm_num_groups or 2 init_dict = { "block_out_channels": block_out_channels, "in_channels": 3, "out_channels": 3, "down_block_type...
diffusers/tests/models/autoencoders/vae.py/0
{ "file_path": "diffusers/tests/models/autoencoders/vae.py", "repo_id": "diffusers", "token_count": 1582 }
# 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_hunyuan_dit.py/0
{ "file_path": "diffusers/tests/models/transformers/test_models_transformer_hunyuan_dit.py", "repo_id": "diffusers", "token_count": 1790 }
# 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_motion.py/0
{ "file_path": "diffusers/tests/models/unets/test_models_unet_motion.py", "repo_id": "diffusers", "token_count": 5224 }
# 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/audioldm2/test_audioldm2.py/0
{ "file_path": "diffusers/tests/pipelines/audioldm2/test_audioldm2.py", "repo_id": "diffusers", "token_count": 11126 }
# 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_sd3/test_controlnet_inpaint_sd3.py/0
{ "file_path": "diffusers/tests/pipelines/controlnet_sd3/test_controlnet_inpaint_sd3.py", "repo_id": "diffusers", "token_count": 3184 }
# Copyright 2024 The HuggingFace Team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
diffusers/tests/pipelines/hunyuan_video/test_hunyuan_video.py/0
{ "file_path": "diffusers/tests/pipelines/hunyuan_video/test_hunyuan_video.py", "repo_id": "diffusers", "token_count": 5678 }
# 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_inpaint.py/0
{ "file_path": "diffusers/tests/pipelines/kandinsky2_2/test_kandinsky_inpaint.py", "repo_id": "diffusers", "token_count": 5553 }
# coding=utf-8 # Copyright 2024 Latte Team and 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 appli...
diffusers/tests/pipelines/latte/test_latte.py/0
{ "file_path": "diffusers/tests/pipelines/latte/test_latte.py", "repo_id": "diffusers", "token_count": 5024 }
# 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/semantic_stable_diffusion/test_semantic_diffusion.py/0
{ "file_path": "diffusers/tests/pipelines/semantic_stable_diffusion/test_semantic_diffusion.py", "repo_id": "diffusers", "token_count": 9781 }
# 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_img2img.py/0
{ "file_path": "diffusers/tests/pipelines/stable_diffusion/test_stable_diffusion_img2img.py", "repo_id": "diffusers", "token_count": 13425 }
import gc import random import unittest import numpy as np import pytest import torch from transformers import AutoTokenizer, CLIPTextConfig, CLIPTextModelWithProjection, CLIPTokenizer, T5EncoderModel from diffusers import ( AutoencoderKL, FlowMatchEulerDiscreteScheduler, SD3Transformer2DModel, Stable...
diffusers/tests/pipelines/stable_diffusion_3/test_pipeline_stable_diffusion_3_img2img.py/0
{ "file_path": "diffusers/tests/pipelines/stable_diffusion_3/test_pipeline_stable_diffusion_3_img2img.py", "repo_id": "diffusers", "token_count": 4723 }
import contextlib import io import re import unittest import torch from PIL import Image from transformers import CLIPTextConfig, CLIPTextModel, CLIPTokenizer from diffusers import ( AnimateDiffPipeline, AnimateDiffVideoToVideoPipeline, AutoencoderKL, DDIMScheduler, MotionAdapter, StableDiffus...
diffusers/tests/pipelines/test_pipeline_utils.py/0
{ "file_path": "diffusers/tests/pipelines/test_pipeline_utils.py", "repo_id": "diffusers", "token_count": 12422 }
import gc import random import traceback import unittest import numpy as np import torch from PIL import Image from transformers import ( CLIPImageProcessor, CLIPTextModel, CLIPTokenizer, CLIPVisionModelWithProjection, GPT2Tokenizer, ) from diffusers import ( AutoencoderKL, DPMSolverMultis...
diffusers/tests/pipelines/unidiffuser/test_unidiffuser.py/0
{ "file_path": "diffusers/tests/pipelines/unidiffuser/test_unidiffuser.py", "repo_id": "diffusers", "token_count": 14637 }
# 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_motion_adapter_single_file.py/0
{ "file_path": "diffusers/tests/single_file/test_model_motion_adapter_single_file.py", "repo_id": "diffusers", "token_count": 1629 }
# 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_copies.py/0
{ "file_path": "diffusers/utils/check_copies.py", "repo_id": "diffusers", "token_count": 3397 }
# 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 }
# How to contribute to 🤗 LeRobot? Everyone is welcome to contribute, and we value everybody's contribution. Code is thus not the only way to help the community. Answering questions, helping others, reaching out and improving the documentations are immensely valuable to the community. It also helps us if you spread t...
lerobot/CONTRIBUTING.md/0
{ "file_path": "lerobot/CONTRIBUTING.md", "repo_id": "lerobot", "token_count": 3135 }
# Getting Started with Real-World Robots This tutorial will guide you through the process of setting up and training a neural network to autonomously control a real robot. **What You'll Learn:** 1. How to order and assemble your robot. 2. How to connect, configure, and calibrate your robot. 3. How to record and visua...
lerobot/examples/7_get_started_with_real_robot.md/0
{ "file_path": "lerobot/examples/7_get_started_with_real_robot.md", "repo_id": "lerobot", "token_count": 15959 }
#!/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/openx_rlds_format.py/0
{ "file_path": "lerobot/lerobot/common/datasets/push_dataset_to_hub/openx_rlds_format.py", "repo_id": "lerobot", "token_count": 4796 }
import torch import torch.nn.functional as F # noqa: N812 from packaging.version import Version if Version(torch.__version__) > Version("2.5.0"): # Ffex attention is only available from torch 2.5 onwards from torch.nn.attention.flex_attention import ( _mask_mod_signature, _round_up_to_multiple...
lerobot/lerobot/common/policies/pi0/flex_attention.py/0
{ "file_path": "lerobot/lerobot/common/policies/pi0/flex_attention.py", "repo_id": "lerobot", "token_count": 1891 }