Für jedes Bild eigenen Prompt

This commit is contained in:
Simon Lübeß 2023-10-14 14:33:35 +02:00
parent fa75985014
commit dc81c5ce60
14 changed files with 161 additions and 231 deletions

View File

@ -7,4 +7,5 @@ public class BildInfoModel
public string Dateiname { get; set; } public string Dateiname { get; set; }
public string ImageModel { get; set; } public string ImageModel { get; set; }
public int WunschId { get; set; } public int WunschId { get; set; }
public string Prompt { get; set; }
} }

View File

@ -8,4 +8,9 @@ public class WunschInfoModel
public string BildBeschreibung { get; set; } public string BildBeschreibung { get; set; }
public DateTime Datum { get; set; } public DateTime Datum { get; set; }
public string GPTModel { get; set; } public string GPTModel { get; set; }
/// <summary>
/// Id eines vorherigen Wunsches, z.B. wenn ein Wunsch überarbeitet wird, wird der original wunsch hier referenziert.
/// Ist <see langword="null"/> für den initialien Wunsch.
/// </summary>
public int? VorherigerWunsch { get; set; }
} }

View File

@ -28,16 +28,17 @@ public class ImageGenerator
/// <summary> /// <summary>
/// Geneiert ein Bild für den gegebenen Wunsch. /// Geneiert ein Bild für den gegebenen Wunsch.
/// </summary> /// </summary>
/// <param name="imagePrompt">Der Prompt für den das Bild erzeugt wird.</param>
/// <param name="wunschInfo">Der Wunsch zu dem ein Bild generiert werden soll.</param> /// <param name="wunschInfo">Der Wunsch zu dem ein Bild generiert werden soll.</param>
/// <param name="width">Die breite des zu generierenden Bildes. <see langword="null"/> für Standardbreite des Modells</param> /// <param name="width">Die breite des zu generierenden Bildes. <see langword="null"/> für Standardbreite des Modells</param>
/// <param name="height">Die höhe des zu generierenden Bildes. <see langword="null"/> für Standardhöhe des Modells</param> /// <param name="height">Die höhe des zu generierenden Bildes. <see langword="null"/> für Standardhöhe des Modells</param>
/// <param name="negativePromt">Begriffe, die explizit nicht generiert werden sollen.</param> /// <param name="negativePromt">Begriffe, die explizit nicht generiert werden sollen.</param>
/// <returns>Die BildInfo des generierten Bildes; oder null, wenn ein Fehler auftrat.</returns> /// <returns>Die BildInfo des generierten Bildes; oder null, wenn ein Fehler auftrat.</returns>
public async Task<BildInfoModel?> GenerateImageAsync(WunschInfoModel wunschInfo, int? width = null, int? height = null, string negativePromt = "") public async Task<BildInfoModel?> GenerateImageAsync(string imagePrompt, WunschInfoModel wunschInfo, int? width = null, int? height = null, string negativePromt = "")
{ {
var postData = new var postData = new
{ {
inputs = wunschInfo.BildPrompt, inputs = imagePrompt,
parameters = new parameters = new
{ {
negative_prompt = negativePromt, //"photorealistic, highly detailed, 8K, portrait", negative_prompt = negativePromt, //"photorealistic, highly detailed, 8K, portrait",
@ -75,7 +76,8 @@ public class ImageGenerator
Dateiname = "PlaceHolder", Dateiname = "PlaceHolder",
Datum = imageDate, Datum = imageDate,
ImageModel = ModelName, ImageModel = ModelName,
WunschId = wunschInfo.Id WunschId = wunschInfo.Id,
Prompt = imagePrompt
}; };
await SaveImageStreamAsync(imageStream, bildInfo); await SaveImageStreamAsync(imageStream, bildInfo);

View File

@ -12,7 +12,6 @@
@inject NotificationService NotificationService @inject NotificationService NotificationService
@inject DialogService DialogService @inject DialogService DialogService
@* @inject AiArtPageData AiArtData; *@
@inject WunschInfoData WunschInfoData; @inject WunschInfoData WunschInfoData;
@inject ImageGenerator ImageGenerator; @inject ImageGenerator ImageGenerator;
@ -50,40 +49,21 @@
</RadzenStack> </RadzenStack>
<RadzenStack Orientation="Orientation.Horizontal" <RadzenStack Orientation="Orientation.Horizontal"
AlignItems="AlignItems.Center" Wrap="FlexWrap.Wrap"> AlignItems="AlignItems.Center" Wrap="FlexWrap.Wrap">
<RadzenCheckBox @bind-Value=@_useGpt4> <RadzenCheckBox @bind-Value=@_useGpt4 Name="UseGPT4"/>
Verwende Gibbidy 4 <RadzenLabel Text="Verwende GPT 4" Component="UseGPT4" Style="margin-left: 8px; vertical-align: middle;" />
</RadzenCheckBox>
</RadzenStack> </RadzenStack>
</RadzenCard> </RadzenCard>
</ChildContent> </ChildContent>
</RadzenPanel> </RadzenPanel>
<RadzenButton Visible=@_buttonVisible Click=@(async ()=> await GenerateImages(true))>Generate</RadzenButton> <RadzenButton Visible=@_buttonVisible Click=@(async ()=> await GenerateImagesAsync(true))>Generate</RadzenButton>
<RadzenPanel AllowCollapse="true" Style="width: 500px;" Text="Zeige Prompt">
<ChildContent>
<RadzenCard class="rz-mt-4">
<RadzenStack Orientation="Orientation.Horizontal"
MouseEnter="@(args => ShowTemperatureTooltip(args))"
MouseLeave="TooltipService.Close"
AlignItems="AlignItems.Center" Wrap="FlexWrap.Wrap">
<RadzenText>@_imagePrompt</RadzenText>
</RadzenStack>
</RadzenCard>
</ChildContent>
</RadzenPanel>
<RadzenText TextStyle="TextStyle.H4">Die Idee, die gemalt wird:</RadzenText> <RadzenText TextStyle="TextStyle.H4">Die Idee, die gemalt wird:</RadzenText>
<RadzenCard class="rz-mt-4" Style="width: 800px;"> <RadzenCard class="rz-mt-4" Style="width: 800px;">
<RadzenText>@_imageIdea</RadzenText> <RadzenText>@_imageIdea</RadzenText>
</RadzenCard> </RadzenCard>
<RadzenProgressBarCircular Visible=@_progressVisible ProgressBarStyle="ProgressBarStyle.Secondary" Value="100" ShowValue="false" Mode="ProgressBarMode.Indeterminate" /> <RadzenProgressBarCircular Visible=@_progressVisible ProgressBarStyle="ProgressBarStyle.Secondary" Value="100" ShowValue="false" Mode="ProgressBarMode.Indeterminate" />
<RadzenText Visible=@_progressVisible TextStyle="TextStyle.H6" Text=@BusyMessage></RadzenText> <RadzenText Visible=@_progressVisible TextStyle="TextStyle.H6" Text=@BusyMessage></RadzenText>
@ -91,7 +71,7 @@
<RadzenText Visible=@_addonsVisible TextStyle="TextStyle.H2">Verändere hier dein Bild durch Worte:</RadzenText> <RadzenText Visible=@_addonsVisible TextStyle="TextStyle.H2">Verändere hier dein Bild durch Worte:</RadzenText>
<RadzenTextBox Visible=@_addonsVisible @bind-Value=@addons Placeholder="z.B. Mehr Farben" /> <RadzenTextBox Visible=@_addonsVisible @bind-Value=@addons Placeholder="z.B. Mehr Farben" />
<RadzenButton Visible=@_bothVisible Click=@(async ()=> await GenerateImages(false))>Generate</RadzenButton> <RadzenButton Visible=@_bothVisible Click=@(async ()=> await GenerateImagesAsync(false))>Generate</RadzenButton>
<RadzenCard> <RadzenCard>
<RadzenRow Style="width:24.5em" Gap="0.5rem" RowGap="0.5rem"> <RadzenRow Style="width:24.5em" Gap="0.5rem" RowGap="0.5rem">
@ -99,21 +79,25 @@
<FlippingImage ImageUrl="@_imageUrls[0]" HideImage="false" <FlippingImage ImageUrl="@_imageUrls[0]" HideImage="false"
Show="@(_imageStates[0] == ImageState.FadeIn)" FlipTo="FlippingImage.FlipDirection.Up" Show="@(_imageStates[0] == ImageState.FadeIn)" FlipTo="FlippingImage.FlipDirection.Up"
Click="() => ShowImageDialog(_imageUrls[0])" /> Click="() => ShowImageDialog(_imageUrls[0])" />
@_imagePromts[0]
</RadzenColumn> </RadzenColumn>
<RadzenColumn Size="6"> <RadzenColumn Size="6">
<FlippingImage ImageUrl="@_imageUrls[1]" HideImage="false" <FlippingImage ImageUrl="@_imageUrls[1]" HideImage="false"
Show="@(_imageStates[1] == ImageState.FadeIn)" FlipTo="FlippingImage.FlipDirection.Right" FlipDelay="200" Show="@(_imageStates[1] == ImageState.FadeIn)" FlipTo="FlippingImage.FlipDirection.Right" FlipDelay="200"
Click="() => ShowImageDialog(_imageUrls[1])" /> Click="() => ShowImageDialog(_imageUrls[1])" />
@_imagePromts[1]
</RadzenColumn> </RadzenColumn>
<RadzenColumn Size="6"> <RadzenColumn Size="6">
<FlippingImage ImageUrl="@_imageUrls[2]" HideImage="false" <FlippingImage ImageUrl="@_imageUrls[2]" HideImage="false"
Show="@(_imageStates[2] == ImageState.FadeIn)" FlipTo="FlippingImage.FlipDirection.Left" FlipDelay="600" Show="@(_imageStates[2] == ImageState.FadeIn)" FlipTo="FlippingImage.FlipDirection.Left" FlipDelay="600"
Click="() => ShowImageDialog(_imageUrls[2])" /> Click="() => ShowImageDialog(_imageUrls[2])" />
@_imagePromts[2]
</RadzenColumn> </RadzenColumn>
<RadzenColumn Size="6"> <RadzenColumn Size="6">
<FlippingImage ImageUrl="@_imageUrls[3]" HideImage="false" <FlippingImage ImageUrl="@_imageUrls[3]" HideImage="false"
Show="@(_imageStates[3] == ImageState.FadeIn)" FlipTo="FlippingImage.FlipDirection.Down" FlipDelay="400" Show="@(_imageStates[3] == ImageState.FadeIn)" FlipTo="FlippingImage.FlipDirection.Down" FlipDelay="400"
Click="() => ShowImageDialog(_imageUrls[3])" /> Click="() => ShowImageDialog(_imageUrls[3])" />
@_imagePromts[3]
</RadzenColumn> </RadzenColumn>
</RadzenRow> </RadzenRow>
</RadzenCard> </RadzenCard>
@ -138,6 +122,7 @@
public string BusyMessage { get; set; } = "Initial Message"; public string BusyMessage { get; set; } = "Initial Message";
private string?[] _imageUrls = new string?[4]; private string?[] _imageUrls = new string?[4];
private string?[] _imagePromts = new string?[4];
private ImageState[] _imageStates = new ImageState[4]; private ImageState[] _imageStates = new ImageState[4];
enum ImageState enum ImageState
@ -164,7 +149,6 @@
new() { Position = TooltipPosition.Bottom, Duration = null}); new() { Position = TooltipPosition.Bottom, Duration = null});
private string _imageIdea = ""; private string _imageIdea = "";
private string _imagePrompt = "";
private float _temperature = 0.9f; private float _temperature = 0.9f;
private int? width = 1024; private int? width = 1024;
@ -201,22 +185,29 @@
await base.OnInitializedAsync(); await base.OnInitializedAsync();
} }
/// <summary>
/// Setzt alle Felder zurück, die zu einem bestimmten Wunsch gehören.
/// </summary>
private void ClearOldGeneration() private void ClearOldGeneration()
{ {
// Bilder verbergen // Bilder verbergen
for (int i = 0; i < 4; i++) for (int i = 0; i < 4; i++)
{
_imageStates[i] = ImageState.FadeOut; _imageStates[i] = ImageState.FadeOut;
_imagePromts[i] = null;
_imageIdea = "";
_imagePrompt = "";
} }
_imageIdea = "";
}
/// <summary>
/// Gibt ChatGPT den Wunsch und erlangt die Bild Idee.
/// </summary>
/// <returns></returns>
private async Task RequestImageIdeaAsync() private async Task RequestImageIdeaAsync()
{ {
string ideaBasePrompt = await File.ReadAllTextAsync($"{Directory.GetCurrentDirectory()}{@"/wwwroot/idea_prompt.txt"}"); string ideaBasePrompt = await File.ReadAllTextAsync($"{Directory.GetCurrentDirectory()}{@"/wwwroot/idea_prompt.txt"}");
string requestImagePrompt = await File.ReadAllTextAsync($"{Directory.GetCurrentDirectory()}{@"/wwwroot/test_prompt2.txt"}");
ChatRequest chatRequest = new ChatRequest ChatRequest chatRequest = new ChatRequest
{ {
Temperature = _temperature, Temperature = _temperature,
@ -228,17 +219,99 @@
// Wunsch an GPT senden und Bild Idee anfordern // Wunsch an GPT senden und Bild Idee anfordern
_conversation.AppendUserInput(ideaBasePrompt + " " + request); _conversation.AppendUserInput(ideaBasePrompt + " " + request);
_imageIdea = await _conversation.GetResponseFromChatbotAsync(); _imageIdea = await _conversation.GetResponseFromChatbotAsync();
}
// Bild Promt anfordern /// <summary>
_conversation.AppendUserInput(requestImagePrompt); /// Fordert für mehrere Bilder Bild-Prompts an und generiert die dazugehörigen Bilder.
_imagePrompt = await _conversation.GetResponseFromChatbotAsync(); /// </summary>
private async Task RequestImagesAsync(WunschInfoModel wunschInfo)
{
string requestImagePrompt = await File.ReadAllTextAsync($"{Directory.GetCurrentDirectory()}{@"/wwwroot/image_prompt.txt"}");
// Nachricht mit Bildpromt anfrage senden
_conversation!.AppendUserInput(requestImagePrompt);
// Task-Liste, damit wir parallel Prompts anfordern und Bilder generieren können.
Task[] imagePromts = new Task[4];
for (int i = 0; i < 4; i++)
{
imagePromts[i] = RequestPromptAndGenerateImageAsync(i, wunschInfo);
}
await Task.WhenAll(imagePromts);
}
/// <summary>
/// Fordert einen Bild Prompt an und generiert ein Bild für diesen.
/// </summary>
/// <param name="index">Der Index des Bildes (für UI zeug)</param>
/// <param name="wunschInfo">Der Wunsch für den ein Bild erzeugt wird.</param>
private async Task RequestPromptAndGenerateImageAsync(int index, WunschInfoModel wunschInfo)
{
// Bild Prompt von ChatGPT anfordern
string imagePrompt = await _conversation!.GetResponseFromChatbotAsync();
// Keywords anhängen um Kirstens Stil zu aktivieren.
// TODO: Gucken, ob wir dem Watercolor bums brauchen
imagePrompt = "kkkk " + imagePrompt;// + " kkkk Watercolor + ink on paper, Pen drawing, wet-on-wet technique, dry-on-dry technique, dabbing technique. ";
// Debug only: Promt anzeigen
_imagePromts[index] = imagePrompt;
await InvokeAsync(StateHasChanged);
string? imageUrl = await GenerateImageAsync(imagePrompt, wunschInfo);
// TODO: Fehler im UI anzeigen (zur Zeit bleibt einfach Ladebalken)
_imageUrls[index] = imageUrl;
_imageStates[index] = ImageState.FadeIn;
await InvokeAsync(StateHasChanged);
}
/// <summary>
/// Erzeugt ein Bild für den gegebenen Prompt und Wunsch.
/// </summary>
/// <param name="imagePrompt">Der Bild Prompt</param>
/// <param name="wunschInfo">Der Wunsch.</param>
/// <returns>Die URL, falls das Bild generiert wurde; oder null, wenn kein Bild generiert werden konnte.</returns>
private async Task<string?> GenerateImageAsync(string imagePrompt, WunschInfoModel wunschInfo)
{
try
{
string? imageUrl = (await ImageGenerator.GenerateImageAsync(imagePrompt, wunschInfo, width, height))?.Dateiname;
// Kein Bild -> Fehler
if (imageUrl == null)
{
bool? retry = await DialogService.Confirm(
"Leider konnte das Bild nicht gemalt werden. Möchtest du es noch eimal versuchen?",
"Ups, ein Fehler ist aufgetreten...",
new ConfirmOptions { OkButtonText = "Ja", CancelButtonText = "Nein" });
if (retry == true)
{
imageUrl = (await ImageGenerator.GenerateImageAsync(imagePrompt, wunschInfo, width, height))?.Dateiname;
}
}
return imageUrl;
}
catch (Exception e)
{
NotificationService.Notify(new NotificationMessage()
{
Summary = "Es ist ein Fehler beim Erzeugen der Bilder aufgetreten, bitte versuche es erneut."
});
}
return null;
} }
/// <summary> /// <summary>
/// Generiert Bilder oder aktualisiert sie mit dem neuen Prompt. /// Generiert Bilder oder aktualisiert sie mit dem neuen Prompt.
/// </summary> /// </summary>
/// <param name="generateNewImage">Wenn <see langword="true"/>, werden neue Bilder generiert; sonst wird die vorhandene Idee bearbeitet.</param> /// <param name="generateNewImage">Wenn <see langword="true"/>, werden neue Bilder generiert; sonst wird die vorhandene Idee bearbeitet.</param>
private async Task GenerateImages(bool generateNewImage) private async Task GenerateImagesAsync(bool generateNewImage)
{ {
// Der Dialog blokiert so lange, wie der er offen ist, deshalb dürfen wir hier nicht warten, da wir sonst nie mit der Arbeit anfangen... // Der Dialog blokiert so lange, wie der er offen ist, deshalb dürfen wir hier nicht warten, da wir sonst nie mit der Arbeit anfangen...
//Task busyDialog = ShowBusyDialog(); //Task busyDialog = ShowBusyDialog();
@ -271,17 +344,17 @@
// } // }
} }
_imagePrompt = "kkkk " + _imagePrompt + " kkkk Watercolor + ink on paper, Pen drawing, wet-on-wet technique, dry-on-dry technique, dabbing technique. ";
await UpdateBusyMessage("Kirstens Assistent hat eine Idee! Er wird sie nun malen..."); await UpdateBusyMessage("Kirstens Assistent hat eine Idee! Er wird sie nun malen...");
WunschInfoModel wunschInfo = new() WunschInfoModel wunschInfo = new()
{ {
BildBeschreibung = _imageIdea, BildBeschreibung = _imageIdea,
BildPrompt = _imagePrompt, BildPrompt = "Individuelle Bild Prompts",
Datum = DateTime.Now, Datum = DateTime.Now,
GPTModel = _conversation.Model, GPTModel = _conversation.Model,
Wunsch = request Wunsch = request,
// TODO: Wenn wir Wünsche überarbeiten können wir hier diesen hier referenzieren
VorherigerWunsch = null
}; };
try try
@ -298,49 +371,7 @@
return; return;
} }
int generatedImages = 0; await RequestImagesAsync(wunschInfo);
try
{
// Vier Bilder generieren
for (int i = 0; i < 4; i++)
{
_imageUrls[i] = (await ImageGenerator.GenerateImageAsync(wunschInfo, width, height))?.Dateiname;
// Kein Bild -> Fehler
if (_imageUrls[i] == null)
{
bool? retry = await DialogService.Confirm(
"Leider konnte das Bild nicht gemalt werden. Möchtest du es noch eimal versuchen?",
"Ups, ein Fehler ist aufgetreten...",
new ConfirmOptions { OkButtonText = "Ja", CancelButtonText = "Nein" });
if (retry == true)
{
_imageUrls[i] = (await ImageGenerator.GenerateImageAsync(wunschInfo, width, height))?.Dateiname;
}
}
if (_imageUrls[i] != null)
generatedImages++;
// TODO: Fehler anzeigen
_imageStates[i] = ImageState.FadeIn;
await InvokeAsync(StateHasChanged);
}
}
catch (Exception e)
{
NotificationService.Notify(new NotificationMessage()
{
Summary = "Es ist ein Fehler beim Erzeugen der Bilder aufgetreten, bitte versuche es erneut."
});
if (generatedImages == 0)
{
// TODO: Delete WunschInfo
}
}
_progressVisible = false; _progressVisible = false;
_buttonVisible = true; _buttonVisible = true;
@ -357,4 +388,3 @@
} }
} }
} }

