add performance graph to readme

This commit is contained in:
Brett Kuprel 2022-07-11 08:39:48 -04:00
parent bd9287cec1
commit 2ab4365059
3 changed files with 5 additions and 1 deletions

4
README.md vendored
View File

@ -13,6 +13,10 @@ To generate a 4x4 grid of DALL·E Mega images it takes:
- 48 sec with a P100 in Colab
- 13 sec with an A100 on Replicate
Here's a more detailed breakdown on the A100 of total inference time vs number of generated images:
<img src="https://github.com/kuprel/min-dalle/raw/main/performance_a100.png" alt="min-dalle" width="400"/>
Credit to @technobird22 and his [NeoGen](https://github.com/technobird22/NeoGen) discord bot for the graph
The flax model and code for converting it to torch can be found [here](https://github.com/kuprel/min-dalle-flax).
## Install

View File

@ -186,7 +186,7 @@ class MinDalle:
tokens = self.tokenizer.tokenize(text, is_verbose=is_verbose)
if len(tokens) > self.text_token_count:
tokens = tokens[:self.text_token_count]
if is_verbose: print("text tokens", tokens)
if is_verbose: print("{} text tokens".format(len(tokens)), tokens)
text_tokens = numpy.ones((2, 64), dtype=numpy.int32)
text_tokens[0, :2] = [tokens[0], tokens[-1]]
text_tokens[1, :len(tokens)] = tokens

BIN
performance_a100.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB