(input_args=None)
| 249 | |
| 250 | |
| 251 | def parse_args(input_args=None): |
| 252 | parser = argparse.ArgumentParser(description="Simple example of a ControlNet training script.") |
| 253 | parser.add_argument( |
| 254 | "--pretrained_model_name_or_path", |
| 255 | type=str, |
| 256 | default=None, |
| 257 | required=True, |
| 258 | help="Path to pretrained model or model identifier from huggingface.co/models.", |
| 259 | ) |
| 260 | parser.add_argument( |
| 261 | "--controlnet_model_name_or_path", |
| 262 | type=str, |
| 263 | default=None, |
| 264 | help="Path to pretrained controlnet model or model identifier from huggingface.co/models." |
| 265 | " If not specified controlnet weights are initialized from unet.", |
| 266 | ) |
| 267 | parser.add_argument( |
| 268 | "--revision", |
| 269 | type=str, |
| 270 | default=None, |
| 271 | required=False, |
| 272 | help="Revision of pretrained model identifier from huggingface.co/models.", |
| 273 | ) |
| 274 | parser.add_argument( |
| 275 | "--variant", |
| 276 | type=str, |
| 277 | default=None, |
| 278 | help="Variant of the model files of the pretrained model identifier from huggingface.co/models, 'e.g.' fp16", |
| 279 | ) |
| 280 | parser.add_argument( |
| 281 | "--tokenizer_name", |
| 282 | type=str, |
| 283 | default=None, |
| 284 | help="Pretrained tokenizer name or path if not the same as model_name", |
| 285 | ) |
| 286 | parser.add_argument( |
| 287 | "--output_dir", |
| 288 | type=str, |
| 289 | default="controlnet-model", |
| 290 | help="The output directory where the model predictions and checkpoints will be written.", |
| 291 | ) |
| 292 | parser.add_argument( |
| 293 | "--cache_dir", |
| 294 | type=str, |
| 295 | default=None, |
| 296 | help="The directory where the downloaded models and datasets will be stored.", |
| 297 | ) |
| 298 | parser.add_argument("--seed", type=int, default=None, help="A seed for reproducible training.") |
| 299 | parser.add_argument( |
| 300 | "--resolution", |
| 301 | type=int, |
| 302 | default=512, |
| 303 | help=( |
| 304 | "The resolution for input images, all the images in the train/validation dataset will be resized to this" |
| 305 | " resolution" |
| 306 | ), |
| 307 | ) |
| 308 | parser.add_argument( |
no outgoing calls
no test coverage detected
searching dependent graphs…