Easy Diffuser is a software that helps generate new images by extracting appropriate positive and negative tags required for image generation using a reference image similar to the image you want to create. It assists in obtaining the desired image with minimal effort.
run_link: Generates positive and negative prompts related to the input image link.run_image: Generates positive and negative prompts related to the input image file.print_caption: Prints the generated tags fromrun_linkorrun_image.send2ui: Sends the generated tags to the WEBUI. Stable Diffusion uses these tags to generate images related to the tags and saves them in the local repository.input_link: Preprocesses the image link into a format that the model can learn.img2img_: Generates similar images to the selected image.
- Clone the repository:
git clone https://huggingface.co/leeyunjai/img2txt - Clone the Easy Diffuser model:
git clone https://github.com/Easy-Diffuser/Model.git - Define the software version using the
Requirements.txtfile in theEasy-Diffuser/Modelfolder. - Insert the following code into the
webui-user.batfile:set COMMANDLINE_ARGS=--api - The installation is now complete.
To develop other products using the features of our software, follow these steps:
- Create an empty file to work with.
- Import Easy Diffuser into your project.
- The Easy Diffuser package includes a class called
start, which provides the following methods:
| Function | Function Format | Description |
|---|---|---|
run_link |
Class_name.run_link(link) |
Generates positive and negative prompt tags related to the image using the image link. |
run_img |
Class_name.run_img(img) |
Generates positive and negative prompt tags related to the image using the image file. |
print_caption |
Class_name.print_caption() |
Prints the generated tags from run_link or run_image. |
input_img |
Class_name.input_img(img) |
Saves the image from the local repository in the class variable. |
input_link |
Class_name.input_link(link) |
Preprocesses the link-formatted image into a format that the model can learn. |
send2ui |
Class_name.send2ui() |
Generates images based on the obtained tags and the stable diffusion model and saves them in the local repository. |
img2img_ |
Class_name.img2img_(link) |
Generates similar images to the selected image using the stable diffusion model and saves them in the local repository. |
Easy Diffuser is implemented by 박찬호, 허찬용.
If there's any need for support or feedback, feel free to add issues in the corresponding repository.
Or you can freely contact via email:
박찬호 : chanho.park@dankook.ac.kr
허찬용 : chanyong@dankook.ac.kr
- Outputting tags may take approximately 3 seconds due to the large model size.
- The software accurately extracts main keywords related to the image.
- It generates images according to the user's preferences based on the Stable Diffusion model.
- Various features have been implemented for developers.
- The software is divided into fine-grained functions, making it easy to create other software.
- Users spend a lot of time generating diffusion images.
- Repeated generation of diffusion images consumes a lot of computing resources and power.
- It is difficult to share the experience of the image generation process among users.
-
Extraction of generation conditions from a reference image:
- Users can load a reference image and extract generation conditions. Easy Diffuser converts the input image into text using OpenAI's CLIP and translates it into tag combinations using a transformer-based translator. The resulting tag combinations can be used as inputs for
txt2imgin the WebUI.
- Users can load a reference image and extract generation conditions. Easy Diffuser converts the input image into text using OpenAI's CLIP and translates it into tag combinations using a transformer-based translator. The resulting tag combinations can be used as inputs for
-
Image-to-image generation using a reference image:
- The existing image-to-image generation functionality requires users to go through steps such as finding, saving, and loading images, or using images generated with
txt2img. Easy Diffuser provides a convenient menu to directly load images from web pages into the WebUI'simg2imggeneration.
- The existing image-to-image generation functionality requires users to go through steps such as finding, saving, and loading images, or using images generated with
- WEBUI API: https://github.com/AUTOMATIC1111/stable-diffusion-webui
- IMG2TXT MODEL: https://huggingface.co/leeyunjai/img2txt
- Learning Transferable Visual Models From Natural Language Supervision: https://arxiv.org/pdf/2103.00020.pdf
- Attention is All You Need: https://arxiv.org/pdf/1706.03762.pdf