ermu2001 commited on
Commit
9032865
1 Parent(s): 7f9a2c3

Upload folder using huggingface_hub

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. DATA/__pycache__/experiment.cpython-38.pyc +0 -0
  2. DATA/experiment.py +9 -3
  3. DATA/prompted_controlInversion_betterModel/animal.txt/Adventurous kangaroo explorer.png +3 -0
  4. DATA/prompted_controlInversion_betterModel/animal.txt/Alert meerkat watchman.png +3 -0
  5. DATA/prompted_controlInversion_betterModel/animal.txt/Ambitious ant queen.png +3 -0
  6. DATA/prompted_controlInversion_betterModel/animal.txt/Ancient dragon seer.png +3 -0
  7. DATA/prompted_controlInversion_betterModel/animal.txt/Artistic zebra painter.png +3 -0
  8. DATA/prompted_controlInversion_betterModel/animal.txt/Brave wolf warrior.png +3 -0
  9. DATA/prompted_controlInversion_betterModel/animal.txt/Charming penguin diplomat.png +3 -0
  10. DATA/prompted_controlInversion_betterModel/animal.txt/Cheeky raccoon thief.png +3 -0
  11. DATA/prompted_controlInversion_betterModel/animal.txt/Cheery hummingbird musician.png +3 -0
  12. DATA/prompted_controlInversion_betterModel/animal.txt/Cunning bat detective.png +3 -0
  13. DATA/prompted_controlInversion_betterModel/animal.txt/Cunning snake charmer.png +3 -0
  14. DATA/prompted_controlInversion_betterModel/animal.txt/Curious monkey scientist.png +3 -0
  15. DATA/prompted_controlInversion_betterModel/animal.txt/Dignified moose chieftain.png +3 -0
  16. DATA/prompted_controlInversion_betterModel/animal.txt/Dreamy koala poet.png +3 -0
  17. DATA/prompted_controlInversion_betterModel/animal.txt/Energetic squirrel journalist.png +3 -0
  18. DATA/prompted_controlInversion_betterModel/animal.txt/Exuberant tiger dancer.png +3 -0
  19. DATA/prompted_controlInversion_betterModel/animal.txt/Fiery jaguar athlete.png +3 -0
  20. DATA/prompted_controlInversion_betterModel/animal.txt/Gentle giraffe healer.png +3 -0
  21. DATA/prompted_controlInversion_betterModel/animal.txt/Gentlemanly frog prince.png +3 -0
  22. DATA/prompted_controlInversion_betterModel/animal.txt/Graceful swan ballerina.png +3 -0
  23. DATA/prompted_controlInversion_betterModel/animal.txt/Grizzled shark sailor.png +3 -0
  24. DATA/prompted_controlInversion_betterModel/animal.txt/Grumpy bear chef.png +3 -0
  25. DATA/prompted_controlInversion_betterModel/animal.txt/Humble donkey farmer.png +3 -0
  26. DATA/prompted_controlInversion_betterModel/animal.txt/Humorous hyena comedian.png +3 -0
  27. DATA/prompted_controlInversion_betterModel/animal.txt/Intrepid eagle pilot.png +3 -0
  28. DATA/prompted_controlInversion_betterModel/animal.txt/Jazz singer bird of paradise.png +3 -0
  29. DATA/prompted_controlInversion_betterModel/animal.txt/Joyful seal comedian.png +3 -0
  30. DATA/prompted_controlInversion_betterModel/animal.txt/Kindhearted rabbit doctor.png +3 -0
  31. DATA/prompted_controlInversion_betterModel/animal.txt/Loyal dog sheriff.png +3 -0
  32. DATA/prompted_controlInversion_betterModel/animal.txt/Majestic lion king.png +3 -0
  33. DATA/prompted_controlInversion_betterModel/animal.txt/Mysterious cat sorcerer.png +3 -0
  34. DATA/prompted_controlInversion_betterModel/animal.txt/Mysterious crow mystic.png +3 -0
  35. DATA/prompted_controlInversion_betterModel/animal.txt/Noble hawk judge.png +3 -0
  36. DATA/prompted_controlInversion_betterModel/animal.txt/Noble stallion knight.png +3 -0
  37. DATA/prompted_controlInversion_betterModel/animal.txt/Nomadic camel trader.png +3 -0
  38. DATA/prompted_controlInversion_betterModel/animal.txt/Passionate leopard rocker.png +3 -0
  39. DATA/prompted_controlInversion_betterModel/animal.txt/Philosophical panda thinker.png +3 -0
  40. DATA/prompted_controlInversion_betterModel/animal.txt/Playful dolphin entertainer.png +3 -0
  41. DATA/prompted_controlInversion_betterModel/animal.txt/Regal deer monarch.png +3 -0
  42. DATA/prompted_controlInversion_betterModel/animal.txt/Relaxed sloth yogi.png +3 -0
  43. DATA/prompted_controlInversion_betterModel/animal.txt/Resourceful beaver engineer.png +3 -0
  44. DATA/prompted_controlInversion_betterModel/animal.txt/Scholarly tortoise librarian.png +3 -0
  45. DATA/prompted_controlInversion_betterModel/animal.txt/Sleek panther spy.png +3 -0
  46. DATA/prompted_controlInversion_betterModel/animal.txt/Steampunk otter inventor.png +3 -0
  47. DATA/prompted_controlInversion_betterModel/animal.txt/Stoic rhino guard.png +3 -0
  48. DATA/prompted_controlInversion_betterModel/animal.txt/Traditional elephant elder.png +3 -0
  49. DATA/prompted_controlInversion_betterModel/animal.txt/Urban fox detective.png +3 -0
  50. 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
