Upload folder using huggingface_hub
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- DATA/__pycache__/experiment.cpython-38.pyc +0 -0
- DATA/experiment.py +9 -3
- DATA/prompted_controlInversion_betterModel/animal.txt/Adventurous kangaroo explorer.png +3 -0
- DATA/prompted_controlInversion_betterModel/animal.txt/Alert meerkat watchman.png +3 -0
- DATA/prompted_controlInversion_betterModel/animal.txt/Ambitious ant queen.png +3 -0
- DATA/prompted_controlInversion_betterModel/animal.txt/Ancient dragon seer.png +3 -0
- DATA/prompted_controlInversion_betterModel/animal.txt/Artistic zebra painter.png +3 -0
- DATA/prompted_controlInversion_betterModel/animal.txt/Brave wolf warrior.png +3 -0
- DATA/prompted_controlInversion_betterModel/animal.txt/Charming penguin diplomat.png +3 -0
- DATA/prompted_controlInversion_betterModel/animal.txt/Cheeky raccoon thief.png +3 -0
- DATA/prompted_controlInversion_betterModel/animal.txt/Cheery hummingbird musician.png +3 -0
- DATA/prompted_controlInversion_betterModel/animal.txt/Cunning bat detective.png +3 -0
- DATA/prompted_controlInversion_betterModel/animal.txt/Cunning snake charmer.png +3 -0
- DATA/prompted_controlInversion_betterModel/animal.txt/Curious monkey scientist.png +3 -0
- DATA/prompted_controlInversion_betterModel/animal.txt/Dignified moose chieftain.png +3 -0
- DATA/prompted_controlInversion_betterModel/animal.txt/Dreamy koala poet.png +3 -0
- DATA/prompted_controlInversion_betterModel/animal.txt/Energetic squirrel journalist.png +3 -0
- DATA/prompted_controlInversion_betterModel/animal.txt/Exuberant tiger dancer.png +3 -0
- DATA/prompted_controlInversion_betterModel/animal.txt/Fiery jaguar athlete.png +3 -0
- DATA/prompted_controlInversion_betterModel/animal.txt/Gentle giraffe healer.png +3 -0
- DATA/prompted_controlInversion_betterModel/animal.txt/Gentlemanly frog prince.png +3 -0
- DATA/prompted_controlInversion_betterModel/animal.txt/Graceful swan ballerina.png +3 -0
- DATA/prompted_controlInversion_betterModel/animal.txt/Grizzled shark sailor.png +3 -0
- DATA/prompted_controlInversion_betterModel/animal.txt/Grumpy bear chef.png +3 -0
- DATA/prompted_controlInversion_betterModel/animal.txt/Humble donkey farmer.png +3 -0
- DATA/prompted_controlInversion_betterModel/animal.txt/Humorous hyena comedian.png +3 -0
- DATA/prompted_controlInversion_betterModel/animal.txt/Intrepid eagle pilot.png +3 -0
- DATA/prompted_controlInversion_betterModel/animal.txt/Jazz singer bird of paradise.png +3 -0
- DATA/prompted_controlInversion_betterModel/animal.txt/Joyful seal comedian.png +3 -0
- DATA/prompted_controlInversion_betterModel/animal.txt/Kindhearted rabbit doctor.png +3 -0
- DATA/prompted_controlInversion_betterModel/animal.txt/Loyal dog sheriff.png +3 -0
- DATA/prompted_controlInversion_betterModel/animal.txt/Majestic lion king.png +3 -0
- DATA/prompted_controlInversion_betterModel/animal.txt/Mysterious cat sorcerer.png +3 -0
- DATA/prompted_controlInversion_betterModel/animal.txt/Mysterious crow mystic.png +3 -0
- DATA/prompted_controlInversion_betterModel/animal.txt/Noble hawk judge.png +3 -0
- DATA/prompted_controlInversion_betterModel/animal.txt/Noble stallion knight.png +3 -0
- DATA/prompted_controlInversion_betterModel/animal.txt/Nomadic camel trader.png +3 -0
- DATA/prompted_controlInversion_betterModel/animal.txt/Passionate leopard rocker.png +3 -0
- DATA/prompted_controlInversion_betterModel/animal.txt/Philosophical panda thinker.png +3 -0
- DATA/prompted_controlInversion_betterModel/animal.txt/Playful dolphin entertainer.png +3 -0
- DATA/prompted_controlInversion_betterModel/animal.txt/Regal deer monarch.png +3 -0
- DATA/prompted_controlInversion_betterModel/animal.txt/Relaxed sloth yogi.png +3 -0
- DATA/prompted_controlInversion_betterModel/animal.txt/Resourceful beaver engineer.png +3 -0
- DATA/prompted_controlInversion_betterModel/animal.txt/Scholarly tortoise librarian.png +3 -0
- DATA/prompted_controlInversion_betterModel/animal.txt/Sleek panther spy.png +3 -0
- DATA/prompted_controlInversion_betterModel/animal.txt/Steampunk otter inventor.png +3 -0
- DATA/prompted_controlInversion_betterModel/animal.txt/Stoic rhino guard.png +3 -0
- DATA/prompted_controlInversion_betterModel/animal.txt/Traditional elephant elder.png +3 -0
- DATA/prompted_controlInversion_betterModel/animal.txt/Urban fox detective.png +3 -0
- DATA/prompted_controlInversion_betterModel/animal.txt/Vibrant toucan broadcaster.png +3 -0
DATA/__pycache__/experiment.cpython-38.pyc
ADDED
Binary file (2.64 kB). View file
|
|
DATA/experiment.py
CHANGED
@@ -3,6 +3,8 @@ from PIL import Image
|
|
3 |
import torchvision.transforms.functional as f
|
4 |
from utils import load_face_generator
|
5 |
from omegaconf import OmegaConf
|
|
|
|
|
6 |
|
7 |
def generate_face_image(
|
8 |
anything_facemaker,
|
@@ -43,7 +45,8 @@ def experiment(anything_facemaker, concepts_path, face_img_path, output_dir,
|
|
43 |
with open(concepts_path) as fr:
|
44 |
concepts = fr.read().split('\n')
|
45 |
concepts = [concept for concept in concepts if len(concept)!=0]
|
46 |
-
|
|
|
47 |
save_path = os.path.join(output_dir, f'{concept}.png')
|
48 |
if os.path.exists(save_path):
|
49 |
continue
|
@@ -68,7 +71,9 @@ if __name__=='__main__':
|
|
68 |
model_config = OmegaConf.load(model_config_path)['models']
|
69 |
gameicon_config = model_config['GameIconInstitute_mode']
|
70 |
|
71 |
-
face_img_path='resources/images/faces/
|
|
|
|
|
72 |
controlnet_conditioning_scale=1.
|
73 |
strength=0.95
|
74 |
|
@@ -80,7 +85,7 @@ if __name__=='__main__':
|
|
80 |
prompt_template=model_info['prompt_template'],
|
81 |
negative_prompt=model_info['negative_prompt']
|
82 |
)
|
83 |
-
output_dir = os.path.join(
|
84 |
os.makedirs(output_dir, exist_ok=True)
|
85 |
# concept test, with control and inversion
|
86 |
input_dir = 'resources/prompts'
|
@@ -90,6 +95,7 @@ if __name__=='__main__':
|
|
90 |
file_output_dir = os.path.join(output_dir, file)
|
91 |
print(f'input_file: {input_file}')
|
92 |
print(f'file_output_dir: {file_output_dir}')
|
|
|
93 |
experiment(anything_facemaker, input_file, face_img_path, output_dir=file_output_dir,
|
94 |
controlnet_conditioning_scale=controlnet_conditioning_scale,
|
95 |
strength=strength)
|
|
|
3 |
import torchvision.transforms.functional as f
|
4 |
from utils import load_face_generator
|
5 |
from omegaconf import OmegaConf
|
6 |
+
import random
|
7 |
+
import sys
|
8 |
|
9 |
def generate_face_image(
|
10 |
anything_facemaker,
|
|
|
45 |
with open(concepts_path) as fr:
|
46 |
concepts = fr.read().split('\n')
|
47 |
concepts = [concept for concept in concepts if len(concept)!=0]
|
48 |
+
random.shuffle(concepts)
|
49 |
+
for concept in concepts[:4]:
|
50 |
save_path = os.path.join(output_dir, f'{concept}.png')
|
51 |
if os.path.exists(save_path):
|
52 |
continue
|
|
|
71 |
model_config = OmegaConf.load(model_config_path)['models']
|
72 |
gameicon_config = model_config['GameIconInstitute_mode']
|
73 |
|
74 |
+
# face_img_path = 'resources/images/faces/0.jpg'
|
75 |
+
face_img_dir='resources/images/faces'
|
76 |
+
faces = os.listdir(face_img_dir)
|
77 |
controlnet_conditioning_scale=1.
|
78 |
strength=0.95
|
79 |
|
|
|
85 |
prompt_template=model_info['prompt_template'],
|
86 |
negative_prompt=model_info['negative_prompt']
|
87 |
)
|
88 |
+
output_dir = os.path.join(sys.argv[1], model)
|
89 |
os.makedirs(output_dir, exist_ok=True)
|
90 |
# concept test, with control and inversion
|
91 |
input_dir = 'resources/prompts'
|
|
|
95 |
file_output_dir = os.path.join(output_dir, file)
|
96 |
print(f'input_file: {input_file}')
|
97 |
print(f'file_output_dir: {file_output_dir}')
|
98 |
+
face_img_path = os.path.join(face_img_dir, random.choice(faces))
|
99 |
experiment(anything_facemaker, input_file, face_img_path, output_dir=file_output_dir,
|
100 |
controlnet_conditioning_scale=controlnet_conditioning_scale,
|
101 |
strength=strength)
|
DATA/prompted_controlInversion_betterModel/animal.txt/Adventurous kangaroo explorer.png
ADDED
Git LFS Details
|
DATA/prompted_controlInversion_betterModel/animal.txt/Alert meerkat watchman.png
ADDED
Git LFS Details
|
DATA/prompted_controlInversion_betterModel/animal.txt/Ambitious ant queen.png
ADDED
Git LFS Details
|
DATA/prompted_controlInversion_betterModel/animal.txt/Ancient dragon seer.png
ADDED
Git LFS Details
|
DATA/prompted_controlInversion_betterModel/animal.txt/Artistic zebra painter.png
ADDED
Git LFS Details
|
DATA/prompted_controlInversion_betterModel/animal.txt/Brave wolf warrior.png
ADDED
Git LFS Details
|
DATA/prompted_controlInversion_betterModel/animal.txt/Charming penguin diplomat.png
ADDED
Git LFS Details
|
DATA/prompted_controlInversion_betterModel/animal.txt/Cheeky raccoon thief.png
ADDED
Git LFS Details
|
DATA/prompted_controlInversion_betterModel/animal.txt/Cheery hummingbird musician.png
ADDED
Git LFS Details
|
DATA/prompted_controlInversion_betterModel/animal.txt/Cunning bat detective.png
ADDED
Git LFS Details
|
DATA/prompted_controlInversion_betterModel/animal.txt/Cunning snake charmer.png
ADDED
Git LFS Details
|
DATA/prompted_controlInversion_betterModel/animal.txt/Curious monkey scientist.png
ADDED
Git LFS Details
|
DATA/prompted_controlInversion_betterModel/animal.txt/Dignified moose chieftain.png
ADDED
Git LFS Details
|
DATA/prompted_controlInversion_betterModel/animal.txt/Dreamy koala poet.png
ADDED
Git LFS Details
|
DATA/prompted_controlInversion_betterModel/animal.txt/Energetic squirrel journalist.png
ADDED
Git LFS Details
|
DATA/prompted_controlInversion_betterModel/animal.txt/Exuberant tiger dancer.png
ADDED
Git LFS Details
|
DATA/prompted_controlInversion_betterModel/animal.txt/Fiery jaguar athlete.png
ADDED
Git LFS Details
|
DATA/prompted_controlInversion_betterModel/animal.txt/Gentle giraffe healer.png
ADDED
Git LFS Details
|
DATA/prompted_controlInversion_betterModel/animal.txt/Gentlemanly frog prince.png
ADDED
Git LFS Details
|
DATA/prompted_controlInversion_betterModel/animal.txt/Graceful swan ballerina.png
ADDED
Git LFS Details
|
DATA/prompted_controlInversion_betterModel/animal.txt/Grizzled shark sailor.png
ADDED
Git LFS Details
|
DATA/prompted_controlInversion_betterModel/animal.txt/Grumpy bear chef.png
ADDED
Git LFS Details
|
DATA/prompted_controlInversion_betterModel/animal.txt/Humble donkey farmer.png
ADDED
Git LFS Details
|
DATA/prompted_controlInversion_betterModel/animal.txt/Humorous hyena comedian.png
ADDED
Git LFS Details
|
DATA/prompted_controlInversion_betterModel/animal.txt/Intrepid eagle pilot.png
ADDED
Git LFS Details
|
DATA/prompted_controlInversion_betterModel/animal.txt/Jazz singer bird of paradise.png
ADDED
Git LFS Details
|
DATA/prompted_controlInversion_betterModel/animal.txt/Joyful seal comedian.png
ADDED
Git LFS Details
|
DATA/prompted_controlInversion_betterModel/animal.txt/Kindhearted rabbit doctor.png
ADDED
Git LFS Details
|
DATA/prompted_controlInversion_betterModel/animal.txt/Loyal dog sheriff.png
ADDED
Git LFS Details
|
DATA/prompted_controlInversion_betterModel/animal.txt/Majestic lion king.png
ADDED
Git LFS Details
|
DATA/prompted_controlInversion_betterModel/animal.txt/Mysterious cat sorcerer.png
ADDED
Git LFS Details
|
DATA/prompted_controlInversion_betterModel/animal.txt/Mysterious crow mystic.png
ADDED
Git LFS Details
|
DATA/prompted_controlInversion_betterModel/animal.txt/Noble hawk judge.png
ADDED
Git LFS Details
|
DATA/prompted_controlInversion_betterModel/animal.txt/Noble stallion knight.png
ADDED
Git LFS Details
|
DATA/prompted_controlInversion_betterModel/animal.txt/Nomadic camel trader.png
ADDED
Git LFS Details
|
DATA/prompted_controlInversion_betterModel/animal.txt/Passionate leopard rocker.png
ADDED
Git LFS Details
|
DATA/prompted_controlInversion_betterModel/animal.txt/Philosophical panda thinker.png
ADDED
Git LFS Details
|
DATA/prompted_controlInversion_betterModel/animal.txt/Playful dolphin entertainer.png
ADDED
Git LFS Details
|
DATA/prompted_controlInversion_betterModel/animal.txt/Regal deer monarch.png
ADDED
Git LFS Details
|
DATA/prompted_controlInversion_betterModel/animal.txt/Relaxed sloth yogi.png
ADDED
Git LFS Details
|
DATA/prompted_controlInversion_betterModel/animal.txt/Resourceful beaver engineer.png
ADDED
Git LFS Details
|
DATA/prompted_controlInversion_betterModel/animal.txt/Scholarly tortoise librarian.png
ADDED
Git LFS Details
|
DATA/prompted_controlInversion_betterModel/animal.txt/Sleek panther spy.png
ADDED
Git LFS Details
|
DATA/prompted_controlInversion_betterModel/animal.txt/Steampunk otter inventor.png
ADDED
Git LFS Details
|
DATA/prompted_controlInversion_betterModel/animal.txt/Stoic rhino guard.png
ADDED
Git LFS Details
|
DATA/prompted_controlInversion_betterModel/animal.txt/Traditional elephant elder.png
ADDED
Git LFS Details
|
DATA/prompted_controlInversion_betterModel/animal.txt/Urban fox detective.png
ADDED
Git LFS Details
|
DATA/prompted_controlInversion_betterModel/animal.txt/Vibrant toucan broadcaster.png
ADDED
Git LFS Details
|