update readme

This commit is contained in:
Brett Kuprel 2022-07-05 07:21:15 -04:00
parent c96ba0805e
commit fee7636ce3

18
README.md vendored
View File

@ -32,46 +32,46 @@ from min_dalle import MinDalle
model = MinDalle(is_mega=True, models_root='./pretrained') model = MinDalle(is_mega=True, models_root='./pretrained')
``` ```
The required models will be downloaded to `models_root` if they are not already there. Once everything has finished initializing, call `generate_image` with some text and a seed as many times as you want. The required models will be downloaded to `models_root` if they are not already there. Once everything has finished initializing, call `generate_image` with some text as many times as you want.
```python ```python
text = 'Dali painting of WALL·E' text = 'Dali painting of WALL·E'
image = model.generate_image(text, seed=0, grid_size=4) image = model.generate_image(text, grid_size=4)
display(image) display(image)
``` ```
<img src="https://github.com/kuprel/min-dalle/raw/main/examples/dali_walle.jpg" alt="min-dalle" width="300"/> <img src="https://github.com/kuprel/min-dalle/raw/main/examples/dali_walle.jpg" alt="min-dalle" width="300"/>
```python ```python
text = 'Rusty Iron Man suit found abandoned in the woods being reclaimed by nature' text = 'Rusty Iron Man suit found abandoned in the woods being reclaimed by nature'
image = model.generate_image(text, seed=0, grid_size=3) image = model.generate_image(text, grid_size=3)
display(image) display(image)
``` ```
<img src="https://github.com/kuprel/min-dalle/raw/main/examples/ironman.jpg" alt="min-dalle" width="300"/> <img src="https://github.com/kuprel/min-dalle/raw/main/examples/ironman.jpg" alt="min-dalle" width="300"/>
```python ```python
text = 'court sketch of godzilla on trial' text = 'court sketch of godzilla on trial'
image = model.generate_image(text, seed=6, grid_size=3) image = model.generate_image(text, grid_size=3)
display(image) display(image)
``` ```
<img src="https://github.com/kuprel/min-dalle/raw/main/examples/godzilla_trial.jpg" alt="min-dalle" width="300"/> <img src="https://github.com/kuprel/min-dalle/raw/main/examples/godzilla_trial.jpg" alt="min-dalle" width="300"/>
```python ```python
text = 'a funeral at Whole Foods' text = 'a funeral at Whole Foods'
image = model.generate_image(text, seed=10, grid_size=3) image = model.generate_image(text, grid_size=3)
display(image) display(image)
``` ```
<img src="https://github.com/kuprel/min-dalle/raw/main/examples/funeral.jpg" alt="min-dalle" width="300"/> <img src="https://github.com/kuprel/min-dalle/raw/main/examples/funeral.jpg" alt="min-dalle" width="300"/>
```python ```python
text = 'Jesus turning water into wine on Americas Got Talent' text = 'Jesus turning water into wine on Americas Got Talent'
image = model.generate_image(text, seed=2, grid_size=3) image = model.generate_image(text, grid_size=3)
display(image) display(image)
``` ```
<img src="https://github.com/kuprel/min-dalle/raw/main/examples/jesus.jpg" alt="min-dalle" width="300"/> <img src="https://github.com/kuprel/min-dalle/raw/main/examples/jesus.jpg" alt="min-dalle" width="300"/>
```python ```python
text = 'cctv footage of Yoda robbing a liquor store' text = 'cctv footage of Yoda robbing a liquor store'
image = model.generate_image(text, seed=0, grid_size=3) image = model.generate_image(text, grid_size=3)
display(image) display(image)
``` ```
<img src="https://github.com/kuprel/min-dalle/raw/main/examples/yoda.jpg" alt="min-dalle" width="300"/> <img src="https://github.com/kuprel/min-dalle/raw/main/examples/yoda.jpg" alt="min-dalle" width="300"/>
@ -82,11 +82,11 @@ display(image)
Use `image_from_text.py` to generate images from the command line. Use `image_from_text.py` to generate images from the command line.
```bash ```bash
$ python image_from_text.py --text='artificial intelligence' --no-mega --seed=7 $ python image_from_text.py --text='artificial intelligence' --no-mega
``` ```
<img src="https://github.com/kuprel/min-dalle/raw/main/examples/artificial_intelligence.jpg" alt="min-dalle" width="200"/> <img src="https://github.com/kuprel/min-dalle/raw/main/examples/artificial_intelligence.jpg" alt="min-dalle" width="200"/>
```bash ```bash
$ python image_from_text.py --text='trail cam footage of gollum eating watermelon' --mega --seed=1 --grid-size=3 $ python image_from_text.py --text='trail cam footage of gollum eating watermelon' --mega --grid-size=3
``` ```
<img src="https://github.com/kuprel/min-dalle/raw/main/examples/gollum_trailcam.jpg" alt="min-dalle" width="300"/> <img src="https://github.com/kuprel/min-dalle/raw/main/examples/gollum_trailcam.jpg" alt="min-dalle" width="300"/>