aboutsummaryrefslogtreecommitdiff
path: root/src/server/ApiManagers/FireflyManager.ts
diff options
context:
space:
mode:
authorNathan-SR <144961007+Nathan-SR@users.noreply.github.com>2025-05-11 21:18:55 -0400
committerNathan-SR <144961007+Nathan-SR@users.noreply.github.com>2025-05-11 21:18:55 -0400
commit4219c751c0f984fac6e5995c1ab955a8d63a28cd (patch)
treee638ff6aeb977f175916bcf14a8e332ae6f47dac /src/server/ApiManagers/FireflyManager.ts
parente62f51bacace3d91f388202135426445721097cc (diff)
many changes to firefly UI (options added) and starting work on finalizing conditionals
Diffstat (limited to 'src/server/ApiManagers/FireflyManager.ts')
-rw-r--r--src/server/ApiManagers/FireflyManager.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/ApiManagers/FireflyManager.ts b/src/server/ApiManagers/FireflyManager.ts
index e5e030b0f..a272494b8 100644
--- a/src/server/ApiManagers/FireflyManager.ts
+++ b/src/server/ApiManagers/FireflyManager.ts
@@ -22,7 +22,7 @@ export default class FireflyManager extends ApiManager {
return undefined;
});
- generateImageFromStructure = (prompt: string = 'a realistic illustration of a cat coding', width: number = 2048, height: number = 2048, structureUrl: string, strength: number = 50, styles: string[], styleUrl: string | undefined) =>
+ generateImageFromStructure = (prompt: string = 'a realistic illustration of a cat coding', width: number = 2048, height: number = 2048, structureUrl: string, strength: number = 50, styles: string[], styleUrl: string | undefined, variations: number = 4) =>
this.getBearerToken().then(response =>
response?.json().then((data: { access_token: string }) =>
//prettier-ignore
@@ -36,7 +36,7 @@ export default class FireflyManager extends ApiManager {
],
body: JSON.stringify({
prompt,
- numVariations: 4,
+ numVariations: variations,
detailLevel: 'preview',
modelVersion: 'image3_fast',
size: { width, height },
@@ -308,7 +308,7 @@ export default class FireflyManager extends ApiManager {
return { styleUrl, structureUrl: dropboxStructureUrl };
})
.then(uploads =>
- this.generateImageFromStructure(req.body.prompt, req.body.width, req.body.height, uploads.structureUrl, req.body.strength, req.body.presets, uploads.styleUrl)
+ this.generateImageFromStructure(req.body.prompt, req.body.width, req.body.height, uploads.structureUrl, req.body.strength, req.body.presets, uploads.styleUrl, req.body.variations)
.then(images => {
Promise.all((images ?? [new Error('no images were generated')]).map(fire => (fire instanceof Error ? fire : DashUploadUtils.UploadImage(fire.url))))
.then(dashImages => {