Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,20 @@
|
|
1 |
-
---
|
2 |
-
license: mit
|
3 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: mit
|
3 |
+
---
|
4 |
+
|
5 |
+
Explanation:
|
6 |
+
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.
|
7 |
+
Image Generation Logic: The function generate_images is the core image generation process, using the provided model, prompt, and settings.
|
8 |
+
Random Seed: If the seed is -1, it is randomized.
|
9 |
+
Prefix/Suffix: Supports positive/negative prefixes and suffixes from command-line arguments.
|
10 |
+
|
11 |
+
|
12 |
+
How to Run It:
|
13 |
+
Save the above code in a file named image_generation.py.
|
14 |
+
In your terminal, run:
|
15 |
+
|
16 |
+
```
|
17 |
+
python app.py --model "model_name" --prompt "1girl, solo" --steps 50 --cfg 7.5 --seed -1 --image_num 2
|
18 |
+
```
|
19 |
+
|
20 |
+
This will generate images based on the given arguments.
|