Skip to content

Commit

Permalink
works with latest flax version 0.5.2, updated requirements.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
kuprel committed Jun 29, 2022
1 parent c4f613c commit 764b5bb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/kuprel/min-dalle/blob/main/min_dalle.ipynb)

This is a minimal implementation of [DALL·E Mini](https://github.com/borisdayma/dalle-mini). It has been stripped to the bare essentials necessary for doing inference, and converted to PyTorch. The only third party dependencies are numpy, torch, and flax (and optionally wandb to download the models). DALL·E Mega inference with pytorch takes about 10 seconds in colab.
This is a minimal implementation of [DALL·E Mini](https://github.com/borisdayma/dalle-mini). It has been stripped to the bare essentials necessary for doing inference, and converted to PyTorch. The only third party dependencies are numpy, torch, and flax (and optionally wandb to download the models). DALL·E Mega inference with PyTorch takes about 10 seconds in Colab.

### Setup

Expand All @@ -18,7 +18,7 @@ Use the python script `image_from_text.py` to generate images from the command l
### Examples

```
python3 image_from_text.py --text='artificial intelligence' --torch
python image_from_text.py --text='artificial intelligence' --torch
```
![Alien](examples/artificial_intelligence.png)

Expand Down
4 changes: 2 additions & 2 deletions image_from_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
parser.add_argument('--torch', action='store_true')
parser.add_argument('--no-torch', dest='torch', action='store_false')
parser.set_defaults(torch=False)
parser.add_argument('--text', type=str)
parser.add_argument('--seed', type=int, default=0)
parser.add_argument('--text', type=str, default='alien life')
parser.add_argument('--seed', type=int, default=7)
parser.add_argument('--image_path', type=str, default='generated')
parser.add_argument('--sample_token_count', type=int, default=256) # for debugging

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
torch
flax==0.4.2
flax==0.5.2
wandb

0 comments on commit 764b5bb

Please sign in to comment.