Created
August 2, 2022 23:00
-
-
Save nousr/267205e84fee37f9a2017aa1e2572572 to your computer and use it in GitHub Desktop.
A working example that will make a caption/image table and upload it to wandb for evaluation.
This file contains 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
import torch | |
from dream_bench import benchmark, DreamBenchConfig | |
def mock_harness(conditioning_args): | |
caption = conditioning_args["caption.txt"] | |
tokenized_text = conditioning_args["tokenized_text.npy"] | |
img_emb = conditioning_args["prior_image_embedding.npy"] | |
return torch.rand((img_emb.shape[0], 3, 256, 256)) | |
def main(): | |
config = DreamBenchConfig.from_json_path("configs/example_config.json") | |
benchmark(adapter=mock_harness, config=config) | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment