---
title: "Header Image Generation"
video_id: _KkSB7rl21E
url: https://www.youtube.com/watch?v=_KkSB7rl21E
workflow_page: https://workflows-of-ai.com/workflow/header-image-generation
language: en
captions: generated
---

0:01 hey there Marcus uh the next uh video
0:04 I'm going to show you in tutorial is
0:06 basically how to set up a hitter image
0:08 in h how to generate a header image for
0:11 an article in Drupal uh so this is a
0:14 typical CMS use case I would say if you
0:17 want to generate images in general with
0:20 mid Journey or stable diffusion or
0:21 something just use those tools because
0:24 you get previews and it's it's a lot
0:26 more uh flexible but say that you have
0:30 the use case you have a CMS and maybe
0:31 you have hundreds of articles that you
0:33 you need some kind of preview image for
0:36 and it's a generic topic like in this
0:40 case I created Article uh it's basically
0:43 a recipe for traditional pound cake I
0:45 haven't created sorry I've copied it
0:47 from just some website just to show show
0:50 what you can do here
0:53 um as always this is Dro ball content
0:56 management framework very powerful open
0:59 source um on top of that is the AI
1:02 interpolator modules if you want to
1:03 learn more about both of them how to set
1:05 it up you can look in the the
1:07 description of this video everything is
1:10 open source everything is free uh free
1:13 as bear and you know just uh
1:18 just download it after this presentation
1:22 and you can set up this yourself it
1:25 requires in this case a dream Studio
1:28 account so that's basically a API
1:30 service for stable diffusion and this of
1:32 course costs money but I think if you
1:34 register you get like 100 image
1:36 generations for free or something like
1:38 that so we start with logging
1:43 in uh and then we go to our content type
1:46 which is the article where we already
1:48 have article and now we want to add h a
1:51 header image
1:52 then but uh before we do that what we're
1:58 going to do is we're going to create a
2:01 text plain long I guess we can use and
2:05 basically call that image
2:09 description because of course we can't
2:12 generate a head header image on a prompt
2:14 that's uh the whole recipe that makes no
2:16 sense it it has no clue what it would
2:19 have to generate then uh and more
2:22 importantly it wouldn't actually uh fit
2:26 into the prompt space of of uh stable
2:30 diffusion and in this case we're going
2:32 to enable the AI interpolator we're
2:34 going to use open AI string long so
2:36 we're going to take from one text and
2:38 create another
2:39 text uh base mode because we only need
2:42 one source which is the article then so
2:46 based on the this is our prompt now then
2:50 based on the
2:52 context generate uh
2:55 Visual and
2:58 descriptive text of
3:02 a a header image that could
3:07 represent this
3:11 text don't make it longer than one
3:19 sentence be very
3:24 descriptive
3:26 um and uh visual in your text I write
3:32 this two times more or less now but it's
3:34 better to make sure that it tries to
3:37 create something that can be used to
3:39 describe an
3:41 image and then we just copy the
3:44 context uh we're going to use GPT 4 for
3:47 this uh we can use 100 we can use now we
3:51 use batch because we need to generate
3:53 image as well uh you are an
3:58 assistant
4:00 making
4:02 up image
4:04 descriptions that fits for all so this
4:08 is the role it's going to play now then
4:11 makes imag fits
4:13 for
4:14 uh image descriptions from longer
4:20 texts up short
4:23 shorter P image descriptions uh keep
4:27 open AI moderation on
4:30 uh then we're going to create the image
4:32 field then and this is just the image
4:33 field we call it header
4:41 image just one
4:43 image and
4:46 uh we're just going to enable the AI
4:48 interpolator here and we're going to use
4:50 the dream Studio image generator in this
4:53 case we're going to generate one base
4:55 mode and we're going to use the image
4:58 description as content text then right
5:01 so and we use that as the prompt context
5:04 and we can add
5:06 realistic well you can choose your your
5:09 type of style you want here and we want
5:11 short depth of field because that's
5:13 something food bloggers often do when
5:16 they photograph uh take photos of their
5:20 food uh under advanced settings we have
5:24 to set this to 10 1001 and we set batch
5:27 mode and we can take a new stable
5:30 diffusion engine maybe
5:32 2.0 save this and now if we go to our
5:37 content and save it hopefully image
5:40 description and the image would be
5:42 filled out now then or
5:44 generated I would say with stable
5:46 diffusion you you should rather use the
5:48 pixel B module and get realistic images
5:51 I will create one for dolly3 now and
5:54 they that is starting to create really
5:56 realistic images which makes sense but
6:00 here well we can watch the article view
6:03 instead so we can get the image so
6:06 basically this generated this
6:08 description an indulg it in Rich buttery
6:11 pound cake with a dense velvety crumbs
6:13 HT with homemade whipped cream and fresh
6:15 fruit we generated this image then which
6:18 is well it's okay I guess um yep that's
6:23 this workflow thank you for
6:26 watching
