Eric013 / midjourney-automation-bot

The Midjourney Automation Bot is a Python tool automating the generation and download of AI-crafted images via Discord's Midjourney bot. It uses OpenAI's GPT-3 for image prompts and Playwright for browser automation. Ideal for obtaining unique visuals efficiently for diverse applications.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

midjourney-automation-bot

GUI

As seen on LinkedIn and YouTube.

The Midjourney Automation Bot is a highly efficient Python-based automation program designed to generate and download unique images using the Midjourney bot on Discord. The script employs OpenAI’s GPT-3 to construct image prompts and Playwright, a Node.js library to control Chromium, Firefox, and WebKit browsers, to interact with the Discord application in a browser environment.

Customization

This program can be customized to your personal/organizational needs. For more information, please contact me via LinkedIn or email at harmindernijjar1996@gmail.com

Key Features

GPT-3 Prompt Generation: The bot uses GPT-3 to generate prompts based on user-defined specifications, such as art type, topic, and descriptors.

Discord Integration: Through Playwright, the bot can navigate to the Discord channel URL where the Midjourney bot resides and submit the generated prompts.

Image Upscaling: Once the images are generated, the bot interacts with the Discord interface to select upscale options, improving the quality of the images.

Image Downloading: After upscaling, the bot downloads the images, saving them locally with names corresponding to their prompts.

Iterative Execution: The bot can be configured to run for a specific number of iterations, continuously generating prompts, submitting them, and downloading the images generated in each cycle.

Usage

To run the bot, the user needs to set their OpenAI API key and populate several constant fields such as ART_TYPE, BOT_COMMAND, CHANNEL_URL, DESCRIPTORS, TOPIC, and PROMPT. The bot also needs user Discord credentials to log in, which are read from a "credentials.txt" file.

Error Handling

The bot has robust error handling, making it resilient against issues arising during execution, such as empty prompts or responses, difficulties interacting with Discord's UI, and potential issues in image downloading.

The Midjourney Automation Bot, leveraging GPT-3's creative potential and Playwright's browser automation capabilities, offers an efficient and scalable solution to generate and download unique images from the Midjourney bot on Discord.

About

The Midjourney Automation Bot is a Python tool automating the generation and download of AI-crafted images via Discord's Midjourney bot. It uses OpenAI's GPT-3 for image prompts and Playwright for browser automation. Ideal for obtaining unique visuals efficiently for diverse applications.

License:MIT License


Languages

Language:Python 69.3%Language:HTML 28.7%Language:JavaScript 1.6%Language:CSS 0.4%