Stable Diffusion Upscale
Upscale the initial image to given shape. You can choose to restore the face within the image by turn up the visibility of gfpgan and codeformer (with upscaling_resize_ratio to 1)
Try it in the Widget Center
Click this url to try this widget and copy the Pro Config template.
Usage
Scale up the original image to the specified shape. You can opt to restore the face within the image by increasing the visibility of GFPGAN and Codeformer.
Input Parameters
Name | Type | Description | Default | Required |
---|---|---|---|---|
image |
| The input image, can be a url or base64 sting | ||
resize_mode |
| Sets the resize mode: 0 to upscale by upscaling_resize amount, 1 to upscale up to upscaling_resize_h x upscaling_resize_w. | 0 | |
gfpgan_visibility |
| Sets the visibility of GFPGAN, values should be between 0 and 1. Use for face restoring | 0 | |
codeformer_visibility |
| Sets the visibility of CodeFormer, values should be between 0 and 1. Use for face restoring | 0 | |
codeformer_weight |
| Sets the weight of CodeFormer, values should be between 0 and 1. Use for face restoring | 0 | |
upscaling_resize_ratio |
| By how much to upscale the image, only used when resize_mode=0. | 2 | |
upscaling_resize_w |
| Target width for the upscaler to hit. Only used when resize_mode=1. | 512 | |
upscaling_resize_h |
| Target height for the upscaler to hit. Only used when resize_mode=1. | 512 | |
upscaler_1 |
| The name of the main upscaler to use | ESRGAN_4x | |
upscaler_2 |
| The name of the secondary upscaler to use. Set to 'None' for quick upscale. The result will be a fusion of two model, decided by `extras_upscaler_2_visibility`. | None | |
extras_upscaler_2_visibility |
| Sets the visibility of secondary upscaler, values should be between 0 and 1. | 0 | |
upscale_first |
| Should the upscaler run before restoring faces? | False |
Output Parameters
Name | Type | Description | File Type |
---|---|---|---|
url |
| The url of generated image, stored in the cloud. Only temporarily effective, will be cleared in a few hours. |
|
Output Example
Detailed Guidelines
Upscale (SuperResolution)
Main parameter:
image
: The input image, can be a url or base64 sting. Any sizeresize_mode
: Sets the resize mode: 0 to upscale by upscaling_resize amount, 1 to upscale up to upscaling_resize_h x upscaling_resize_w.upscaling_resize_ratio
: By how much to upscale the image, only used when resize_mode=0.upscaling_resize_w & upscaling_resize_h
: Target width/height for the upscaler to hit. Only used when resize_mode=1. Change the ratio of with/height will casuing a center crop of generated imagesupscaler_1
: The name of the main upscaler to use, choose["None", "Lanczos", "Nearest", "ESRGAN_4x", "LDSR", "R-ESRGAN 4x+", "R-ESRGAN 4x+ Anime6B", "ScuNET GAN", "ScuNET PSNR", "SwinIR 4x"]
upscaler_2
: The name of the secondary upscaler to use. Set to 'None' to disable. The result will be a fusion of two model, decided byextras_upscaler_2_visibility
extras_upscaler_2_visibility
: Sets the visibility of secondary upscaler, values should be between 0 and 1. The result will befinal = (1-α) image_a + α image_b
Other functional parameter:
gfpgan_visibility
: Sets the visibility of GFPGAN, values should be between 0 and 1. Use for face restoring. 0 for disabled. The result will be a fusion additioncodeformer_visibility && codeformer_weight
: Sets the visibility and weight of CodeFormer, values should be between 0 and 1. Use for face restoring. The result will be a fusion additionupscale_first
: Should the upscaler run before restoring faces? default to False
Last updated