2023-05-24 13:37:59 +00:00
|
|
|
{ lib
|
|
|
|
, accelerate
|
2023-08-22 20:05:09 +00:00
|
|
|
, buildPythonPackage
|
2023-05-24 13:37:59 +00:00
|
|
|
, clean-fid
|
|
|
|
, clip-anytorch
|
2023-10-09 19:29:22 +00:00
|
|
|
, dctorch
|
2023-05-24 13:37:59 +00:00
|
|
|
, einops
|
2023-08-22 20:05:09 +00:00
|
|
|
, fetchFromGitHub
|
2023-05-24 13:37:59 +00:00
|
|
|
, jsonmerge
|
|
|
|
, kornia
|
|
|
|
, pillow
|
2023-08-22 20:05:09 +00:00
|
|
|
, pythonOlder
|
2023-10-09 19:29:22 +00:00
|
|
|
, rotary-embedding-torch
|
|
|
|
, safetensors
|
2023-05-24 13:37:59 +00:00
|
|
|
, scikit-image
|
|
|
|
, scipy
|
|
|
|
, torch
|
|
|
|
, torchdiffeq
|
|
|
|
, torchsde
|
|
|
|
, torchvision
|
|
|
|
, tqdm
|
|
|
|
, wandb
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "k-diffusion";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "0.1.1.post1";
|
2023-05-24 13:37:59 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "crowsonkb";
|
|
|
|
repo = "k-diffusion";
|
2023-08-22 20:05:09 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-x/UHzobQv5ov0luUHqC8OA5YbtF+aWL39/SQtzTm0RM=";
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2023-08-22 20:05:09 +00:00
|
|
|
accelerate
|
2023-05-24 13:37:59 +00:00
|
|
|
clean-fid
|
|
|
|
clip-anytorch
|
2023-10-09 19:29:22 +00:00
|
|
|
dctorch
|
2023-05-24 13:37:59 +00:00
|
|
|
einops
|
|
|
|
jsonmerge
|
|
|
|
kornia
|
|
|
|
pillow
|
2023-10-09 19:29:22 +00:00
|
|
|
rotary-embedding-torch
|
2023-05-24 13:37:59 +00:00
|
|
|
scikit-image
|
|
|
|
scipy
|
2023-10-09 19:29:22 +00:00
|
|
|
safetensors
|
2023-05-24 13:37:59 +00:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|