- for concept in concepts:
 
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/1.jpg'
 
 
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('results/concepts_test/control_inversion', model)
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

  • SHA256: d07c69557ca7d667f9e6391eb758d67b83075082c9744df5e8e3664fcad5d885
  • Pointer size: 131 Bytes
  • Size of remote file: 349 kB
DATA/prompted_controlInversion_betterModel/animal.txt/Alert meerkat watchman.png ADDED

Git LFS Details

  • SHA256: 45d12371437b920270c1efe4ac054793759f99a9ba5529cfed4622e86bd3f307
  • Pointer size: 131 Bytes
  • Size of remote file: 322 kB
DATA/prompted_controlInversion_betterModel/animal.txt/Ambitious ant queen.png ADDED

Git LFS Details

  • SHA256: 46f0cf58c346a7906cdead2f6dab3c546ec5238f36c17ffdc600fb63ced8ffc8
  • Pointer size: 131 Bytes
  • Size of remote file: 368 kB
DATA/prompted_controlInversion_betterModel/animal.txt/Ancient dragon seer.png ADDED

Git LFS Details

  • SHA256: 1f154b67774b15b86a498d1a099873d7b978e7bd3e85cfd4c4378cfaa0da1d52
  • Pointer size: 131 Bytes
  • Size of remote file: 361 kB
DATA/prompted_controlInversion_betterModel/animal.txt/Artistic zebra painter.png ADDED

Git LFS Details

  • SHA256: d1fd0befac61bb64a0b1f3b9275548217ccce38a8d1d867161a20ddcf4e45703
  • Pointer size: 131 Bytes
  • Size of remote file: 342 kB
DATA/prompted_controlInversion_betterModel/animal.txt/Brave wolf warrior.png ADDED

Git LFS Details

  • SHA256: 7592f93cba1c7ffa9ddada84832e4f1d3599b8d6c437bd43f81f52e2c6407e31
  • Pointer size: 131 Bytes
  • Size of remote file: 348 kB
DATA/prompted_controlInversion_betterModel/animal.txt/Charming penguin diplomat.png ADDED

Git LFS Details

  • SHA256: 16abc2c3ea56142b8aa33d07d7ebbeb82faa0878fe81e1febbbebc095d2557da
  • Pointer size: 131 Bytes
  • Size of remote file: 249 kB
DATA/prompted_controlInversion_betterModel/animal.txt/Cheeky raccoon thief.png ADDED

Git LFS Details

  • SHA256: 408797d69de4ffd1e3133b47c24c752b7fea91dffff5638b458d1b2bc8d92666
  • Pointer size: 131 Bytes
  • Size of remote file: 387 kB
DATA/prompted_controlInversion_betterModel/animal.txt/Cheery hummingbird musician.png ADDED

Git LFS Details

  • SHA256: 0a65a7bdd79e1bf84539bcf0222525711c4fed5df990639c3cbe292bf8b52262
  • Pointer size: 131 Bytes
  • Size of remote file: 357 kB
