MCPcopy Index your code
hub / github.com/huggingface/diffusers / parse_args

Function parse_args

examples/amused/train_amused.py:54–298  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

52
53
54def parse_args():
55 parser = argparse.ArgumentParser()
56 parser.add_argument(
57 "--pretrained_model_name_or_path",
58 type=str,
59 default=None,
60 required=True,
61 help="Path to pretrained model or model identifier from huggingface.co/models.",
62 )
63 parser.add_argument(
64 "--revision",
65 type=str,
66 default=None,
67 required=False,
68 help="Revision of pretrained model identifier from huggingface.co/models.",
69 )
70 parser.add_argument(
71 "--variant",
72 type=str,
73 default=None,
74 help="Variant of the model files of the pretrained model identifier from huggingface.co/models, 'e.g.' fp16",
75 )
76 parser.add_argument(
77 "--instance_data_dataset",
78 type=str,
79 default=None,
80 required=False,
81 help="A Hugging Face dataset containing the training images",
82 )
83 parser.add_argument(
84 "--instance_data_dir",
85 type=str,
86 default=None,
87 required=False,
88 help="A folder containing the training data of instance images.",
89 )
90 parser.add_argument(
91 "--instance_data_image", type=str, default=None, required=False, help="A single training image"
92 )
93 parser.add_argument(
94 "--use_8bit_adam", action="store_true", help="Whether or not to use 8-bit Adam from bitsandbytes."
95 )
96 parser.add_argument(
97 "--dataloader_num_workers",
98 type=int,
99 default=0,
100 help=(
101 "Number of subprocesses to use for data loading. 0 means that the data will be loaded in the main process."
102 ),
103 )
104 parser.add_argument(
105 "--allow_tf32",
106 action="store_true",
107 help=(
108 "Whether or not to allow TF32 on Ampere GPUs. Can be used to speed up training. For more information, see"
109 " https://pytorch.org/docs/stable/notes/cuda.html#tensorfloat-32-tf32-on-ampere-devices"
110 ),
111 )

Callers 1

train_amused.pyFile · 0.70

Calls 2

is_wandb_availableFunction · 0.90
existsMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…