You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: train.py
+11-20Lines changed: 11 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ def train(
40
40
),
41
41
num_train_epochs: int=Input(
42
42
description="Number of epochs to loop through your training dataset",
43
-
default=400,
43
+
default=4000,
44
44
),
45
45
max_train_steps: int=Input(
46
46
description="Number of individual training steps. Takes precedence over num_train_epochs",
@@ -52,34 +52,23 @@ def train(
52
52
# ), # todo.
53
53
unet_learning_rate: float=Input(
54
54
description="Learning rate for the U-Net. We recommend this value to be somewhere between `1e-6` to `1e-5`.",
55
-
default=3e-6,
55
+
default=1e-6,
56
56
),
57
57
ti_learning_rate_multiplier: float=Input(
58
58
description="Scaling of learning rate for training textual inversion embeddings. Don't alter unless you know what you're doing.",
59
-
default=100,
59
+
default=1000,
60
60
),
61
61
lr_scheduler: str=Input(
62
62
description="Learning rate scheduler to use for training",
63
63
default="constant",
64
64
choices=[
65
65
"constant",
66
66
"linear",
67
-
"cosine",
68
-
"cosine_with_restarts",
69
-
"polynomial",
70
-
"constant_with_warmup",
71
67
],
72
68
),
73
69
lr_warmup_steps: int=Input(
74
70
description="Number of warmup steps for lr schedulers with warmups.",
75
-
default=500,
76
-
),
77
-
lr_num_cycles: int=Input(
78
-
description="Number of hard restarts used with `cosine_with_restarts` learning rate scheduler",
79
-
default=1,
80
-
),
81
-
lr_power: float=Input(
82
-
description="Power for polynomial learning rate scheduler", default=1.0
71
+
default=100,
83
72
),
84
73
token_string: str=Input(
85
74
description="A unique string that will be trained to refer to the concept in the input images. Can be anything, but TOK works well",
@@ -103,16 +92,20 @@ def train(
103
92
),
104
93
use_face_detection_instead: bool=Input(
105
94
description="If you want to use face detection instead of CLIPSeg for masking. For face applications, we recommend using this option.",
106
-
default=False,
95
+
default=True,
107
96
),
108
97
clipseg_temperature: float=Input(
109
98
description="How blurry you want the CLIPSeg mask to be. We recommend this value be something between `0.5` to `1.0`. If you want to have more sharp mask (but thus more errorful), you can decrease this value.",
0 commit comments