DATA/prompted_controlInversion_betterModel/animal.txt/Cunning bat detective.png ADDED

Git LFS Details

  • SHA256: 09a7fcc6dc1f5f6edb6d4a8e67a6d25771f27d40a3482c9249147320bc0cfd2e
  • Pointer size: 131 Bytes
  • Size of remote file: 364 kB
DATA/prompted_controlInversion_betterModel/animal.txt/Cunning snake charmer.png ADDED

Git LFS Details

  • SHA256: 11b97e93edc3610e0b36f319956089de94ec2c11148e788f8d2da600b9aa7d61
  • Pointer size: 131 Bytes
  • Size of remote file: 365 kB
DATA/prompted_controlInversion_betterModel/animal.txt/Curious monkey scientist.png ADDED

Git LFS Details

  • SHA256: e2147e9098026ddc025915abb9b8634d0087d7a06fd1870f731b36964a47f357
  • Pointer size: 131 Bytes
  • Size of remote file: 355 kB
DATA/prompted_controlInversion_betterModel/animal.txt/Dignified moose chieftain.png ADDED

Git LFS Details

  • SHA256: 32f39537cca973de63077a5af70925371098154fb1c9b552d02f3c887bd1be2a
  • Pointer size: 131 Bytes
  • Size of remote file: 384 kB
DATA/prompted_controlInversion_betterModel/animal.txt/Dreamy koala poet.png ADDED

Git LFS Details

  • SHA256: 4cdbbd973fe0ee69683fb56635191b0fcb99b6186c3134480538aae36417c867
  • Pointer size: 131 Bytes
  • Size of remote file: 329 kB
DATA/prompted_controlInversion_betterModel/animal.txt/Energetic squirrel journalist.png ADDED

Git LFS Details

  • SHA256: 2f65290436a9e92a412496559c5bdf63a2063c1839271e85608b1870496d39ba
  • Pointer size: 131 Bytes
  • Size of remote file: 368 kB
DATA/prompted_controlInversion_betterModel/animal.txt/Exuberant tiger dancer.png ADDED

Git LFS Details

  • SHA256: 8d4bc04539e02f2bab3e8c56cac0d6c2eee47c3271fe2dee135691e2d3255e99
  • Pointer size: 131 Bytes
  • Size of remote file: 392 kB
DATA/prompted_controlInversion_betterModel/animal.txt/Fiery jaguar athlete.png ADDED

Git LFS Details

  • SHA256: df4849f2881ccfd829d57f411868dc7a390b90a743ad414dfa7dfcc72aadd0d8
  • Pointer size: 131 Bytes
  • Size of remote file: 347 kB
DATA/prompted_controlInversion_betterModel/animal.txt/Gentle giraffe healer.png ADDED

Git LFS Details

  • SHA256: 75986480d3259d61e09464573bedc11042fc52a43918da6fe188b6752f0e2860
  • Pointer size: 131 Bytes
  • Size of remote file: 344 kB
DATA/prompted_controlInversion_betterModel/animal.txt/Gentlemanly frog prince.png ADDED

Git LFS Details

  • SHA256: b826ccdfe0c0fb4e61a5df6a5d4a458371fd16ea88cd793d7ad6a1011b1c3447
  • Pointer size: 131 Bytes
  • Size of remote file: 346 kB
DATA/prompted_controlInversion_betterModel/animal.txt/Graceful swan ballerina.png ADDED

Git LFS Details

  • SHA256: 6c5c32a7b35842f3240a8201911e60003cb5f9c583ac03c065068eeac0fa4233
  • Pointer size: 131 Bytes
  • Size of remote file: 359 kB
DATA/prompted_controlInversion_betterModel/animal.txt/Grizzled shark sailor.png ADDED

Git LFS Details

  • SHA256: 8daa3fa21a9e394f4a3d58b527d766974d1fc86ae80d9451b5e38524203acbc8
  • Pointer size: 131 Bytes
  • Size of remote file: 387 kB
DATA/prompted_controlInversion_betterModel/animal.txt/Grumpy bear chef.png ADDED

Git LFS Details

  • SHA256: f24f20933ec30c597f1c87437a353f1e07c3d84b4c0fe50aee8c1f616c05ab74
  • Pointer size: 131 Bytes
  • Size of remote file: 288 kB
