ComfyUI_Mira
Slice regions of the canvas and convert them to masks for regional conditions widh PNG preview output. And a few support nodes.
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
| Inputs | Description |
|---|---|
Width Height | Image size, could be difference with cavan size, but recommended to connect them together. |
Colum_first | A boolean trigger, when enabled, will treat default cut as a horizontal cut. |
Rows Colums | Define how many Blocks you want, all Blocks are the same weight. (Blocks = Rows x Colums) Low prority, only works when Layout is incorrect. |
Layout | Customized 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. |
| Outputs | Description |
|---|---|
Image | Visualisation Image of your Layout. |
PngColorMasks | A 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 |
PngRectangles | A List contains all PNG Blocks' rectangle informationm, last one is the whole Image's Width and Height. |
Debug | Debug information as String. |
| Examples | Description |
|---|---|
0-9 | Block 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 ENABLED | When 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 DISABLED | A simple horizontal N cut with weights. |
1,2,3,2,1 Colum_first ENABLED | A simple vertical N cut with weights. |
| 1,2,1,1;2,4,6 with Colum_first | 1,2,3,2,1 | 1,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
| Inputs | Description |
|---|---|
Width |
Nodes in this pack
82 nodes
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
Related resources
14 connectionsSources
3 sources
Sources
3 sourcesVerified Oct 20
Verified Oct 20
Source excerpts
1 excerpt
Source excerpts
1 excerptSource context: Repo mirabarukaso/ComfyUI_Mira
