mirror of
https://github.com/ml-explore/mlx-examples.git
synced 2025-06-24 09:21:18 +08:00
FLUX: update README.md (#1036)
This commit is contained in:
parent
605c4854f1
commit
bbd2003047
@ -20,8 +20,10 @@ Some more useful examples are listed below.
|
|||||||
|
|
||||||
### Image Models
|
### Image Models
|
||||||
|
|
||||||
|
- Generating images
|
||||||
|
- [FLUX](flux)
|
||||||
|
- [Stable Diffusion or SDXL](stable_diffusion)
|
||||||
- Image classification using [ResNets on CIFAR-10](cifar).
|
- Image classification using [ResNets on CIFAR-10](cifar).
|
||||||
- Generating images with [Stable Diffusion or SDXL](stable_diffusion).
|
|
||||||
- Convolutional variational autoencoder [(CVAE) on MNIST](cvae).
|
- Convolutional variational autoencoder [(CVAE) on MNIST](cvae).
|
||||||
|
|
||||||
### Audio Models
|
### Audio Models
|
||||||
|
@ -28,6 +28,26 @@ You can install all of the above with the `requirements.txt` as follows:
|
|||||||
|
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
|
|
||||||
|
|
||||||
|
Usage
|
||||||
|
---------
|
||||||
|
|
||||||
|
You can use the following command to generate an image, using `--output` to specify the storage location of the image, defaulting to `out.png`.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
python txt2image.py --model schnell \
|
||||||
|
--n-images 1 \
|
||||||
|
--image-size 256x512 \
|
||||||
|
--verbose \
|
||||||
|
'A photo of an astronaut riding a horse on Mars.'
|
||||||
|
```
|
||||||
|
|
||||||
|
For more parameters, please use the `--help` command to view.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
python txt2image.py --help
|
||||||
|
```
|
||||||
|
|
||||||
Inference
|
Inference
|
||||||
---------
|
---------
|
||||||
|
|
||||||
@ -78,7 +98,11 @@ except for some additional logic to quantize and/or load trained adapters. One
|
|||||||
can use the script as follows:
|
can use the script as follows:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
python txt2image.py --n-images 4 --n-rows 2 --image-size 256x512 'A photo of an astronaut riding a horse on Mars.'
|
python txt2image.py \
|
||||||
|
--n-images 4 \
|
||||||
|
--n-rows 2 \
|
||||||
|
--image-size 256x512 \
|
||||||
|
'A photo of an astronaut riding a horse on Mars.'
|
||||||
```
|
```
|
||||||
|
|
||||||
### Experimental Options
|
### Experimental Options
|
||||||
|
Loading…
Reference in New Issue
Block a user