ComfyUI : Ultimate Upscaler - Upscale any image from Stable Diffusion, MidJourney, or photo!

Scott Detweiler
23 Aug 202309:02

TLDRIn this tutorial, Scott Weller from stability.ai introduces an advanced technique for upscaling images using a custom graph in SD Excel. He explains how to automate the upscaling process without manually entering numbers, utilizing a calculator to determine optimal resolutions. The video details the setup of custom nodes, including the 'Ultimate SD Upscaler', and how they work together to efficiently upscale images while adding detailed textures. Scott emphasizes the utility of the resolution calculator for seamless integration with SD Excel, ensuring precise adjustments for any image, regardless of its initial size.

Takeaways

  • 📈 Scott Weller, the QA guy for stability.ai, introduces an upscale technique for enlarging images without manual input of numbers.
  • 🧩 He utilizes a combination of custom nodes, including Control Net, Comfy Manager, Ultimate SD Upscaler, and a recommended resolution calculator.
  • 🔍 The upscale process involves breaking down the image into tiles, specifically 1024x1024 tiles, which is the expected size for SD Excel.
  • 📐 A resolution calculator is key to determining the optimal size for upscaling, ensuring it matches the trained resolutions of the model.
  • 🖼️ The upscaler requires an image, a checkpoint, and can use a positive or negative model for additional guidance.
  • 🔄 The upscaler can also perform a reverse upscale, adjusting the scale if the desired upscale factor is different from the model's default.
  • 🔍 The process includes a denoising step, which can be adjusted based on the desired level of detail preservation.
  • ⚙️ Scott demonstrates how to use the nodes and calculator to automate the upscale process, avoiding manual entry of scale factors.
  • 📉 The script mentions the use of Comfy Math for mathematical operations, which is not built into the system by default.
  • ⏱️ Upscaling is a time-consuming process, but Scott emphasizes the value of the wait for high-quality results.
  • 🔗 The final upscaled image can be saved and reloaded as needed, offering flexibility in the workflow.
  • 📌 The video concludes with an invitation for viewers to share their thoughts and support the channel, with a mention of a private area for sponsors to access the graph.

Q & A

  • What is the main purpose of the video?

    -The main purpose of the video is to demonstrate an upscale technique for getting large images using SD Excel, which has been trained in certain resolutions.

  • Who is the presenter of the video?

    -The presenter of the video is Scott Weller, the QA guy for stability.ai.

  • What is the significance of using a calculator in the upscaling process?

    -The calculator is used to determine the optimal size for the image to match the resolutions that SD Excel has been trained in, ensuring the best upscaling results.

  • What are the custom nodes required for the upscaling process?

    -The custom nodes required include the control net, comfy manager, ultimate SD upscaler, comfy math, and a recommended resolution calculator.

  • How does the Ultimate SD Upscaler work?

    -The Ultimate SD Upscaler breaks the image down into tiles and upscales each tile, adding details to the image.

  • What is the recommended tile size for SD Excel?

    -The recommended tile size for SD Excel is 1024 by 1024 pixels.

  • How does the upscaler handle the addition of detail to the image?

    -The upscaler allows for a certain percentage of the upscaled image to change, which is set to 25% in the example, to add detail without creating random squares of content.

  • What is the role of the 'nearest sdxl resolution' in the upscaling process?

    -The 'nearest sdxl resolution' ensures that the image starts at the correct resolution that SD Excel can work with most effectively before the upscaling process begins.

  • What is the purpose of the upscale factor in the calculator?

    -The upscale factor is used to determine the scale at which the image should be upscaled. It can be adjusted based on the desired outcome, such as a four times upscale.

  • How does the process handle images of different sizes?

    -The process automatically calculates the appropriate scale factor for any given image size, ensuring that the image is upscaled correctly regardless of its initial dimensions.

  • What is the expected outcome of the upscaling process?

    -The expected outcome is an upscaled image that is four times larger and has added detail, without the need for manual input of numbers or resolution adjustments.

  • How can viewers access the graph used in the video?

    -Viewers who are at the sponsor level or higher on the YouTube channel can access the graph in the private area. Others can build the graph themselves following the instructions in the video.

Outlines

00:00

😀 Introduction to Upscaling Images with SD Excel

Scott Weller, the QA guy for stability.ai, introduces his technique for upscaling images to large sizes using a graph-based approach. He mentions a previous video where a valid technique was shown but prefers a more automated process. The focus is on using a calculator to determine the optimal size for images to match the training resolutions of SD Excel. Scott outlines the need for custom nodes, including ControlNet, Comfy Manager, and the Ultimate SD Upscaler, which breaks images into tiles for processing. He emphasizes the importance of using a recommended resolution calculator to ensure compatibility with SD Excel's expected resolutions.

05:01

🔍 Detailed Walkthrough of the Image Upscaling Process

