Skip to content

Commit 5316db3

Browse files
committed
Add huggingface parms to config file
1 parent 91b679f commit 5316db3

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

config example.toml

+10
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,16 @@ reg_images_repeat = 1 # Regularisation images
126126
util_regularization_images_repeat_input = 1 # Regularisation images repeat input
127127
util_training_images_repeat_input = 40 # Training images repeat input
128128

129+
[huggingface]
130+
async_upload = false # Async upload
131+
huggingface_path_in_repo = "" # Huggingface path in repo
132+
huggingface_repo_id = "" # Huggingface repo id
133+
huggingface_repo_type = "" # Huggingface repo type
134+
huggingface_repo_visibility = "" # Huggingface repo visibility
135+
huggingface_token = "" # Huggingface token
136+
resume_from_huggingface = "" # Resume from huggingface (ex: {repo_id}/{path_in_repo}:{revision}:{repo_type})
137+
save_state_to_huggingface = false # Save state to huggingface
138+
129139
[samples]
130140
sample_every_n_steps = 0 # Sample every n steps
131141
sample_every_n_epochs = 0 # Sample every n epochs

kohya_gui.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def UI(**kwargs):
4040
css=css, title=f"Kohya_ss GUI {release}", theme=gr.themes.Default()
4141
)
4242

43-
config = KohyaSSGUIConfig(config_file_path=kwargs.get("config_file_path"))
43+
config = KohyaSSGUIConfig(config_file_path=kwargs.get("config"))
4444

4545
with interface:
4646
with gr.Tab("Dreambooth"):

kohya_gui/class_basic_training.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ def init_resolution_and_bucket_controls(self) -> None:
302302
)
303303
# Initialize the stop text encoder training slider
304304
self.stop_text_encoder_training = gr.Slider(
305-
minimum=0,
305+
minimum=-1,
306306
maximum=100,
307307
value=self.config.get("basic.stop_text_encoder_training", 0),
308308
step=1,

kohya_gui/class_huggingface.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
class HuggingFace:
66
def __init__(
77
self,
8-
config: KohyaSSGUIConfig = {},
8+
config: KohyaSSGUIConfig,
99
) -> None:
1010
self.config = config
1111

0 commit comments

Comments
 (0)