diff options
author | Volpeon <git@volpeon.ink> | 2023-04-04 09:54:34 +0200 |
---|---|---|
committer | Volpeon <git@volpeon.ink> | 2023-04-04 09:54:34 +0200 |
commit | ad857ab0df1d9860d095584370b3d1fdb99beae1 (patch) | |
tree | 05471536aab55ba97a5a769b1a6744bf34401302 | |
parent | TI: Bring back old embedding decay (diff) | |
download | textual-inversion-diff-ad857ab0df1d9860d095584370b3d1fdb99beae1.tar.gz textual-inversion-diff-ad857ab0df1d9860d095584370b3d1fdb99beae1.tar.bz2 textual-inversion-diff-ad857ab0df1d9860d095584370b3d1fdb99beae1.zip |
Fix choice args
-rw-r--r-- | train_dreambooth.py | 17 | ||||
-rw-r--r-- | train_lora.py | 14 | ||||
-rw-r--r-- | train_ti.py | 17 |
3 files changed, 25 insertions, 23 deletions
diff --git a/train_dreambooth.py b/train_dreambooth.py index be7d6fe..4c36ae4 100644 --- a/train_dreambooth.py +++ b/train_dreambooth.py | |||
@@ -130,7 +130,8 @@ def parse_args(): | |||
130 | "--vector_shuffle", | 130 | "--vector_shuffle", |
131 | type=str, | 131 | type=str, |
132 | default="auto", | 132 | default="auto", |
133 | help='Vector shuffling algorithm. Choose between ["all", "trailing", "leading", "between", "auto", "off"]', | 133 | choices=["all", "trailing", "leading", "between", "auto", "off"], |
134 | help='Vector shuffling algorithm.', | ||
134 | ) | 135 | ) |
135 | parser.add_argument( | 136 | parser.add_argument( |
136 | "--guidance_scale", | 137 | "--guidance_scale", |
@@ -229,10 +230,9 @@ def parse_args(): | |||
229 | "--lr_scheduler", | 230 | "--lr_scheduler", |
230 | type=str, | 231 | type=str, |
231 | default="one_cycle", | 232 | default="one_cycle", |
232 | help=( | 233 | choices=["linear", "cosine", "cosine_with_restarts", "polynomial", |
233 | 'The scheduler type to use. Choose between ["linear", "cosine", "cosine_with_restarts", "polynomial",' | 234 | "constant", "constant_with_warmup", "one_cycle"], |
234 | ' "constant", "constant_with_warmup", "one_cycle"]' | 235 | help='The scheduler type to use.', |
235 | ), | ||
236 | ) | 236 | ) |
237 | parser.add_argument( | 237 | parser.add_argument( |
238 | "--lr_warmup_epochs", | 238 | "--lr_warmup_epochs", |
@@ -256,7 +256,7 @@ def parse_args(): | |||
256 | "--lr_warmup_func", | 256 | "--lr_warmup_func", |
257 | type=str, | 257 | type=str, |
258 | default="cos", | 258 | default="cos", |
259 | help='Choose between ["linear", "cos"]' | 259 | choices=["linear", "cos"], |
260 | ) | 260 | ) |
261 | parser.add_argument( | 261 | parser.add_argument( |
262 | "--lr_warmup_exp", | 262 | "--lr_warmup_exp", |
@@ -268,7 +268,7 @@ def parse_args(): | |||
268 | "--lr_annealing_func", | 268 | "--lr_annealing_func", |
269 | type=str, | 269 | type=str, |
270 | default="cos", | 270 | default="cos", |
271 | help='Choose between ["linear", "half_cos", "cos"]' | 271 | choices=["linear", "half_cos", "cos"], |
272 | ) | 272 | ) |
273 | parser.add_argument( | 273 | parser.add_argument( |
274 | "--lr_annealing_exp", | 274 | "--lr_annealing_exp", |
@@ -306,7 +306,8 @@ def parse_args(): | |||
306 | "--optimizer", | 306 | "--optimizer", |
307 | type=str, | 307 | type=str, |
308 | default="dadan", | 308 | default="dadan", |
309 | help='Optimizer to use ["adam", "adam8bit", "lion", "dadam", "dadan", "adafactor"]' | 309 | choices=["adam", "adam8bit", "lion", "dadam", "dadan", "adafactor"], |
310 | help='Optimizer to use' | ||
310 | ) | 311 | ) |
311 | parser.add_argument( | 312 | parser.add_argument( |
312 | "--dadaptation_d0", | 313 | "--dadaptation_d0", |
diff --git a/train_lora.py b/train_lora.py index a0cd174..538a7f7 100644 --- a/train_lora.py +++ b/train_lora.py | |||
@@ -261,10 +261,9 @@ def parse_args(): | |||
261 | "--lr_scheduler", | 261 | "--lr_scheduler", |
262 | type=str, | 262 | type=str, |
263 | default="one_cycle", | 263 | default="one_cycle", |
264 | help=( | 264 | choices=["linear", "cosine", "cosine_with_restarts", "polynomial", |
265 | 'The scheduler type to use. Choose between ["linear", "cosine", "cosine_with_restarts", "polynomial",' | 265 | "constant", "constant_with_warmup", "one_cycle"], |
266 | ' "constant", "constant_with_warmup", "one_cycle"]' | 266 | help='The scheduler type to use.', |
267 | ), | ||
268 | ) | 267 | ) |
269 | parser.add_argument( | 268 | parser.add_argument( |
270 | "--lr_warmup_epochs", | 269 | "--lr_warmup_epochs", |
@@ -288,7 +287,7 @@ def parse_args(): | |||
288 | "--lr_warmup_func", | 287 | "--lr_warmup_func", |
289 | type=str, | 288 | type=str, |
290 | default="cos", | 289 | default="cos", |
291 | help='Choose between ["linear", "cos"]' | 290 | choices=["linear", "cos"], |
292 | ) | 291 | ) |
293 | parser.add_argument( | 292 | parser.add_argument( |
294 | "--lr_warmup_exp", | 293 | "--lr_warmup_exp", |
@@ -300,7 +299,7 @@ def parse_args(): | |||
300 | "--lr_annealing_func", | 299 | "--lr_annealing_func", |
301 | type=str, | 300 | type=str, |
302 | default="cos", | 301 | default="cos", |
303 | help='Choose between ["linear", "half_cos", "cos"]' | 302 | choices=["linear", "half_cos", "cos"], |
304 | ) | 303 | ) |
305 | parser.add_argument( | 304 | parser.add_argument( |
306 | "--lr_annealing_exp", | 305 | "--lr_annealing_exp", |
@@ -318,7 +317,8 @@ def parse_args(): | |||
318 | "--optimizer", | 317 | "--optimizer", |
319 | type=str, | 318 | type=str, |
320 | default="dadan", | 319 | default="dadan", |
321 | help='Optimizer to use ["adam", "adam8bit", "lion", "dadam", "dadan", "adafactor"]' | 320 | choices=["adam", "adam8bit", "lion", "dadam", "dadan", "adafactor"], |
321 | help='Optimizer to use' | ||
322 | ) | 322 | ) |
323 | parser.add_argument( | 323 | parser.add_argument( |
324 | "--dadaptation_d0", | 324 | "--dadaptation_d0", |
diff --git a/train_ti.py b/train_ti.py index 4366c9e..6757bde 100644 --- a/train_ti.py +++ b/train_ti.py | |||
@@ -204,7 +204,8 @@ def parse_args(): | |||
204 | "--vector_shuffle", | 204 | "--vector_shuffle", |
205 | type=str, | 205 | type=str, |
206 | default="auto", | 206 | default="auto", |
207 | help='Vector shuffling algorithm. Choose between ["all", "trailing", "leading", "between", "auto", "off"]', | 207 | choices=["all", "trailing", "leading", "between", "auto", "off"], |
208 | help='Vector shuffling algorithm.', | ||
208 | ) | 209 | ) |
209 | parser.add_argument( | 210 | parser.add_argument( |
210 | "--offset_noise_strength", | 211 | "--offset_noise_strength", |
@@ -253,10 +254,9 @@ def parse_args(): | |||
253 | "--lr_scheduler", | 254 | "--lr_scheduler", |
254 | type=str, | 255 | type=str, |
255 | default="one_cycle", | 256 | default="one_cycle", |
256 | help=( | 257 | choices=["linear", "cosine", "cosine_with_restarts", "polynomial", |
257 | 'The scheduler type to use. Choose between ["linear", "cosine", "cosine_with_restarts", "polynomial",' | 258 | "constant", "constant_with_warmup", "one_cycle"], |
258 | ' "constant", "constant_with_warmup", "one_cycle"]' | 259 | help='The scheduler type to use.', |
259 | ), | ||
260 | ) | 260 | ) |
261 | parser.add_argument( | 261 | parser.add_argument( |
262 | "--lr_warmup_epochs", | 262 | "--lr_warmup_epochs", |
@@ -280,7 +280,7 @@ def parse_args(): | |||
280 | "--lr_warmup_func", | 280 | "--lr_warmup_func", |
281 | type=str, | 281 | type=str, |
282 | default="cos", | 282 | default="cos", |
283 | help='Choose between ["linear", "cos"]' | 283 | choices=["linear", "cos"], |
284 | ) | 284 | ) |
285 | parser.add_argument( | 285 | parser.add_argument( |
286 | "--lr_warmup_exp", | 286 | "--lr_warmup_exp", |
@@ -292,7 +292,7 @@ def parse_args(): | |||
292 | "--lr_annealing_func", | 292 | "--lr_annealing_func", |
293 | type=str, | 293 | type=str, |
294 | default="cos", | 294 | default="cos", |
295 | help='Choose between ["linear", "half_cos", "cos"]' | 295 | choices=["linear", "half_cos", "cos"], |
296 | ) | 296 | ) |
297 | parser.add_argument( | 297 | parser.add_argument( |
298 | "--lr_annealing_exp", | 298 | "--lr_annealing_exp", |
@@ -330,7 +330,8 @@ def parse_args(): | |||
330 | "--optimizer", | 330 | "--optimizer", |
331 | type=str, | 331 | type=str, |
332 | default="dadan", | 332 | default="dadan", |
333 | help='Optimizer to use ["adam", "adam8bit", "lion", "dadam", "dadan", "adafactor"]' | 333 | choices=["adam", "adam8bit", "lion", "dadam", "dadan", "adafactor"], |
334 | help='Optimizer to use' | ||
334 | ) | 335 | ) |
335 | parser.add_argument( | 336 | parser.add_argument( |
336 | "--dadaptation_d0", | 337 | "--dadaptation_d0", |