View File

@ -1,2 +1,2 @@
Gib mir eine kreative und wenn möglich tiefsinnige Idee, die nicht unbedingt mit Städten zu tun hat, für ein Kunstwerk. Gib mir eine kreative und wenn möglich tiefsinnige Idee für ein Gemälde.
Der Titel ist: Der Titel ist:

View File

@ -0,0 +1,9 @@
Bitte einen englischen Prompt für dieses Bild für eine Bild-Generierungs KI.
Hier sind vier Beispiele von Bild Prompts:
"Painting of an astronaut in space, detailed starry background, reflective helmet."
"Painting of a floating island with giant clock gears, populated with mythical creatures."
"Painting of a Japanese garden in autumn, with a bridge over a koi pond."
"Painting representing the sound of jazz music, using pale colors and erratic shapes."
Wie du siehst enthält ein Prompt eine genaue Beschreibung des Bildes. Ein guter Prompt selbst enthält keine Metaphern oder Vergleiche.

View File

@ -1,121 +0,0 @@
title Textual-description
Christmas tree, Bare tree upside down with colored ball as root, black border
Being by the sea with your hair blowing in the wind, Wavy strokes of color in the shape of hair from the right side in front of light blue center stripe
Sales volume, geometric simple blocks on a black surface with striped clouds in the background
Regulated life, Line drawing of a torso on a table with a connection of buten balls stretching across the entire image.
Don't be afraid of mistakes, A picture of a yellow, black sponge with light blue paint running from the top. White background
An H - for the French, Red Black Background. The letter H. Solid in the lower part and frayed in the upper part.
Lamborghini, Ball in rainbow colors painted over with green and white, irregular, net-shaped strokes. Background pale colorful
A separate museum for the collection, a house on a steep green/white hill out the door straight white fan-shaped strokes deep blue sky
A different policy for refugees, White black rays going into the picture. In the foreground a lawn-like area with a brown frame in the shape of a house. In the frame a red, unfinished heart on a white plate-shaped object.
A sea of cow parsley, Blue blobs of paint running upwards. In the lower part light green / yellow gradients. In the foreground individual plant-like strokes with fan-shaped tips.
Happy end, Grid with black background and green lines. Some quadrants painted with dark green paint. In the foreground several horizontal lines with irregular peaks and valleys similar to a heartbeat or stock price
walk by the sea, A pair of blue and yellow rubber boots. Gradient color accents in the background. Pretzel and round shapes in the foreground. A conch shell in the lower left corner
Dancing tango with red gloves, Two arms that merge into a heart from the upper arm. Pink flowers in the background.
I pot, A potty for toddlers with a 3-dimensional letter I inside. gray background.
A gentle death, colorful picture. A red scythe is clearly visible, as is an hourglass. A severed hooded Red Man is censored by a black bar at eye level. Many individual gradients in the picture with white gaps.
A summer dress, Lots of white clothes in a black blue gradient. Lines Flowers and Colorful
Stay healthy and happy together, Irregular grid of blue and yellow lines. A form embroidered out of red crosses. It looks like sewn fabric.
Read Kant!, Gray pistols on the rim with yellow and red stoppers in the barrel. Black background with the inscription "Have courage, you..."
A domicile fixe, Background black and colored with many small "cell-like" points. 2 beds in the foreground one is empty and the other is covered with colorful duvets
not be young, A colorful swirl of colors, in front of a piece of white furniture. In the foreground 2 crutches.
Buddha, Silhouette of a person painted from many colorful horizontal lines. Some color gradients on the shoulder
Ganesha, Gray silhouette of a hornless bison against a black background. A horn with Rotel kriesen in the foreground
mountains and eggs, 3 pointed white-brown mountains in front of a deep blue background with one-shaped objects in the background.
roses, Colorful vertical tendrils with thorns against a white background with pale red rose shaped accents.
More time, A clock without hands against a dark background. Both pointers are below in the picture
A very large beer, strip cut shape of a beer glass in a blue background with lots of round blue bubbles/circles
Stupid tax, now!, A Germany flag with holes
1000 fans of Borussia Mönchengladbach, A historic stadium with towers with lots of color dots. Each of the color dots has very large sunglasses. At the top of the stadium, a blob of color is waving a flag with its arms.
change, Black background and white Coin shaped objects stacked in multiple stacks
Find the fountain of youth, Green vertical lines with white chain link fence in foreground
A certain house should blow up, A house-shaped 3d line in front of a black background. Lots of dashes down from the house showing speed.
An intellectual lover, black background. A man with large glasses and a bald head reads a newspaper and looks at the viewer. The newspaper says "intellect"
An expensive handbag, A plain white top handle bag against a black background. The lower part of the bag is in gold color
The boy should get away from the PC, A power plug without a cable. A dense network of branching lines extends from the rear part of the plug. In the background you can see a yellow wall with the socket.
Helgoland, Several silhouettes of helicopters. A red big cross. Blue wavy lines, Elgoland as an inscription.
Spotted Cat, Purple cat paws on a light blue background. White black fur in the front and.
30 pounds less, Cuboid with holes at the bottom from which something white flows. Large teardrop shapes in the foreground. Red blobs.
(pretty) leftist Christmas stollen, running horizontal dark lines. A star with a ring in the middle and a cut white Christmas stollen
Elephant eats carrots, two gray elephants and 4 carrots in the foreground. The leaves of the carrots blur into each other
Be healthy, A white sphere with a Rotel Cross on the surface against a black background.
Classical music, fire salamander with a hat and red cape plays toreo with huge waves.
A bag of colorful ideas for life, a tote bag. Between the handles is a cuboid object
A clear head, A simple drawing of a head. The top half of the head is an iron cage.
Lower Rhine, White silhouette of the Kalkar nuclear power plant in front of a blue silhouette of the Madonna by Kevelaer.
Proud, A noble colorful crown against a black and white background.
Olympia, rubber bands in the Olympic colors. With a lot of small colorful blobs of paint
Light, Shape of a lightbulb made up of many precisely arranged yellow circles against a dark background with a simple drawing of a candle
garden dream, Large bow ties and a white fence element
utopia, A box with black and white balloons flying out of it with the inscription "Utopia"
A small cat, A red and white maze
Go out, Colorful Short Stripes on White Black Background
courage, A white silhouette of a human in a dark colored liquid with large white cubes
MacBook, A laptop with red blue and black creations
A good friend, a blue, smeared silhouette of a person raising an arm. Gray and black background with many different sized colorful crosses
5 million, A 50 euro note with the number 5000000. Background: many green dots on a pink background
Something private, A rolled white paper on a dark blue background
field flowers, Black and white field flowers, pale green vertical branches and big splashes of blue colour
pool with fish (Becken mit Fisch), a pelvic bone with fish in the foreground
The madness should end, A town exit sign with the town name "Insanity" and a speed limit of 37
repartee, A white silhouette of a hammer on a wall on a light yellow and light blue background with lots of nails
A stable full of grandchildren, A hand comes out of the middle of the picture against a dark background. Various names are written in different colors and orientations across the entire image
Performers out of the temple, A dark hat over a castle. In the foreground, many green dots are connected with red lines. A large dark trident juts through the entire image
Overcome the ego, A 3D star with many points on a dark background. In the lower corner is the silhouette of a boxer hitting the star
mess, An egg with an overlay of a pig's head
Monkey with chocolate cake, A green monkey on a red background. Many pieces of cake can be seen in the foreground.
silence, A dark image with many blue dots on a dark blue background. A cruez can be seen in the lower dark area.
A wish in reserve, white box on a green background. On the box there are 2 orthogonal stripes, like on a present, which extend to the edges.
High heels (just in case), The silhouette of a high heel in front of an irregular checkered pattern
More and more treats for Frodo, Many bones on a dark green to light yellow background
Luck, a round object with many small color accents on it. In the foreground you can see a couple of monochromatic crises with their shadows.
Live with a dog again, White silhouettes of dogs overlaid by a dog's head with an open snout. The eye of the dog's head is the center of a star-shaped ray
serenity prayer, A paper basket with paper balls. Vertical dark lines
light legs, pair of legs pointing upwards. These stick in a round black object
A pious wish, A childlike angel leans on a dark stripe, pink background. A swirl of halo and black simple star shapes.
I want to be an artist, black barcode a yellow crown, 2 hands and a circle with 2 dots in it.
Confidence, Many houses on a green plain. A large red roof in the foreground and a black line drawing of the "House of Nicholas"
tolerance virus, Dark image with a large black virus shape in the center. All around are colorful smaller virus forms.
More goals for HSV, Abstract representation of a soccer goal net. green background. Big white circles and several white racks of football goals.
healthy passion, human denture in front of a very colorful celled background
A lot of ice cream, An abstract representation of balls of ice cream in a cone lying upside down on the ground melting
hospitality, 2 silhouettes of tables in front of a dark background with many loops distributed over the image
Responsibility, black representation of a world map in front of a blue globe. There is an open umbrella above the globe
celebrate Thanksgiving, A green abstract turkey leg between a colorful recycling symbol
attitude, A piece of red fabric is held by several hooks on all sides
sheep, two crochet hooks crochet the silhouette of a sheep out of blue wool. Dark background with green crocheted fabric
Youngsters for the fire brigade, A red fireman's helmet above a crowd of ladybugs on a light blue background
Start again, many grey, blue, red and green rectangular areas superimposed irregularly.
Nazi club, A colorful club against a light blue background. A broken swastika can be seen in the background
See the Erlkönig, A car of black lines against pale swirls of black, blue, and green stripes
1 centimeter more, Stack of white dice against a blue background that decreases towards the top. The top edge of the image is red and the right edge is yellow
Free days, A view of a calendar with white wildly painted lines on it
Experience more nature, perpendicular green lines with flowers at the ends. two walls Swirl of colors on the floor
A castle, View through a mosaic glass made of round glass panes. A church can be seen behind the glass
I want to play football as much as I want, large soccer ball on the right side of the picture. Several colorful soccer balls on the left.
Riding a horse through Mongolia, 4 legs and hooves of a horse in front of a yellow and red shape with many cloud shapes in the foreground and background
A small dog, A red dog leash and a yellow collar in front of a blue-green surface
Get out of everyday life and into pleasure, cage. A yellow beam runs through the center of the cage. Blue smoke emanates from the left side of the steel. To the right of the star are pale red spots
Armor's arrow should hit - namely..., A plaid shirt against a green, black background. There's a dial on the shirt. There is an arrow in the center of the target
Hang laundry outside, red clotheslines with white laundry and yellow clothespins. Background above: blue, background below: white
I want to be able to do magic, black and a white hand with blue rings against an orange background. There are many yellow and pink circles across the image
Dies ist eine Liste von Bildern von der Künstlerin Kirsten Klöckner.
Sie hat einen Titel bekommen und dazu ein Bild gemalt. Bitte generiere einen Englischen Prompt für eine Bild KI basierend auf dieser Liste.
Hier findest du Beispiele, wie der Promt aussehen soll:
"Portrait of an astronaut in space, detailed starry background, reflective helmet."
“Painting of a floating island with giant clock gears, populated with mythical creatures.”
“Landscape of a Japanese garden in autumn, with a bridge over a koi pond.”
“Painting representing the sound of jazz music, using pale colors and erratic shapes.”
“Painting of a modern smartphone with classic art pieces appearing on the screen.”
“Battle scene with futuristic robots and a golden palace in the background.”
“Painting of a bustling city market with different perspectives of people and stalls.”
“Painting of a ship sailing in a stormy sea, with dramatic lighting and powerful waves.”
“Painting of a female botanist surrounded by exotic plants in a greenhouse.”
“Painting of an ancient castle at night, with a full moon, gargoyles, and shadows.”
Bitte nutze für den Prompt maximal 20 Wörter und achte darauf, dass der Prompt auf englisch ist.
Den Titel für den zu erstellenden Promt ist:

