Refactored ImageGenerator
Option "StableDiffusionModel" zu AppSettings hinzugefügt
This commit is contained in:
@ -305,7 +305,7 @@
|
||||
// Vier Bilder generieren
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
_imageUrls[i] = await ImageGenerator.GenerateImageAsync(_imagePrompt, "", width, height, wunschInfo);
|
||||
_imageUrls[i] = (await ImageGenerator.GenerateImageAsync(wunschInfo, width, height))?.Dateiname;
|
||||
|
||||
// Kein Bild -> Fehler
|
||||
if (_imageUrls[i] == null)
|
||||
@ -317,12 +317,14 @@
|
||||
|
||||
if (retry == true)
|
||||
{
|
||||
await ImageGenerator.GenerateImageAsync(_imagePrompt, "", width, height, wunschInfo);
|
||||
_imageUrls[i] = (await ImageGenerator.GenerateImageAsync(wunschInfo, width, height))?.Dateiname;
|
||||
}
|
||||
}
|
||||
|
||||
generatedImages++;
|
||||
if (_imageUrls[i] != null)
|
||||
generatedImages++;
|
||||
|
||||
// TODO: Fehler anzeigen
|
||||
_imageStates[i] = ImageState.FadeIn;
|
||||
await InvokeAsync(StateHasChanged);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user