Combine ChatGpt & Stable diffusion to extraordinary results

jeremy jouvance
4 min readDec 20, 2022

--

This year there are two major AI that blow away our Minds: Stable diffusion (also Dalle-2) & ChatGpt recently. Those AI are not restricted to a specific use case but they can be used in more generalist context. With the same AI you can transform yourself into spiderman or generate logo for your compagny.

Those AIs are really a game changer in a way that they talk to anyone.

What’s Stable Difusion ?

Stable Diffusion is an artificial intelligence able to generate images from texts.

To generate an image with Stable Diffusion, all you have to do is enter a description of what you want to appear in the image.

For example, if you want to generate an image of a cat, you can enter a description like “a gray cat with whiskers and blue eyes”.

a gray cat with whiskers and blue eyes

What’s ChatGpt ?

ChatGPT is an artificial intelligence language model developed by OpenAI. It is a language processing model based on transformers technology and trained on a large corpus of human conversation data.

ChatGPT was designed to be able to understand and respond convincingly to natural language conversations.

The ChatGPT model is used in a variety of applications, including creating chatbots for social networks and e-commerce sites, generating content for social networks, and creating content for video games. It is also used in language processing research and in the development of new AI technologies.

In general, ChatGPT is considered to be one of the most advanced language processing models available today and it continues to attract growing interest in the field of AI.

How can we get better output images thanks to prompt modifications ?

Prompt engineering is a technique used in the field of artificial intelligence to improve the quality of the results produced by content generation models, such as Stable Diffusion / Dalle-e. It consists of carefully choosing the text or phrase used as a “prompt” to generate content in order to maximize the chances of producing a desired result.

In our case, prompt engineering consists of selecting a sentence or a short text that precisely and concisely describes what you want to generate, for example an image or a text. By choosing a well-designed prompt, it is possible to obtain higher quality and more accurate results in response to the prompt.

Prompt engineering is an important technique in the field of AI content generation, as it can have a significant impact on the quality and relevance of the results produced. By taking the time to think things through and carefully select which prompt to use, it is possible to maximize the chances of producing top quality results.

However, it is sometimes long and complex to obtain a “prompt” of quality allowing the generation of the image which one dreamed of.

This is where ChatGpt can help us.

ChatGpt X Stablediffusion

Now we can ask to ChatGpt to generate a prompt:

give me a prompt to generate an image of the first city on mars

ChatGpt Answered

Here is an example prompt to generate an image of the first city on Mars with Dall-E 2:

“Generates an image of the first city on Mars, with futuristic buildings and vehicles adapted to life on the red planet.”

Here’s how it might be interpreted by Dall-E 2:

“The image shows the first city on Mars, with futuristic buildings that fit perfectly into the red and dusty landscape of the planet. The buildings are built using local materials and advanced technologies, so they can withstand the harsh conditions extremes of Mars. Vehicles adapted to life on the red planet can be seen, with high-pressure wheels and self-sustaining systems. The city is surrounded by mountains and craters, and the sky is tinted red dark, characteristic of the atmosphere of Mars. The city seems to be a pleasant and lively place to live, with inhabitants enjoying life on this new planet.”

Now we can take this prompt and see what happened to our mars city

Through these different images we can see that the AI has added details to the “prompt”. This makes the image more real and believable.
The combination with ChatGpt makes your dreams come true and that without the “prompt engineering” work.

If you want to see other example put your dream in comment

--

--

No responses yet