Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -103,8 +103,8 @@ def train_dreambooth_lora_sdxl(instance_data_dir, lora_trained_xl_folder, instan
|
|
103 |
{str(e)}
|
104 |
```
|
105 |
'''
|
106 |
-
swap_hardware(hf_token, "cpu-basic")
|
107 |
-
write_to_community(title,description,hf_token)
|
108 |
|
109 |
def main(dataset_id,
|
110 |
lora_trained_xl_folder,
|
@@ -133,7 +133,6 @@ def main(dataset_id,
|
|
133 |
if sleep_time:
|
134 |
swap_sleep_time(hf_token, -1)
|
135 |
|
136 |
-
|
137 |
gr.Warning("If you did not check the `Remove GPU After training`, don't forget to remove the GPU attribution after you are done. ")
|
138 |
|
139 |
dataset_repo = dataset_id
|
@@ -163,7 +162,7 @@ def main(dataset_id,
|
|
163 |
instance_data_dir = repo_parts[-1]
|
164 |
train_dreambooth_lora_sdxl(instance_data_dir, lora_trained_xl_folder, instance_prompt, max_train_steps, checkpoint_steps, remove_gpu)
|
165 |
|
166 |
-
return f"Done, your trained model has been stored in your models library: your_user_name/{
|
167 |
|
168 |
css="""
|
169 |
#col-container {max-width: 780px; margin-left: auto; margin-right: auto;}
|
@@ -199,8 +198,8 @@ with gr.Blocks(css=css) as demo:
|
|
199 |
|
200 |
with gr.Row():
|
201 |
model_output_folder = gr.Textbox(label="Output model folder name", placeholder="lora-trained-xl-folder")
|
202 |
-
max_train_steps = gr.Number(label="Max Training Steps", value=500)
|
203 |
-
checkpoint_steps = gr.Number(label="Checkpoints Steps", value=100)
|
204 |
remove_gpu = gr.Checkbox(label="Remove GPU After Training", value=True)
|
205 |
train_button = gr.Button("Train !")
|
206 |
|
|
|
103 |
{str(e)}
|
104 |
```
|
105 |
'''
|
106 |
+
#swap_hardware(hf_token, "cpu-basic")
|
107 |
+
#write_to_community(title,description,hf_token)
|
108 |
|
109 |
def main(dataset_id,
|
110 |
lora_trained_xl_folder,
|
|
|
133 |
if sleep_time:
|
134 |
swap_sleep_time(hf_token, -1)
|
135 |
|
|
|
136 |
gr.Warning("If you did not check the `Remove GPU After training`, don't forget to remove the GPU attribution after you are done. ")
|
137 |
|
138 |
dataset_repo = dataset_id
|
|
|
162 |
instance_data_dir = repo_parts[-1]
|
163 |
train_dreambooth_lora_sdxl(instance_data_dir, lora_trained_xl_folder, instance_prompt, max_train_steps, checkpoint_steps, remove_gpu)
|
164 |
|
165 |
+
return f"Done, your trained model has been stored in your models library: your_user_name/{lora_trained_xl_folder}"
|
166 |
|
167 |
css="""
|
168 |
#col-container {max-width: 780px; margin-left: auto; margin-right: auto;}
|
|
|
198 |
|
199 |
with gr.Row():
|
200 |
model_output_folder = gr.Textbox(label="Output model folder name", placeholder="lora-trained-xl-folder")
|
201 |
+
max_train_steps = gr.Number(label="Max Training Steps", value=500, precision=0, step=10)
|
202 |
+
checkpoint_steps = gr.Number(label="Checkpoints Steps", value=100, precision=0, step=10)
|
203 |
remove_gpu = gr.Checkbox(label="Remove GPU After Training", value=True)
|
204 |
train_button = gr.Button("Train !")
|
205 |
|