Thanks Paul! I’m really looking forward to it. I made a virtual world builder with integrated Dalle-2 support via an in-world chat window. But I had to add a manual import feature because Leonardo AI and Midjourney were just too far ahead (until now) and made Dalle-2 look like an amateur tool. This is really exciting for me.

2 Likes

Of course, it’s not perfect. I am comparing it to other models like Stable Diffusion where it’s mainly keyword-focused (Dall-E can be as well but I find it much nicer in just “flowing” out sentences and having it capture it). So I can do

“an idea depicted as an explosion of color de la cabeza de una person anonimo, forming a new galaxy with billions of stars, master work” (don’t ask why I decided to go spanish halfway)

or

" An ethereal dance of a beautiful cyberpunk couple. The definition of harmony, colors and musical notes are creating from apparent thin air. The world around this dancing couple is a quantum delight of particle explosions and stars, illuminating the love they have for eachother"

Instead of

“highres, shadows, absurdres, best_quality, ultra_detailed, 8k, extremely_clear, photograph, beautiful, sharp focus, hdr, underwater, giant whale, fantastic location, dream, flying, underwater cyberpunk city”

2 Likes

How was it with adhering to the prompt text? It’s pretty much an ubiquitous problem with all of the current AI gen tech, image and video, that each of them have their own massive blinds spots when it comes to following the prompt. You literally can’t force them to do simple things like, depending on the model, have the main object cross the screen from to right (video/Pika Labs), etc. and you learn to modify your prompt attempts to complement the manifold surface of their weak spots. Did you see much of that with Dalle-3 experimental?

Also, did OpenAI ever even hint at coming up with their own video gen service? That would be amazing!

Haha! Love the pre-Sharknado pic. :slight_smile:

1 Like

Really good in my opinion!

“small set of 4 images (32 pixels) potion icon simple design (photorealistic illustration) (gamedev) (Unreal Engine 5) (game ready icon assets) (black background)”

I can show some comparisons if you want. It’s night and day…

Text wasn’t perfect, but it was doing a lot better… hands too…

4 Likes

?? so are the endpoints going to change from Image.__ , or do we just add the model in the parameters as such once we have access in October?;

import os
import openai
import requests
from datetime import datetime
import uuid

openai.api_key = “api_here”

def save_image(image_url, save_path):
response = requests.get(image_url)
with open(save_path, ‘wb’) as f:
f.write(response.content)
print(f"Image saved at {save_path}")

def create_image(prompt, n=1, size=“1024x1024”, save_dir=“./images_creations”):
response = openai.Image.create(prompt=prompt, n=n, size=size, model=“dall-e-3”) #just add it here when referring to endpoint calls?
image_urls = [data[‘url’] for data in response[‘data’]]

if not os.path.exists(save_dir):
    os.makedirs(save_dir)

for i, image_url in enumerate(image_urls):
    save_path = get_save_path(prompt.replace(" ", "_"), save_dir, f"creation_{i}")
    save_image(image_url, save_path)

return image_urls

def create_edit(image_path, mask_path, prompt, n=1, size=“1024x1024”, save_dir=“./images_edits”):
with open(image_path, “rb”) as image_file, open(mask_path, “rb”) as mask_file:
response = openai.Image.create_edit(
image=image_file,
mask=mask_file,
prompt=prompt,
n=n,
size=size,
model=“dall-e-3” #just add it here when referring to endpoint calls?
)
image_data = response[‘data’]

if not os.path.exists(save_dir):
    os.makedirs(save_dir)

image_paths = []
for i, data in enumerate(image_data):
    save_path = os.path.join(save_dir, f"{prompt.replace(' ', '_')}_{i}.png")
    save_image(data['url'], save_path)
    image_paths.append(save_path)

return image_paths

def create_variation(image_path, n=1, size=“1024x1024”, save_dir=“./images_variations”, model=“dall-e-3”): #and here when referring to endpoint calls?
with open(image_path, “rb”) as image_file:
response = openai.Image.create_variation(
image=image_file,
n=n,
size=size,
)
image_data = response[‘data’]

if not os.path.exists(save_dir):
    os.makedirs(save_dir)

image_paths = []
for i, data in enumerate(image_data):
    save_path = os.path.join(save_dir, f"{os.path.basename(image_path).replace('.png', '')}_variation_{i}.png")
    save_image(data['url'], save_path)
    image_paths.append(save_path)

return image_paths

Example usage:

#image_paths = create_image(“A cute baby sea otter kitty saying meow”, n=2)
#edit_paths = create_edit(image_paths[0], “path/to/your/mask.png”, “A modified image description”, n=1)
#variation_paths = create_variation(image_paths[1], n=1)

