mirror of
https://github.com/storytold/cloud-worker.git
synced 2026-10-09 00:09:43 +00:00
bench: multi-reference ref2v support (1-8 ref images, match/max sizing)
- refheavy suite: ref2v saturation with 1/4/8 refs, the priority modality - family suite: reduced grid for int8/bf16 family comparisons - 8 distinct 1344x768 reference scenes generated into /ComfyUI/input Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -114,8 +114,35 @@ def bench_ref():
|
||||
return img
|
||||
|
||||
|
||||
# Distinct palettes for the multi-reference ref2v benchmark set. Each image is
|
||||
# a different scene so 4-8 refs exercise genuinely different reference context.
|
||||
REF_PALETTES = [
|
||||
((200, 120, 60), (240, 200, 140)), # amber sunset
|
||||
((20, 30, 80), (90, 140, 200)), # blue dusk
|
||||
((10, 60, 50), (120, 200, 160)), # teal dawn
|
||||
((80, 20, 90), (200, 120, 220)), # violet night
|
||||
((160, 40, 30), (250, 150, 90)), # red dusk
|
||||
((30, 30, 30), (140, 140, 150)), # overcast grey
|
||||
((10, 20, 40), (40, 90, 160)), # deep night blue
|
||||
((190, 160, 40), (250, 240, 170)), # golden noon
|
||||
]
|
||||
|
||||
|
||||
def bench_ref_set():
|
||||
"""8 distinct city scenes, bench_ref_01..08.png (1344x768)."""
|
||||
for i, (top, bottom) in enumerate(REF_PALETTES, start=1):
|
||||
img = city_backdrop(1344, 768, top, bottom, seed=100 + i)
|
||||
d = ImageDraw.Draw(img)
|
||||
# distinct celestial marker per scene so refs are visually distinct
|
||||
x = 120 + i * 130
|
||||
d.ellipse([x, 80, x + 90, 170],
|
||||
fill=(255, 240, 200) if i % 2 else (240, 240, 255))
|
||||
img.save(f"{OUT}/bench_ref_{i:02d}.png")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
superboy().save(f"{OUT}/red_superboy_on_city_roof.png")
|
||||
mecha_dragon().save(f"{OUT}/mecha_dragon_lightning.png")
|
||||
bench_ref().save(f"{OUT}/bench_ref_1344x768.png")
|
||||
print("wrote 3 images to", OUT)
|
||||
bench_ref_set()
|
||||
print("wrote 11 images to", OUT)
|
||||
|
||||
Reference in New Issue
Block a user