Compare commits

22 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
Reviewed-on: luis/my-pkgs#4
2026-08-11 22:24:35 +02:00
Hermes d09d7ca371 Allow unfree (CUDA EULA) for comfyui package 2026-08-11 20:18:22 +00:00
Hermes a9fe1463ba Bump nixpkgs to 2026-08-05 (comfyui deps) 2026-08-11 18:51:10 +00:00
Hermes b73c7f4c84 Rename comfyui package.nix to default.nix (my-pkgs convention) 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
Reviewed-on: luis/my-pkgs#3
2026-08-09 13:57:09 +02:00
Hermes fee16ce4e7 Remove anisette-v3-server package (use public SideStore instances) 2026-08-09 11:52:29 +00:00
luis 50c86089d1 Merge pull request 'Fix anisette-v3-server provisioning: add libplist runtime dep' (#2) from hermes-agent/my-pkgs:fix/anisette-libplist into main
Reviewed-on: luis/my-pkgs#2
2026-08-08 14:12:29 +02:00
Hermes 81de36baa2 Add libplist runtime dep via wrapper (fixes silent provisioning failure) 2026-08-08 12:01:40 +00:00
Hermes 463817d00c Use slf4d error(Exception) signature 2026-08-08 11:58:31 +00:00
Hermes a6931f7357 Fix diagnostic log format 2026-08-08 11:55:41 +00:00
Hermes 6e5860a851 TEMP: log swallowed provisioning exception for diagnosis 2026-08-08 11:52:47 +00:00
Hermes 59fcec2e6d Build with static D runtime config (matches reference Dockerfile) 2026-08-08 11:52:14 +00:00
Hermes ae00243185 Add libplist runtime dep (plist-d dlopens it; fixes silent provisioning failure) 2026-08-08 11:44:40 +00:00
luis 9e8e8c6a56 Merge pull request 'Add anisette-v3-server package (SideStore anisette server)' (#1) from hermes-agent/my-pkgs:anisette-v3-server into main
Reviewed-on: luis/my-pkgs#1
2026-08-08 12:50:07 +02:00
Hermes af8d36af8b Add installPhase to place the built binary 2026-08-08 10:13:50 +00:00
Hermes 6f0b029440 Import nixpkgs with permittedInsecurePackages config 2026-08-08 09:46:45 +00:00
Hermes afc9ae8cc5 Allow insecure openssl_1_1 at flake nixpkgs config level 2026-08-08 09:46:31 +00:00
Hermes ba1652dab4 Allow insecure openssl_1_1 (build-time link only) 2026-08-08 09:46:13 +00:00
Hermes adcc79ac9e Use openssl_1_1 (vibe-d 0.9.8 TLS needs removed OpenSSL 3 symbols) 2026-08-08 09:46:01 +00:00
Hermes 54cddab7cc Add zlib and openssl buildInputs for linking 2026-08-08 09:43:06 +00:00
Hermes 3c8725287c Add anisette-v3-server package (SideStore anisette server) 2026-08-08 09:39:13 +00:00
6 changed files with 212 additions and 4 deletions
Generated
+3 -3
View File
@@ -20,11 +20,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1770169770, "lastModified": 1785974313,
"narHash": "sha256-awR8qIwJxJJiOmcEGgP2KUqYmHG4v/z8XpL9z8FnT1A=", "narHash": "sha256-THaS9gDPvaJwHx7QXHzgjZ9nNFynRgSskkQVLUwz6xI=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "aa290c9891fa4ebe88f8889e59633d20cc06a5f2", "rev": "4a4273bc81acc0b242758a99733b721f928b90ff",
"type": "github" "type": "github"
}, },
"original": { "original": {
+6 -1
View File
@@ -24,7 +24,12 @@
flake-utils.lib.eachDefaultSystem ( flake-utils.lib.eachDefaultSystem (
system: system:
let let
pkgs = nixpkgs.legacyPackages.${system}; # Allow the CUDA EULA packages (cuda_nvcc, etc.) needed by the
# CUDA-enabled comfyui package.
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
in in
{ {
packages = import ./pkgs { packages = import ./pkgs {
+1
View File
@@ -5,6 +5,7 @@ in
{ {
inherit (packages) inherit (packages)
audiveris audiveris
comfyui
example-a example-a
example-b example-b
pyzotero pyzotero
+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
View File
@@ -4,6 +4,7 @@
let let
self = { self = {
audiveris = pkgs.callPackage ./audiveris { }; audiveris = pkgs.callPackage ./audiveris { };
comfyui = pkgs.callPackage ./comfyui { };
dolos = pkgs.callPackage ./dolos { nodejs = pkgs.nodejs_22; }; dolos = pkgs.callPackage ./dolos { nodejs = pkgs.nodejs_22; };
eqc = pkgs.callPackage ./eqc { }; eqc = pkgs.callPackage ./eqc { };
example-a = pkgs.callPackage ./example-a { }; example-a = pkgs.callPackage ./example-a { };