HR Beautify workflow, the Krita AI Diffusion version - minsky91/HR-Beautify-workflow GitHub Wiki

HR Beautify Krita AI workflow screenshot May 2025

HR Beautify (‘HR’ stands for Hires, or High resolution) is an advanced custom workflow to refine images after they have been upscaled (in Krita AI or elsewhere), optionally beautifying them with a style transfer. While Krita AI has an excellent built-in set of refinement features, it is limited and often inefficient for images from 4K and up. What’s more, the plugin doesn’t offer the user any option to select custom Clip Vision, ControlNet or IP Adapter models, which seriously limits possibilities in image refinement, and not only in the hires category. The HR Beautify custom workflow compensates for most of these shortcomings.

The workflow includes two ControlNets, for the most powerful and flexible img2img guidance, as well as two IP Adapters, to enhance images with style transfer and composition or reference guidance. The ControlNets can be used simultaneously and can assist in processing images of up to 24K resolution (provided that all Comfy’s cappings on the image size are removed: a LINK to the page with instructions will be soon provided). The IP adapters, on the other hand, are best used at lower-to-mid resolutions (up to 4K) (*).

Each of the ControlNets and IP Adapters included can use its own control/reference image layer (default is Background). First of the ControlNets and the Reference IP Adapter can also use their individual mask layers, although by default they are disabled (muted) in the workflow. To use these, you will have to manually unmute them in the workflow under webui and ensure that you have a dedicated Krita layer that acts as a mask (not a selection layer), when you are back in Krita AI. Note that mask images influence output of these components in a different way than regular clipping masks or inpaint selections, for IP Adapters, they are called attention masks. To use Krita’s selection for this purpose, set 1 with the slider called ‘Use mask: none 0, selection 1, layer 2’ under the component.

The tiling component used for hires refining is Tiled Diffusion (TD). At the time of writing, it is still in the beta testing stage, but I’ve found it to work just fine for all use cases I tried it with. Because of its tiling logic, TD makes it possible to process images of really large sizes (**), and very fast too. Also, due to the sophisticated denoising algorithm which it uses, TD can enhance images without leaving tile seam artefacts that plague output of other tiled upscaling components such as Ultimate SD Upscale and Krita AI’s own tiled Upscale / Refine feature, not to mention the additional ‘creative touch’ TD is so famous for. Click here to see examples of hires images produced with HR Beautify.

Note: of the 3 methods supported by TD, I recommend the Mixture of Diffusers one as the default choice, as it’s the most ‘creative’ and least artefact-prone of them all. Textures generated with it may appear slightly softer in comparison though. (If you still see tile seams, increase the tile overlap value.)

Also included in the workflow are two post processing components: enhancing image’s HDR range and advanced image sharpening, powered by dedicated custom nodes. They are set by default at 0 strength and thereby inactive without setting their value explicitly. The workflow will automatically resize the image after processing back to its original pixel dimensions, usually changed by the refinement (Stable Diffusion img2img) process.

The main components (ControlNets, IP Adapters, TD and Postprocessing can all be enabled and disabled in groups via the Fast Groups Bypasser (rgthree) node. The workflow exposes in the plugin’s UI all essential parameters, grouping them according to their component. Unfortunately, the exposure also makes the workflow’s design much bulkier than I would have liked it to be, and limits as well its complexity and flexibility. Other essential generation parameters, such as the checkpoint, CFG, sampler, steps and LoRas, are specified outside the workflow, in the plugin’s Style Presets interface.

To use the workflow, you’ll need to have the following custom nodes installed (in the order of their importance):

Important: because of these custom nodess’s usage, HR Beautify for Krita AI will only work with the custom Comfy server (not the internal / managed one thus) under the plugin..

This workflow is a special version of the main workflow called ‘HR Beautify ComfyUI workflow (SDXL)’ available here. The main workflow has additional functionality as compared to this one, but mostly to compensate for the features Krita and the plugin’s custom workflow environment offer natively, such as styles with LoRas, input and output images, resolution multiplier and layers with their blending modes, for color-matching of the output.

(*) Note that having all 4 guidance components (ControlNets & IP Adapters) enabled simultaneously is not a good idea, since this can lead to out-of-memory conditions or affect the output badly, particularly when used with hires images. The most efficient use scenario is to have only 2 of them enabled at once (one ControlNet and one IP Adapter, or two ControlNets), or 3 at most, with low-to-medium image resolutions.

(**) The workflow has been tested and extensively used on a Windows 11 PC equipped with an NVIDIA GeForce RTX 4070 Ti SUPER GPU with 16 GB VRAM. For a setup with a smaller amount of VRAM on the GPU, additional tweaking of the Tiled Diffusion parameters might be necessary, in particular the tile width / height and the tile batch size, to avoid Out of Memory or Allocation on Device failures of the Comfy server.