DATA/prompted_controlInversion_betterModel/animal.txt/Humble donkey farmer.png ADDED

Git LFS Details

  • SHA256: 4014df921502eb81ec4b37a5bf4364b9b04939172a253f4b2d0fa7579be43a36
  • Pointer size: 131 Bytes
  • Size of remote file: 358 kB
DATA/prompted_controlInversion_betterModel/animal.txt/Humorous hyena comedian.png ADDED

Git LFS Details

  • SHA256: 746b4d97a76a249d558aa34b29e943c1886900d596360a81ee44637706660862
  • Pointer size: 131 Bytes
  • Size of remote file: 361 kB
DATA/prompted_controlInversion_betterModel/animal.txt/Intrepid eagle pilot.png ADDED

Git LFS Details

  • SHA256: fb7eab0a4b8dd778b18a35a3bd8fd78216f2d09806186ad17a3987957c606a7f
  • Pointer size: 131 Bytes
  • Size of remote file: 326 kB
DATA/prompted_controlInversion_betterModel/animal.txt/Jazz singer bird of paradise.png ADDED

Git LFS Details

  • SHA256: f532f194884b6d7cce9723b9a9e968944bf3cdc3a46ffecd5f61e99a5bb5f0f9
  • Pointer size: 131 Bytes
  • Size of remote file: 396 kB
DATA/prompted_controlInversion_betterModel/animal.txt/Joyful seal comedian.png ADDED

Git LFS Details

  • SHA256: cce42b9a0b596658e3ccb7a8d639633938427b8de2c0314cced13fec6729e82e
  • Pointer size: 131 Bytes
  • Size of remote file: 360 kB
DATA/prompted_controlInversion_betterModel/animal.txt/Kindhearted rabbit doctor.png ADDED

Git LFS Details

  • SHA256: 4d1cd459a9cbde9742f163cafcab1be37e49773efd10c371d8db0d630205d742
  • Pointer size: 131 Bytes
  • Size of remote file: 348 kB
DATA/prompted_controlInversion_betterModel/animal.txt/Loyal dog sheriff.png ADDED

Git LFS Details

  • SHA256: 6eb42b4f27a6c22e7cb89f69067942687bc15ec810644cbdcb57f2fdb1253726
  • Pointer size: 131 Bytes
  • Size of remote file: 333 kB
DATA/prompted_controlInversion_betterModel/animal.txt/Majestic lion king.png ADDED

Git LFS Details

  • SHA256: 26bc054ba29a8b8add95de0489db27ea320bc3827df8a9ed549ae823b8bf4c97
  • Pointer size: 131 Bytes
  • Size of remote file: 347 kB
DATA/prompted_controlInversion_betterModel/animal.txt/Mysterious cat sorcerer.png ADDED

Git LFS Details

  • SHA256: dac57efc513afd1baedd709b0062a57009c714a4aa1fc0e9b932cc9c56d05484
  • Pointer size: 131 Bytes
  • Size of remote file: 331 kB
DATA/prompted_controlInversion_betterModel/animal.txt/Mysterious crow mystic.png ADDED

Git LFS Details

  • SHA256: 4486611cc6bc9ed8607b5e62b920ec3ce2552f08f4eb3bb1d3a5dad0169cb2e7
  • Pointer size: 131 Bytes
  • Size of remote file: 339 kB
DATA/prompted_controlInversion_betterModel/animal.txt/Noble hawk judge.png ADDED

Git LFS Details

  • SHA256: 08c3b0a83457ae73d86daeff8c6edceeb0aef4fd18e215b77a0c0172df0a2f13
  • Pointer size: 131 Bytes
  • Size of remote file: 355 kB
DATA/prompted_controlInversion_betterModel/animal.txt/Noble stallion knight.png ADDED

Git LFS Details

  • SHA256: d492c9dd9ac62bb6edd2757cde64771338c2645cbd3a635bf76c76f6c45f43a1
  • Pointer size: 131 Bytes
  • Size of remote file: 340 kB
DATA/prompted_controlInversion_betterModel/animal.txt/Nomadic camel trader.png ADDED

Git LFS Details

  • SHA256: 54071138e7f728e8176ba9b060bc268b3d83559579a80bde34440dbe21be04db
  • Pointer size: 131 Bytes
  • Size of remote file: 334 kB
