ComfyUI > Nodes > ComfyUI_Mira

ComfyUI Extension: ComfyUI_Mira

Repo Name

ComfyUI_Mira

Author
mirabarukaso (Account age: 1261 days)
Nodes
View all nodes(53)
Latest Updated
2024-08-16
Github Stars
0.03K

How to Install ComfyUI_Mira

Install this extension via the ComfyUI Manager by searching for ComfyUI_Mira
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI_Mira in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

ComfyUI_Mira Description

ComfyUI_Mira enhances ComfyUI with nodes like Integer Multiplier, Float Multiplier, Convert Numeral to String, Create Canvas Advanced, Create PNG Mask, and Color Mask to HEX String, boosting functionality and versatility.

ComfyUI_Mira Introduction

ComfyUI_Mira is an extension for ComfyUI designed to enhance the workflow of AI artists by providing custom nodes that improve upon existing functionalities. This extension is particularly useful for creating and manipulating masks, which are essential for regional conditioning in image generation. By using ComfyUI_Mira, you can create complex mask layouts, convert color masks to various formats, and even generate masks for watermark removal. This extension aims to streamline your workflow, making it easier to achieve precise and high-quality results.

How ComfyUI_Mira Works

ComfyUI_Mira works by adding custom nodes to ComfyUI, each designed to perform specific tasks related to mask creation and manipulation. These nodes allow you to define regions within an image, apply different conditions to these regions, and convert masks between various formats. The extension leverages ideas from other projects like sd-webui-regional-prompter and comfyui-lama-remover to provide a comprehensive set of tools for AI artists.

ComfyUI_Mira Features

Mask Creation

Create Tilling PNG Mask

This feature allows you to create a tiled PNG image with a color mask stack for regional conditioning. You can define the image size, the number of rows and columns, and customize the layout using a specific syntax.

  • Inputs:
  • Width, Height: Define the image size.
  • Colum_first: Boolean trigger for horizontal cuts.
  • Rows, Columns: Define the number of blocks.
  • Layout: Customize block layouts.
  • Outputs:
  • Image: Visualization of your layout.
  • PngColorMasks: List of color information for each block.
  • PngRectangles: List of rectangle information for each block.
  • Debug: Debug information.

Create Nested Rectangles PNG Mask

This feature creates a nested rectangles PNG image with a color mask stack for regional conditioning.

  • Inputs:
  • Width, Height: Define the image size.
  • X, Y: Center point of all rectangles.
  • unlimit_top, unlimit_bottom, unlimit_left, unlimit_right: Boolean triggers for mask creation limits.
  • Layout: Customize block layouts.
  • Outputs:
  • Image: Visualization of your layout.
  • PngColorMasks: List of color information for each block.
  • PngRectangles: List of rectangle information for each block.
  • Debug: Debug information.

Mask Conversion

PngColor Masks to Mask List

Converts a range of PngColorMasks to masks with or without blur.

  • Inputs:
  • Image: Source image.
  • PngColorMasks: List of color masks.
  • Blur: Intensity of blur around the mask edges.
  • Start_At_Index: Starting index for blocks.
  • Outputs:
  • mask_[0-9]: Generated masks.

PngColor Mask to HEX String

Converts a specified index of PngColorMasks to a HEX value.

  • Inputs:
  • PngColorMasks: List of color masks.
  • Index: Block index number.
  • Outputs:
  • mask_color: HEX value of the color.

PngColor Mask to INT RGB

Converts a specified index of PngColorMasks to RGB values.

  • Inputs:
  • PngColorMasks: List of color masks.
  • Index: Block index number.
  • Outputs:
  • R, G, B: RGB values.

Utility Functions

Create Canvas

Creates canvas information for latent images with a landscape switch.

  • Inputs:
  • Width, Height: Image size.
  • Landscape: Boolean trigger to swap width and height.
  • Batch: Batch size.
  • HiResMultiplier: Multiplier for high-resolution fixes.
  • Debug: Debug information.
  • Outputs:
  • Width, Height: Adjusted image size.
  • Batch: Batch size.
  • HiRes Width, HiRes Height: Dimensions for high-resolution fixes.

Random Tilling Layouts

Generates random tiling mask layouts for Create Tilling PNG Mask.

  • Inputs:
  • min_rows, max_rows: Range for row cuts.
  • min_colums, max_colums: Range for column cuts.
  • max_weights_gcuts, max_weights_ncuts: Maximum weights for cuts.
  • rnd_seed: Seed for random generation.
  • Outputs:
  • Layout: Generated layout string.

Random Nested Mask Layouts

Generates random nested mask layouts for Create Nested PNG Mask.

  • Inputs:
  • min_nested, max_nested: Range for nested masks.
  • min_weights, max_weights: Weights for each nest.
  • rnd_seed: Seed for random generation.
  • Outputs:
  • Layout: Generated layout string.
  • top, bottom, left, right: Boolean values for mask creation limits.

Text Manipulation

Text Switcher

Selects between two text inputs based on a boolean trigger and adds common text.

  • Inputs:
  • use_text2: Boolean trigger to switch text.
  • common_text_at_front: Boolean trigger to place common text at the front.
  • text1: Default text.
  • text2: Alternative text.
  • common_text: Common text to add.
  • Outputs:
  • text: Combined text output.
  • text_alt: Alternative combined text output.

Troubleshooting ComfyUI_Mira

Common Issues and Solutions

  1. Masks Not Generating Correctly:
  • Ensure that the input dimensions and layout strings are correctly specified.
  • Check the debug output for any error messages.
  1. Blur Not Applied to Masks:
  • Verify that the blur intensity is set to a value greater than 0.
  • Ensure that the correct mask index is specified.
  1. Random Layouts Not Changing:
  • Make sure the rnd_seed is connected and properly configured.
  • If switching from fixed to randomize, queue the prompt twice to see the effect.

Frequently Asked Questions

  1. How do I customize the layout for masks?
  • Use the Layout input to specify custom block layouts. Refer to the examples provided in the documentation.
  1. Can I use this extension for watermark removal?
  • Yes, use the Create Watermark Removal Mask node to generate masks for watermark detection and removal.
  1. What should I do if the extension is not working as expected?
  • Check the debug output for any error messages.
  • Ensure that all required inputs are connected and correctly configured.

Learn More about ComfyUI_Mira

For additional resources, tutorials, and community support, you can refer to the following:

ComfyUI_Mira Related Nodes

RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.