update readme, random seed if none specified
This commit is contained in:
@@ -11,7 +11,7 @@ The flax model, and the code for coverting it to torch, have been moved [here](h
|
||||
|
||||
### Install
|
||||
|
||||
```bash
|
||||
```zsh
|
||||
$ pip install min-dalle
|
||||
```
|
||||
|
||||
@@ -19,6 +19,16 @@ $ pip install min-dalle
|
||||
|
||||
Use the python script `image_from_text.py` to generate images from the command line.
|
||||
|
||||
```zsh
|
||||
$ python image_from_text.py --text='artificial intelligence' --seed=7
|
||||
```
|
||||

|
||||
|
||||
```zsh
|
||||
$ python image_from_text.py --text='court sketch of godzilla on trial' --mega
|
||||
```
|
||||

|
||||
|
||||
To load a model once and generate multiple times, initialize `MinDalleTorch`, then call `generate_image` with some text and a seed.
|
||||
|
||||
```python
|
||||
@@ -29,33 +39,17 @@ model = MinDalleTorch(
|
||||
is_reusable=True,
|
||||
models_root='./pretrained'
|
||||
)
|
||||
|
||||
image = model.generate_image("court sketch of godzilla on trial", seed=40)
|
||||
```
|
||||
|
||||
Model parameters will be downloaded as needed to the directory specified. The models can also be manually downloaded [here](https://huggingface.co/kuprel/min-dalle/tree/main).
|
||||
|
||||
### Examples
|
||||
|
||||
```python
|
||||
image = model.generate_image("a comfy chair that looks like an avocado")
|
||||
display(image)
|
||||
```
|
||||
python image_from_text.py --text='artificial intelligence' --seed=7
|
||||
```
|
||||

|
||||
|
||||
```python
|
||||
image = model.generate_image("trail cam footage of gollum eating watermelon", seed=1)
|
||||
display(image)
|
||||
```
|
||||

|
||||
|
||||
```
|
||||
python image_from_text.py --text='a comfy chair that looks like an avocado' --mega --seed=10
|
||||
```
|
||||

|
||||
|
||||
|
||||
```
|
||||
python image_from_text.py --text='court sketch of godzilla on trial' --mega --seed=40
|
||||
```
|
||||

|
||||
|
||||
|
||||
```
|
||||
python image_from_text.py --text='trail cam footage of gollum eating watermelon' --mega --seed=1
|
||||
```
|
||||

|
||||
Model parameters will be downloaded as needed to the directory specified. The models can also be manually downloaded [here](https://huggingface.co/kuprel/min-dalle/tree/main).
|
||||
Reference in New Issue
Block a user