Skip to content
SR-Forge

Basic Models

Bicubic

Bases: Model

A model that performs bicubic upsampling.

This model can upscale an image by a fixed factor or to match the dimensions of a provided high-resolution target image. It can operate on single tensors or dictionaries of tensors.

__init__(scale: Union[int, dict[str, int]])

Initializes the Bicubic model.

Parameters:

Name Type Description Default
scale Union[int, dict[str, int]]

The upsampling factor. Can be a single integer for all inputs or a dictionary mapping keys to integer scales for dictionary inputs.

required

HR

Bases: Model

A model that simply passes the high-resolution image through.

This is useful in SequentialModel flows where a specific stage might need to access the original HR image, or for debugging purposes. It acts as an identity function for the 'hr' input.