File size: 800 Bytes
42f9763 6fd62d7 eca0a2a 42f9763 eca0a2a 42f9763 eca0a2a 42f9763 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
---
license: mit
---
# Text 2 Image Cli
# Explanation:
Argument Parsing: We use the argparse library to accept parameters through the command line like prompt, model, steps, width, and other parameters that were inputs in the Gradio interface.
Image Generation Logic: The function generate_images is the core image generation process, using the provided model, prompt, and settings.
Random Seed: If the seed is -1, it is randomized.
Prefix/Suffix: *Supports positive/negative prefixes and suffixes from command-line arguments.*
# How to Run It:
Save the above code in a file named image_generation.py.
In your terminal, run:
```
python app.py --model "model_name" --prompt "1girl, solo" --steps 50 --cfg 7.5 --seed -1 --image_num 2
```
This will generate images based on the given arguments.
|