Spaces:
Configuration error
Configuration error
update examples
Browse files
app.py
CHANGED
@@ -43,6 +43,7 @@ def monkeypatching(alpha, in_prompt, wt): #, prompt, pipe): finetuned_lora_weigh
|
|
43 |
|
44 |
def accelerate_train_lora(steps, images):
|
45 |
print("*********** inside accelerate_train_lora ***********")
|
|
|
46 |
# path can be retrieved by file_obj.name and original filename can be retrieved with file_obj.orig_name
|
47 |
for file in images:
|
48 |
shutil.copy( file.name, './data_example') #/{file.orig_name}
|
@@ -60,10 +61,11 @@ def accelerate_train_lora(steps, images):
|
|
60 |
--lr_warmup_steps=0 \
|
61 |
--max_train_steps={int(steps)}') #,shell=True) #30000
|
62 |
print("*********** completing accelerate_train_lora ***********")
|
|
|
63 |
#lora_trained_weights = "./output_example/lora_weight.pt"
|
64 |
for file in os.listdir(f"{OUTPUT_DIR}"):
|
65 |
if file.endswith(".pt"):
|
66 |
-
print(os.path.join(f"{OUTPUT_DIR}", file))
|
67 |
return file
|
68 |
#return f"{OUTPUT_DIR}/*.pt"
|
69 |
|
|
|
43 |
|
44 |
def accelerate_train_lora(steps, images):
|
45 |
print("*********** inside accelerate_train_lora ***********")
|
46 |
+
print(f"images are -- {images}")
|
47 |
# path can be retrieved by file_obj.name and original filename can be retrieved with file_obj.orig_name
|
48 |
for file in images:
|
49 |
shutil.copy( file.name, './data_example') #/{file.orig_name}
|
|
|
61 |
--lr_warmup_steps=0 \
|
62 |
--max_train_steps={int(steps)}') #,shell=True) #30000
|
63 |
print("*********** completing accelerate_train_lora ***********")
|
64 |
+
print(f"inside output_dir -- {os.listdir(OUTPUT_DIR)}")
|
65 |
#lora_trained_weights = "./output_example/lora_weight.pt"
|
66 |
for file in os.listdir(f"{OUTPUT_DIR}"):
|
67 |
if file.endswith(".pt"):
|
68 |
+
print("weight files is -- ",os.path.join(f"{OUTPUT_DIR}", file))
|
69 |
return file
|
70 |
#return f"{OUTPUT_DIR}/*.pt"
|
71 |
|