scale
Clamped_Doubler
Bases: Doubler
Source code in vodesfunc/scale.py
__init__(sharpen_smooth, sharp_doubler, ratio=100, **kwargs)
Simple utility class for doubling a clip using fsrcnnx / any shader clamped to nnedi. Using sharpen will be basically the same as the zastin profile in varde's fsrcnnx upscale. Not sharpening will on the other hand be the same as the slow profile.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
sharpen_smooth |
bool | VideoNode | Callable[[VideoNode], VideoNode]
|
Sharpened "smooth upscale" clip or a sharpener function. Will use z4usm if True. Uses the other mode if False or None. |
required |
sharp_doubler |
Doubler | str
|
The doubler used for the sharp upscale. Defaults to Shader_Doubler (which defaults to fsrcnnx) |
required |
ratio |
int
|
Does a weighted average of the clamped and nnedi clips. The higher, the more of the clamped clip will be used. |
100
|
kwargs |
You can pass all kinds of stuff here, ranging from the default sharpener params to nnedi args. z4usm params: radius (default 2), strength (default 35) nnedi params: see |
{}
|
Source code in vodesfunc/scale.py
Doubler
Bases: ABC
Source code in vodesfunc/scale.py
kwargs: dict[str, Any] = kwargs
instance-attribute
Arguments passed to the internal scale function
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
Shader_Doubler
Bases: Doubler
Source code in vodesfunc/scale.py
__init__(shaderfile='C:\\FSRCNNX_x2_56-16-4-1.glsl')
Simple utility class for doubling a clip using a glsl shader
Parameters:
Name | Type | Description | Default |
---|---|---|---|
shaderfile |
PathLike
|
The glsl shader used to double the resolution |
'C:\\FSRCNNX_x2_56-16-4-1.glsl'
|
Source code in vodesfunc/scale.py
Waifu2x_Doubler
Bases: Doubler
Source code in vodesfunc/scale.py
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 224 225 226 227 228 229 230 231 232 233 234 235 236 |
|
__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
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 |
|