feat(nixified-ai): configure comfyui cuda model support

This commit is contained in:
2026-04-17 13:14:48 -07:00
committed by Kat Huang
parent 522491383b
commit f96b363dbb
2 changed files with 28 additions and 8 deletions

View File

@@ -1,11 +1,22 @@
{ inputs, config, specialArgs, ... }:
{ inputs, config, pkgs, specialArgs, ... }:
specialArgs.makeEnable config "myModules.nixified-ai" false {
imports = [
inputs.nixified-ai.nixosModules.comfyui
];
imports = [
inputs.nixified-ai.nixosModules.comfyui
];
services.comfyui = {
enable = true;
host = "0.0.0.0";
};
services.comfyui = {
enable = true;
host = "0.0.0.0";
acceleration = "cuda";
models = [
(pkgs.fetchurl {
name = "lustifySDXLNSFW_v20-inpainting.safetensors";
url = "https://huggingface.co/andro-flock/LUSTIFY-SDXL-NSFW-checkpoint-v2-0-INPAINTING/resolve/main/lustifySDXLNSFW_v20-inpainting.safetensors";
hash = "sha256-YV8hBx9c6PkWQNIlJTGQTOuL+HNmGVIavuSdlKX434Q=";
passthru = {
comfyui.installPaths = [ "checkpoints" ];
};
})
];
};
}

View File

@@ -75,6 +75,15 @@ in
dontCheckRuntimeDeps = true;
});
magma = prev.magma.overrideAttrs (oldAttrs: {
# The CUDA codegen step in magma 2.9.0 can segfault when `make generate`
# fans out across all cores. Keep the rest of the build parallel.
preConfigure = builtins.replaceStrings
[ "make -j$NIX_BUILD_CORES generate" ]
[ "make -j1 generate" ]
oldAttrs.preConfigure;
});
# XXX: codex and claude-code are now provided by flakes in nix.nix
# See the overlay at the end of nixpkgs.overlays in nix.nix