DongfuJiang commited on
Commit
2b29775
1 Parent(s): 2acb7a7
arena_elo/elo_rating/clean_battle_data.py CHANGED
@@ -82,7 +82,8 @@ def replace_model_name(old_name, tstamp):
82
  "claude-instant-v1": "claude-instant-1",
83
  "oasst-sft-1-pythia-12b": "oasst-pythia-12b",
84
  "claude-2": "claude-2.0",
85
- "PlayGroundV2": "Playground v2",
 
86
  }
87
  if old_name in ["gpt-4", "gpt-3.5-turbo"]:
88
  if tstamp > 1687849200:
@@ -250,7 +251,7 @@ def clean_battle_data(
250
  print(f"Invalid model names: {_model}")
251
  valid = False
252
  break
253
- if not (platform in ["playground", "imagenhub"] and task == "generation"):
254
  valid = False
255
  break
256
  if not valid:
 
82
  "claude-instant-v1": "claude-instant-1",
83
  "oasst-sft-1-pythia-12b": "oasst-pythia-12b",
84
  "claude-2": "claude-2.0",
85
+ "PlayGroundV2": "PlayGround V2",
86
+ "PlayGroundV2.5": "PlayGround V2.5",
87
  }
88
  if old_name in ["gpt-4", "gpt-3.5-turbo"]:
89
  if tstamp > 1687849200:
 
251
  print(f"Invalid model names: {_model}")
252
  valid = False
253
  break
254
+ if not (platform.lower() in ["playground", "imagenhub"] and task == "generation"):
255
  valid = False
256
  break
257
  if not valid:
arena_elo/elo_rating/generate_leaderboard.py CHANGED
@@ -30,6 +30,7 @@ def main(
30
  model_info[model]["License"] = "N/A"
31
  model_info[model]["Organization"] = "N/A"
32
  model_info[model]["Link"] = "N/A"
 
33
  model_info[model]["Model"] = model
34
  model_info[model]["key"] = model
35
 
 
30
  model_info[model]["License"] = "N/A"
31
  model_info[model]["Organization"] = "N/A"
32
  model_info[model]["Link"] = "N/A"
33
+ print(f"Model {model} not found in model_info.json")
34
  model_info[model]["Model"] = model
35
  model_info[model]["key"] = model
36
 
arena_elo/generation_model_info.json CHANGED
@@ -9,7 +9,7 @@
9
  "License": "Playground v2 Community License",
10
  "Organization": "Playground"
11
  },
12
- "PlaygroundV2.5": {
13
  "Link": "https://huggingface.co/playgroundai/playground-v2.5-1024px-aesthetic",
14
  "License": "Playground v2.5 Community License",
15
  "Organization": "Playground"
 
9
  "License": "Playground v2 Community License",
10
  "Organization": "Playground"
11
  },
