fffiloni commited on
Commit
06684f1
1 Parent(s): 2d152a1

ensure gpu is turned off if errors occurs

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -143,7 +143,8 @@ def train_dreambooth_lora_sdxl(dataset_id, instance_data_dir, lora_trained_xl_fo
143
  {str(e)}
144
  ```
145
  '''
146
- #swap_hardware(hf_token, "cpu-basic")
 
147
  #write_to_community(title,description,hf_token)
148
 
149
  def main(dataset_id,
 
143
  {str(e)}
144
  ```
145
  '''
146
+ if remove_gpu:
147
+ swap_hardware(hf_token, "cpu-basic")
148
  #write_to_community(title,description,hf_token)
149
 
150
  def main(dataset_id,