multimodalart HF staff commited on
Commit
b2a887b
1 Parent(s): 45b3826

improve configs for better gpu

Browse files
Files changed (1) hide show
  1. app.py +5 -1
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
- config["config"]["process"][0]["model"]["low_vram"] = True
 
 
 
 
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)