# Super Resolution

This function block is used to enhance the quality of images by upsampling them using advanced deep learning techniques. It improves image resolution and quality, making it ideal for applications that require high-definition output.

## 📥 Inputs <a href="#inputs" id="inputs"></a>

`Image Any` Accepts any input image to which super-resolution will be applied.

## 📤 Outputs <a href="#outputs" id="outputs"></a>

`Image Any` This output provides the upscaled version of the input image after applying super-resolution techniques.

## 🕹️ Controls <a href="#controls" id="controls"></a>

`SuperResolution Type` A dropdown menu that allows users to select from various super-resolution models. Each model may have different performance characteristics and scaling factors.

## 🎨 Features <a href="#features" id="features"></a>

`Multiple Models Available` The block allows users to select from a range of super-resolution models optimized for different scaling factors and performance.

`Dynamic Loading of Models` The selected model is loaded dynamically upon selection, ensuring that the most suitable model is used for the operation.

`Error Handling` Provides meaningful error messages to handle GPU memory issues or other exceptions during the execution of the model.

## 📝 Usage Instructions <a href="#usage" id="usage"></a>

1. **Input Image**: Connect an image that you want to upscale to the `Image Any` input.
2. **Select Model**: Choose the desired super-resolution model from the `SuperResolution Type` dropdown.
3. **Run Evaluation**: Execute the block to apply the super-resolution and retrieve the enhanced image.

## 📊 Evaluation <a href="#evaluation" id="evaluation"></a>

Upon evaluation, this function block processes the input image through the selected super-resolution model, resulting in an enhanced image that is output through the designated socket.

## 💡 Tips and Tricks <a href="#tips-and-tricks" id="tips-and-tricks"></a>

<details>

<summary>Handling Large Images</summary>

If the input image is too large, consider using the `Image Resizer` function block to reduce the size before applying super-resolution. This can help avoid memory issues during processing.

</details>

<details>

<summary>Choosing the Right Model</summary>

Experiment with different models available in the dropdown. Some are optimized for speed, while others prioritize quality. Based on your needs, choose a model that best suits your application.

</details>

<details>

<summary>GPU Memory Management</summary>

If you encounter out-of-memory errors, try using lighter models such as `FASTEST` or `FAST` versions as they use less GPU memory compared to higher-tier models.

</details>

## 🛠️ Troubleshooting <a href="#troubleshooting" id="troubleshooting"></a>

<details>

<summary>GPU Out of Memory</summary>

If you receive an error about GPU memory, consider selecting a lighter model or resizing the input image to reduce resource consumption.

</details>

<details>

<summary>Model Not Loading</summary>

Ensure that the model files are correctly placed in the specified `SUPER_RESOLUTION_MODEL_PATH` directory. Verify that all necessary model files exist for the selected model.

</details>