def get_save_path(base_name, save_dir, suffix=“”):
timestamp = datetime.now().strftime(“%Y%m%d_%H%M%S”)
unique_id = str(uuid.uuid4())[:8]
filename = f"{base_name}{suffix}{timestamp}_{unique_id}.png"
return os.path.join(save_dir, filename)

def listen_for_commands():
while True:
try:
command = input("Enter a command: “)
args = command.split(” ")

        if args[0].lower() == "create":
            if len(args) < 2:
                print("Usage: create <prompt> [n] [size] [save_dir]")
                continue
               
            prompt = args[1]
            n = int(args[2]) if len(args) > 2 else 1
            size = args[3] if len(args) > 3 else "1024x1024"
            save_dir = args[4] if len(args) > 4 else "./images_creations"
            
            image_urls = create_image(prompt, n, size, save_dir)
            print("Generated image URLs: ", image_urls)
        
        elif args[0].lower() == "edit":
            if len(args) < 4:
                print("Usage: edit <image_path> <mask_path> <prompt> [n] [size] [save_dir]")
                continue

            image_path, mask_path, prompt = args[1], args[2], args[3]
            n = int(args[4]) if len(args) > 4 else 1
            size = args[5] if len(args) > 5 else "1024x1024"
            save_dir = args[6] if len(args) > 6 else "./images_edits"
            
            create_edit(image_path, mask_path, prompt, n, size, save_dir)

        elif args[0].lower() == "vary":
            if len(args) < 2:
                print("Usage: vary <image_path> [n] [size] [save_dir] [save_option]")
                continue
              
            image_path = args[1]
            n = int(args[2]) if len(args) > 2 else 1
            size = args[3] if len(args) > 3 else "1024x1024"
            save_dir = args[4] if len(args) > 4 else "./images_variations"
            save_option = args[5] if len(args) > 5 else ""

            image_urls = create_variation(image_path, n, size, save_dir)

            if save_option.lower() == "save":
                base_name = os.path.splitext(os.path.basename(image_path))[0]
                for i, image_url in enumerate(image_urls):
                    save_path = get_save_path(base_name, save_dir, f"variation_{i}")
                    save_image(image_url, save_path)
            else:
                print("Generated image URLs: ", image_urls)

        else:
            print(f"Unknown command: {args[0]}")
    
    except Exception as e:
        print(f"An error occurred: {e}")

Start listening for commands

listen_for_commands()

We’re not sure yet, but hopefully we’ll just be able to drop in the new model - ie no changes like from completion to chat endpoints…

That said, I would love to have negative prompting features …

3 Likes
4 Likes

Wtf… Coherent WORDS with HUMOR? No freaking way. Surely the text was added in after :scream:

6 Likes

I got some really good “styles” that I could replicate… was able to differentiate the background and foreground here…

Used a lot of the art in my upcoming roguelike game…

5 Likes

Is it still just prompt → image, or does this allow us to refine the image iteratively through chatting? (“That looks pretty good, but change the boots to brown and move the sun higher in the sky”, etc.)

2 Likes

Likely still prompt → Image … but there’s outpainting too in labs… and via API with a bit of work…

3 Likes

Yes! 12345679012345679001

3 Likes

Actually the announcement says

If you like a particular image, but it’s not quite right, you can ask ChatGPT to make tweaks with just a few words.

So maybe it is iterative??

1 Like

One of the first things I tried with Dall-E was create a tileset. This is really exciting! I can’t wait to see how game studios take advantage of AI-generated graphics.

I’d imagine it would just re-draw it with the changed prompt. Unless they are planning to release image-reading capabilities alongside the new Dall-E.

3 Likes

even ChatGPT free is eager for the announcement…

(custom instruction escaped and programmed with a image generation function)

1 Like

What kind of unity engine statement is this “ChatGPT Plus and Enterprise”, so if you are paying for api access you need to get your hands in an enterprise account to use it or waste 20 a month to make pictures on a website with zero integration?

Welcome to the forum.

There will be API access to DALLE2 later this year. Is that what you’re asking?

I believe they are referring to

DALL·E 3 is now in research preview, and will be available to ChatGPT Plus and Enterprise customers in October via the API

Which makes it seem like we would need an active ChatGPT subscription to be able to use the Dall-E 3 API. Which, to me seems bizarre as well.

Unless this means that we are given a number of Dall-E image generations per time period at no additional cost, similar to ChatGPT messages.

But still, I liked the token system of Dall-E 2.

1 Like

That would be interesting.

There’s the labs.openai.com interface too - which has the outpainting feature… although they’ve kinda hinted at being able to edit images via text messages, so who knows!

I’m pretty sure the DALLE3 API will be available if you have an API account like DALLE2 was previously… we shall see, though. In any case, I wouldn’t compare them to Unity. We’re getting bleeding edge tech relatively cheap all things considered… and it’s not just huge corporations… :wink:

2 Likes