The video script continues with Scott demonstrating the image upscaling process step by step. He guides viewers on how to load an image and a checkpoint into the system. Scott explains the requirements for the Ultimate SD Upscaler, including the need for an image, a positive or negative value, and a VAE. He discusses creating blank values for the positive and negative inputs and the option to add additional detail if desired. The script also covers setting the denoising level and tile size, which is crucial for SD Excel's expected output. Scott then introduces the use of a resolution calculator to determine the target size for upscaling, emphasizing the need to multiply the image size by a scale factor. He concludes by showing the final upscaled image, which is achieved without manual input of numbers, and invites viewers to share their thoughts in the comments.

Mindmap

Keywords

💡Upscale

Upscaling is the process of increasing the resolution of an image or video. In the context of the video, it refers to enhancing the size and detail of an image without losing quality. The video demonstrates a technique for upscaling images using specific software tools to achieve high-resolution results. An example from the script is when Scott mentions 'to show you my upscale technique for getting really big images.'

💡Stable Diffusion (SD)

Stable Diffusion is a term that likely refers to a specific AI model or software used for image processing, particularly in the context of upscaling and generating detailed images. In the video, it is mentioned as one of the sources from which an image can be upscaled. Scott talks about ensuring the upscaled image matches the resolutions that SD is trained in, indicating its importance in the process.

💡Tiles

In the context of image processing, tiles refer to the segments or pieces that an image is divided into for separate processing. The script mentions breaking down the image into tiles of 1024 by 1024 pixels, which is a method used to manage the complexity of upscaling large images and to ensure that each part is processed uniformly.

💡ComfyUI

ComfyUI appears to be a user interface or a tool mentioned in the video that is used for managing and processing images. It is highlighted as a custom node that the presenter uses in his workflow, suggesting that it plays a significant role in the upscaling technique being demonstrated.

💡Denoising

Denoising is a process that reduces the amount of noise or random variation in an image, which can be particularly important when upscaling images to avoid introducing artifacts or unwanted details. The script discusses setting a denoising level to 0.25, which means only 25% of the upscaled content will be replaced, helping to retain the original image details while adding clarity.

💡Resolution Calculator

A resolution calculator is a tool used to determine the optimal size for images to match specific software or hardware capabilities. In the video, it is used to ensure that the upscaled image will match the recommended resolutions for SD, which is crucial for achieving the best results. Scott uses it to avoid manually typing in numbers and to automate the upscaling process.

💡Checkpoint

In the context of the video, a checkpoint likely refers to a saved state or configuration in the image processing software that allows the user to load and resume work from a specific point. Scott mentions loading in a checkpoint, indicating the use of saved settings or progress in the upscaling workflow.

💡VAE

VAE stands for Variational Autoencoder, a type of artificial neural network used for efficient handling of images. In the script, it's mentioned as a requirement for the upscaler, suggesting that it plays a role in the transformation or encoding process of the image before or during upscaling.

💡Control Net

A control net is a term that might refer to a specific network or set of instructions within the software that helps control the flow of the image processing. It is mentioned as something that was used a couple of days prior to the video, indicating it's part of the presenter's regular upscaling toolkit.

💡Ultimate SD Upscaler

The Ultimate SD Upscaler is a specific tool or feature within the software being used that is designed for upscaling images from SD sources. It is described as a fantastic tool that breaks down the image into tiles, which is a critical step in the upscaling process shown in the video.

💡Mathematical Operations

Mathematical operations are calculations performed on numerical values, and in the context of the video, they are essential for determining the correct scaling factors and image dimensions. The script mentions the use of 'Comfy Math' for handling a lot of these operations, which are not built into the software by default, highlighting the complexity of the upscaling process.

Highlights

Scott Weller, QA guy for stability.ai, demonstrates an upscale technique for creating large images.

A calculator is used to determine the optimal size for SD Excel, which is trained in certain resolutions.

Custom nodes are introduced for the upscaling process, including the control net, comfy manager, and ultimate SD upscaler.

The ultimate SD upscaler breaks the image down into tiles, utilizing comfy math for mathematical operations.

Recommended resolution calculator ensures images match the SD Excel recommended resolutions.

Images are upscaled without the need to manually type in numbers or figure out settings.

The process involves loading a checkpoint and an upscaler to see its requirements.

Positive and negative values are created to guide the upscale, depending on the amount of denoise.

Images are broken down into 1024x1024 tiles, which is the expected tile size for SD Excel.

A denoising level of 0.25 is set, allowing only 25% of the upscaled content to change and add detail.

A desired X and Y target is calculated using the recommended resolution calculator for upscaling by a factor of four.

The upscale model adds skin texture and is guided by user prompts and the amount of denoise.

The process is automated to upscale any image dropped into the system by a scale factor of four.

The upscale factor can be adjusted for different upscaling needs, such as 1.5 or 1.7 times.

The system handles the resolution calculations, making it easy to upscale images without manual input.

The upscale process may take significant time due to the image size and the tiling process.

The final upscaled image is unguided by a prompt, relying on the SD Excel model and denoise levels.

The process is applicable to any image type, from Stable Diffusion to photographs.

The upscaled image is created in 1024x1024 tiles, with the system automatically determining the number of tiles needed.

The graph used in the process will be available for download to patrons at a higher赞助 level.