Skip to content

Instantly share code, notes, and snippets.

View christian-byrne's full-sized avatar

bymyself christian-byrne

  • 04:06 (UTC -07:00)
View GitHub Profile
@christian-byrne
christian-byrne / rename-node.js
Created June 25, 2024 22:38
Patch node names without breaking workflows
import { app } from "../../scripts/app.js";
app.registerExtension({
name: "Extension Name",
beforeConfigureGraph: (graphData, missingNodeTypes) => {
for (let node of graphData.nodes) {
if (node.type === "Old Name") {
node.type = "New Name";
}
}
},
import torch
import numpy as np
from PIL import Image, ImageOps, ImageSequence
def load_image(image):
# image is a path
# image_path = folder_paths.get_annotated_filepath(image)
# img = node_helpers.pillow(Image.open, image_path)
"""Edit the constants below and run the script to live-edit your code.
The EXEC_CMD is re-run anytime a file in the WATCH_DIR is changed.
For best results, create a development virtual environment with minimal
extensions/nodes/dependcies."""
import subprocess
import os
import time