View File

@ -1,10 +0,0 @@
Bitte generiere einen Englischen Prompt für dieses Bild
Hier findest du Beispiele, wie der Promt aussehen soll:
"Painting of an astronaut in space, detailed starry background, reflective helmet."
“Painting of a floating island with giant clock gears, populated with mythical creatures.”
“Painting of a Japanese garden in autumn, with a bridge over a koi pond.”
“Painting representing the sound of jazz music, using pale colors and erratic shapes.”
Der Promt selber darf auf keinen Fall abstrakt sein, man muss durch den Promt ein genaues Bild vor Augen haben.
Verwende dabei keine fotorealistischen Elemente, sondern Siloutten,Konturen und Formen. Es darf nicht zu viele Details enthalten.

View File

@ -21,4 +21,11 @@
<Property Name="ParentElementType" Value="SqlTable" /> <Property Name="ParentElementType" Value="SqlTable" />
<Property Name="NewName" Value="GroupIndex" /> <Property Name="NewName" Value="GroupIndex" />
</Operation> </Operation>
<Operation Name="Rename Refactor" Key="bedfe6e4-86b6-478d-b086-eb3be65f475f" ChangeDateTime="10/14/2023 11:45:03">
<Property Name="ElementName" Value="[dbo].[BildPrompts].[Id]" />
<Property Name="ElementType" Value="SqlSimpleColumn" />
<Property Name="ParentElementName" Value="[dbo].[BildPrompts]" />
<Property Name="ParentElementType" Value="SqlTable" />
<Property Name="NewName" Value="BildId" />
</Operation>
</Operations> </Operations>

