Paresh1879
commited on
Commit
•
b28a5fd
1
Parent(s):
41c4916
Update README.md
Browse files
README.md
CHANGED
@@ -15,14 +15,14 @@ This repository contains instructions and code for training a DreamBooth LoRA mo
|
|
15 |
|
16 |
Here are a few sample images generated by the trained model:
|
17 |
|
18 |
-
![Trump Thumbs Up in
|
19 |
-
*A high quality picture of Trump showing thumbs up in a busy street of India, detailed, sharp focus*
|
20 |
|
21 |
![Trump Thumbs Up in a Taco Restaurant](Output-Complex/Trump7.jpeg)
|
22 |
-
*An intricately detailed digital painting of Donald Trump giving a thumbs up at a taco restaurant. The background includes colorful decor and a bustling atmosphere with people enjoying their meals.*
|
23 |
|
24 |
![Trump Thumbs Up at the Beach](Output-Complex/Trump2.jpeg)
|
25 |
-
*A high-quality photo of Donald Trump giving a thumbs up on a sunny beach. The scene includes clear blue water, white sand, and Trump in casual beachwear. The image is detailed, with Trump’s smiling face and the vibrant beach setting in sharp focus.*.
|
26 |
|
27 |
## Requirements
|
28 |
|
@@ -37,6 +37,29 @@ To get started, clone the repository and navigate to the project directory. Inst
|
|
37 |
To train the model, prepare a dataset of images featuring Donald Trump giving a thumbs up gesture and place them in a directory. Run the training script `train_dreambooth_lora_sdxl.py` with the appropriate command-line arguments specifying the pretrained model, instance data directory, output directory, and various training hyperparameters.
|
38 |
|
39 |
After training, load the trained LoRA weights and use the `DiffusionPipeline` class from the Diffusers library to generate images. Provide a prompt describing the desired image, such as "A high quality picture of Trump showing the thumbs up in Paris detailed, sharp focus". The generated image will be saved to the specified output directory.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
|
41 |
## Results
|
42 |
|
|
|
15 |
|
16 |
Here are a few sample images generated by the trained model:
|
17 |
|
18 |
+
![Trump Thumbs Up in India](Output-Complex/Trump1.jpeg)
|
19 |
+
* 1. A high quality picture of Trump showing thumbs up in a busy street of India, detailed, sharp focus*
|
20 |
|
21 |
![Trump Thumbs Up in a Taco Restaurant](Output-Complex/Trump7.jpeg)
|
22 |
+
* 2. An intricately detailed digital painting of Donald Trump giving a thumbs up at a taco restaurant. The background includes colorful decor and a bustling atmosphere with people enjoying their meals.*
|
23 |
|
24 |
![Trump Thumbs Up at the Beach](Output-Complex/Trump2.jpeg)
|
25 |
+
* 3. A high-quality photo of Donald Trump giving a thumbs up on a sunny beach. The scene includes clear blue water, white sand, and Trump in casual beachwear. The image is detailed, with Trump’s smiling face and the vibrant beach setting in sharp focus.*.
|
26 |
|
27 |
## Requirements
|
28 |
|
|
|
37 |
To train the model, prepare a dataset of images featuring Donald Trump giving a thumbs up gesture and place them in a directory. Run the training script `train_dreambooth_lora_sdxl.py` with the appropriate command-line arguments specifying the pretrained model, instance data directory, output directory, and various training hyperparameters.
|
38 |
|
39 |
After training, load the trained LoRA weights and use the `DiffusionPipeline` class from the Diffusers library to generate images. Provide a prompt describing the desired image, such as "A high quality picture of Trump showing the thumbs up in Paris detailed, sharp focus". The generated image will be saved to the specified output directory.
|
40 |
+
## API Server
|
41 |
+
|
42 |
+
[SDXL_API_Server](https://huggingface.co/Paresh1879/stable-diffusion-xl-thumbsup-extend/blob/main/SDXL_API_Server.py) contains the server side code containing the below information :
|
43 |
+
|
44 |
+
- **Image Generation Endpoint:**
|
45 |
+
- `/generate_image`: Accepts POST requests with prompts to generate Trump thumbs up images.
|
46 |
+
- Users provide prompts describing desired image contexts.
|
47 |
+
- Images are generated using a pre-trained model.
|
48 |
+
|
49 |
+
- **API Key Authentication:**
|
50 |
+
- Ensures presence of API key for authorization.
|
51 |
+
- Rejects unauthorized requests.
|
52 |
+
|
53 |
+
- **API Key Usage Tracking:**
|
54 |
+
- Tracks API key usage count.
|
55 |
+
- `/api_key_usage` endpoint retrieves usage count.
|
56 |
+
|
57 |
+
- **The Generated Output in postman:**
|
58 |
+
- ![POST Output](postman_output.png)
|
59 |
+
- *Endpoint to get generated images via a prompt using the above trigger keyword and style*
|
60 |
+
- ![Api_Key_Counts](api_key_counts.png)
|
61 |
+
- *Server maintains a count of each time the API key was used to successfully generate an image.*
|
62 |
+
|
63 |
|
64 |
## Results
|
65 |
|