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

Function parse_args

diffusers/examples/controlnet/train_controlnet_flux.py:248–681  ·  view source on GitHub ↗
(input_args=None)

Source from the content-addressed store, hash-verified

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

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected