text stringlengths 7 318k | id stringlengths 14 166 | metadata dict | __index_level_0__ int64 0 439 |
|---|---|---|---|
[package]
name = "candle-nn"
version.workspace = true
edition.workspace = true
description.workspace = true
repository.workspace = true
keywords.workspace = true
categories.workspace = true
license.workspace = true
readme = "README.md"
[dependencies]
accelerate-src = { workspace = true, optional = true }
candle = { wo... | candle/candle-nn/Cargo.toml/0 | {
"file_path": "candle/candle-nn/Cargo.toml",
"repo_id": "candle",
"token_count": 325
} | 26 |
use candle::{CpuStorage, Layout, Result, Shape, Tensor};
use rayon::prelude::*;
/// Applies the softmax function to the input tensor, rescaling the element so that elements on
/// a slice of fixed index on dimension `dim` are between 0 and 1 and sum to 1.
///
/// ```rust
/// use candle::{Tensor, Device, test_utils::to... | candle/candle-nn/src/ops.rs/0 | {
"file_path": "candle/candle-nn/src/ops.rs",
"repo_id": "candle",
"token_count": 5237
} | 27 |
use std::io::Result;
fn main() -> Result<()> {
prost_build::compile_protos(&["src/onnx.proto3"], &["src/"])?;
Ok(())
}
| candle/candle-onnx/build.rs/0 | {
"file_path": "candle/candle-onnx/build.rs",
"repo_id": "candle",
"token_count": 60
} | 28 |
from dataclasses import dataclass
from typing import Optional
from candle.nn import Module, Embedding, LayerNorm, Linear, ModuleList
from candle import Tensor
import candle
import candle.functional as F
from typing import Tuple, Optional
@dataclass
class Config:
vocab_size: int = 30522
hidden_size: int = 768
... | candle/candle-pyo3/py_src/candle/models/bert.py/0 | {
"file_path": "candle/candle-pyo3/py_src/candle/models/bert.py",
"repo_id": "candle",
"token_count": 3528
} | 29 |
#![allow(clippy::redundant_closure_call)]
use pyo3::exceptions::{PyTypeError, PyValueError};
use pyo3::prelude::*;
use pyo3::pyclass::CompareOp;
use pyo3::types::{IntoPyDict, PyDict, PyTuple};
use pyo3::ToPyObject;
use std::collections::hash_map::DefaultHasher;
use std::hash::{Hash, Hasher};
use std::os::raw::c_long;
u... | candle/candle-pyo3/src/lib.rs/0 | {
"file_path": "candle/candle-pyo3/src/lib.rs",
"repo_id": "candle",
"token_count": 29554
} | 30 |
use candle::{DType, Error, Result, Tensor};
use rand::{distributions::Distribution, SeedableRng};
pub struct LogitsProcessor {
rng: rand::rngs::StdRng,
temperature: Option<f64>,
top_p: Option<f64>,
}
impl LogitsProcessor {
pub fn new(seed: u64, temperature: Option<f64>, top_p: Option<f64>) -> Self {
... | candle/candle-transformers/src/generation/mod.rs/0 | {
"file_path": "candle/candle-transformers/src/generation/mod.rs",
"repo_id": "candle",
"token_count": 1507
} | 31 |
// T5 Text Model, quantized version
// https://github.com/huggingface/transformers/blob/main/src/transformers/models/t5/modeling_t5.py
use crate::models::t5::{deserialize_feed_forward_proj_activation, ActivationWithOptionalGating};
use crate::models::with_tracing::QMatMul;
use crate::quantized_nn::Embedding;
pub use c... | candle/candle-transformers/src/models/quantized_t5.rs/0 | {
"file_path": "candle/candle-transformers/src/models/quantized_t5.rs",
"repo_id": "candle",
"token_count": 13996
} | 32 |
pub mod attention;
pub mod clip;
pub mod ddim;
pub mod ddpm;
pub mod embeddings;
pub mod euler_ancestral_discrete;
pub mod resnet;
pub mod schedulers;
pub mod unet_2d;
pub mod unet_2d_blocks;
pub mod utils;
pub mod vae;
use std::sync::Arc;
use candle::{DType, Device, Result};
use candle_nn as nn;
use self::scheduler... | candle/candle-transformers/src/models/stable_diffusion/mod.rs/0 | {
"file_path": "candle/candle-transformers/src/models/stable_diffusion/mod.rs",
"repo_id": "candle",
"token_count": 7668
} | 33 |
use candle::{Module, Result, Tensor};
use candle_nn::VarBuilder;
#[derive(Debug, Clone)]
pub struct Embedding {
inner: candle_nn::Embedding,
span: tracing::Span,
}
impl Embedding {
pub fn new(d1: usize, d2: usize, vb: VarBuilder) -> Result<Self> {
let inner = candle_nn::embedding(d1, d2, vb)?;
... | candle/candle-transformers/src/models/with_tracing.rs/0 | {
"file_path": "candle/candle-transformers/src/models/with_tracing.rs",
"repo_id": "candle",
"token_count": 1863
} | 34 |
[package]
name = "candle-wasm-example-llama2"
version.workspace = true
edition.workspace = true
description.workspace = true
repository.workspace = true
keywords.workspace = true
categories.workspace = true
license.workspace = true
[dependencies]
candle = { workspace = true }
candle-nn = { workspace = true }
candle-tr... | candle/candle-wasm-examples/llama2-c/Cargo.toml/0 | {
"file_path": "candle/candle-wasm-examples/llama2-c/Cargo.toml",
"repo_id": "candle",
"token_count": 434
} | 35 |
<html>
<head>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type" />
<title>Candle Phi 1.5 / Phi 2.0 Rust/WASM</title>
</head>
<body></body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
... | candle/candle-wasm-examples/phi/index.html/0 | {
"file_path": "candle/candle-wasm-examples/phi/index.html",
"repo_id": "candle",
"token_count": 9818
} | 36 |
<html>
<head>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type" />
<title>Candle T5</title>
</head>
<body></body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<style>
@import ur... | candle/candle-wasm-examples/t5/index.html/0 | {
"file_path": "candle/candle-wasm-examples/t5/index.html",
"repo_id": "candle",
"token_count": 4724
} | 37 |
pub const LANGUAGES: [(&str, &str); 99] = [
("en", "english"),
("zh", "chinese"),
("de", "german"),
("es", "spanish"),
("ru", "russian"),
("ko", "korean"),
("fr", "french"),
("ja", "japanese"),
("pt", "portuguese"),
("tr", "turkish"),
("pl", "polish"),
("ca", "catalan"),
... | candle/candle-wasm-examples/whisper/src/languages.rs/0 | {
"file_path": "candle/candle-wasm-examples/whisper/src/languages.rs",
"repo_id": "candle",
"token_count": 1175
} | 38 |
use crate::model::{report_detect, report_pose, Bbox, Multiples, YoloV8, YoloV8Pose};
use candle::{DType, Device, Result, Tensor};
use candle_nn::{Module, VarBuilder};
use serde::{Deserialize, Serialize};
use wasm_bindgen::prelude::*;
use yew_agent::{HandlerId, Public, WorkerLink};
#[wasm_bindgen]
extern "C" {
// U... | candle/candle-wasm-examples/yolo/src/worker.rs/0 | {
"file_path": "candle/candle-wasm-examples/yolo/src/worker.rs",
"repo_id": "candle",
"token_count": 4077
} | 39 |
# syntax=docker/dockerfile:1
# read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
# you will also find guides on how best to write your Dockerfile
FROM node:20 as builder-production
WORKDIR /app
COPY --link --chown=1000 package-lock.json package.json ./
RUN --mount=type=cache,target=/app/.npm \
... | chat-ui/Dockerfile/0 | {
"file_path": "chat-ui/Dockerfile",
"repo_id": "chat-ui",
"token_count": 351
} | 40 |
export function clickOutside(element: HTMLDialogElement, callbackFunction: () => void) {
function onClick(event: MouseEvent) {
if (!element.contains(event.target as Node)) {
callbackFunction();
}
}
document.body.addEventListener("click", onClick);
return {
update(newCallbackFunction: () => void) {
cal... | chat-ui/src/lib/actions/clickOutside.ts/0 | {
"file_path": "chat-ui/src/lib/actions/clickOutside.ts",
"repo_id": "chat-ui",
"token_count": 143
} | 41 |
<script lang="ts">
import { onMount, onDestroy } from "svelte";
let el: HTMLElement;
onMount(() => {
el.ownerDocument.body.appendChild(el);
});
onDestroy(() => {
if (el?.parentNode) {
el.parentNode.removeChild(el);
}
});
</script>
<div bind:this={el} class="contents" hidden>
<slot />
</div>
| chat-ui/src/lib/components/Portal.svelte/0 | {
"file_path": "chat-ui/src/lib/components/Portal.svelte",
"repo_id": "chat-ui",
"token_count": 130
} | 42 |
<script lang="ts">
import { onDestroy } from "svelte";
import CarbonImage from "~icons/carbon/image";
// import EosIconsLoading from "~icons/eos-icons/loading";
export let files: File[];
let file_error_message = "";
let errorTimeout: ReturnType<typeof setTimeout>;
export let onDrag = false;
async function d... | chat-ui/src/lib/components/chat/FileDropzone.svelte/0 | {
"file_path": "chat-ui/src/lib/components/chat/FileDropzone.svelte",
"repo_id": "chat-ui",
"token_count": 1232
} | 43 |
import { TEXT_EMBEDDING_MODELS } from "$env/static/private";
import { z } from "zod";
import { sum } from "$lib/utils/sum";
import {
embeddingEndpoints,
embeddingEndpointSchema,
type EmbeddingEndpoint,
} from "$lib/server/embeddingEndpoints/embeddingEndpoints";
import { embeddingEndpointTransformersJS } from "$lib/... | chat-ui/src/lib/server/embeddingModels.ts/0 | {
"file_path": "chat-ui/src/lib/server/embeddingModels.ts",
"repo_id": "chat-ui",
"token_count": 1017
} | 44 |
import { JSDOM, VirtualConsole } from "jsdom";
export async function parseWeb(url: string) {
const abortController = new AbortController();
setTimeout(() => abortController.abort(), 10000);
const htmlString = await fetch(url, { signal: abortController.signal })
.then((response) => response.text())
.catch();
c... | chat-ui/src/lib/server/websearch/parseWeb.ts/0 | {
"file_path": "chat-ui/src/lib/server/websearch/parseWeb.ts",
"repo_id": "chat-ui",
"token_count": 320
} | 45 |
import type { MessageUpdate } from "./MessageUpdate";
import type { Timestamps } from "./Timestamps";
import type { WebSearch } from "./WebSearch";
export type Message = Partial<Timestamps> & {
from: "user" | "assistant";
id: ReturnType<typeof crypto.randomUUID>;
content: string;
updates?: MessageUpdate[];
webSea... | chat-ui/src/lib/types/Message.ts/0 | {
"file_path": "chat-ui/src/lib/types/Message.ts",
"repo_id": "chat-ui",
"token_count": 170
} | 46 |
import { browser } from "$app/environment";
export function cookiesAreEnabled(): boolean {
if (!browser) return false;
if (navigator.cookieEnabled) return navigator.cookieEnabled;
// Create cookie
document.cookie = "cookietest=1";
const ret = document.cookie.indexOf("cookietest=") != -1;
// Delete cookie
docum... | chat-ui/src/lib/utils/cookiesAreEnabled.ts/0 | {
"file_path": "chat-ui/src/lib/utils/cookiesAreEnabled.ts",
"repo_id": "chat-ui",
"token_count": 127
} | 47 |
import type { LayoutServerLoad } from "./$types";
import { collections } from "$lib/server/database";
import type { Conversation } from "$lib/types/Conversation";
import { UrlDependency } from "$lib/types/UrlDependency";
import { defaultModel, models, oldModels, validateModel } from "$lib/server/models";
import { authC... | chat-ui/src/routes/+layout.server.ts/0 | {
"file_path": "chat-ui/src/routes/+layout.server.ts",
"repo_id": "chat-ui",
"token_count": 2009
} | 48 |
<script lang="ts">
import ChatWindow from "$lib/components/chat/ChatWindow.svelte";
import { pendingMessage } from "$lib/stores/pendingMessage";
import { isAborted } from "$lib/stores/isAborted";
import { onMount } from "svelte";
import { page } from "$app/stores";
import { goto, invalidate } from "$app/navigatio... | chat-ui/src/routes/conversation/[id]/+page.svelte/0 | {
"file_path": "chat-ui/src/routes/conversation/[id]/+page.svelte",
"repo_id": "chat-ui",
"token_count": 4566
} | 49 |
<script lang="ts">
import { onMount } from "svelte";
import { base } from "$app/paths";
import { clickOutside } from "$lib/actions/clickOutside";
import { afterNavigate, goto } from "$app/navigation";
import { page } from "$app/stores";
import { useSettingsStore } from "$lib/stores/settings";
import CarbonClose ... | chat-ui/src/routes/settings/+layout.svelte/0 | {
"file_path": "chat-ui/src/routes/settings/+layout.svelte",
"repo_id": "chat-ui",
"token_count": 2424
} | 50 |
# This is the list of HuggingFace Datasets authors for copyright purposes.
#
# This does not necessarily list everyone who has contributed code, since in
# some cases, their employer may be the copyright holder. To see the full list
# of contributors, see the revision history in source control.
Google Inc.
HuggingFac... | datasets/AUTHORS/0 | {
"file_path": "datasets/AUTHORS",
"repo_id": "datasets",
"token_count": 78
} | 51 |
# Create an image dataset
There are two methods for creating and sharing an image dataset. This guide will show you how to:
* Create an image dataset with `ImageFolder` and some metadata. This is a no-code solution for quickly creating an image dataset with several thousand images.
* Create an image dataset by writin... | datasets/docs/source/image_dataset.mdx/0 | {
"file_path": "datasets/docs/source/image_dataset.mdx",
"repo_id": "datasets",
"token_count": 5724
} | 52 |
# 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
} | 53 |
# Use with Spark
This document is a quick introduction to using 🤗 Datasets with Spark, with a particular focus on how to load a Spark DataFrame into a [`Dataset`] object.
From there, you have fast access to any element and you can use it as a data loader to train models.
## Load from Spark
A [`Dataset`] object is ... | datasets/docs/source/use_with_spark.mdx/0 | {
"file_path": "datasets/docs/source/use_with_spark.mdx",
"repo_id": "datasets",
"token_count": 962
} | 54 |
# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
#
# 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.... | datasets/metrics/code_eval/code_eval.py/0 | {
"file_path": "datasets/metrics/code_eval/code_eval.py",
"repo_id": "datasets",
"token_count": 3175
} | 55 |
# Copyright 2022 The HuggingFace Datasets Authors and the current metric script contributor.
#
# 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... | datasets/metrics/frugalscore/frugalscore.py/0 | {
"file_path": "datasets/metrics/frugalscore/frugalscore.py",
"repo_id": "datasets",
"token_count": 1754
} | 56 |
# Copyright 2022 The HuggingFace 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
#
# Unless required by applicable law or ... | datasets/metrics/mean_iou/mean_iou.py/0 | {
"file_path": "datasets/metrics/mean_iou/mean_iou.py",
"repo_id": "datasets",
"token_count": 5236
} | 57 |
# Copyright 2020 The HuggingFace 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
#
# Unless required by applicable law or ... | datasets/metrics/rouge/rouge.py/0 | {
"file_path": "datasets/metrics/rouge/rouge.py",
"repo_id": "datasets",
"token_count": 2100
} | 58 |
"""
Official evaluation script for ReCoRD v1.0.
(Some functions are adopted from the SQuAD evaluation script.)
"""
import argparse
import json
import re
import string
import sys
from collections import Counter
def normalize_answer(s):
"""Lower text and remove punctuation, articles and extra whitespace."""
... | datasets/metrics/super_glue/record_evaluation.py/0 | {
"file_path": "datasets/metrics/super_glue/record_evaluation.py",
"repo_id": "datasets",
"token_count": 1480
} | 59 |
# ruff: noqa
# 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/LICE... | datasets/src/datasets/__init__.py/0 | {
"file_path": "datasets/src/datasets/__init__.py",
"repo_id": "datasets",
"token_count": 772
} | 60 |
from typing import TypeVar
from .arrow_dataset import Dataset, _split_by_node_map_style_dataset
from .iterable_dataset import IterableDataset, _split_by_node_iterable_dataset
DatasetType = TypeVar("DatasetType", Dataset, IterableDataset)
def split_dataset_by_node(dataset: DatasetType, rank: int, world_size: int) -... | datasets/src/datasets/distributed.py/0 | {
"file_path": "datasets/src/datasets/distributed.py",
"repo_id": "datasets",
"token_count": 582
} | 61 |
# 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/formatting/__init__.py/0 | {
"file_path": "datasets/src/datasets/formatting/__init__.py",
"repo_id": "datasets",
"token_count": 1818
} | 62 |
from typing import Optional
from .. import Features, NamedSplit
from ..packaged_modules.text.text import Text
from ..utils.typing import NestedDataStructureLike, PathLike
from .abc import AbstractDatasetReader
class TextDatasetReader(AbstractDatasetReader):
def __init__(
self,
path_or_paths: Nest... | datasets/src/datasets/io/text.py/0 | {
"file_path": "datasets/src/datasets/io/text.py",
"repo_id": "datasets",
"token_count": 998
} | 63 |
import collections
import itertools
import os
from dataclasses import dataclass
from typing import List, Optional, Tuple, Type
import pandas as pd
import pyarrow as pa
import pyarrow.json as paj
import datasets
from datasets.features.features import FeatureType
from datasets.tasks.base import TaskTemplate
logger = ... | datasets/src/datasets/packaged_modules/folder_based_builder/folder_based_builder.py/0 | {
"file_path": "datasets/src/datasets/packaged_modules/folder_based_builder/folder_based_builder.py",
"repo_id": "datasets",
"token_count": 11960
} | 64 |
import itertools
import warnings
from dataclasses import InitVar, dataclass
from io import StringIO
from typing import Optional
import pyarrow as pa
import datasets
from datasets.features.features import require_storage_cast
from datasets.table import table_cast
logger = datasets.utils.logging.get_logger(__name__)
... | datasets/src/datasets/packaged_modules/text/text.py/0 | {
"file_path": "datasets/src/datasets/packaged_modules/text/text.py",
"repo_id": "datasets",
"token_count": 3042
} | 65 |
from dataclasses import dataclass, field
from typing import ClassVar, Dict
from ..features import Features, Sequence, Value
from .base import TaskTemplate
@dataclass(frozen=True)
class QuestionAnsweringExtractive(TaskTemplate):
# `task` is not a ClassVar since we want it to be part of the `asdict` output for JSO... | datasets/src/datasets/tasks/question_answering.py/0 | {
"file_path": "datasets/src/datasets/tasks/question_answering.py",
"repo_id": "datasets",
"token_count": 437
} | 66 |
import enum
import os
from typing import Optional
from huggingface_hub.utils import insecure_hashlib
from .. import config
from .logging import get_logger
logger = get_logger(__name__)
class VerificationMode(enum.Enum):
"""`Enum` that specifies which verification checks to run.
The default mode is `BASIC... | datasets/src/datasets/utils/info_utils.py/0 | {
"file_path": "datasets/src/datasets/utils/info_utils.py",
"repo_id": "datasets",
"token_count": 1893
} | 67 |
from collections.abc import Iterator
from typing import Iterable
class tracked_str(str):
origins = {}
def set_origin(self, origin: str):
if super().__repr__() not in self.origins:
self.origins[super().__repr__()] = origin
def get_origin(self):
return self.origins.get(super().... | datasets/src/datasets/utils/track.py/0 | {
"file_path": "datasets/src/datasets/utils/track.py",
"repo_id": "datasets",
"token_count": 648
} | 68 |
import textwrap
import pyarrow as pa
import pytest
from datasets import Features, Image
from datasets.packaged_modules.text.text import Text
from ..utils import require_pil
@pytest.fixture
def text_file(tmp_path):
filename = tmp_path / "text.txt"
data = textwrap.dedent(
"""\
Lorem ipsum dol... | datasets/tests/packaged_modules/test_text.py/0 | {
"file_path": "datasets/tests/packaged_modules/test_text.py",
"repo_id": "datasets",
"token_count": 1289
} | 69 |
import importlib
import os
import fsspec
import pytest
from fsspec import register_implementation
from fsspec.registry import _registry as _fsspec_registry
from datasets.filesystems import COMPRESSION_FILESYSTEMS, extract_path_from_uri, is_remote_filesystem
from .utils import require_lz4, require_zstandard
def tes... | datasets/tests/test_filesystem.py/0 | {
"file_path": "datasets/tests/test_filesystem.py",
"repo_id": "datasets",
"token_count": 1297
} | 70 |
import time
from dataclasses import dataclass
from multiprocessing import Pool
from unittest import TestCase
from unittest.mock import patch
import multiprocess
import numpy as np
import pytest
from datasets.utils.py_utils import (
NestedDataStructure,
asdict,
iflatmap_unordered,
map_nested,
temp_... | datasets/tests/test_py_utils.py/0 | {
"file_path": "datasets/tests/test_py_utils.py",
"repo_id": "datasets",
"token_count": 4821
} | 71 |
# [The Hugging Face Deep Reinforcement Learning Course 🤗 (v2.0)](https://huggingface.co/deep-rl-course/unit0/introduction)
<img src="https://huggingface.co/datasets/huggingface-deep-rl-course/course-images/resolve/main/en/unit0/thumbnail.jpg" alt="Thumbnail"/>
If you like the course, don't hesitate to **⭐ star this ... | deep-rl-class/README.md/0 | {
"file_path": "deep-rl-class/README.md",
"repo_id": "deep-rl-class",
"token_count": 388
} | 72 |
# The certification process
The certification process is **completely free**:
- To get a *certificate of completion*: you need **to pass 80% of the assignments**.
- To get a *certificate of excellence*: you need **to pass 100% of the assignments**.
There's **no deadlines, the course is self-paced**.
<img src="http... | deep-rl-class/units/en/communication/certification.mdx/0 | {
"file_path": "deep-rl-class/units/en/communication/certification.mdx",
"repo_id": "deep-rl-class",
"token_count": 418
} | 73 |
# Type of tasks [[tasks]]
A task is an **instance** of a Reinforcement Learning problem. We can have two types of tasks: **episodic** and **continuing**.
## Episodic task [[episodic-task]]
In this case, we have a starting point and an ending point **(a terminal state). This creates an episode**: a list of States, Ac... | deep-rl-class/units/en/unit1/tasks.mdx/0 | {
"file_path": "deep-rl-class/units/en/unit1/tasks.mdx",
"repo_id": "deep-rl-class",
"token_count": 436
} | 74 |
# Two types of value-based methods [[two-types-value-based-methods]]
In value-based methods, **we learn a value function** that **maps a state to the expected value of being at that state.**
<img src="https://huggingface.co/datasets/huggingface-deep-rl-course/course-images/resolve/main/en/unit3/vbm-1.jpg" alt="Value ... | deep-rl-class/units/en/unit2/two-types-value-based-methods.mdx/0 | {
"file_path": "deep-rl-class/units/en/unit2/two-types-value-based-methods.mdx",
"repo_id": "deep-rl-class",
"token_count": 1727
} | 75 |
# Introduction [[introduction]]
<img src="https://huggingface.co/datasets/huggingface-deep-rl-course/course-images/resolve/main/en/unit6/thumbnail.png" alt="thumbnail"/>
In the last unit, we learned about Deep Q-Learning. In this value-based deep reinforcement learning algorithm, we **used a deep neural network to ... | deep-rl-class/units/en/unit4/introduction.mdx/0 | {
"file_path": "deep-rl-class/units/en/unit4/introduction.mdx",
"repo_id": "deep-rl-class",
"token_count": 462
} | 76 |
# Conclusion [[conclusion]]
Congrats on finishing this unit and the tutorial. You've just trained your first virtual robots 🥳.
**Take time to grasp the material before continuing**. You can also look at the additional reading materials we provided in the *additional reading* section.
Finally, we would love **to hea... | deep-rl-class/units/en/unit6/conclusion.mdx/0 | {
"file_path": "deep-rl-class/units/en/unit6/conclusion.mdx",
"repo_id": "deep-rl-class",
"token_count": 145
} | 77 |
# Conclusion [[Conclusion]]
That’s all for today. Congrats on finishing this unit and the tutorial!
The best way to learn is to practice and try stuff. **Why not improve the implementation to handle frames as input?**.
See you on second part of this Unit 🔥
## Keep Learning, Stay awesome 🤗
| deep-rl-class/units/en/unit8/conclusion.mdx/0 | {
"file_path": "deep-rl-class/units/en/unit8/conclusion.mdx",
"repo_id": "deep-rl-class",
"token_count": 78
} | 78 |
# Decision Transformers
The Decision Transformer model was introduced by ["Decision Transformer: Reinforcement Learning via Sequence Modeling” by Chen L. et al](https://arxiv.org/abs/2106.01345). It abstracts Reinforcement Learning as a conditional-sequence modeling problem.
The main idea is that instead of training ... | deep-rl-class/units/en/unitbonus3/decision-transformers.mdx/0 | {
"file_path": "deep-rl-class/units/en/unitbonus3/decision-transformers.mdx",
"repo_id": "deep-rl-class",
"token_count": 543
} | 79 |
cff-version: 1.2.0
title: 'Diffusers: State-of-the-art diffusion models'
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Patrick
family-names: von Platen
- given-names: Suraj
family-names: Patil
- given-names: Anton
fam... | diffusers/CITATION.cff/0 | {
"file_path": "diffusers/CITATION.cff",
"repo_id": "diffusers",
"token_count": 369
} | 80 |
import glob
import sys
import pandas as pd
from huggingface_hub import hf_hub_download, upload_file
from huggingface_hub.utils._errors import EntryNotFoundError
sys.path.append(".")
from utils import BASE_PATH, FINAL_CSV_FILE, GITHUB_SHA, REPO_ID, collate_csv # noqa: E402
def has_previous_benchmark() -> str:
... | diffusers/benchmarks/push_results.py/0 | {
"file_path": "diffusers/benchmarks/push_results.py",
"repo_id": "diffusers",
"token_count": 1089
} | 81 |
<!--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/en/api/models/overview.md/0 | {
"file_path": "diffusers/docs/source/en/api/models/overview.md",
"repo_id": "diffusers",
"token_count": 337
} | 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 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": 1051
} | 83 |
<!--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/en/api/pipelines/stable_diffusion/image_variation.md/0 | {
"file_path": "diffusers/docs/source/en/api/pipelines/stable_diffusion/image_variation.md",
"repo_id": "diffusers",
"token_count": 495
} | 84 |
<!--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/en/conceptual/ethical_guidelines.md/0 | {
"file_path": "diffusers/docs/source/en/conceptual/ethical_guidelines.md",
"repo_id": "diffusers",
"token_count": 1156
} | 85 |
<!--Copyright 2023 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | diffusers/docs/source/en/optimization/tome.md/0 | {
"file_path": "diffusers/docs/source/en/optimization/tome.md",
"repo_id": "diffusers",
"token_count": 3380
} | 86 |
<!--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/en/training/overview.md/0 | {
"file_path": "diffusers/docs/source/en/training/overview.md",
"repo_id": "diffusers",
"token_count": 1546
} | 87 |
<!--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/en/using-diffusers/controlling_generation.md/0 | {
"file_path": "diffusers/docs/source/en/using-diffusers/controlling_generation.md",
"repo_id": "diffusers",
"token_count": 6312
} | 88 |
<!--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/en/using-diffusers/other-formats.md/0 | {
"file_path": "diffusers/docs/source/en/using-diffusers/other-formats.md",
"repo_id": "diffusers",
"token_count": 2825
} | 89 |
<!--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/en/using-diffusers/write_own_pipeline.md/0 | {
"file_path": "diffusers/docs/source/en/using-diffusers/write_own_pipeline.md",
"repo_id": "diffusers",
"token_count": 4163
} | 90 |
<!--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/optimization/mps.md/0 | {
"file_path": "diffusers/docs/source/ko/optimization/mps.md",
"repo_id": "diffusers",
"token_count": 2533
} | 91 |
<!--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/training/lora.md/0 | {
"file_path": "diffusers/docs/source/ko/training/lora.md",
"repo_id": "diffusers",
"token_count": 4734
} | 92 |
<!--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/loading.md/0 | {
"file_path": "diffusers/docs/source/ko/using-diffusers/loading.md",
"repo_id": "diffusers",
"token_count": 14651
} | 93 |
<!--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/pt/quicktour.md/0 | {
"file_path": "diffusers/docs/source/pt/quicktour.md",
"repo_id": "diffusers",
"token_count": 6767
} | 94 |
import inspect
from typing import List, Optional, Union
import numpy as np
import PIL.Image
import torch
from torch import nn
from torch.nn import functional as F
from torchvision import transforms
from transformers import CLIPFeatureExtractor, CLIPModel, CLIPTextModel, CLIPTokenizer
from diffusers import (
Autoe... | diffusers/examples/community/clip_guided_stable_diffusion_img2img.py/0 | {
"file_path": "diffusers/examples/community/clip_guided_stable_diffusion_img2img.py",
"repo_id": "diffusers",
"token_count": 9555
} | 95 |
import inspect
import re
from typing import Any, Callable, Dict, List, Optional, Union
import numpy as np
import PIL.Image
import torch
from packaging import version
from transformers import CLIPImageProcessor, CLIPTextModel, CLIPTokenizer
from diffusers import DiffusionPipeline
from diffusers.configuration_utils imp... | diffusers/examples/community/lpw_stable_diffusion.py/0 | {
"file_path": "diffusers/examples/community/lpw_stable_diffusion.py",
"repo_id": "diffusers",
"token_count": 32894
} | 96 |
# Inspired by: https://github.com/haofanwang/ControlNet-for-Diffusers/
import inspect
from typing import Any, Callable, Dict, List, Optional, Tuple, Union
import numpy as np
import PIL.Image
import torch
from transformers import CLIPImageProcessor, CLIPTextModel, CLIPTokenizer
from diffusers import AutoencoderKL, Co... | diffusers/examples/community/stable_diffusion_controlnet_img2img.py/0 | {
"file_path": "diffusers/examples/community/stable_diffusion_controlnet_img2img.py",
"repo_id": "diffusers",
"token_count": 20854
} | 97 |
import inspect
from typing import List, Optional, Tuple, Union
import torch
from torch.nn import functional as F
from transformers import CLIPTextModelWithProjection, CLIPTokenizer
from transformers.models.clip.modeling_clip import CLIPTextModelOutput
from diffusers import (
DiffusionPipeline,
ImagePipelineOu... | diffusers/examples/community/unclip_text_interpolation.py/0 | {
"file_path": "diffusers/examples/community/unclip_text_interpolation.py",
"repo_id": "diffusers",
"token_count": 11575
} | 98 |
# coding=utf-8
# Copyright 2023 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | diffusers/examples/dreambooth/test_dreambooth_lora.py/0 | {
"file_path": "diffusers/examples/dreambooth/test_dreambooth_lora.py",
"repo_id": "diffusers",
"token_count": 8108
} | 99 |
#!/usr/bin/env python
# coding=utf-8
# Copyright 2023 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": 16245
} | 100 |
## Diffusers examples with Intel optimizations
**This research project is not actively maintained by the diffusers team. For any questions or comments, please make sure to tag @hshen14 .**
This aims to provide diffusers examples with Intel optimizations such as Bfloat16 for training/fine-tuning acceleration and 8-bit... | diffusers/examples/research_projects/intel_opts/README.md/0 | {
"file_path": "diffusers/examples/research_projects/intel_opts/README.md",
"repo_id": "diffusers",
"token_count": 528
} | 101 |
# Script for converting a HF Diffusers saved pipeline to a Stable Diffusion checkpoint.
# *Only* converts the UNet, VAE, and Text Encoder.
# Does not convert optimizer state or any other thing.
import argparse
import os.path as osp
import re
import torch
from safetensors.torch import load_file, save_file
# ========... | diffusers/scripts/convert_diffusers_to_original_stable_diffusion.py/0 | {
"file_path": "diffusers/scripts/convert_diffusers_to_original_stable_diffusion.py",
"repo_id": "diffusers",
"token_count": 6226
} | 102 |
# coding=utf-8
# Copyright 2023 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_versatile_diffusion_to_diffusers.py/0 | {
"file_path": "diffusers/scripts/convert_versatile_diffusion_to_diffusers.py",
"repo_id": "diffusers",
"token_count": 14926
} | 103 |
from .value_guided_sampling import ValueGuidedRLPipeline
| diffusers/src/diffusers/experimental/rl/__init__.py/0 | {
"file_path": "diffusers/src/diffusers/experimental/rl/__init__.py",
"repo_id": "diffusers",
"token_count": 17
} | 104 |
# 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... | diffusers/src/diffusers/models/__init__.py/0 | {
"file_path": "diffusers/src/diffusers/models/__init__.py",
"repo_id": "diffusers",
"token_count": 1724
} | 105 |
from ...utils import is_torch_available
if is_torch_available():
from .dual_transformer_2d import DualTransformer2DModel
from .prior_transformer import PriorTransformer
from .t5_film_transformer import T5FilmDecoder
from .transformer_2d import Transformer2DModel
from .transformer_temporal import T... | diffusers/src/diffusers/models/transformers/__init__.py/0 | {
"file_path": "diffusers/src/diffusers/models/transformers/__init__.py",
"repo_id": "diffusers",
"token_count": 110
} | 106 |
# 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... | diffusers/src/diffusers/models/unets/unet_2d_blocks_flax.py/0 | {
"file_path": "diffusers/src/diffusers/models/unets/unet_2d_blocks_flax.py",
"repo_id": "diffusers",
"token_count": 6962
} | 107 |
from typing import TYPE_CHECKING
from ...utils import (
DIFFUSERS_SLOW_IMPORT,
OptionalDependencyNotAvailable,
_LazyModule,
is_torch_available,
is_transformers_available,
)
_dummy_objects = {}
_import_structure = {}
try:
if not (is_transformers_available() and is_torch_available()):
... | diffusers/src/diffusers/pipelines/amused/__init__.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/amused/__init__.py",
"repo_id": "diffusers",
"token_count": 796
} | 108 |
# 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... | diffusers/src/diffusers/pipelines/blip_diffusion/modeling_blip2.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/blip_diffusion/modeling_blip2.py",
"repo_id": "diffusers",
"token_count": 12076
} | 109 |
# 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... | diffusers/src/diffusers/pipelines/dance_diffusion/pipeline_dance_diffusion.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/dance_diffusion/pipeline_dance_diffusion.py",
"repo_id": "diffusers",
"token_count": 2623
} | 110 |
# Deprecated Pipelines
This folder contains pipelines that have very low usage as measured by model downloads, issues and PRs. While you can still use the pipelines just as before, we will stop testing the pipelines and will not accept any changes to existing files. | diffusers/src/diffusers/pipelines/deprecated/README.md/0 | {
"file_path": "diffusers/src/diffusers/pipelines/deprecated/README.md",
"repo_id": "diffusers",
"token_count": 54
} | 111 |
from typing import TYPE_CHECKING
from ....utils import DIFFUSERS_SLOW_IMPORT, _LazyModule
_import_structure = {"pipeline_score_sde_ve": ["ScoreSdeVePipeline"]}
if TYPE_CHECKING or DIFFUSERS_SLOW_IMPORT:
from .pipeline_score_sde_ve import ScoreSdeVePipeline
else:
import sys
sys.modules[__name__] = _Laz... | diffusers/src/diffusers/pipelines/deprecated/score_sde_ve/__init__.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/deprecated/score_sde_ve/__init__.py",
"repo_id": "diffusers",
"token_count": 193
} | 112 |
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 i... | diffusers/src/diffusers/pipelines/deprecated/versatile_diffusion/__init__.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/deprecated/versatile_diffusion/__init__.py",
"repo_id": "diffusers",
"token_count": 1112
} | 113 |
# 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... | diffusers/src/diffusers/pipelines/kandinsky/pipeline_kandinsky_inpaint.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/kandinsky/pipeline_kandinsky_inpaint.py",
"repo_id": "diffusers",
"token_count": 12787
} | 114 |
# Copyright 2023 MultiDiffusion 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
#
# Un... | diffusers/src/diffusers/pipelines/stable_diffusion_panorama/pipeline_stable_diffusion_panorama.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/stable_diffusion_panorama/pipeline_stable_diffusion_panorama.py",
"repo_id": "diffusers",
"token_count": 20626
} | 115 |
# 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... | diffusers/src/diffusers/pipelines/stable_video_diffusion/pipeline_stable_video_diffusion.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/stable_video_diffusion/pipeline_stable_video_diffusion.py",
"repo_id": "diffusers",
"token_count": 12421
} | 116 |
import math
from typing import Optional, Union
import torch
from torch import nn
from ...configuration_utils import ConfigMixin, register_to_config
from ...models import ModelMixin
from ...models.attention import FeedForward
from ...models.attention_processor import Attention
from ...models.embeddings import Timestep... | diffusers/src/diffusers/pipelines/unidiffuser/modeling_uvit.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/unidiffuser/modeling_uvit.py",
"repo_id": "diffusers",
"token_count": 24180
} | 117 |
import math
from dataclasses import dataclass
from typing import List, Optional, Tuple, Union
import torch
from ..configuration_utils import ConfigMixin, register_to_config
from ..utils import BaseOutput
from .scheduling_utils import SchedulerMixin
def gumbel_noise(t, generator=None):
device = generator.device ... | diffusers/src/diffusers/schedulers/scheduling_amused.py/0 | {
"file_path": "diffusers/src/diffusers/schedulers/scheduling_amused.py",
"repo_id": "diffusers",
"token_count": 2780
} | 118 |
# Copyright 2023 Google Brain and The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | diffusers/src/diffusers/schedulers/scheduling_sde_ve.py/0 | {
"file_path": "diffusers/src/diffusers/schedulers/scheduling_sde_ve.py",
"repo_id": "diffusers",
"token_count": 5400
} | 119 |
# This file is autogenerated by the command `make fix-copies`, do not edit.
from ..utils import DummyObject, requires_backends
class OnnxRuntimeModel(metaclass=DummyObject):
_backends = ["onnx"]
def __init__(self, *args, **kwargs):
requires_backends(self, ["onnx"])
@classmethod
def from_conf... | diffusers/src/diffusers/utils/dummy_onnx_objects.py/0 | {
"file_path": "diffusers/src/diffusers/utils/dummy_onnx_objects.py",
"repo_id": "diffusers",
"token_count": 202
} | 120 |
# 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... | diffusers/src/diffusers/utils/peft_utils.py/0 | {
"file_path": "diffusers/src/diffusers/utils/peft_utils.py",
"repo_id": "diffusers",
"token_count": 4356
} | 121 |
# coding=utf-8
# Copyright 2023 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | diffusers/tests/models/autoencoders/test_models_vae.py/0 | {
"file_path": "diffusers/tests/models/autoencoders/test_models_vae.py",
"repo_id": "diffusers",
"token_count": 18283
} | 122 |
# coding=utf-8
# Copyright 2023 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | diffusers/tests/models/unets/test_models_unet_motion.py/0 | {
"file_path": "diffusers/tests/models/unets/test_models_unet_motion.py",
"repo_id": "diffusers",
"token_count": 4947
} | 123 |
# coding=utf-8
# Copyright 2023 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | diffusers/tests/pipelines/amused/test_amused.py/0 | {
"file_path": "diffusers/tests/pipelines/amused/test_amused.py",
"repo_id": "diffusers",
"token_count": 3131
} | 124 |
# coding=utf-8
# Copyright 2023 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | diffusers/tests/pipelines/kandinsky2_2/test_kandinsky.py/0 | {
"file_path": "diffusers/tests/pipelines/kandinsky2_2/test_kandinsky.py",
"repo_id": "diffusers",
"token_count": 3974
} | 125 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.