oops it's been a minute

This commit is contained in:
atagen 2024-11-06 09:53:19 +11:00
parent 5f434b1979
commit 55013f738c
22 changed files with 468 additions and 323 deletions

View file

@ -1,29 +1,13 @@
{
"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=",
"lastModified": 1729651119,
"narHash": "sha256-1TLoQS8rcJ5Y4VcWk3mAGg7/+jnjF/VN9QkhU99nCC4=",
"owner": "city96",
"repo": "ComfyUI-GGUF",
"rev": "68ad5fb2149ead7e4978f83f14e045ecd812a394",
"rev": "6561064dcfb3dfa638e3739506acfd34924e1cc5",
"type": "github"
},
"original": {
@ -34,10 +18,10 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1728888510,
"narHash": "sha256-nsNdSldaAyu6PE3YUA+YQLqUDJh+gRbBooMMekZJwvI=",
"path": "/nix/store/xnjw9gmfmpppdj6bxpw6cfkspc3h6xwl-source",
"rev": "a3c0b3b21515f74fd2665903d4ce6bc4dc81c77c",
"lastModified": 1729880355,
"narHash": "sha256-RP+OQ6koQQLX5nw0NmcDrzvGL8HDLnyXt/jHhL1jwjM=",
"path": "/nix/store/wb6agba4kfsxpbnb5hzlq58vkjzvbsk6-source",
"rev": "18536bf04cd71abd345f9579158841376fdd0c5a",
"type": "path"
},
"original": {
@ -63,7 +47,6 @@
},
"root": {
"inputs": {
"essentials": "essentials",
"gguf": "gguf",
"nixpkgs": "nixpkgs",
"openpose": "openpose",

View file

@ -15,5 +15,6 @@ pkgs.stdenvNoCC.mkDerivation {
installPhase = ''
mkdir -p $out
cp -r * $out/
cp js/* $out/
'';
}

View file

@ -5,13 +5,34 @@
comfyui,
comfy_dir ? "/run/user/1000/comfyui/",
spandrel,
plugins ? config.comfyui.plugins,
plugins ? config.comfyui.plugins or [],
...
}: let
inherit (pkgs) python3;
python = python3.withPackages (
ps:
with ps; [
inherit
(pkgs.python3Packages)
torch
torchsde
torchvision
torchaudio
einops
transformers
tokenizers
sentencepiece
safetensors
aiohttp
pyyaml
pillow
scipy
tqdm
psutil
kornia
soundfile
;
python = python3.buildEnv.override {
extraLibs =
[
torch
torchsde
torchvision
@ -31,8 +52,32 @@
soundfile
spandrel
] ++ plugins
);
]
++ plugins;
};
# python = python3.withPackages (
# ps:
# with ps; [
# torch
# torchsde
# torchvision
# torchaudio
# einops
# transformers
# tokenizers
# sentencepiece
# safetensors
# aiohttp
# pyyaml
# pillow
# scipy
# tqdm
# psutil
# kornia
# soundfile
# spandrel
# ]
# );
in
pkgs.stdenvNoCC.mkDerivation {
name = "comfyui";

View file

@ -3,11 +3,11 @@
"comfyui": {
"flake": false,
"locked": {
"lastModified": 1729105110,
"narHash": "sha256-M/by34k6P4Sj/dfsW1FdVRZmaTHxZ0mMX/cuYXIPeaw=",
"lastModified": 1730402285,
"narHash": "sha256-Al5oTuy6LsVpfOLHJ6YkY1Suc3HEXc8eR7jKJszli5c=",
"owner": "comfyanonymous",
"repo": "ComfyUI",
"rev": "7390ff3b1ec2e15017ba4a52d6eaabc4aa4636e3",
"rev": "cc9cf6d1bd957d764ad418258b61d7e08187573b",
"type": "github"
},
"original": {
@ -18,10 +18,10 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1728492678,
"narHash": "sha256-9UTxR8eukdg+XZeHgxW5hQA9fIKHsKCdOIUycTryeVw=",
"path": "/nix/store/60sn02zhawl3kwn0r515zff3h6hg6ydz-source",
"rev": "5633bcff0c6162b9e4b5f1264264611e950c8ec7",
"lastModified": 1729880355,
"narHash": "sha256-RP+OQ6koQQLX5nw0NmcDrzvGL8HDLnyXt/jHhL1jwjM=",
"path": "/nix/store/wb6agba4kfsxpbnb5hzlq58vkjzvbsk6-source",
"rev": "18536bf04cd71abd345f9579158841376fdd0c5a",
"type": "path"
},
"original": {

View file

@ -25,6 +25,7 @@ in {
};
config = lib.mkIf cfg.enable {
home.packages = [
# pkgs.comfyui
(pkgs.comfyui.override {
comfy_dir = getStorage;
plugins = cfg.plugins;

View file

@ -0,0 +1,8 @@
{
pkgs,
src,
...
}:
pkgs.stdenvNoCC.mkDerivation {
inherit src;
}

View file

@ -0,0 +1,10 @@
{
outputs = { nixpkgs, ... }: let
pkgs = import nixpkgs {};
in {
packages.x86_64-linux.meat = pkgs.callPackage ./default.nix;
};
}

138
flakes/murex-meat/meat.mx Executable file
View file

@ -0,0 +1,138 @@
#!/usr/bin/env murex
config: set proc force-tty true
config: set proc strict-types true
args meat_args %{
AllowAdditional: true
Flags: {
--all: bool
-a: --all
}
}
catch {
err $meat_args.error
exit 1
}
function meat {
if { is-null $ENV.FLAKE } {
meat_print(NO RECIPE FOUND)
exit
}
$pd = $PWD
cd $ENV.FLAKE
meat_print "----- MEAT ----------------------------------------" true
$a = $args[Additional]
if { $a -> len } then {
meat_parse_cmd $a
} else {
meat_print_help
}
meat_print "---------------------------------------------------" true
cd $pd
}
function meat_print (t: str, !title: bool [false]) {
if {$title} {
out (
$t
)
} else {
out (
$t
)
}
}
function meat_parse_cmd (args: json) {
out args $args
out arglen $args -> count
out argscast $args -> cast json
out argscast $args -> cast json -> count
$cmd = $args[ 0 ]
out cmd $cmd
if { ${$args -> len} > 1 } then {
$opts = ${$args -> ![ 0 ]}
}
out opts $opts
switch $cmd {
case "yum" {
meat_print (CONSUMING DELICIOUS MEATS..)
nh os switch @opts
}
case "poke" {
meat_print (PREPARING SUSPICIOUS MEATS..)
nh os test @opts
}
case "cook" {
meat_print (PREPARING MEATS..)
nh os build @opts
}
case "fresh" {
meat_print (PROCESSING FRESH MEATS..)
meat_do_fresh $opts
}
case "look" {
meat_print (INSPECTING MEAT..)
nix flake info @opts
}
case "gut" {
meat_print (CLEANING MEAT STORES..)
nh clean all @opts
}
default { meat_print_help }
}
}
function meat_print_help {
out ( FRESH - HUNT LATEST MEATS
..N - HUNT LATEST SUBMEATS OF N
..-A - HUNT ALL SUBMEATS
YUM - CONSUME DELICIOUS MEATS
COOK - ONLY PREPARE MEATS
POKE - TASTE SUSPICIOUS MEATS
GUT - CLEAN MEAT STORES
LOOK - INSPECT MEAT)
}
function meat_do_fresh (!opts: str) {
# handle --all flag
if { $GLOBAL.args.flags.all } then {
recursive_update $ENV.FLAKE/flakes
cd $ENV.FLAKE
nix flake update
}
if { $opts } then {
# handle specified subflakes
$opts -> foreach subflake {
meat_print "GET NEW MEAT FOR $(subflake).."
recursive_update $ENV.FLAKE/flakes/$subflake
cd $ENV.FLAKE
nix flake update $subflake
}
}
# simple update
nix flake update
}
function recursive_update (path: str) {
if { $path.Exists } {
cd $path
# update subflakes
g */flake.nix -> foreach dir { recursive_update $dir }
# update this flake
$isflake = ${g flake.nix -> count} > 0
if { $isflake } then {
nix flake update
}
} else {
err "No such subflake at $path"
exit 1
}
}
$GLOBAL.args = $meat_args
meat

View file

@ -1,29 +1,11 @@
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1726560853,
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1728018373,
"narHash": "sha256-NOiTvBbRLIOe5F6RbHaAh6++BNjsb149fGZd1T4+KBg=",
"path": "/nix/store/sdzpqjwx7pdx6lsq6llyfqqf7hspp83c-source",
"rev": "bc947f541ae55e999ffdb4013441347d83b00feb",
"lastModified": 1729880355,
"narHash": "sha256-RP+OQ6koQQLX5nw0NmcDrzvGL8HDLnyXt/jHhL1jwjM=",
"path": "/nix/store/wb6agba4kfsxpbnb5hzlq58vkjzvbsk6-source",
"rev": "18536bf04cd71abd345f9579158841376fdd0c5a",
"type": "path"
},
"original": {
@ -33,7 +15,6 @@
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs",
"src": "src"
}
@ -53,21 +34,6 @@
"repo": "murex-module-jump",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",

View file

@ -2,10 +2,10 @@
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1728241625,
"narHash": "sha256-yumd4fBc/hi8a9QgA9IT8vlQuLZ2oqhkJXHPKxH/tRw=",
"path": "/nix/store/rs4fjbnw4qx7ns2hzzrz2iz52va7vs5z-source",
"rev": "c31898adf5a8ed202ce5bea9f347b1c6871f32d1",
"lastModified": 1729880355,
"narHash": "sha256-RP+OQ6koQQLX5nw0NmcDrzvGL8HDLnyXt/jHhL1jwjM=",
"path": "/nix/store/wb6agba4kfsxpbnb5hzlq58vkjzvbsk6-source",
"rev": "18536bf04cd71abd345f9579158841376fdd0c5a",
"type": "path"
},
"original": {