2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
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,
|
2023-05-24 13:37:59 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
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
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "k_diffusion" ];
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
# 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;
|
|
|
|
};
|
|
|
|
}
|