Commit
•
6630ef4
1
Parent(s):
08be887
Add orchestrator
Browse files
app.py
CHANGED
@@ -20,6 +20,8 @@ MAX_IMAGES = 50
|
|
20 |
|
21 |
training_script_url = "https://raw.githubusercontent.com/huggingface/diffusers/main/examples/advanced_diffusion_training/train_dreambooth_lora_sdxl_advanced.py"
|
22 |
subprocess.run(['wget', '-N', training_script_url])
|
|
|
|
|
23 |
|
24 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
25 |
|
@@ -266,7 +268,7 @@ def start_training(
|
|
266 |
f"dataloader_num_workers={int(dataloader_num_workers)}",
|
267 |
f"local_rank={int(local_rank)}",
|
268 |
"cache_latents",
|
269 |
-
"push_to_hub",
|
270 |
]
|
271 |
# Adding optional flags
|
272 |
if optimizer == "8bitadam":
|
@@ -301,7 +303,8 @@ def start_training(
|
|
301 |
spacerunner_args = ';'.join(commands)
|
302 |
if not os.path.exists(spacerunner_folder):
|
303 |
os.makedirs(spacerunner_folder)
|
304 |
-
shutil.copy("train_dreambooth_lora_sdxl_advanced.py", f"{spacerunner_folder}/
|
|
|
305 |
shutil.copytree(dataset_folder, f"{spacerunner_folder}/{dataset_folder}")
|
306 |
requirements='''-peft
|
307 |
-huggingface_hub
|
|
|
20 |
|
21 |
training_script_url = "https://raw.githubusercontent.com/huggingface/diffusers/main/examples/advanced_diffusion_training/train_dreambooth_lora_sdxl_advanced.py"
|
22 |
subprocess.run(['wget', '-N', training_script_url])
|
23 |
+
orchestrator_script_url = "https://huggingface.co/datasets/multimodalart/lora-ease-helper/raw/main/script.py"
|
24 |
+
subprocess.run(['wget', '-N', orchestrator_script_url])
|
25 |
|
26 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
27 |
|
|
|
268 |
f"dataloader_num_workers={int(dataloader_num_workers)}",
|
269 |
f"local_rank={int(local_rank)}",
|
270 |
"cache_latents",
|
271 |
+
#"push_to_hub",
|
272 |
]
|
273 |
# Adding optional flags
|
274 |
if optimizer == "8bitadam":
|
|
|
303 |
spacerunner_args = ';'.join(commands)
|
304 |
if not os.path.exists(spacerunner_folder):
|
305 |
os.makedirs(spacerunner_folder)
|
306 |
+
shutil.copy("train_dreambooth_lora_sdxl_advanced.py", f"{spacerunner_folder}/trainer.py")
|
307 |
+
shutil.copy("script.py", f"{spacerunner_folder}/script.py")
|
308 |
shutil.copytree(dataset_folder, f"{spacerunner_folder}/{dataset_folder}")
|
309 |
requirements='''-peft
|
310 |
-huggingface_hub
|