Skip to content

Commit 4f79b10

Browse files
committed
Add custom resolution back in
1 parent 4da7238 commit 4f79b10

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

train.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ def train(
9393
batch_size: int = Input(
9494
description="Batch size, you can leave this as 1", default=1
9595
),
96+
resolution: str = Input(
97+
description="Image resolutions for training", default="512,768,1024"
98+
),
9699
lora_rank: int = Input(
97100
description="Supports 16, 32, 64, 128. Higher ranks take longer to train but can capture more complex features. Caption quality is more important for higher ranks.",
98101
default=16,
@@ -159,7 +162,9 @@ def train(
159162
"caption_dropout_rate": 0.05,
160163
"shuffle_tokens": False,
161164
"cache_latents_to_disk": True,
162-
"resolution": [512, 768, 1024],
165+
"resolution": [
166+
int(res) for res in resolution.split(",")
167+
],
163168
}
164169
],
165170
"train": {

0 commit comments

Comments
 (0)