text stringlengths 5 631k | id stringlengths 14 178 | metadata dict | __index_level_0__ int64 0 647 |
|---|---|---|---|
# Amazon Web Services (AWS)
| Feature | Available |
| --------------------------- | --------- |
| [Tools](../tools) | No |
| [Multimodal](../multimodal) | No |
You may specify your Amazon SageMaker instance as an endpoint for Chat UI:
```ini
MODELS=`[{
"name": "your-mode... | chat-ui/docs/source/configuration/models/providers/aws.md/0 | {
"file_path": "chat-ui/docs/source/configuration/models/providers/aws.md",
"repo_id": "chat-ui",
"token_count": 348
} | 73 |
# 🤗 Chat UI
Open source chat interface with support for tools, web search, multimodal and many API providers. The app uses MongoDB and SvelteKit behind the scenes. Try the live version of the app called [HuggingChat on hf.co/chat](https://huggingface.co/chat) or [setup your own instance](./installation/spaces).
🔧 *... | chat-ui/docs/source/index.md/0 | {
"file_path": "chat-ui/docs/source/index.md",
"repo_id": "chat-ui",
"token_count": 1435
} | 74 |
declare module "*.ttf" {
const value: ArrayBuffer;
export default value;
}
| chat-ui/src/ambient.d.ts/0 | {
"file_path": "chat-ui/src/ambient.d.ts",
"repo_id": "chat-ui",
"token_count": 26
} | 75 |
<script lang="ts">
interface Props {
isCollapsed: boolean;
onClick: () => void;
classNames: string;
}
let { isCollapsed, classNames, onClick }: Props = $props();
</script>
<button
onclick={onClick}
class="{classNames} group flex h-16 w-6 flex-col items-center justify-center -space-y-1 outline-none *:h-3 *:... | chat-ui/src/lib/components/ExpandNavigation.svelte/0 | {
"file_path": "chat-ui/src/lib/components/ExpandNavigation.svelte",
"repo_id": "chat-ui",
"token_count": 304
} | 76 |
<script lang="ts">
import { fade } from "svelte/transition";
import { onDestroy, untrack } from "svelte";
import IconChevron from "./icons/IconChevron.svelte";
let visible = $state(false);
interface Props {
scrollNode: HTMLElement;
class?: string;
}
let { scrollNode, class: className = "" }: Props = $props... | chat-ui/src/lib/components/ScrollToPreviousBtn.svelte/0 | {
"file_path": "chat-ui/src/lib/components/ScrollToPreviousBtn.svelte",
"repo_id": "chat-ui",
"token_count": 771
} | 77 |
<script lang="ts">
import type { Message } from "$lib/types/Message";
import { createEventDispatcher, tick } from "svelte";
import { page } from "$app/state";
import CopyToClipBoardBtn from "../CopyToClipBoardBtn.svelte";
import IconLoading from "../icons/IconLoading.svelte";
import CarbonRotate360 from "~icons/... | chat-ui/src/lib/components/chat/ChatMessage.svelte/0 | {
"file_path": "chat-ui/src/lib/components/chat/ChatMessage.svelte",
"repo_id": "chat-ui",
"token_count": 5663
} | 78 |
<script lang="ts">
interface Props {
classNames?: string;
}
let { classNames = "" }: Props = $props();
</script>
<div class={"inline-flex h-8 flex-none items-center gap-1 " + classNames}>
<div
class="h-1 w-1 flex-none animate-bounce rounded-full bg-gray-500 dark:bg-gray-400"
style="animation-delay: 0.25s;"
... | chat-ui/src/lib/components/icons/IconLoading.svelte/0 | {
"file_path": "chat-ui/src/lib/components/icons/IconLoading.svelte",
"repo_id": "chat-ui",
"token_count": 254
} | 79 |
import type { Migration } from ".";
import { collections } from "$lib/server/database";
import { ObjectId } from "mongodb";
const updateAssistantsModels: Migration = {
_id: new ObjectId("5f9f3f3f3f3f3f3f3f3f3f3f"),
name: "Update deprecated models in assistants with the default model",
up: async () => {
const mode... | chat-ui/src/lib/migrations/routines/02-update-assistants-models.ts/0 | {
"file_path": "chat-ui/src/lib/migrations/routines/02-update-assistants-models.ts",
"repo_id": "chat-ui",
"token_count": 519
} | 80 |
import { Elysia, error, t } from "elysia";
import { authPlugin } from "$api/authPlugin";
import { collections } from "$lib/server/database";
import { ObjectId } from "mongodb";
import { authCondition } from "$lib/server/auth";
import { models, validModelIdSchema } from "$lib/server/models";
import { convertLegacyConver... | chat-ui/src/lib/server/api/routes/groups/conversations.ts/0 | {
"file_path": "chat-ui/src/lib/server/api/routes/groups/conversations.ts",
"repo_id": "chat-ui",
"token_count": 6961
} | 81 |
import { makeImageProcessor, type ImageProcessorOptions } from "../images";
import { makeDocumentProcessor, type FileProcessorOptions } from "../document";
import type { EndpointMessage } from "../endpoints";
import type { MessageFile } from "$lib/types/Message";
import type {
BetaImageBlockParam,
BetaMessageParam,
... | chat-ui/src/lib/server/endpoints/anthropic/utils.ts/0 | {
"file_path": "chat-ui/src/lib/server/endpoints/anthropic/utils.ts",
"repo_id": "chat-ui",
"token_count": 1331
} | 82 |
import type { TextGenerationStreamOutput } from "@huggingface/inference";
import type OpenAI from "openai";
import type { Stream } from "openai/streaming";
import type { ToolCall } from "$lib/types/Tool";
type ToolCallWithParameters = {
toolCall: ToolCall;
parameterJsonString: string;
};
function prepareToolCalls(t... | chat-ui/src/lib/server/endpoints/openai/openAIChatToTextGenerationStream.ts/0 | {
"file_path": "chat-ui/src/lib/server/endpoints/openai/openAIChatToTextGenerationStream.ts",
"repo_id": "chat-ui",
"token_count": 1569
} | 83 |
import type { ConfigTool } from "$lib/types/Tool";
import { ObjectId } from "mongodb";
import vm from "node:vm";
const calculator: ConfigTool = {
_id: new ObjectId("00000000000000000000000C"),
type: "config",
description: "Calculate the result of a mathematical expression",
color: "blue",
icon: "code",
displayNa... | chat-ui/src/lib/server/tools/calculator.ts/0 | {
"file_path": "chat-ui/src/lib/server/tools/calculator.ts",
"repo_id": "chat-ui",
"token_count": 360
} | 84 |
/** Remove excess whitespace and newlines */
export const sanitizeString = (str: string) =>
str
.split("\n")
.map((s) => s.trim())
.filter(Boolean)
.join("\n")
.replaceAll(/ +/g, " ");
/** Collapses a string into a single line */
export const collapseString = (str: string) => sanitizeString(str.replaceAll(/... | chat-ui/src/lib/server/websearch/markdown/utils/nlp.ts/0 | {
"file_path": "chat-ui/src/lib/server/websearch/markdown/utils/nlp.ts",
"repo_id": "chat-ui",
"token_count": 126
} | 85 |
import type { Message } from "$lib/types/Message";
import { format } from "date-fns";
import type { EndpointMessage } from "../../endpoints/endpoints";
import { generateFromDefaultEndpoint } from "../../generateFromDefaultEndpoint";
import { getReturnFromGenerator } from "$lib/utils/getReturnFromGenerator";
import { ta... | chat-ui/src/lib/server/websearch/search/generateQuery.ts/0 | {
"file_path": "chat-ui/src/lib/server/websearch/search/generateQuery.ts",
"repo_id": "chat-ui",
"token_count": 759
} | 86 |
import type { ObjectId } from "bson";
export interface ConvSidebar {
id: ObjectId | string;
title: string;
updatedAt: Date;
model?: string;
assistantId?: ObjectId | string;
avatarUrl?: string | Promise<string | undefined>;
}
| chat-ui/src/lib/types/ConvSidebar.ts/0 | {
"file_path": "chat-ui/src/lib/types/ConvSidebar.ts",
"repo_id": "chat-ui",
"token_count": 76
} | 87 |
import type { Timestamps } from "./Timestamps";
export interface TokenCache extends Timestamps {
tokenHash: string; // sha256 of the bearer token
userId: string; // the matching hf user id
}
| chat-ui/src/lib/types/TokenCache.ts/0 | {
"file_path": "chat-ui/src/lib/types/TokenCache.ts",
"repo_id": "chat-ui",
"token_count": 57
} | 88 |
import type { Conversation } from "$lib/types/Conversation";
import { sha256 } from "./sha256";
export async function hashConv(conv: Conversation) {
// messages contains the conversation message but only the immutable part
const messages = conv.messages.map((message) => {
return (({ from, id, content, webSearchId ... | chat-ui/src/lib/utils/hashConv.ts/0 | {
"file_path": "chat-ui/src/lib/utils/hashConv.ts",
"repo_id": "chat-ui",
"token_count": 132
} | 89 |
import { describe, test, expect } from "vitest";
import { compileTemplate } from "./template";
// Test data for simple templates
const modelData = {
preprompt: "Hello",
};
const simpleTemplate = "Test: {{preprompt}} and {{foo}}";
// Additional realistic test data for Llama 70B templates
const messages = [
{ from: ... | chat-ui/src/lib/utils/template.spec.ts/0 | {
"file_path": "chat-ui/src/lib/utils/template.spec.ts",
"repo_id": "chat-ui",
"token_count": 890
} | 90 |
import { collections } from "$lib/server/database";
import { ObjectId } from "mongodb";
import { describe, expect, it } from "vitest";
// function used to insert conversations used for testing
export const insertLegacyConversation = async () => {
const res = await collections.conversations.insertOne({
_id: new Obj... | chat-ui/src/lib/utils/tree/treeHelpers.spec.ts/0 | {
"file_path": "chat-ui/src/lib/utils/tree/treeHelpers.spec.ts",
"repo_id": "chat-ui",
"token_count": 1864
} | 91 |
import { collections } from "$lib/server/database";
import { authCondition } from "$lib/server/auth";
import { z } from "zod";
import { models } from "$lib/server/models";
import { ObjectId } from "mongodb";
export async function GET({ locals, params }) {
const id = z.string().parse(params.id);
const convId = new Ob... | chat-ui/src/routes/api/conversation/[id]/+server.ts/0 | {
"file_path": "chat-ui/src/routes/api/conversation/[id]/+server.ts",
"repo_id": "chat-ui",
"token_count": 492
} | 92 |
<script lang="ts">
import logo from "../../../../../static/huggingchat/logo.svg?raw";
interface Props {
name: string;
description?: string;
createdByName: string | undefined;
avatar: string | undefined;
}
let { name, description = "", createdByName, avatar }: Props = $props();
</script>
<div class="flex h... | chat-ui/src/routes/assistant/[assistantId]/thumbnail.png/ChatThumbnail.svelte/0 | {
"file_path": "chat-ui/src/routes/assistant/[assistantId]/thumbnail.png/ChatThumbnail.svelte",
"repo_id": "chat-ui",
"token_count": 573
} | 93 |
import { refreshSessionCookie } from "$lib/server/auth";
import { collections } from "$lib/server/database";
import { ObjectId } from "mongodb";
import { DEFAULT_SETTINGS } from "$lib/types/Settings";
import { z } from "zod";
import type { UserinfoResponse } from "openid-client";
import { error, type Cookies } from "@s... | chat-ui/src/routes/login/callback/updateUser.ts/0 | {
"file_path": "chat-ui/src/routes/login/callback/updateUser.ts",
"repo_id": "chat-ui",
"token_count": 1961
} | 94 |
<script lang="ts">
import { enhance } from "$app/forms";
import { base } from "$app/paths";
import { page } from "$app/state";
import { goto, invalidateAll } from "$app/navigation";
import { useSettingsStore } from "$lib/stores/settings";
import type { PageData } from "./$types";
import CarbonPen from "~icons/... | 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": 6189
} | 95 |
<script lang="ts">
import Modal from "$lib/components/Modal.svelte";
import ToolEdit from "../ToolEdit.svelte";
</script>
<Modal
on:close={() => window.history.back()}
width="h-[95dvh] w-[90dvw] overflow-hidden rounded-2xl bg-white shadow-2xl outline-none sm:h-[85dvh] xl:w-[1200px] 2xl:h-[75dvh]"
>
<ToolEdit on:c... | chat-ui/src/routes/tools/new/+page.svelte/0 | {
"file_path": "chat-ui/src/routes/tools/new/+page.svelte",
"repo_id": "chat-ui",
"token_count": 157
} | 96 |
import adapter from "@sveltejs/adapter-node";
import { vitePreprocess } from "@sveltejs/vite-plugin-svelte";
import dotenv from "dotenv";
import { execSync } from "child_process";
dotenv.config({ path: "./.env.local" });
dotenv.config({ path: "./.env" });
function getCurrentCommitSHA() {
try {
return execSync("git... | chat-ui/svelte.config.js/0 | {
"file_path": "chat-ui/svelte.config.js",
"repo_id": "chat-ui",
"token_count": 474
} | 97 |
import json
import os
from dataclasses import dataclass
import numpy as np
import pyarrow as pa
import datasets
from utils import get_duration
SPEED_TEST_N_EXAMPLES = 100_000_000_000
SPEED_TEST_CHUNK_SIZE = 10_000
RESULTS_BASEPATH, RESULTS_FILENAME = os.path.split(__file__)
RESULTS_FILE_PATH = os.path.join(RESULTS... | datasets/benchmarks/benchmark_getitem_100B.py/0 | {
"file_path": "datasets/benchmarks/benchmark_getitem_100B.py",
"repo_id": "datasets",
"token_count": 867
} | 98 |
# Datasets 🤝 Arrow
## What is Arrow?
[Arrow](https://arrow.apache.org/) enables large amounts of data to be processed and moved quickly. It is a specific data format that stores data in a columnar memory layout. This provides several significant advantages:
* Arrow's standard format allows [zero-copy reads](https:/... | datasets/docs/source/about_arrow.md/0 | {
"file_path": "datasets/docs/source/about_arrow.md",
"repo_id": "datasets",
"token_count": 685
} | 99 |
# Load pdf data
<Tip warning={true}>
Pdf support is experimental and is subject to change.
</Tip>
Pdf datasets have [`Pdf`] type columns, which contain `pdfplumber` objects.
<Tip>
To work with pdf datasets, you need to have the `pdfplumber` package installed. Check out the [installation](https://github.com/jsvin... | datasets/docs/source/document_load.mdx/0 | {
"file_path": "datasets/docs/source/document_load.mdx",
"repo_id": "datasets",
"token_count": 2386
} | 100 |
# Object detection
Object detection models identify something in an image, and object detection datasets are used for applications such as autonomous driving and detecting natural hazards like wildfire. This guide will show you how to apply transformations to an object detection dataset following the [tutorial](https:... | datasets/docs/source/object_detection.mdx/0 | {
"file_path": "datasets/docs/source/object_detection.mdx",
"repo_id": "datasets",
"token_count": 2332
} | 101 |
# Preprocess
In addition to loading datasets, 🤗 Datasets other main goal is to offer a diverse set of preprocessing functions to get a dataset into an appropriate format for training with your machine learning framework.
There are many possible ways to preprocess a dataset, and it all depends on your specific datase... | datasets/docs/source/use_dataset.mdx/0 | {
"file_path": "datasets/docs/source/use_dataset.mdx",
"repo_id": "datasets",
"token_count": 3568
} | 102 |
# 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/arrow_reader.py/0 | {
"file_path": "datasets/src/datasets/arrow_reader.py",
"repo_id": "datasets",
"token_count": 10452
} | 103 |
import io
import os
from collections.abc import Iterable
from typing import Optional, Union
from ..utils.file_utils import ( # noqa: F401 # backward compatibility
SINGLE_FILE_COMPRESSION_PROTOCOLS,
ArchiveIterable,
FilesIterable,
_get_extraction_protocol,
_get_path_extension,
_prepare_path_and... | datasets/src/datasets/download/streaming_download_manager.py/0 | {
"file_path": "datasets/src/datasets/download/streaming_download_manager.py",
"repo_id": "datasets",
"token_count": 3364
} | 104 |
# 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/np_formatter.py/0 | {
"file_path": "datasets/src/datasets/formatting/np_formatter.py",
"repo_id": "datasets",
"token_count": 2122
} | 105 |
import asyncio
import contextlib
import copy
import fnmatch
import inspect
import itertools
import json
import math
import multiprocessing.pool
import random
import re
import sys
import time
from collections import Counter
from collections.abc import Iterable, Iterator
from copy import deepcopy
from dataclasses import ... | datasets/src/datasets/iterable_dataset.py/0 | {
"file_path": "datasets/src/datasets/iterable_dataset.py",
"repo_id": "datasets",
"token_count": 92265
} | 106 |
from dataclasses import dataclass
from typing import Callable, Optional
import datasets
@dataclass
class GeneratorConfig(datasets.BuilderConfig):
generator: Optional[Callable] = None
gen_kwargs: Optional[dict] = None
features: Optional[datasets.Features] = None
split: datasets.NamedSplit = datasets.S... | datasets/src/datasets/packaged_modules/generator/generator.py/0 | {
"file_path": "datasets/src/datasets/packaged_modules/generator/generator.py",
"repo_id": "datasets",
"token_count": 374
} | 107 |
import sys
from dataclasses import dataclass
from typing import TYPE_CHECKING, Optional, Union
import pandas as pd
import pyarrow as pa
import datasets
import datasets.config
from datasets.features.features import require_storage_cast
from datasets.table import table_cast
if TYPE_CHECKING:
import sqlite3
i... | datasets/src/datasets/packaged_modules/sql/sql.py/0 | {
"file_path": "datasets/src/datasets/packaged_modules/sql/sql.py",
"repo_id": "datasets",
"token_count": 1968
} | 108 |
# 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/utils/__init__.py/0 | {
"file_path": "datasets/src/datasets/utils/__init__.py",
"repo_id": "datasets",
"token_count": 284
} | 109 |
# 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
} | 110 |
import os
import random
import tempfile
import unittest
import numpy as np
import pandas as pd
import pyarrow as pa
import pytest
from absl.testing import parameterized
import datasets
from datasets.arrow_writer import ArrowWriter
from datasets.features import Array2D, Array3D, Array4D, Array5D, Value
from datasets.f... | datasets/tests/features/test_array_xd.py/0 | {
"file_path": "datasets/tests/features/test_array_xd.py",
"repo_id": "datasets",
"token_count": 9828
} | 111 |
import fsspec
import pyarrow.parquet as pq
import pytest
from datasets import Audio, Dataset, DatasetDict, Features, IterableDatasetDict, List, NamedSplit, Value, config
from datasets.features.image import Image
from datasets.info import DatasetInfo
from datasets.io.parquet import ParquetDatasetReader, ParquetDatasetW... | datasets/tests/io/test_parquet.py/0 | {
"file_path": "datasets/tests/io/test_parquet.py",
"repo_id": "datasets",
"token_count": 3919
} | 112 |
import textwrap
import pyarrow as pa
import pytest
from datasets import Features, Image
from datasets.builder import InvalidConfigName
from datasets.data_files import DataFilesList
from datasets.packaged_modules.text.text import Text, TextConfig
from ..utils import require_pil
@pytest.fixture
def text_file(tmp_pat... | datasets/tests/packaged_modules/test_text.py/0 | {
"file_path": "datasets/tests/packaged_modules/test_text.py",
"repo_id": "datasets",
"token_count": 1494
} | 113 |
import importlib
import os
import fsspec
import pytest
from fsspec import register_implementation
from fsspec.core import url_to_fs
from fsspec.registry import _registry as _fsspec_registry
from datasets.filesystems import COMPRESSION_FILESYSTEMS, is_remote_filesystem
from .utils import require_lz4, require_zstandar... | datasets/tests/test_filesystem.py/0 | {
"file_path": "datasets/tests/test_filesystem.py",
"repo_id": "datasets",
"token_count": 1145
} | 114 |
import inspect
import pytest
from datasets.splits import Split, SplitDict, SplitInfo
from datasets.utils.py_utils import asdict
@pytest.mark.parametrize(
"split_dict",
[
SplitDict(),
SplitDict({"train": SplitInfo(name="train", num_bytes=1337, num_examples=42, dataset_name="my_dataset")}),
... | datasets/tests/test_splits.py/0 | {
"file_path": "datasets/tests/test_splits.py",
"repo_id": "datasets",
"token_count": 678
} | 115 |
<!--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/en/api/image_processor.md/0 | {
"file_path": "diffusers/docs/source/en/api/image_processor.md",
"repo_id": "diffusers",
"token_count": 496
} | 116 |
<!--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/en/api/models/consisid_transformer3d.md/0 | {
"file_path": "diffusers/docs/source/en/api/models/consisid_transformer3d.md",
"repo_id": "diffusers",
"token_count": 380
} | 117 |
<!--Copyright 2025 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": 1354
} | 118 |
<!--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/en/api/pipelines/dit.md/0 | {
"file_path": "diffusers/docs/source/en/api/pipelines/dit.md",
"repo_id": "diffusers",
"token_count": 528
} | 119 |
<!-- 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 applic... | diffusers/docs/source/en/api/pipelines/ltx_video.md/0 | {
"file_path": "diffusers/docs/source/en/api/pipelines/ltx_video.md",
"repo_id": "diffusers",
"token_count": 5650
} | 120 |
<!--Copyright 2025 The Intel Labs Team Authors and HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required... | diffusers/docs/source/en/api/pipelines/stable_diffusion/ldm3d_diffusion.md/0 | {
"file_path": "diffusers/docs/source/en/api/pipelines/stable_diffusion/ldm3d_diffusion.md",
"repo_id": "diffusers",
"token_count": 1307
} | 121 |
# Getting Started: VAE Encode with Hybrid Inference
VAE encode is used for training, image-to-image and image-to-video - turning into images or videos into latent representations.
## Memory
These tables demonstrate the VRAM requirements for VAE encode with SD v1 and SD XL on different GPUs.
For the majority of thes... | diffusers/docs/source/en/hybrid_inference/vae_encode.md/0 | {
"file_path": "diffusers/docs/source/en/hybrid_inference/vae_encode.md",
"repo_id": "diffusers",
"token_count": 5415
} | 122 |
<!--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/en/optimization/coreml.md/0 | {
"file_path": "diffusers/docs/source/en/optimization/coreml.md",
"repo_id": "diffusers",
"token_count": 3112
} | 123 |
<!--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/en/quantization/bitsandbytes.md/0 | {
"file_path": "diffusers/docs/source/en/quantization/bitsandbytes.md",
"repo_id": "diffusers",
"token_count": 5551
} | 124 |
<!--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/en/training/kandinsky.md/0 | {
"file_path": "diffusers/docs/source/en/training/kandinsky.md",
"repo_id": "diffusers",
"token_count": 5050
} | 125 |
<!--
Copyright 2023-2025 Marigold Team, ETH Zürich. All rights reserved.
Copyright 2024-2025 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.ap... | diffusers/docs/source/en/using-diffusers/marigold_usage.md/0 | {
"file_path": "diffusers/docs/source/en/using-diffusers/marigold_usage.md",
"repo_id": "diffusers",
"token_count": 11065
} | 126 |
<!--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/en/using-diffusers/unconditional_image_generation.md/0 | {
"file_path": "diffusers/docs/source/en/using-diffusers/unconditional_image_generation.md",
"repo_id": "diffusers",
"token_count": 635
} | 127 |
# 학습을 위한 데이터셋 만들기
[Hub](https://huggingface.co/datasets?task_categories=task_categories:text-to-image&sort=downloads) 에는 모델 교육을 위한 많은 데이터셋이 있지만,
관심이 있거나 사용하고 싶은 데이터셋을 찾을 수 없는 경우 🤗 [Datasets](https://huggingface.co/docs/datasets) 라이브러리를 사용하여 데이터셋을 만들 수 있습니다.
데이터셋 구조는 모델을 학습하려는 작업에 따라 달라집니다.
가장 기본적인 데이터셋 구조는 unconditio... | diffusers/docs/source/ko/training/create_dataset.md/0 | {
"file_path": "diffusers/docs/source/ko/training/create_dataset.md",
"repo_id": "diffusers",
"token_count": 3223
} | 128 |
<!--Copyright 2023 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | diffusers/docs/source/ko/using-diffusers/diffedit.md/0 | {
"file_path": "diffusers/docs/source/ko/using-diffusers/diffedit.md",
"repo_id": "diffusers",
"token_count": 6631
} | 129 |
<!--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/ko/using-diffusers/write_own_pipeline.md/0 | {
"file_path": "diffusers/docs/source/ko/using-diffusers/write_own_pipeline.md",
"repo_id": "diffusers",
"token_count": 9960
} | 130 |
<!--版权所有 2025 The HuggingFace Team。保留所有权利。
根据Apache许可证2.0版("许可证")授权;除非符合许可证,否则不得使用此文件。您可以在
http://www.apache.org/licenses/LICENSE-2.0
获取许可证的副本。
除非适用法律要求或书面同意,根据许可证分发的软件按"原样"分发,无任何明示或暗示的担保或条件。有关许可证的特定语言管理权限和限制,请参阅许可证。
-->
# AutoPipelineBlocks
[`~modular_pipelines.AutoPipelineBlocks`] 是一种包含支持不同工作流程的块的多块类型。它根据运行时提供的... | diffusers/docs/source/zh/modular_diffusers/auto_pipeline_blocks.md/0 | {
"file_path": "diffusers/docs/source/zh/modular_diffusers/auto_pipeline_blocks.md",
"repo_id": "diffusers",
"token_count": 3019
} | 131 |
<!--版权所有 2025 The HuggingFace Team。保留所有权利。
根据 Apache 许可证 2.0 版本("许可证")授权;除非遵守许可证,否则不得使用此文件。您可以在以下网址获取许可证副本:
http://www.apache.org/licenses/LICENSE-2.0
除非适用法律要求或书面同意,根据许可证分发的软件按"原样"分发,无任何明示或暗示的担保或条件。请参阅许可证了解具体的语言管理权限和限制。
-->
# Metal Performance Shaders (MPS)
> [!TIP]
> 带有 <img alt="MPS" src="https://img.shields.io/... | diffusers/docs/source/zh/optimization/mps.md/0 | {
"file_path": "diffusers/docs/source/zh/optimization/mps.md",
"repo_id": "diffusers",
"token_count": 2394
} | 132 |
<!--版权所有 2025 The HuggingFace Team。保留所有权利。
根据 Apache 许可证 2.0 版(“许可证”)授权;除非遵守许可证,否则不得使用此文件。您可以在以下网址获取许可证副本:
http://www.apache.org/licenses/LICENSE-2.0
除非适用法律要求或书面同意,否则根据许可证分发的软件按“原样”分发,不附带任何明示或暗示的担保或条件。请参阅许可证以了解特定的语言管理权限和限制。
-->
# DreamBooth
[DreamBooth](https://huggingface.co/papers/2208.12242) 是一种训练技术,通过仅训练少数主题或风... | diffusers/docs/source/zh/training/dreambooth.md/0 | {
"file_path": "diffusers/docs/source/zh/training/dreambooth.md",
"repo_id": "diffusers",
"token_count": 14115
} | 133 |
#!/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/advanced_diffusion_training/train_dreambooth_lora_flux_advanced.py/0 | {
"file_path": "diffusers/examples/advanced_diffusion_training/train_dreambooth_lora_flux_advanced.py",
"repo_id": "diffusers",
"token_count": 47718
} | 134 |
import glob
import os
from typing import Dict, List, Union
import safetensors.torch
import torch
from huggingface_hub import snapshot_download
from huggingface_hub.utils import validate_hf_hub_args
from diffusers import DiffusionPipeline, __version__
from diffusers.schedulers.scheduling_utils import SCHEDULER_CONFIG_... | diffusers/examples/community/checkpoint_merger.py/0 | {
"file_path": "diffusers/examples/community/checkpoint_merger.py",
"repo_id": "diffusers",
"token_count": 6156
} | 135 |
import inspect
from copy import deepcopy
from enum import Enum
from typing import List, Optional, Tuple, Union
import torch
from tqdm.auto import tqdm
from diffusers.models import AutoencoderKL, UNet2DConditionModel
from diffusers.pipelines.pipeline_utils import DiffusionPipeline
from diffusers.pipelines.stable_diffu... | diffusers/examples/community/mixture_tiling.py/0 | {
"file_path": "diffusers/examples/community/mixture_tiling.py",
"repo_id": "diffusers",
"token_count": 9142
} | 136 |
#!/usr/bin/env python
# coding=utf-8
# Copyright 2025 The LCM team and the HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apach... | diffusers/examples/consistency_distillation/train_lcm_distill_lora_sdxl.py/0 | {
"file_path": "diffusers/examples/consistency_distillation/train_lcm_distill_lora_sdxl.py",
"repo_id": "diffusers",
"token_count": 27823
} | 137 |
#!/usr/bin/env python
# coding=utf-8
# Copyright 2025 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LI... | diffusers/examples/controlnet/train_controlnet_flux.py/0 | {
"file_path": "diffusers/examples/controlnet/train_controlnet_flux.py",
"repo_id": "diffusers",
"token_count": 26239
} | 138 |
import argparse
import json
import pathlib
parser = argparse.ArgumentParser()
parser.add_argument(
"--path",
type=str,
required=True,
help="Path to folder with image-text pairs.",
)
parser.add_argument("--caption_column", type=str, default="prompt", help="Name of caption column.")
args = parser.parse_... | diffusers/examples/dreambooth/convert_to_imagefolder.py/0 | {
"file_path": "diffusers/examples/dreambooth/convert_to_imagefolder.py",
"repo_id": "diffusers",
"token_count": 367
} | 139 |
from torch import nn
from .RecCTCHead import CTCHead
from .RecMv1_enhance import MobileNetV1Enhance
from .RNN import Im2Im, Im2Seq, SequenceEncoder
backbone_dict = {"MobileNetV1Enhance": MobileNetV1Enhance}
neck_dict = {"SequenceEncoder": SequenceEncoder, "Im2Seq": Im2Seq, "None": Im2Im}
head_dict = {"CTCHead": CTCH... | diffusers/examples/research_projects/anytext/ocr_recog/RecModel.py/0 | {
"file_path": "diffusers/examples/research_projects/anytext/ocr_recog/RecModel.py",
"repo_id": "diffusers",
"token_count": 768
} | 140 |
# Diffusion Model Alignment Using Direct Preference Optimization
This directory provides LoRA implementations of Diffusion DPO proposed in [DiffusionModel Alignment Using Direct Preference Optimization](https://huggingface.co/papers/2311.12908) by Bram Wallace, Meihua Dang, Rafael Rafailov, Linqi Zhou, Aaron Lou, Sent... | diffusers/examples/research_projects/diffusion_dpo/README.md/0 | {
"file_path": "diffusers/examples/research_projects/diffusion_dpo/README.md",
"repo_id": "diffusers",
"token_count": 1256
} | 141 |
#!/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/flux_lora_quantization/train_dreambooth_lora_flux_miniature.py/0 | {
"file_path": "diffusers/examples/research_projects/flux_lora_quantization/train_dreambooth_lora_flux_miniature.py",
"repo_id": "diffusers",
"token_count": 21044
} | 142 |
import argparse
import itertools
import math
import os
import random
from pathlib import Path
import intel_extension_for_pytorch as ipex
import numpy as np
import PIL
import torch
import torch.nn.functional as F
import torch.utils.checkpoint
from accelerate import Accelerator
from accelerate.logging import get_logger
... | diffusers/examples/research_projects/intel_opts/textual_inversion/textual_inversion_bf16.py/0 | {
"file_path": "diffusers/examples/research_projects/intel_opts/textual_inversion/textual_inversion_bf16.py",
"repo_id": "diffusers",
"token_count": 10729
} | 143 |
import argparse
import itertools
import json
import logging
import math
import uuid
import warnings
from os import environ, listdir, makedirs
from os.path import basename, join
from pathlib import Path
from typing import List
import datasets
import numpy as np
import torch
import torch.nn.functional as F
import torch.... | diffusers/examples/research_projects/multi_subject_dreambooth/train_multi_subject_dreambooth.py/0 | {
"file_path": "diffusers/examples/research_projects/multi_subject_dreambooth/train_multi_subject_dreambooth.py",
"repo_id": "diffusers",
"token_count": 21772
} | 144 |
#!/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/onnxruntime/textual_inversion/textual_inversion.py/0 | {
"file_path": "diffusers/examples/research_projects/onnxruntime/textual_inversion/textual_inversion.py",
"repo_id": "diffusers",
"token_count": 15852
} | 145 |
from argparse import ArgumentParser
from pathlib import Path
from time import perf_counter
import structlog
import torch
import torch_xla.core.xla_model as xm
import torch_xla.debug.metrics as met
import torch_xla.debug.profiler as xp
import torch_xla.distributed.xla_multiprocessing as xmp
import torch_xla.runtime as ... | diffusers/examples/research_projects/pytorch_xla/inference/flux/flux_inference.py/0 | {
"file_path": "diffusers/examples/research_projects/pytorch_xla/inference/flux/flux_inference.py",
"repo_id": "diffusers",
"token_count": 2279
} | 146 |
# Stable Diffusion XL text-to-image fine-tuning
The `train_text_to_image_sdxl.py` script shows how to fine-tune Stable Diffusion XL (SDXL) on your own dataset.
🚨 This script is experimental. The script fine-tunes the whole model and often times the model overfits and runs into issues like catastrophic forgetting. It... | diffusers/examples/text_to_image/README_sdxl.md/0 | {
"file_path": "diffusers/examples/text_to_image/README_sdxl.md",
"repo_id": "diffusers",
"token_count": 4083
} | 147 |
import argparse
import torch
import yaml
from diffusers import DDIMScheduler, LDMPipeline, UNetLDMModel, VQModel
def convert_ldm_original(checkpoint_path, config_path, output_path):
config = yaml.safe_load(config_path)
state_dict = torch.load(checkpoint_path, map_location="cpu")["model"]
keys = list(sta... | diffusers/scripts/conversion_ldm_uncond.py/0 | {
"file_path": "diffusers/scripts/conversion_ldm_uncond.py",
"repo_id": "diffusers",
"token_count": 793
} | 148 |
import argparse
from typing import Any, Dict
import torch
from huggingface_hub import hf_hub_download
from safetensors.torch import load_file
from diffusers import AutoencoderDC
def remap_qkv_(key: str, state_dict: Dict[str, Any]):
qkv = state_dict.pop(key)
q, k, v = torch.chunk(qkv, 3, dim=0)
parent_mo... | diffusers/scripts/convert_dcae_to_diffusers.py/0 | {
"file_path": "diffusers/scripts/convert_dcae_to_diffusers.py",
"repo_id": "diffusers",
"token_count": 6118
} | 149 |
#!/usr/bin/env python3
import argparse
import fnmatch
from safetensors.torch import load_file
from diffusers import Kandinsky3UNet
MAPPING = {
"to_time_embed.1": "time_embedding.linear_1",
"to_time_embed.3": "time_embedding.linear_2",
"in_layer": "conv_in",
"out_layer.0": "conv_norm_out",
"out_l... | diffusers/scripts/convert_kandinsky3_unet.py/0 | {
"file_path": "diffusers/scripts/convert_kandinsky3_unet.py",
"repo_id": "diffusers",
"token_count": 1403
} | 150 |
# 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_original_stable_diffusion_to_diffusers.py/0 | {
"file_path": "diffusers/scripts/convert_original_stable_diffusion_to_diffusers.py",
"repo_id": "diffusers",
"token_count": 2889
} | 151 |
from diffusers.utils import is_accelerate_available, logging
if is_accelerate_available():
pass
logger = logging.get_logger(__name__) # pylint: disable=invalid-name
def create_unet_diffusers_config(original_config, image_size: int, controlnet=False):
"""
Creates a config for the diffusers based on the... | diffusers/scripts/convert_svd_to_diffusers.py/0 | {
"file_path": "diffusers/scripts/convert_svd_to_diffusers.py",
"repo_id": "diffusers",
"token_count": 14783
} | 152 |
# 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/hooks/pyramid_attention_broadcast.py/0 | {
"file_path": "diffusers/src/diffusers/hooks/pyramid_attention_broadcast.py",
"repo_id": "diffusers",
"token_count": 5674
} | 153 |
# 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/unet.py/0 | {
"file_path": "diffusers/src/diffusers/loaders/unet.py",
"repo_id": "diffusers",
"token_count": 23269
} | 154 |
# Copyright 2025 The RhymesAI and The HuggingFace Team.
# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless re... | diffusers/src/diffusers/models/autoencoders/autoencoder_kl_allegro.py/0 | {
"file_path": "diffusers/src/diffusers/models/autoencoders/autoencoder_kl_allegro.py",
"repo_id": "diffusers",
"token_count": 22722
} | 155 |
# Copyright 2025 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | diffusers/src/diffusers/models/controlnet.py/0 | {
"file_path": "diffusers/src/diffusers/models/controlnet.py",
"repo_id": "diffusers",
"token_count": 2364
} | 156 |
# Copyright 2025 The CogVideoX team, Tsinghua University & ZhipuAI and The HuggingFace Team.
# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.o... | diffusers/src/diffusers/models/transformers/cogvideox_transformer_3d.py/0 | {
"file_path": "diffusers/src/diffusers/models/transformers/cogvideox_transformer_3d.py",
"repo_id": "diffusers",
"token_count": 10014
} | 157 |
# Copyright 2025 The CogView team, Tsinghua University & ZhipuAI and The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/l... | diffusers/src/diffusers/models/transformers/transformer_cogview3plus.py/0 | {
"file_path": "diffusers/src/diffusers/models/transformers/transformer_cogview3plus.py",
"repo_id": "diffusers",
"token_count": 6870
} | 158 |
# 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/src/diffusers/models/transformers/transformer_wan.py/0 | {
"file_path": "diffusers/src/diffusers/models/transformers/transformer_wan.py",
"repo_id": "diffusers",
"token_count": 13674
} | 159 |
# Copyright 2025 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | diffusers/src/diffusers/models/unets/unet_stable_cascade.py/0 | {
"file_path": "diffusers/src/diffusers/models/unets/unet_stable_cascade.py",
"repo_id": "diffusers",
"token_count": 13986
} | 160 |
import json
import logging
import os
from pathlib import Path
from typing import List, Optional, Tuple, Union
import numpy as np
import PIL
import torch
from ..configuration_utils import ConfigMixin
from ..image_processor import PipelineImageInput
from .modular_pipeline import ModularPipelineBlocks, SequentialPipelin... | diffusers/src/diffusers/modular_pipelines/node_utils.py/0 | {
"file_path": "diffusers/src/diffusers/modular_pipelines/node_utils.py",
"repo_id": "diffusers",
"token_count": 11632
} | 161 |
from dataclasses import dataclass
from typing import List, Union
import numpy as np
import PIL.Image
import torch
from ...utils import BaseOutput
@dataclass
class AnimateDiffPipelineOutput(BaseOutput):
r"""
Output class for AnimateDiff pipelines.
Args:
frames (`torch.Tensor`, `np.ndarray`, or... | diffusers/src/diffusers/pipelines/animatediff/pipeline_output.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/animatediff/pipeline_output.py",
"repo_id": "diffusers",
"token_count": 264
} | 162 |
from dataclasses import dataclass
from typing import List, Union
import numpy as np
import PIL.Image
from ...utils import BaseOutput
@dataclass
class BriaPipelineOutput(BaseOutput):
"""
Output class for Bria pipelines.
Args:
images (`List[PIL.Image.Image]` or `np.ndarray`)
List of d... | diffusers/src/diffusers/pipelines/bria/pipeline_output.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/bria/pipeline_output.py",
"repo_id": "diffusers",
"token_count": 213
} | 163 |
from dataclasses import dataclass
from typing import List, Optional, Union
import numpy as np
import PIL.Image
from ...utils import BaseOutput
@dataclass
class IFPipelineOutput(BaseOutput):
r"""
Output class for Stable Diffusion pipelines.
Args:
images (`List[PIL.Image.Image]` or `np.ndarray`):... | diffusers/src/diffusers/pipelines/deepfloyd_if/pipeline_output.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/deepfloyd_if/pipeline_output.py",
"repo_id": "diffusers",
"token_count": 410
} | 164 |
from typing import TYPE_CHECKING
from ....utils import DIFFUSERS_SLOW_IMPORT, _LazyModule
_import_structure = {"pipeline_pndm": ["PNDMPipeline"]}
if TYPE_CHECKING or DIFFUSERS_SLOW_IMPORT:
from .pipeline_pndm import PNDMPipeline
else:
import sys
sys.modules[__name__] = _LazyModule(
__name__,
... | diffusers/src/diffusers/pipelines/deprecated/pndm/__init__.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/deprecated/pndm/__init__.py",
"repo_id": "diffusers",
"token_count": 182
} | 165 |
# Copyright 2025 ZenAI. All rights reserved.
# author: @vuongminh1907
import inspect
from typing import Any, Callable, Dict, List, Optional, Union
import numpy as np
import PIL.Image
import torch
from transformers import (
CLIPImageProcessor,
CLIPTextModel,
CLIPTokenizer,
CLIPVisionModelWithProjection... | diffusers/src/diffusers/pipelines/flux/pipeline_flux_kontext_inpaint.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/flux/pipeline_flux_kontext_inpaint.py",
"repo_id": "diffusers",
"token_count": 32148
} | 166 |
from typing import Callable, Dict, List, Optional, Union
import PIL.Image
import torch
from transformers import CLIPImageProcessor, CLIPTextModelWithProjection, CLIPTokenizer, CLIPVisionModelWithProjection
from ...models import PriorTransformer
from ...schedulers import UnCLIPScheduler
from ...utils import (
is_t... | diffusers/src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_prior.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_prior.py",
"repo_id": "diffusers",
"token_count": 11548
} | 167 |
# Copyright 2025 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | diffusers/src/diffusers/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
} | 168 |
# 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/onnx_utils.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/onnx_utils.py",
"repo_id": "diffusers",
"token_count": 3886
} | 169 |
# Copyright 2025 Open AI and The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required ... | diffusers/src/diffusers/pipelines/shap_e/camera.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/shap_e/camera.py",
"repo_id": "diffusers",
"token_count": 2274
} | 170 |
# 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/stable_cascade/pipeline_stable_cascade_combined.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/stable_cascade/pipeline_stable_cascade_combined.py",
"repo_id": "diffusers",
"token_count": 7479
} | 171 |
# 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/stable_diffusion/pipeline_stable_diffusion_image_variation.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_image_variation.py",
"repo_id": "diffusers",
"token_count": 9439
} | 172 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.