MCPcopy Create free account
hub / github.com/YesianRohn/TextSSR / parse_args

Function parse_args

diffusers/examples/controlnet/train_controlnet_sdxl.py:258–630  ·  view source on GitHub ↗
(input_args=None)

Source from the content-addressed store, hash-verified

256
257
258def parse_args(input_args=None):
259 parser = argparse.ArgumentParser(description="Simple example of a ControlNet training script.")
260 parser.add_argument(
261 "--pretrained_model_name_or_path",
262 type=str,
263 default=None,
264 required=True,
265 help="Path to pretrained model or model identifier from huggingface.co/models.",
266 )
267 parser.add_argument(
268 "--pretrained_vae_model_name_or_path",
269 type=str,
270 default=None,
271 help="Path to an improved VAE to stabilize training. For more details check out: https://github.com/huggingface/diffusers/pull/4038.",
272 )
273 parser.add_argument(
274 "--controlnet_model_name_or_path",
275 type=str,
276 default=None,
277 help="Path to pretrained controlnet model or model identifier from huggingface.co/models."
278 " If not specified controlnet weights are initialized from unet.",
279 )
280 parser.add_argument(
281 "--variant",
282 type=str,
283 default=None,
284 help="Variant of the model files of the pretrained model identifier from huggingface.co/models, 'e.g.' fp16",
285 )
286 parser.add_argument(
287 "--revision",
288 type=str,
289 default=None,
290 required=False,
291 help="Revision of pretrained model identifier from huggingface.co/models.",
292 )
293 parser.add_argument(
294 "--tokenizer_name",
295 type=str,
296 default=None,
297 help="Pretrained tokenizer name or path if not the same as model_name",
298 )
299 parser.add_argument(
300 "--output_dir",
301 type=str,
302 default="controlnet-model",
303 help="The output directory where the model predictions and checkpoints will be written.",
304 )
305 parser.add_argument(
306 "--cache_dir",
307 type=str,
308 default=None,
309 help="The directory where the downloaded models and datasets will be stored.",
310 )
311 parser.add_argument("--seed", type=int, default=None, help="A seed for reproducible training.")
312 parser.add_argument(
313 "--resolution",
314 type=int,
315 default=512,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected