Home

Awesome

ComfyUI ImageMagick

ComfyUI ImageMagick is an extension implements custom nodes that integrated ImageMagick into ComfyUI.

ImageMagick is an extremely powerful image processing tool, and you can even think of it as a command-line version of "Photoshop". This Custom Nodes plugin allows you to integrate ImageMagick into your ComfyUI workflow.

overall

Installation

First, install ImageMagick 7.x on your local and ensure that you can run the 'magick' command in the command line.

Then, just like installing other ComfyUI plugins, run 'git clone' in the custom_nodes directory.

How to use

This plugin implements a custom node ImageMagick.

In the command line, theoretically, you can add unlimited image inputs and parameters.

In the current version of this plugin, the node allows up to 3 image inputs and 6 parameters.

If you find this number insufficient, please open an issue to inform me.

Why did I think of doing this?

Initially, it was because I generated black and white line art in stable diffusion, and then I wanted to turn the line art into transparent backgrounds. Of course, I could do this in Photoshop, but isn't there a faster way? That's when I discovered ImageMagick.

With just two commands in ImageMagick, you can achieve this:

By adjusting the threshold, you can control the intensity of the line art.

Then, I thought, why not directly generate transparent line art in ComfyUI? That led to the idea of integrating ImageMagick into ComfyUI.

Examples

Here, I provide two workflows, mainly to implement the above two commands in ComfyUI:

  1. workflows1.xml overall
  2. workflows2.xml overall

And output: overall overall

It must be said that ImageMagick can achieve more powerful functionalities, and for specific usage, please refer to the ImageMagick official documentation.

Credit

My extensions for ComfyUI

My extensions for stable diffusion webui