How to AI Upscale and Restore images with Supir.

Sebastian Kamph
10 May 202416:31

TLDRThis video tutorial demonstrates how to upscale and restore images using the AI tool Superar. The process begins with installing the necessary custom nodes and models through the manager in Comfy UI. The workflow is simplified for ease of use, focusing on core functionality. Users can drag and drop an image, select an upscale factor, and choose a model like Lightning XL for processing. The video emphasizes the importance of prompts for guiding the AI and adjusting the Super Control Scale and CFG scale for fine-tuning results. Examples are provided to illustrate how changes in these settings can affect image restoration and upscaling, showing both successful enhancements and the need for tweaking when results are not as desired. The tutorial concludes with suggestions for further customization and experimentation with different prompts and settings.

Takeaways

  • 📚 **Installation and Setup**: Start by installing the necessary custom nodes and workflow for using Supr (Super) in your environment.
  • 🔍 **Workflow Overview**: The provided workflow is a simplified version of the official one, designed for ease of use and core functionality.
  • 🖼️ **Image Upscaling**: Users can upscale images by a factor of their choosing, with a default setting of two times larger.
  • 🧩 **Checkpoint Loading**: The process involves loading a checkpoint, such as Lightning XL, which is a more resource-friendly model for Supr.
  • 🔍 **Finding Models**: For Lightning XL models, one can search on Civitai or other platforms for a variety of options.
  • 📈 **Control Net**: Supr is more of a control net rather than a traditional upscaler, which allows for fine-tuning of the image restoration process.
  • 📝 **Prompting for Quality**: Using prompts like 'high quality detail' can improve the output, while 'bad quality, blurry messy' can be used negatively.
  • 🎛️ **Parameter Tuning**: Adjusting the control scale and CFG scale (now unified as a single input) can help refine the image to the user's preference.
  • 🧩 **Resource Management**: For lower-end machines, using 'tile restore' can be less resource-intensive, while 'restore' may yield better results on more powerful hardware.
  • 🔄 **Iterative Adjustment**: Experiment with different values and prompts to achieve the desired outcome, as the optimal settings can vary greatly between images.
  • 🚀 **Advanced Customization**: For more advanced users, the workflow allows for separate values for different stages and the addition of AI upscalers for further customization.

Q & A

  • What is the purpose of the workflow mentioned in the transcript?

    -The purpose of the workflow is to upscale and restore images using a simplified process that allows users to quickly and easily enhance the quality and size of their images without needing to understand complex settings.

  • How can one install the necessary custom nodes for the workflow if they are missing?

    -If custom nodes are missing, the user should go to the 'manager' in the application, select 'install missing custom nodes,' choose the required nodes, and then press 'install.' After the installation is complete, the application should be restarted.

  • What is the default upscale factor set in the workflow?

    -The default upscale factor set in the workflow is two, which means the image will be made twice as large as the original.

  • Which model is recommended for use with the workflow?

    -The transcript recommends using the Lightning XL model for its lower resource requirements compared to the standard Stable Diffusion model. Specifically, the 'q1' model is suggested as a general-purpose option.

  • How can one adjust the quality and detail of the upscaled image?

    -The quality and detail of the upscaled image can be adjusted by modifying the 'Super Control Scale' value, tweaking the prompt to better describe the desired outcome, and selecting the appropriate sampler (tile or restore) based on the user's system capabilities.

  • What is the significance of the prompt in the workflow?

    -The prompt is crucial for guiding the AI to generate a more accurate and detailed image. By providing a clear description of the image content, the AI can better understand what details to enhance or restore.

  • What happens if the 'Super Control Scale' is set to a lower value?

    -Setting the 'Super Control Scale' to a lower value gives the AI more freedom to alter the image, which can result in a more detailed but potentially less coherent image that deviates more from the original.

  • How does changing the sampler from 'tile' to 'restore' affect the image?

    -Changing the sampler to 'restore' can improve the quality of the upscaled image by reducing artifacts and blurring, but it may also be more resource-intensive and take longer to process.

  • What is the recommended action if the upscaled image is not as expected?

    -If the upscaled image is not as expected, the user should experiment with different 'Super Control Scale' values, change the prompt to better describe the image, or select a different sampler to find the best balance between detail and coherence.

  • How can one find the Lightning XL model for use in the workflow?

    -The Lightning XL model can be found on Civitai or Hugging Face. The user can search for 'Stable Diffusion XL' models and install the desired one from the provided links in the comments section of the tutorial.

  • What are some additional tips for using the workflow effectively?

    -For effective use of the workflow, users should ensure they have a stable internet connection if using a cloud solution like Think Diffusion, refresh the page to clear errors, and consider using a fixed seed for consistent results when making adjustments.

Outlines

00:00

😀 Introduction to Image Upscaling with Comfy UI

The first paragraph introduces the concept of image upscaling and restoration using Comfy UI. The speaker demonstrates how to install and set up the software, troubleshoot common errors like missing custom nodes, and access the workflow file. The focus is on simplicity, with a basic workflow that allows users to upscale images by a factor of two and use a checkpoint with the lightning XL model. The paragraph also provides guidance on installing necessary models and custom nodes, and mentions the use of an online solution, Think Diffusion, for those without a suitable local machine.

05:01

