AI Art Generator – All you need to know now

Do you want to generate an image by AI? In this article, we see the best AI art generator that will enable you to create artworks easily.

AI art generator is in vogue these days.

And even if this novelty displeases some artists, others take advantage of it to win competitions with these new generation assistants.

This is the case of Jason Allen who won, thanks to the AI Midjourney, the Colorado State Fair contest by generating this work of art:

This high quality image was automatically made by an AI.

Here, I propose you to see the best AI that you can use now to make, you too, works of art!

NightCafé

First, there’s NightCafé, the easiest AI to use.

No account is needed to generate the first 5 images.

You just write what you want to see and you get your image.

You can try NightCafé by clicking here.

Stable Diffusion

Now let’s see a more technical AI: Stable Diffusion.

This one will please developers.

You can test it directly on this link.

Even better.

You can integrate Stable Diffusion, directly into your programs.

HuggingFace

For that, you only need to be able to use the Python language.

You can for example go to Google Colab which provides you with a free Python environment.

You also need to have a GPU at hand.

To activate a free GPU on Colab, go to Run > Change runtime type > GPU.

Then install the following libraries:

!pip install diffusers &> /dev/null
!pip install transformers &> /dev/null
!pip install accelerate &> /dev/null

And uses this code to generate images:

from diffusers import StableDiffusionPipeline, EulerDiscreteScheduler
import transformers
import torch

model_id = "stabilityai/stable-diffusion-2"

# Use the Euler scheduler here instead
scheduler = EulerDiscreteScheduler.from_pretrained(model_id, subfolder="scheduler")
pipe = StableDiffusionPipeline.from_pretrained(model_id, scheduler=scheduler, torch_dtype=torch.float16)
pipe = pipe.to("cuda")

prompt = "a pizza rocket flying to Saturn"
image = pipe(prompt).images[0]
    
image.save("rocket_pizza.png")

You can change the result of the image by writing what you want to see in the prompt variable.

To see the result, click on the menu on the left, in the folder part and double click on rocket_pizza.png.

If you want to create new images, don’t forget to change the file name in image.save().

Here is the result I got:

It’s a good start.

But we can do better!

Keras

Stable Diffusion can also be used directly with the Machine Learning library Keras.

Here again, we will need a GPU.

To do this, we import the following libraries:

!pip install --upgrade keras-cv &> /dev/null
import time
import keras_cv
from tensorflow import keras
import matplotlib.pyplot as plt

Then, we import the Stable Diffusion model from the keras_cv library (a specific module of Keras to do Computer Vision):

model = keras_cv.models.StableDiffusion(img_width=512, img_height=512)

We define a function to display our result:

THE PANE METHOD FOR DEEP LEARNING!

Get your 7 DAYS FREE TRAINING to learn how to create your first ARTIFICIAL INTELLIGENCE!

For the next 7 days I will show you how to use Neural Networks.

You will learn what Deep Learning is with concrete examples that will stick in your head.

BEWARE, this email series is not for everyone. If you are the kind of person who likes theoretical and academic courses, you can skip it.

But if you want to learn the PANE method to do Deep Learning, click here :

def plot_images(images):
    plt.figure(figsize=(20, 20))
    for i in range(len(images)):
        ax = plt.subplot(1, len(images), i + 1)
        plt.imshow(images[i])
        plt.axis("off")

And finally we can create our image!

images = model.text_to_image(
    "Paris in Heaven, fantasy art, "
    "light blue color, high quality, highly detailed, elegant, sharp focus, "
    "concept art, character concepts, digital painting, mystery, adventure",
    batch_size=3,
)
plot_images(images)
Paris in Heaven – blue version
Paris in Heaven – red version

The result is much better than the previous one 🏆

Don’t hesitate to detail your request, Stable Diffusion will understand it and interpret it better !

Dall-E 2

Next, we have Dall-E 2.

Here, compared to the previous AI, we are a level higher.

With Dall-E, you will create images much more faithful to your request.

On top of that, the quality is quite different.

I let you judge for yourself:

a painting of a fox sitting in a field at sunrise in the style of Claude Monet” – Dall-E 2

You can use Dall-E 2 by creating an account on OpenAI.

Dall-E also allows you to integrate AI image generation in your programs, but you will need to get an API key after you have created your account.

Midjourney

Finally, let’s look at the most popular Artificial Intelligence of all: Midjourney.

Why the most popular?

It’s free, easy to use and, personally, it’s with this AI art generator that I got my best results.

To use it you just have to follow this link.

Click on join the beta.

This will send you to Discord. Don’t worry, you don’t need an account.

You can use the AI easily as a guest 🔥

Now it’s your time to get started.

And don’t forget to post the link to the artworks you create in comments!

I wish you a great exploration of art generator AI.

And if you want to try other kinds of AI designed for the public, I invite you to see our articles on :

See you soon on Inside Machine Learning 😉

source :

  • Keras – High-performance image generation using Stable Diffusion in KerasCV

THE PANE METHOD FOR DEEP LEARNING!

Get your 7 DAYS FREE TRAINING to learn how to create your first ARTIFICIAL INTELLIGENCE!

For the next 7 days I will show you how to use Neural Networks.

You will learn what Deep Learning is with concrete examples that will stick in your head.

BEWARE, this email series is not for everyone. If you are the kind of person who likes theoretical and academic courses, you can skip it.

But if you want to learn the PANE method to do Deep Learning, click here :

Tom Keldenich
Tom Keldenich

Data Engineer & passionate about Artificial Intelligence !

Founder of the website Inside Machine Learning

Leave a Reply

Your email address will not be published. Required fields are marked *

Enter your email to receive for free

The PANE method for Deep Learning

* indicates required

 

You will receive one email per day for 7 days – then you will receive my newsletter.
Your information will never be given to third parties.

You can unsubscribe in 1 click from any of my emails.

Entre ton email pour recevoir gratuitement
la méthode PARÉ pour faire du Deep Learning


Tu recevras un email par jour pendant 7 jours - puis tu recevras ma newsletter.
Tes informations ne seront jamais cédées à des tiers.

Tu peux te désinscrire en 1 clic depuis n'importe lequel de mes emails.