text
stringlengths
7
1.24M
id
stringlengths
14
166
metadata
dict
__index_level_0__
int64
0
519
use candle::{DType, IndexOp, Result, Tensor}; use candle_nn::{Module, VarBuilder}; use super::image_encoder::ImageEncoderViT; use super::mask_decoder::MaskDecoder; use super::prompt_encoder::PromptEncoder; use super::tiny_vit::{tiny_vit_5m, TinyViT}; const PROMPT_EMBED_DIM: usize = 256; pub const IMAGE_SIZE: usize = ...
candle/candle-transformers/src/models/segment_anything/sam.rs/0
{ "file_path": "candle/candle-transformers/src/models/segment_anything/sam.rs", "repo_id": "candle", "token_count": 8444 }
43
use crate::models::with_tracing::{linear, linear_no_bias, Linear}; use candle::{DType, Device, Module, Result, Tensor, D}; use candle_nn::{Activation, LayerNorm, VarBuilder}; use serde::Deserialize; use std::sync::Arc; // https://huggingface.co/stabilityai/stablelm-3b-4e1t/blob/main/configuration_stablelm.py #[derive(...
candle/candle-transformers/src/models/stable_lm.rs/0
{ "file_path": "candle/candle-transformers/src/models/stable_lm.rs", "repo_id": "candle", "token_count": 7540 }
44
use super::common::LayerNormNoWeights; use candle::{Module, Result, Tensor}; use candle_nn::VarBuilder; #[derive(Debug)] pub struct MixingResidualBlock { norm1: LayerNormNoWeights, depthwise_conv: candle_nn::Conv2d, norm2: LayerNormNoWeights, channelwise_lin1: candle_nn::Linear, channelwise_lin2: c...
candle/candle-transformers/src/models/wuerstchen/paella_vq.rs/0
{ "file_path": "candle/candle-transformers/src/models/wuerstchen/paella_vq.rs", "repo_id": "candle", "token_count": 4078 }
45
use candle::{DType, Device, Tensor}; use candle_nn::VarBuilder; use candle_transformers::models::bert::{BertModel, Config}; use candle_wasm_example_bert::console_log; use tokenizers::{PaddingParams, Tokenizer}; use wasm_bindgen::prelude::*; #[wasm_bindgen] pub struct Model { bert: BertModel, tokenizer: Tokeniz...
candle/candle-wasm-examples/bert/src/bin/m.rs/0
{ "file_path": "candle/candle-wasm-examples/bert/src/bin/m.rs", "repo_id": "candle", "token_count": 1752 }
46
import init, { Model } from "./build/m.js"; async function fetchArrayBuffer(url) { const cacheName = "llama2c-candle-cache"; const cache = await caches.open(cacheName); const cachedResponse = await cache.match(url); if (cachedResponse) { const data = await cachedResponse.arrayBuffer(); return new Uint8...
candle/candle-wasm-examples/llama2-c/llama2cWorker.js/0
{ "file_path": "candle/candle-wasm-examples/llama2-c/llama2cWorker.js", "repo_id": "candle", "token_count": 1223 }
47
//load Candle Bert Module wasm module let init, ModelConditionalGeneration; async function fetchArrayBuffer(url) { const cacheName = "t5-candle-cache"; const cache = await caches.open(cacheName); const cachedResponse = await cache.match(url); if (cachedResponse) { const data = await cachedResponse.arrayBuf...
candle/candle-wasm-examples/t5/T5ModelConditionalGeneration.js/0
{ "file_path": "candle/candle-wasm-examples/t5/T5ModelConditionalGeneration.js", "repo_id": "candle", "token_count": 980 }
48
fn main() { wasm_logger::init(wasm_logger::Config::new(log::Level::Trace)); yew::Renderer::<candle_wasm_example_whisper::App>::new().render(); }
candle/candle-wasm-examples/whisper/src/bin/app.rs/0
{ "file_path": "candle/candle-wasm-examples/whisper/src/bin/app.rs", "repo_id": "candle", "token_count": 67 }
49
- local: index title: 🤗 Chat UI - title: Installation sections: - local: installation/local title: Local - local: installation/spaces title: Spaces - local: installation/docker title: Docker - local: installation/helm title: Helm - title: Configuration sections: - loca...
chat-ui/docs/source/_toctree.yml/0
{ "file_path": "chat-ui/docs/source/_toctree.yml", "repo_id": "chat-ui", "token_count": 879 }
50
# Tools Tool calling instructs the model to generate an output matching a user-defined schema, which may be parsed for invoking external tools. The model simply chooses the tools and their parameters. Currently, only `TGI` and `Cohere` with `Command R+` are supported. <div class="flex justify-center"> <img class="blo...
chat-ui/docs/source/configuration/models/tools.md/0
{ "file_path": "chat-ui/docs/source/configuration/models/tools.md", "repo_id": "chat-ui", "token_count": 948 }
51
import readline from "readline"; import minimist from "minimist"; // @ts-expect-error: vite-node makes the var available but the typescript compiler doesn't see them import { env } from "$env/dynamic/private"; import { faker } from "@faker-js/faker"; import { ObjectId } from "mongodb"; // @ts-expect-error: vite-node...
chat-ui/scripts/populate.ts/0
{ "file_path": "chat-ui/scripts/populate.ts", "repo_id": "chat-ui", "token_count": 4379 }
52
<script lang="ts"> import { base } from "$app/paths"; import { page } from "$app/stores"; import { env as envPublic } from "$env/dynamic/public"; import LogoHuggingFaceBorderless from "$lib/components/icons/LogoHuggingFaceBorderless.svelte"; import Modal from "$lib/components/Modal.svelte"; import { useSettingsSt...
chat-ui/src/lib/components/DisclaimerModal.svelte/0
{ "file_path": "chat-ui/src/lib/components/DisclaimerModal.svelte", "repo_id": "chat-ui", "token_count": 1074 }
53
<script lang="ts"> export let checked: boolean; export let name: string; </script> <input bind:checked type="checkbox" {name} class="peer pointer-events-none absolute opacity-0" /> <div aria-checked={checked} aria-roledescription="switch" aria-label="switch" role="switch" tabindex="0" class="relative inline-fl...
chat-ui/src/lib/components/Switch.svelte/0
{ "file_path": "chat-ui/src/lib/components/Switch.svelte", "repo_id": "chat-ui", "token_count": 239 }
54
<script lang="ts"> import { MessageToolUpdateType, type MessageToolUpdate } from "$lib/types/MessageUpdate"; import { isMessageToolCallUpdate, isMessageToolErrorUpdate, isMessageToolResultUpdate, } from "$lib/utils/messageUpdates"; import CarbonTools from "~icons/carbon/tools"; import { ToolResultStatus, ty...
chat-ui/src/lib/components/chat/ToolUpdate.svelte/0
{ "file_path": "chat-ui/src/lib/components/chat/ToolUpdate.svelte", "repo_id": "chat-ui", "token_count": 2271 }
55
import { afterEach, assert, describe, expect, it } from "vitest"; import { migrations } from "./routines"; import { acquireLock, isDBLocked, refreshLock, releaseLock } from "./lock"; import { collections } from "$lib/server/database"; const LOCK_KEY = "migrations.test"; describe("migrations", () => { it("should not ...
chat-ui/src/lib/migrations/migrations.spec.ts/0
{ "file_path": "chat-ui/src/lib/migrations/migrations.spec.ts", "repo_id": "chat-ui", "token_count": 665 }
56
import { z } from "zod"; import type { EmbeddingEndpoint, Embedding } from "../embeddingEndpoints"; import { chunk } from "$lib/utils/chunk"; import { env } from "$env/dynamic/private"; import { logger } from "$lib/server/logger"; export const embeddingEndpointTeiParametersSchema = z.object({ weight: z.number().int()...
chat-ui/src/lib/server/embeddingEndpoints/tei/embeddingEndpoints.ts/0
{ "file_path": "chat-ui/src/lib/server/embeddingEndpoints/tei/embeddingEndpoints.ts", "repo_id": "chat-ui", "token_count": 838 }
57
import { buildPrompt } from "$lib/buildPrompt"; import type { TextGenerationStreamOutput } from "@huggingface/inference"; import type { Endpoint } from "../endpoints"; import { z } from "zod"; export const endpointOllamaParametersSchema = z.object({ weight: z.number().int().positive().default(1), model: z.any(), ty...
chat-ui/src/lib/server/endpoints/ollama/endpointOllama.ts/0
{ "file_path": "chat-ui/src/lib/server/endpoints/ollama/endpointOllama.ts", "repo_id": "chat-ui", "token_count": 1380 }
58
import { isURLLocal } from "../isURLLocal"; import { env } from "$env/dynamic/private"; import { collections } from "$lib/server/database"; import type { Assistant } from "$lib/types/Assistant"; import type { ObjectId } from "mongodb"; export async function processPreprompt(preprompt: string) { const urlRegex = /{{\s...
chat-ui/src/lib/server/textGeneration/assistant.ts/0
{ "file_path": "chat-ui/src/lib/server/textGeneration/assistant.ts", "repo_id": "chat-ui", "token_count": 621 }
59
import type { MarkdownElement } from "../markdown/types"; export function flattenTree(elem: MarkdownElement): MarkdownElement[] { if ("children" in elem) return [elem, ...elem.children.flatMap(flattenTree)]; return [elem]; }
chat-ui/src/lib/server/websearch/embed/tree.ts/0
{ "file_path": "chat-ui/src/lib/server/websearch/embed/tree.ts", "repo_id": "chat-ui", "token_count": 74 }
60
import { env } from "$env/dynamic/private"; import { getJson, type GoogleParameters } from "serpapi"; import type { WebSearchSource } from "$lib/types/WebSearch"; import { isURL } from "$lib/utils/isUrl"; type SerpApiResponse = { organic_results: { link: string; }[]; }; export default async function searchWebSerp...
chat-ui/src/lib/server/websearch/search/endpoints/serpApi.ts/0
{ "file_path": "chat-ui/src/lib/server/websearch/search/endpoints/serpApi.ts", "repo_id": "chat-ui", "token_count": 236 }
61
export function switchTheme() { const { classList } = document.querySelector("html") as HTMLElement; const metaTheme = document.querySelector('meta[name="theme-color"]') as HTMLMetaElement; if (classList.contains("dark")) { classList.remove("dark"); metaTheme.setAttribute("content", "rgb(249, 250, 251)"); loc...
chat-ui/src/lib/switchTheme.ts/0
{ "file_path": "chat-ui/src/lib/switchTheme.ts", "repo_id": "chat-ui", "token_count": 164 }
62
import type { Conversation } from "./Conversation"; export type SharedConversation = Pick< Conversation, | "model" | "embeddingModel" | "title" | "rootMessageId" | "messages" | "preprompt" | "assistantId" | "createdAt" | "updatedAt" > & { _id: string; hash: string; };
chat-ui/src/lib/types/SharedConversation.ts/0
{ "file_path": "chat-ui/src/lib/types/SharedConversation.ts", "repo_id": "chat-ui", "token_count": 114 }
63
import { base } from "$app/paths"; import { env as envPublic } from "$env/dynamic/public"; export function getShareUrl(url: URL, shareId: string): string { return `${ envPublic.PUBLIC_SHARE_PREFIX || `${envPublic.PUBLIC_ORIGIN || url.origin}${base}` }/r/${shareId}`; }
chat-ui/src/lib/utils/getShareUrl.ts/0
{ "file_path": "chat-ui/src/lib/utils/getShareUrl.ts", "repo_id": "chat-ui", "token_count": 102 }
64
import type { Message } from "$lib/types/Message"; import Handlebars from "handlebars"; Handlebars.registerHelper("ifUser", function (this: Pick<Message, "from" | "content">, options) { if (this.from == "user") return options.fn(this); }); Handlebars.registerHelper( "ifAssistant", function (this: Pick<Message, "fr...
chat-ui/src/lib/utils/template.ts/0
{ "file_path": "chat-ui/src/lib/utils/template.ts", "repo_id": "chat-ui", "token_count": 266 }
65
<script lang="ts"> import "../styles/main.css"; import { onDestroy, onMount } from "svelte"; import { goto, invalidate } from "$app/navigation"; import { base } from "$app/paths"; import { page } from "$app/stores"; import { env as envPublic } from "$env/dynamic/public"; import { error } from "$lib/stores/err...
chat-ui/src/routes/+layout.svelte/0
{ "file_path": "chat-ui/src/routes/+layout.svelte", "repo_id": "chat-ui", "token_count": 3051 }
66
import ChatThumbnail from "./ChatThumbnail.svelte"; import { collections } from "$lib/server/database"; import { error, type RequestHandler } from "@sveltejs/kit"; import { ObjectId } from "mongodb"; import type { SvelteComponent } from "svelte"; import { Resvg } from "@resvg/resvg-js"; import satori from "satori"; im...
chat-ui/src/routes/assistant/[assistantId]/thumbnail.png/+server.ts/0
{ "file_path": "chat-ui/src/routes/assistant/[assistantId]/thumbnail.png/+server.ts", "repo_id": "chat-ui", "token_count": 832 }
67
import { redirect, error } from "@sveltejs/kit"; import { getOIDCUserData, validateAndParseCsrfToken } from "$lib/server/auth"; import { z } from "zod"; import { base } from "$app/paths"; import { updateUser } from "./updateUser"; import { env } from "$env/dynamic/private"; import JSON5 from "json5"; const allowedUser...
chat-ui/src/routes/login/callback/+page.server.ts/0
{ "file_path": "chat-ui/src/routes/login/callback/+page.server.ts", "repo_id": "chat-ui", "token_count": 690 }
68
import { collections } from "$lib/server/database"; import { type Actions, fail, redirect } from "@sveltejs/kit"; import { ObjectId } from "mongodb"; import { authCondition } from "$lib/server/auth"; import { base } from "$app/paths"; import { env as envPublic } from "$env/dynamic/public"; import { env } from "$env/dyn...
chat-ui/src/routes/settings/(nav)/assistants/[assistantId]/+page.server.ts/0
{ "file_path": "chat-ui/src/routes/settings/(nav)/assistants/[assistantId]/+page.server.ts", "repo_id": "chat-ui", "token_count": 2355 }
69
<script lang="ts"> export let type: string; export let value: string | boolean | number; export let disabled: boolean = false; let innerValue: string | boolean | number = (() => { if (type === "bool") { return Boolean(value) || false; } else if (type === "int" || type === "float") { return Number(value) ...
chat-ui/src/routes/tools/ToolInputComponent.svelte/0
{ "file_path": "chat-ui/src/routes/tools/ToolInputComponent.svelte", "repo_id": "chat-ui", "token_count": 1112 }
70
import { sveltekit } from "@sveltejs/kit/vite"; import Icons from "unplugin-icons/vite"; import { promises } from "fs"; import { defineConfig } from "vitest/config"; // used to load fonts server side for thumbnail generation function loadTTFAsArrayBuffer() { return { name: "load-ttf-as-array-buffer", async transf...
chat-ui/vite.config.ts/0
{ "file_path": "chat-ui/vite.config.ts", "repo_id": "chat-ui", "token_count": 385 }
71
repos: - repo: https://github.com/charliermarsh/ruff-pre-commit # https://github.com/charliermarsh/ruff#usage rev: 'v0.3.0' hooks: # Run the linter. - id: ruff args: [ --fix ] # Run the formatter. - id: ruff-format
datasets/.pre-commit-config.yaml/0
{ "file_path": "datasets/.pre-commit-config.yaml", "repo_id": "datasets", "token_count": 122 }
72
import json import os import tempfile import transformers import datasets from utils import generate_example_dataset, get_duration SPEED_TEST_N_EXAMPLES = 500_000 RESULTS_BASEPATH, RESULTS_FILENAME = os.path.split(__file__) RESULTS_FILE_PATH = os.path.join(RESULTS_BASEPATH, "results", RESULTS_FILENAME.replace(".py...
datasets/benchmarks/benchmark_map_filter.py/0
{ "file_path": "datasets/benchmarks/benchmark_map_filter.py", "repo_id": "datasets", "token_count": 996 }
73
# Build and load Nearly every deep learning workflow begins with loading a dataset, which makes it one of the most important steps. With 🤗 Datasets, there are more than 900 datasets available to help you get started with your NLP task. All you have to do is call: [`load_dataset`] to take your first step. This functio...
datasets/docs/source/about_dataset_load.mdx/0
{ "file_path": "datasets/docs/source/about_dataset_load.mdx", "repo_id": "datasets", "token_count": 2537 }
74
# Image classification Image classification datasets are used to train a model to classify an entire image. There are a wide variety of applications enabled by these datasets such as identifying endangered wildlife species or screening for disease in medical images. This guide will show you how to apply transformation...
datasets/docs/source/image_classification.mdx/0
{ "file_path": "datasets/docs/source/image_classification.mdx", "repo_id": "datasets", "token_count": 1043 }
75
# Table Classes Each `Dataset` object is backed by a PyArrow Table. A Table can be loaded from either the disk (memory mapped) or in memory. Several Table types are available, and they all inherit from [`table.Table`]. ## Table [[autodoc]] datasets.table.Table - validate - equals - to_batches - to_py...
datasets/docs/source/package_reference/table_classes.mdx/0
{ "file_path": "datasets/docs/source/package_reference/table_classes.mdx", "repo_id": "datasets", "token_count": 1029 }
76
# Using Datasets with TensorFlow This document is a quick introduction to using `datasets` with TensorFlow, with a particular focus on how to get `tf.Tensor` objects out of our datasets, and how to stream data from Hugging Face `Dataset` objects to Keras methods like `model.fit()`. ## Dataset format By default, data...
datasets/docs/source/use_with_tensorflow.mdx/0
{ "file_path": "datasets/docs/source/use_with_tensorflow.mdx", "repo_id": "datasets", "token_count": 3825 }
77
import platform from argparse import ArgumentParser import fsspec import huggingface_hub import pandas import pyarrow from datasets import __version__ as version from datasets.commands import BaseDatasetsCLICommand def info_command_factory(_): return EnvironmentCommand() class EnvironmentCommand(BaseDatasetsC...
datasets/src/datasets/commands/env.py/0
{ "file_path": "datasets/src/datasets/commands/env.py", "repo_id": "datasets", "token_count": 476 }
78
import importlib import shutil import warnings from typing import List import fsspec import fsspec.asyn from fsspec.implementations.local import LocalFileSystem from . import compression COMPRESSION_FILESYSTEMS: List[compression.BaseCompressedFileFileSystem] = [ compression.Bz2FileSystem, compression.GzipFi...
datasets/src/datasets/filesystems/__init__.py/0
{ "file_path": "datasets/src/datasets/filesystems/__init__.py", "repo_id": "datasets", "token_count": 564 }
79
from typing import Callable, Optional from .. import Features, NamedSplit, Split from ..packaged_modules.generator.generator import Generator from .abc import AbstractDatasetInputStream class GeneratorDatasetInputStream(AbstractDatasetInputStream): def __init__( self, generator: Callable, ...
datasets/src/datasets/io/generator.py/0
{ "file_path": "datasets/src/datasets/io/generator.py", "repo_id": "datasets", "token_count": 920 }
80
import glob import json import os import shutil import time from pathlib import Path from typing import List, Optional, Tuple, Union import pyarrow as pa import datasets import datasets.config import datasets.data_files from datasets.naming import camelcase_to_snakecase, filenames_for_dataset_split logger = dataset...
datasets/src/datasets/packaged_modules/cache/cache.py/0
{ "file_path": "datasets/src/datasets/packaged_modules/cache/cache.py", "repo_id": "datasets", "token_count": 3788 }
81
import os import posixpath import uuid from dataclasses import dataclass from itertools import islice from typing import TYPE_CHECKING, Iterable, List, Optional, Tuple, Union import numpy as np import pyarrow as pa import datasets from datasets.arrow_writer import ArrowWriter, ParquetWriter from datasets.config impor...
datasets/src/datasets/packaged_modules/spark/spark.py/0
{ "file_path": "datasets/src/datasets/packaged_modules/spark/spark.py", "repo_id": "datasets", "token_count": 6923 }
82
# Copyright 2023 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
datasets/src/datasets/utils/_dill.py/0
{ "file_path": "datasets/src/datasets/utils/_dill.py", "repo_id": "datasets", "token_count": 8494 }
83
{ "code": "Programming language (C++, Java, Javascript, Python, etc.)", "aa": "Afar", "aaa": "Ghotuo", "aab": "Alumu-Tesu", "aac": "Ari", "aad": "Amal", "aae": "Arbëreshë Albanian", "aaf": "Aranadan", "aag": "Ambrak", "aah": "Abu' Arapesh", "aai": "Arifama-Miniafia", "aak...
datasets/src/datasets/utils/resources/languages.json/0
{ "file_path": "datasets/src/datasets/utils/resources/languages.json", "repo_id": "datasets", "token_count": 111198 }
84
# 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 }
85
import datetime from typing import List, Tuple from unittest import TestCase from unittest.mock import MagicMock, patch import numpy as np import pandas as pd import pyarrow as pa import pytest from datasets import Array2D from datasets.arrow_dataset import Dataset from datasets.features import Audio, ClassLabel, Fea...
datasets/tests/features/test_features.py/0
{ "file_path": "datasets/tests/features/test_features.py", "repo_id": "datasets", "token_count": 18204 }
86
import pyarrow as pa import pytest from datasets.builder import InvalidConfigName from datasets.data_files import DataFilesList from datasets.packaged_modules.arrow.arrow import Arrow, ArrowConfig @pytest.fixture def arrow_file_streaming_format(tmp_path): filename = tmp_path / "stream.arrow" testdata = [[1, ...
datasets/tests/packaged_modules/test_arrow.py/0
{ "file_path": "datasets/tests/packaged_modules/test_arrow.py", "repo_id": "datasets", "token_count": 873 }
87
import importlib import os import tempfile import types from contextlib import nullcontext as does_not_raise from multiprocessing import Process from pathlib import Path from unittest import TestCase from unittest.mock import patch import numpy as np import pyarrow as pa import pyarrow.parquet as pq import pytest from...
datasets/tests/test_builder.py/0
{ "file_path": "datasets/tests/test_builder.py", "repo_id": "datasets", "token_count": 25355 }
88
import pytest import datasets.config from datasets.utils.info_utils import is_small_dataset @pytest.mark.parametrize("dataset_size", [None, 400 * 2**20, 600 * 2**20]) @pytest.mark.parametrize("input_in_memory_max_size", ["default", 0, 100 * 2**20, 900 * 2**20]) def test_is_small_dataset(dataset_size, input_in_memory...
datasets/tests/test_info_utils.py/0
{ "file_path": "datasets/tests/test_info_utils.py", "repo_id": "datasets", "token_count": 366 }
89
import pytest from datasets.utils.version import Version @pytest.mark.parametrize( "other, expected_equality", [ (Version("1.0.0"), True), ("1.0.0", True), (Version("2.0.0"), False), ("2.0.0", False), ("1", False), ("a", False), (1, False), (Non...
datasets/tests/test_version.py/0
{ "file_path": "datasets/tests/test_version.py", "repo_id": "datasets", "token_count": 254 }
90
<jupyter_start><jupyter_text>Unit 6: Advantage Actor Critic (A2C) using Robotics Simulations with Panda-Gym 🤖In this notebook, you'll learn to use A2C with [Panda-Gym](https://github.com/qgallouedec/panda-gym). You're going **to train a robotic arm** (Franka Emika Panda robot) to perform a task:- `Reach`: the robot mu...
deep-rl-class/notebooks/unit6/unit6.ipynb/0
{ "file_path": "deep-rl-class/notebooks/unit6/unit6.ipynb", "repo_id": "deep-rl-class", "token_count": 4388 }
91
# Introduction to Deep Reinforcement Learning [[introduction-to-deep-reinforcement-learning]] <img src="https://huggingface.co/datasets/huggingface-deep-rl-course/course-images/resolve/main/en/unit1/thumbnail.jpg" alt="Unit 1 thumbnail" width="100%"> Welcome to the most fascinating topic in Artificial Intelligence: ...
deep-rl-class/units/en/unit1/introduction.mdx/0
{ "file_path": "deep-rl-class/units/en/unit1/introduction.mdx", "repo_id": "deep-rl-class", "token_count": 477 }
92
# A Q-Learning example [[q-learning-example]] To better understand Q-Learning, let's take a simple example: <img src="https://huggingface.co/datasets/huggingface-deep-rl-course/course-images/resolve/main/en/unit3/Maze-Example-2.jpg" alt="Maze-Example"/> - You're a mouse in this tiny maze. You always **start at the s...
deep-rl-class/units/en/unit2/q-learning-example.mdx/0
{ "file_path": "deep-rl-class/units/en/unit2/q-learning-example.mdx", "repo_id": "deep-rl-class", "token_count": 1402 }
93
# The advantages and disadvantages of policy-gradient methods At this point, you might ask, "but Deep Q-Learning is excellent! Why use policy-gradient methods?". To answer this question, let's study the **advantages and disadvantages of policy-gradient methods**. ## Advantages There are multiple advantages over valu...
deep-rl-class/units/en/unit4/advantages-disadvantages.mdx/0
{ "file_path": "deep-rl-class/units/en/unit4/advantages-disadvantages.mdx", "repo_id": "deep-rl-class", "token_count": 1184 }
94
# Quiz The best way to learn and [to avoid the illusion of competence](https://www.coursera.org/lecture/learning-how-to-learn/illusions-of-competence-BuFzf) **is to test yourself.** This will help you to find **where you need to reinforce your knowledge**. ### Q1: Which of the following tools are specifically designe...
deep-rl-class/units/en/unit5/quiz.mdx/0
{ "file_path": "deep-rl-class/units/en/unit5/quiz.mdx", "repo_id": "deep-rl-class", "token_count": 1539 }
95
# Self-Play: a classic technique to train competitive agents in adversarial games Now that we've studied the basics of multi-agents, we're ready to go deeper. As mentioned in the introduction, we're going **to train agents in an adversarial game with SoccerTwos, a 2vs2 game**. <figure> <img src="https://huggingface.c...
deep-rl-class/units/en/unit7/self-play.mdx/0
{ "file_path": "deep-rl-class/units/en/unit7/self-play.mdx", "repo_id": "deep-rl-class", "token_count": 2245 }
96
# Hands-on [[hands-on]] Now that you've learned to use Optuna, here are some ideas to apply what you've learned: 1️⃣ **Beat your LunarLander-v2 agent results**, by using Optuna to find a better set of hyperparameters. You can also try with another environment, such as MountainCar-v0 and CartPole-v1. 2️⃣ **Beat your ...
deep-rl-class/units/en/unitbonus2/hands-on.mdx/0
{ "file_path": "deep-rl-class/units/en/unitbonus2/hands-on.mdx", "repo_id": "deep-rl-class", "token_count": 207 }
97
# Conclusion: **Congratulations on finishing this bonus unit!** You have learned the process of recording expert demonstrations and training the agent using IL, which can be an alternative to training in-game agents with RL in some cases. This tutorial was written by [Ivan Dodic](https://github.com/Ivan-267). Thanks ...
deep-rl-class/units/en/unitbonus5/conclusion.mdx/0
{ "file_path": "deep-rl-class/units/en/unitbonus5/conclusion.mdx", "repo_id": "deep-rl-class", "token_count": 115 }
98
<!--- Copyright 2024- The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or...
diffusers/docs/README.md/0
{ "file_path": "diffusers/docs/README.md", "repo_id": "diffusers", "token_count": 3142 }
99
<!--Copyright 2024 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
diffusers/docs/source/en/api/logging.md/0
{ "file_path": "diffusers/docs/source/en/api/logging.md", "repo_id": "diffusers", "token_count": 1351 }
100
<!--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 to...
diffusers/docs/source/en/api/pipelines/kandinsky_v22.md/0
{ "file_path": "diffusers/docs/source/en/api/pipelines/kandinsky_v22.md", "repo_id": "diffusers", "token_count": 1050 }
101
<!--Copyright 2024 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
diffusers/docs/source/en/api/pipelines/stable_diffusion/sdxl_turbo.md/0
{ "file_path": "diffusers/docs/source/en/api/pipelines/stable_diffusion/sdxl_turbo.md", "repo_id": "diffusers", "token_count": 677 }
102
<!--Copyright 2024 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
diffusers/docs/source/en/api/schedulers/consistency_decoder.md/0
{ "file_path": "diffusers/docs/source/en/api/schedulers/consistency_decoder.md", "repo_id": "diffusers", "token_count": 274 }
103
<!--Copyright 2024 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
diffusers/docs/source/en/api/schedulers/ipndm.md/0
{ "file_path": "diffusers/docs/source/en/api/schedulers/ipndm.md", "repo_id": "diffusers", "token_count": 295 }
104
<!--Copyright 2024 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
diffusers/docs/source/en/optimization/onnx.md/0
{ "file_path": "diffusers/docs/source/en/optimization/onnx.md", "repo_id": "diffusers", "token_count": 1193 }
105
<!--Copyright 2024 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
diffusers/docs/source/en/training/kandinsky.md/0
{ "file_path": "diffusers/docs/source/en/training/kandinsky.md", "repo_id": "diffusers", "token_count": 5050 }
106
<!--Copyright 2024 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
diffusers/docs/source/en/using-diffusers/callback.md/0
{ "file_path": "diffusers/docs/source/en/using-diffusers/callback.md", "repo_id": "diffusers", "token_count": 3961 }
107
<!--Copyright 2024 Marigold authors and The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by app...
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": 9939 }
108
<!--Copyright 2024 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
diffusers/docs/source/en/using-diffusers/textual_inversion_inference.md/0
{ "file_path": "diffusers/docs/source/en/using-diffusers/textual_inversion_inference.md", "repo_id": "diffusers", "token_count": 1716 }
109
<!--Copyright 2024 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
diffusers/docs/source/ko/conceptual/philosophy.md/0
{ "file_path": "diffusers/docs/source/ko/conceptual/philosophy.md", "repo_id": "diffusers", "token_count": 12964 }
110
<!--Copyright 2024 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
diffusers/docs/source/ko/training/controlnet.md/0
{ "file_path": "diffusers/docs/source/ko/training/controlnet.md", "repo_id": "diffusers", "token_count": 7776 }
111
<!--Copyright 2024 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
diffusers/docs/source/ko/using-diffusers/depth2img.md/0
{ "file_path": "diffusers/docs/source/ko/using-diffusers/depth2img.md", "repo_id": "diffusers", "token_count": 1376 }
112
<!--Copyright 2024 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
diffusers/docs/source/ko/using-diffusers/weighted_prompts.md/0
{ "file_path": "diffusers/docs/source/ko/using-diffusers/weighted_prompts.md", "repo_id": "diffusers", "token_count": 3376 }
113
## Amused training Amused can be finetuned on simple datasets relatively cheaply and quickly. Using 8bit optimizers, lora, and gradient accumulation, amused can be finetuned with as little as 5.5 GB. Here are a set of examples for finetuning amused on some relatively simple datasets. These training recipies are aggres...
diffusers/examples/amused/README.md/0
{ "file_path": "diffusers/examples/amused/README.md", "repo_id": "diffusers", "token_count": 5918 }
114
from typing import List, Optional, Tuple, Union import torch from diffusers import DiffusionPipeline from diffusers.configuration_utils import ConfigMixin from diffusers.pipelines.pipeline_utils import ImagePipelineOutput from diffusers.schedulers.scheduling_utils import SchedulerMixin class IADBScheduler(Scheduler...
diffusers/examples/community/iadb.py/0
{ "file_path": "diffusers/examples/community/iadb.py", "repo_id": "diffusers", "token_count": 2500 }
115
from typing import Any, Callable, Dict, List, Optional, Union import numpy as np import PIL.Image import torch from diffusers import StableDiffusionImg2ImgPipeline from diffusers.pipelines.stable_diffusion import StableDiffusionPipelineOutput class MaskedStableDiffusionImg2ImgPipeline(StableDiffusionImg2ImgPipeline...
diffusers/examples/community/masked_stable_diffusion_img2img.py/0
{ "file_path": "diffusers/examples/community/masked_stable_diffusion_img2img.py", "repo_id": "diffusers", "token_count": 6298 }
116
from typing import Callable, List, Optional, Union import PIL.Image import torch from transformers import ( CLIPImageProcessor, CLIPSegForImageSegmentation, CLIPSegProcessor, CLIPTextModel, CLIPTokenizer, ) from diffusers import DiffusionPipeline from diffusers.configuration_utils import FrozenDic...
diffusers/examples/community/text_inpainting.py/0
{ "file_path": "diffusers/examples/community/text_inpainting.py", "repo_id": "diffusers", "token_count": 5464 }
117
# ControlNet training example for Stable Diffusion XL (SDXL) The `train_controlnet_sdxl.py` script shows how to implement the ControlNet training procedure and adapt it for [Stable Diffusion XL](https://huggingface.co/papers/2307.01952). ## Running locally with PyTorch ### Installing the dependencies Before running...
diffusers/examples/controlnet/README_sdxl.md/0
{ "file_path": "diffusers/examples/controlnet/README_sdxl.md", "repo_id": "diffusers", "token_count": 1698 }
118
# DreamBooth training example for Stable Diffusion XL (SDXL) [DreamBooth](https://arxiv.org/abs/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_sdxl.py` script shows how to implement the training procedure and adapt ...
diffusers/examples/dreambooth/README_sdxl.md/0
{ "file_path": "diffusers/examples/dreambooth/README_sdxl.md", "repo_id": "diffusers", "token_count": 3733 }
119
#!/usr/bin/env python # coding=utf-8 # 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/LI...
diffusers/examples/kandinsky2_2/text_to_image/train_text_to_image_decoder.py/0
{ "file_path": "diffusers/examples/kandinsky2_2/text_to_image/train_text_to_image_decoder.py", "repo_id": "diffusers", "token_count": 16388 }
120
import argparse import os import torch from PIL import Image, ImageFilter from transformers import CLIPTextModel from diffusers import DPMSolverMultistepScheduler, StableDiffusionInpaintPipeline, UNet2DConditionModel parser = argparse.ArgumentParser(description="Inference") parser.add_argument( "--model_path", ...
diffusers/examples/research_projects/realfill/infer.py/0
{ "file_path": "diffusers/examples/research_projects/realfill/infer.py", "repo_id": "diffusers", "token_count": 984 }
121
# 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 }
122
#!/usr/bin/env python # coding=utf-8 # 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/LI...
diffusers/examples/text_to_image/test_text_to_image_lora.py/0
{ "file_path": "diffusers/examples/text_to_image/test_text_to_image_lora.py", "repo_id": "diffusers", "token_count": 6179 }
123
# coding=utf-8 # Copyright 2024 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/change_naming_configs_and_checkpoints.py/0
{ "file_path": "diffusers/scripts/change_naming_configs_and_checkpoints.py", "repo_id": "diffusers", "token_count": 1631 }
124
# coding=utf-8 # Copyright 2024 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_ms_text_to_video_to_diffusers.py/0
{ "file_path": "diffusers/scripts/convert_ms_text_to_video_to_diffusers.py", "repo_id": "diffusers", "token_count": 8415 }
125
# Copyright 2024 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
diffusers/scripts/convert_stable_diffusion_checkpoint_to_onnx.py/0
{ "file_path": "diffusers/scripts/convert_stable_diffusion_checkpoint_to_onnx.py", "repo_id": "diffusers", "token_count": 4384 }
126
from typing import Any, Dict, List from .configuration_utils import ConfigMixin, register_to_config from .utils import CONFIG_NAME class PipelineCallback(ConfigMixin): """ Base class for all the official callbacks used in a pipeline. This class provides a structure for implementing custom callbacks and e...
diffusers/src/diffusers/callbacks.py/0
{ "file_path": "diffusers/src/diffusers/callbacks.py", "repo_id": "diffusers", "token_count": 2521 }
127
# Copyright 2024 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
diffusers/src/diffusers/loaders/lora_conversion_utils.py/0
{ "file_path": "diffusers/src/diffusers/loaders/lora_conversion_utils.py", "repo_id": "diffusers", "token_count": 13067 }
128
# Copyright 2024 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
diffusers/src/diffusers/models/attention_processor.py/0
{ "file_path": "diffusers/src/diffusers/models/attention_processor.py", "repo_id": "diffusers", "token_count": 83791 }
129
# Copyright 2024 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
diffusers/src/diffusers/models/controlnet_sparsectrl.py/0
{ "file_path": "diffusers/src/diffusers/models/controlnet_sparsectrl.py", "repo_id": "diffusers", "token_count": 16729 }
130
# Copyright 2024 AuraFlow Authors, 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 req...
diffusers/src/diffusers/models/transformers/auraflow_transformer_2d.py/0
{ "file_path": "diffusers/src/diffusers/models/transformers/auraflow_transformer_2d.py", "repo_id": "diffusers", "token_count": 9942 }
131
# Copyright 2024 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
diffusers/src/diffusers/models/unets/unet_1d.py/0
{ "file_path": "diffusers/src/diffusers/models/unets/unet_1d.py", "repo_id": "diffusers", "token_count": 4862 }
132
# Copyright 2024 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
diffusers/src/diffusers/models/vae_flax.py/0
{ "file_path": "diffusers/src/diffusers/models/vae_flax.py", "repo_id": "diffusers", "token_count": 14479 }
133
from typing import TYPE_CHECKING from ...utils import ( DIFFUSERS_SLOW_IMPORT, OptionalDependencyNotAvailable, _LazyModule, is_torch_available, is_transformers_available, is_transformers_version, ) _dummy_objects = {} _import_structure = {} try: if not (is_transformers_available() and is...
diffusers/src/diffusers/pipelines/audioldm/__init__.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/audioldm/__init__.py", "repo_id": "diffusers", "token_count": 581 }
134
# Copyright 2024 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
diffusers/src/diffusers/pipelines/consistency_models/pipeline_consistency_models.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/consistency_models/pipeline_consistency_models.py", "repo_id": "diffusers", "token_count": 5187 }
135
from typing import TYPE_CHECKING from ...utils import ( DIFFUSERS_SLOW_IMPORT, OptionalDependencyNotAvailable, _LazyModule, get_objects_from_module, is_flax_available, is_torch_available, is_transformers_available, ) _dummy_objects = {} _import_structure = {} try: if not (is_transfor...
diffusers/src/diffusers/pipelines/controlnet_xs/__init__.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/controlnet_xs/__init__.py", "repo_id": "diffusers", "token_count": 894 }
136
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): """ Args: Output class for Stable Diffusion pipelines. 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": 409 }
137
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 }
138
# Copyright 2024 ParaDiGMS authors and The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
diffusers/src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_stable_diffusion_paradigms.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_stable_diffusion_paradigms.py", "repo_id": "diffusers", "token_count": 17953 }
139
# Copyright 2024 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
diffusers/src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2.py", "repo_id": "diffusers", "token_count": 6259 }
140
# Copyright 2024 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/text_encoder.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/kolors/text_encoder.py", "repo_id": "diffusers", "token_count": 16353 }
141
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 is...
diffusers/src/diffusers/pipelines/marigold/__init__.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/marigold/__init__.py", "repo_id": "diffusers", "token_count": 660 }
142