Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 🚀 release 0.2.0 #109

Merged
merged 14 commits into from
Nov 4, 2023
6 changes: 0 additions & 6 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
- [ComfyUI Manager](#comfyui-manager)
- [Virtual Env](#virtual-env)
- [Models Download](#models-download)
- [Web Extensions](#web-extensions)
- [Old installation method (MANUAL)](#old-installation-method-manual)
- [Dependencies](#dependencies)

Expand Down Expand Up @@ -35,11 +34,6 @@ then follow the prompt or just press enter to download every models.
python scripts/download_models.py -y
```

### Web Extensions

On first run the script [tries to symlink](https://github.com/melMass/comfy_mtb/blob/d982b69a58c05ccead9c49370764beaa4549992a/__init__.py#L45-L61) the [web extensions](https://github.com/melMass/comfy_mtb/tree/main/web) to your comfy `web/extensions` folder. In case it fails you can manually copy the mtb folder to `ComfyUI/web/extensions` it only provides a color widget for now shared by a few nodes:

<img alt="color widget preview" src="https://github.com/melMass/comfy_mtb/assets/7041726/cff7e66a-4cc4-4866-b35b-10af0bb2d110" width=450>

## Old installation method (MANUAL)
### Dependencies
Expand Down
2 changes: 1 addition & 1 deletion __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
def extract_nodes_from_source(filename):
source_code = ""

with open(filename, "r") as file:
with open(filename, "r", encoding="utf8") as file:
source_code = file.read()

nodes = []
Expand Down
7 changes: 7 additions & 0 deletions errors.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class ModelNotFound(Exception):
def __init__(self, model_name, *args, **kwargs):
super().__init__(
f"The model {model_name} could not be found, make sure to download it using ComfyManager first.\nrepository: https://github.com/ltdrdata/ComfyUI-Manager",
*args,
**kwargs,
)
2 changes: 1 addition & 1 deletion examples/04-animation_builder-deforum.json

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion log.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import logging
import re
import os
import re

base_log_level = logging.DEBUG if os.environ.get("MTB_DEBUG") else logging.INFO

Expand Down Expand Up @@ -75,5 +75,7 @@ def cyan_text(text):


def get_label(label):
if label.startswith("MTB_"):
label = label[4:]
words = re.findall(r"(?:^|[A-Z])[a-z]*", label)
return " ".join(words).strip()
10 changes: 7 additions & 3 deletions node_list.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
"Animation Builder (mtb)": "Convenient way to manage basic animation maths at the core of many of my workflows",
"Any To String (mtb)": "Tries to take any input and convert it to a string",
"Batch Float (mtb)": "Generates a batch of float values with interpolation",
"Batch Float Assemble (mtb)": "Assembles mutiple batches of floats into a single stream (batch)",
"Batch Float Fill (mtb)": "Fills a batch float with a single value until it reaches the target length",
"Batch Make (mtb)": "Simply duplicates the input frame as a batch",
"Batch Float Assemble (mtb)": "Assembles mutiple batches of floats into a single stream (batch)",
"Batch Float Fill (mtb)": "Fills a batch float with a single value until it reaches the target length",
"Batch Make (mtb)": "Simply duplicates the input frame as a batch",
"Batch Merge (mtb)": "Merges multiple image batches with different frame counts",
"Batch Shake (mtb)": "Applies a shaking effect to batches of images.",
"Batch Shape (mtb)": "Generates a batch of 2D shapes with optional shading (experimental)",
"Batch Transform (mtb)": "Transform a batch of images using a batch of keyframes",
"Bbox (mtb)": "The bounding box (BBOX) custom type used by other nodes",
Expand Down Expand Up @@ -38,13 +40,15 @@
"Load Image From Url (mtb)": "Load an image from the given URL",
"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 ",
"Mask To Image (mtb)": "Converts a mask (alpha) to an RGB image with a color and background",
"Math Expression (mtb)": "Node to evaluate a simple math expression string",
"Model Patch Seamless (mtb)": "Uses the stable diffusion 'hack' to infer seamless images by setting the model layers padding mode to circular (experimental)",
"Qr Code (mtb)": "Basic QR Code generator",
"Restore Face (mtb)": "Uses GFPGan to restore faces",
"Save Gif (mtb)": "Save the images from the batch as a GIF",
"Save Image Grid (mtb)": "Save all the images in the input batch as a grid of images.",
"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 ",
"Save Tensors (mtb)": "Save torch tensors (image, mask or latent) to disk, useful to debug things outside comfy",
"Sharpen (mtb)": "Sharpens an image using a Gaussian kernel.",
"Smart Step (mtb)": "Utils to control the steps start/stop of the KAdvancedSampler in percentage",
"Stack Images (mtb)": "Stack the input images horizontally or vertically",
"String Replace (mtb)": "Basic string replacement",
Expand Down
Loading