$ python image_from_text.py --text='court sketch of godzilla on trial' --mega
```
![Godzilla Trial](examples/godzilla_on_trial.png)
### Python
To load a model once and generate multiple times, first initialize `MinDalleTorch`.
@ -50,7 +34,6 @@ model = MinDalleTorch(
)
```
The required models will be downloaded to `models_root` if they are not already there. After the model has loaded, call `generate_image` with some text and a seed as many times as you want.
```python
@ -65,4 +48,19 @@ text = "trail cam footage of gollum eating watermelon"
image = model.generate_image(text, seed=1)
display(image)
```
![Gollum Trailcam](examples/gollum_trailcam.png)
![Gollum Trailcam](examples/gollum_trailcam.png)
### Command Line
Use the python script `image_from_text.py` to generate images from the command line.