View File

@ -1,6 +1,7 @@
CREATE PROCEDURE [dbo].[spBildInfo_GetAll] CREATE PROCEDURE [dbo].[spBildInfo_GetAll]
AS AS
BEGIN BEGIN
SELECT Id, Datum, Dateiname, ImageModel, WunschId -- TODO: Den Prompt brauchen wir im UI eigentlich nie, wir könnten ihn in eine extra Tabell auslagern, oder einfach nicht rausrücken
SELECT Id, Datum, Dateiname, ImageModel, WunschId, Prompt
FROM [dbo].[BildInfo]; FROM [dbo].[BildInfo];
END END

View File

@ -1,16 +1,18 @@
CREATE PROCEDURE [dbo].[spBildInfo_Insert] CREATE PROCEDURE [dbo].[spBildInfo_Insert]
@Id INT, @Id INT,
@Datum DATETIME2 , @Datum DATETIME2,
@Dateiname NCHAR(256) , @Dateiname NVARCHAR(256),
@ImageModel NCHAR(32) , @ImageModel NVARCHAR(32),
@WunschId INT @WunschId INT,
@Prompt NVARCHAR(MAX)
AS AS
BEGIN BEGIN
INSERT INTO [dbo].[BildInfo] (Datum, Dateiname, ImageModel, WunschId) INSERT INTO [dbo].[BildInfo] (Datum, Dateiname, ImageModel, WunschId, Prompt)
VALUES (@Datum, VALUES (@Datum,
@Dateiname, @Dateiname,
@ImageModel, @ImageModel,
@WunschId); @WunschId,
@Prompt);
SELECT Id FROM [dbo].[BildInfo] WHERE Id = CAST(SCOPE_IDENTITY() AS INT); SELECT Id FROM [dbo].[BildInfo] WHERE Id = CAST(SCOPE_IDENTITY() AS INT);
END END

