You're looking at a specific version of this model. Jump to the model overview.
Input schema
The fields you can use to run this model with an API. If you don’t give a value for a field its default value will be used.
Field | Type | Default value | Description |
---|---|---|---|
input |
string
|
Path to the input image you want to enhance.
|
|
upscaling_model_type |
string
(enum)
|
general_scenes
Options: faces, general_scenes |
Choose the type of model best suited for the primary content of the image: 'faces' for portraits and 'general_scenes' for everything else.
|
restoration_model_type |
string
(enum)
|
general_scenes
Options: faces, general_scenes |
Select the restoration model that aligns with the content of your image. This model is responsible for image restoration which removes degradations.
|
reload_restoration_model |
boolean
|
False
|
Reload the image restoration model (SwinIR) if set to True. This can be useful if you've updated or changed the underlying SwinIR model.
|
steps |
integer
|
50
Min: 1 Max: 100 |
The number of enhancement iterations to perform. More steps might result in a clearer image but can also introduce artifacts.
|
super_resolution_factor |
integer
|
4
Min: 1 Max: 4 |
Factor by which the input image resolution should be increased. For instance, a factor of 4 will make the resolution 4 times greater in both height and width.
|
repeat_times |
integer
|
1
Min: 1 Max: 10 |
Number of times the enhancement process is repeated by feeding the output back as input. This can refine the result but might also introduce over-enhancement issues.
|
disable_preprocess_model |
boolean
|
False
|
Disables the initial preprocessing step using SwinIR. Turn this off if your input image is already of high quality and doesn't require restoration.
|
tiled |
boolean
|
False
|
Whether to use patch-based sampling. This can be useful for very large images to enhance them in smaller chunks rather than all at once.
|
tile_size |
integer
|
512
|
Size of each tile (or patch) when 'tiled' option is enabled. Determines how the image is divided during patch-based enhancement.
|
tile_stride |
integer
|
256
|
Distance between the start of each tile when the image is divided for patch-based enhancement. A smaller stride means more overlap between tiles.
|
use_guidance |
boolean
|
False
|
Use latent image guidance for enhancement. This can help in achieving more accurate and contextually relevant enhancements.
|
guidance_scale |
number
|
0
|
For 'general_scenes': Scale factor for the guidance mechanism. Adjusts the influence of guidance on the enhancement process.
|
guidance_time_start |
integer
|
1001
|
For 'general_scenes': Specifies when (at which step) the guidance mechanism starts influencing the enhancement.
|
guidance_time_stop |
integer
|
-1
|
For 'general_scenes': Specifies when (at which step) the guidance mechanism stops influencing the enhancement.
|
guidance_space |
string
(enum)
|
latent
Options: rgb, latent |
For 'general_scenes': Determines in which space (RGB or latent) the guidance operates. 'latent' can often provide more subtle and context-aware enhancements.
|
guidance_repeat |
integer
|
5
|
For 'general_scenes': Number of times the guidance process is repeated during enhancement.
|
color_fix_type |
string
(enum)
|
wavelet
Options: wavelet, adain, none |
Method used for color correction post enhancement. 'wavelet' and 'adain' offer different styles of color correction, while 'none' skips this step.
|
seed |
integer
|
231
|
Random seed to ensure reproducibility. Setting this ensures that multiple runs with the same input produce the same output.
|
has_aligned |
boolean
|
False
|
For 'faces' mode: Indicates if the input images are already cropped and aligned to faces. If not, the model will attempt to do this.
|
only_center_face |
boolean
|
False
|
For 'faces' mode: If multiple faces are detected, only enhance the center-most face in the image.
|
face_detection_model |
string
(enum)
|
retinaface_resnet50
Options: retinaface_resnet50, retinaface_mobile0.25, YOLOv5l, YOLOv5n, dlib |
For 'faces' mode: Model used for detecting faces in the image. Choose based on accuracy and speed preferences.
|
background_upsampler |
string
(enum)
|
RealESRGAN
Options: DiffBIR, RealESRGAN |
For 'faces' mode: Model used to upscale the background in images where the primary subject is a face.
|
background_upsampler_tile |
integer
|
400
|
For 'faces' mode: Size of each tile used by the background upsampler when dividing the image into patches.
|
background_upsampler_tile_stride |
integer
|
400
|
For 'faces' mode: Distance between the start of each tile when the background is divided for upscaling. A smaller stride means more overlap between tiles.
|
Output schema
The shape of the response you’ll get when you run this model with an API.
{'items': {'format': 'uri', 'type': 'string'},
'title': 'Output',
'type': 'array'}