12
+ "PlayGroundV2.5": {
13
  "Link": "https://huggingface.co/playgroundai/playground-v2.5-1024px-aesthetic",
14
  "License": "Playground v2.5 Community License",
15
  "Organization": "Playground"
arena_elo/results/20240411/clean_battle_t2i_generation.json CHANGED
The diff for this file is too large to render. See raw diff
 
arena_elo/results/20240411/elo_results_t2i_generation.pkl CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:6e2e2b693cc44a7ba8b8abf1501f3f1ebda6c232b5ee79f760545705a7ca3248
3
- size 62419
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f923aeeaecb985cafb5ec70c59daef664f625b39bffc38a488e8066c701e1146
3
+ size 62428
arena_elo/results/20240411/t2i_generation_leaderboard.csv CHANGED
@@ -1,10 +1,10 @@
1
  key,Model,Arena Elo rating (anony),Arena Elo rating (full),License,Organization,Link
2
- PlayGroundV2.5,PlayGroundV2.5,1226.9110139608943,1102.8780955386826,N/A,N/A,N/A
3
- StableCascade,StableCascade,1105.4281747413283,1059.3744882854992,stable-cascade-nc-community (other),Stability AI,https://huggingface.co/stabilityai/stable-cascade
4
- Playground v2,Playground v2,1090.337952005879,1100.0232585639621,Playground v2 Community License,Playground,https://huggingface.co/playgroundai/playground-v2-1024px-aesthetic
5
- SDXLLightning,SDXLLightning,1042.9663858069512,1039.7571032040712,openrail++,ByteDance,https://huggingface.co/ByteDance/SDXL-Lightning
6
- PixArtAlpha,PixArtAlpha,1020.6589616543491,1022.4559565308926,openrail++,PixArt-alpha,https://huggingface.co/PixArt-alpha/PixArt-XL-2-1024-MS
7
- SDXL,SDXL,965.437822756589,999.8413183312834,openrail++,Stability AI,https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0
8
- SDXLTurbo,SDXLTurbo,912.2388336601439,950.6036749825616,sai-nc-community (other),Stability AI,https://huggingface.co/stabilityai/sdxl-turbo
9
- OpenJourney,OpenJourney,841.1845129591121,873.4879879328548,creativeml-openrail-m,PromptHero,https://huggingface.co/prompthero/openjourney
10
- LCM,LCM,794.8363424547509,852.4223549305145,MIT License,Tsinghua University,https://huggingface.co/SimianLuo/LCM_Dreamshaper_v7
 
1
  key,Model,Arena Elo rating (anony),Arena Elo rating (full),License,Organization,Link
2
+ PlayGround V2.5,PlayGround V2.5,1226.9110139608943,1105.1039810421305,N/A,N/A,N/A
3
+ StableCascade,StableCascade,1105.4281747413283,1059.2855612093028,stable-cascade-nc-community (other),Stability AI,https://huggingface.co/stabilityai/stable-cascade
4
+ PlayGround V2,PlayGround V2,1090.337952005879,1099.3544589205903,N/A,N/A,N/A
5
+ SDXLLightning,SDXLLightning,1042.9663858069512,1039.7302783143161,openrail++,ByteDance,https://huggingface.co/ByteDance/SDXL-Lightning
6
+ PixArtAlpha,PixArtAlpha,1020.6589616543491,1022.1576923175103,openrail++,PixArt-alpha,https://huggingface.co/PixArt-alpha/PixArt-XL-2-1024-MS
7
+ SDXL,SDXL,965.437822756589,999.5438403180763,openrail++,Stability AI,https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0
8
+ SDXLTurbo,SDXLTurbo,912.2388336601439,950.3304269579979,sai-nc-community (other),Stability AI,https://huggingface.co/stabilityai/sdxl-turbo
9
+ OpenJourney,OpenJourney,841.1845129591121,873.1998397741838,creativeml-openrail-m,PromptHero,https://huggingface.co/prompthero/openjourney
10
+ LCM,LCM,794.8363424547509,852.1337214129775,MIT License,Tsinghua University,https://huggingface.co/SimianLuo/LCM_Dreamshaper_v7
arena_elo/results/latest/clean_battle_t2i_generation.json CHANGED
The diff for this file is too large to render. See raw diff
 
arena_elo/results/latest/elo_results_t2i_generation.pkl CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:6e2e2b693cc44a7ba8b8abf1501f3f1ebda6c232b5ee79f760545705a7ca3248
3
- size 62419
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f923aeeaecb985cafb5ec70c59daef664f625b39bffc38a488e8066c701e1146
3
+ size 62428
arena_elo/results/latest/t2i_generation_leaderboard.csv CHANGED
@@ -1,10 +1,10 @@
1
  key,Model,Arena Elo rating (anony),Arena Elo rating (full),License,Organization,Link
2
- PlayGroundV2.5,PlayGroundV2.5,1226.9110139608943,1102.8780955386826,N/A,N/A,N/A
3
- StableCascade,StableCascade,1105.4281747413283,1059.3744882854992,stable-cascade-nc-community (other),Stability AI,https://huggingface.co/stabilityai/stable-cascade
4
- Playground v2,Playground v2,1090.337952005879,1100.0232585639621,Playground v2 Community License,Playground,https://huggingface.co/playgroundai/playground-v2-1024px-aesthetic
5
- SDXLLightning,SDXLLightning,1042.9663858069512,1039.7571032040712,openrail++,ByteDance,https://huggingface.co/ByteDance/SDXL-Lightning
6
- PixArtAlpha,PixArtAlpha,1020.6589616543491,1022.4559565308926,openrail++,PixArt-alpha,https://huggingface.co/PixArt-alpha/PixArt-XL-2-1024-MS
7
- SDXL,SDXL,965.437822756589,999.8413183312834,openrail++,Stability AI,https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0
8
- SDXLTurbo,SDXLTurbo,912.2388336601439,950.6036749825616,sai-nc-community (other),Stability AI,https://huggingface.co/stabilityai/sdxl-turbo
9
- OpenJourney,OpenJourney,841.1845129591121,873.4879879328548,creativeml-openrail-m,PromptHero,https://huggingface.co/prompthero/openjourney
10
- LCM,LCM,794.8363424547509,852.4223549305145,MIT License,Tsinghua University,https://huggingface.co/SimianLuo/LCM_Dreamshaper_v7
 
1
  key,Model,Arena Elo rating (anony),Arena Elo rating (full),License,Organization,Link
2
+ PlayGround V2.5,PlayGround V2.5,1226.9110139608943,1105.1039810421305,N/A,N/A,N/A
3
+ StableCascade,StableCascade,1105.4281747413283,1059.2855612093028,stable-cascade-nc-community (other),Stability AI,https://huggingface.co/stabilityai/stable-cascade
4
+ PlayGround V2,PlayGround V2,1090.337952005879,1099.3544589205903,N/A,N/A,N/A
5
+ SDXLLightning,SDXLLightning,1042.9663858069512,1039.7302783143161,openrail++,ByteDance,https://huggingface.co/ByteDance/SDXL-Lightning
6
+ PixArtAlpha,PixArtAlpha,1020.6589616543491,1022.1576923175103,openrail++,PixArt-alpha,https://huggingface.co/PixArt-alpha/PixArt-XL-2-1024-MS
7
+ SDXL,SDXL,965.437822756589,999.5438403180763,openrail++,Stability AI,https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0
8
+ SDXLTurbo,SDXLTurbo,912.2388336601439,950.3304269579979,sai-nc-community (other),Stability AI,https://huggingface.co/stabilityai/sdxl-turbo
9
+ OpenJourney,OpenJourney,841.1845129591121,873.1998397741838,creativeml-openrail-m,PromptHero,https://huggingface.co/prompthero/openjourney
10
+ LCM,LCM,794.8363424547509,852.1337214129775,MIT License,Tsinghua University,https://huggingface.co/SimianLuo/LCM_Dreamshaper_v7
serve/vote_utils.py CHANGED
@@ -3,6 +3,7 @@ import time
3
  import json
4
  import uuid
5
  import gradio as gr
 
6
  from pathlib import Path
7
  from .utils import *
8
  from .log_utils import build_logger
@@ -344,6 +345,9 @@ def generate_igm(gen_func, state0, state1, text, model_name0, model_name1, reque
344
  ip = get_ip(request)
345
  igm_logger.info(f"generate. ip: {ip}")
346
  start_tstamp = time.time()
 
 
 
347
  generated_image0, generated_image1 = gen_func(text, model_name0, model_name1)
348
  state0.prompt = text
349
  state1.prompt = text
@@ -400,6 +404,8 @@ def generate_igm_annoy(gen_func, state0, state1, text, model_name0, model_name1,
400
  ip = get_ip(request)
401
  igm_logger.info(f"generate. ip: {ip}")
402
  start_tstamp = time.time()
 
 
403
  generated_image0, generated_image1, model_name0, model_name1 = gen_func(text, model_name0, model_name1)
404
  state0.prompt = text
405
  state1.prompt = text
@@ -521,6 +527,8 @@ def generate_iem(gen_func, state0, state1, source_text, target_text, instruct_te
521
  ip = get_ip(request)
522
  igm_logger.info(f"generate. ip: {ip}")
523
  start_tstamp = time.time()
 
 
524
  generated_image0, generated_image1 = gen_func(source_text, target_text, instruct_text, source_image, model_name0, model_name1)
525
  state0.source_prompt = source_text
526
  state0.target_prompt = target_text
@@ -594,6 +602,8 @@ def generate_iem_annoy(gen_func, state0, state1, source_text, target_text, instr
594
  ip = get_ip(request)
595
  igm_logger.info(f"generate. ip: {ip}")
596
  start_tstamp = time.time()
 
 
597
  generated_image0, generated_image1, model_name0, model_name1 = gen_func(source_text, target_text, instruct_text, source_image, model_name0, model_name1)
598
  state0.source_prompt = source_text
599
  state0.target_prompt = target_text
 
3
  import json
4
  import uuid
5
  import gradio as gr
6
+ import regex as re
7
  from pathlib import Path
8
  from .utils import *
9
  from .log_utils import build_logger
 
345
  ip = get_ip(request)
346
  igm_logger.info(f"generate. ip: {ip}")
347
  start_tstamp = time.time()
348
+ # Remove ### Model (A|B): from model name
349
+ model_name0 = re.sub(r"### Model A: ", "", model_name0)
350
+ model_name1 = re.sub(r"### Model B: ", "", model_name1)
351
  generated_image0, generated_image1 = gen_func(text, model_name0, model_name1)
352
  state0.prompt = text
353
  state1.prompt = text
 
404
  ip = get_ip(request)
405
  igm_logger.info(f"generate. ip: {ip}")
406
  start_tstamp = time.time()
407
+ model_name0 = re.sub(r"### Model A: ", "", model_name0)
408
+ model_name1 = re.sub(r"### Model B: ", "", model_name1)
409
  generated_image0, generated_image1, model_name0, model_name1 = gen_func(text, model_name0, model_name1)
410
  state0.prompt = text
411
  state1.prompt = text
 
527
  ip = get_ip(request)
528
  igm_logger.info(f"generate. ip: {ip}")
529
  start_tstamp = time.time()
530
+ model_name0 = re.sub(r"### Model A: ", "", model_name0)
531
+ model_name1 = re.sub(r"### Model B: ", "", model_name1)
532
  generated_image0, generated_image1 = gen_func(source_text, target_text, instruct_text, source_image, model_name0, model_name1)
533
  state0.source_prompt = source_text
534
  state0.target_prompt = target_text
 
602
  ip = get_ip(request)
603
  igm_logger.info(f"generate. ip: {ip}")
604
  start_tstamp = time.time()
605
+ model_name0 = re.sub(r"### Model A: ", "", model_name0)
606
+ model_name1 = re.sub(r"### Model B: ", "", model_name1)
607
  generated_image0, generated_image1, model_name0, model_name1 = gen_func(source_text, target_text, instruct_text, source_image, model_name0, model_name1)
608
  state0.source_prompt = source_text
609
  state0.target_prompt = target_text