Slice regions of the canvas and convert them to masks for regional conditions widh PNG preview output. And a few support nodes.
Slice regions of the canvas and convert them to masks for regional conditions widh PNG preview output. And a few support nodes.
Package profile
Nodes in this pack
82 nodesBooleanListInterpreter1
Decode `Boolean` value(s) from `Boolean list`. Inputs: bool_list - Boolean list Start_At_Index - If `Start_At_Index` is greater than length of `Boolean list`, it will restart from `0` NOT_Mode - Inverts the Boolean value from input to output (1->0 0->1) Outputs: bool(0~N) - Boolean list
Related resources
6 connectionsSources
1 sourceSource excerpts
1 excerptSource context: Repo mirabarukaso/ComfyUI_Mira
BooleanListInterpreter4
Same as BooleanListInterpreter1
BooleanListInterpreter8
Same as BooleanListInterpreter1
camie_tagger_mira
Compact description unavailable for this node.
CanvasCreatorAdvanced
Create Canvas information Width and Height for Latent with Landscape switch, Batch and HiResMultiplier. Inputs: Width - Image Width Height - Image Height Landscape - When ENABLED, will swap Width and Height for output Batch - Batch size for Latent HiResMultiplier - Multiplier setting for high-resolution output Outputs: Width - Image Width for Latent Height - Image Height for Latent Batch - Batch size for Latent HiRes Width - Width x HiResMultiplier. The result is not the product of the original data, but the nearest multiple of 8. HiRes Height - Height x HiResMultiplier. HiResMultiplier - Same as Input
0 inputs · 5 parameters · 6 outputs
CanvasCreatorBasic
Create Canvas information Width and Height for Latent. Inputs: Width - Image Width Height - Image Height Outputs: Width - Image Width Height - Image Height
0 inputs · 2 parameters · 2 outputs
CanvasCreatorSimple
Create Canvas information Width and Height for Latent with Landscape switch. Inputs: Width - Image Width Height - Image Height Landscape - When ENABLED, will swap Width and Height for output Outputs: Width - Image Width Height - Image Height
0 inputs · 3 parameters · 2 outputs
CheckpointLoaderSimpleMira
Compact description unavailable for this node.
cl_tagger_mira
Compact description unavailable for this node.
CreateMaskWithCanvas
Create a new mask on defined cavans Inputs: C_Width - Width of cavans C_Height - Height of cavans X - The left point of new mask on cavans Y - The top point of new mask on cavans Width - Mask width Height - Mask height Intenisity - The intenisity of Mask, 1 for Soild. Blur - The amount of Blur, 0 for Soild. Outputs: mask - New mask with defined cavans
CreateNestedPNGMask
Create a `Nested Rectangles` PNG image with Color Mask stack for regional conditioning mask. Inputs: Width - Image Width. Height - Image Height. X - Center X point of all Rectangles. Y - Center Y point of all Rectangles. unlimit_top - When `ENABLED`, all `masks` will create from the top of Image. unlimit_bottom - When `ENABLED`, all `masks` will create till the bottom of Image. unlimit_left - When `ENABLED`, all `masks` will create from the left of Image. unlimit_right - When `ENABLED`, all `masks` will create till the right of Image. Layout - Refer to Readme.md @https://github.com/mirabarukaso/ComfyUI_Mira Outputs: PngImage - Image PngColorMasks - A List contains all PNG Blocks' color information. PngRectangles - A List contains all PNG Blocks' rectangle informationm, last one is the whole Image's Width and Height Debug - Debug output
0 inputs · 9 parameters · 4 outputs
CreateSimpleMask
Create Simple Mask Inputs: Width - Mask width Height - Mask height Intenisity - The intenisity of Mask, 1 for Soild. Outputs: mask - New mask with defined cavans
0 inputs · 3 parameters · 1 output
CreateTillingPNGMask
Create a tilling PNG image with Color Mask stack for regional conditioning mask. Inputs: Width - Image Width Height - Image Height Colum_first - A boolean trigger, when enabled, will treat default cut as a horizontal cut. Rows - Low prority, only works when Layout is incorrect. Colums - Low prority, only works when Layout is incorrect. Layout - Refer to Readme.md @https://github.com/mirabarukaso/ComfyUI_Mira Outputs: PngImage - Image PngColorMasks - A List contains all PNG Blocks' color information. PngRectangles - A List contains all PNG Blocks' rectangle informationm, last one is the whole Image's Width and Height Debug - Debug output
0 inputs · 6 parameters · 4 outputs
CreateWatermarkRemovalMask
Creates multiple masks at the corners of the image for subsequent watermark detection and removal. Inputs: C_Width - Width of cavans. C_Height - Height of cavans. Mask_W - Mask width, maxium value are half of cavans width. Mask_H - Mask height, maxium value are half of cavans height. Top_L - Create mask from top left. Top_R - Create mask from top right. Bottom_L - Create mask from bottom left. Bottom_R - Create mask from bottom right. EdgeToEdge - Preserve the N pixels at the outermost edges of the image to prevent image noise. Set to 0 for borderless. Intenisity - The intenisity of Mask, 1 for Soild. Blur - The amount of Blur, 0 for Soild. Output: Mask - New mask with defined cavans.
0 inputs · 11 parameters · 1 output
EightBooleanTrigger
8 Boolean Triggers Refer to TwoBooleanTrigger
0 inputs · 8 parameters · 1 output
EightFloats
8 Floats
0 inputs · 8 parameters · 1 output
EvenOrOdd
Check if a `Integer` is odd or even. Input | Output Odd True Even False
0 inputs · 1 parameter · 2 outputs
EvenOrOddList
Checks whether each `digit` (decimal) of the input `integer` is odd or even, and returns `true` for even numbers and `false` for odd numbers. The final output is a `Boolean List` which is connected to the `Boolean List Interpreter`. If the input `Number of digits` is less than the `Requirement`, it will go back to the lowest digit to re-recognize and complete the list, and the way the list is completed can be chosen as `as is` or `not`. The output node `String` displays the actual results. Inputs: integer - Recommend connect to `Seed Generator` quantity - Length of the `Boolean list`, (I think) 16 for now is enough... NOT_filling - Filling Algorithm, `Enable` for switch `NOT` and "AS IS" in future loop, `Disable` for `AS IS` in every loop Outputs: bool_list - Boolean list result - String result Odd True Even False
0 inputs · 3 parameters · 2 outputs
FlatColorQuantization
Flat Color Quantization https://github.com/mirabarukaso/flat_color_quantization Inputs: image - Source Image Outputs: out_image - Quantizated image
1 input · 5 parameters · 1 output
FloatListInterpreter1
Decode `Float` value(s) from `Float list`. Inputs: float_list - Float list Start_At_Index - If `Start_At_Index` is greater than length of `Float list`, it will restart from `0` Outputs: float(0~N) - Float list
FloatListInterpreter4
Same as FloatListInterpreter1
FloatListInterpreter8
Same as FloatListInterpreter1
FloatMultiplication
Inputs: float_value - Float number as A multiply_value - Float number as B Outputs: Result (FLOAT) - The result of A x B Result (INT) - The result of A x B, and trimmed to integer value Result (STRING) - The result of A x B, and convert to string
0 inputs · 2 parameters · 3 outputs
FourBooleanTrigger
4 Boolean Triggers Refer to TwoBooleanTrigger
0 inputs · 4 parameters · 1 output
FourFloats
4 Floats
0 inputs · 4 parameters · 1 output
FunctionSelectAuto
Function Select Auto Automatically select `func1` or `func2` outputs depends on which one is `NOT None`. `func1` has higher priority. Inputs: func1 - Any function. E.g. `Image from Model Image Upscaler `. func2 - Any function. E.g. `Image from Vae Decode`. Outputs: | Y | func1 | func2 | | None | None | None | | func1 | func1 | None | | func1 | func1 | func2 | | func2 | None | func2 |
FunctionSwap
Swap `func1` and `func2` outputs depends on `trigger`. Now `func2` is `optional`, if `NOT connected` or `function bypassed`, both `Outputs` will return `func1`. Inputs: swap - True or False func1 - Any function. E.g. `Mask_1`. func2 - Any function. E.g. `Mask_2`. Outputs: | swap | A | B | | True | func2 | func1 | | False | func1 | func2 |
GzippedBase64ToImage
Load Gzipped Base64 Image string from SAA. Convert back to Image for other nodes.
illustrious_character_select
illustrious_character_select Inputs: character - Character random_action_seed - MUST connect to `Seed Generator` Optional Input: custom_prompt - An optional custom prompt for final output. E.g. AI Generated ptompt` Outputs: prompt - Final prompt info - Debug info
2 outputs
illustrious_character_select_en
Same as illustrious_character_select But list in English tags
2 outputs
ImageBrightness
Adjust Image Brightness Inputs: src_image - Source Image level - Brightness Level, default is 1.0 Outputs: image - Torched Image
1 input · 1 parameter · 1 output
ImageColorTransferMira
Compact description unavailable for this node.
ImageContrast
Adjust Image Contrast Inputs: src_image - Source Image level - Contrast Level, default is 1.0 Outputs: image - Torched Image
1 input · 1 parameter · 1 output
ImageGamma
Adjust Image Gamma Inputs: src_image - Source Image level - Gamma Level, default is 0.0 Outputs: image - Torched Image
1 input · 1 parameter · 1 output
ImageGrayscale
Convert Image to Grayscale Inputs: src_image - Source Image Outputs: image - Torched Image
1 input · 0 parameters · 1 output
ImageHUE
Adjust Image HUE Inputs: src_image - Source Image level - HUE Level, default is 0.0 Outputs: image - Torched Image
1 input · 1 parameter · 1 output
ImageRGBChannel
Image RGB Channel Inputs: src_image - Source Image R/G/B - Colour magnification value, less than 1.0 means attenuation Outputs: image - Output Image
1 input · 3 parameters · 1 output
ImageSaturation
Adjust Image Saturation Inputs: src_image - Source Image level - Saturation Level, default is 0.0 Outputs: image - Torched Image
1 input · 1 parameter · 1 output
ImageSaverMira
Compact description unavailable for this node.
ImageSharpness
Adjust Image Sharpness Inputs: src_image - Source Image level - Sharpness Level, default is 1.0 Outputs: image - Torched Image
1 input · 1 parameter · 1 output
ImageToGzippedBase64
Load Image and Gzipped then convert to Base64 string for SAA.
1 input · 0 parameters · 1 output
ImageToneCurve
Image Tone Curve Adjust the overall brightness using the `RGB Channels` or `Brightness` node. Inputs: src_image - Source Image low - Increase shadow range high - Increase highlight range Outputs: image - Output Image
1 input · 2 parameters · 1 output
IntMultiplication
Inputs: input_value - Integer number as A multiply_value - Integer number as B Outputs: Result (INT) - The result of A x B Result (STRING) - The result of A x B, and convert to string
0 inputs · 2 parameters · 2 outputs
IntSubtraction
Inputs: int_value - Integer number as A subtracted_value - Integer number as B Outputs: Result (INT) - The result of A - B Result (STRING) - The result of A - B, and convert to string subtracted_value - B as is
0 inputs · 2 parameters · 3 outputs
IntToFloatMultiplication
Inputs: int_value - Integer number as A multiply_value - Integer number as B Outputs: Result (INT) - The result of A x B Result (STRING) - The result of A x B, and convert to string
0 inputs · 2 parameters · 3 outputs
llm_prompt_gen_node
llm_prompt_gen_node An AI based prpmpte gen node Optional: system_prompt - System prompt for AI Gen Input: url - The url to your Remote AI Gen model - Model select prompt - Contents that you need AI to generate random_action_seed - MUST connect to `Seed Generator` Output: ai_prompt - Prompts generate by AI
0 inputs · 6 parameters · 1 output
local_llm_prompt_gen
local_llm_prompt_gen An AI based prpmpte gen node for local LLM Server args: llama-server.exe -ngl 40 --no-mmap -m "F:\\LLM\\Meta-Llama\\GGUF_Versatile-Llama-3-8B.Q8_0\\Versatile-Llama-3-8B.Q8_0.gguf" For DeepSeek, you may need a larger n_predict 2048~ and lower temperature 0.4~, for llama3.3 256~512 may enough. Optional: system_prompt - System prompt for AI Gen Input: server - Your llama_cpp server addr. E.g. http://127.0.0.1:8080/chat/completions temperature - A parameter that influences the language model's output, determining whether the output is more random and creative or more predictable. n_predict - Controls the number of tokens the model generates in response to the input prompt prompt - Contents that you need AI to generate random_action_seed - MUST connect to `Seed Generator` Output: ai_prompt - Prompts generate by AI
0 inputs · 7 parameters · 1 output
LogicNot
Always return Boolean Not Input | Output True False False True
0 inputs · 1 parameter · 2 outputs
LoRAfromText
LoRA from Text <loraname> <loraname:model str> <loraname:model str:clip str> <loraname:model str:clip str:hires model str:hires clip str> Inputs: model - From your Model node. clip - From your Clip node. text - Text prompt with lora and trigger words Outputs: model - Connect to 1st sampler MODEL clip - Connect to yout positive CLIP Text Encoder model_to_hifix - Connect to 2nd sampler MODEL, e.g. Hi-res Fix clip_to_hifix - In case you need change prompts in 2nd stage plain_text - Connect to your positive CLIP Text Encoder or text combiner
5 outputs
LoRALoaderWithNameStacker
Load LoRA with optional LoRA Name Stacker input/output and bypass trigger Few Code refer to WAS_Node_Suite https://github.com/WASasquatch/was-node-suite-comfyui/blob/ee2e31a1e5fd85ad6f5c36831ffda6fea8f249c7/WAS_Node_Suite.py#L13709 Inputs: model - Your Model node, the purple one. clip - your Clip node, the lemon yellow one. lora_name - Selected LoRA strength_model - LoRA strength for Model strength_clip - LoRA strength for Clip bypass - Bypass current LoRA Optional Input: lora_stack - A string array from previous `LoRA Loader With Name Stacker` Outputs: MODEL - Combined text output CLIP - Alternative combined text output lora_stack - New string array with current LoRA name and strength information. AS is when bypass is `Enable` or strengths are all `0`
3 outputs
NoneToZero
Check if the `check_none` is None, then set return value to `0`.
NumeralToString
Convert Integer or Float to String. Inputs: numeral - Integer or Float number Outputs: text - String output
1 output
OneFloat
1 Float
0 inputs · 1 parameter · 1 output
PngColorMasksToMaskList
Convert ranged PngColorMasks to Mask with Mask Blur function. This is a color based function, so it could NOT set Intenisity to Mask. Inputs: PngImage - Image from Create PNG Mask PngColorMasks - List from Create PNG Mask Blur - The amount of Blur, 0 for Soild. Start_At_Index - The first Block id to start Outputs: mask_[0-9] - Mask for anyone who want a Mask
2 inputs · 2 parameters
PngColorMasksToRGB
Convert specified Index of PngColorMasks to RGB value. Inputs: PngColorMasks - List from Create PNG Mask Index - The Block id of PNG Mask Outputs: R - Integer. Red G - Integer. Green B - Integer. Blue
1 input · 1 parameter · 3 outputs
PngColorMasksToString
Convert specified Index of PngColorMasks to HEX value. Inputs: PngColorMasks - List from Create PNG Mask Index - The Block id of PNG Mask Outputs: mask_color - String. e.g. RGB(255,0,255) to #FF00FF
1 input · 1 parameter · 1 output
PngColorMasksToStringList
Convert ranged PngColorMasks to HEX value. Inputs: PngColorMasks - List from Create PNG Mask Start_At_Index - The first Block id to start Outputs: mask_color[0-9] - String. e.g. RGB(255,0,255) to #FF00FF
PngRectanglesToMask
Convert PngRectangles to selected Mask with Mask Intenisity and Blur function. This function creates Mask directly from Rectangles data. Inputs: PngRectangles - List from Create PNG Mask Intenisity - The intenisity of Mask, 1 for Soild. Blur - The amount of Blur, 0 for Soild. Start_At_Index - The first Block id to start Overlap - Combine the `Previous` or `Next` Masks into current Mask. `None` for disable. Overlap_Count - How many `Previous` or `Next` Masks you want to combine. Outputs: mask - Mask for anyone who want a Mask
1 input · 5 parameters · 1 output
PngRectanglesToMaskList
Convert ranged PngRectangles to Mask with Mask Intenisity and Blur function. This function creates Mask directly from Rectangles data. Inputs: PngRectangles - List from Create PNG Mask Intenisity - The intenisity of Mask, 1 for Soild. Blur - The amount of Blur, 0 for Soild. Start_At_Index - The first Block id to start Outputs: mask_[0-9] - Mask for anyone who want a Mask
1 input · 3 parameters
RandomNestedLayouts
Random Nested Mask Layout Generator All known issues same as upper one. Inputs: min_nested, max_nested - Range of nest you want. min_weights, max_weights - The weight of every nest. rnd_seed - Connect to the `Seed Generator` node, then use `Global Seed (Inspire)` node to control it properly. Outputs: Layout - Layouts string, you need connect it to `Create Nested PNG Mask -> layout` top, bottom, left, right - Random Boolean
5 outputs
RandomTillingLayouts
[#1](https://github.com/mirabarukaso/ComfyUI_Mira/issues/1) Random Tilling Mask Layout Generator Highly recommend connect the output `layout` or `Create Tilling PNG Mask -> Debug` to `ShowText` node. **Known Issue** about `Seed Generator` Switching `randomize` to `fixed` now works immediately. But, switching `fixed` to `randomize`, it need 2 times `Queue Prompt` to take affect. (Because of the ComfyUI logic) Solution: Try `Global Seed (Inspire)` from [ComfyUI-Inspire-Pack](https://github.com/ltdrdata/ComfyUI-Inspire-Pack) **Reminder ** The `rnd_seed` have nothing to do with the actual random numbers, you can't get the same `layout` with the same `rnd_seed`, it is recommended to use `ShowText` and `Notes` to save your favourite `layout`. **Hint** Set rows or colums to `0` for only one direction cuts. Whichever is set to `0` will automatically cut according to the other non-zero setting. Just in case all fours are `0`, it will return `1,1`. Inputs: min_rows, max_rows - Range of how many `N cuts` you may want, set both to 0 to disable it. min_colums, max_colums - Range of how many `G cuts` you may want, set both to 0 to disable it. max_weights_gcuts - The maxium weight of `G cuts` range from 1 to `max_weights_gcuts` max_weights_ncuts - The maxium weight of `N cuts` range from 1 to `max_weights_ncuts` rnd_seed - Connect to the `Seed Generator` node, then use `Global Seed (Inspire)` node to control it properly. Outputs: Layout - Layouts string, you need connect it to `Create Tilling PNG Mask -> layout` Example: [2,2,2,1]@3.8,4.2,2.1,3.3;3.6,3.5,3.3,3.7;2.7,3.2,4.9 ^ * * * ^2 colums * the 1st block has 2 rows (3 blocks) * the 2nd block has 2 rows (3 blocks) * the 3rd block has 1 row (2 blocks) 3+3+2= 8 blocks in total Colum_first == False 1|4|7 2|5| 3|6|8
1 output
ReverseImageAndAllImages
Reverse the order of images in a batch and concatenate the reversed images with the original batch. Inputs: images - Source Images Outputs: rev_image - Reversed Images all_image - Source + Reversed Images
1 input · 0 parameters · 2 outputs
SeedGeneratorMira
Compact description unavailable for this node.
SingleBooleanTrigger
A Boolean Trigger Inputs: bool - Boolean trigger Outputs: bool - Boolean value same as input
0 inputs · 1 parameter · 1 output
SixBooleanTrigger
6 Boolean Triggers OH... come on, It's all the same. Wanna know where I need those triggers? A LoRA train. Refer to TwoBooleanTrigger
0 inputs · 6 parameters · 1 output
SN74HC1G86
Single 2-Input Exclusive-OR Gate | A | B | Y | | True | True | None | | False | False | None | | True | False | A | | False | True | B |
SN74HC86
Quadruple 2-Input Exclusive-OR Gates | A | B | Y | | True | True | None | | False | False | None | | True | False | A | | False | True | B |
SN74LVC1G125
Single Bus Buffer Gate With Enable | OE | A | | True | Y | | False | None |
StackImages
Stack Images and Extract Last Image Stacks the input images with optional previous images and extracts the last image from the input images. Inputs: images - Source Images last_images_in - Optional input images to prepend Outputs: all_images - Concatenated images (last_images_in + images, or images if last_images_in is None) last_image - Last image from the input images
2 inputs · 0 parameters · 2 outputs
StepsAndCfg
Steps and CFG
0 inputs · 2 parameters · 2 outputs
TextBoxMira
Compact description unavailable for this node.
TextCombinerSix
Simply combine six input texts for regional text Inputs: text1-6 - Input text Outputs: text - A combined text output
0 inputs · 6 parameters · 1 output
TextCombinerTwo
Simply combine two input texts for regional text Inputs: text1-2 - Input text Outputs: text - A combined text output
0 inputs · 2 parameters · 1 output
TextLoopCombiner
Text Loop Combiner Combine input text with current text into a single text array with seprator. Optional Input: text_in - Text from previous Text Loop Combiner(or other text box) Inputs: text - Text need to combine with seprator - Seprator character or array Outputs: text_out - Combined text
0 inputs · 3 parameters · 1 output
TextSwitcherThreeWays
Text Switcher Three Ways Found a satisfied random number and didn't want to mess up your regional nodes too much? Inputs: text1 - Input text1 text2 - Input text2 text3 - Input text3 switch - List for how to switch 123 Outputs: text1 - text1 text2 - text2 text3 - text3 | S | Out | | 1 | 123 | | 2 | 132 | | 3 | 213 | | 4 | 231 | | 5 | 312 | | 6 | 321 |
0 inputs · 4 parameters · 3 outputs
TextSwitcherTwoWays
Text Switcher Two Ways In face that's for my Mask Layouts Inputs: text1 - Input text1 text2 - Input text2 switch - When ENABLED, will switch output as `text2` and `text1` Outputs: text - As is text1 or text 2 textA - As is text1 or text 2 | Switch | Output | | False | text1 text2 | | True | text2 text1 |
0 inputs · 3 parameters · 2 outputs
TextWildcardSeprator
Text Wildcard Seprator For someone who wants to select wildcard contents by themselves Split the wildcard text (TextBox) into multiple segments according to specific characters, and select the specified segment number to output. Inputs: text - Input text, e.g. blue cat|orange fox|black dragon|white wolf seprator - Seprator character or array. Based on text, our seprator here is | switch - Index of output, current limit is 20(0~19). E.g. blue cat[0], orange fox[1], black dragon[2], white wolf[3], blue cat[4] ...... Outputs: text_out - Selected text
0 inputs · 3 parameters · 1 output
TextWithBooleanSwitchAndCommonTextInput
Selects Text 1 or Text 2 depending on the switch and automatically adds Common Text for output. Inputs: use_text2 - When ENABLED, will switch output to text2 + separator + common_text common_text_at_front - When ENABLED, the common text is placed in front of the text (1 or 2). text1 - Default output text text2 - Alternative text when use_text2 is ENABLED common_text - Common text input for quality tags and etc, leave it blank if you don't need it. Outputs: text - Combined text output text_alt - Alternative combined text output
0 inputs · 5 parameters · 2 outputs
TwoBooleanTrigger
2 Boolean Triggers Inputs: bool - Boolean trigger Outputs: bool_list - Boolean list for `BooleanListInterpreter`
0 inputs · 2 parameters · 1 output
TwoFloats
2 Floats
0 inputs · 2 parameters · 2 outputs
UpscaleImageByModelThenResize
Upscale Image By Model Then Resize This is an experimental feature for zooming in an image on a model and then zooming out to a specified size (a multiple of 8 in length and width). For example, if the input model zooms the image 4x by default and the node is set to zoom 2x, then the image will first be zoomed 4x using the model and then resized to 2x. Inputs: upscale_model - Model for upscaling image - Source Image resize_scale - Real resize ratio, the result will be the nearest multiple of 8. resize_method - Resize method, nearest, nearest-exact, bilinear, bicubic Outputs: image - Output Image
2 inputs · 2 parameters · 1 output
wd_tagger_mira
Compact description unavailable for this node.