1 #!/usr/bin/env python3 2 3 import subprocess 4 import os 5 from shutil import rmtree, copytree, ignore_patterns 6 from glob import glob 7 import time 8 import re
43 copytree(DIR_SRC_WEB, DIR_WEB, ignore=ignore_patterns("typings*", "*.ts", "*.scss")) 44 log_step(status="Done") 45 46 log_step(msg='TypeScript') 47 checked = subprocess.run(["node", "./node_modules/typescript/bin/tsc"], check=True) 48 log_step(status="Done") 49 50 scsss = glob(os.path.join(DIR_SRC_WEB, "**", "*.scss"), recursive=True)
43 copytree(DIR_SRC_WEB, DIR_WEB, ignore=ignore_patterns("typings*", "*.ts", "*.scss")) 44 log_step(status="Done") 45 46 log_step(msg='TypeScript') 47 checked = subprocess.run(["node", "./node_modules/typescript/bin/tsc"], check=True) 48 log_step(status="Done") 49 50 scsss = glob(os.path.join(DIR_SRC_WEB, "**", "*.scss"), recursive=True)
54 for scss in scsss: 55 out = scss.replace('src_web', 'web').replace('.scss', '.css') 56 cmds.append(f'{scss}:{out}') 57 cmds.append('--no-source-map') 58 checked = subprocess.run(cmds, check=True) 59 log_step(status="Done") 60 61 # Handle the common directories. Because ComfyUI loads under /extensions/rgthree-comfy we can't
93 nodes.append('display_int') 94 95 print() 96 adjs = ['exciting', 'extraordinary', 'epic', 'fantastic', 'magnificent'] 97 log(f'Loaded {len(nodes)} {random.choice(adjs)} nodes.', color='BRIGHT_GREEN') 98 99 # Alright, I don't like doing this, but until https://github.com/comfyanonymous/ComfyUI/issues/1502 100 # and/or https://github.com/comfyanonymous/ComfyUI/pull/1503 is pulled into ComfyUI, we need a way
3 # A nicer output for git pulling custom nodes (and ComfyUI). 4 # Quick shell version: ls | xargs -I % sh -c 'echo; echo %; git -C % pull' 5 6 import os 7 from subprocess import Popen, PIPE, STDOUT 8 9 10 def pull_path(path):
7 from subprocess import Popen, PIPE, STDOUT 8 9 10 def pull_path(path): 11 p = Popen(["git", "-C", path, "pull"], stdout=PIPE, stderr=STDOUT) 12 output, error = p.communicate() 13 return output.decode() 14
7 from subprocess import Popen, PIPE, STDOUT 8 9 10 def pull_path(path): 11 p = Popen(["git", "-C", path, "pull"], stdout=PIPE, stderr=STDOUT) 12 output, error = p.communicate() 13 return output.decode() 14
17 """ Gets a new random seed from the rgthree_seed_random_state and resetting the previous state.""" 18 global rgthree_seed_random_state 19 prev_random_state = random.getstate() 20 random.setstate(rgthree_seed_random_state) 21 seed = random.randint(1, 1125899906842624) 22 rgthree_seed_random_state = random.getstate() 23 random.setstate(prev_random_state) 24 return seed