MCPcopy Create free account
hub / github.com/TencentARC/BrushNet / parse_args

Function parse_args

examples/brushnet/train_brushnet.py:241–611  ·  view source on GitHub ↗
(input_args=None)

Source from the content-addressed store, hash-verified

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

Callers 1

train_brushnet.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected