Spaces:
Running
Running
Update flux_train_ui.py
Browse files- flux_train_ui.py +18 -1
flux_train_ui.py
CHANGED
@@ -2,7 +2,7 @@ import os
|
|
2 |
from huggingface_hub import whoami
|
3 |
os.environ["HF_HUB_ENABLE_HF_TRANSFER"] = "1"
|
4 |
import sys
|
5 |
-
|
6 |
# Add the current working directory to the Python path
|
7 |
sys.path.insert(0, os.getcwd())
|
8 |
|
@@ -140,6 +140,23 @@ def recursive_update(d, u):
|
|
140 |
d[k] = v
|
141 |
return d
|
142 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
143 |
def start_training(
|
144 |
lora_name,
|
145 |
concept_sentence,
|
|
|
2 |
from huggingface_hub import whoami
|
3 |
os.environ["HF_HUB_ENABLE_HF_TRANSFER"] = "1"
|
4 |
import sys
|
5 |
+
import spaces
|
6 |
# Add the current working directory to the Python path
|
7 |
sys.path.insert(0, os.getcwd())
|
8 |
|
|
|
140 |
d[k] = v
|
141 |
return d
|
142 |
|
143 |
+
|
144 |
+
def get_duration( lora_name,
|
145 |
+
concept_sentence,
|
146 |
+
steps,
|
147 |
+
lr,
|
148 |
+
rank,
|
149 |
+
model_to_train,
|
150 |
+
low_vram,
|
151 |
+
dataset_folder,
|
152 |
+
sample_1,
|
153 |
+
sample_2,
|
154 |
+
sample_3,
|
155 |
+
use_more_advanced_options,
|
156 |
+
more_advanced_options,):
|
157 |
+
return total_second_length * 60
|
158 |
+
|
159 |
+
@spaces.GPU(duration=get_duration)
|
160 |
def start_training(
|
161 |
lora_name,
|
162 |
concept_sentence,
|