diff --git a/projects/invokeai/default.nix b/projects/invokeai/default.nix index cce8598..8cb64e2 100644 --- a/projects/invokeai/default.nix +++ b/projects/invokeai/default.nix @@ -29,6 +29,7 @@ invokeai-amd = { imports = [ config.flake.nixosModules.invokeai + ./nixos/amd.nix (packageModule "invokeai-amd") ]; }; diff --git a/projects/invokeai/nixos/amd.nix b/projects/invokeai/nixos/amd.nix new file mode 100644 index 0000000..d49aa27 --- /dev/null +++ b/projects/invokeai/nixos/amd.nix @@ -0,0 +1,12 @@ +{ pkgs, ... }: + +{ + systemd = { + # Allow "unsupported" AMD GPUs + services.invokeai.environment.HSA_OVERRIDE_GFX_VERSION = "10.3.0"; + # HACK: The PyTorch build we use on ROCm wants this to exist + tmpfiles.rules = [ + "L+ /opt/amdgpu - - - - ${pkgs.libdrm}" + ]; + }; +}