text stringlengths 5 631k | id stringlengths 14 178 | metadata dict | __index_level_0__ int64 0 647 |
|---|---|---|---|
<!--版权所有 2025 The HuggingFace Team。保留所有权利。
根据 Apache 许可证 2.0 版本("许可证")授权;除非符合许可证,否则不得使用此文件。您可以在以下网址获取许可证副本:
http://www.apache.org/licenses/LICENSE-2.0
除非适用法律要求或书面同意,根据许可证分发的软件按"原样"分发,无任何明示或暗示的担保或条件。有关许可证的具体语言,请参阅许可证中的权限和限制。
-->
# 如何使用 Core ML 运行 Stable Diffusion
[Core ML](https://developer.apple.com/documentation/... | diffusers/docs/source/zh/optimization/coreml.md/0 | {
"file_path": "diffusers/docs/source/zh/optimization/coreml.md",
"repo_id": "diffusers",
"token_count": 5827
} | 127 |
<!--Copyright 2025 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | diffusers/docs/source/zh/quicktour.md/0 | {
"file_path": "diffusers/docs/source/zh/quicktour.md",
"repo_id": "diffusers",
"token_count": 8447
} | 128 |
# Advanced diffusion training examples
## Train Dreambooth LoRA with Stable Diffusion XL
> [!TIP]
> 💡 This example follows the techniques and recommended practices covered in the blog post: [LoRA training scripts of the world, unite!](https://huggingface.co/blog/sdxl_lora_advanced_script). Make sure to check it out b... | diffusers/examples/advanced_diffusion_training/README.md/0 | {
"file_path": "diffusers/examples/advanced_diffusion_training/README.md",
"repo_id": "diffusers",
"token_count": 7246
} | 129 |
#!/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/cogview4-control/train_control_cogview4.py/0 | {
"file_path": "diffusers/examples/cogview4-control/train_control_cogview4.py",
"repo_id": "diffusers",
"token_count": 22924
} | 130 |
import math
import numbers
from typing import Any, Callable, Dict, List, Optional, Union
import torch
import torch.nn.functional as F
from torch import nn
from diffusers.image_processor import PipelineImageInput
from diffusers.models import AsymmetricAutoencoderKL, ImageProjection
from diffusers.models.attention_proc... | diffusers/examples/community/hd_painter.py/0 | {
"file_path": "diffusers/examples/community/hd_painter.py",
"repo_id": "diffusers",
"token_count": 20671
} | 131 |
# Copyright 2025 Bingxin Ke, ETH Zurich and The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# U... | diffusers/examples/community/marigold_depth_estimation.py/0 | {
"file_path": "diffusers/examples/community/marigold_depth_estimation.py",
"repo_id": "diffusers",
"token_count": 12108
} | 132 |
import inspect
import os
import random
import warnings
from typing import Any, Callable, Dict, List, Optional, Tuple, Union
import matplotlib.pyplot as plt
import torch
import torch.nn.functional as F
from transformers import CLIPTextModel, CLIPTextModelWithProjection, CLIPTokenizer
from diffusers.image_processor imp... | diffusers/examples/community/pipeline_demofusion_sdxl.py/0 | {
"file_path": "diffusers/examples/community/pipeline_demofusion_sdxl.py",
"repo_id": "diffusers",
"token_count": 34869
} | 133 |
# Copyright 2025 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": 36197
} | 134 |
# Copyright 2025 The Wan 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 requ... | diffusers/examples/community/pipeline_stg_wan.py/0 | {
"file_path": "diffusers/examples/community/pipeline_stg_wan.py",
"repo_id": "diffusers",
"token_count": 13436
} | 135 |
# Copyright 2025 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | diffusers/examples/community/stable_diffusion_ipex.py/0 | {
"file_path": "diffusers/examples/community/stable_diffusion_ipex.py",
"repo_id": "diffusers",
"token_count": 16861
} | 136 |
# Latent Consistency Distillation Example:
[Latent Consistency Models (LCMs)](https://huggingface.co/papers/2310.04378) is a method to distill a latent diffusion model to enable swift inference with minimal steps. This example demonstrates how to use latent consistency distillation to distill stable-diffusion-v1.5 for... | diffusers/examples/consistency_distillation/README.md/0 | {
"file_path": "diffusers/examples/consistency_distillation/README.md",
"repo_id": "diffusers",
"token_count": 1524
} | 137 |
# DreamBooth training example for Lumina2
[DreamBooth](https://huggingface.co/papers/2208.12242) is a method to personalize text2image models like stable diffusion given just a few (3~5) images of a subject.
The `train_dreambooth_lora_lumina2.py` script shows how to implement the training procedure with [LoRA](https:... | diffusers/examples/dreambooth/README_lumina2.md/0 | {
"file_path": "diffusers/examples/dreambooth/README_lumina2.md",
"repo_id": "diffusers",
"token_count": 1493
} | 138 |
# coding=utf-8
# Copyright 2025 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | diffusers/examples/dreambooth/test_dreambooth_lora_edm.py/0 | {
"file_path": "diffusers/examples/dreambooth/test_dreambooth_lora_edm.py",
"repo_id": "diffusers",
"token_count": 1864
} | 139 |
# coding=utf-8
# Copyright 2025 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | diffusers/examples/instruct_pix2pix/test_instruct_pix2pix.py/0 | {
"file_path": "diffusers/examples/instruct_pix2pix/test_instruct_pix2pix.py",
"repo_id": "diffusers",
"token_count": 1823
} | 140 |
# AnyTextPipeline
Project page: https://aigcdesigngroup.github.io/homepage_anytext
"AnyText comprises a diffusion pipeline with two primary elements: an auxiliary latent module and a text embedding module. The former uses inputs like text glyph, position, and masked image to generate latent features for text generati... | diffusers/examples/research_projects/anytext/README.md/0 | {
"file_path": "diffusers/examples/research_projects/anytext/README.md",
"repo_id": "diffusers",
"token_count": 913
} | 141 |
import argparse
import math
import os
from pathlib import Path
import colossalai
import torch
import torch.nn.functional as F
import torch.utils.checkpoint
from colossalai.context.parallel_mode import ParallelMode
from colossalai.core import global_context as gpc
from colossalai.logging import disable_existing_loggers... | diffusers/examples/research_projects/colossalai/train_dreambooth_colossalai.py/0 | {
"file_path": "diffusers/examples/research_projects/colossalai/train_dreambooth_colossalai.py",
"repo_id": "diffusers",
"token_count": 11177
} | 142 |
#!/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/instructpix2pix_lora/train_instruct_pix2pix_lora.py/0 | {
"file_path": "diffusers/examples/research_projects/instructpix2pix_lora/train_instruct_pix2pix_lora.py",
"repo_id": "diffusers",
"token_count": 21355
} | 143 |
# Stable Diffusion text-to-image fine-tuning
This extended LoRA training script was authored by [haofanwang](https://github.com/haofanwang).
This is an experimental LoRA extension of [this example](https://github.com/huggingface/diffusers/blob/main/examples/text_to_image/train_text_to_image_lora.py). We further support... | diffusers/examples/research_projects/lora/README.md/0 | {
"file_path": "diffusers/examples/research_projects/lora/README.md",
"repo_id": "diffusers",
"token_count": 1622
} | 144 |
# Stable Diffusion text-to-image fine-tuning
The `train_text_to_image.py` script shows how to fine-tune stable diffusion model on your own dataset.
___Note___:
___This script is experimental. The script fine-tunes the whole model and often times the model overfits and runs into issues like catastrophic forgetting. I... | diffusers/examples/research_projects/onnxruntime/text_to_image/README.md/0 | {
"file_path": "diffusers/examples/research_projects/onnxruntime/text_to_image/README.md",
"repo_id": "diffusers",
"token_count": 844
} | 145 |
# PromptDiffusion Pipeline
From the project [page](https://zhendong-wang.github.io/prompt-diffusion.github.io/)
"With a prompt consisting of a task-specific example pair of images and text guidance, and a new query image, Prompt Diffusion can comprehend the desired task and generate the corresponding output image on ... | diffusers/examples/research_projects/promptdiffusion/README.md/0 | {
"file_path": "diffusers/examples/research_projects/promptdiffusion/README.md",
"repo_id": "diffusers",
"token_count": 829
} | 146 |
# Training SANA Sprint Diffuser
This README explains how to use the provided bash script commands to download a pre-trained teacher diffuser model and train it on a specific dataset, following the [SANA Sprint methodology](https://huggingface.co/papers/2503.09641).
## Setup
### 1. Define the local paths
Set a vari... | diffusers/examples/research_projects/sana/README.md/0 | {
"file_path": "diffusers/examples/research_projects/sana/README.md",
"repo_id": "diffusers",
"token_count": 1374
} | 147 |
# Show best practices for SDXL JAX
import time
import jax
import jax.numpy as jnp
import numpy as np
from flax.jax_utils import replicate
# Let's cache the model compilation, so that it doesn't take as long the next time around.
from jax.experimental.compilation_cache import compilation_cache as cc
from diffusers im... | diffusers/examples/research_projects/sdxl_flax/sdxl_single.py/0 | {
"file_path": "diffusers/examples/research_projects/sdxl_flax/sdxl_single.py",
"repo_id": "diffusers",
"token_count": 1341
} | 148 |
## Textual Inversion fine-tuning example
[Textual inversion](https://huggingface.co/papers/2208.01618) is a method to personalize text2image models like stable diffusion on your own images using just 3-5 examples.
The `textual_inversion.py` script shows how to implement the training procedure and adapt it for stable d... | diffusers/examples/textual_inversion/README.md/0 | {
"file_path": "diffusers/examples/textual_inversion/README.md",
"repo_id": "diffusers",
"token_count": 1783
} | 149 |
#!/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/vqgan/test_vqgan.py/0 | {
"file_path": "diffusers/examples/vqgan/test_vqgan.py",
"repo_id": "diffusers",
"token_count": 8162
} | 150 |
"""
Convert a CogView4 checkpoint from Megatron to the Diffusers format.
Example usage:
python scripts/convert_cogview4_to_diffusers.py \
--transformer_checkpoint_path 'your path/cogview4_6b/mp_rank_00/model_optim_rng.pt' \
--vae_checkpoint_path 'your path/cogview4_6b/imagekl_ch16.pt' \
--o... | diffusers/scripts/convert_cogview4_to_diffusers_megatron.py/0 | {
"file_path": "diffusers/scripts/convert_cogview4_to_diffusers_megatron.py",
"repo_id": "diffusers",
"token_count": 5759
} | 151 |
import argparse
import os
import torch
from huggingface_hub import snapshot_download
from safetensors.torch import load_file
from transformers import AutoTokenizer
from diffusers import AutoencoderKL, FlowMatchEulerDiscreteScheduler, OmniGenPipeline, OmniGenTransformer2DModel
def main(args):
# checkpoint from h... | diffusers/scripts/convert_omnigen_to_diffusers.py/0 | {
"file_path": "diffusers/scripts/convert_omnigen_to_diffusers.py",
"repo_id": "diffusers",
"token_count": 4235
} | 152 |
# 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
} | 153 |
"""
This script demonstrates how to extract a LoRA checkpoint from a fully finetuned model with the CogVideoX model.
To make it work for other models:
* Change the model class. Here we use `CogVideoXTransformer3DModel`. For Flux, it would be `FluxTransformer2DModel`,
for example. (TODO: more reason to add `AutoModel`... | diffusers/scripts/extract_lora_from_model.py/0 | {
"file_path": "diffusers/scripts/extract_lora_from_model.py",
"repo_id": "diffusers",
"token_count": 2140
} | 154 |
# Copyright 2025 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | diffusers/src/diffusers/experimental/rl/value_guided_sampling.py/0 | {
"file_path": "diffusers/src/diffusers/experimental/rl/value_guided_sampling.py",
"repo_id": "diffusers",
"token_count": 2639
} | 155 |
# 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/first_block_cache.py/0 | {
"file_path": "diffusers/src/diffusers/hooks/first_block_cache.py",
"repo_id": "diffusers",
"token_count": 4570
} | 156 |
# Copyright 2025 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | diffusers/src/diffusers/loaders/single_file_model.py/0 | {
"file_path": "diffusers/src/diffusers/loaders/single_file_model.py",
"repo_id": "diffusers",
"token_count": 9509
} | 157 |
# Copyright 2025 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | diffusers/src/diffusers/models/auto_model.py/0 | {
"file_path": "diffusers/src/diffusers/models/auto_model.py",
"repo_id": "diffusers",
"token_count": 4455
} | 158 |
# Copyright 2025 Ollin Boer Bohan 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_tiny.py/0 | {
"file_path": "diffusers/src/diffusers/models/autoencoders/autoencoder_tiny.py",
"repo_id": "diffusers",
"token_count": 6568
} | 159 |
# Copyright 2025 Stability AI, The HuggingFace Team and The InstantX Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-... | diffusers/src/diffusers/models/controlnets/controlnet_sd3.py/0 | {
"file_path": "diffusers/src/diffusers/models/controlnets/controlnet_sd3.py",
"repo_id": "diffusers",
"token_count": 9970
} | 160 |
# coding=utf-8
# Copyright 2025 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | diffusers/src/diffusers/models/normalization.py/0 | {
"file_path": "diffusers/src/diffusers/models/normalization.py",
"repo_id": "diffusers",
"token_count": 10885
} | 161 |
# Copyright 2025 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | diffusers/src/diffusers/models/transformers/t5_film_transformer.py/0 | {
"file_path": "diffusers/src/diffusers/models/transformers/t5_film_transformer.py",
"repo_id": "diffusers",
"token_count": 7112
} | 162 |
# Copyright 2025 OmniGen 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 requ... | diffusers/src/diffusers/models/transformers/transformer_omnigen.py/0 | {
"file_path": "diffusers/src/diffusers/models/transformers/transformer_omnigen.py",
"repo_id": "diffusers",
"token_count": 8867
} | 163 |
# Copyright 2025 Alibaba DAMO-VILAB and The HuggingFace Team. All rights reserved.
# Copyright 2025 The ModelScope 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.apa... | diffusers/src/diffusers/models/unets/unet_3d_condition.py/0 | {
"file_path": "diffusers/src/diffusers/models/unets/unet_3d_condition.py",
"repo_id": "diffusers",
"token_count": 14999
} | 164 |
# Copyright 2025 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | diffusers/src/diffusers/modular_pipelines/flux/encoders.py/0 | {
"file_path": "diffusers/src/diffusers/modular_pipelines/flux/encoders.py",
"repo_id": "diffusers",
"token_count": 7338
} | 165 |
# Copyright 2025 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | diffusers/src/diffusers/modular_pipelines/wan/denoise.py/0 | {
"file_path": "diffusers/src/diffusers/modular_pipelines/wan/denoise.py",
"repo_id": "diffusers",
"token_count": 4355
} | 166 |
# Copyright 2025 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | diffusers/src/diffusers/pipelines/blip_diffusion/modeling_blip2.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/blip_diffusion/modeling_blip2.py",
"repo_id": "diffusers",
"token_count": 12021
} | 167 |
# Copyright 2025 Salesforce.com, inc.
# Copyright 2025 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENS... | diffusers/src/diffusers/pipelines/controlnet/pipeline_controlnet_blip_diffusion.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/controlnet/pipeline_controlnet_blip_diffusion.py",
"repo_id": "diffusers",
"token_count": 7781
} | 168 |
from typing import TYPE_CHECKING
from ....utils import DIFFUSERS_SLOW_IMPORT, _LazyModule
_import_structure = {
"mel": ["Mel"],
"pipeline_audio_diffusion": ["AudioDiffusionPipeline"],
}
if TYPE_CHECKING or DIFFUSERS_SLOW_IMPORT:
from .mel import Mel
from .pipeline_audio_diffusion import AudioDiffusi... | diffusers/src/diffusers/pipelines/deprecated/audio_diffusion/__init__.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/deprecated/audio_diffusion/__init__.py",
"repo_id": "diffusers",
"token_count": 212
} | 169 |
from typing import TYPE_CHECKING
from ....utils import (
DIFFUSERS_SLOW_IMPORT,
OptionalDependencyNotAvailable,
_LazyModule,
get_objects_from_module,
is_torch_available,
is_transformers_available,
)
_dummy_objects = {}
_import_structure = {}
try:
if not (is_transformers_available() and i... | diffusers/src/diffusers/pipelines/deprecated/stable_diffusion_variants/__init__.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/deprecated/stable_diffusion_variants/__init__.py",
"repo_id": "diffusers",
"token_count": 817
} | 170 |
# Copyright 2025 Microsoft 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 require... | diffusers/src/diffusers/pipelines/deprecated/vq_diffusion/pipeline_vq_diffusion.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/deprecated/vq_diffusion/pipeline_vq_diffusion.py",
"repo_id": "diffusers",
"token_count": 6456
} | 171 |
# Copyright 2025 The Framepack Team, The HunyuanVideo 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/license... | diffusers/src/diffusers/pipelines/hunyuan_video/pipeline_hunyuan_video_framepack.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/hunyuan_video/pipeline_hunyuan_video_framepack.py",
"repo_id": "diffusers",
"token_count": 24668
} | 172 |
# Copyright 2025 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | diffusers/src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_combined.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_combined.py",
"repo_id": "diffusers",
"token_count": 18863
} | 173 |
# Copyright 2025 ChatGLM3-6B Model Team, Kwai-Kolors 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... | diffusers/src/diffusers/pipelines/kolors/tokenizer.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/kolors/tokenizer.py",
"repo_id": "diffusers",
"token_count": 5907
} | 174 |
# Copyright 2025 Lightricks 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/pipelines/ltx/pipeline_ltx_condition.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/ltx/pipeline_ltx_condition.py",
"repo_id": "diffusers",
"token_count": 27913
} | 175 |
# 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_utils.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/pipeline_utils.py",
"repo_id": "diffusers",
"token_count": 45400
} | 176 |
from typing import TYPE_CHECKING
from ...utils import (
DIFFUSERS_SLOW_IMPORT,
OptionalDependencyNotAvailable,
_LazyModule,
get_objects_from_module,
is_torch_available,
is_transformers_available,
is_transformers_version,
)
_dummy_objects = {}
_import_structure = {}
try:
if not (is_tr... | diffusers/src/diffusers/pipelines/stable_audio/__init__.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/stable_audio/__init__.py",
"repo_id": "diffusers",
"token_count": 604
} | 177 |
import numpy as np
import torch
from ...utils import is_invisible_watermark_available
if is_invisible_watermark_available():
from imwatermark import WatermarkEncoder
# Copied from https://github.com/Stability-AI/generative-models/blob/613af104c6b85184091d42d374fef420eddb356d/scripts/demo/streamlit_helpers.py#L... | diffusers/src/diffusers/pipelines/stable_diffusion_xl/watermark.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/stable_diffusion_xl/watermark.py",
"repo_id": "diffusers",
"token_count": 596
} | 178 |
# Copyright 2025 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/text_proj.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/unclip/text_proj.py",
"repo_id": "diffusers",
"token_count": 1638
} | 179 |
# Copyright (c) 2022 Dominic Rampas MIT License
# Copyright 2025 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licen... | diffusers/src/diffusers/pipelines/wuerstchen/modeling_paella_vq_model.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/wuerstchen/modeling_paella_vq_model.py",
"repo_id": "diffusers",
"token_count": 3040
} | 180 |
# Copyright 2025 The HuggingFace Team and City96. All rights reserved.
# #
# # Licensed under the Apache License, Version 2.0 (the "License");
# # you may not use this file except in compliance with the License.
# # You may obtain a copy of the License at
# #
# # http://www.apache.org/licenses/LICENSE-2.0
# #
# # U... | diffusers/src/diffusers/quantizers/gguf/utils.py/0 | {
"file_path": "diffusers/src/diffusers/quantizers/gguf/utils.py",
"repo_id": "diffusers",
"token_count": 9162
} | 181 |
# Copyright 2025 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_cosine_dpmsolver_multistep.py/0 | {
"file_path": "diffusers/src/diffusers/schedulers/scheduling_cosine_dpmsolver_multistep.py",
"repo_id": "diffusers",
"token_count": 10962
} | 182 |
# Copyright 2025 Katherine Crowson and The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless... | diffusers/src/diffusers/schedulers/scheduling_lms_discrete_flax.py/0 | {
"file_path": "diffusers/src/diffusers/schedulers/scheduling_lms_discrete_flax.py",
"repo_id": "diffusers",
"token_count": 4681
} | 183 |
# This file is autogenerated by the command `make fix-copies`, do not edit.
from ..utils import DummyObject, requires_backends
class OnnxStableDiffusionImg2ImgPipeline(metaclass=DummyObject):
_backends = ["torch", "transformers", "onnx"]
def __init__(self, *args, **kwargs):
requires_backends(self, ["... | diffusers/src/diffusers/utils/dummy_torch_and_transformers_and_onnx_objects.py/0 | {
"file_path": "diffusers/src/diffusers/utils/dummy_torch_and_transformers_and_onnx_objects.py",
"repo_id": "diffusers",
"token_count": 1270
} | 184 |
# coding=utf-8
# Copyright 2025 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | diffusers/src/diffusers/utils/remote_utils.py/0 | {
"file_path": "diffusers/src/diffusers/utils/remote_utils.py",
"repo_id": "diffusers",
"token_count": 6925
} | 185 |
# Copyright 2025 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | diffusers/tests/lora/test_lora_layers_cogvideox.py/0 | {
"file_path": "diffusers/tests/lora/test_lora_layers_cogvideox.py",
"repo_id": "diffusers",
"token_count": 2620
} | 186 |
# coding=utf-8
# Copyright 2025 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | diffusers/tests/models/autoencoders/test_models_vq.py/0 | {
"file_path": "diffusers/tests/models/autoencoders/test_models_vq.py",
"repo_id": "diffusers",
"token_count": 1611
} | 187 |
# coding=utf-8
# Copyright 2025 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | diffusers/tests/models/transformers/test_models_transformer_cogvideox.py/0 | {
"file_path": "diffusers/tests/models/transformers/test_models_transformer_cogvideox.py",
"repo_id": "diffusers",
"token_count": 2166
} | 188 |
# coding=utf-8
# Copyright 2025 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | diffusers/tests/models/transformers/test_models_transformer_omnigen.py/0 | {
"file_path": "diffusers/tests/models/transformers/test_models_transformer_omnigen.py",
"repo_id": "diffusers",
"token_count": 1326
} | 189 |
# coding=utf-8
# Copyright 2025 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | diffusers/tests/models/unets/test_unet_2d_blocks.py/0 | {
"file_path": "diffusers/tests/models/unets/test_unet_2d_blocks.py",
"repo_id": "diffusers",
"token_count": 5186
} | 190 |
# coding=utf-8
# Copyright 2025 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | diffusers/tests/others/test_utils.py/0 | {
"file_path": "diffusers/tests/others/test_utils.py",
"repo_id": "diffusers",
"token_count": 3862
} | 191 |
import unittest
import numpy as np
import PIL.Image
import torch
from transformers import AutoTokenizer, CLIPTextConfig, CLIPTextModel, CLIPTokenizer, T5EncoderModel
from diffusers import (
AutoencoderKL,
FasterCacheConfig,
FlowMatchEulerDiscreteScheduler,
FluxKontextPipeline,
FluxTransformer2DMod... | diffusers/tests/pipelines/flux/test_pipeline_flux_kontext.py/0 | {
"file_path": "diffusers/tests/pipelines/flux/test_pipeline_flux_kontext.py",
"repo_id": "diffusers",
"token_count": 2913
} | 192 |
# coding=utf-8
# Copyright 2025 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | diffusers/tests/pipelines/kandinsky/test_kandinsky_img2img.py/0 | {
"file_path": "diffusers/tests/pipelines/kandinsky/test_kandinsky_img2img.py",
"repo_id": "diffusers",
"token_count": 6474
} | 193 |
# coding=utf-8
# Copyright 2025 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | diffusers/tests/pipelines/kolors/test_kolors.py/0 | {
"file_path": "diffusers/tests/pipelines/kolors/test_kolors.py",
"repo_id": "diffusers",
"token_count": 2399
} | 194 |
# These are canonical sets of parameters for different types of pipelines.
# They are set on subclasses of `PipelineTesterMixin` as `params` and
# `batch_params`.
#
# If a pipeline's set of arguments has minor changes from one of the common sets
# of arguments, do not make modifications to the existing common sets of a... | diffusers/tests/pipelines/pipeline_params.py/0 | {
"file_path": "diffusers/tests/pipelines/pipeline_params.py",
"repo_id": "diffusers",
"token_count": 1597
} | 195 |
# coding=utf-8
# Copyright 2025 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | diffusers/tests/pipelines/stable_diffusion_2/test_stable_diffusion_upscale.py/0 | {
"file_path": "diffusers/tests/pipelines/stable_diffusion_2/test_stable_diffusion_upscale.py",
"repo_id": "diffusers",
"token_count": 8527
} | 196 |
# Copyright 2025 The HuggingFace Team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | diffusers/tests/pipelines/wan/test_wan.py/0 | {
"file_path": "diffusers/tests/pipelines/wan/test_wan.py",
"repo_id": "diffusers",
"token_count": 3135
} | 197 |
# coding=utf-8
# Copyright 2025 The HuggingFace Team 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 clone of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | diffusers/tests/quantization/test_torch_compile_utils.py/0 | {
"file_path": "diffusers/tests/quantization/test_torch_compile_utils.py",
"repo_id": "diffusers",
"token_count": 1727
} | 198 |
import torch
from diffusers import SASolverScheduler
from diffusers.utils.testing_utils import require_torchsde, torch_device
from .test_schedulers import SchedulerCommonTest
@require_torchsde
class SASolverSchedulerTest(SchedulerCommonTest):
scheduler_classes = (SASolverScheduler,)
forward_default_kwargs =... | diffusers/tests/schedulers/test_scheduler_sasolver.py/0 | {
"file_path": "diffusers/tests/schedulers/test_scheduler_sasolver.py",
"repo_id": "diffusers",
"token_count": 3611
} | 199 |
# 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
} | 200 |
# coding=utf-8
# Copyright 2025 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | diffusers/utils/notify_slack_about_release.py/0 | {
"file_path": "diffusers/utils/notify_slack_about_release.py",
"repo_id": "diffusers",
"token_count": 993
} | 201 |
# 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": 3330
} | 202 |
#!/usr/bin/env python
# Copyright 2024 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | lerobot/src/lerobot/cameras/camera.py/0 | {
"file_path": "lerobot/src/lerobot/cameras/camera.py",
"repo_id": "lerobot",
"token_count": 1431
} | 203 |
# Copyright 2024 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | lerobot/src/lerobot/datasets/backward_compatibility.py/0 | {
"file_path": "lerobot/src/lerobot/datasets/backward_compatibility.py",
"repo_id": "lerobot",
"token_count": 939
} | 204 |
# Copyright 2024 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | lerobot/src/lerobot/datasets/v21/convert_stats.py/0 | {
"file_path": "lerobot/src/lerobot/datasets/v21/convert_stats.py",
"repo_id": "lerobot",
"token_count": 1756
} | 205 |
# Copyright 2024 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | lerobot/src/lerobot/motors/feetech/feetech.py/0 | {
"file_path": "lerobot/src/lerobot/motors/feetech/feetech.py",
"repo_id": "lerobot",
"token_count": 8570
} | 206 |
# Copyright 2025 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | lerobot/src/lerobot/policies/smolvla/configuration_smolvla.py/0 | {
"file_path": "lerobot/src/lerobot/policies/smolvla/configuration_smolvla.py",
"repo_id": "lerobot",
"token_count": 2225
} | 207 |
#!/usr/bin/env python
# Copyright 2025 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | lerobot/src/lerobot/processor/rename_processor.py/0 | {
"file_path": "lerobot/src/lerobot/processor/rename_processor.py",
"repo_id": "lerobot",
"token_count": 626
} | 208 |
#!/usr/bin/env python
# Copyright 2024 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | lerobot/src/lerobot/robots/koch_follower/koch_follower.py/0 | {
"file_path": "lerobot/src/lerobot/robots/koch_follower/koch_follower.py",
"repo_id": "lerobot",
"token_count": 4320
} | 209 |
# !/usr/bin/env python
# Copyright 2025 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#... | lerobot/src/lerobot/scripts/rl/gym_manipulator.py/0 | {
"file_path": "lerobot/src/lerobot/scripts/rl/gym_manipulator.py",
"repo_id": "lerobot",
"token_count": 34160
} | 210 |
#!/usr/bin/env python
# Copyright 2025 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | lerobot/src/lerobot/teleoperators/bi_so100_leader/bi_so100_leader.py/0 | {
"file_path": "lerobot/src/lerobot/teleoperators/bi_so100_leader/bi_so100_leader.py",
"repo_id": "lerobot",
"token_count": 1658
} | 211 |
---
# For reference on model card metadata, see the spec: https://github.com/huggingface/hub-docs/blob/main/modelcard.md?plain=1
# Doc / guide: https://huggingface.co/docs/hub/model-cards
# prettier-ignore
{{card_data}}
---
# Model Card for {{ model_name | default("Model ID", true) }}
<!-- Provide a quick summary of ... | lerobot/src/lerobot/templates/lerobot_modelcard_template.md/0 | {
"file_path": "lerobot/src/lerobot/templates/lerobot_modelcard_template.md",
"repo_id": "lerobot",
"token_count": 1217
} | 212 |
#!/usr/bin/env python
# Copyright 2025 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | lerobot/src/lerobot/utils/queue.py/0 | {
"file_path": "lerobot/src/lerobot/utils/queue.py",
"repo_id": "lerobot",
"token_count": 585
} | 213 |
#!/usr/bin/env python
# Copyright 2024 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | lerobot/tests/artifacts/datasets/save_dataset_to_safetensors.py/0 | {
"file_path": "lerobot/tests/artifacts/datasets/save_dataset_to_safetensors.py",
"repo_id": "lerobot",
"token_count": 1380
} | 214 |
#!/usr/bin/env python
# Copyright 2024 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | lerobot/tests/artifacts/policies/save_policy_to_safetensors.py/0 | {
"file_path": "lerobot/tests/artifacts/policies/save_policy_to_safetensors.py",
"repo_id": "lerobot",
"token_count": 2333
} | 215 |
#!/usr/bin/env python
# Copyright 2024 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | lerobot/tests/conftest.py/0 | {
"file_path": "lerobot/tests/conftest.py",
"repo_id": "lerobot",
"token_count": 928
} | 216 |
# Copyright 2024 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | lerobot/tests/fixtures/optimizers.py/0 | {
"file_path": "lerobot/tests/fixtures/optimizers.py",
"repo_id": "lerobot",
"token_count": 406
} | 217 |
import torch
from lerobot.processor.pipeline import (
RobotProcessor,
TransitionKey,
_default_batch_to_transition,
_default_transition_to_batch,
)
def _dummy_batch():
"""Create a dummy batch using the new format with observation.* and next.* keys."""
return {
"observation.image.left":... | lerobot/tests/processor/test_batch_conversion.py/0 | {
"file_path": "lerobot/tests/processor/test_batch_conversion.py",
"repo_id": "lerobot",
"token_count": 3950
} | 218 |
#!/usr/bin/env python
# Copyright 2025 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | lerobot/tests/utils/test_process.py/0 | {
"file_path": "lerobot/tests/utils/test_process.py",
"repo_id": "lerobot",
"token_count": 1332
} | 219 |
# Model arguments
model_name_or_path: Qwen/Qwen2.5-Coder-7B-Instruct
model_revision: main
torch_dtype: bfloat16
attn_implementation: flash_attention_2
# Data training arguments
dataset_name: open-r1/codeforces
dataset_prompt_column: prompt
dataset_config: verifiable-prompts
dataset_test_split: test
dataset_train_split:... | open-r1/recipes/Qwen2.5-Coder-7B-Instruct/grpo/config_codeforces.yaml/0 | {
"file_path": "open-r1/recipes/Qwen2.5-Coder-7B-Instruct/grpo/config_codeforces.yaml",
"repo_id": "open-r1",
"token_count": 926
} | 220 |
# Copyright 2025 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | open-r1/scripts/pass_rate_filtering/compute_pass_rate.py/0 | {
"file_path": "open-r1/scripts/pass_rate_filtering/compute_pass_rate.py",
"repo_id": "open-r1",
"token_count": 3331
} | 221 |
#!/bin/bash
#SBATCH --job-name=r1-server
#SBATCH --partition=hopper-prod
#SBATCH --qos=normal
#SBATCH --nodes=2
#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="de... | open-r1/slurm/serve_r1.slurm/0 | {
"file_path": "open-r1/slurm/serve_r1.slurm",
"repo_id": "open-r1",
"token_count": 1544
} | 222 |
from collections import defaultdict
from functools import lru_cache
from datasets import load_dataset
def add_includes(code: str, problem_id: str) -> str:
"""
Fix common compilation errors for IOI problems.
"""
if not code:
return code
# has most of the useful functions
code_header = ... | open-r1/src/open_r1/utils/competitive_programming/ioi_utils.py/0 | {
"file_path": "open-r1/src/open_r1/utils/competitive_programming/ioi_utils.py",
"repo_id": "open-r1",
"token_count": 520
} | 223 |
<!--Copyright 2023 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | peft/docs/source/conceptual_guides/oft.md/0 | {
"file_path": "peft/docs/source/conceptual_guides/oft.md",
"repo_id": "peft",
"token_count": 3135
} | 224 |
<!--Copyright 2023 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | peft/docs/source/package_reference/auto_class.md/0 | {
"file_path": "peft/docs/source/package_reference/auto_class.md",
"repo_id": "peft",
"token_count": 470
} | 225 |
<!--Copyright 2024 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | peft/docs/source/package_reference/merge_utils.md/0 | {
"file_path": "peft/docs/source/package_reference/merge_utils.md",
"repo_id": "peft",
"token_count": 361
} | 226 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.