()
| 149 | |
| 150 | |
| 151 | def main(): |
| 152 | parser = argparse.ArgumentParser() |
| 153 | |
| 154 | parser.add_argument( |
| 155 | "--init-img", |
| 156 | type=str, |
| 157 | nargs="?", |
| 158 | help="path to the input image", |
| 159 | default="/mnt/lustre/jywang/dataset/ImageSR/RealSRSet/" |
| 160 | ) |
| 161 | |
| 162 | parser.add_argument( |
| 163 | "--outdir", |
| 164 | type=str, |
| 165 | nargs="?", |
| 166 | help="dir to write results to", |
| 167 | default="outputs/sr-samples" |
| 168 | ) |
| 169 | |
| 170 | parser.add_argument( |
| 171 | "--skip_grid", |
| 172 | action='store_true', |
| 173 | help="do not save a grid, only individual samples. Helpful when evaluating lots of samples", |
| 174 | ) |
| 175 | |
| 176 | parser.add_argument( |
| 177 | "--skip_save", |
| 178 | action='store_true', |
| 179 | help="do not save indiviual samples. For speed measurements.", |
| 180 | ) |
| 181 | |
| 182 | parser.add_argument( |
| 183 | "--ddim_steps", |
| 184 | type=int, |
| 185 | default=50, |
| 186 | help="number of ddim sampling steps", |
| 187 | ) |
| 188 | parser.add_argument( |
| 189 | "--ddpm_steps", |
| 190 | type=int, |
| 191 | default=1000, |
| 192 | help="number of ddpm sampling steps", |
| 193 | ) |
| 194 | |
| 195 | parser.add_argument( |
| 196 | "--plms", |
| 197 | action='store_true', |
| 198 | help="use plms sampling", |
| 199 | ) |
| 200 | parser.add_argument( |
| 201 | "--fixed_code", |
| 202 | action='store_true', |
| 203 | help="if enabled, uses the same starting code across all samples ", |
| 204 | ) |
| 205 | |
| 206 | parser.add_argument( |
| 207 | "--ddim_eta", |
| 208 | type=float, |
no test coverage detected