depot/third_party/nixpkgs/pkgs/development/python-modules/k-diffusion/default.nix
Default email 504525a148 Project import generated by Copybara.
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
2024-01-02 12:29:13 +01:00

73 lines
1.2 KiB
Nix

{ lib
, accelerate
, buildPythonPackage
, clean-fid
, clip-anytorch
, dctorch
, einops
, fetchFromGitHub
, jsonmerge
, kornia
, pillow
, pythonOlder
, rotary-embedding-torch
, safetensors
, scikit-image
, scipy
, torch
, torchdiffeq
, torchsde
, torchvision
, tqdm
, wandb
}:
buildPythonPackage rec {
pname = "k-diffusion";
version = "0.1.1.post1";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "crowsonkb";
repo = "k-diffusion";
rev = "refs/tags/v${version}";
hash = "sha256-x/UHzobQv5ov0luUHqC8OA5YbtF+aWL39/SQtzTm0RM=";
};
propagatedBuildInputs = [
accelerate
clean-fid
clip-anytorch
dctorch
einops
jsonmerge
kornia
pillow
rotary-embedding-torch
scikit-image
scipy
safetensors
torch
torchdiffeq
torchsde
torchvision
tqdm
wandb
];
pythonImportsCheck = [
"k_diffusion"
];
# no tests
doCheck = false;
meta = with lib; {
description = "Karras et al. (2022) diffusion models for PyTorch";
homepage = "https://github.com/crowsonkb/k-diffusion";
license = licenses.mit;
maintainers = teams.tts.members;
};
}