Skip to content
Node packVerifiedExternal
Open source

ComfyUI_Mira

Slice regions of the canvas and convert them to masks for regional conditions widh PNG preview output. And a few support nodes.

Maintainer@mirabarukasoBgrade

Package profile

Status
Verified
Publisher
@mirabarukaso
Source
GitHub
Stars
216

README

ComfyUI_Mira

[!IMPORTANT] Nodes have been upgraded to ComfyUI V3. If you run into any problems, please let me know...

A custom node for ComfyUI to improve all those custom nodes I feel not comfortable in my workflow.


Installation

Search ComfyUI_Mira in your ComfyUI -> Manager -> Custom Nodes Manager, then click Install

or

Clone the repository to custom_nodes in your ComfyUI\custom_nodes directory:

git clone https://github.com/mirabarukaso/ComfyUI_Mira.git

If you got error report on loading, you may need run the following command in ComfyUI\custom_nodes\ComfyUI_Mira or ComfyUI\custom_nodes\mira:

pip install -r requirements.txt

Functions

Mask

Before you start, check the simple example for Regional Condition

Create Tilling PNG Mask
Create a Tilling PNG image with Color Mask stack for regional conditioning mask.
Ideas from sd-webui-regional-prompter

InputsDescription
Width HeightImage size, could be difference with cavan size, but recommended to connect them together.
Colum_firstA boolean trigger, when enabled, will treat default cut as a horizontal cut.
Rows ColumsDefine how many Blocks you want, all Blocks are the same weight. (Blocks = Rows x Colums) Low prority, only works when Layout is incorrect.
LayoutCustomized Blocks with layouts input. e.g. 1,2,1,1;2,4,6 0-9 , ; Check Examples section for more detail. High prority, in case you don't need custom layout, simply put # here.
OutputsDescription
ImageVisualisation Image of your Layout.
PngColorMasksA List contains all your Blocks' color information. Connect to Create PNG Mask Color Mask to HEX String Color Mask to INT RGB Color Masks List
PngRectanglesA List contains all PNG Blocks' rectangle informationm, last one is the whole Image's Width and Height.
DebugDebug information as String.
ExamplesDescription
0-9Block weights
,A normal segmentation. Let's call it N cut
;A high-priority segmentation perpendicular to the normal direction. Let's call it G cut
1,2,1,1;2,4,6 Colum_first ENABLEDWhen combining , and ;, the first and the following ; elements are treated as the weight of G for current cavans. Node will first split the canvas with weight 1 and ;2 as G cuts. Then split the following parts with 2,1,1 and 4,6 as N cuts. NOTE: The arithmetic logic here are different from WebUI, please use "Colum_first" if you need to change the direction, don't replace , and ; directly.
1,2,3,2,1 Colum_first DISABLEDA simple horizontal N cut with weights.
1,2,3,2,1 Colum_first ENABLEDA simple vertical N cut with weights.
1,2,1,1;2,4,6 with Colum_first1,2,3,2,11,2,3,2,1 with Colum_first

Create Nested Rectangles PNG Mask
Create a Nested Rectangles PNG image with Color Mask stack for regional conditioning mask.
Ideas from Watermark Removal

InputsDescription
Width

Nodes in this pack

