MaraScott / ComfyUI_MaraScott_Nodes

A set of community node including a universal bus and a large Upscaler/Refiner
https://www.marascott.ai/
Other
114 stars 15 forks source link
bus comfyui comfyui-nodes refiner upscaler

ComfyUI MaraScott Nodes

Turn ★ into ⭐ (top-right corner) if you like the project!

ComfyUI_MaraScott_nodes is an extension set designed to improve the readability of ComfyUI workflows and enhance output images for printing. It offers a Bus manager, an Upscaler/Refiner set of nodes for printing purposes, and an Inpainting set of nodes to fine-tune outputs.

NOTICE

AnyBus Node

McBoaty set

McInpainty set

Text Concatenation

Display Any - Text

Multiline to List

ForLoop (Open/Close)

Image to gradient

Installation

Installation [method1] via ComfyUI-Manager (recommended)

  1. Click the "Manager" button on the main menu.
  2. Click the "Custom Nodes Manager" button in the Menu.
  3. Search for "MaraScott" and click the "install" button.
  4. Restart ComfyUI.

Installation [method2] via GIT

To install ComfyUI_MaraScott_Nodes in addition to an existing installation of ComfyUI, follow these steps:

  1. Go to ComfyUI/custom_nodes directory in the terminal (cmd).
  2. git clone https://github.com/MaraScott/ComfyUI_MaraScott_Node.git
  3. Restart ComfyUI.

Changes

How To Use

AnyBus Node AKA UniversalBus Node

The AnyBus Node (AKA UniversalBus Node) is designed to provide a Universal Bus Node based on AnyType Input/Output.

Native Support

You can assume that any node input/output works like "UE Nodes / Use Everywhere" Nodes.

BUS Input/Output Support

Bus Nodes can be connected from one AnyBus Node to another, and we support the following Reroute Nodes as long as they are linked from an AnyBus Node before connecting to another.

Set/Get Node Supported:

Reroute Node Supported:

Reroute Node Not Supported:

AnyBus Node AnyBus Node with assigned profile and some inputs

AnyBus Node - Widget Qty AnyBus Node - Widget Profile

Here is a very simple workflow:

AnyBus Node Workflow Example

What does it intend to do?

Any workflow can quickly become messy and difficult to identify easily which output goes to which input. At some point, either you use a custom_node which "hides" the splines for you so you don't feel overwhelmed but will still have some issue identifying which goes where OR you use a Bus node like AnyBus which will clarify your workflow without having to remember the origins of your splines.

The AnyBus Node allows you to apply a profile to your Buses to organize paths in the same workflow. One Bus has a maximum of 25 inputs/outputs.

The profile setting

The BusNode profile is a mechanism to synchronize BusNodes in the same flow (connected by the Bus input/output). All nodes with the same profile name and connected will be synchronized if one of them is modified.

When adding a node, the profile is default. If you have another flow called main, for example, and you connect the bus output of the flow to the input of the default busnode, the main flow will synchronize the main input to the default one and change the profile name to main. This works only for the default node. If you have a node called TextFlow and try to connect main to TextFlow, the connection will be refused. This allows for multiple flows in the same workflow and avoids conflict.

This AnyBus is dyslexia-friendly :D

Text Concatenation

It is meant to allow you to concatenate up to 24 string inputs

image

Multiline to List

This return a multiline text as a text, a list of text 1 per line, a count of the number of lines

multiline 2 list

Display Any - Text

It is meant to display any content within the node + pass the input value as output allow you to use it within a ForLoopOpen/ForLoopClose workflow

image

For Loop (Open/Close)

These two nodes allow you to build loops within your workflow and subloops too in order to limitate the needs to repeats sequences in your workflows

a Loop

image

a loop and its sub Loop

image

McBoaty Node Set (Upscaler, Prompter, Refiner)

McBoaty Node Set (AKA Upscaler, Prompter, Refiner Node set) is an upscaler coupled with a refiner to achieve higher rendering results on a per-tile basis.

You can follow a presentation video on my chanel : ComfyUI Tutorial: How to Use McBoaty Nodes Set for Upscaling and Refining Images

Screenshot_23-8-2024_16200_comfyui-shadow marascott ai

What does it intend to do?

McBoaty intends to provide the most efficient way to upscale and refine an image for printing purposes. Its core purpose is to upscale an image with minimal to no modification on the upscaled/refined image. For that purpose, using a denoise at 0.27 or maybe 0.35 is the sweet spot. Using multiple x2 upscaler models would also provide a better result than using one x4 model, but that is for you to choose.