DATA/prompted_controlInversion_betterModel/animal.txt/Passionate leopard rocker.png ADDED

Git LFS Details

  • SHA256: e22346137fbeb9662c5fbea7deb21e9d57b2f2a9445f70ecdf3dbd43b1b29c11
  • Pointer size: 131 Bytes
  • Size of remote file: 378 kB
DATA/prompted_controlInversion_betterModel/animal.txt/Philosophical panda thinker.png ADDED

Git LFS Details

  • SHA256: 50cb44587bf8b714172e0848dcf04fd6044310d93596fc573be164aa62857820
  • Pointer size: 131 Bytes
  • Size of remote file: 346 kB
DATA/prompted_controlInversion_betterModel/animal.txt/Playful dolphin entertainer.png ADDED

Git LFS Details

  • SHA256: 6710d5e948ebe2de20555b4fe78e38ade70d968552d370d80444776b4ee6d628
  • Pointer size: 131 Bytes
  • Size of remote file: 381 kB
DATA/prompted_controlInversion_betterModel/animal.txt/Regal deer monarch.png ADDED

Git LFS Details

  • SHA256: 3b511bc595a0c85d3c6a2816488c4cfcab95a9cb5e58a163d3b543abc89b9ca3
  • Pointer size: 131 Bytes
  • Size of remote file: 337 kB
DATA/prompted_controlInversion_betterModel/animal.txt/Relaxed sloth yogi.png ADDED

Git LFS Details

  • SHA256: 808ccb6144ee0bed0c7ff068faec2ae2fda5b8d940a5e20012a026d17b0ffe51
  • Pointer size: 131 Bytes
  • Size of remote file: 347 kB
DATA/prompted_controlInversion_betterModel/animal.txt/Resourceful beaver engineer.png ADDED

Git LFS Details

  • SHA256: 6e2c06d5bb40383f22c60bb448665f8fa86e5c104d6e0dce40a97a485b98a4bc
  • Pointer size: 131 Bytes
  • Size of remote file: 321 kB
DATA/prompted_controlInversion_betterModel/animal.txt/Scholarly tortoise librarian.png ADDED

Git LFS Details

  • SHA256: 036fc590d89df087044d808919695fde4a14190da431e174e66b94d322f8793a
  • Pointer size: 131 Bytes
  • Size of remote file: 321 kB
DATA/prompted_controlInversion_betterModel/animal.txt/Sleek panther spy.png ADDED

Git LFS Details

  • SHA256: 5abbf68029a876afe76be8afd63b422a7d7938661b0811aa7d4524013a79946a
  • Pointer size: 131 Bytes
  • Size of remote file: 358 kB
DATA/prompted_controlInversion_betterModel/animal.txt/Steampunk otter inventor.png ADDED

Git LFS Details

  • SHA256: 0d4fbb61a1557eeefc1ca70d909d84b136e7bd032ecaba54467f2a7486a3a42d
  • Pointer size: 131 Bytes
  • Size of remote file: 393 kB
DATA/prompted_controlInversion_betterModel/animal.txt/Stoic rhino guard.png ADDED

Git LFS Details

  • SHA256: 9bea36f2f5c2d7a1787233f552dc8700ac89d40c22dcf86cd52d863df6dde90d
  • Pointer size: 131 Bytes
  • Size of remote file: 334 kB
DATA/prompted_controlInversion_betterModel/animal.txt/Traditional elephant elder.png ADDED

Git LFS Details

  • SHA256: 22e7d015a4a3d1282c2d5faf5dc73e49effc9c77255559b0768afcf1950d9c99
  • Pointer size: 131 Bytes
  • Size of remote file: 357 kB
DATA/prompted_controlInversion_betterModel/animal.txt/Urban fox detective.png ADDED

Git LFS Details

  • SHA256: 687ff268acafebc1f12f02a40fd57b8f6cfb96bb781a901f355536efaae7c108
  • Pointer size: 131 Bytes
  • Size of remote file: 314 kB
DATA/prompted_controlInversion_betterModel/animal.txt/Vibrant toucan broadcaster.png ADDED

Git LFS Details

  • SHA256: 124a1625431691299c64a5af9dc114b6ffcd0f6f1dd8b8207a9dbd50bfc9d4e5
  • Pointer size: 131 Bytes
  • Size of remote file: 344 kB