Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Commit
•
b2a887b
1
Parent(s):
45b3826
improve configs for better gpu
Browse files
app.py
CHANGED
@@ -223,7 +223,11 @@ def start_training(
|
|
223 |
|
224 |
# Update the config with user inputs
|
225 |
config["config"]["name"] = slugged_lora_name
|
226 |
-
|
|
|
|
|
|
|
|
|
227 |
config["config"]["process"][0]["train"]["skip_first_sample"] = True
|
228 |
config["config"]["process"][0]["train"]["steps"] = int(steps)
|
229 |
config["config"]["process"][0]["train"]["lr"] = float(lr)
|
|
|
223 |
|
224 |
# Update the config with user inputs
|
225 |
config["config"]["name"] = slugged_lora_name
|
226 |
+
if(is_spaces):
|
227 |
+
config["config"]["process"][0]["model"]["low_vram"] = False
|
228 |
+
config["config"]["process"][0]["train"]["batch_size"] = 2
|
229 |
+
else:
|
230 |
+
config["config"]["process"][0]["model"]["low_vram"] = True
|
231 |
config["config"]["process"][0]["train"]["skip_first_sample"] = True
|
232 |
config["config"]["process"][0]["train"]["steps"] = int(steps)
|
233 |
config["config"]["process"][0]["train"]["lr"] = float(lr)
|