Spaces:
Configuration error
Configuration error
upd
Browse files
app.py
CHANGED
|
@@ -37,7 +37,8 @@ def monkeypatching(alpha): #, prompt, pipe): finetuned_lora_weights
|
|
| 37 |
return image
|
| 38 |
|
| 39 |
def accelerate_train_lora(steps):
|
| 40 |
-
subprocess.run(accelerate launch {"./train_lora_dreambooth.py"} \
|
|
|
|
| 41 |
--pretrained_model_name_or_path=MODEL_NAME \
|
| 42 |
--instance_data_dir=INSTANCE_DIR \
|
| 43 |
--output_dir=OUTPUT_DIR \
|
|
@@ -48,7 +49,7 @@ def accelerate_train_lora(steps):
|
|
| 48 |
--learning_rate=1e-4 \
|
| 49 |
--lr_scheduler="constant" \
|
| 50 |
--lr_warmup_steps=0 \
|
| 51 |
-
--max_train_steps=steps , shell=True) #30000
|
| 52 |
return
|
| 53 |
|
| 54 |
with gr.Blocks() as demo:
|
|
|
|
| 37 |
return image
|
| 38 |
|
| 39 |
def accelerate_train_lora(steps):
|
| 40 |
+
#subprocess.run(accelerate launch {"./train_lora_dreambooth.py"} \
|
| 41 |
+
subprocess.Popen(f'accelerate launch {"./train_lora_dreambooth.py"} \
|
| 42 |
--pretrained_model_name_or_path=MODEL_NAME \
|
| 43 |
--instance_data_dir=INSTANCE_DIR \
|
| 44 |
--output_dir=OUTPUT_DIR \
|
|
|
|
| 49 |
--learning_rate=1e-4 \
|
| 50 |
--lr_scheduler="constant" \
|
| 51 |
--lr_warmup_steps=0 \
|
| 52 |
+
--max_train_steps={steps}' , shell=True) #30000
|
| 53 |
return
|
| 54 |
|
| 55 |
with gr.Blocks() as demo:
|