update readme
This commit is contained in:
parent
e4c2b71c11
commit
b3cd959061
34
README.md
vendored
34
README.md
vendored
|
@ -20,22 +20,6 @@ $ pip install min-dalle
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
|
||||||
### Command Line
|
|
||||||
|
|
||||||
Use the python script `image_from_text.py` to generate images from the command line.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ python image_from_text.py --text='artificial intelligence' --seed=7
|
|
||||||
```
|
|
||||||
![Artificial Intelligence](examples/artificial_intelligence.png)
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ python image_from_text.py --text='court sketch of godzilla on trial' --mega
|
|
||||||
```
|
|
||||||
![Godzilla Trial](examples/godzilla_on_trial.png)
|
|
||||||
|
|
||||||
|
|
||||||
### Python
|
### Python
|
||||||
|
|
||||||
To load a model once and generate multiple times, first initialize `MinDalleTorch`.
|
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.
|
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
|
```python
|
||||||
|
@ -65,4 +48,19 @@ text = "trail cam footage of gollum eating watermelon"
|
||||||
image = model.generate_image(text, seed=1)
|
image = model.generate_image(text, seed=1)
|
||||||
display(image)
|
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.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ python image_from_text.py --text='artificial intelligence' --seed=7
|
||||||
|
```
|
||||||
|
![Artificial Intelligence](examples/artificial_intelligence.png)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ python image_from_text.py --text='court sketch of godzilla on trial' --mega
|
||||||
|
```
|
||||||
|
![Godzilla Trial](examples/godzilla_on_trial.png)
|
Loading…
Reference in New Issue
Block a user