82 nodes
  • BooleanListInterpreter1
  • BooleanListInterpreter4
  • BooleanListInterpreter8
  • camie_tagger
  • CanvasCreatorAdvanced
  • CanvasCreatorBasic
  • CanvasCreatorSimple
  • CheckpointLoaderSimple
  • cl_tagger
  • CreateMaskWithCanvas
  • CreateNestedPNGMask
  • CreateSimpleMask
  • CreateTillingPNGMask
  • CreateWatermarkRemovalMask
  • EightBooleanTrigger
  • EightFloats
  • EvenOrOdd
  • EvenOrOddList
  • FlatColorQuantization
  • FloatListInterpreter1
  • FloatListInterpreter4
  • FloatListInterpreter8
  • FloatMultiplication
  • FourBooleanTrigger
  • FourFloats
  • FunctionSelectAuto
  • FunctionSwap
  • GzippedBase64ToImage
  • illustrious_character_select
  • illustrious_character_select_en
  • ImageBrightness
  • ImageColorTransfer
  • ImageContrast
  • ImageGamma
  • ImageGrayscale
  • ImageHUE
  • ImageRGBChannel
  • ImageSaturation
  • ImageSaver
  • ImageSharpness
  • ImageToGzippedBase64
  • ImageToneCurve
  • IntMultiplication
  • IntSubtraction
  • IntToFloatMultiplication
  • llm_prompt_gen_node
  • local_llm_prompt_gen
  • LogicNot
  • LoRAfromText
  • LoRALoaderWithNameStacker
  • NoneToZero
  • NumeralToString
  • OneFloat
  • PngColorMasksToMaskList
  • PngColorMasksToRGB
  • PngColorMasksToString
  • PngColorMasksToStringList
  • PngRectanglesToMask
  • PngRectanglesToMaskList
  • RandomNestedLayouts
  • RandomTillingLayouts
  • ReverseImageAndAllImages
  • SeedGenerator
  • SingleBooleanTrigger
  • SixBooleanTrigger
  • SN74HC1G86
  • SN74HC86
  • SN74LVC1G125
  • StackImages
  • StepsAndCfg
  • TextBox
  • TextCombinerSix
  • TextCombinerTwo
  • TextLoopCombiner
  • TextSwitcherThreeWays
  • TextSwitcherTwoWays
  • TextWildcardSeprator
  • TextWithBooleanSwitchAndCommonTextInput
  • TwoBooleanTrigger
  • TwoFloats
  • UpscaleImageByModelThenResize
  • wd_tagger

Related resources

14 connections
Used byANIMA Pro Grade SFW/NSFW W/ Controlnet, Regional Prompt, & Realism enhancer — V4.0 Enhancer versionUsed byIllustrious/ Pony/ SDXL Pro Grade Workflow (Low or High VRAM) — V8.1 Region Prompt UltraUsed byText2Img Workflow with Detailer Arrays — v2.1Used byIllustrious/ Pony/ SDXL Pro Grade Workflow (Low or High VRAM) — V9.2.. because why notUsed byText2Img Workflow with Detailer Arrays — v6.2 SDXLUsed byIllustrious/ Pony/ SDXL Pro Grade Workflow (Low or High VRAM) — V9.0.1 Mods & RefinerUsed byZIT Realism w/Klein_9b enhancer — v1.1Used byText2Img Workflow with Detailer Arrays — v2.0Used byText2Img Workflow with Detailer Arrays — v6.2 AnimaUsed byBlink's universal workflow | CivitAI metadata, upscaling, FaceDetailer (+indexing elements), inpainting, controlnet, IPAdapter (regional conditioning) and token counter (SDXL/PONYV6/ILLUSTRIOUS/NOOBAI-XL/ANIMAGINEXL4/SD1.5) ComfyUI beginner friendly all in one — v3Used byBlink's universal workflow | CivitAI metadata, upscaling, FaceDetailer (+indexing elements), inpainting, controlnet, IPAdapter (regional conditioning) and token counter (SDXL/PONYV6/ILLUSTRIOUS/NOOBAI-XL/ANIMAGINEXL4/SD1.5) ComfyUI beginner friendly all in one — v2Used byIllustrious/ Pony/ SDXL Pro Grade Workflow (Low or High VRAM) — V7.2.3 reworkUsed byZ-Image Base & Turbo Pro Grade Workflow I2I/T2I (Low or High VRAM) — V9.3 Realism overhaulUsed byBlink's universal workflow | CivitAI metadata, upscaling, FaceDetailer (+indexing elements), inpainting, controlnet, IPAdapter (regional conditioning) and token counter (SDXL/PONYV6/ILLUSTRIOUS/NOOBAI-XL/ANIMAGINEXL4/SD1.5) ComfyUI beginner friendly all in one — v1

Sources

3 sources
GitHubSource
github.com/mirabarukaso/ComfyUI_Mira

Verified Oct 16

GitHubSourceVersion 4875c60b6da03b84ea0d2109666ff9e865de0f51
github.com/mirabarukaso/ComfyUI_Mira

Verified Oct 20

Source excerpts

1 excerpt

Source context: Repo mirabarukaso/ComfyUI_Mira