comfyui mostly done

This commit is contained in:
atagen 2024-10-18 14:16:35 +11:00
parent ca53366fd0
commit 58243274cd
23 changed files with 1148 additions and 114 deletions

View file

@ -0,0 +1,21 @@
{
pkgs,
src,
python3Packages,
...
}: let
inherit (python3Packages) numba colour-science rembg pixeloe transparent-background;
in
pkgs.stdenvNoCC.mkDerivation {
pname = "comfyui-essentials";
version = "dev-${builtins.toString src.lastModified}";
src = src;
propagatedBuildInputs = [
numba
colour-science
rembg
pixeloe
transparent-background
];
}

92
flakes/ComfyUI-Plugins/flake.lock generated Normal file
View file

@ -0,0 +1,92 @@
{
"nodes": {
"essentials": {
"flake": false,
"locked": {
"lastModified": 1728478639,
"narHash": "sha256-JFkrtxLXx9wyJ5ZUlnXX+U5NGh5agiz0VOHQ5SA6jTs=",
"owner": "cubiq",
"repo": "ComfyUI_essentials",
"rev": "f320ada61353c14e9d506592e20397398be6b952",
"type": "github"
},
"original": {
"owner": "cubiq",
"repo": "ComfyUI_essentials",
"type": "github"
}
},
"gguf": {
"flake": false,
"locked": {
"lastModified": 1728958305,
"narHash": "sha256-XJwWx9gm1Qo/B4t7olPajJlPqKJvciTRpB+9fyf8aXQ=",
"owner": "city96",
"repo": "ComfyUI-GGUF",
"rev": "68ad5fb2149ead7e4978f83f14e045ecd812a394",
"type": "github"
},
"original": {
"owner": "city96",
"repo": "ComfyUI-GGUF",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1728888510,
"narHash": "sha256-nsNdSldaAyu6PE3YUA+YQLqUDJh+gRbBooMMekZJwvI=",
"path": "/nix/store/xnjw9gmfmpppdj6bxpw6cfkspc3h6xwl-source",
"rev": "a3c0b3b21515f74fd2665903d4ce6bc4dc81c77c",
"type": "path"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"openpose": {
"flake": false,
"locked": {
"lastModified": 1685841563,
"narHash": "sha256-GUjs8mIUFAbjJEVL+EsT44HG42mAiumKOBlBas1xxrM=",
"owner": "space-nuko",
"repo": "ComfyUI-OpenPose-Editor",
"rev": "4d8fe730acdb11ab2fcd592129d91d338d270adf",
"type": "github"
},
"original": {
"owner": "space-nuko",
"repo": "ComfyUI-OpenPose-Editor",
"type": "github"
}
},
"root": {
"inputs": {
"essentials": "essentials",
"gguf": "gguf",
"nixpkgs": "nixpkgs",
"openpose": "openpose",
"tensorrt": "tensorrt"
}
},
"tensorrt": {
"flake": false,
"locked": {
"lastModified": 1728519788,
"narHash": "sha256-tqiodF60IVlmvJknYxEwL0U7GIrrfl49k6Tg+8jGRVU=",
"owner": "comfyanonymous",
"repo": "ComfyUI_TensorRT",
"rev": "5bcc3f1e5c2424bb20bcb586e340c25ebe4a954f",
"type": "github"
},
"original": {
"owner": "comfyanonymous",
"repo": "ComfyUI_TensorRT",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

View file

@ -0,0 +1,48 @@
{
inputs = {
gguf = {
url = "github:city96/ComfyUI-GGUF";
flake = false;
};
tensorrt = {
url = "github:comfyanonymous/ComfyUI_TensorRT";
flake = false;
};
# needs some deps packaged
# essentials = {
# url = "github:cubiq/ComfyUI_essentials";
# flake = false;
# };
openpose = {
url = "github:space-nuko/ComfyUI-OpenPose-Editor";
flake = false;
};
};
outputs = {
self,
nixpkgs,
...
}: let
pkgs = import nixpkgs {
system = "x86_64-linux";
};
inherit (pkgs) lib callPackage;
inherit (builtins) mapAttrs;
filteredInputs = lib.filterAttrs (n: v: n != "nixpkgs") self.inputs;
in {
overlays.comfyui-plugins = final: prev: {
comfyui-plugins =
mapAttrs
(name: value: final.callPackage ./${name}/default.nix {src = value;})
filteredInputs;
};
packages.x86_64-linux =
mapAttrs
(name: value: callPackage ./${name}/default.nix {src = value;})
filteredInputs;
};
}

View file

@ -0,0 +1,21 @@
{
pkgs,
src,
python3Packages,
...
}: let
inherit (python3Packages) gguf numpy;
in
pkgs.stdenvNoCC.mkDerivation {
pname = "comfyui-gguf";
version = "dev-${builtins.toString src.lastModified}";
src = src;
propagatedBuildInputs = [
gguf
numpy
];
installPhase = ''
mkdir -p $out
cp -r * $out/
'';
}

View file

@ -0,0 +1,19 @@
{
pkgs,
src,
...
}:
pkgs.stdenvNoCC.mkDerivation {
pname = "comfyui-openpose-editor";
version = "dev-${builtins.toString src.lastModified}";
inherit src;
patches = [
./openpose_no_update.patch
];
installPhase = ''
mkdir -p $out
cp -r * $out/
'';
}

View file

@ -0,0 +1,12 @@
diff --git a/__init__.py b/__init__.py
index e4cf8bb..7d8f894 100644
--- a/__init__.py
+++ b/__init__.py
@@ -35,6 +35,6 @@ def update_javascript():
shutil.copy(src_file, dst_file)
-update_javascript()
+# update_javascript()
print('\033[34mOpenPose Editor: \033[92mLoaded\033[0m')

View file

@ -0,0 +1,23 @@
{
pkgs,
src,
python3Packages,
...
}: let
inherit (python3Packages) tensorrt onnx;
in
pkgs.stdenvNoCC.mkDerivation {
pname = "comfyui-tensorrt";
version = "dev-${builtins.toString src.lastModified}";
src = src;
propagatedBuildInputs = [
tensorrt
onnx
];
installPhase = ''
mkdir -p $out
cp -r * $out
'';
}