add performance graph to readme

main
Brett Kuprel 2 years ago
parent bd9287cec1
commit 2ab4365059
  1. 4
      README.md
  2. 2
      min_dalle/min_dalle.py
  3. BIN
      performance_a100.png

4
README.md vendored

@ -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

@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Loading…
Cancel
Save