Skip to main content

Skrample 0.6.1

Composable sampling functions for diffusion models

Status

Production-tested on all popular diffusion models. The library has significantly matured since 0.5

Quickstart

Fastest way to jump in is examples. The classes and functions themselves have docstrings and type hints, so it's recommended to make liberal use of your IDE or python help()

Feature Flags

  • beta-schedule -> scipy : For the Beta() schedule modifier
  • brownian-noise -> torchsde : For the Brownian() noise generator
  • cdf-schedule -> scipy : For the Probit() schedule
  • diffusers-wrapper -> torch : For the diffusers integration module
  • pytorch -> torch : For the pytorch module
    • pytorch.noise : Custom generators
  • all : All of the above
  • dev : For running tests/

Structured Samplers

These samplers are written inside-out to be compatible with Diffusers and similar frameworks

  • Euler
    • Stochastic
  • DPM
    • Order 1-3
    • Stochastic
  • Adams/IPNDM
    • Order 1-9
    • Stochastic
  • UniP & UniPC
    • Order 1-9
    • Stochastic
    • Custom predictor via other SkrampleSampler types
  • SPC
    • Basic fully customizable midpoint corrector

Functional Samplers

These samplers are written using closures similar to ksampler

  • RKUltra
    • Arbitrary Runge-Kutta solver
    • Order 1-15, customizable through tableaux system
    • Stochastic
  • DynasauRK
    • Procedural Runge-Kutta solver
    • Order 2-4
    • Stochastic
  • RKMoire
    • Experimental
    • Embedded Runge-Kutta solver
    • Order 2-6, customizable through tableaux system

Schedules

  • Linear
    • Flow-matching default
  • Scaled
    • Variance-preserving default
  • ZSNR

Subschedules

Replaces sigmas on an existing schedule

  • Karras
  • Exponential
  • Beta
  • Probit

Schedule Modifiers

Modifies timestep spacing of a schedule

  • FlowShift
  • Hyper
  • Sinner

Models

  • Data / Sample / X-Pred
  • Noise / Epsilon / Ε-Pred
  • Velocity / V-Pred
  • Flow / U-pred

Noise generators

  • Random
  • Brownian
  • Colored
  • Offset
  • Pyramid

Integrations

Diffusers

  • Compatibile with DiffusionPipeline
  • Import from config
    • Sampler
    • Schedule
    • Predictor
  • Structured sampler wrapper
  • Functional sampler wrappers
    • RKUltra
    • DynasauRK

Implementations

quickdif

My diffusers cli quickdif has full support for all major Diffusers-compatible Skrample features, allowing extremely fine-grained customization.

Release files for skrample 0.6.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for skrample 0.6.1
File Size Uploaded
skrample-0.6.1.tar.gz 79.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for skrample 0.6.1
File Interpreter ABI Platform
skrample-0.6.1-py3-none-any.whl Python 3 none any Details

Total release size: 163.7 kB

Release files / skrample-0.6.1.tar.gz

Download URL skrample-0.6.1.tar.gz
Size 79.6 kB
Tags Source
SHA-256 checksum
How to use checksums
68d435480381a0bd85d93d53b67e48ae26c41d3025af3545e14e6a52c82f33f3
BLAKE2b-256 checksum
How to use checksums
325c809c3adf5ab2101ff8dadab8276c2aefefe2b6c8187852813de50e55ca4b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.25 {"installer":{"name":"uv","version":"0.11.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / skrample-0.6.1-py3-none-any.whl

Download URL skrample-0.6.1-py3-none-any.whl
Size 84.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0ec5a0dc48c4b50864712f7d93c225527092d40166d94cac55fe01c8c4f7d51d
BLAKE2b-256 checksum
How to use checksums
a83841d349de4d365f06260c97428a34bb0e3afb430615662050fe2a43b0783c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.25 {"installer":{"name":"uv","version":"0.11.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

0.7.0

2 release files

This release

0.6.1 This release

2 release files

0.6.0

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page