ysharma HF staff commited on
Commit
5ecdabf
·
1 Parent(s): 9d0b72c
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -39,7 +39,8 @@ def monkeypatching(alpha): #, prompt, pipe): finetuned_lora_weights
39
  def accelerate_train_lora(steps):
40
  print("***********inside accelerate_train_lora 11111***********")
41
  #subprocess.run(accelerate launch {"./train_lora_dreambooth.py"} \
42
- subprocess.Popen(f'accelerate launch {"./train_lora_dreambooth.py"} \
 
43
  --pretrained_model_name_or_path=MODEL_NAME \
44
  --instance_data_dir=INSTANCE_DIR \
45
  --output_dir=OUTPUT_DIR \
@@ -50,7 +51,7 @@ def accelerate_train_lora(steps):
50
  --learning_rate=1e-4 \
51
  --lr_scheduler="constant" \
52
  --lr_warmup_steps=0 \
53
- --max_train_steps={steps}' , shell=True) #30000
54
  print("***********inside accelerate_train_lora 22222***********")
55
  return
56
 
 
39
  def accelerate_train_lora(steps):
40
  print("***********inside accelerate_train_lora 11111***********")
41
  #subprocess.run(accelerate launch {"./train_lora_dreambooth.py"} \
42
+ #subprocess.Popen(f'accelerate launch {"./train_lora_dreambooth.py"} \
43
+ os.system( f'accelerate launch {"./train_lora_dreambooth.py"} \
44
  --pretrained_model_name_or_path=MODEL_NAME \
45
  --instance_data_dir=INSTANCE_DIR \
46
  --output_dir=OUTPUT_DIR \
 
51
  --learning_rate=1e-4 \
52
  --lr_scheduler="constant" \
53
  --lr_warmup_steps=0 \
54
+ --max_train_steps={steps}') #,shell=True) #30000
55
  print("***********inside accelerate_train_lora 22222***********")
56
  return
57