Compare commits

..
7 Commits
Author SHA1 Message Date
luis 6de250cf1f Merge pull request 'Add comfyui package with CUDA-enabled torch' (#4) from hermes-agent/my-pkgs:feat/comfyui-cuda into main
CI / Build Packages (default) (push) Successful in 1m8s
CI / Nix Flake Check (push) Successful in 1m18s
CI / Build Packages (example-a) (push) Successful in 1m5s
CI / Build Packages (example-b) (push) Successful in 1m2s
CI / Build Packages (pyzotero-cli) (push) Successful in 1m14s
CI / Build Packages (pyzotero) (push) Successful in 1m18s
Reviewed-on: #4
2026-08-11 22:24:35 +02:00
Hermes d09d7ca371 Allow unfree (CUDA EULA) for comfyui package
CI / Build Packages (default) (pull_request) Successful in 1m12s
CI / Nix Flake Check (pull_request) Successful in 1m20s
CI / Build Packages (example-a) (pull_request) Successful in 1m3s
CI / Build Packages (example-b) (pull_request) Successful in 1m5s
CI / Build Packages (pyzotero) (pull_request) Successful in 1m12s
CI / Build Packages (pyzotero-cli) (pull_request) Successful in 1m14s
2026-08-11 20:18:22 +00:00
Hermes a9fe1463ba Bump nixpkgs to 2026-08-05 (comfyui deps)
CI / Build Packages (default) (pull_request) Successful in 1m9s
CI / Nix Flake Check (pull_request) Failing after 1m13s
CI / Build Packages (example-a) (pull_request) Successful in 1m6s
CI / Build Packages (example-b) (pull_request) Successful in 1m4s
CI / Build Packages (pyzotero) (pull_request) Successful in 1m13s
CI / Build Packages (pyzotero-cli) (pull_request) Successful in 1m18s
2026-08-11 18:51:10 +00:00
Hermes b73c7f4c84 Rename comfyui package.nix to default.nix (my-pkgs convention)
CI / Nix Flake Check (pull_request) Failing after 42s
CI / Build Packages (default) (pull_request) Successful in 49s
CI / Build Packages (example-a) (pull_request) Successful in 52s
CI / Build Packages (example-b) (pull_request) Successful in 48s
CI / Build Packages (pyzotero) (pull_request) Successful in 52s
CI / Build Packages (pyzotero-cli) (pull_request) Successful in 1m1s
2026-08-11 18:46:02 +00:00
Hermes 2a9101ae77 Add comfyui package with CUDA-enabled torch 2026-08-11 18:45:18 +00:00
luis 2db80a7778 Merge pull request 'Remove anisette-v3-server package (use public SideStore instances)' (#3) from hermes-agent/my-pkgs:chore/remove-anisette into main
CI / Nix Flake Check (push) Successful in 46s
CI / Build Packages (default) (push) Successful in 44s
CI / Build Packages (example-b) (push) Successful in 50s
CI / Build Packages (example-a) (push) Successful in 53s
CI / Build Packages (pyzotero) (push) Successful in 1m3s
CI / Build Packages (pyzotero-cli) (push) Successful in 1m6s
Reviewed-on: #3
2026-08-09 13:57:09 +02:00
Hermes fee16ce4e7 Remove anisette-v3-server package (use public SideStore instances)
CI / Nix Flake Check (pull_request) Successful in 50s
CI / Build Packages (default) (pull_request) Successful in 47s
CI / Build Packages (example-a) (pull_request) Successful in 46s
CI / Build Packages (example-b) (pull_request) Successful in 46s
CI / Build Packages (pyzotero) (pull_request) Successful in 53s
CI / Build Packages (pyzotero-cli) (pull_request) Successful in 1m24s
2026-08-09 11:52:29 +00:00
8 changed files with 209 additions and 169 deletions

No files matched your search

Generated
+3 -3
View File
@@ -20,11 +20,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1770169770,
"narHash": "sha256-awR8qIwJxJJiOmcEGgP2KUqYmHG4v/z8XpL9z8FnT1A=",
"lastModified": 1785974313,
"narHash": "sha256-THaS9gDPvaJwHx7QXHzgjZ9nNFynRgSskkQVLUwz6xI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "aa290c9891fa4ebe88f8889e59633d20cc06a5f2",
"rev": "4a4273bc81acc0b242758a99733b721f928b90ff",
"type": "github"
},
"original": {
+3 -4
View File
@@ -24,12 +24,11 @@
flake-utils.lib.eachDefaultSystem (
system:
let
# openssl_1_1 is EOL and marked insecure in nixpkgs, but it's only a
# build-time link dependency (vibe-d 0.9.8 TLS needs symbols removed in
# OpenSSL 3). The resulting binary statically links it.
# Allow the CUDA EULA packages (cuda_nvcc, etc.) needed by the
# CUDA-enabled comfyui package.
pkgs = import nixpkgs {
inherit system;
config.permittedInsecurePackages = [ "openssl-1.1.1w" ];
config.allowUnfree = true;
};
in
{
+1 -1
View File
@@ -4,8 +4,8 @@ let
in
{
inherit (packages)
anisette-v3-server
audiveris
comfyui
example-a
example-b
pyzotero
-52
View File
@@ -1,52 +0,0 @@
{
lib,
buildDubPackage,
fetchFromGitHub,
makeWrapper,
zlib,
openssl_1_1,
libplist,
}:
buildDubPackage rec {
pname = "anisette-v3-server";
version = "unstable-2026-08-01";
src = fetchFromGitHub {
owner = "Dadoum";
repo = "anisette-v3-server";
rev = "2ef18d7da2abe3a6d070aa478f774538b947aaa2";
hash = "sha256-G8loi2BTIRKamLeY8DiN4BLSrRxh13BNvs8bC2l9zNo=";
};
dubLock = ./dub-lock.json;
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ zlib openssl_1_1 ];
# libplist is dlopen'd at runtime by the plist-d C binding via dynamic-loader
# (libplist-2.0.so.3). It is NOT linked, so it does not land in the closure
# via buildInputs. Without it the ADI provisioning step throws
# LibraryLoadingException and the server serves unprovisioned data, so Apple
# rejects the login. Wrap the binary with LD_LIBRARY_PATH so dlopen finds it.
postFixup = ''
wrapProgram $out/bin/anisette-v3-server \
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libplist ]}
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin
install -Dm755 anisette-v3-server $out/bin/anisette-v3-server
runHook postInstall
'';
meta = {
description = "Anisette server implementing SideStore's anisette v3 protocol";
homepage = "https://github.com/Dadoum/anisette-v3-server";
license = lib.licenses.agpl3Only;
mainProgram = "anisette-v3-server";
platforms = lib.platforms.linux;
};
}
-108
View File
@@ -1,108 +0,0 @@
{
"dependencies": {
"automem": {
"version": "0.6.11",
"sha256": "0l3cbkji47p9myhdpmm83s4j8rjvdwkyln1hinlw1kzph4dgb5wn"
},
"cachetools": {
"version": "0.4.2",
"sha256": "0l24y3pwnwxdf1zkx7nxgiscf2ycyj4a4cqhy2qn9syvmdgy6rd4"
},
"diet-ng": {
"version": "1.8.4",
"sha256": "03c3pmc9w0s3yf1xipmiw5jiy3aifk6bby3z015vvn80s59mk18c"
},
"during": {
"version": "0.3.0",
"sha256": "1xkfwhvnr67k0vy664sadj0hjifbs0257cbfjw86jp7rvjkn0myi"
},
"dxml": {
"version": "0.4.4",
"sha256": "0p5vmkw29ksh5wdxz1ijms1wblq288pv15vnbl93z7q2vgnq995w"
},
"dynamic-loader": {
"version": "9202b389affa6be0740e7295dea8f0146537a784",
"repository": "https://github.com/Dadoum/dynamicloader.git",
"sha256": "0l2d7pd5r3crkvgi9i8fbcmcbzkw12syf1i7pnics75w1gk5f717"
},
"eventcore": {
"version": "0.9.38",
"sha256": "00hk3n75c7vvzggxlr9zclhy6n4fdjkm0f1jj5riymhznm3prmqi"
},
"libasync": {
"version": "0.8.6",
"sha256": "0hhk5asfdccby8ky77a25qn7dfmfdmwyzkrg3zk064bicmgdwlnj"
},
"memutils": {
"version": "1.0.10",
"sha256": "0hm31birbw59sw1bi9syjhbcdgwwwyyx6r9jg7ar9i6a74cjr52c"
},
"mir-linux-kernel": {
"version": "1.0.1",
"sha256": "0adyjpcgd65z44iydnrrrpjwbvmrm08a3pkcriqi7npqylfysqn6"
},
"openssl": {
"version": "3.4.0",
"sha256": "0y71p03v05v797bkk0b3sbdkncqb5ch3a48nxaly6dxfdz4w247m"
},
"openssl-static": {
"version": "1.0.5+3.0.8",
"sha256": "0wpqz29yrbbh39g3cwlgd6h6hh1msws7w5baw1kywdkgj761gx2k"
},
"plist": {
"version": "a425458e2c3d8195c6a9ad68e643f2d823850693",
"repository": "https://github.com/Dadoum/plist.git",
"sha256": "0174dpkkf8l235f8p0d1ql26646xd8y869ckz1xmg6rjc71vlvnc"
},
"plist-d": {
"version": "6fdaa60d62bbf7c55044069e8f03cbe74401c444",
"repository": "https://github.com/Dadoum/libplist-d.git",
"sha256": "00v556i9ky3r8dixa53dmy3dfbq19mih6fd7a38cjwpk6pvc1is2"
},
"provision": {
"version": "7717ce1f7b3c9779fe9982005d07b6665071a239",
"repository": "https://github.com/Dadoum/Provision.git",
"sha256": "0298v7m434vqdqjyfbz06yq5ksn1vylkrizdv39smk59xjdpqdk0"
},
"requests": {
"version": "2.2.0",
"sha256": "08bffhn9jbba1kvyi3fp1sg28cbdj49vvd3dga1s8q6zd679lnic"
},
"silly": {
"version": "1.1.1",
"sha256": "0fz7ib715sfk3w69i6xns5pwd4caahvfqjf32v13daxm1ms8xdzz"
},
"slf4d": {
"version": "2.1.1",
"sha256": "1ds9p4mrsfc7a94x5asgyp8hm53qix7yi92233yk1xd5qz5slp0a"
},
"stdx-allocator": {
"version": "2.77.5",
"sha256": "1g8382wr49sjyar0jay8j7y2if7h1i87dhapkgxphnizp24d7kaj"
},
"taggedalgebraic": {
"version": "1.0.1",
"sha256": "1xwczhidhb4d6lw342fwx8da4vdwryv9gq8p41bh7184300aafl9"
},
"test_allocator": {
"version": "0.3.4",
"sha256": "1xpjz6smxwgm4walrv3xbzi46cddc80q5n4gs7j9gm2yx11sf7gj"
},
"unit-threaded": {
"version": "2.2.3",
"sha256": "070qlnr33miyg6w6q8yvry8nnxng23vdklvbr94dmjrbplxb9fy8"
},
"vibe-container": {
"version": "1.7.1",
"sha256": "1fll4lwf2lrjwqlhgdfzwbnw1x3fk8r49329jj1clch6acspzf3m"
},
"vibe-core": {
"version": "2.13.3",
"sha256": "0iq65j0wan812lpq4d1zsqd2fjwbz8fnl3cagghqq4iq0wl3xlrv"
},
"vibe-d": {
"version": "0.9.8",
"sha256": "1gficgfzwswaxj9qlnca28c65gl7xq6q8y47qlf4m1gvkxj4ij2k"
}
}
}
+137
View File
@@ -0,0 +1,137 @@
{
lib,
callPackage,
cudaPackages_13,
fetchFromGitHub,
makeBinaryWrapper,
python3,
stdenvNoCC,
withManager ? false,
}:
let
# Same as nixpkgs comfyui, but with cudaSupport=true so torch builds with
# CUDA (the nixpkgs version only sets cudaPackages, not cudaSupport, so torch
# builds CPU-only and comfyui crashes with "Torch not compiled with CUDA").
python = python3.override {
self = python;
packageOverrides = final: prev: {
torch = prev.torch.override {
cudaSupport = true;
cudaPackages = cudaPackages_13;
};
triton = prev.triton.override {
cudaSupport = true;
cudaPackages = cudaPackages_13;
};
};
};
appDependencies =
ps:
with ps;
[
aiohttp
alembic
av
blake3
comfy-aimdo
comfy-angle
comfy-kitchen
comfyui-embedded-docs
comfyui-frontend-package
comfyui-workflow-templates
einops
filelock
kornia
numpy
pillow
psutil
pydantic
pydantic-settings
pyopengl
pyyaml
requests
safetensors
scipy
sentencepiece
simpleeval
spandrel
sqlalchemy
tokenizers
torch
torchaudio
torchsde
torchvision
tqdm
transformers
yarl
]
++ lib.optionals withManager [
ps.comfyui-manager
];
pythonEnv = python.withPackages appDependencies;
in
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "comfyui";
version = "0.30.1";
strictDeps = true;
__structuredAttrs = true;
src = fetchFromGitHub {
owner = "Comfy-Org";
repo = "ComfyUI";
tag = "v${finalAttrs.version}";
hash = "sha256-z8bBKnW2iF8WXI3Ju6Ei+8YpOWqmbUgYiErKiVBBwEk=";
};
nativeBuildInputs = [ makeBinaryWrapper ];
patches = [ ./use-writable-runtime-paths.patch ];
installPhase = ''
runHook preInstall
mkdir -p $out/share/comfyui $out/bin
cp -r . $out/share/comfyui
makeBinaryWrapper ${lib.getExe pythonEnv} $out/bin/comfyui \
--add-flag "$out/share/comfyui/main.py" \
--unset NIX_PYTHONPATH \
--unset PYTHONPATH
runHook postInstall
'';
doInstallCheck = true;
installCheckPhase = ''
runHook preInstallCheck
PYTHONPATH=${pythonEnv}/${python.sitePackages} ${lib.getExe python.pkgs.pip} install --break-system-packages --dry-run --no-index -r requirements.txt
"$out"/bin/comfyui --help
export XDG_DATA_HOME="$(mktemp -d)"
"$out"/bin/comfyui --cpu --quick-test-for-ci
runHook postInstallCheck
'';
passthru = {
inherit python pythonEnv;
}
// lib.optionalAttrs (!withManager) {
tests.withManager = callPackage ./package.nix {
withManager = true;
};
};
meta = {
description = "Modular diffusion model GUI, API, and backend with graph and nodes interface (CUDA-enabled)";
homepage = "https://github.com/Comfy-Org/ComfyUI";
changelog = "https://github.com/Comfy-Org/ComfyUI/releases/tag/v${finalAttrs.version}";
license = lib.licenses.gpl3Only;
mainProgram = "comfyui";
platforms = lib.platforms.linux;
};
})
@@ -0,0 +1,64 @@
diff --git a/comfy/cli_args.py b/comfy/cli_args.py
index 4bef096..30f8920 100644
--- a/comfy/cli_args.py
+++ b/comfy/cli_args.py
@@ -42,7 +42,15 @@ parser.add_argument("--tls-certfile", type=str, help="Path to TLS (SSL) certific
parser.add_argument("--enable-cors-header", type=str, default=None, metavar="ORIGIN", nargs="?", const="*", help="Enable CORS (Cross-Origin Resource Sharing) with optional origin or allow all with default '*'.")
parser.add_argument("--max-upload-size", type=float, default=100, help="Set the maximum upload size in MB.")
-parser.add_argument("--base-directory", type=str, default=None, help="Set the ComfyUI base directory for models, custom_nodes, input, output, temp, and user directories.")
+xdg_data_home = os.environ.get("XDG_DATA_HOME")
+if xdg_data_home is None:
+ home = os.environ.get("HOME")
+ if home is None:
+ xdg_data_home = "/var/lib"
+ else:
+ xdg_data_home = os.path.join(home, ".local", "share")
+comfyui_data_home = os.path.join(xdg_data_home, "comfyui")
+parser.add_argument("--base-directory", type=str, default=comfyui_data_home, help="Set the ComfyUI base directory for models, custom_nodes, input, output, temp, and user directories.")
parser.add_argument("--extra-model-paths-config", type=str, default=None, metavar="PATH", nargs='+', action='append', help="Load one or more extra_model_paths.yaml files.")
parser.add_argument("--output-directory", type=str, default=None, help="Set the ComfyUI output directory. Overrides --base-directory.")
parser.add_argument("--temp-directory", type=str, default=None, help="Set the ComfyUI temp directory (default is in the ComfyUI directory). Overrides --base-directory.")
@@ -235,9 +243,7 @@ parser.add_argument(
help="Set the base URL for the ComfyUI API. (default: https://api.comfy.org)",
)
-database_default_path = os.path.abspath(
- os.path.join(os.path.dirname(__file__), "..", "user", "comfyui.db")
-)
+database_default_path = os.path.join(comfyui_data_home, "user", "comfyui.db")
parser.add_argument("--database-url", type=str, default=f"sqlite:///{database_default_path}", help="Specify the database URL, e.g. for an in-memory database you can use 'sqlite:///:memory:'.")
parser.add_argument("--enable-assets", action="store_true", help="Enable the assets system (API routes, database synchronization, and background scanning).")
parser.add_argument("--enable-asset-hashing", action="store_true", help="Compute blake3 content hashes when scanning assets. Hashing enables future asset-portability features (deduplication, cross-machine model resolution) but adds startup cost and per-output cost on large models directories. Off by default; enable to opt in.")
diff --git a/folder_paths.py b/folder_paths.py
index 7304e1b..32a66c9 100644
--- a/folder_paths.py
+++ b/folder_paths.py
@@ -38,7 +38,8 @@ folder_names_and_paths["upscale_models"] = ([os.path.join(models_dir, "upscale_m
folder_names_and_paths["latent_upscale_models"] = ([os.path.join(models_dir, "latent_upscale_models")], supported_pt_extensions)
-folder_names_and_paths["custom_nodes"] = ([os.path.join(base_path, "custom_nodes")], set())
+custom_nodes_directory = os.path.join(base_path, "custom_nodes")
+folder_names_and_paths["custom_nodes"] = ([custom_nodes_directory], set())
folder_names_and_paths["hypernetworks"] = ([os.path.join(models_dir, "hypernetworks")], supported_pt_extensions)
@@ -107,11 +108,12 @@ def map_legacy(folder_name: str) -> str:
"clip": "text_encoders"}
return legacy.get(folder_name, folder_name)
-if not os.path.exists(input_directory):
- try:
- os.makedirs(input_directory)
- except:
- logging.error("Failed to create input directory")
+for default_directory in (input_directory, custom_nodes_directory):
+ if not os.path.exists(default_directory):
+ try:
+ os.makedirs(default_directory)
+ except:
+ logging.error(f"Failed to create {default_directory}")
def set_output_directory(output_dir: str) -> None:
global output_directory
+1 -1
View File
@@ -3,8 +3,8 @@
}:
let
self = {
anisette-v3-server = pkgs.callPackage ./anisette-v3-server { };
audiveris = pkgs.callPackage ./audiveris { };
comfyui = pkgs.callPackage ./comfyui { };
dolos = pkgs.callPackage ./dolos { nodejs = pkgs.nodejs_22; };
eqc = pkgs.callPackage ./eqc { };
example-a = pkgs.callPackage ./example-a { };