MageFlow - Super Fast Image Editing (Patreon)
Downloads
Content
Video - https://youtu.be/BRKqpS3B8L8
Overview
MageFlow is now supported in ComfyUI and with models as small as just 4GB, it offers not only one of the lowest VRAM Image Editing models, but also one of the fastest too (sub-second generation on some hardware) !
I put it up against Klein 4B INT8 in order to see how well it compares against a whole range of image generation and editing tasks... and I'd say it is probably 50/50. Sometimes Mage-Flow is better, sometimes Klein, and more often than not they are roughly equal. One place Mage-Flow wins for sure though is camera angle changes - Flux Klein really can't handle those at all well!
Inpainting, Outpainting, Style Changes, Upscaling, Refining and more - all in a single, extra-speedy, low VRAM workflow.
Workflow Information
To open the workflow, either drag the .json file into Comfy or use File -> Open (ctrl-o).
Model Downloads
Links to the models are available in-workflow:
There are lots of versions available for MageFlow, but the INT8 edit model is a great place to start if you're looking to only download one. The bf16 versions are still only 8GB and can be slightly better at anatomy (think, "a woman laying on the grass").
Custom Nodes
A very minimal set of custom nodes are required:
Use whichever method you prefer to install the custom nodes - ComfyUI Manager or the standard git clone.
Model Choice
You can choose to use either MageFlow (Edit models or Text-2-image models are both supported by the ComfyUI Load Diffusion Model node), or Flux Klein:
Flip the yes/no option in the Model Loader to enable or disable the named model group.
Interestingly enough, Klein also plays well with the MageFlow conditioning node output (though not the other way around). Use the Klein Conditioning switch to alternate between them. The Klein conditioning is typically faster, but you may prefer the alternate output. Up toy you!
Control Panel
The control panel is where you select how many images you'd like to send to your chosen model:
You can also:
Choose your latent type (Empty or Masked is best for MageFlow!)
Use the Upscale/Refiner
Use SeedVR2
Enable Ultimate SD Upscale
Compare Images
See the README notes for more information.
Image Loaders
Image 1 is the main control image and so has the masking and outpainting options:
Images can also be resized as appropriate.
If using prompt-based masking over manual masks, simply flip the switch and enter your automask prompt.
Prompting
Turbo (CFG1) models don't use the negative prompt, but the option is available:
Ksampler
The Ksampler features the Detail Daemon sampler for fine tuning, and has various notes for other experiments and models.
Output
The output group provides the default image result:
Upscaling
You can use SeedVR2:
Or USDU for Upscaling:
Image Compare
Us the GET nodes to select which two images you'd like to compare if you enable the compare image groups:
MageFlow Node
The new TextEncodeMageFlowEdit node is up in the engine area if you're want to take a look at that, plus the output from the node seems to work just fine with Flux Klein as well.
The latent output from the node isn't used in this workflow, as it simply outputs an empty latent. Interestingly enough, if you use an Image Latent with Mage-Flow then you'll get some curious results. Masked Image Latents work just fine though (and are a great way to prevent changes from outside the masked area)!
Enjoy! :)