View File

@ -4,15 +4,17 @@
@BildPrompt NVARCHAR(MAX), @BildPrompt NVARCHAR(MAX),
@BildBeschreibung NVARCHAR(MAX), @BildBeschreibung NVARCHAR(MAX),
@Datum DATETIME2, @Datum DATETIME2,
@GPTModel NCHAR(32) @GPTModel NCHAR(32),
@VorherigerWunsch int = NULL
AS AS
BEGIN BEGIN
INSERT INTO [dbo].[WunschInfo] (Wunsch, BildPrompt, BildBeschreibung, Datum, GPTModel) INSERT INTO [dbo].[WunschInfo] (Wunsch, BildPrompt, BildBeschreibung, Datum, GPTModel, VorherigerWunsch)
VALUES (@Wunsch, VALUES (@Wunsch,
@BildPrompt, @BildPrompt,
@BildBeschreibung, @BildBeschreibung,
@Datum, @Datum,
@GPTModel); @GPTModel,
@VorherigerWunsch);
SELECT Id FROM [dbo].[WunschInfo] WHERE Id = CAST(SCOPE_IDENTITY() AS INT); SELECT Id FROM [dbo].[WunschInfo] WHERE Id = CAST(SCOPE_IDENTITY() AS INT);
END END

View File

@ -2,7 +2,8 @@
( (
[Id] INT NOT NULL PRIMARY KEY IDENTITY, [Id] INT NOT NULL PRIMARY KEY IDENTITY,
[Datum] DATETIME2 NOT NULL, [Datum] DATETIME2 NOT NULL,
[Dateiname] NCHAR(256) NOT NULL, [Dateiname] NVARCHAR(256) NOT NULL,
[ImageModel] NCHAR(32) NOT NULL, [ImageModel] NVARCHAR(32) NOT NULL,
[WunschId] INT NOT NULL [WunschId] INT NOT NULL,
[Prompt] NVARCHAR(MAX) NOT NULL DEFAULT 'Prompt nicht verfügbar'
) )

View File

@ -5,5 +5,6 @@
[BildPrompt] NVARCHAR (MAX) NOT NULL, [BildPrompt] NVARCHAR (MAX) NOT NULL,
[BildBeschreibung] NVARCHAR (MAX) NOT NULL, [BildBeschreibung] NVARCHAR (MAX) NOT NULL,
[Datum] DATETIME2 (7) NOT NULL, [Datum] DATETIME2 (7) NOT NULL,
[GPTModel] NCHAR (32) NOT NULL [GPTModel] NVARCHAR(32) NOT NULL,
[VorherigerWunsch] INT NULL
) )