scale ¶
BaseWaifu2x dataclass
¶
BaseWaifu2x(
cuda: bool | Literal["trt"] | None = None,
num_streams: int | None = None,
fp16: bool = True,
device_id: int = 0,
matrix: MatrixT | None = None,
tiles: int | tuple[int, int] | None = None,
tilesize: int | tuple[int, int] | None = None,
overlap: int | tuple[int, int] | None = None,
backend_kwargs: KwargsT | None = None,
dynamic_shape: bool | None = None,
max_shapes: tuple[int, int] | None = (1936, 1088),
max_instances: int = 2,
*,
kernel: KernelT | None = None,
scaler: ScalerT | None = None,
shifter: KernelT | None = None
)
Bases: _BaseWaifu2x
, GenericScaler
Use Waifu2x neural network to scale clips.
backend_kwargs class-attribute
instance-attribute
¶
backend_kwargs: KwargsT | None = None
Kwargs passed to create the backend instance.
cuda class-attribute
instance-attribute
¶
Whether to run this on cpu, gpu, or use trt technology. None will pick the fastest automatically.
dynamic_shape class-attribute
instance-attribute
¶
dynamic_shape: bool | None = None
Use a single model for 0-max_shapes resolutions. None to automatically detect it. Will be True when previewing and TRT is available.
fp16 class-attribute
instance-attribute
¶
fp16: bool = True
Whether to use float16 precision if available.
kernel class-attribute
instance-attribute
¶
Base kernel to be used for certain scaling/shifting/resampling operations. Must be specified and defaults to catrom
matrix class-attribute
instance-attribute
¶
matrix: MatrixT | None = None
Input clip's matrix. Set only if necessary.
max_instances class-attribute
instance-attribute
¶
max_instances: int = 2
Maximum instances to spawn when scaling a variable resolution clip.
max_shapes class-attribute
instance-attribute
¶
Max shape for a dynamic model when using TRT and variable resolution clip. This can be overridden if the frame size is bigger.
num_streams class-attribute
instance-attribute
¶
num_streams: int | None = None
Number of gpu streams for the model.
overlap class-attribute
instance-attribute
¶
Overlap for reducing blocking artifacts between tile borders.
scale_function instance-attribute
¶
scale_function: GenericVSFunction
Scale function called internally when scaling
scaler class-attribute
instance-attribute
¶
Scaler used for scaling operations. Defaults to kernel.
shifter class-attribute
instance-attribute
¶
Kernel used for shifting operations. Defaults to kernel.
tiles class-attribute
instance-attribute
¶
Process in separate tiles instead of the whole frame. Use if [V]RAM limited.
tilesize class-attribute
instance-attribute
¶
Manually specify the size of a single tile.
ensure_obj classmethod
¶
ensure_obj(
scaler: str | type[BaseScalerT] | BaseScalerT | None = None,
/,
func_except: FuncExceptT | None = None,
) -> BaseScalerT
Source code
186 187 188 189 190 191 192 193 |
|
ensure_scaler ¶
Source code
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
|
from_param classmethod
¶
from_param(
scaler: str | type[BaseScalerT] | BaseScalerT | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[BaseScalerT]
Source code
177 178 179 180 181 182 183 184 |
|
get_clean_kwargs ¶
Source code
199 200 |
|
get_implemented_funcs ¶
Source code
270 271 |
|
get_scale_args ¶
get_scale_args(
clip: VideoNode,
shift: tuple[TopShift, LeftShift] = (0, 0),
width: int | None = None,
height: int | None = None,
*funcs: Callable[..., Any],
**kwargs: Any
) -> KwargsT
Source code
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 |
|
kernel_radius ¶
kernel_radius() -> int
Source code
195 196 197 |
|
multi ¶
multi(
clip: VideoNode,
multi: float = 2,
shift: tuple[TopShift, LeftShift] = (0, 0),
**kwargs: Any
) -> VideoNode
Source code
239 240 241 242 243 244 245 246 247 248 249 250 251 252 |
|
pretty_string ¶
pretty_string() -> str
Source code
202 203 204 205 206 207 208 209 210 211 212 213 214 |
|
scale ¶
scale(
clip: VideoNode,
width: int | None = None,
height: int | None = None,
shift: tuple[float, float] = (0, 0),
**kwargs: Any
) -> VideoNode
Source code
419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 |
|
DLISR dataclass
¶
DLISR(
scaler: ScalerT = lambda: DPID(0.5, Mitchell)(),
matrix: MatrixT | None = None,
device_id: int | None = None,
*,
kernel: KernelT | None = None,
shifter: KernelT | None = None
)
Bases: GenericScaler
Use Nvidia NGX Technology DLISR DNN to scale up nodes. https://developer.nvidia.com/rtx/ngx
device_id class-attribute
instance-attribute
¶
device_id: int | None = None
Which cuda device to run this filter on.
kernel class-attribute
instance-attribute
¶
Base kernel to be used for certain scaling/shifting/resampling operations. Must be specified and defaults to catrom
matrix class-attribute
instance-attribute
¶
matrix: MatrixT | None = None
Input clip's matrix. Set only if necessary.
scale_function instance-attribute
¶
scale_function: GenericVSFunction
Scale function called internally when scaling
scaler class-attribute
instance-attribute
¶
Scaler to use to downscale clip to desired resolution, if necessary.
shifter class-attribute
instance-attribute
¶
Kernel used for shifting operations. Defaults to kernel.
ensure_obj classmethod
¶
ensure_obj(
scaler: str | type[BaseScalerT] | BaseScalerT | None = None,
/,
func_except: FuncExceptT | None = None,
) -> BaseScalerT
Source code
186 187 188 189 190 191 192 193 |
|
ensure_scaler ¶
Source code
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
|
from_param classmethod
¶
from_param(
scaler: str | type[BaseScalerT] | BaseScalerT | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[BaseScalerT]
Source code
177 178 179 180 181 182 183 184 |
|
get_clean_kwargs ¶
Source code
199 200 |
|
get_implemented_funcs ¶
Source code
270 271 |
|
get_scale_args ¶
get_scale_args(
clip: VideoNode,
shift: tuple[TopShift, LeftShift] = (0, 0),
width: int | None = None,
height: int | None = None,
*funcs: Callable[..., Any],
**kwargs: Any
) -> KwargsT
Source code
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 |
|
kernel_radius ¶
kernel_radius() -> int
Source code
195 196 197 |
|
multi ¶
multi(
clip: VideoNode,
multi: float = 2,
shift: tuple[TopShift, LeftShift] = (0, 0),
**kwargs: Any
) -> VideoNode
Source code
239 240 241 242 243 244 245 246 247 248 249 250 251 252 |
|
pretty_string ¶
pretty_string() -> str
Source code
202 203 204 205 206 207 208 209 210 211 212 213 214 |
|
scale ¶
scale(
clip: VideoNode,
width: int | None = None,
height: int | None = None,
shift: tuple[float, float] = (0, 0),
*,
matrix: MatrixT | None = None,
**kwargs: Any
) -> VideoNode
Source code
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 |
|
DPID dataclass
¶
DPID(
sigma: float = 0.1,
ref: VideoNode | ScalerT = Catrom,
planes: PlanesT = None,
*,
kernel: KernelT | None = None,
scaler: ScalerT | None = None,
shifter: KernelT | None = None
)
Bases: GenericScaler
Rapid, Detail-Preserving Image Downscaler for VapourSynth
kernel class-attribute
instance-attribute
¶
Base kernel to be used for certain scaling/shifting/resampling operations. Must be specified and defaults to catrom
planes class-attribute
instance-attribute
¶
planes: PlanesT = None
Sets which planes will be processed. Any unprocessed planes will be simply copied from ref.
ref class-attribute
instance-attribute
¶
VideoNode or Scaler to obtain the downscaled reference for DPID.
scale_function instance-attribute
¶
scale_function: GenericVSFunction
Scale function called internally when scaling
scaler class-attribute
instance-attribute
¶
Scaler used for scaling operations. Defaults to kernel.
shifter class-attribute
instance-attribute
¶
Kernel used for shifting operations. Defaults to kernel.
sigma class-attribute
instance-attribute
¶
sigma: float = 0.1
The power factor of range kernel. It can be used to tune the amplification of the weights of pixels that represent detail—from a box filter over an emphasis of distinct pixels towards a selection of only the most distinct pixels.
ensure_obj classmethod
¶
ensure_obj(
scaler: str | type[BaseScalerT] | BaseScalerT | None = None,
/,
func_except: FuncExceptT | None = None,
) -> BaseScalerT
Source code
186 187 188 189 190 191 192 193 |
|
ensure_scaler ¶
Source code
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
|
from_param classmethod
¶
from_param(
scaler: str | type[BaseScalerT] | BaseScalerT | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[BaseScalerT]
Source code
177 178 179 180 181 182 183 184 |
|
get_clean_kwargs ¶
Source code
199 200 |
|
get_implemented_funcs ¶
Source code
270 271 |
|
get_scale_args ¶
get_scale_args(
clip: VideoNode,
shift: tuple[TopShift, LeftShift] = (0, 0),
width: int | None = None,
height: int | None = None,
*funcs: Callable[..., Any],
**kwargs: Any
) -> KwargsT
Source code
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 |
|
kernel_radius ¶
kernel_radius() -> int
Source code
73 74 75 |
|
multi ¶
multi(
clip: VideoNode,
multi: float = 2,
shift: tuple[TopShift, LeftShift] = (0, 0),
**kwargs: Any
) -> VideoNode
Source code
239 240 241 242 243 244 245 246 247 248 249 250 251 252 |
|
pretty_string ¶
pretty_string() -> str
Source code
202 203 204 205 206 207 208 209 210 211 212 213 214 |
|
scale ¶
scale(
clip: VideoNode,
width: int | None = None,
height: int | None = None,
shift: tuple[float, float] = (0, 0),
**kwargs: Any
) -> VideoNode
Source code
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
|
SSIM ¶
Bases: LinearScaler
SSIM downsampler is an image downscaling technique that aims to optimize for the perceptual quality of the downscaled results.
Image downscaling is considered as an optimization problem where the difference between the input and output images is measured using famous Structural SIMilarity (SSIM) index.
The solution is derived in closed-form, which leads to the simple, efficient implementation. The downscaled images retain perceptually important features and details, resulting in an accurate and spatio-temporally consistent representation of the high resolution input.
Parameters:
-
scaler
¶ScalerT
, default:Hermite
) –Scaler to be used for downscaling, defaults to Hermite.
-
smooth
¶int | float | VSFunction | None
, default:None
) –Image smoothening method. If you pass an int, it specifies the "radius" of the internally-used boxfilter, i.e. the window has a size of (2smooth+1)x(2smooth+1). If you pass a float, it specifies the "sigma" of gauss_blur, i.e. the standard deviation of gaussian blur. If you pass a function, it acts as a general smoother. Default uses a gaussian blur based on the scaler's kernel radius.
Source code
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
|
kwargs instance-attribute
¶
kwargs: KwargsT = kwargs
Arguments passed to the internal scale function
scale_function instance-attribute
¶
scale_function: GenericVSFunction
Scale function called internally when scaling
ensure_obj classmethod
¶
ensure_obj(
scaler: str | type[BaseScalerT] | BaseScalerT | None = None,
/,
func_except: FuncExceptT | None = None,
) -> BaseScalerT
Source code
186 187 188 189 190 191 192 193 |
|
from_param classmethod
¶
from_param(
scaler: str | type[BaseScalerT] | BaseScalerT | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[BaseScalerT]
Source code
177 178 179 180 181 182 183 184 |
|
get_clean_kwargs ¶
Source code
199 200 |
|
get_implemented_funcs ¶
Source code
270 271 |
|
get_scale_args ¶
get_scale_args(
clip: VideoNode,
shift: tuple[TopShift, LeftShift] = (0, 0),
width: int | None = None,
height: int | None = None,
*funcs: Callable[..., Any],
**kwargs: Any
) -> KwargsT
Source code
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 |
|
kernel_radius ¶
kernel_radius() -> int
Source code
143 144 145 |
|
multi ¶
multi(
clip: VideoNode,
multi: float = 2,
shift: tuple[TopShift, LeftShift] = (0, 0),
**kwargs: Any
) -> VideoNode
Source code
239 240 241 242 243 244 245 246 247 248 249 250 251 252 |
|
pretty_string ¶
pretty_string() -> str
Source code
202 203 204 205 206 207 208 209 210 211 212 213 214 |
|
scale ¶
scale(
clip: VideoNode,
width: int | None = None,
height: int | None = None,
shift: tuple[TopShift, LeftShift] = (0, 0),
*,
linear: bool = False,
sigmoid: bool | tuple[Slope, Center] = False,
**kwargs: Any
) -> VideoNode
Source code
82 83 84 85 86 87 88 89 |
|
Waifu2x dataclass
¶
Waifu2x(
cuda: bool | Literal["trt"] | None = None,
num_streams: int | None = None,
fp16: bool = True,
device_id: int = 0,
matrix: MatrixT | None = None,
tiles: int | tuple[int, int] | None = None,
tilesize: int | tuple[int, int] | None = None,
overlap: int | tuple[int, int] | None = None,
backend_kwargs: KwargsT | None = None,
dynamic_shape: bool | None = None,
max_shapes: tuple[int, int] | None = (1936, 1088),
max_instances: int = 2,
*,
kernel: KernelT | None = None,
scaler: ScalerT | None = None,
shifter: KernelT | None = None
)
Bases: BaseWaifu2x
backend_kwargs class-attribute
instance-attribute
¶
backend_kwargs: KwargsT | None = None
Kwargs passed to create the backend instance.
cuda class-attribute
instance-attribute
¶
Whether to run this on cpu, gpu, or use trt technology. None will pick the fastest automatically.
dynamic_shape class-attribute
instance-attribute
¶
dynamic_shape: bool | None = None
Use a single model for 0-max_shapes resolutions. None to automatically detect it. Will be True when previewing and TRT is available.
fp16 class-attribute
instance-attribute
¶
fp16: bool = True
Whether to use float16 precision if available.
kernel class-attribute
instance-attribute
¶
Base kernel to be used for certain scaling/shifting/resampling operations. Must be specified and defaults to catrom
matrix class-attribute
instance-attribute
¶
matrix: MatrixT | None = None
Input clip's matrix. Set only if necessary.
max_instances class-attribute
instance-attribute
¶
max_instances: int = 2
Maximum instances to spawn when scaling a variable resolution clip.
max_shapes class-attribute
instance-attribute
¶
Max shape for a dynamic model when using TRT and variable resolution clip. This can be overridden if the frame size is bigger.
num_streams class-attribute
instance-attribute
¶
num_streams: int | None = None
Number of gpu streams for the model.
overlap class-attribute
instance-attribute
¶
Overlap for reducing blocking artifacts between tile borders.
scale_function instance-attribute
¶
scale_function: GenericVSFunction
Scale function called internally when scaling
scaler class-attribute
instance-attribute
¶
Scaler used for scaling operations. Defaults to kernel.
shifter class-attribute
instance-attribute
¶
Kernel used for shifting operations. Defaults to kernel.
tiles class-attribute
instance-attribute
¶
Process in separate tiles instead of the whole frame. Use if [V]RAM limited.
tilesize class-attribute
instance-attribute
¶
Manually specify the size of a single tile.
AnimeStyleArt dataclass
¶
AnimeStyleArt(
cuda: bool | Literal["trt"] | None = None,
num_streams: int | None = None,
fp16: bool = True,
device_id: int = 0,
matrix: MatrixT | None = None,
tiles: int | tuple[int, int] | None = None,
tilesize: int | tuple[int, int] | None = None,
overlap: int | tuple[int, int] | None = None,
backend_kwargs: KwargsT | None = None,
dynamic_shape: bool | None = None,
max_shapes: tuple[int, int] | None = (1936, 1088),
max_instances: int = 2,
*,
kernel: KernelT | None = None,
scaler: ScalerT | None = None,
shifter: KernelT | None = None
)
Bases: BaseWaifu2x
backend_kwargs class-attribute
instance-attribute
¶
backend_kwargs: KwargsT | None = None
Kwargs passed to create the backend instance.
cuda class-attribute
instance-attribute
¶
Whether to run this on cpu, gpu, or use trt technology. None will pick the fastest automatically.
dynamic_shape class-attribute
instance-attribute
¶
dynamic_shape: bool | None = None
Use a single model for 0-max_shapes resolutions. None to automatically detect it. Will be True when previewing and TRT is available.
fp16 class-attribute
instance-attribute
¶
fp16: bool = True
Whether to use float16 precision if available.
kernel class-attribute
instance-attribute
¶
Base kernel to be used for certain scaling/shifting/resampling operations. Must be specified and defaults to catrom
matrix class-attribute
instance-attribute
¶
matrix: MatrixT | None = None
Input clip's matrix. Set only if necessary.
max_instances class-attribute
instance-attribute
¶
max_instances: int = 2
Maximum instances to spawn when scaling a variable resolution clip.
max_shapes class-attribute
instance-attribute
¶
Max shape for a dynamic model when using TRT and variable resolution clip. This can be overridden if the frame size is bigger.
num_streams class-attribute
instance-attribute
¶
num_streams: int | None = None
Number of gpu streams for the model.
overlap class-attribute
instance-attribute
¶
Overlap for reducing blocking artifacts between tile borders.
scale_function instance-attribute
¶
scale_function: GenericVSFunction
Scale function called internally when scaling
scaler class-attribute
instance-attribute
¶
Scaler used for scaling operations. Defaults to kernel.
shifter class-attribute
instance-attribute
¶
Kernel used for shifting operations. Defaults to kernel.
tiles class-attribute
instance-attribute
¶
Process in separate tiles instead of the whole frame. Use if [V]RAM limited.
tilesize class-attribute
instance-attribute
¶
Manually specify the size of a single tile.
ensure_obj classmethod
¶
ensure_obj(
scaler: str | type[BaseScalerT] | BaseScalerT | None = None,
/,
func_except: FuncExceptT | None = None,
) -> BaseScalerT
Source code
186 187 188 189 190 191 192 193 |
|
ensure_scaler ¶
Source code
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
|
from_param classmethod
¶
from_param(
scaler: str | type[BaseScalerT] | BaseScalerT | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[BaseScalerT]
Source code
177 178 179 180 181 182 183 184 |
|
get_clean_kwargs ¶
Source code
199 200 |
|
get_implemented_funcs ¶
Source code
270 271 |
|
get_scale_args ¶
get_scale_args(
clip: VideoNode,
shift: tuple[TopShift, LeftShift] = (0, 0),
width: int | None = None,
height: int | None = None,
*funcs: Callable[..., Any],
**kwargs: Any
) -> KwargsT
Source code
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 |
|
kernel_radius ¶
kernel_radius() -> int
Source code
195 196 197 |
|
multi ¶
multi(
clip: VideoNode,
multi: float = 2,
shift: tuple[TopShift, LeftShift] = (0, 0),
**kwargs: Any
) -> VideoNode
Source code
239 240 241 242 243 244 245 246 247 248 249 250 251 252 |
|
pretty_string ¶
pretty_string() -> str
Source code
202 203 204 205 206 207 208 209 210 211 212 213 214 |
|
scale ¶
scale(
clip: VideoNode,
width: int | None = None,
height: int | None = None,
shift: tuple[float, float] = (0, 0),
**kwargs: Any
) -> VideoNode
Source code
419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 |
|
Cunet dataclass
¶
Cunet(
cuda: bool | Literal["trt"] | None = None,
num_streams: int | None = None,
fp16: bool = True,
device_id: int = 0,
matrix: MatrixT | None = None,
tiles: int | tuple[int, int] | None = None,
tilesize: int | tuple[int, int] | None = None,
overlap: int | tuple[int, int] | None = None,
backend_kwargs: KwargsT | None = None,
dynamic_shape: bool | None = None,
max_shapes: tuple[int, int] | None = (1936, 1088),
max_instances: int = 2,
*,
kernel: KernelT | None = None,
scaler: ScalerT | None = None,
shifter: KernelT | None = None
)
Bases: BaseWaifu2x
backend_kwargs class-attribute
instance-attribute
¶
backend_kwargs: KwargsT | None = None
Kwargs passed to create the backend instance.
cuda class-attribute
instance-attribute
¶
Whether to run this on cpu, gpu, or use trt technology. None will pick the fastest automatically.
dynamic_shape class-attribute
instance-attribute
¶
dynamic_shape: bool | None = None
Use a single model for 0-max_shapes resolutions. None to automatically detect it. Will be True when previewing and TRT is available.
fp16 class-attribute
instance-attribute
¶
fp16: bool = True
Whether to use float16 precision if available.
kernel class-attribute
instance-attribute
¶
Base kernel to be used for certain scaling/shifting/resampling operations. Must be specified and defaults to catrom
matrix class-attribute
instance-attribute
¶
matrix: MatrixT | None = None
Input clip's matrix. Set only if necessary.
max_instances class-attribute
instance-attribute
¶
max_instances: int = 2
Maximum instances to spawn when scaling a variable resolution clip.
max_shapes class-attribute
instance-attribute
¶
Max shape for a dynamic model when using TRT and variable resolution clip. This can be overridden if the frame size is bigger.
num_streams class-attribute
instance-attribute
¶
num_streams: int | None = None
Number of gpu streams for the model.
overlap class-attribute
instance-attribute
¶
Overlap for reducing blocking artifacts between tile borders.
scale_function instance-attribute
¶
scale_function: GenericVSFunction
Scale function called internally when scaling
scaler class-attribute
instance-attribute
¶
Scaler used for scaling operations. Defaults to kernel.
shifter class-attribute
instance-attribute
¶
Kernel used for shifting operations. Defaults to kernel.
tiles class-attribute
instance-attribute
¶
Process in separate tiles instead of the whole frame. Use if [V]RAM limited.
tilesize class-attribute
instance-attribute
¶
Manually specify the size of a single tile.
ensure_obj classmethod
¶
ensure_obj(
scaler: str | type[BaseScalerT] | BaseScalerT | None = None,
/,
func_except: FuncExceptT | None = None,
) -> BaseScalerT
Source code
186 187 188 189 190 191 192 193 |
|
ensure_scaler ¶
Source code
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
|
from_param classmethod
¶
from_param(
scaler: str | type[BaseScalerT] | BaseScalerT | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[BaseScalerT]
Source code
177 178 179 180 181 182 183 184 |
|
get_clean_kwargs ¶
Source code
199 200 |
|
get_implemented_funcs ¶
Source code
270 271 |
|
get_scale_args ¶
get_scale_args(
clip: VideoNode,
shift: tuple[TopShift, LeftShift] = (0, 0),
width: int | None = None,
height: int | None = None,
*funcs: Callable[..., Any],
**kwargs: Any
) -> KwargsT
Source code
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 |
|
kernel_radius ¶
kernel_radius() -> int
Source code
195 196 197 |
|
multi ¶
multi(
clip: VideoNode,
multi: float = 2,
shift: tuple[TopShift, LeftShift] = (0, 0),
**kwargs: Any
) -> VideoNode
Source code
239 240 241 242 243 244 245 246 247 248 249 250 251 252 |
|
pretty_string ¶
pretty_string() -> str
Source code
202 203 204 205 206 207 208 209 210 211 212 213 214 |
|
scale ¶
scale(
clip: VideoNode,
width: int | None = None,
height: int | None = None,
shift: tuple[float, float] = (0, 0),
**kwargs: Any
) -> VideoNode
Source code
419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 |
|
Photo dataclass
¶
Photo(
cuda: bool | Literal["trt"] | None = None,
num_streams: int | None = None,
fp16: bool = True,
device_id: int = 0,
matrix: MatrixT | None = None,
tiles: int | tuple[int, int] | None = None,
tilesize: int | tuple[int, int] | None = None,
overlap: int | tuple[int, int] | None = None,
backend_kwargs: KwargsT | None = None,
dynamic_shape: bool | None = None,
max_shapes: tuple[int, int] | None = (1936, 1088),
max_instances: int = 2,
*,
kernel: KernelT | None = None,
scaler: ScalerT | None = None,
shifter: KernelT | None = None
)
Bases: BaseWaifu2x
backend_kwargs class-attribute
instance-attribute
¶
backend_kwargs: KwargsT | None = None
Kwargs passed to create the backend instance.
cuda class-attribute
instance-attribute
¶
Whether to run this on cpu, gpu, or use trt technology. None will pick the fastest automatically.
dynamic_shape class-attribute
instance-attribute
¶
dynamic_shape: bool | None = None
Use a single model for 0-max_shapes resolutions. None to automatically detect it. Will be True when previewing and TRT is available.
fp16 class-attribute
instance-attribute
¶
fp16: bool = True
Whether to use float16 precision if available.
kernel class-attribute
instance-attribute
¶
Base kernel to be used for certain scaling/shifting/resampling operations. Must be specified and defaults to catrom
matrix class-attribute
instance-attribute
¶
matrix: MatrixT | None = None
Input clip's matrix. Set only if necessary.
max_instances class-attribute
instance-attribute
¶
max_instances: int = 2
Maximum instances to spawn when scaling a variable resolution clip.
max_shapes class-attribute
instance-attribute
¶
Max shape for a dynamic model when using TRT and variable resolution clip. This can be overridden if the frame size is bigger.
num_streams class-attribute
instance-attribute
¶
num_streams: int | None = None
Number of gpu streams for the model.
overlap class-attribute
instance-attribute
¶
Overlap for reducing blocking artifacts between tile borders.
scale_function instance-attribute
¶
scale_function: GenericVSFunction
Scale function called internally when scaling
scaler class-attribute
instance-attribute
¶
Scaler used for scaling operations. Defaults to kernel.
shifter class-attribute
instance-attribute
¶
Kernel used for shifting operations. Defaults to kernel.
tiles class-attribute
instance-attribute
¶
Process in separate tiles instead of the whole frame. Use if [V]RAM limited.
tilesize class-attribute
instance-attribute
¶
Manually specify the size of a single tile.
ensure_obj classmethod
¶
ensure_obj(
scaler: str | type[BaseScalerT] | BaseScalerT | None = None,
/,
func_except: FuncExceptT | None = None,
) -> BaseScalerT
Source code
186 187 188 189 190 191 192 193 |
|
ensure_scaler ¶
Source code
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
|
from_param classmethod
¶
from_param(
scaler: str | type[BaseScalerT] | BaseScalerT | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[BaseScalerT]
Source code
177 178 179 180 181 182 183 184 |
|
get_clean_kwargs ¶
Source code
199 200 |
|
get_implemented_funcs ¶
Source code
270 271 |
|
get_scale_args ¶
get_scale_args(
clip: VideoNode,
shift: tuple[TopShift, LeftShift] = (0, 0),
width: int | None = None,
height: int | None = None,
*funcs: Callable[..., Any],
**kwargs: Any
) -> KwargsT
Source code
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 |
|
kernel_radius ¶
kernel_radius() -> int
Source code
195 196 197 |
|
multi ¶
multi(
clip: VideoNode,
multi: float = 2,
shift: tuple[TopShift, LeftShift] = (0, 0),
**kwargs: Any
) -> VideoNode
Source code
239 240 241 242 243 244 245 246 247 248 249 250 251 252 |
|
pretty_string ¶
pretty_string() -> str
Source code
202 203 204 205 206 207 208 209 210 211 212 213 214 |
|
scale ¶
scale(
clip: VideoNode,
width: int | None = None,
height: int | None = None,
shift: tuple[float, float] = (0, 0),
**kwargs: Any
) -> VideoNode
Source code
419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 |
|
SwinUnetArt dataclass
¶
SwinUnetArt(
cuda: bool | Literal["trt"] | None = None,
num_streams: int | None = None,
fp16: bool = True,
device_id: int = 0,
matrix: MatrixT | None = None,
tiles: int | tuple[int, int] | None = None,
tilesize: int | tuple[int, int] | None = None,
overlap: int | tuple[int, int] | None = None,
backend_kwargs: KwargsT | None = None,
dynamic_shape: bool | None = None,
max_shapes: tuple[int, int] | None = (1936, 1088),
max_instances: int = 2,
*,
kernel: KernelT | None = None,
scaler: ScalerT | None = None,
shifter: KernelT | None = None
)
Bases: BaseWaifu2x
backend_kwargs class-attribute
instance-attribute
¶
backend_kwargs: KwargsT | None = None
Kwargs passed to create the backend instance.
cuda class-attribute
instance-attribute
¶
Whether to run this on cpu, gpu, or use trt technology. None will pick the fastest automatically.
dynamic_shape class-attribute
instance-attribute
¶
dynamic_shape: bool | None = None
Use a single model for 0-max_shapes resolutions. None to automatically detect it. Will be True when previewing and TRT is available.
fp16 class-attribute
instance-attribute
¶
fp16: bool = True
Whether to use float16 precision if available.
kernel class-attribute
instance-attribute
¶
Base kernel to be used for certain scaling/shifting/resampling operations. Must be specified and defaults to catrom
matrix class-attribute
instance-attribute
¶
matrix: MatrixT | None = None
Input clip's matrix. Set only if necessary.
max_instances class-attribute
instance-attribute
¶
max_instances: int = 2
Maximum instances to spawn when scaling a variable resolution clip.
max_shapes class-attribute
instance-attribute
¶
Max shape for a dynamic model when using TRT and variable resolution clip. This can be overridden if the frame size is bigger.
num_streams class-attribute
instance-attribute
¶
num_streams: int | None = None
Number of gpu streams for the model.
overlap class-attribute
instance-attribute
¶
Overlap for reducing blocking artifacts between tile borders.
scale_function instance-attribute
¶
scale_function: GenericVSFunction
Scale function called internally when scaling
scaler class-attribute
instance-attribute
¶
Scaler used for scaling operations. Defaults to kernel.
shifter class-attribute
instance-attribute
¶
Kernel used for shifting operations. Defaults to kernel.
tiles class-attribute
instance-attribute
¶
Process in separate tiles instead of the whole frame. Use if [V]RAM limited.
tilesize class-attribute
instance-attribute
¶
Manually specify the size of a single tile.
ensure_obj classmethod
¶
ensure_obj(
scaler: str | type[BaseScalerT] | BaseScalerT | None = None,
/,
func_except: FuncExceptT | None = None,
) -> BaseScalerT
Source code
186 187 188 189 190 191 192 193 |
|
ensure_scaler ¶
Source code
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
|
from_param classmethod
¶
from_param(
scaler: str | type[BaseScalerT] | BaseScalerT | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[BaseScalerT]
Source code
177 178 179 180 181 182 183 184 |
|
get_clean_kwargs ¶
Source code
199 200 |
|
get_implemented_funcs ¶
Source code
270 271 |
|
get_scale_args ¶
get_scale_args(
clip: VideoNode,
shift: tuple[TopShift, LeftShift] = (0, 0),
width: int | None = None,
height: int | None = None,
*funcs: Callable[..., Any],
**kwargs: Any
) -> KwargsT
Source code
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 |
|
kernel_radius ¶
kernel_radius() -> int
Source code
195 196 197 |
|
multi ¶
multi(
clip: VideoNode,
multi: float = 2,
shift: tuple[TopShift, LeftShift] = (0, 0),
**kwargs: Any
) -> VideoNode
Source code
239 240 241 242 243 244 245 246 247 248 249 250 251 252 |
|
pretty_string ¶
pretty_string() -> str
Source code
202 203 204 205 206 207 208 209 210 211 212 213 214 |
|
scale ¶
scale(
clip: VideoNode,
width: int | None = None,
height: int | None = None,
shift: tuple[float, float] = (0, 0),
**kwargs: Any
) -> VideoNode
Source code
419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 |
|
SwinUnetArtScan dataclass
¶
SwinUnetArtScan(
cuda: bool | Literal["trt"] | None = None,
num_streams: int | None = None,
fp16: bool = True,
device_id: int = 0,
matrix: MatrixT | None = None,
tiles: int | tuple[int, int] | None = None,
tilesize: int | tuple[int, int] | None = None,
overlap: int | tuple[int, int] | None = None,
backend_kwargs: KwargsT | None = None,
dynamic_shape: bool | None = None,
max_shapes: tuple[int, int] | None = (1936, 1088),
max_instances: int = 2,
*,
kernel: KernelT | None = None,
scaler: ScalerT | None = None,
shifter: KernelT | None = None
)
Bases: BaseWaifu2x
backend_kwargs class-attribute
instance-attribute
¶
backend_kwargs: KwargsT | None = None
Kwargs passed to create the backend instance.
cuda class-attribute
instance-attribute
¶
Whether to run this on cpu, gpu, or use trt technology. None will pick the fastest automatically.
dynamic_shape class-attribute
instance-attribute
¶
dynamic_shape: bool | None = None
Use a single model for 0-max_shapes resolutions. None to automatically detect it. Will be True when previewing and TRT is available.
fp16 class-attribute
instance-attribute
¶
fp16: bool = True
Whether to use float16 precision if available.
kernel class-attribute
instance-attribute
¶
Base kernel to be used for certain scaling/shifting/resampling operations. Must be specified and defaults to catrom
matrix class-attribute
instance-attribute
¶
matrix: MatrixT | None = None
Input clip's matrix. Set only if necessary.
max_instances class-attribute
instance-attribute
¶
max_instances: int = 2
Maximum instances to spawn when scaling a variable resolution clip.
max_shapes class-attribute
instance-attribute
¶
Max shape for a dynamic model when using TRT and variable resolution clip. This can be overridden if the frame size is bigger.
num_streams class-attribute
instance-attribute
¶
num_streams: int | None = None
Number of gpu streams for the model.
overlap class-attribute
instance-attribute
¶
Overlap for reducing blocking artifacts between tile borders.
scale_function instance-attribute
¶
scale_function: GenericVSFunction
Scale function called internally when scaling
scaler class-attribute
instance-attribute
¶
Scaler used for scaling operations. Defaults to kernel.
shifter class-attribute
instance-attribute
¶
Kernel used for shifting operations. Defaults to kernel.
tiles class-attribute
instance-attribute
¶
Process in separate tiles instead of the whole frame. Use if [V]RAM limited.
tilesize class-attribute
instance-attribute
¶
Manually specify the size of a single tile.
ensure_obj classmethod
¶
ensure_obj(
scaler: str | type[BaseScalerT] | BaseScalerT | None = None,
/,
func_except: FuncExceptT | None = None,
) -> BaseScalerT
Source code
186 187 188 189 190 191 192 193 |
|
ensure_scaler ¶
Source code
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
|
from_param classmethod
¶
from_param(
scaler: str | type[BaseScalerT] | BaseScalerT | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[BaseScalerT]
Source code
177 178 179 180 181 182 183 184 |
|
get_clean_kwargs ¶
Source code
199 200 |
|
get_implemented_funcs ¶
Source code
270 271 |
|
get_scale_args ¶
get_scale_args(
clip: VideoNode,
shift: tuple[TopShift, LeftShift] = (0, 0),
width: int | None = None,
height: int | None = None,
*funcs: Callable[..., Any],
**kwargs: Any
) -> KwargsT
Source code
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 |
|
kernel_radius ¶
kernel_radius() -> int
Source code
195 196 197 |
|
multi ¶
multi(
clip: VideoNode,
multi: float = 2,
shift: tuple[TopShift, LeftShift] = (0, 0),
**kwargs: Any
) -> VideoNode
Source code
239 240 241 242 243 244 245 246 247 248 249 250 251 252 |
|
pretty_string ¶
pretty_string() -> str
Source code
202 203 204 205 206 207 208 209 210 211 212 213 214 |
|
scale ¶
scale(
clip: VideoNode,
width: int | None = None,
height: int | None = None,
shift: tuple[float, float] = (0, 0),
**kwargs: Any
) -> VideoNode
Source code
419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 |
|
SwinUnetPhoto dataclass
¶
SwinUnetPhoto(
cuda: bool | Literal["trt"] | None = None,
num_streams: int | None = None,
fp16: bool = True,
device_id: int = 0,
matrix: MatrixT | None = None,
tiles: int | tuple[int, int] | None = None,
tilesize: int | tuple[int, int] | None = None,
overlap: int | tuple[int, int] | None = None,
backend_kwargs: KwargsT | None = None,
dynamic_shape: bool | None = None,
max_shapes: tuple[int, int] | None = (1936, 1088),
max_instances: int = 2,
*,
kernel: KernelT | None = None,
scaler: ScalerT | None = None,
shifter: KernelT | None = None
)
Bases: BaseWaifu2x
backend_kwargs class-attribute
instance-attribute
¶
backend_kwargs: KwargsT | None = None
Kwargs passed to create the backend instance.
cuda class-attribute
instance-attribute
¶
Whether to run this on cpu, gpu, or use trt technology. None will pick the fastest automatically.
dynamic_shape class-attribute
instance-attribute
¶
dynamic_shape: bool | None = None
Use a single model for 0-max_shapes resolutions. None to automatically detect it. Will be True when previewing and TRT is available.
fp16 class-attribute
instance-attribute
¶
fp16: bool = True
Whether to use float16 precision if available.
kernel class-attribute
instance-attribute
¶
Base kernel to be used for certain scaling/shifting/resampling operations. Must be specified and defaults to catrom
matrix class-attribute
instance-attribute
¶
matrix: MatrixT | None = None
Input clip's matrix. Set only if necessary.
max_instances class-attribute
instance-attribute
¶
max_instances: int = 2
Maximum instances to spawn when scaling a variable resolution clip.
max_shapes class-attribute
instance-attribute
¶
Max shape for a dynamic model when using TRT and variable resolution clip. This can be overridden if the frame size is bigger.
num_streams class-attribute
instance-attribute
¶
num_streams: int | None = None
Number of gpu streams for the model.
overlap class-attribute
instance-attribute
¶
Overlap for reducing blocking artifacts between tile borders.
scale_function instance-attribute
¶
scale_function: GenericVSFunction
Scale function called internally when scaling
scaler class-attribute
instance-attribute
¶
Scaler used for scaling operations. Defaults to kernel.
shifter class-attribute
instance-attribute
¶
Kernel used for shifting operations. Defaults to kernel.
tiles class-attribute
instance-attribute
¶
Process in separate tiles instead of the whole frame. Use if [V]RAM limited.
tilesize class-attribute
instance-attribute
¶
Manually specify the size of a single tile.
ensure_obj classmethod
¶
ensure_obj(
scaler: str | type[BaseScalerT] | BaseScalerT | None = None,
/,
func_except: FuncExceptT | None = None,
) -> BaseScalerT
Source code
186 187 188 189 190 191 192 193 |
|
ensure_scaler ¶
Source code
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
|
from_param classmethod
¶
from_param(
scaler: str | type[BaseScalerT] | BaseScalerT | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[BaseScalerT]
Source code
177 178 179 180 181 182 183 184 |
|
get_clean_kwargs ¶
Source code
199 200 |
|
get_implemented_funcs ¶
Source code
270 271 |
|
get_scale_args ¶
get_scale_args(
clip: VideoNode,
shift: tuple[TopShift, LeftShift] = (0, 0),
width: int | None = None,
height: int | None = None,
*funcs: Callable[..., Any],
**kwargs: Any
) -> KwargsT
Source code
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 |
|
kernel_radius ¶
kernel_radius() -> int
Source code
195 196 197 |
|
multi ¶
multi(
clip: VideoNode,
multi: float = 2,
shift: tuple[TopShift, LeftShift] = (0, 0),
**kwargs: Any
) -> VideoNode
Source code
239 240 241 242 243 244 245 246 247 248 249 250 251 252 |
|
pretty_string ¶
pretty_string() -> str
Source code
202 203 204 205 206 207 208 209 210 211 212 213 214 |
|
scale ¶
scale(
clip: VideoNode,
width: int | None = None,
height: int | None = None,
shift: tuple[float, float] = (0, 0),
**kwargs: Any
) -> VideoNode
Source code
419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 |
|
SwinUnetPhotoV2 dataclass
¶
SwinUnetPhotoV2(
cuda: bool | Literal["trt"] | None = None,
num_streams: int | None = None,
fp16: bool = True,
device_id: int = 0,
matrix: MatrixT | None = None,
tiles: int | tuple[int, int] | None = None,
tilesize: int | tuple[int, int] | None = None,
overlap: int | tuple[int, int] | None = None,
backend_kwargs: KwargsT | None = None,
dynamic_shape: bool | None = None,
max_shapes: tuple[int, int] | None = (1936, 1088),
max_instances: int = 2,
*,
kernel: KernelT | None = None,
scaler: ScalerT | None = None,
shifter: KernelT | None = None
)
Bases: BaseWaifu2x
backend_kwargs class-attribute
instance-attribute
¶
backend_kwargs: KwargsT | None = None
Kwargs passed to create the backend instance.
cuda class-attribute
instance-attribute
¶
Whether to run this on cpu, gpu, or use trt technology. None will pick the fastest automatically.
dynamic_shape class-attribute
instance-attribute
¶
dynamic_shape: bool | None = None
Use a single model for 0-max_shapes resolutions. None to automatically detect it. Will be True when previewing and TRT is available.
fp16 class-attribute
instance-attribute
¶
fp16: bool = True
Whether to use float16 precision if available.
kernel class-attribute
instance-attribute
¶
Base kernel to be used for certain scaling/shifting/resampling operations. Must be specified and defaults to catrom
matrix class-attribute
instance-attribute
¶
matrix: MatrixT | None = None
Input clip's matrix. Set only if necessary.
max_instances class-attribute
instance-attribute
¶
max_instances: int = 2
Maximum instances to spawn when scaling a variable resolution clip.
max_shapes class-attribute
instance-attribute
¶
Max shape for a dynamic model when using TRT and variable resolution clip. This can be overridden if the frame size is bigger.
num_streams class-attribute
instance-attribute
¶
num_streams: int | None = None
Number of gpu streams for the model.
overlap class-attribute
instance-attribute
¶
Overlap for reducing blocking artifacts between tile borders.
scale_function instance-attribute
¶
scale_function: GenericVSFunction
Scale function called internally when scaling
scaler class-attribute
instance-attribute
¶
Scaler used for scaling operations. Defaults to kernel.
shifter class-attribute
instance-attribute
¶
Kernel used for shifting operations. Defaults to kernel.
tiles class-attribute
instance-attribute
¶
Process in separate tiles instead of the whole frame. Use if [V]RAM limited.
tilesize class-attribute
instance-attribute
¶
Manually specify the size of a single tile.
ensure_obj classmethod
¶
ensure_obj(
scaler: str | type[BaseScalerT] | BaseScalerT | None = None,
/,
func_except: FuncExceptT | None = None,
) -> BaseScalerT
Source code
186 187 188 189 190 191 192 193 |
|
ensure_scaler ¶
Source code
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
|
from_param classmethod
¶
from_param(
scaler: str | type[BaseScalerT] | BaseScalerT | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[BaseScalerT]
Source code
177 178 179 180 181 182 183 184 |
|
get_clean_kwargs ¶
Source code
199 200 |
|
get_implemented_funcs ¶
Source code
270 271 |
|
get_scale_args ¶
get_scale_args(
clip: VideoNode,
shift: tuple[TopShift, LeftShift] = (0, 0),
width: int | None = None,
height: int | None = None,
*funcs: Callable[..., Any],
**kwargs: Any
) -> KwargsT
Source code
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 |
|
kernel_radius ¶
kernel_radius() -> int
Source code
195 196 197 |
|
multi ¶
multi(
clip: VideoNode,
multi: float = 2,
shift: tuple[TopShift, LeftShift] = (0, 0),
**kwargs: Any
) -> VideoNode
Source code
239 240 241 242 243 244 245 246 247 248 249 250 251 252 |
|
pretty_string ¶
pretty_string() -> str
Source code
202 203 204 205 206 207 208 209 210 211 212 213 214 |
|
scale ¶
scale(
clip: VideoNode,
width: int | None = None,
height: int | None = None,
shift: tuple[float, float] = (0, 0),
**kwargs: Any
) -> VideoNode
Source code
419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 |
|
UpConv7AnimeStyleArt dataclass
¶
UpConv7AnimeStyleArt(
cuda: bool | Literal["trt"] | None = None,
num_streams: int | None = None,
fp16: bool = True,
device_id: int = 0,
matrix: MatrixT | None = None,
tiles: int | tuple[int, int] | None = None,
tilesize: int | tuple[int, int] | None = None,
overlap: int | tuple[int, int] | None = None,
backend_kwargs: KwargsT | None = None,
dynamic_shape: bool | None = None,
max_shapes: tuple[int, int] | None = (1936, 1088),
max_instances: int = 2,
*,
kernel: KernelT | None = None,
scaler: ScalerT | None = None,
shifter: KernelT | None = None
)
Bases: BaseWaifu2x
backend_kwargs class-attribute
instance-attribute
¶
backend_kwargs: KwargsT | None = None
Kwargs passed to create the backend instance.
cuda class-attribute
instance-attribute
¶
Whether to run this on cpu, gpu, or use trt technology. None will pick the fastest automatically.
dynamic_shape class-attribute
instance-attribute
¶
dynamic_shape: bool | None = None
Use a single model for 0-max_shapes resolutions. None to automatically detect it. Will be True when previewing and TRT is available.
fp16 class-attribute
instance-attribute
¶
fp16: bool = True
Whether to use float16 precision if available.
kernel class-attribute
instance-attribute
¶
Base kernel to be used for certain scaling/shifting/resampling operations. Must be specified and defaults to catrom
matrix class-attribute
instance-attribute
¶
matrix: MatrixT | None = None
Input clip's matrix. Set only if necessary.
max_instances class-attribute
instance-attribute
¶
max_instances: int = 2
Maximum instances to spawn when scaling a variable resolution clip.
max_shapes class-attribute
instance-attribute
¶
Max shape for a dynamic model when using TRT and variable resolution clip. This can be overridden if the frame size is bigger.
num_streams class-attribute
instance-attribute
¶
num_streams: int | None = None
Number of gpu streams for the model.
overlap class-attribute
instance-attribute
¶
Overlap for reducing blocking artifacts between tile borders.
scale_function instance-attribute
¶
scale_function: GenericVSFunction
Scale function called internally when scaling
scaler class-attribute
instance-attribute
¶
Scaler used for scaling operations. Defaults to kernel.
shifter class-attribute
instance-attribute
¶
Kernel used for shifting operations. Defaults to kernel.
tiles class-attribute
instance-attribute
¶
Process in separate tiles instead of the whole frame. Use if [V]RAM limited.
tilesize class-attribute
instance-attribute
¶
Manually specify the size of a single tile.
ensure_obj classmethod
¶
ensure_obj(
scaler: str | type[BaseScalerT] | BaseScalerT | None = None,
/,
func_except: FuncExceptT | None = None,
) -> BaseScalerT
Source code
186 187 188 189 190 191 192 193 |
|
ensure_scaler ¶
Source code
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
|
from_param classmethod
¶
from_param(
scaler: str | type[BaseScalerT] | BaseScalerT | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[BaseScalerT]
Source code
177 178 179 180 181 182 183 184 |
|
get_clean_kwargs ¶
Source code
199 200 |
|
get_implemented_funcs ¶
Source code
270 271 |
|
get_scale_args ¶
get_scale_args(
clip: VideoNode,
shift: tuple[TopShift, LeftShift] = (0, 0),
width: int | None = None,
height: int | None = None,
*funcs: Callable[..., Any],
**kwargs: Any
) -> KwargsT
Source code
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 |
|
kernel_radius ¶
kernel_radius() -> int
Source code
195 196 197 |
|
multi ¶
multi(
clip: VideoNode,
multi: float = 2,
shift: tuple[TopShift, LeftShift] = (0, 0),
**kwargs: Any
) -> VideoNode
Source code
239 240 241 242 243 244 245 246 247 248 249 250 251 252 |
|
pretty_string ¶
pretty_string() -> str
Source code
202 203 204 205 206 207 208 209 210 211 212 213 214 |
|
scale ¶
scale(
clip: VideoNode,
width: int | None = None,
height: int | None = None,
shift: tuple[float, float] = (0, 0),
**kwargs: Any
) -> VideoNode
Source code
419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 |
|
UpConv7Photo dataclass
¶
UpConv7Photo(
cuda: bool | Literal["trt"] | None = None,
num_streams: int | None = None,
fp16: bool = True,
device_id: int = 0,
matrix: MatrixT | None = None,
tiles: int | tuple[int, int] | None = None,
tilesize: int | tuple[int, int] | None = None,
overlap: int | tuple[int, int] | None = None,
backend_kwargs: KwargsT | None = None,
dynamic_shape: bool | None = None,
max_shapes: tuple[int, int] | None = (1936, 1088),
max_instances: int = 2,
*,
kernel: KernelT | None = None,
scaler: ScalerT | None = None,
shifter: KernelT | None = None
)
Bases: BaseWaifu2x
backend_kwargs class-attribute
instance-attribute
¶
backend_kwargs: KwargsT | None = None
Kwargs passed to create the backend instance.
cuda class-attribute
instance-attribute
¶
Whether to run this on cpu, gpu, or use trt technology. None will pick the fastest automatically.
dynamic_shape class-attribute
instance-attribute
¶
dynamic_shape: bool | None = None
Use a single model for 0-max_shapes resolutions. None to automatically detect it. Will be True when previewing and TRT is available.
fp16 class-attribute
instance-attribute
¶
fp16: bool = True
Whether to use float16 precision if available.
kernel class-attribute
instance-attribute
¶
Base kernel to be used for certain scaling/shifting/resampling operations. Must be specified and defaults to catrom
matrix class-attribute
instance-attribute
¶
matrix: MatrixT | None = None
Input clip's matrix. Set only if necessary.
max_instances class-attribute
instance-attribute
¶
max_instances: int = 2
Maximum instances to spawn when scaling a variable resolution clip.
max_shapes class-attribute
instance-attribute
¶
Max shape for a dynamic model when using TRT and variable resolution clip. This can be overridden if the frame size is bigger.
num_streams class-attribute
instance-attribute
¶
num_streams: int | None = None
Number of gpu streams for the model.
overlap class-attribute
instance-attribute
¶
Overlap for reducing blocking artifacts between tile borders.
scale_function instance-attribute
¶
scale_function: GenericVSFunction
Scale function called internally when scaling
scaler class-attribute
instance-attribute
¶
Scaler used for scaling operations. Defaults to kernel.
shifter class-attribute
instance-attribute
¶
Kernel used for shifting operations. Defaults to kernel.
tiles class-attribute
instance-attribute
¶
Process in separate tiles instead of the whole frame. Use if [V]RAM limited.
tilesize class-attribute
instance-attribute
¶
Manually specify the size of a single tile.
ensure_obj classmethod
¶
ensure_obj(
scaler: str | type[BaseScalerT] | BaseScalerT | None = None,
/,
func_except: FuncExceptT | None = None,
) -> BaseScalerT
Source code
186 187 188 189 190 191 192 193 |
|
ensure_scaler ¶
Source code
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
|
from_param classmethod
¶
from_param(
scaler: str | type[BaseScalerT] | BaseScalerT | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[BaseScalerT]
Source code
177 178 179 180 181 182 183 184 |
|
get_clean_kwargs ¶
Source code
199 200 |
|
get_implemented_funcs ¶
Source code
270 271 |
|
get_scale_args ¶
get_scale_args(
clip: VideoNode,
shift: tuple[TopShift, LeftShift] = (0, 0),
width: int | None = None,
height: int | None = None,
*funcs: Callable[..., Any],
**kwargs: Any
) -> KwargsT
Source code
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 |
|
kernel_radius ¶
kernel_radius() -> int
Source code
195 196 197 |
|
multi ¶
multi(
clip: VideoNode,
multi: float = 2,
shift: tuple[TopShift, LeftShift] = (0, 0),
**kwargs: Any
) -> VideoNode
Source code
239 240 241 242 243 244 245 246 247 248 249 250 251 252 |
|
pretty_string ¶
pretty_string() -> str
Source code
202 203 204 205 206 207 208 209 210 211 212 213 214 |
|
scale ¶
scale(
clip: VideoNode,
width: int | None = None,
height: int | None = None,
shift: tuple[float, float] = (0, 0),
**kwargs: Any
) -> VideoNode
Source code
419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 |
|
UpResNet10 dataclass
¶
UpResNet10(
cuda: bool | Literal["trt"] | None = None,
num_streams: int | None = None,
fp16: bool = True,
device_id: int = 0,
matrix: MatrixT | None = None,
tiles: int | tuple[int, int] | None = None,
tilesize: int | tuple[int, int] | None = None,
overlap: int | tuple[int, int] | None = None,
backend_kwargs: KwargsT | None = None,
dynamic_shape: bool | None = None,
max_shapes: tuple[int, int] | None = (1936, 1088),
max_instances: int = 2,
*,
kernel: KernelT | None = None,
scaler: ScalerT | None = None,
shifter: KernelT | None = None
)
Bases: BaseWaifu2x
backend_kwargs class-attribute
instance-attribute
¶
backend_kwargs: KwargsT | None = None
Kwargs passed to create the backend instance.
cuda class-attribute
instance-attribute
¶
Whether to run this on cpu, gpu, or use trt technology. None will pick the fastest automatically.
dynamic_shape class-attribute
instance-attribute
¶
dynamic_shape: bool | None = None
Use a single model for 0-max_shapes resolutions. None to automatically detect it. Will be True when previewing and TRT is available.
fp16 class-attribute
instance-attribute
¶
fp16: bool = True
Whether to use float16 precision if available.
kernel class-attribute
instance-attribute
¶
Base kernel to be used for certain scaling/shifting/resampling operations. Must be specified and defaults to catrom
matrix class-attribute
instance-attribute
¶
matrix: MatrixT | None = None
Input clip's matrix. Set only if necessary.
max_instances class-attribute
instance-attribute
¶
max_instances: int = 2
Maximum instances to spawn when scaling a variable resolution clip.
max_shapes class-attribute
instance-attribute
¶
Max shape for a dynamic model when using TRT and variable resolution clip. This can be overridden if the frame size is bigger.
num_streams class-attribute
instance-attribute
¶
num_streams: int | None = None
Number of gpu streams for the model.
overlap class-attribute
instance-attribute
¶
Overlap for reducing blocking artifacts between tile borders.
scale_function instance-attribute
¶
scale_function: GenericVSFunction
Scale function called internally when scaling
scaler class-attribute
instance-attribute
¶
Scaler used for scaling operations. Defaults to kernel.
shifter class-attribute
instance-attribute
¶
Kernel used for shifting operations. Defaults to kernel.
tiles class-attribute
instance-attribute
¶
Process in separate tiles instead of the whole frame. Use if [V]RAM limited.
tilesize class-attribute
instance-attribute
¶
Manually specify the size of a single tile.
ensure_obj classmethod
¶
ensure_obj(
scaler: str | type[BaseScalerT] | BaseScalerT | None = None,
/,
func_except: FuncExceptT | None = None,
) -> BaseScalerT
Source code
186 187 188 189 190 191 192 193 |
|
ensure_scaler ¶
Source code
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
|
from_param classmethod
¶
from_param(
scaler: str | type[BaseScalerT] | BaseScalerT | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[BaseScalerT]
Source code
177 178 179 180 181 182 183 184 |
|
get_clean_kwargs ¶
Source code
199 200 |
|
get_implemented_funcs ¶
Source code
270 271 |
|
get_scale_args ¶
get_scale_args(
clip: VideoNode,
shift: tuple[TopShift, LeftShift] = (0, 0),
width: int | None = None,
height: int | None = None,
*funcs: Callable[..., Any],
**kwargs: Any
) -> KwargsT
Source code
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 |
|
kernel_radius ¶
kernel_radius() -> int
Source code
195 196 197 |
|
multi ¶
multi(
clip: VideoNode,
multi: float = 2,
shift: tuple[TopShift, LeftShift] = (0, 0),
**kwargs: Any
) -> VideoNode
Source code
239 240 241 242 243 244 245 246 247 248 249 250 251 252 |
|
pretty_string ¶
pretty_string() -> str
Source code
202 203 204 205 206 207 208 209 210 211 212 213 214 |
|
scale ¶
scale(
clip: VideoNode,
width: int | None = None,
height: int | None = None,
shift: tuple[float, float] = (0, 0),
**kwargs: Any
) -> VideoNode
Source code
419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 |
|
ensure_obj classmethod
¶
ensure_obj(
scaler: str | type[BaseScalerT] | BaseScalerT | None = None,
/,
func_except: FuncExceptT | None = None,
) -> BaseScalerT
Source code
186 187 188 189 190 191 192 193 |
|
ensure_scaler ¶
Source code
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
|
from_param classmethod
¶
from_param(
scaler: str | type[BaseScalerT] | BaseScalerT | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[BaseScalerT]
Source code
177 178 179 180 181 182 183 184 |
|
get_clean_kwargs ¶
Source code
199 200 |
|
get_implemented_funcs ¶
Source code
270 271 |
|
get_scale_args ¶
get_scale_args(
clip: VideoNode,
shift: tuple[TopShift, LeftShift] = (0, 0),
width: int | None = None,
height: int | None = None,
*funcs: Callable[..., Any],
**kwargs: Any
) -> KwargsT
Source code
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 |
|
kernel_radius ¶
kernel_radius() -> int
Source code
195 196 197 |
|
multi ¶
multi(
clip: VideoNode,
multi: float = 2,
shift: tuple[TopShift, LeftShift] = (0, 0),
**kwargs: Any
) -> VideoNode
Source code
239 240 241 242 243 244 245 246 247 248 249 250 251 252 |
|
pretty_string ¶
pretty_string() -> str
Source code
202 203 204 205 206 207 208 209 210 211 212 213 214 |
|
scale ¶
scale(
clip: VideoNode,
width: int | None = None,
height: int | None = None,
shift: tuple[float, float] = (0, 0),
**kwargs: Any
) -> VideoNode
Source code
419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 |
|
Waifu2xCropHelper ¶
Bases: ProcessVariableClip[tuple[int, int, int, int, int, int]]
get_key ¶
Source code
196 197 |
|
normalize ¶
Source code
199 200 201 202 203 204 |
|
Waifu2xPadHelper ¶
Bases: ProcessVariableResClip
normalize ¶
Source code
189 190 191 192 |
|
Waifu2xResizeHelper ¶
Waifu2xResizeHelper(
clip: VideoNode,
width: int,
height: int,
planes: PlanesT,
is_gray: bool,
scaler: Scaler,
do_padding: bool,
w2x_kwargs: KwargsT,
w2x_cache_size: int,
backend: type,
backend_kwargs: KwargsT,
)
Bases: ProcessVariableResClip
Source code
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 |
|
normalize ¶
Source code
248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 |
|
process ¶
process(wclip: VideoNode) -> VideoNode
Source code
274 275 276 277 278 |
|
Waifu2xScaleHelper ¶
Waifu2xScaleHelper(
clip: VideoNode,
backend: type,
backend_kwargs: KwargsT,
kwargs: KwargsT,
cache_size: int,
)
Bases: ProcessVariableResClip
Source code
208 209 210 211 212 213 214 215 |
|
normalize ¶
Source code
217 218 219 220 221 222 223 224 225 226 |
|