---
title: "Generate a gallery using Dall-E 3"
video_id: aVvEcRVkm8Q
url: https://www.youtube.com/watch?v=aVvEcRVkm8Q
workflow_page: https://workflows-of-ai.com/workflow/generate-gallery-using-dall-e-3
language: en
captions: generated
---

0:01 hey there Marcus here today's workflow
0:03 is uh a very short one um what I'm going
0:06 to show is something similar to what I
0:08 did one time which was creating hitter
0:10 images for uh article in this case what
0:14 we have here is an article about the uh
0:17 like the Olympic ceremony in parie 2024
0:21 that's going to be a little bit
0:22 different they're going to go have it
0:25 outside of the stadium and go along the
0:27 river sand instead um
0:30 and what I want to do here is just
0:32 create that gallery of images to
0:34 visualize this uh so like something
0:37 abstract oil painted maybe uh and I'm
0:40 going to use D 3 for this so uh that's
0:43 the thing even with the open AI module
0:46 or open a plugin for a interpolator you
0:48 can generate images as well so it's not
0:50 just dream Studio that can do it um and
0:55 I'm going to do it together with the
0:57 prompt perfect module because it does
1:00 create better prompts for image
1:03 Generations uh so we're how this is
1:06 going to work basically we're going to
1:08 first going to ask open AI to generate I
1:11 don't know four Images uh no sorry four
1:14 image prompts that visualize this
1:17 article then we're going to take those
1:19 image prompts that are usually fairly
1:22 okay because open AI knows how to do
1:25 image prompting as well since uh they of
1:28 course GPT and uh Del is tightly coupled
1:31 as you can see when you use chat jpt but
1:34 still what I've seen is if you use prom
1:36 perfect the result is actually more uh
1:39 visually stunning so we're going to take
1:42 a second step where we take the prompt
1:44 perfect to perfect these prompts and
1:48 then we're going to use those prompts
1:50 then again with open AI to um generate
1:54 images using do
1:56 3 uh I'm going to show you the slick
1:59 Carousel module that we have uh as well
2:02 that is one of the greatest modules for
2:06 showing a gallery um so this is not
2:09 written by me of course this is just one
2:11 one of many many Drupal contributed
2:14 modules that are awesome uh just to
2:18 visualize so you don't just see some
2:20 thumbnails but an actual uh like slider
2:26 Carousel um so I have installed those
2:29 modules I have set up the API keys I
2:31 will just show you quickly so if I log
2:34 in here oh I will say also for you who
2:37 don't know this is druple druple is open
2:39 source uh everything is free to use of
2:42 course using open AI using uh cost money
2:45 PR perfect you get like some testing
2:48 credits so you can actually test it if
2:50 you want
2:53 um
2:55 and but it still cost money right so
2:58 after you install these modules um there
3:02 is under the web services there is this
3:04 prompt perfect config where you can add
3:06 the promp perfect API key and open AI
3:08 settings where you can add the open AI
3:10 settings then uh with the slick Carousel
3:12 you have to install some libraries and
3:14 so on but this is very well documented
3:16 in the Slick Aro module I'm not going to
3:18 show you how to do that so I already
3:20 prepared that so I'm just going to go
3:22 through the workflow as it is uh when it
3:26 comes to the AI interpolator and all the
3:28 stuff that does B
3:30 basically um so if we go into our
3:34 content types we will see it's just a
3:36 very very simple body right now and
3:39 that's um once again I can just show you
3:42 the body is then this text that writes
3:45 about yeah right about the ceremony
3:49 so what the first thing we want to do
3:52 here then is uh that we want to take a
3:55 plane Tes Tes plain long that we call
3:58 the pre- prompt so this is the initial
4:01 prompt that open AI generates from the
4:03 article we say that we want I'm just
4:06 going to create four so a real Gallery
4:08 needs more of course but generating
4:11 images in Del takes time and I
4:13 don't I don't have video editing
4:15 software here so I don't want to just
4:17 sit and be quiet for like a minute or
4:20 two while it's generating 20 images um
4:24 anyway we want to enable the a anol
4:27 because that's what does the magic here
4:30 and we're going to use open AI string
4:32 long uh we're going to use base mode
4:34 because the only context that we need is
4:36 the body so the article and then we just
4:39 write the pr here based on the um based
4:43 on the
4:44 context H create
4:48 four uh one
4:51 sentence image prompt that
4:56 visualizes the context of the
5:01 article make them AB make the
5:06 images
5:07 abstract
5:09 and in an
5:12 oil
5:14 canvas
5:16 context of course here um oh so context
5:19 I'm just going to copy here context and
5:21 of course here how you prompt this will
5:24 uh be very important for the end result
5:27 I'm this is something you have to
5:29 perfect yourself and this is something
5:31 that has to match your website as well
5:33 of course what what you're doing I'm
5:35 just giving an example here oil canas is
5:38 probably not the best example but it
5:40 gives a very
5:43 um it gives a very unique view so you
5:46 can see that it actually follows the
5:47 prompt so I'm going to set on turn on
5:50 batch mode I will say if you're going to
5:52 generate 30 40 50 images this will take
5:56 so long time that even batch mode might
5:58 time out so the difference between this
6:00 is that direct just means it takes all
6:02 the AI chaining and just tries to do it
6:05 in one request batch mode uses
6:07 JavaScript so it splits them up but then
6:11 the image generation might actually take
6:13 too long so it might time out uh batch
6:16 mode is also not good if you're going to
6:18 programmatically generate the noes so in
6:20 that case actually the qron U might make
6:24 the most sense I will use the GPT 4 uh
6:28 turbo in this case so it creates fairly
6:31 good
6:33 output I will have the weight 100 this
6:35 is important you will see now because
6:37 I'm going to add the next step which is
6:40 once again a text plane long that's
6:43 going to be the actual image prompt
6:46 prompt um so we set this to four as well
6:49 and this also enables AI
6:53 interpolator um and here we're going to
6:56 use the prompt perfect
6:58 prompt uh the Target Model that we want
7:01 to do is DOL 3 so we basically tell
7:04 prompt perfect that take this prompt
7:06 that open AI generated we want to
7:09 generate the image in do3 and generate
7:12 that even better prompt so I'm just
7:15 going to take iterations two here you
7:16 should do a larger number it's going to
7:18 create even better prompts but I would
7:20 just do the simplest one now and we do
7:22 pre- prompt uh as the base field so it
7:25 takes the pre- prompt and generate a
7:28 better prompt right
7:30 and we say that the interpolator weight
7:32 is 101 in this case and batch mode so
7:34 this has to be higher than the last one
7:37 but because of course the image prompt
7:39 has to be generated before we can do uh
7:42 sorry the pre- prompt has to be
7:43 generated before we can do the final
7:45 image prompt right and the last thing
7:48 we're going to create here then is a
7:51 file field that is uh image field and
7:55 this is going to be the actual Gallery
7:56 where the images
7:58 are so we call that
8:01 Gallery uh we do well okay you could set
8:04 four there I said unlimited then you
8:06 could basically upload your own images
8:09 after or whatever we don't need alt
8:11 field in this case we also enable AI
8:15 interpolator uh we're going to use open
8:17 AI DOL uh to generate
8:21 images um we're going to use the base
8:24 mode and base it on the image prompts
8:27 and in this case I will just trust so
8:29 much that I just write the context from
8:32 from perfect and this usually gives very
8:33 good results of course you could add
8:36 very
8:37 specific uh um Preen prompting or aen
8:42 prompting to this well where you might
8:45 say that it should be some specific
8:46 camera or something
8:48 right uh and once again batch mode this
8:51 is important that we do interpolator
8:53 weight that's even higher than creating
8:55 the image prompt because it needs to
8:57 create the pre- prompt then the image
8:58 prompt and then then it can generate
9:00 image I'm going to use Dolly 3 in this
9:03 case I just use standard quality I just
9:05 do the smallest
9:07 resolution because once again I don't
9:09 want it to take too long time but if
9:11 you're doing this you should set the
9:13 highest quality if you need it of
9:16 course um or actually if I guess the
9:21 slider looks nicer if it's horizontal so
9:24 I'm actually going to do the horizontal
9:28 resolution in this case
9:30 uh before we create this I will just fix
9:33 the manage display so because we don't
9:36 want to show The pre- Prompt and the
9:37 image prompt on the final product and we
9:40 want to show the gallery first without
9:43 the label and we want this to be a a
9:47 slick image so this is what the Slick
9:50 carouso does this has a lot of settings
9:52 now I'm just going to take uh yeah Flex
9:56 box with the default
10:01 and image style is none yeah we can do a
10:06 thumbnail I
10:07 guess no I don't think slick will
10:10 actually be using that um I think that's
10:13 okay I mean you you will have to read
10:15 about exactly what everything does but
10:17 this should be a okay just lighter at
10:21 least so I save this and then I go back
10:24 to my content here and I'm just going to
10:27 edit it and if I you see there is this
10:30 four pre- prompt Fields there's this
10:32 four image prompt fields and they are
10:34 empty uh and the gallery is empty as
10:36 well
10:38 right uh so I'm just going to click save
10:40 now and it's going to start
10:42 processing so this has three basically
10:45 steps now the initial one is that it
10:48 generates the initial prompt and that's
10:51 pretty fast prom perfect is uh it's
10:55 going to be pretty fast now but as I
10:57 said you should add it ation to it maybe
11:00 add 10 iterations or something to
11:01 actually generate as good result as
11:04 possible so so I will say that right
11:07 away the the actual result here might
11:10 not be perfect because I'm skipping on
11:14 the front perfect um iterations and I'm
11:18 skipping on the quality of the images as
11:22 well so you should use HD to get as good
11:26 quality as possible on the images but
11:28 it's just so
11:29 to give you an idea and as I said this
11:32 is open source it's free to use so just
11:35 feel free to do the exact same setup
11:38 after you watch the tutorial and just um
11:42 change the configuration there to HD and
11:45 add iterations to 10 and then as you see
11:48 even this takes a lot of time but that
11:51 will take even longer time in that
11:54 case
11:57 um
11:59 and of course it's important for you to
12:01 know if you turn on the cron worker you
12:04 need to enable your Cron job of course
12:06 as well so there we go so you see we
12:10 have a gallery here with hopefully four
12:13 images with very abstract
12:17 images
12:18 uh of and you can see it's the river a
12:22 exactly what the uh article talks about
12:26 right and yeah it this is very abstract
12:30 so of course how you prompt it matters
12:34 um but I will just show you here if I go
12:36 into edit that it has created a pre-
12:39 prompt here right and then it takes this
12:41 pre- prompt and creates even better
12:43 image prompts so that's basically
12:46 wording that works very good with Dolly
12:49 3
12:51 right uh so you can see here athletes
12:54 and perform intermingle in our floating
12:56 stage and here it does a breatht this
12:58 playay of synchron acrobatics and
13:00 athletic
13:01 prowers uh on a stunning leit uh
13:05 levitating platform to be honest in that
13:08 case it might overdo it because it's
13:09 supposed to be about normal athlete
13:12 right but yeah you get the idea you in
13:15 many cases you can probably skip the
13:17 prompt perfect but it is a very good way
13:21 of uh making sure especially if you open
13:24 up for editors that might not know
13:27 prompting uh um that want to use text
13:30 generation prompt or image prompting to
13:32 generate better
13:34 results um and yeah that's it so thank
13:40 you for watching and uh Happy testing
13:43 this around if you
13:46 do
