Skip to main content

Composable sampling functions for diffusion models

Project description

Skrample 0.5.0

Composable sampling functions for diffusion models

Status

Mostly complete for common models, superseding all diffusers features in quickdif

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 SigmoidCDF() 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/

Samplers

  • Euler
  • DPM
    • 1st order, 2nd order, 3rd order
    • SDE
  • Adams/IPNDM
  • UniP & UniPC
    • N order, limited to 9 for stability
    • Custom solver via other SkrampleSampler types
  • SPC
    • Basic fully customizable midpoint corrector

Schedules

  • Linear
  • Scaled
    • uniform flag, AKA "trailing" in diffusers
  • SigmaCDF
  • ZSNR

Schedule modifiers

  • Karras
  • Exponential
  • FlowShift
  • Beta
  • Hyper

Predictors

  • Epsilon
  • Velocity / vpred
  • Flow

Noise generators

  • Random
  • Brownian
  • Offset
  • Pyramid

Integrations

Diffusers

  • Compatibility for pipelines
    • SD1
    • SDXL
    • SD3
    • Flux
  • Import from config
    • Sampler
    • Schedule
    • Predictor
  • Manage state
    • Steps
    • Higher order
    • Generators
    • Config as presented

Implementations

quickdif

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

skrample-0.5.0.tar.gz (18.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

skrample-0.5.0-py3-none-any.whl (21.5 kB view details)

Uploaded Python 3

File details

Details for the file skrample-0.5.0.tar.gz.

File metadata

  • Download URL: skrample-0.5.0.tar.gz
  • Upload date:
  • Size: 18.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.8

File hashes

Hashes for skrample-0.5.0.tar.gz
Algorithm Hash digest
SHA256 b3a79de9033a1f7603535f6363ddf066a29fcc3f6addf60866319dc5de3e089e
MD5 654e219c416955b630a72104286b8ef9
BLAKE2b-256 2b0a2b6f9651dc01b05d7c64a0db3801700e96025a2482fc50b9691034f642d0

See more details on using hashes here.

File details

Details for the file skrample-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: skrample-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 21.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.8

File hashes

Hashes for skrample-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a678c9d3ae68d259311e82f5837dd772d89721adf09755bfe94674d6bb2a4245
MD5 3b2225bedef1ce5d77ac0925f62e131d
BLAKE2b-256 f28db0a1c92cbd6d5afec00891c4b3136cfb822bcbd18cf7045237a4d671d42a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page