DEV Community

Axlfc
Axlfc

Posted on

Unleash Your Creativity: Generate Mind-Blowing Images with DALL-E using Your Console Prompt!

Are you tired of using the same old stock images for your projects? Do you want to create something truly unique and eye-catching? Look no further than DALL-E - the AI program that can generate stunning images based on your wildest imagination.

And now, with just a few simple commands in your console prompt, you can bring your creative vision to life with DALL-E. No more tedious image searches or frustrating editing software - just let DALL-E do the work for you.

The process is simple: just input your desired image description into the console prompt, and watch as DALL-E creates a stunning, high-quality image in seconds. Whether you need an image of a surreal creature or a realistic depiction of a mundane object, DALL-E has got you covered.

With its cutting-edge technology, DALL-E is the perfect tool for designers, marketers, and anyone looking to add a unique touch to their work. So why wait? Try DALL-E today and unlock your creativity like never before!

Here's how I managed to use DALL-E AI image generation running in the terminal.

Manual Installation

  • Install Python dependencies

GNU/Linux:
pip3 install openai python-dotenv

Windows:
pip install openai python-dotenv

Termux (Android):
MATHLIB="m" pip3 install numpy openai
pip3 install wheel setuptools python-dotenv

  • Clone git repository
    git clone https://github.com/Axlfc/UE5-python

  • Navigate to Content/Python/chatBot repository directory

  • Log into openAI web page and get your API key.

  • Edit .env file from the repository folder and paste your API Key to set the variable OPENAI_API_KEY

  • Run image.py to begin to generate images the AI with your terminal prompt.

GNU/Linux & Termux (Android):
python3 image.py

Windows:
python image.py

If you want to run a simple command dalle to run DALL-E in Windows Terminal, you can edit the C:\Users\Your_Username\Documents\WindowsPowershell\Microsoft.PowerShell_profile.ps1 file and add to it the following lines:

function dalle_function {
python C:\Users\Your_Username\Desktop\UE5-python\Content\Python\chatBot\image.py
}
Set-Alias dalle dalle_function

If you also want that dalle alias in GNU/Linux or Android, you can edit ~/.bash_aliases file and add:

dalle() {
python3 "~/UE5-python/Content/Python/chatBot/image.py"
}

Now when you type dalle in your Terminal it will start dalle.

Usage:

dalle "A picture of a cat wearing a mexican hat"
dalle "Path/To/Image.png"
dalle "A photograph of a spider climbing a wall" "Path/To/Image.png"
dalle "A photograph of a spider climbing a wall" "Path/To/Image.png" "Path/To/MaskImage.png"

2023-03-11_04-10-06_A_photograph_of_a_ki

2023-03-11_04-10-06_A_photograph_of_a_ki_variation

2023-03-11_04-10-06_A_photograph_of_a_ki_variation_edit

2023-03-11_04-22-37_A_photograph_of_a_bi

2023-03-11_13-19-34_A_picture_of_a_baby_

2023-03-11_13-49-43_A_spider_climbing_a_

2023-03-11_13-49-43_A_spider_climbing_a__edit

2023-03-11_13-49-43_A_spider_climbing_a__edit_edit

2023-03-11_13-49-43_A_spider_climbing_a__variation

2023-03-11_14-58-42_A_picture_of_a_cat_i

2023-03-11_15-06-12_A_picture_of_a_cat_i_masked1

2023-03-11_15-17-05_A_picture_of_the_Que

2023-03-11_16-16-45_A_dog_photograph

2023-03-11_16-16-45_A_dog_photograph_edit

2023-03-11_17-52-46_A_paradise_beach

2023-03-11_17-52-46_A_paradise_beach_var1

2023-03-11_17-59-03_A_paradise_beach

A_photograph_of_a_ki

doggo

doggo_var3

Did this article helped you? Share it, comment or give a like if it did! 😄

Top comments (0)