Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Commit
·
e4fbf30
1
Parent(s):
0c03f14
add 2 servers in prevision of the AI Comic blog post
Browse files
src/providers/image-generation/generateImageSDXL.mts
CHANGED
@@ -3,7 +3,7 @@ import { client } from "@gradio/client"
|
|
3 |
import { generateSeed } from "../../utils/misc/generateSeed.mts"
|
4 |
import { getValidNumber } from "../../utils/validators/getValidNumber.mts"
|
5 |
|
6 |
-
// note: to reduce costs
|
7 |
// anyway, we will soon not need to use this cloud anymore
|
8 |
// since we will be able to leverage the Inference API
|
9 |
const instances: string[] = [
|
@@ -23,6 +23,8 @@ const instances: string[] = [
|
|
23 |
`${process.env.VC_SDXL_SPACE_API_URL_14 || ""}`,
|
24 |
`${process.env.VC_SDXL_SPACE_API_URL_15 || ""}`,
|
25 |
`${process.env.VC_SDXL_SPACE_API_URL_16 || ""}`,
|
|
|
|
|
26 |
].filter(instance => instance?.length > 0)
|
27 |
|
28 |
const secretToken = `${process.env.VC_MICROSERVICE_SECRET_TOKEN || ""}`
|
@@ -52,7 +54,7 @@ export async function generateImageSDXLAsBase64(options: {
|
|
52 |
const width = getValidNumber(options?.width, 256, 1024, 512)
|
53 |
const height = getValidNumber(options?.height, 256, 1024, 512)
|
54 |
const nbSteps = getValidNumber(options?.nbSteps, 5, 100, 20)
|
55 |
-
console.log("SEED:", seed)
|
56 |
|
57 |
const instance = instances.shift()
|
58 |
instances.push(instance)
|
|
|
3 |
import { generateSeed } from "../../utils/misc/generateSeed.mts"
|
4 |
import { getValidNumber } from "../../utils/validators/getValidNumber.mts"
|
5 |
|
6 |
+
// note: to reduce costs I use the small A10s (not the large)
|
7 |
// anyway, we will soon not need to use this cloud anymore
|
8 |
// since we will be able to leverage the Inference API
|
9 |
const instances: string[] = [
|
|
|
23 |
`${process.env.VC_SDXL_SPACE_API_URL_14 || ""}`,
|
24 |
`${process.env.VC_SDXL_SPACE_API_URL_15 || ""}`,
|
25 |
`${process.env.VC_SDXL_SPACE_API_URL_16 || ""}`,
|
26 |
+
`${process.env.VC_SDXL_SPACE_API_URL_17 || ""}`,
|
27 |
+
`${process.env.VC_SDXL_SPACE_API_URL_18 || ""}`,
|
28 |
].filter(instance => instance?.length > 0)
|
29 |
|
30 |
const secretToken = `${process.env.VC_MICROSERVICE_SECRET_TOKEN || ""}`
|
|
|
54 |
const width = getValidNumber(options?.width, 256, 1024, 512)
|
55 |
const height = getValidNumber(options?.height, 256, 1024, 512)
|
56 |
const nbSteps = getValidNumber(options?.nbSteps, 5, 100, 20)
|
57 |
+
// console.log("SEED:", seed)
|
58 |
|
59 |
const instance = instances.shift()
|
60 |
instances.push(instance)
|