From 1e69af82ed24d525055b695853cb8db63a7fec97 Mon Sep 17 00:00:00 2001 From: natsukium Date: Sun, 2 Jun 2024 13:58:12 +0900 Subject: [PATCH 1/2] python311Packages.diffusers: 0.27.2 -> 0.28.0 Diff: https://github.com/huggingface/diffusers/compare/refs/tags/v0.27.2...v0.28.0 Changelog: https://github.com/huggingface/diffusers/releases/tag/refs/tags/v0.28.0 --- .../python-modules/diffusers/default.nix | 27 +++---------------- 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/pkgs/development/python-modules/diffusers/default.nix b/pkgs/development/python-modules/diffusers/default.nix index 8762022b0651..f9c634da8c2e 100644 --- a/pkgs/development/python-modules/diffusers/default.nix +++ b/pkgs/development/python-modules/diffusers/default.nix @@ -4,10 +4,8 @@ buildPythonPackage, pythonOlder, fetchFromGitHub, - fetchpatch, writeText, setuptools, - wheel, filelock, huggingface-hub, importlib-metadata, @@ -42,7 +40,7 @@ buildPythonPackage rec { pname = "diffusers"; - version = "0.27.2"; + version = "0.28.0"; pyproject = true; disabled = pythonOlder "3.8"; @@ -51,29 +49,10 @@ buildPythonPackage rec { owner = "huggingface"; repo = "diffusers"; rev = "refs/tags/v${version}"; - hash = "sha256-aRnbU3jN40xaCsoMFyRt1XB+hyIYMJP2b/T1yZho90c="; + hash = "sha256-DYUVg96oHYoRqw/RGoH48YXfK/kfkYoqGQfkiOUr8DU="; }; - patches = [ - # fix python3.12 build - (fetchpatch { - # https://github.com/huggingface/diffusers/pull/7455 - name = "001-remove-distutils.patch"; - url = "https://github.com/huggingface/diffusers/compare/363699044e365ef977a7646b500402fa585e1b6b...3c67864c5acb30413911730b1ed4a9ad47c0a15c.patch"; - hash = "sha256-Qyvyp1GyTVXN+A+lA1r2hf887ubTtaUknbKd4r46NZQ="; - }) - (fetchpatch { - # https://github.com/huggingface/diffusers/pull/7461 - name = "002-fix-removed-distutils.patch"; - url = "https://github.com/huggingface/diffusers/commit/efbbbc38e436a1abb1df41a6eccfd6f9f0333f97.patch"; - hash = "sha256-scdtpX1RYFFEDHcaMb+gDZSsPafkvnIO/wQlpzrQhLA="; - }) - ]; - - build-system = [ - setuptools - wheel - ]; + build-system = [ setuptools ]; dependencies = [ filelock From d2767bbd2432456c825aeb3edc64c6e68d593486 Mon Sep 17 00:00:00 2001 From: natsukium Date: Sun, 2 Jun 2024 14:08:43 +0900 Subject: [PATCH 2/2] python311Packages.diffusers: move tests to passthru.tests --- pkgs/development/python-modules/diffusers/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/diffusers/default.nix b/pkgs/development/python-modules/diffusers/default.nix index f9c634da8c2e..855547d5226e 100644 --- a/pkgs/development/python-modules/diffusers/default.nix +++ b/pkgs/development/python-modules/diffusers/default.nix @@ -1,6 +1,5 @@ { lib, - stdenv, buildPythonPackage, pythonOlder, fetchFromGitHub, @@ -36,6 +35,7 @@ torchsde, transformers, pythonAtLeast, + diffusers, }: buildPythonPackage rec { @@ -87,8 +87,10 @@ buildPythonPackage rec { pythonImportsCheck = [ "diffusers" ]; - # tests crash due to torch segmentation fault - doCheck = !(stdenv.isLinux && stdenv.isAarch64); + # it takes a few hours + doCheck = false; + + passthru.tests.pytest = diffusers.overridePythonAttrs { doCheck = true; }; nativeCheckInputs = [ parameterized