@@ -88,9 +88,31 @@ def main():
8888
8989Runs waifu2x. Mostly the same inputs as CLI ones.
9090
91+ #### Arguments
92+
93+ - ` input_img_path ` * str* - Input image/ directory, defaults to "images/small.png"
94+ - ` output_img_path ` * str* - Directory to write output images to, defaults to "./"
95+ - ` gpu ` * int* - CUDA enabled GPU to use, defaults to -1
96+ : param int | None quality: Set the quality of output images 1-100 (None=100), defaults to None
97+ : param str | None model_dir: Specify a custom directory containing models, defaults to None
98+ - ` scale_ratio ` * float* - Specify a scale, defaults to 2.0
99+ - ` batch_size ` * int* - _ description_ , defaults to 16
100+ - ` block_size ` * int* - _ description_ , defaults to 128
101+ - ` extension ` * str* - Select output extension png/webp
102+ - ` arch ` * str* - _ description_ , defaults to "VGG7"
103+ - ` method ` * str* - _ description_ , defaults to "scale"
104+ - ` noise_level ` * int* - _ description_ , defaults to 1
105+ - ` color ` * str* - _ description_ , defaults to "rgb"
106+ - ` tta_level ` * int* - _ description_ , defaults to 8
107+ - ` width ` * int* - _ description_ , defaults to 0
108+ - ` height ` * int* - _ description_ , defaults to 0
109+ - ` shorter_side ` * int* - _ description_ , defaults to 0
110+ - ` longer_side ` * int* - _ description_ , defaults to 0
111+ - ` should_print ` * bool* - _ description_ , defaults to True
112+
91113#### Raises
92114
93- - ` ValueError ` - Output file extension not supported
115+ - ` ValueError ` - Output file extension not supported
94116
95117#### Signature
96118
@@ -100,7 +122,7 @@ def run(
100122 output_img_path : str = " ./" ,
101123 gpu : int = - 1 ,
102124 quality : int | None = None ,
103- model_dir : str = None ,
125+ model_dir : str | None = None ,
104126 scale_ratio : float = 2.0 ,
105127 batch_size : int = 16 ,
106128 block_size : int = 128 ,
@@ -114,7 +136,7 @@ def run(
114136 height : int = 0 ,
115137 shorter_side : int = 0 ,
116138 longer_side : int = 0 ,
117- should_print : int = True ,
139+ should_print : bool = True ,
118140):
119141 ...
120142```
0 commit comments