To which StableDiffusion version is it compatible?

It has been tested successfully with SD1.5, SDXL, SD3; it will probably work with any SD version. Feel free to report issues in the issue section.

What's inside?

The McBoaty set of nodes comes with 4 different nodes:

1) An Upscaler Node to upscale the input image and slice it into tiles to refine the image on a per-tile approach.

Upscaler Node

Inputs:

Outputs:

2) A TilePrompter Node to edit the prompt and denoise level on a per-tile basis.

TilePrompter Node

Input:

Output:

3) A Refiner Node to refine the image based on the settings provided, either via general settings if you don't use the TilePrompter or on a per-tile basis if you do use the TilePrompter.

Refiner Node

Inputs:

Outputs:

4) The fourth node is the LargeRefiner Node which is actually the combination of the Upscaler Node + the Refiner Node in one node using the general settings.

LargeRefiner Node

Inputs:

Outputs:

How does it work?

Below is an example of the LargeRefiner being connected to the TilePrompter and refined by a second pass to a Refiner.

Using the Upscaler instead of the LargeRefiner will require using the 1st pass of the refiner with tiles to process at empty value to process all tiles at least once (which the LargeRefiner does by default).

The overall idea is to Upscale (/Refine) your image and slice it to provide each tile to McPrompty the TilePrompter which will allow you to fine-tune your prompt on a per-tile basis as well as the denoise level. Then those parameters are passed to the Refiner which will process those tiles and rebuild your image for the output. Then you can continue the refining on another refiner pass or modify the current TilePrompter parameters to fine-tune the result.

One use case is to push the denoise to 0.76 (maximum denoise recommended with control net activated) in the LargeRefiner then fine-tune the prompt and denoise for the tiles which went too wild and process the tiles you want (specified in the tiles to process settings) again through a second refiner pass.

img

Where can I find a functional workflow to test it?

Below is a functional workflow embedded in the image which allows you to test both techniques.

Workflow for McBoaty_V5

Base Image for Comparison

Learn More about the Name McBoaty

BoatyMcBoatface

McInpainty Node Set (Set & Paster Node) - description in progress

McInpainty Node is a set of 2 nodes.

img

Get Model Blocks

Workflow

BlockBuster Workflow

Image generated by modifying model block weights

Block Buster examples

Benchmark

Upscaler

Img Slider for result comparison

Custom_node Execution Time from server start to end of queue output Type workflow OS Name Processor Installed Physical Memory (RAM) GB GPU Name
McBoaty LargeRefiner v5 98.37 McBoaty Upscaler benchmark_McBoaty.json Microsoft Windows 10 Home Intel(R) Xeon(R) W-3235 CPU @ 3.30GHz 41 Red Hat QXL controller NVIDIA Quadro RTX 6000
Supir 70.48 SUPIR Upscaler benchmark_SUPIR.json Microsoft Windows 10 Home Intel(R) Xeon(R) W-3235 CPU @ 3.30GHz 41 Red Hat QXL controller NVIDIA Quadro RTX 6000
UltimateSDUpscaler 47.34 USDU Upscaler benchmark_USDU.json Microsoft Windows 10 Home Intel(R) Xeon(R) W-3235 CPU @ 3.30GHz 41 Red Hat QXL controller NVIDIA Quadro RTX 6000

Visit this link to see an Image Slider comparing the 3 results against the original

Sponsorship

❤️ Github Sponsor | 🪙 Paypal

If you like my work and wish to see updates and new features please consider sponsoring my projects.

Not to mention the documentation and videos tutorials. Check my YouTube Chanel @MaraScott-AI

The only way to keep the code open and free is by sponsoring its development. The more sponsorships the more time I can dedicate to my open source projects.

Please consider a Github Sponsorship or PayPal donation (David "MaraScott" Asquiedge). For sponsorships of $50+, let me know if you'd like to be mentioned in this readme file, you can find me on Fern's Discord or david.asquiedge🐰maracott.ai.

Special thanks

I would like to thank my AI Classroom Discord buddies with a shoutout to:

Node related Thanks

AnyBus

McBoaty

McInpainty

I might have forgotten some other people, please contact me if you want to appear here and please forgive me.


If anybody is interested in using these nodes, I'm following up on feature requests via the issues. If you have Node ideas, feel free to make a request in the issues.

Star History

Star History Chart