🛠️ Customizing the Workflow for Image Quality

The second paragraph delves into customizing the workflow for better image quality. It discusses the use of prompts to guide the image restoration process, the importance of selecting the right model and checkpoint, and the process of adjusting control scale and CFG scale values. The speaker explains the impact of these adjustments on the final image, demonstrating how to fine-tune the image through trial and error. The paragraph also covers the choice between different samplers and the option to use a high VRAM setting for powerful machines.

10:01

🔍 Fine-Tuning the Restoration Process

The third paragraph focuses on fine-tuning the image restoration process. It presents a problematic example of a red truck image and explores various methods to improve the result, such as changing the sampler, adjusting the control scale, and modifying the prompt. The speaker emphasizes the importance of the prompt in guiding the restoration and the need for manual input over automatic taggers. The paragraph illustrates how different values and settings can significantly alter the restoration outcome, from a blurred image to a more detailed and coherent result.

15:04

🖼️ Upscaling and Enhancing Image Details

The fourth paragraph discusses the upscaling and detail enhancement of images. It shows the process of upscaling a high-resolution image and pushing it further by quadrupling its size. The speaker highlights the retention of image details and the introduction of artifacts at higher magnifications. The paragraph concludes with a mention of alternative upscaling methods, such as using different resamplers or AI upscalers, and encourages viewers to experiment with the workflow and share their preferences.

Mindmap

Keywords

💡AI Upscale

AI Upscale refers to the process of using artificial intelligence to increase the size of a digital image without losing quality or introducing pixelation. In the video, the host demonstrates how to upscale an image by a factor of two using AI technology, which is crucial for enhancing the detail in smaller images.

💡Restore

Restore in the context of the video means to repair or improve the quality of an image that may be damaged, degraded, or low-resolution. The host discusses restoring images using AI, which is an important application for preserving old or deteriorated photos.

💡Comfy UI

Comfy UI is a user interface for working with AI models, specifically for tasks like image upscaling and restoration. The script mentions installing and managing Comfy UI, which is the platform used to run the workflow for image processing in the video.

💡Custom Nodes

Custom Nodes are specialized components within a workflow that perform specific tasks. In the script, the host addresses an error related to missing custom nodes, which are essential for the workflow to function properly in Comfy UI.

💡Upscale by X Factor

Upscale by X Factor is a parameter that determines the magnification level of the image. The host sets this to two as a default, meaning the image will be doubled in size. This is a key concept in the video as it directly affects the output resolution of the upscaled image.

💡Checkpoint

A Checkpoint in the context of AI refers to a saved state of the model, which can be loaded to continue training or to use for inference. The video mentions loading a checkpoint, which is a necessary step for the AI to perform the upscaling and restoration tasks.

💡Control Net

Control Net is a term used to describe a system that manages the AI's processing to ensure the output meets certain criteria. The host mentions that the tool they are using, Superar, acts as a control net to guide the upscaling process, which is vital for maintaining image quality.

💡Prompt

In the context of AI image processing, a Prompt is a descriptive input given to the AI to guide the generation or transformation of an image. The host uses prompts like 'high quality detail' and 'bad quality, blurry messy' to direct the AI in enhancing or avoiding certain image characteristics.

💡CFG Scale

CFG Scale refers to the configuration scale, a parameter that adjusts the level of detail and control in the AI's processing. The host explains that this value is set specifically for the lightning model used and affects the final output of the upscaled image.

💡Super Control Scale

Super Control Scale is a value between zero and one that determines the degree to which the original image details are retained during the upscaling process. The host uses this to fine-tune the image, avoiding an 'overcooked' look while still enhancing the image quality.

💡Stable Diffusion

Stable Diffusion is an AI model used for generating images from textual descriptions. In the video, the host discusses using Stable Diffusion with a prompt to improve the upscaling process, demonstrating how it can introduce more detail that was initially not present in the image.

Highlights

AI can upscale and restore images with massive detail using a tool called Supir.

To get started with Supir, you may need to install missing custom nodes through the manager.

The workflow provided is a simplified version of the official workflow for ease of use.

Users can upscale images by a factor of two or more with the default settings.

Loading a checkpoint, such as Lightning XL, is a part of the upscaling process.

Supir is more of a control net rather than an upscaler, working well with SDXL models.

Resource requirements for Supir are high, which is why many opt for Lightning XL models.

The recommended model for Supir is the Q1 for general purposes, found in the manager's model section.

CFG scale and control scale have been merged into single inputs for simplicity.

CFG value should be set specifically for the lightning model used, often lower than regular models.

The Super Control Scale is adjustable between zero and one for different levels of detail.

Different images may require different Super Control Scale values for optimal results.

The prompt can be adjusted to improve the AI's understanding and restoration of specific images.

Restoration results can vary, and fine-tuning the Super Control Scale is key for certain images.

The sampler can be changed between tile and restore based on the machine's performance.

VRAM settings can be adjusted for machines with high performance graphics cards.

An image comparison feature allows users to see before and after results of the upscaling process.

Supir retains the style and some features of the original image even when introducing new details.

The importance of using a prompt for certain images is emphasized for better restoration results.

Different strategies such as changing the resampler or using additional AI upscalers can be employed for various outcomes.

The workflow is designed to be simple, allowing users to upscale and restore images quickly and effectively.