Skip to content

Commit

Permalink
Merge branch '12.4-45685-stabilityai-update' into '12.4'
Browse files Browse the repository at this point in the history
45685 - Update StabilityAI models

See merge request typo3-commons/mkcontentai!14
  • Loading branch information
hannesbochmann committed Nov 24, 2023
2 parents 76305ac + 8bc7867 commit b547a01
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Classes/Http/Client/StabilityAiClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,15 @@ public function image(string $text): array
],
'cfg_scale' => 7,
'clip_guidance_preset' => 'FAST_BLUE',
'height' => 512,
'width' => 512,
'samples' => 2,
'height' => 1024,
'width' => 1024,
'samples' => 3,
'steps' => 30,
];

$response = $this->client->request(
'POST',
$this->getEndpointLink('v1/generation/stable-diffusion-512-v2-1/text-to-image'),
$this->getEndpointLink('v1/generation/stable-diffusion-xl-1024-v1-0/text-to-image'),
[
'headers' => $headers,
'body' => json_encode($params),
Expand Down Expand Up @@ -130,7 +130,7 @@ public function createImageVariation(File $file): array
'text_prompts[0][text]' => 'variant of original image',
'cfg_scale' => '7',
'clip_guidance_preset' => 'FAST_BLUE',
'samples' => '1',
'samples' => '3',
'steps' => '30',
]);

Expand All @@ -139,7 +139,7 @@ public function createImageVariation(File $file): array

$response = $this->client->request(
'POST',
$this->getEndpointLink('v1/generation/stable-diffusion-512-v2-1/image-to-image'),
$this->getEndpointLink('v1/generation/stable-diffusion-xl-1024-v1-0/image-to-image'),
[
'headers' => $headers,
'body' => $formData->bodyToIterable(),
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ These settings can be adjusted according to your preferences and needs. It's imp

## Changelog

- 12.0.6: use dall-e-3 model from OpenAI, use stable-diffusion-xl-1024-v1-0 from StabilityAI, fix for TCA buttons
- 12.0.5: image generation from filelist, outpaintina and upscaling as context menu in filelist
- 12.0.2: add StabilityAI including upscaling, add outpainting, little cleanup and fixes for some warnings
- 12.0.1: update extension icon
Expand Down

0 comments on commit b547a01

Please sign in to comment.