scale
Doubler
Bases: ABC
Source code in vodesfunc/scale.py
kwargs: dict[str, Any] = kwargs
instance-attribute
Arguments passed to the internal scale function
GenericOnnxScaler
dataclass
Bases: GenericScaler
Generic scaler class for an onnx model.
Source code in vodesfunc/scale.py
backend: Any | None = None
class-attribute
instance-attribute
vs-mlrt backend. Will attempt to autoselect the most suitable one with fp16=True if None.
In order of trt > cuda > nncn > cpu.
model: SPathLike | None = None
class-attribute
instance-attribute
Path to the model.
tiles: int | tuple[int, int] | None = None
class-attribute
instance-attribute
Splits up the frame into multiple tiles. Helps if you're lacking in vram but models may behave differently.
Lanczos_PreSS
Bases: Lanczos
Convenience class to pass to a dehalo function. This serves the same purpose as NNEDI to double and reverse using point. Except it is a quite a bit faster and (if using opencl) takes a lot of load off the GPU.
Source code in vodesfunc/scale.py
NNEDI_Doubler
Bases: Doubler
Source code in vodesfunc/scale.py
__init__(opencl=True, nns=4, nsize=4, qual=2, pscrn=1, **kwargs)
Simple utility class for doubling a clip using znedi or nnedi3cl (also fixes the shift)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
opencl
|
bool
|
Will use nnedi3cl if True and znedi3 if False |
True
|
Source code in vodesfunc/scale.py
Waifu2x_Doubler
Bases: Doubler
Source code in vodesfunc/scale.py
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 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 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 |
|
__init__(cuda=None, fp16=True, num_streams=1, tiles=None, model=6, **kwargs)
Simple utility class for doubling a clip using Waifu2x
Parameters:
Name | Type | Description | Default |
---|---|---|---|
cuda
|
bool | str | None
|
ORT-Cuda if True, NCNN-VK or CPU (depending on what you have installed) if False, TRT if some string Automatically chosen and tuned when None |
None
|
fp16
|
bool
|
Uses 16 bit floating point internally if True. |
True
|
num_streams
|
int
|
Amount of streams to use for Waifu2x; Sacrifices a lot of vram for a speedup. |
1
|
tiles
|
int | tuple[int, int] | None
|
Splits up the upscaling process into multiple tiles. You will likely have to use atleast |
None
|
model
|
int
|
Model to use from vsmlrt. |
6
|
kwargs
|
Args that get passed to both the Backend and actual scaling function. |
{}
|
Source code in vodesfunc/scale.py
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 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 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|