Last active
January 3, 2023 20:52
-
-
Save maxim04/d8952f7a668ddd6dd69839bc39d6c7f6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# You can also add multiple concepts here. Try tweaking `--max_train_steps` accordingly. | |
concepts_list = [ | |
# { | |
# "instance_prompt": "photo of zwx dog", | |
# "class_prompt": "photo of a dog", | |
# "instance_data_dir": "/content/data/zwx", | |
# "class_data_dir": "/content/data/dog" | |
# }, | |
{ | |
"instance_prompt": "photo of ukj person", | |
# "instance_prompt": "portrait of ukj", | |
"class_prompt": "photo of a person", | |
# "class_prompt": "portrait of a person", | |
"instance_data_dir": "/home/maximantonov/data/ukj", | |
"class_data_dir": "/home/maximantonov/data/person" | |
# "class_data_dir": "/content/drive/MyDrive/person_v1-5_mse_vae_ddim50_cfg7_n2115/person" | |
} | |
] | |
# `class_data_dir` contains regularization images | |
import json | |
import os | |
for c in concepts_list: | |
os.makedirs(c["instance_data_dir"], exist_ok=True) | |
with open("concepts_list.json", "w") as f: | |
json.dump(concepts_list, f, indent=4) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment