Skip to content

Commit

Permalink
feat: ✨ added a way to export the node list
Browse files Browse the repository at this point in the history
This is still wip to see what could fit ComfyUI-manager
  • Loading branch information
melMass committed Jul 18, 2023
1 parent 6168b3a commit 702f6d4
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
5 changes: 5 additions & 0 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import importlib
import os
import ast
import json

NODE_CLASS_MAPPINGS = {}
NODE_DISPLAY_NAME_MAPPINGS = {}
Expand Down Expand Up @@ -114,6 +115,10 @@ def load_nodes():
# TODO: I removed this, I find it more convenient to write without spaces, but it breaks every of my workflows
# TODO (cont): and until I find a way to automate the conversion, I'll leave it like this

if os.environ.get("MTB_EXPORT"):
with open(here / "node_list.json", "w") as f:
f.write(json.dumps(NODE_CLASS_MAPPINGS_DEBUG, indent=4))

log.info(
f"Loaded the following nodes:\n\t"
+ "\n\t".join(
Expand Down
45 changes: 45 additions & 0 deletions node_list.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"Smart Step (mtb)": "Utils to control the steps start/stop of the KAdvancedSampler in percentage",
"Text To Image (mtb)": "Utils to convert text to image using a font\n\n\n The tool looks for any .ttf file in the Comfy folder hierarchy.\n ",
"Styles Loader (mtb)": "Load csv files and populate a dropdown from the rows (\u00e0 la A111)",
"B Box From Mask (mtb)": "From a mask extract the bounding box",
"Bounding Box (mtb)": "The bounding box (BBOX) custom type used by other nodes",
"Crop (mtb)": "Crops an image and an optional mask to a given bounding box\n\n The bounding box can be given as a tuple of (x, y, width, height) or as a BBOX type\n The BBOX input takes precedence over the tuple input\n ",
"Uncrop (mtb)": "Uncrops an image to a given bounding box\n\n The bounding box can be given as a tuple of (x, y, width, height) or as a BBOX type\n The BBOX input takes precedence over the tuple input",
"Deep Bump (mtb)": "Normal & height maps generation from single pictures",
"Restore Face (mtb)": "Uses GFPGan to restore faces",
"Load Face Enhance Model (mtb)": "Loads a GFPGan or RestoreFormer model for face enhancement.",
"Face Swap (mtb)": "Face swap using deepinsight/insightface models",
"Load Face Swap Model (mtb)": "Loads a faceswap model",
"Qr Code (mtb)": "Basic QR Code generator",
"Mtb Examples (mtb)": "MTB Example Images",
"Save Tensors (mtb)": "Debug node that will probably be removed in the future",
"String Replace (mtb)": "Basic string replacement",
"Load Film Model (mtb)": "Loads a FILM model",
"Film Interpolation (mtb)": "Google Research FILM frame interpolation for large motion",
"Export To Prores (mtb)": "Export to ProRes 4444 (Experimental)",
"Concat Images (mtb)": "Add images to batch",
"Get Batch From History (mtb)": "Experimental node to load images from the history of the server.\n\n Queue item without output are ignore in the count.",
"Color Correct (mtb)": "Various color correction methods",
"Hsv To Rgb (mtb)": "Convert HSV image to RGB",
"Rgb To Hsv (mtb)": "Convert RGB image to HSV",
"Image Compare (mtb)": "Compare two images and return a difference image",
"Denoise (mtb)": "Denoise an image using total variation minimization.",
"Blur (mtb)": "Blur an image using a Gaussian filter.",
"Deglaze Image (mtb)": "Remove adversarial noise from images",
"Mask To Image (mtb)": "Converts a mask (alpha) to an RGB image with a color and background",
"Colored Image (mtb)": "Constant color image of given size",
"Image Premultiply (mtb)": "Premultiply image with mask",
"Image Resize Factor (mtb)": "Extracted mostly from WAS Node Suite, with a few edits (most notably multiple image support) and less features.",
"Save Image Grid (mtb)": "Save all the images in the input batch as a grid of images.",
"Load Image From Url (mtb)": "Load an image from the given URL",
"Latent Transform (mtb)": "Dumb attempt at reproducing some deforum like motion",
"Latent Noise (mtb)": "Inject noise into latent space",
"Latent Lerp (mtb)": "Linear interpolation (blend) between two latent vectors",
"Image Remove Background Rembg (mtb)": "Removes the background from the input using Rembg.",
"Float To Number (mtb)": "Node addon for the WAS Suite. Converts a \"comfy\" FLOAT to a NUMBER.",
"Int To Bool (mtb)": "Basic int to bool conversion",
"Int To Number (mtb)": "Node addon for the WAS Suite. Converts a \"comfy\" INT to a NUMBER.",
"Load Image Sequence (mtb)": "Load an image sequence from a folder. The current frame is used to determine which image to load.\n\n Usually used in conjunction with the `Primitive` node set to increment to load a sequence of images from a folder.\n Use -1 to load all matching frames as a batch.\n ",
"Save Image Sequence (mtb)": "Save an image sequence to a folder. The current frame is used to determine which image to save.\n\n This is merely a wrapper around the `save_images` function with formatting for the output folder and filename.\n "
}

0 comments on commit 702f6d4

Please sign in to comment.