Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Commit
β’
9a9fd5a
1
Parent(s):
212820a
massive refactoring
Browse files- package-lock.json +51 -51
- package.json +1 -1
- src/app/api/render/providers/comfy/getComfyWorkflow.ts +1 -1
- src/app/api/render/providers/falai/index.ts +4 -1
- src/app/api/render/route.ts +2 -2
- src/components/core/timeline/index.tsx +4 -4
- src/components/settings/assistant.tsx +6 -5
- src/components/settings/constants.ts +60 -60
- src/components/settings/{storyboard.tsx β image.tsx} +45 -44
- src/components/settings/index.tsx +6 -6
- src/components/settings/music.tsx +5 -5
- src/components/settings/sound.tsx +5 -5
- src/components/settings/speech.tsx +0 -87
- src/components/settings/video.tsx +5 -5
- src/components/settings/voice.tsx +87 -0
- src/components/tags/Tag.tsx +48 -0
- src/components/tags/colors.ts +34 -0
- src/components/tags/types.ts +37 -0
- src/components/toolbars/top-menu/ModelList.tsx +50 -0
- src/components/toolbars/top-menu/ProviderList.tsx +54 -0
- src/components/toolbars/top-menu/RenderingStrategyList.tsx +54 -0
- src/components/toolbars/top-menu/constants.ts +8 -0
- src/components/toolbars/top-menu/image/index.tsx +45 -0
- src/components/toolbars/top-menu/index.tsx +12 -2
- src/components/toolbars/top-menu/music/index.tsx +45 -0
- src/components/toolbars/top-menu/settings/index.tsx +0 -146
- src/components/toolbars/top-menu/sound/index.tsx +45 -0
- src/components/toolbars/top-menu/video/index.tsx +45 -0
- src/components/toolbars/top-menu/voice/index.tsx +45 -0
- src/controllers/settings/getDefaultSettingsState.ts +22 -18
- src/controllers/settings/types.ts +42 -34
- src/controllers/settings/useSettings.ts +72 -57
- src/controllers/settings/workflows/{storyboard.ts β image.ts} +1 -1
- src/lib/utils/getRenderRequestPrompts.ts +3 -3
package-lock.json
CHANGED
@@ -10,7 +10,7 @@
|
|
10 |
"dependencies": {
|
11 |
"@aitube/clap": "0.0.24",
|
12 |
"@aitube/engine": "0.0.15",
|
13 |
-
"@aitube/timeline": "
|
14 |
"@fal-ai/serverless-client": "^0.10.3",
|
15 |
"@huggingface/hub": "^0.15.0",
|
16 |
"@huggingface/inference": "^2.7.0",
|
@@ -86,33 +86,28 @@
|
|
86 |
"zustand": "^4.5.2"
|
87 |
}
|
88 |
},
|
89 |
-
"
|
90 |
-
"version": "0.0.24",
|
91 |
-
"resolved": "https://registry.npmjs.org/@aitube/clap/-/clap-0.0.24.tgz",
|
92 |
-
"integrity": "sha512-iMmxyPmVh1LWNUlWKK2rRnCSZ/CLmBeb1ADNr5pj0dFI51NNezipYXjZv9dBOb5y3FKBkL+jbEcy7kQFgKHhpw==",
|
93 |
-
"dependencies": {
|
94 |
-
"pure-uuid": "^1.8.1"
|
95 |
-
},
|
96 |
-
"peerDependencies": {
|
97 |
-
"yaml": "^2.4.3"
|
98 |
-
}
|
99 |
-
},
|
100 |
-
"node_modules/@aitube/engine": {
|
101 |
-
"version": "0.0.15",
|
102 |
-
"resolved": "https://registry.npmjs.org/@aitube/engine/-/engine-0.0.15.tgz",
|
103 |
-
"integrity": "sha512-SxlTGOLHNPh93PY/hCXuNgCUWV7Uky9Q4mBKS4uA7+gReeYBT//x/sAWqIvV8MEj2dkx1Br3iTse1/rcVay49w==",
|
104 |
-
"peerDependencies": {
|
105 |
-
"@aitube/clap": "0.0.24"
|
106 |
-
}
|
107 |
-
},
|
108 |
-
"node_modules/@aitube/timeline": {
|
109 |
"version": "0.0.15",
|
110 |
-
"
|
111 |
-
"integrity": "sha512-goteHbDvdvT3PNNDf41G3tXCwatbFDS8nSDynixHUZiqlf47oCevJBgFmS1cbt1t6Cmn118BZjJL2qUMqM697A==",
|
112 |
"dependencies": {
|
113 |
"date-fns": "^3.6.0",
|
114 |
"react-virtualized-auto-sizer": "^1.0.24"
|
115 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
"peerDependencies": {
|
117 |
"@aitube/clap": "0.0.24",
|
118 |
"@radix-ui/react-slider": "^1.1.2",
|
@@ -130,6 +125,29 @@
|
|
130 |
"zustand": "4.5.2"
|
131 |
}
|
132 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
133 |
"node_modules/@alloc/quick-lru": {
|
134 |
"version": "5.2.0",
|
135 |
"resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz",
|
@@ -3281,9 +3299,9 @@
|
|
3281 |
"integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ=="
|
3282 |
},
|
3283 |
"node_modules/@upstash/core-analytics": {
|
3284 |
-
"version": "0.0.
|
3285 |
-
"resolved": "https://registry.npmjs.org/@upstash/core-analytics/-/core-analytics-0.0.
|
3286 |
-
"integrity": "sha512-
|
3287 |
"dependencies": {
|
3288 |
"@upstash/redis": "^1.28.3"
|
3289 |
},
|
@@ -3292,11 +3310,11 @@
|
|
3292 |
}
|
3293 |
},
|
3294 |
"node_modules/@upstash/ratelimit": {
|
3295 |
-
"version": "1.
|
3296 |
-
"resolved": "https://registry.npmjs.org/@upstash/ratelimit/-/ratelimit-1.
|
3297 |
-
"integrity": "sha512-
|
3298 |
"dependencies": {
|
3299 |
-
"@upstash/core-analytics": "^0.0.
|
3300 |
}
|
3301 |
},
|
3302 |
"node_modules/@upstash/redis": {
|
@@ -4515,15 +4533,6 @@
|
|
4515 |
"url": "https://github.com/sponsors/ljharb"
|
4516 |
}
|
4517 |
},
|
4518 |
-
"node_modules/date-fns": {
|
4519 |
-
"version": "3.6.0",
|
4520 |
-
"resolved": "https://registry.npmjs.org/date-fns/-/date-fns-3.6.0.tgz",
|
4521 |
-
"integrity": "sha512-fRHTG8g/Gif+kSh50gaGEdToemgfj74aRX3swtiouboip5JDLAyDE9F11nHMIcvOaXeOC6D7SpNhi7uFyB7Uww==",
|
4522 |
-
"funding": {
|
4523 |
-
"type": "github",
|
4524 |
-
"url": "https://github.com/sponsors/kossnocorp"
|
4525 |
-
}
|
4526 |
-
},
|
4527 |
"node_modules/debounce": {
|
4528 |
"version": "1.2.1",
|
4529 |
"resolved": "https://registry.npmjs.org/debounce/-/debounce-1.2.1.tgz",
|
@@ -4746,9 +4755,9 @@
|
|
4746 |
"integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA=="
|
4747 |
},
|
4748 |
"node_modules/electron-to-chromium": {
|
4749 |
-
"version": "1.4.
|
4750 |
-
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.
|
4751 |
-
"integrity": "sha512-
|
4752 |
},
|
4753 |
"node_modules/emoji-regex": {
|
4754 |
"version": "9.2.2",
|
@@ -8171,15 +8180,6 @@
|
|
8171 |
"react-dom": ">=16.13"
|
8172 |
}
|
8173 |
},
|
8174 |
-
"node_modules/react-virtualized-auto-sizer": {
|
8175 |
-
"version": "1.0.24",
|
8176 |
-
"resolved": "https://registry.npmjs.org/react-virtualized-auto-sizer/-/react-virtualized-auto-sizer-1.0.24.tgz",
|
8177 |
-
"integrity": "sha512-3kCn7N9NEb3FlvJrSHWGQ4iVl+ydQObq2fHMn12i5wbtm74zHOPhz/i64OL3c1S1vi9i2GXtZqNqUJTQ+BnNfg==",
|
8178 |
-
"peerDependencies": {
|
8179 |
-
"react": "^15.3.0 || ^16.0.0-alpha || ^17.0.0 || ^18.0.0",
|
8180 |
-
"react-dom": "^15.3.0 || ^16.0.0-alpha || ^17.0.0 || ^18.0.0"
|
8181 |
-
}
|
8182 |
-
},
|
8183 |
"node_modules/read-cache": {
|
8184 |
"version": "1.0.0",
|
8185 |
"resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz",
|
|
|
10 |
"dependencies": {
|
11 |
"@aitube/clap": "0.0.24",
|
12 |
"@aitube/engine": "0.0.15",
|
13 |
+
"@aitube/timeline": "file:/Users/jbilcke/Projects/Typescript_Libraries/aitube-timeline",
|
14 |
"@fal-ai/serverless-client": "^0.10.3",
|
15 |
"@huggingface/hub": "^0.15.0",
|
16 |
"@huggingface/inference": "^2.7.0",
|
|
|
86 |
"zustand": "^4.5.2"
|
87 |
}
|
88 |
},
|
89 |
+
"../Typescript_Libraries/aitube-timeline": {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
"version": "0.0.15",
|
91 |
+
"license": "MIT",
|
|
|
92 |
"dependencies": {
|
93 |
"date-fns": "^3.6.0",
|
94 |
"react-virtualized-auto-sizer": "^1.0.24"
|
95 |
},
|
96 |
+
"devDependencies": {
|
97 |
+
"@types/react": "*",
|
98 |
+
"@types/react-dom": "*",
|
99 |
+
"@typescript-eslint/eslint-plugin": "^7.2.0",
|
100 |
+
"@typescript-eslint/parser": "^7.2.0",
|
101 |
+
"@vitejs/plugin-react": "^4.2.1",
|
102 |
+
"bun-types": "latest",
|
103 |
+
"eslint": "^8.57.0",
|
104 |
+
"eslint-plugin-react-hooks": "^4.6.0",
|
105 |
+
"eslint-plugin-react-refresh": "^0.4.6",
|
106 |
+
"prettier": "^3.3.0",
|
107 |
+
"rimraf": "^5.0.7",
|
108 |
+
"typescript": "^5.4.5",
|
109 |
+
"vite": "^5.2.0"
|
110 |
+
},
|
111 |
"peerDependencies": {
|
112 |
"@aitube/clap": "0.0.24",
|
113 |
"@radix-ui/react-slider": "^1.1.2",
|
|
|
125 |
"zustand": "4.5.2"
|
126 |
}
|
127 |
},
|
128 |
+
"node_modules/@aitube/clap": {
|
129 |
+
"version": "0.0.24",
|
130 |
+
"resolved": "https://registry.npmjs.org/@aitube/clap/-/clap-0.0.24.tgz",
|
131 |
+
"integrity": "sha512-iMmxyPmVh1LWNUlWKK2rRnCSZ/CLmBeb1ADNr5pj0dFI51NNezipYXjZv9dBOb5y3FKBkL+jbEcy7kQFgKHhpw==",
|
132 |
+
"dependencies": {
|
133 |
+
"pure-uuid": "^1.8.1"
|
134 |
+
},
|
135 |
+
"peerDependencies": {
|
136 |
+
"yaml": "^2.4.3"
|
137 |
+
}
|
138 |
+
},
|
139 |
+
"node_modules/@aitube/engine": {
|
140 |
+
"version": "0.0.15",
|
141 |
+
"resolved": "https://registry.npmjs.org/@aitube/engine/-/engine-0.0.15.tgz",
|
142 |
+
"integrity": "sha512-SxlTGOLHNPh93PY/hCXuNgCUWV7Uky9Q4mBKS4uA7+gReeYBT//x/sAWqIvV8MEj2dkx1Br3iTse1/rcVay49w==",
|
143 |
+
"peerDependencies": {
|
144 |
+
"@aitube/clap": "0.0.24"
|
145 |
+
}
|
146 |
+
},
|
147 |
+
"node_modules/@aitube/timeline": {
|
148 |
+
"resolved": "../Typescript_Libraries/aitube-timeline",
|
149 |
+
"link": true
|
150 |
+
},
|
151 |
"node_modules/@alloc/quick-lru": {
|
152 |
"version": "5.2.0",
|
153 |
"resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz",
|
|
|
3299 |
"integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ=="
|
3300 |
},
|
3301 |
"node_modules/@upstash/core-analytics": {
|
3302 |
+
"version": "0.0.9",
|
3303 |
+
"resolved": "https://registry.npmjs.org/@upstash/core-analytics/-/core-analytics-0.0.9.tgz",
|
3304 |
+
"integrity": "sha512-9NXXxZ5y1/A/zqKLlVT7NsAWSggJfOjB0hG6Ffx29b4jbzHOiQVWB55h5+j2clT9Ib+mNPXn0iB5zN3aWLkICw==",
|
3305 |
"dependencies": {
|
3306 |
"@upstash/redis": "^1.28.3"
|
3307 |
},
|
|
|
3310 |
}
|
3311 |
},
|
3312 |
"node_modules/@upstash/ratelimit": {
|
3313 |
+
"version": "1.2.0",
|
3314 |
+
"resolved": "https://registry.npmjs.org/@upstash/ratelimit/-/ratelimit-1.2.0.tgz",
|
3315 |
+
"integrity": "sha512-03mNBUNz9EvIJCxhU0OtFWO3OSQE4gShFBlGph+hDPm9k7O75We1NYS/tCXSdmLVXtOvUGSmi5fyKQLBTEGWxw==",
|
3316 |
"dependencies": {
|
3317 |
+
"@upstash/core-analytics": "^0.0.9"
|
3318 |
}
|
3319 |
},
|
3320 |
"node_modules/@upstash/redis": {
|
|
|
4533 |
"url": "https://github.com/sponsors/ljharb"
|
4534 |
}
|
4535 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4536 |
"node_modules/debounce": {
|
4537 |
"version": "1.2.1",
|
4538 |
"resolved": "https://registry.npmjs.org/debounce/-/debounce-1.2.1.tgz",
|
|
|
4755 |
"integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA=="
|
4756 |
},
|
4757 |
"node_modules/electron-to-chromium": {
|
4758 |
+
"version": "1.4.794",
|
4759 |
+
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.794.tgz",
|
4760 |
+
"integrity": "sha512-6FApLtsYhDCY0Vglq3AptsdxQ+PJLc6AxlAM0HjEihUAiOPPbkASEsq9gtxUeZY9o0sJIEa3WnF0vVH4VT4iug=="
|
4761 |
},
|
4762 |
"node_modules/emoji-regex": {
|
4763 |
"version": "9.2.2",
|
|
|
8180 |
"react-dom": ">=16.13"
|
8181 |
}
|
8182 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8183 |
"node_modules/read-cache": {
|
8184 |
"version": "1.0.0",
|
8185 |
"resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz",
|
package.json
CHANGED
@@ -12,7 +12,7 @@
|
|
12 |
"dependencies": {
|
13 |
"@aitube/clap": "0.0.24",
|
14 |
"@aitube/engine": "0.0.15",
|
15 |
-
"@aitube/timeline": "
|
16 |
"@fal-ai/serverless-client": "^0.10.3",
|
17 |
"@huggingface/hub": "^0.15.0",
|
18 |
"@huggingface/inference": "^2.7.0",
|
|
|
12 |
"dependencies": {
|
13 |
"@aitube/clap": "0.0.24",
|
14 |
"@aitube/engine": "0.0.15",
|
15 |
+
"@aitube/timeline": "file:/Users/jbilcke/Projects/Typescript_Libraries/aitube-timeline",
|
16 |
"@fal-ai/serverless-client": "^0.10.3",
|
17 |
"@huggingface/hub": "^0.15.0",
|
18 |
"@huggingface/inference": "^2.7.0",
|
src/app/api/render/providers/comfy/getComfyWorkflow.ts
CHANGED
@@ -9,7 +9,7 @@ export function getComfyWorkflow(request: RenderRequest) {
|
|
9 |
let comfyWorkflow = "{}"
|
10 |
|
11 |
if (request.segment.category === ClapSegmentCategory.STORYBOARD) {
|
12 |
-
comfyWorkflow = request.settings.
|
13 |
} else if (request.segment.category === ClapSegmentCategory.VIDEO) {
|
14 |
comfyWorkflow = request.settings.comfyWorkflowForVideo
|
15 |
}
|
|
|
9 |
let comfyWorkflow = "{}"
|
10 |
|
11 |
if (request.segment.category === ClapSegmentCategory.STORYBOARD) {
|
12 |
+
comfyWorkflow = request.settings.comfyWorkflowForImage
|
13 |
} else if (request.segment.category === ClapSegmentCategory.VIDEO) {
|
14 |
comfyWorkflow = request.settings.comfyWorkflowForVideo
|
15 |
}
|
src/app/api/render/providers/falai/index.ts
CHANGED
@@ -48,6 +48,7 @@ export async function renderSegment(request: RenderRequest): Promise<ClapSegment
|
|
48 |
input: {
|
49 |
prompt: prompts.positivePrompt,
|
50 |
image_size: imageSize,
|
|
|
51 |
sync_mode: true,
|
52 |
enable_safety_checker: request.settings.censorNotForAllAudiencesContent
|
53 |
},
|
@@ -65,6 +66,8 @@ export async function renderSegment(request: RenderRequest): Promise<ClapSegment
|
|
65 |
prompt: prompts.positivePrompt,
|
66 |
image_size: imageSize,
|
67 |
sync_mode: true,
|
|
|
|
|
68 |
enable_safety_checker: request.settings.censorNotForAllAudiencesContent
|
69 |
},
|
70 |
}) as FalAiImageResponse
|
@@ -131,7 +134,7 @@ export async function renderSegment(request: RenderRequest): Promise<ClapSegment
|
|
131 |
} else if (
|
132 |
request.segment.category === ClapSegmentCategory.DIALOGUE
|
133 |
) {
|
134 |
-
const result = await fal.run(request.settings.
|
135 |
input: {
|
136 |
text: request.segment.prompt,
|
137 |
|
|
|
48 |
input: {
|
49 |
prompt: prompts.positivePrompt,
|
50 |
image_size: imageSize,
|
51 |
+
num_images: 1,
|
52 |
sync_mode: true,
|
53 |
enable_safety_checker: request.settings.censorNotForAllAudiencesContent
|
54 |
},
|
|
|
66 |
prompt: prompts.positivePrompt,
|
67 |
image_size: imageSize,
|
68 |
sync_mode: true,
|
69 |
+
num_inference_steps: 20,
|
70 |
+
num_images: 1,
|
71 |
enable_safety_checker: request.settings.censorNotForAllAudiencesContent
|
72 |
},
|
73 |
}) as FalAiImageResponse
|
|
|
134 |
} else if (
|
135 |
request.segment.category === ClapSegmentCategory.DIALOGUE
|
136 |
) {
|
137 |
+
const result = await fal.run(request.settings.falAiModelForVoice, {
|
138 |
input: {
|
139 |
text: request.segment.prompt,
|
140 |
|
src/app/api/render/route.ts
CHANGED
@@ -20,11 +20,11 @@ export async function POST(req: NextRequest) {
|
|
20 |
|
21 |
const provider =
|
22 |
request.segment.category === ClapSegmentCategory.STORYBOARD
|
23 |
-
? request.settings.
|
24 |
: request.segment.category === ClapSegmentCategory.VIDEO
|
25 |
? request.settings.videoProvider
|
26 |
: request.segment.category === ClapSegmentCategory.DIALOGUE
|
27 |
-
? request.settings.
|
28 |
: request.segment.category === ClapSegmentCategory.SOUND
|
29 |
? request.settings.soundProvider
|
30 |
: request.segment.category === ClapSegmentCategory.MUSIC
|
|
|
20 |
|
21 |
const provider =
|
22 |
request.segment.category === ClapSegmentCategory.STORYBOARD
|
23 |
+
? request.settings.imageProvider
|
24 |
: request.segment.category === ClapSegmentCategory.VIDEO
|
25 |
? request.settings.videoProvider
|
26 |
: request.segment.category === ClapSegmentCategory.DIALOGUE
|
27 |
+
? request.settings.voiceProvider
|
28 |
: request.segment.category === ClapSegmentCategory.SOUND
|
29 |
? request.settings.soundProvider
|
30 |
: request.segment.category === ClapSegmentCategory.MUSIC
|
src/components/core/timeline/index.tsx
CHANGED
@@ -51,11 +51,11 @@ export function Timeline() {
|
|
51 |
|
52 |
const isReady = useTimelineState(s => s.isReady)
|
53 |
|
54 |
-
const
|
55 |
-
const
|
56 |
useEffect(() => {
|
57 |
-
if (isReady)
|
58 |
-
}, [isReady,
|
59 |
|
60 |
const videoRenderingStrategy = useSettings(s => s.videoRenderingStrategy)
|
61 |
const setVideoRenderingStrategy = useTimelineState(s => s.setVideoRenderingStrategy)
|
|
|
51 |
|
52 |
const isReady = useTimelineState(s => s.isReady)
|
53 |
|
54 |
+
const imageRenderingStrategy = useSettings(s => s.imageRenderingStrategy)
|
55 |
+
const setImageRenderingStrategy = useTimelineState(s => s.setImageRenderingStrategy)
|
56 |
useEffect(() => {
|
57 |
+
if (isReady) setImageRenderingStrategy(imageRenderingStrategy)
|
58 |
+
}, [isReady, setImageRenderingStrategy, imageRenderingStrategy])
|
59 |
|
60 |
const videoRenderingStrategy = useSettings(s => s.videoRenderingStrategy)
|
61 |
const setVideoRenderingStrategy = useTimelineState(s => s.setVideoRenderingStrategy)
|
src/components/settings/assistant.tsx
CHANGED
@@ -3,7 +3,7 @@ import { useSettings } from "@/controllers/settings"
|
|
3 |
import { ComputeProvider } from "@/types"
|
4 |
|
5 |
import { FormSelect } from "../forms/FormSelect"
|
6 |
-
import { availableComputeProvidersForAssistant } from "./constants"
|
7 |
|
8 |
export function SettingsSectionAssistant() {
|
9 |
const assistantProvider = useSettings(s => s.assistantProvider)
|
@@ -17,18 +17,19 @@ export function SettingsSectionAssistant() {
|
|
17 |
label="Assistant provider"
|
18 |
selectedItemId={assistantProvider}
|
19 |
selectedItemLabel={
|
20 |
-
|
21 |
|| ComputeProvider.NONE
|
22 |
}
|
23 |
-
items={
|
24 |
id: provider,
|
25 |
-
label,
|
26 |
disabled: false,
|
27 |
-
value: provider
|
28 |
}))}
|
29 |
onSelect={setAssistantProvider}
|
30 |
horizontal
|
31 |
/>
|
|
|
32 |
</FormSection>
|
33 |
</div>
|
34 |
)
|
|
|
3 |
import { ComputeProvider } from "@/types"
|
4 |
|
5 |
import { FormSelect } from "../forms/FormSelect"
|
6 |
+
import { availableComputeProvidersForAssistant, computeProviderShortNames } from "./constants"
|
7 |
|
8 |
export function SettingsSectionAssistant() {
|
9 |
const assistantProvider = useSettings(s => s.assistantProvider)
|
|
|
17 |
label="Assistant provider"
|
18 |
selectedItemId={assistantProvider}
|
19 |
selectedItemLabel={
|
20 |
+
computeProviderShortNames[assistantProvider]
|
21 |
|| ComputeProvider.NONE
|
22 |
}
|
23 |
+
items={availableComputeProvidersForAssistant.map(provider => ({
|
24 |
id: provider,
|
25 |
+
label: computeProviderShortNames[provider] || "(missing name)",
|
26 |
disabled: false,
|
27 |
+
value: provider,
|
28 |
}))}
|
29 |
onSelect={setAssistantProvider}
|
30 |
horizontal
|
31 |
/>
|
32 |
+
|
33 |
</FormSection>
|
34 |
</div>
|
35 |
)
|
src/components/settings/constants.ts
CHANGED
@@ -1,73 +1,73 @@
|
|
1 |
import { ComfyIcuAccelerator, ComputeProvider } from "@/types"
|
2 |
|
3 |
-
export const availableComputeProviders = {
|
4 |
-
[ComputeProvider.NONE]: "No default provider",
|
5 |
-
[ComputeProvider.HUGGINGFACE]: "HuggingFace",
|
6 |
-
[ComputeProvider.REPLICATE]: "Replicate (Cog & ComfyUI)",
|
7 |
-
[ComputeProvider.COMFY_COMFYICU]: "Comfy.icu (ComfyUI workflow)",
|
8 |
-
[ComputeProvider.FALAI]: "Fal.ai",
|
9 |
-
[ComputeProvider.MODELSLAB]: "ModelsLab",
|
10 |
-
// [ComputeProvider.CUSTOM]: "Custom server",
|
11 |
-
}
|
12 |
|
13 |
-
export const
|
14 |
-
[ComputeProvider.NONE]: "
|
15 |
-
[ComputeProvider.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
[ComputeProvider.GROQ]: "Groq",
|
17 |
-
[ComputeProvider.OPENAI]: "OpenAI (ChatGPT)",
|
18 |
-
}
|
19 |
-
|
20 |
-
export const availableComputeProvidersForStoryboards = {
|
21 |
-
[ComputeProvider.NONE]: "No storyboard provider",
|
22 |
-
[ComputeProvider.HUGGINGFACE]: "HuggingFace",
|
23 |
-
[ComputeProvider.REPLICATE]: "Replicate (Cog API)",
|
24 |
-
[ComputeProvider.COMFY_REPLICATE]: "Replicate (Comfy API)",
|
25 |
-
[ComputeProvider.COMFY_COMFYICU]: "Comfy.icu (Comfy API)",
|
26 |
[ComputeProvider.FALAI]: "Fal.ai",
|
27 |
-
[ComputeProvider.MODELSLAB]: "ModelsLab
|
28 |
}
|
29 |
|
30 |
-
export const
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
[ComputeProvider.COMFY_COMFYICU]: "Comfy.icu (Comfy API)",
|
36 |
-
[ComputeProvider.FALAI]: "Fal.ai",
|
37 |
-
[ComputeProvider.MODELSLAB]: "ModelsLab.com",
|
38 |
-
}
|
39 |
|
40 |
-
export const
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
}
|
49 |
|
50 |
-
export const
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
|
59 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
|
61 |
-
export const
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
|
72 |
export const availableComfyIcuAccelerators = {
|
73 |
[ComfyIcuAccelerator.L4]: "L4",
|
@@ -76,4 +76,4 @@ export const availableComfyIcuAccelerators = {
|
|
76 |
[ComfyIcuAccelerator.A100_40GB]: "A100 (40 GB)",
|
77 |
[ComfyIcuAccelerator.A100_80GB]: "A100 (80 GB)",
|
78 |
[ComfyIcuAccelerator.H100]: "H100",
|
79 |
-
}
|
|
|
1 |
import { ComfyIcuAccelerator, ComputeProvider } from "@/types"
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
|
4 |
+
export const computeProviderShortNames = {
|
5 |
+
[ComputeProvider.NONE]: "None",
|
6 |
+
[ComputeProvider.CUSTOM]: "Custom API",
|
7 |
+
[ComputeProvider.HUGGINGFACE]: "Hugging Face",
|
8 |
+
[ComputeProvider.COMFY_HUGGINGFACE]: "Hugging Face Comfy",
|
9 |
+
[ComputeProvider.REPLICATE]: "Replicate",
|
10 |
+
[ComputeProvider.COMFY_REPLICATE]: "Replicate Comfy",
|
11 |
+
[ComputeProvider.COMFY_COMFYICU]: "Comfy.icu",
|
12 |
+
[ComputeProvider.ELEVENLABS]: "ElevenLabs",
|
13 |
+
[ComputeProvider.OPENAI]: "OpenAI",
|
14 |
+
[ComputeProvider.STABILITYAI]: "StabilityAI",
|
15 |
[ComputeProvider.GROQ]: "Groq",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
[ComputeProvider.FALAI]: "Fal.ai",
|
17 |
+
[ComputeProvider.MODELSLAB]: "ModelsLab"
|
18 |
}
|
19 |
|
20 |
+
export const availableComputeProvidersForAssistant = [
|
21 |
+
ComputeProvider.HUGGINGFACE,
|
22 |
+
ComputeProvider.GROQ,
|
23 |
+
ComputeProvider.OPENAI,
|
24 |
+
]
|
|
|
|
|
|
|
|
|
25 |
|
26 |
+
export const availableComputeProvidersForImages = [
|
27 |
+
ComputeProvider.HUGGINGFACE,
|
28 |
+
ComputeProvider.REPLICATE,
|
29 |
+
ComputeProvider.COMFY_REPLICATE,
|
30 |
+
ComputeProvider.COMFY_COMFYICU,
|
31 |
+
ComputeProvider.FALAI,
|
32 |
+
ComputeProvider.MODELSLAB,
|
33 |
+
]
|
|
|
34 |
|
35 |
+
export const availableComputeProvidersForVideos = [
|
36 |
+
ComputeProvider.HUGGINGFACE,
|
37 |
+
ComputeProvider.REPLICATE,
|
38 |
+
ComputeProvider.COMFY_REPLICATE,
|
39 |
+
ComputeProvider.COMFY_COMFYICU,
|
40 |
+
ComputeProvider.FALAI,
|
41 |
+
ComputeProvider.MODELSLAB,
|
42 |
+
]
|
43 |
|
44 |
+
export const availableComputeProvidersForMusic = [
|
45 |
+
ComputeProvider.HUGGINGFACE,
|
46 |
+
ComputeProvider.COMFY_REPLICATE,
|
47 |
+
ComputeProvider.COMFY_COMFYICU,
|
48 |
+
ComputeProvider.STABILITYAI,
|
49 |
+
ComputeProvider.FALAI,
|
50 |
+
ComputeProvider.MODELSLAB,
|
51 |
+
]
|
52 |
|
53 |
+
export const availableComputeProvidersForSound = [
|
54 |
+
ComputeProvider.HUGGINGFACE,
|
55 |
+
ComputeProvider.COMFY_REPLICATE,
|
56 |
+
ComputeProvider.COMFY_COMFYICU,
|
57 |
+
ComputeProvider.STABILITYAI,
|
58 |
+
ComputeProvider.FALAI,
|
59 |
+
ComputeProvider.ELEVENLABS,
|
60 |
+
]
|
61 |
+
|
62 |
+
export const availableComputeProvidersForVoice = [
|
63 |
+
ComputeProvider.ELEVENLABS,
|
64 |
+
ComputeProvider.STABILITYAI,
|
65 |
+
ComputeProvider.HUGGINGFACE,
|
66 |
+
ComputeProvider.COMFY_REPLICATE,
|
67 |
+
ComputeProvider.COMFY_COMFYICU,
|
68 |
+
ComputeProvider.FALAI,
|
69 |
+
ComputeProvider.MODELSLAB,
|
70 |
+
]
|
71 |
|
72 |
export const availableComfyIcuAccelerators = {
|
73 |
[ComfyIcuAccelerator.L4]: "L4",
|
|
|
76 |
[ComfyIcuAccelerator.A100_40GB]: "A100 (40 GB)",
|
77 |
[ComfyIcuAccelerator.A100_80GB]: "A100 (80 GB)",
|
78 |
[ComfyIcuAccelerator.H100]: "H100",
|
79 |
+
}
|
src/components/settings/{storyboard.tsx β image.tsx}
RENAMED
@@ -3,14 +3,14 @@ import { getDefaultSettingsState, useSettings } from "@/controllers/settings"
|
|
3 |
|
4 |
import { FormInput } from "../forms/FormInput"
|
5 |
import { ComputeProvider } from "@/types"
|
6 |
-
import {
|
7 |
import { FormSelect } from "../forms/FormSelect"
|
8 |
|
9 |
-
export function
|
10 |
const defaultSettings = getDefaultSettingsState()
|
11 |
|
12 |
-
const
|
13 |
-
const
|
14 |
|
15 |
const huggingFaceModelForImage = useSettings(s => s.huggingFaceModelForImage)
|
16 |
const setHuggingFaceModelForImage = useSettings(s => s.setHuggingFaceModelForImage)
|
@@ -24,101 +24,102 @@ export function SettingsSectionStoryboard() {
|
|
24 |
const modelsLabModelForImage = useSettings(s => s.modelsLabModelForImage)
|
25 |
const setModelsLabModelForImage = useSettings(s => s.setModelsLabModelForImage)
|
26 |
|
27 |
-
const
|
28 |
-
const
|
29 |
|
30 |
-
const
|
31 |
-
const
|
32 |
|
33 |
-
const
|
34 |
-
const
|
35 |
|
36 |
-
const
|
37 |
-
const
|
38 |
|
39 |
-
const
|
40 |
-
const
|
41 |
|
42 |
return (
|
43 |
<div className="flex flex-col space-y-6 justify-between">
|
44 |
-
<FormSection label="
|
45 |
|
|
|
46 |
<FormSelect<ComputeProvider>
|
47 |
-
label="
|
48 |
-
selectedItemId={
|
49 |
selectedItemLabel={
|
50 |
-
|
51 |
|| ComputeProvider.NONE
|
52 |
}
|
53 |
-
items={
|
54 |
id: provider,
|
55 |
-
label,
|
56 |
disabled: false,
|
57 |
-
value: provider
|
58 |
}))}
|
59 |
-
onSelect={
|
60 |
horizontal
|
61 |
/>
|
62 |
|
63 |
<FormInput
|
64 |
-
label="Number of
|
65 |
-
value={
|
66 |
-
defaultValue={defaultSettings.
|
67 |
-
onChange={
|
68 |
/>
|
69 |
|
70 |
<FormInput
|
71 |
label="Default prompt prefix"
|
72 |
-
value={
|
73 |
-
defaultValue={defaultSettings.
|
74 |
-
onChange={
|
75 |
/>
|
76 |
|
77 |
<FormInput
|
78 |
label="Default prompt suffix"
|
79 |
-
value={
|
80 |
-
defaultValue={defaultSettings.
|
81 |
-
onChange={
|
82 |
/>
|
83 |
|
84 |
<FormInput
|
85 |
label="Default negative prompt"
|
86 |
-
value={
|
87 |
-
defaultValue={defaultSettings.
|
88 |
-
onChange={
|
89 |
/>
|
90 |
|
91 |
-
{
|
92 |
? <>
|
93 |
<FormInput
|
94 |
-
label="Default Comfy workflow template for
|
95 |
-
value={
|
96 |
-
defaultValue={defaultSettings.
|
97 |
-
onChange={
|
98 |
/>
|
99 |
|
100 |
</>
|
101 |
: // "proprietary" parameters
|
102 |
<>
|
103 |
-
{
|
104 |
label="HF Model ID (must be compatible with the Inference API)"
|
105 |
value={huggingFaceModelForImage}
|
106 |
defaultValue={defaultSettings.huggingFaceModelForImage}
|
107 |
onChange={setHuggingFaceModelForImage}
|
108 |
/>}
|
109 |
-
{
|
110 |
label="Replicate.com model ID"
|
111 |
value={replicateModelForImage}
|
112 |
defaultValue={defaultSettings.replicateModelForImage}
|
113 |
onChange={setReplicateModelForImage}
|
114 |
/>}
|
115 |
-
{
|
116 |
label="Fal.ai model ID"
|
117 |
value={falAiModelForImage}
|
118 |
defaultValue={defaultSettings.falAiModelForImage}
|
119 |
onChange={setFalAiModelForImage}
|
120 |
/>}
|
121 |
-
{
|
122 |
label="ModelsLab.com model ID"
|
123 |
value={modelsLabModelForImage}
|
124 |
defaultValue={defaultSettings.modelsLabModelForImage}
|
|
|
3 |
|
4 |
import { FormInput } from "../forms/FormInput"
|
5 |
import { ComputeProvider } from "@/types"
|
6 |
+
import { availableComputeProvidersForImages, computeProviderShortNames } from "./constants"
|
7 |
import { FormSelect } from "../forms/FormSelect"
|
8 |
|
9 |
+
export function SettingsSectionImage() {
|
10 |
const defaultSettings = getDefaultSettingsState()
|
11 |
|
12 |
+
const imageProvider = useSettings(s => s.imageProvider)
|
13 |
+
const setImageProvider = useSettings(s => s.setImageProvider)
|
14 |
|
15 |
const huggingFaceModelForImage = useSettings(s => s.huggingFaceModelForImage)
|
16 |
const setHuggingFaceModelForImage = useSettings(s => s.setHuggingFaceModelForImage)
|
|
|
24 |
const modelsLabModelForImage = useSettings(s => s.modelsLabModelForImage)
|
25 |
const setModelsLabModelForImage = useSettings(s => s.setModelsLabModelForImage)
|
26 |
|
27 |
+
const imagePromptPrefix = useSettings(s => s.imagePromptPrefix)
|
28 |
+
const setImagePromptPrefix = useSettings(s => s.setImagePromptPrefix)
|
29 |
|
30 |
+
const imagePromptSuffix = useSettings(s => s.imagePromptSuffix)
|
31 |
+
const setImagePromptSuffix = useSettings(s => s.setImagePromptSuffix)
|
32 |
|
33 |
+
const imageNegativePrompt = useSettings(s => s.imageNegativePrompt)
|
34 |
+
const setImageNegativePrompt = useSettings(s => s.setImageNegativePrompt)
|
35 |
|
36 |
+
const maxImagesToGenerateInParallel = useSettings(s => s.maxImagesToGenerateInParallel)
|
37 |
+
const setMaxImagesToGenerateInParallel = useSettings(s => s.setMaxImagesToGenerateInParallel)
|
38 |
|
39 |
+
const comfyWorkflowForImage = useSettings(s => s.comfyWorkflowForImage)
|
40 |
+
const setComfyWorkflowForImage = useSettings(s => s.setComfyWorkflowForImage)
|
41 |
|
42 |
return (
|
43 |
<div className="flex flex-col space-y-6 justify-between">
|
44 |
+
<FormSection label="Image rendering">
|
45 |
|
46 |
+
|
47 |
<FormSelect<ComputeProvider>
|
48 |
+
label="Image provider"
|
49 |
+
selectedItemId={imageProvider}
|
50 |
selectedItemLabel={
|
51 |
+
computeProviderShortNames[imageProvider]
|
52 |
|| ComputeProvider.NONE
|
53 |
}
|
54 |
+
items={availableComputeProvidersForImages.map(provider => ({
|
55 |
id: provider,
|
56 |
+
label: computeProviderShortNames[provider] || "(missing name)",
|
57 |
disabled: false,
|
58 |
+
value: provider,
|
59 |
}))}
|
60 |
+
onSelect={setImageProvider}
|
61 |
horizontal
|
62 |
/>
|
63 |
|
64 |
<FormInput
|
65 |
+
label="Number of images to render in parallel (not used yet)"
|
66 |
+
value={maxImagesToGenerateInParallel}
|
67 |
+
defaultValue={defaultSettings.maxImagesToGenerateInParallel}
|
68 |
+
onChange={setMaxImagesToGenerateInParallel}
|
69 |
/>
|
70 |
|
71 |
<FormInput
|
72 |
label="Default prompt prefix"
|
73 |
+
value={imagePromptPrefix}
|
74 |
+
defaultValue={defaultSettings.imagePromptPrefix}
|
75 |
+
onChange={setImagePromptPrefix}
|
76 |
/>
|
77 |
|
78 |
<FormInput
|
79 |
label="Default prompt suffix"
|
80 |
+
value={imagePromptSuffix}
|
81 |
+
defaultValue={defaultSettings.imagePromptSuffix}
|
82 |
+
onChange={setImagePromptSuffix}
|
83 |
/>
|
84 |
|
85 |
<FormInput
|
86 |
label="Default negative prompt"
|
87 |
+
value={imageNegativePrompt}
|
88 |
+
defaultValue={defaultSettings.imageNegativePrompt}
|
89 |
+
onChange={setImageNegativePrompt}
|
90 |
/>
|
91 |
|
92 |
+
{imageProvider.startsWith("COMFY_")
|
93 |
? <>
|
94 |
<FormInput
|
95 |
+
label="Default Comfy workflow template for images"
|
96 |
+
value={comfyWorkflowForImage}
|
97 |
+
defaultValue={defaultSettings.comfyWorkflowForImage}
|
98 |
+
onChange={setComfyWorkflowForImage}
|
99 |
/>
|
100 |
|
101 |
</>
|
102 |
: // "proprietary" parameters
|
103 |
<>
|
104 |
+
{imageProvider === ComputeProvider.HUGGINGFACE && <FormInput
|
105 |
label="HF Model ID (must be compatible with the Inference API)"
|
106 |
value={huggingFaceModelForImage}
|
107 |
defaultValue={defaultSettings.huggingFaceModelForImage}
|
108 |
onChange={setHuggingFaceModelForImage}
|
109 |
/>}
|
110 |
+
{imageProvider === ComputeProvider.REPLICATE && <FormInput
|
111 |
label="Replicate.com model ID"
|
112 |
value={replicateModelForImage}
|
113 |
defaultValue={defaultSettings.replicateModelForImage}
|
114 |
onChange={setReplicateModelForImage}
|
115 |
/>}
|
116 |
+
{imageProvider === ComputeProvider.FALAI && <FormInput
|
117 |
label="Fal.ai model ID"
|
118 |
value={falAiModelForImage}
|
119 |
defaultValue={defaultSettings.falAiModelForImage}
|
120 |
onChange={setFalAiModelForImage}
|
121 |
/>}
|
122 |
+
{imageProvider === ComputeProvider.MODELSLAB && <FormInput
|
123 |
label="ModelsLab.com model ID"
|
124 |
value={modelsLabModelForImage}
|
125 |
defaultValue={defaultSettings.modelsLabModelForImage}
|
src/components/settings/index.tsx
CHANGED
@@ -8,11 +8,11 @@ import { useUI } from "@/controllers/ui"
|
|
8 |
|
9 |
import { SettingsSectionProvider } from "./provider"
|
10 |
import { SettingsSectionAssistant } from "./assistant"
|
11 |
-
import {
|
12 |
import { SettingsSectionVideo } from "./video"
|
13 |
import { SettingsSectionSound } from "./sound"
|
14 |
import { SettingsSectionMusic } from "./music"
|
15 |
-
import {
|
16 |
|
17 |
export function SettingsDialog() {
|
18 |
|
@@ -23,9 +23,9 @@ export function SettingsDialog() {
|
|
23 |
const panels = {
|
24 |
provider: <SettingsSectionProvider />,
|
25 |
assistant: <SettingsSectionAssistant />,
|
26 |
-
|
27 |
video: <SettingsSectionVideo />,
|
28 |
-
|
29 |
music: <SettingsSectionMusic />,
|
30 |
sound: <SettingsSectionSound />,
|
31 |
}
|
@@ -33,9 +33,9 @@ export function SettingsDialog() {
|
|
33 |
const panelLabels = {
|
34 |
provider: "Providers",
|
35 |
assistant: "Assistant",
|
36 |
-
|
37 |
video: "Video",
|
38 |
-
|
39 |
music: "Music",
|
40 |
sound: "Sound",
|
41 |
} as any
|
|
|
8 |
|
9 |
import { SettingsSectionProvider } from "./provider"
|
10 |
import { SettingsSectionAssistant } from "./assistant"
|
11 |
+
import { SettingsSectionImage } from "./image"
|
12 |
import { SettingsSectionVideo } from "./video"
|
13 |
import { SettingsSectionSound } from "./sound"
|
14 |
import { SettingsSectionMusic } from "./music"
|
15 |
+
import { SettingsSectionVoice } from "./voice"
|
16 |
|
17 |
export function SettingsDialog() {
|
18 |
|
|
|
23 |
const panels = {
|
24 |
provider: <SettingsSectionProvider />,
|
25 |
assistant: <SettingsSectionAssistant />,
|
26 |
+
image: <SettingsSectionImage />,
|
27 |
video: <SettingsSectionVideo />,
|
28 |
+
voice: <SettingsSectionVoice />,
|
29 |
music: <SettingsSectionMusic />,
|
30 |
sound: <SettingsSectionSound />,
|
31 |
}
|
|
|
33 |
const panelLabels = {
|
34 |
provider: "Providers",
|
35 |
assistant: "Assistant",
|
36 |
+
image: "Image",
|
37 |
video: "Video",
|
38 |
+
voice: "Voice",
|
39 |
music: "Music",
|
40 |
sound: "Sound",
|
41 |
} as any
|
src/components/settings/music.tsx
CHANGED
@@ -3,7 +3,7 @@ import { getDefaultSettingsState, useSettings } from "@/controllers/settings"
|
|
3 |
import { ComputeProvider } from "@/types"
|
4 |
|
5 |
import { FormSelect } from "../forms/FormSelect"
|
6 |
-
import { availableComputeProvidersForMusic } from "./constants"
|
7 |
import { FormInput } from "../forms/FormInput"
|
8 |
|
9 |
export function SettingsSectionMusic() {
|
@@ -35,14 +35,14 @@ export function SettingsSectionMusic() {
|
|
35 |
label="Music provider"
|
36 |
selectedItemId={musicProvider}
|
37 |
selectedItemLabel={
|
38 |
-
|
39 |
|| ComputeProvider.NONE
|
40 |
}
|
41 |
-
items={
|
42 |
id: provider,
|
43 |
-
label,
|
44 |
disabled: false,
|
45 |
-
value: provider
|
46 |
}))}
|
47 |
onSelect={setMusicProvider}
|
48 |
horizontal
|
|
|
3 |
import { ComputeProvider } from "@/types"
|
4 |
|
5 |
import { FormSelect } from "../forms/FormSelect"
|
6 |
+
import { availableComputeProvidersForMusic, computeProviderShortNames } from "./constants"
|
7 |
import { FormInput } from "../forms/FormInput"
|
8 |
|
9 |
export function SettingsSectionMusic() {
|
|
|
35 |
label="Music provider"
|
36 |
selectedItemId={musicProvider}
|
37 |
selectedItemLabel={
|
38 |
+
computeProviderShortNames[musicProvider]
|
39 |
|| ComputeProvider.NONE
|
40 |
}
|
41 |
+
items={availableComputeProvidersForMusic.map(provider => ({
|
42 |
id: provider,
|
43 |
+
label: computeProviderShortNames[provider] || "(missing name)",
|
44 |
disabled: false,
|
45 |
+
value: provider,
|
46 |
}))}
|
47 |
onSelect={setMusicProvider}
|
48 |
horizontal
|
src/components/settings/sound.tsx
CHANGED
@@ -3,7 +3,7 @@ import { getDefaultSettingsState, useSettings } from "@/controllers/settings"
|
|
3 |
import { ComputeProvider } from "@/types"
|
4 |
|
5 |
import { FormSelect } from "../forms/FormSelect"
|
6 |
-
import { availableComputeProvidersForSound } from "./constants"
|
7 |
import { FormInput } from "../forms/FormInput"
|
8 |
|
9 |
export function SettingsSectionSound() {
|
@@ -35,14 +35,14 @@ export function SettingsSectionSound() {
|
|
35 |
label="Sound provider"
|
36 |
selectedItemId={soundProvider}
|
37 |
selectedItemLabel={
|
38 |
-
|
39 |
|| ComputeProvider.NONE
|
40 |
}
|
41 |
-
items={
|
42 |
id: provider,
|
43 |
-
label,
|
44 |
disabled: false,
|
45 |
-
value: provider
|
46 |
}))}
|
47 |
onSelect={setSoundProvider}
|
48 |
horizontal
|
|
|
3 |
import { ComputeProvider } from "@/types"
|
4 |
|
5 |
import { FormSelect } from "../forms/FormSelect"
|
6 |
+
import { availableComputeProvidersForSound, computeProviderShortNames } from "./constants"
|
7 |
import { FormInput } from "../forms/FormInput"
|
8 |
|
9 |
export function SettingsSectionSound() {
|
|
|
35 |
label="Sound provider"
|
36 |
selectedItemId={soundProvider}
|
37 |
selectedItemLabel={
|
38 |
+
computeProviderShortNames[soundProvider]
|
39 |
|| ComputeProvider.NONE
|
40 |
}
|
41 |
+
items={availableComputeProvidersForSound.map(provider => ({
|
42 |
id: provider,
|
43 |
+
label: computeProviderShortNames[soundProvider] || "(missing name)",
|
44 |
disabled: false,
|
45 |
+
value: provider,
|
46 |
}))}
|
47 |
onSelect={setSoundProvider}
|
48 |
horizontal
|
src/components/settings/speech.tsx
DELETED
@@ -1,87 +0,0 @@
|
|
1 |
-
import { FormSection } from "@/components/forms/FormSection"
|
2 |
-
import { getDefaultSettingsState, useSettings } from "@/controllers/settings"
|
3 |
-
import { ComputeProvider } from "@/types"
|
4 |
-
|
5 |
-
import { FormSelect } from "../forms/FormSelect"
|
6 |
-
import { availableComputeProvidersForSpeech } from "./constants"
|
7 |
-
import { FormInput } from "../forms/FormInput"
|
8 |
-
|
9 |
-
export function SettingsSectionSpeech() {
|
10 |
-
const defaultSettings = getDefaultSettingsState()
|
11 |
-
|
12 |
-
const speechProvider = useSettings(s => s.speechProvider)
|
13 |
-
const setSpeechProvider = useSettings(s => s.setSpeechProvider)
|
14 |
-
|
15 |
-
const huggingFaceModelForSpeech = useSettings(s => s.huggingFaceModelForSpeech)
|
16 |
-
const setHuggingFaceModelForSpeech = useSettings(s => s.setHuggingFaceModelForSpeech)
|
17 |
-
|
18 |
-
const replicateModelForSpeech = useSettings(s => s.replicateModelForSpeech)
|
19 |
-
const setReplicateModelForSpeech = useSettings(s => s.setReplicateModelForSpeech)
|
20 |
-
|
21 |
-
const falAiModelForSpeech = useSettings(s => s.falAiModelForSpeech)
|
22 |
-
const setFalAiModelForSpeech = useSettings(s => s.setFalAiModelForSpeech)
|
23 |
-
|
24 |
-
const modelsLabModelForSpeech = useSettings(s => s.modelsLabModelForSpeech)
|
25 |
-
const setModelsLabModelForSpeech = useSettings(s => s.setModelsLabModelForSpeech)
|
26 |
-
|
27 |
-
const comfyWorkflowForSpeech = useSettings(s => s.comfyWorkflowForSpeech)
|
28 |
-
const setComfyWorkflowForSpeech = useSettings(s => s.setComfyWorkflowForSpeech)
|
29 |
-
|
30 |
-
return (
|
31 |
-
<div className="flex flex-col space-y-6 justify-between">
|
32 |
-
<FormSection label="Speech rendering">
|
33 |
-
|
34 |
-
<FormSelect<ComputeProvider>
|
35 |
-
label="Speech provider"
|
36 |
-
selectedItemId={speechProvider}
|
37 |
-
selectedItemLabel={
|
38 |
-
(availableComputeProvidersForSpeech as any)[speechProvider]
|
39 |
-
|| ComputeProvider.NONE
|
40 |
-
}
|
41 |
-
items={Object.entries(availableComputeProvidersForSpeech).map(([provider, label]) => ({
|
42 |
-
id: provider,
|
43 |
-
label,
|
44 |
-
disabled: false,
|
45 |
-
value: provider as ComputeProvider,
|
46 |
-
}))}
|
47 |
-
onSelect={setSpeechProvider}
|
48 |
-
horizontal
|
49 |
-
/>
|
50 |
-
{speechProvider.startsWith("COMFY_")
|
51 |
-
? <FormInput
|
52 |
-
label="Default Comfy workflow template for speech"
|
53 |
-
value={comfyWorkflowForSpeech}
|
54 |
-
defaultValue={defaultSettings.comfyWorkflowForSpeech}
|
55 |
-
onChange={setComfyWorkflowForSpeech}
|
56 |
-
/>
|
57 |
-
: // "proprietary" parameters
|
58 |
-
<>
|
59 |
-
{speechProvider === ComputeProvider.HUGGINGFACE && <FormInput
|
60 |
-
label="HF Model ID (must be compatible with the Inference API)"
|
61 |
-
value={huggingFaceModelForSpeech}
|
62 |
-
defaultValue={defaultSettings.huggingFaceModelForSpeech}
|
63 |
-
onChange={setHuggingFaceModelForSpeech}
|
64 |
-
/>}
|
65 |
-
{speechProvider === ComputeProvider.REPLICATE && <FormInput
|
66 |
-
label="Replicate.com model ID"
|
67 |
-
value={replicateModelForSpeech}
|
68 |
-
defaultValue={defaultSettings.replicateModelForSpeech}
|
69 |
-
onChange={setReplicateModelForSpeech}
|
70 |
-
/>}
|
71 |
-
{speechProvider === ComputeProvider.FALAI && <FormInput
|
72 |
-
label="Fal.ai model ID"
|
73 |
-
value={falAiModelForSpeech}
|
74 |
-
defaultValue={defaultSettings.falAiModelForSpeech}
|
75 |
-
onChange={setFalAiModelForSpeech}
|
76 |
-
/>}
|
77 |
-
{speechProvider === ComputeProvider.MODELSLAB && <FormInput
|
78 |
-
label="ModelsLab.com model ID"
|
79 |
-
value={modelsLabModelForSpeech}
|
80 |
-
defaultValue={defaultSettings.modelsLabModelForSpeech}
|
81 |
-
onChange={setModelsLabModelForSpeech}
|
82 |
-
/>}
|
83 |
-
</>}
|
84 |
-
</FormSection>
|
85 |
-
</div>
|
86 |
-
)
|
87 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/components/settings/video.tsx
CHANGED
@@ -4,7 +4,7 @@ import { FormSelect } from "../forms/FormSelect"
|
|
4 |
import { ComputeProvider } from "@/types"
|
5 |
import { FormInput } from "../forms/FormInput"
|
6 |
import { APP_NAME } from "@/lib/core/constants"
|
7 |
-
import { availableComputeProvidersForVideos } from "./constants"
|
8 |
|
9 |
export function SettingsSectionVideo() {
|
10 |
const defaultSettings = getDefaultSettingsState()
|
@@ -51,14 +51,14 @@ export function SettingsSectionVideo() {
|
|
51 |
label="Video provider"
|
52 |
selectedItemId={videoProvider}
|
53 |
selectedItemLabel={
|
54 |
-
|
55 |
|| ComputeProvider.NONE
|
56 |
}
|
57 |
-
items={
|
58 |
id: provider,
|
59 |
-
label,
|
60 |
disabled: false,
|
61 |
-
value: provider
|
62 |
}))}
|
63 |
onSelect={setVideoProvider}
|
64 |
horizontal
|
|
|
4 |
import { ComputeProvider } from "@/types"
|
5 |
import { FormInput } from "../forms/FormInput"
|
6 |
import { APP_NAME } from "@/lib/core/constants"
|
7 |
+
import { availableComputeProvidersForVideos, computeProviderShortNames } from "./constants"
|
8 |
|
9 |
export function SettingsSectionVideo() {
|
10 |
const defaultSettings = getDefaultSettingsState()
|
|
|
51 |
label="Video provider"
|
52 |
selectedItemId={videoProvider}
|
53 |
selectedItemLabel={
|
54 |
+
computeProviderShortNames[videoProvider]
|
55 |
|| ComputeProvider.NONE
|
56 |
}
|
57 |
+
items={availableComputeProvidersForVideos.map(provider => ({
|
58 |
id: provider,
|
59 |
+
label: computeProviderShortNames[provider] || "(missing name)",
|
60 |
disabled: false,
|
61 |
+
value: provider,
|
62 |
}))}
|
63 |
onSelect={setVideoProvider}
|
64 |
horizontal
|
src/components/settings/voice.tsx
ADDED
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { FormSection } from "@/components/forms/FormSection"
|
2 |
+
import { getDefaultSettingsState, useSettings } from "@/controllers/settings"
|
3 |
+
import { ComputeProvider } from "@/types"
|
4 |
+
|
5 |
+
import { FormSelect } from "../forms/FormSelect"
|
6 |
+
import { availableComputeProvidersForVoice, computeProviderShortNames } from "./constants"
|
7 |
+
import { FormInput } from "../forms/FormInput"
|
8 |
+
|
9 |
+
export function SettingsSectionVoice() {
|
10 |
+
const defaultSettings = getDefaultSettingsState()
|
11 |
+
|
12 |
+
const voiceProvider = useSettings(s => s.voiceProvider)
|
13 |
+
const setVoiceProvider = useSettings(s => s.setVoiceProvider)
|
14 |
+
|
15 |
+
const huggingFaceModelForVoice = useSettings(s => s.huggingFaceModelForVoice)
|
16 |
+
const setHuggingFaceModelForVoice = useSettings(s => s.setHuggingFaceModelForVoice)
|
17 |
+
|
18 |
+
const replicateModelForVoice = useSettings(s => s.replicateModelForVoice)
|
19 |
+
const setReplicateModelForVoice = useSettings(s => s.setReplicateModelForVoice)
|
20 |
+
|
21 |
+
const falAiModelForVoice = useSettings(s => s.falAiModelForVoice)
|
22 |
+
const setFalAiModelForVoice = useSettings(s => s.setFalAiModelForVoice)
|
23 |
+
|
24 |
+
const modelsLabModelForVoice = useSettings(s => s.modelsLabModelForVoice)
|
25 |
+
const setModelsLabModelForVoice = useSettings(s => s.setModelsLabModelForVoice)
|
26 |
+
|
27 |
+
const comfyWorkflowForVoice = useSettings(s => s.comfyWorkflowForVoice)
|
28 |
+
const setComfyWorkflowForVoice = useSettings(s => s.setComfyWorkflowForVoice)
|
29 |
+
|
30 |
+
return (
|
31 |
+
<div className="flex flex-col space-y-6 justify-between">
|
32 |
+
<FormSection label="Voice rendering">
|
33 |
+
|
34 |
+
<FormSelect<ComputeProvider>
|
35 |
+
label="Voice provider"
|
36 |
+
selectedItemId={voiceProvider}
|
37 |
+
selectedItemLabel={
|
38 |
+
computeProviderShortNames[voiceProvider]
|
39 |
+
|| ComputeProvider.NONE
|
40 |
+
}
|
41 |
+
items={availableComputeProvidersForVoice.map(provider => ({
|
42 |
+
id: provider,
|
43 |
+
label: computeProviderShortNames[provider] || "(missing name)",
|
44 |
+
disabled: false,
|
45 |
+
value: provider,
|
46 |
+
}))}
|
47 |
+
onSelect={setVoiceProvider}
|
48 |
+
horizontal
|
49 |
+
/>
|
50 |
+
{voiceProvider.startsWith("COMFY_")
|
51 |
+
? <FormInput
|
52 |
+
label="Default Comfy workflow template for voice"
|
53 |
+
value={comfyWorkflowForVoice}
|
54 |
+
defaultValue={defaultSettings.comfyWorkflowForVoice}
|
55 |
+
onChange={setComfyWorkflowForVoice}
|
56 |
+
/>
|
57 |
+
: // "proprietary" parameters
|
58 |
+
<>
|
59 |
+
{voiceProvider === ComputeProvider.HUGGINGFACE && <FormInput
|
60 |
+
label="HF Model ID (must be compatible with the Inference API)"
|
61 |
+
value={huggingFaceModelForVoice}
|
62 |
+
defaultValue={defaultSettings.huggingFaceModelForVoice}
|
63 |
+
onChange={setHuggingFaceModelForVoice}
|
64 |
+
/>}
|
65 |
+
{voiceProvider === ComputeProvider.REPLICATE && <FormInput
|
66 |
+
label="Replicate.com model ID"
|
67 |
+
value={replicateModelForVoice}
|
68 |
+
defaultValue={defaultSettings.replicateModelForVoice}
|
69 |
+
onChange={setReplicateModelForVoice}
|
70 |
+
/>}
|
71 |
+
{voiceProvider === ComputeProvider.FALAI && <FormInput
|
72 |
+
label="Fal.ai model ID"
|
73 |
+
value={falAiModelForVoice}
|
74 |
+
defaultValue={defaultSettings.falAiModelForVoice}
|
75 |
+
onChange={setFalAiModelForVoice}
|
76 |
+
/>}
|
77 |
+
{voiceProvider === ComputeProvider.MODELSLAB && <FormInput
|
78 |
+
label="ModelsLab.com model ID"
|
79 |
+
value={modelsLabModelForVoice}
|
80 |
+
defaultValue={defaultSettings.modelsLabModelForVoice}
|
81 |
+
onChange={setModelsLabModelForVoice}
|
82 |
+
/>}
|
83 |
+
</>}
|
84 |
+
</FormSection>
|
85 |
+
</div>
|
86 |
+
)
|
87 |
+
}
|
src/components/tags/Tag.tsx
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"use client"
|
2 |
+
|
3 |
+
import { ReactNode } from "react"
|
4 |
+
|
5 |
+
import { cn } from "@/lib/utils"
|
6 |
+
|
7 |
+
import { TagCategory, TagColor } from "./types"
|
8 |
+
import { tagCategoryToTagColor, tagColorToTailwindClass } from "./colors"
|
9 |
+
|
10 |
+
// a semi generic Tag components,
|
11 |
+
// to color code various things
|
12 |
+
export function Tag({
|
13 |
+
children,
|
14 |
+
color: maybeColor,
|
15 |
+
tag: maybeTag,
|
16 |
+
size = 'base'
|
17 |
+
}: {
|
18 |
+
children?: ReactNode
|
19 |
+
color?: TagColor
|
20 |
+
tag?: TagCategory
|
21 |
+
size?: 'xs' | 'sm' | 'base' | 'lg' | 'xl'
|
22 |
+
}) {
|
23 |
+
const tag: TagCategory = maybeTag ? maybeTag : TagCategory.MISC
|
24 |
+
const color: TagColor = maybeColor ? maybeColor : (tagCategoryToTagColor[tag] || TagColor.STONE)
|
25 |
+
const tailwindClasses: string = tagColorToTailwindClass[color] || ""
|
26 |
+
|
27 |
+
return (
|
28 |
+
<span className={cn(`
|
29 |
+
flex pt-[2px] pb-[3px] px-1
|
30 |
+
items-center justify-center
|
31 |
+
border
|
32 |
+
text-xs
|
33 |
+
rounded
|
34 |
+
mr-2
|
35 |
+
`,
|
36 |
+
tailwindClasses,
|
37 |
+
{
|
38 |
+
'w-12': size === 'xs',
|
39 |
+
'w-14': size === 'sm',
|
40 |
+
'w-20': size === 'base',
|
41 |
+
'w-24': size === 'lg',
|
42 |
+
'w-26': size === 'xl',
|
43 |
+
}
|
44 |
+
)}>{
|
45 |
+
children
|
46 |
+
}</span>
|
47 |
+
)
|
48 |
+
}
|
src/components/tags/colors.ts
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { TagCategory, TagColor } from "./types"
|
2 |
+
|
3 |
+
export const tagCategoryToTagColor: Record<TagCategory, TagColor> = {
|
4 |
+
[TagCategory.MISC]: TagColor.STONE,
|
5 |
+
[TagCategory.IMAGE]: TagColor.SKY,
|
6 |
+
[TagCategory.VIDEO]: TagColor.VIOLET,
|
7 |
+
[TagCategory.VOICE]: TagColor.ORANGE,
|
8 |
+
[TagCategory.SOUND]: TagColor.YELLOW,
|
9 |
+
[TagCategory.MUSIC]: TagColor.GREEN,
|
10 |
+
}
|
11 |
+
|
12 |
+
export const tagColorToTailwindClass: Record<TagColor, string> = {
|
13 |
+
[TagColor.SLATE]: `bg-slate-800 border-slate-600 text-slate-300`,
|
14 |
+
[TagColor.GRAY]: `bg-gray-800 border-gray-600 text-gray-300`,
|
15 |
+
[TagColor.ZINC]: `bg-zinc-800 border-zinc-600 text-zinc-300`,
|
16 |
+
[TagColor.NEUTRAL]: `bg-neutral-800 border-neutral-600 text-neutral-300`,
|
17 |
+
[TagColor.STONE]: `bg-stone-800 border-stone-600 text-stone-300`,
|
18 |
+
[TagColor.RED]: `bg-red-800 border-red-600 text-red-300`,
|
19 |
+
[TagColor.ORANGE]: `bg-orange-800 border-orange-600 text-orange-300`,
|
20 |
+
[TagColor.AMBER]: `bg-amber-800 border-amber-600 text-amber-300`,
|
21 |
+
[TagColor.YELLOW]: `bg-yellow-800 border-yellow-600 text-yellow-300`,
|
22 |
+
[TagColor.LIME]: `bg-lime-800 border-lime-600 text-lime-300`,
|
23 |
+
[TagColor.GREEN]: `bg-green-800 border-green-600 text-green-300`,
|
24 |
+
[TagColor.EMERALD]: `bg-emerald-800 border-emerald-600 text-emerald-300`,
|
25 |
+
[TagColor.TEAL]: `bg-teal-800 border-teal-600 text-teal-300`,
|
26 |
+
[TagColor.CYAN]: `bg-cyan-800 border-cyan-600 text-cyan-300`,
|
27 |
+
[TagColor.SKY]: `bg-sky-800 border-sky-600 text-sky-300`,
|
28 |
+
[TagColor.BLUE]: `bg-blue-800 border-blue-600 text-blue-300`,
|
29 |
+
[TagColor.INDIGO]: `bg-indigo-800 border-indigo-600 text-indigo-300`,
|
30 |
+
[TagColor.VIOLET]: `bg-violet-800 border-violet-600 text-violet-300`,
|
31 |
+
[TagColor.FUCHSIA]: `bg-fuchsia-800 border-fuchsia-600 text-fuchsia-300`,
|
32 |
+
[TagColor.PINK]: `bg-pink-800 border-pink-600 text-pink-300`,
|
33 |
+
[TagColor.ROSE]: `bg-rose-800 border-rose-600 text-rose-300`
|
34 |
+
}
|
src/components/tags/types.ts
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
export enum TagCategory {
|
2 |
+
MISC = "MISC",
|
3 |
+
IMAGE = "IMAGE",
|
4 |
+
VIDEO = "VIDEO",
|
5 |
+
|
6 |
+
// I think one day it will be unified,
|
7 |
+
// we will have one super model that can do all "AUDIO"
|
8 |
+
// but today we aren't there (eg. Stable Audio cannot do voice properly)
|
9 |
+
|
10 |
+
VOICE = "VOICE",
|
11 |
+
SOUND = "SOUND",
|
12 |
+
MUSIC = "MUSIC"
|
13 |
+
}
|
14 |
+
|
15 |
+
export enum TagColor {
|
16 |
+
SLATE = "SLATE",
|
17 |
+
GRAY = "GRAY",
|
18 |
+
ZINC = "ZINC",
|
19 |
+
NEUTRAL = "NEUTRAL",
|
20 |
+
STONE = "STONE",
|
21 |
+
RED = "RED",
|
22 |
+
ORANGE = "ORANGE",
|
23 |
+
AMBER = "AMBER",
|
24 |
+
YELLOW = "YELLOW",
|
25 |
+
LIME = "LIME",
|
26 |
+
GREEN = "GREEN",
|
27 |
+
EMERALD = "EMERALD",
|
28 |
+
TEAL = "TEAL",
|
29 |
+
CYAN = "CYAN",
|
30 |
+
SKY = "SKY",
|
31 |
+
BLUE = "BLUE",
|
32 |
+
INDIGO = "INDIGO",
|
33 |
+
VIOLET = "VIOLET",
|
34 |
+
FUCHSIA = "FUCHSIA",
|
35 |
+
PINK = "PINK",
|
36 |
+
ROSE = "ROSE",
|
37 |
+
}
|
src/components/toolbars/top-menu/ModelList.tsx
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"use client"
|
2 |
+
|
3 |
+
import {
|
4 |
+
MenubarCheckboxItem,
|
5 |
+
MenubarContent,
|
6 |
+
MenubarItem,
|
7 |
+
MenubarMenu,
|
8 |
+
MenubarSeparator,
|
9 |
+
MenubarSub,
|
10 |
+
MenubarSubContent,
|
11 |
+
MenubarSubTrigger,
|
12 |
+
} from "@/components/ui/menubar"
|
13 |
+
|
14 |
+
import { TagColor } from "@/components/tags/types"
|
15 |
+
import { Tag } from "@/components/tags/Tag"
|
16 |
+
|
17 |
+
|
18 |
+
export function ModelList({
|
19 |
+
models = [],
|
20 |
+
current,
|
21 |
+
setter,
|
22 |
+
}: {
|
23 |
+
models?: string[]
|
24 |
+
current?: string
|
25 |
+
setter: (model: string) => void
|
26 |
+
}) {
|
27 |
+
return (
|
28 |
+
<MenubarSub>
|
29 |
+
<MenubarSubTrigger>
|
30 |
+
<Tag size="lg" color={TagColor.ZINC}>ai model</Tag>
|
31 |
+
{current || "None"}
|
32 |
+
</MenubarSubTrigger>
|
33 |
+
<MenubarSubContent>
|
34 |
+
{models.map(model => (
|
35 |
+
<MenubarCheckboxItem
|
36 |
+
key={model}
|
37 |
+
checked={current === model}
|
38 |
+
onClick={(e) => {
|
39 |
+
setter(model)
|
40 |
+
e.stopPropagation()
|
41 |
+
e.preventDefault()
|
42 |
+
return false
|
43 |
+
}}>
|
44 |
+
{model}
|
45 |
+
</MenubarCheckboxItem>
|
46 |
+
))}
|
47 |
+
</MenubarSubContent>
|
48 |
+
</MenubarSub>
|
49 |
+
)
|
50 |
+
}
|
src/components/toolbars/top-menu/ProviderList.tsx
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"use client"
|
2 |
+
|
3 |
+
import {
|
4 |
+
MenubarCheckboxItem,
|
5 |
+
MenubarContent,
|
6 |
+
MenubarItem,
|
7 |
+
MenubarMenu,
|
8 |
+
MenubarSeparator,
|
9 |
+
MenubarSub,
|
10 |
+
MenubarSubContent,
|
11 |
+
MenubarSubTrigger,
|
12 |
+
} from "@/components/ui/menubar"
|
13 |
+
|
14 |
+
import { computeProviderShortNames } from "@/components/settings/constants"
|
15 |
+
|
16 |
+
import { ComputeProvider } from "@/types"
|
17 |
+
import { TagColor } from "@/components/tags/types"
|
18 |
+
import { Tag } from "@/components/tags/Tag"
|
19 |
+
|
20 |
+
const defaultProviders: ComputeProvider[] = Object.keys(computeProviderShortNames) as ComputeProvider[]
|
21 |
+
|
22 |
+
export function ProviderList({
|
23 |
+
providers = defaultProviders,
|
24 |
+
current,
|
25 |
+
setter,
|
26 |
+
}: {
|
27 |
+
providers?: ComputeProvider[]
|
28 |
+
current?: ComputeProvider
|
29 |
+
setter: (provider: ComputeProvider) => void
|
30 |
+
}) {
|
31 |
+
return (
|
32 |
+
<MenubarSub>
|
33 |
+
<MenubarSubTrigger>
|
34 |
+
<Tag size="lg" color={TagColor.GRAY}>cloud vendor</Tag>
|
35 |
+
{(computeProviderShortNames as any)[current || ""] || "None"}
|
36 |
+
</MenubarSubTrigger>
|
37 |
+
<MenubarSubContent>
|
38 |
+
{providers.map(provider => (
|
39 |
+
<MenubarCheckboxItem
|
40 |
+
key={provider}
|
41 |
+
checked={current === provider}
|
42 |
+
onClick={(e) => {
|
43 |
+
setter(provider)
|
44 |
+
e.stopPropagation()
|
45 |
+
e.preventDefault()
|
46 |
+
return false
|
47 |
+
}}>
|
48 |
+
{computeProviderShortNames[provider]}
|
49 |
+
</MenubarCheckboxItem>
|
50 |
+
))}
|
51 |
+
</MenubarSubContent>
|
52 |
+
</MenubarSub>
|
53 |
+
)
|
54 |
+
}
|
src/components/toolbars/top-menu/RenderingStrategyList.tsx
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"use client"
|
2 |
+
|
3 |
+
import {
|
4 |
+
MenubarCheckboxItem,
|
5 |
+
MenubarContent,
|
6 |
+
MenubarItem,
|
7 |
+
MenubarMenu,
|
8 |
+
MenubarSeparator,
|
9 |
+
MenubarSub,
|
10 |
+
MenubarSubContent,
|
11 |
+
MenubarSubTrigger,
|
12 |
+
} from "@/components/ui/menubar"
|
13 |
+
|
14 |
+
import { RenderingStrategy } from "@aitube/timeline"
|
15 |
+
import { strategyLabels } from "./constants"
|
16 |
+
import { Tag } from "@/components/tags/Tag"
|
17 |
+
import { TagColor } from "@/components/tags/types"
|
18 |
+
|
19 |
+
const defaultStrategies: RenderingStrategy[] = Object.keys(strategyLabels) as RenderingStrategy[]
|
20 |
+
|
21 |
+
export function RenderingStrategyList({
|
22 |
+
strategies = defaultStrategies,
|
23 |
+
current,
|
24 |
+
setter,
|
25 |
+
}: {
|
26 |
+
strategies?: RenderingStrategy[]
|
27 |
+
current?: RenderingStrategy
|
28 |
+
setter: (strategy: RenderingStrategy) => void
|
29 |
+
}) {
|
30 |
+
return (
|
31 |
+
<MenubarSub>
|
32 |
+
<MenubarSubTrigger>
|
33 |
+
{/* todo display either autorender or manual render */}
|
34 |
+
<Tag size="lg" color={TagColor.NEUTRAL}>auto render</Tag>
|
35 |
+
{(strategyLabels as any)[current || ""] || "None"}
|
36 |
+
</MenubarSubTrigger>
|
37 |
+
<MenubarSubContent>
|
38 |
+
{strategies.map(strategy => (
|
39 |
+
<MenubarCheckboxItem
|
40 |
+
key={strategy}
|
41 |
+
checked={current === strategy}
|
42 |
+
onClick={(e) => {
|
43 |
+
setter(strategy)
|
44 |
+
e.stopPropagation()
|
45 |
+
e.preventDefault()
|
46 |
+
return false
|
47 |
+
}}>
|
48 |
+
{strategyLabels[strategy]}
|
49 |
+
</MenubarCheckboxItem>
|
50 |
+
))}
|
51 |
+
</MenubarSubContent>
|
52 |
+
</MenubarSub>
|
53 |
+
)
|
54 |
+
}
|
src/components/toolbars/top-menu/constants.ts
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { RenderingStrategy } from "@aitube/timeline"
|
2 |
+
|
3 |
+
export const strategyLabels = {
|
4 |
+
[RenderingStrategy.ON_DEMAND]: "Render on click",
|
5 |
+
[RenderingStrategy.ON_SCREEN_ONLY]: "Render visible items",
|
6 |
+
[RenderingStrategy.ON_SCREEN_THEN_SURROUNDING]: "Also render surrounding",
|
7 |
+
[RenderingStrategy.ON_SCREEN_THEN_ALL]: "Render all (for GPU-rich people)"
|
8 |
+
}
|
src/components/toolbars/top-menu/image/index.tsx
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"use client"
|
2 |
+
|
3 |
+
import {
|
4 |
+
MenubarCheckboxItem,
|
5 |
+
MenubarContent,
|
6 |
+
MenubarItem,
|
7 |
+
MenubarMenu,
|
8 |
+
MenubarSeparator,
|
9 |
+
MenubarSub,
|
10 |
+
MenubarSubContent,
|
11 |
+
MenubarSubTrigger,
|
12 |
+
MenubarTrigger
|
13 |
+
} from "@/components/ui/menubar"
|
14 |
+
import { useSettings } from "@/controllers/settings"
|
15 |
+
import { useUI } from "@/controllers/ui"
|
16 |
+
|
17 |
+
import { ProviderList } from "../ProviderList"
|
18 |
+
import { RenderingStrategyList } from "../RenderingStrategyList"
|
19 |
+
import { availableComputeProvidersForImages } from "@/components/settings/constants"
|
20 |
+
|
21 |
+
|
22 |
+
export function TopMenuImage() {
|
23 |
+
const setShowSettings = useUI(s => s.setShowSettings)
|
24 |
+
const imageProvider = useSettings(s => s.imageProvider)
|
25 |
+
const setImageProvider = useSettings(s => s.setImageProvider)
|
26 |
+
const imageRenderingStrategy = useSettings((s) => s.imageRenderingStrategy)
|
27 |
+
const setImageRenderingStrategy = useSettings((s) => s.setImageRenderingStrategy)
|
28 |
+
return (
|
29 |
+
<MenubarMenu>
|
30 |
+
<MenubarTrigger>Image</MenubarTrigger>
|
31 |
+
<MenubarContent>
|
32 |
+
<MenubarSub>
|
33 |
+
<MenubarItem onClick={() => { setShowSettings(true) }}>Show advanced settings</MenubarItem>
|
34 |
+
<MenubarSeparator />
|
35 |
+
<ProviderList providers={availableComputeProvidersForImages} current={imageProvider} setter={setImageProvider} />
|
36 |
+
<RenderingStrategyList current={imageRenderingStrategy} setter={setImageRenderingStrategy} />
|
37 |
+
<MenubarSeparator />
|
38 |
+
<MenubarItem
|
39 |
+
disabled
|
40 |
+
>Usage and costs: not implemented</MenubarItem>
|
41 |
+
</MenubarSub>
|
42 |
+
</MenubarContent>
|
43 |
+
</MenubarMenu>
|
44 |
+
)
|
45 |
+
}
|
src/components/toolbars/top-menu/index.tsx
CHANGED
@@ -1,14 +1,24 @@
|
|
1 |
import { Menubar } from "@/components/ui/menubar"
|
2 |
|
3 |
import { TopMenuFile } from "./file"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
import { TopMenuView } from "./view"
|
5 |
-
import { TopMenuSettings } from "./settings"
|
6 |
|
7 |
export function TopMenu() {
|
8 |
return (
|
9 |
<Menubar>
|
10 |
<TopMenuFile />
|
11 |
-
<
|
|
|
|
|
|
|
|
|
12 |
<TopMenuView />
|
13 |
</Menubar>
|
14 |
)
|
|
|
1 |
import { Menubar } from "@/components/ui/menubar"
|
2 |
|
3 |
import { TopMenuFile } from "./file"
|
4 |
+
|
5 |
+
import { TopMenuImage } from "./image"
|
6 |
+
import { TopMenuVideo } from "./video"
|
7 |
+
import { TopMenuVoice } from "./voice"
|
8 |
+
import { TopMenuSound } from "./sound"
|
9 |
+
import { TopMenuMusic } from "./music"
|
10 |
+
|
11 |
import { TopMenuView } from "./view"
|
|
|
12 |
|
13 |
export function TopMenu() {
|
14 |
return (
|
15 |
<Menubar>
|
16 |
<TopMenuFile />
|
17 |
+
<TopMenuImage />
|
18 |
+
<TopMenuVideo />
|
19 |
+
<TopMenuVoice />
|
20 |
+
<TopMenuSound />
|
21 |
+
<TopMenuMusic />
|
22 |
<TopMenuView />
|
23 |
</Menubar>
|
24 |
)
|
src/components/toolbars/top-menu/music/index.tsx
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"use client"
|
2 |
+
|
3 |
+
import {
|
4 |
+
MenubarCheckboxItem,
|
5 |
+
MenubarContent,
|
6 |
+
MenubarItem,
|
7 |
+
MenubarMenu,
|
8 |
+
MenubarSeparator,
|
9 |
+
MenubarSub,
|
10 |
+
MenubarSubContent,
|
11 |
+
MenubarSubTrigger,
|
12 |
+
MenubarTrigger
|
13 |
+
} from "@/components/ui/menubar"
|
14 |
+
import { useSettings } from "@/controllers/settings"
|
15 |
+
import { useUI } from "@/controllers/ui"
|
16 |
+
|
17 |
+
import { ProviderList } from "../ProviderList"
|
18 |
+
import { RenderingStrategyList } from "../RenderingStrategyList"
|
19 |
+
import { availableComputeProvidersForMusic } from "@/components/settings/constants"
|
20 |
+
|
21 |
+
|
22 |
+
export function TopMenuMusic() {
|
23 |
+
const setShowSettings = useUI(s => s.setShowSettings)
|
24 |
+
const musicProvider = useSettings(s => s.musicProvider)
|
25 |
+
const setMusicProvider = useSettings(s => s.setMusicProvider)
|
26 |
+
const musicRenderingStrategy = useSettings((s) => s.musicRenderingStrategy)
|
27 |
+
const setMusicRenderingStrategy = useSettings((s) => s.setMusicRenderingStrategy)
|
28 |
+
return (
|
29 |
+
<MenubarMenu>
|
30 |
+
<MenubarTrigger>Music</MenubarTrigger>
|
31 |
+
<MenubarContent>
|
32 |
+
<MenubarSub>
|
33 |
+
<MenubarItem onClick={() => { setShowSettings(true) }}>Show advanced settings</MenubarItem>
|
34 |
+
<MenubarSeparator />
|
35 |
+
<ProviderList providers={availableComputeProvidersForMusic} current={musicProvider} setter={setMusicProvider} />
|
36 |
+
<RenderingStrategyList current={musicRenderingStrategy} setter={setMusicRenderingStrategy} />
|
37 |
+
<MenubarSeparator />
|
38 |
+
<MenubarItem
|
39 |
+
disabled
|
40 |
+
>Usage and costs: not implemented</MenubarItem>
|
41 |
+
</MenubarSub>
|
42 |
+
</MenubarContent>
|
43 |
+
</MenubarMenu>
|
44 |
+
)
|
45 |
+
}
|
src/components/toolbars/top-menu/settings/index.tsx
DELETED
@@ -1,146 +0,0 @@
|
|
1 |
-
"use client"
|
2 |
-
|
3 |
-
import { useEffect } from "react"
|
4 |
-
|
5 |
-
import {
|
6 |
-
MenubarCheckboxItem,
|
7 |
-
MenubarContent,
|
8 |
-
MenubarItem,
|
9 |
-
MenubarMenu,
|
10 |
-
MenubarSeparator,
|
11 |
-
MenubarSub,
|
12 |
-
MenubarSubContent,
|
13 |
-
MenubarSubTrigger,
|
14 |
-
MenubarTrigger
|
15 |
-
} from "@/components/ui/menubar"
|
16 |
-
import { useSettings } from "@/controllers/settings"
|
17 |
-
import { RenderingStrategy } from "@aitube/timeline"
|
18 |
-
import { useUI } from "@/controllers/ui"
|
19 |
-
|
20 |
-
export function TopMenuSettings() {
|
21 |
-
const setShowSettings = useUI(s => s.setShowSettings)
|
22 |
-
|
23 |
-
const storyboardRenderingStrategy = useSettings((s) => s.storyboardRenderingStrategy)
|
24 |
-
const setStoryboardRenderingStrategy = useSettings((s) => s.setStoryboardRenderingStrategy)
|
25 |
-
|
26 |
-
const videoRenderingStrategy = useSettings((s) => s.videoRenderingStrategy)
|
27 |
-
const setVideoRenderingStrategy = useSettings((s) => s.setVideoRenderingStrategy)
|
28 |
-
|
29 |
-
const labels = {
|
30 |
-
[RenderingStrategy.ON_DEMAND]: "Render on click",
|
31 |
-
[RenderingStrategy.ON_SCREEN_ONLY]: "Render visible items",
|
32 |
-
[RenderingStrategy.ON_SCREEN_THEN_SURROUNDING]: "Render visible + surrounding items",
|
33 |
-
[RenderingStrategy.ON_SCREEN_THEN_ALL]: "Full rendering (for GPU-rich people)"
|
34 |
-
}
|
35 |
-
|
36 |
-
return (
|
37 |
-
<MenubarMenu>
|
38 |
-
<MenubarTrigger>Settings</MenubarTrigger>
|
39 |
-
<MenubarContent>
|
40 |
-
|
41 |
-
<MenubarSub>
|
42 |
-
<MenubarItem
|
43 |
-
onClick={() => { setShowSettings(true) }}>All settings (API, tokens..)</MenubarItem>
|
44 |
-
<MenubarSeparator />
|
45 |
-
<MenubarSubTrigger>Storyboards generation</MenubarSubTrigger>
|
46 |
-
<MenubarSubContent>
|
47 |
-
<MenubarCheckboxItem
|
48 |
-
disabled
|
49 |
-
checked={storyboardRenderingStrategy === RenderingStrategy.ON_DEMAND}
|
50 |
-
onClick={(e) => {
|
51 |
-
setStoryboardRenderingStrategy(RenderingStrategy.ON_DEMAND)
|
52 |
-
e.stopPropagation()
|
53 |
-
e.preventDefault()
|
54 |
-
return false
|
55 |
-
}}>
|
56 |
-
{labels[RenderingStrategy.ON_DEMAND]}
|
57 |
-
</MenubarCheckboxItem>
|
58 |
-
<MenubarCheckboxItem
|
59 |
-
disabled
|
60 |
-
checked={storyboardRenderingStrategy === RenderingStrategy.ON_SCREEN_ONLY}
|
61 |
-
onClick={(e) => {
|
62 |
-
setStoryboardRenderingStrategy(RenderingStrategy.ON_SCREEN_ONLY)
|
63 |
-
e.stopPropagation()
|
64 |
-
e.preventDefault()
|
65 |
-
return false
|
66 |
-
}}>
|
67 |
-
{labels[RenderingStrategy.ON_SCREEN_ONLY]}
|
68 |
-
</MenubarCheckboxItem>
|
69 |
-
<MenubarCheckboxItem
|
70 |
-
disabled
|
71 |
-
checked={storyboardRenderingStrategy === RenderingStrategy.ON_SCREEN_THEN_SURROUNDING}
|
72 |
-
onClick={(e) => {
|
73 |
-
setStoryboardRenderingStrategy(RenderingStrategy.ON_SCREEN_THEN_SURROUNDING)
|
74 |
-
e.stopPropagation()
|
75 |
-
e.preventDefault()
|
76 |
-
return false
|
77 |
-
}}>
|
78 |
-
{labels[RenderingStrategy.ON_SCREEN_THEN_SURROUNDING]}
|
79 |
-
</MenubarCheckboxItem>
|
80 |
-
<MenubarCheckboxItem
|
81 |
-
disabled
|
82 |
-
checked={storyboardRenderingStrategy === RenderingStrategy.ON_SCREEN_THEN_ALL}
|
83 |
-
onClick={(e) => {
|
84 |
-
setStoryboardRenderingStrategy(RenderingStrategy.ON_SCREEN_THEN_ALL)
|
85 |
-
e.stopPropagation()
|
86 |
-
e.preventDefault()
|
87 |
-
return false
|
88 |
-
}}>
|
89 |
-
{labels[RenderingStrategy.ON_SCREEN_THEN_ALL]}
|
90 |
-
</MenubarCheckboxItem>
|
91 |
-
</MenubarSubContent>
|
92 |
-
</MenubarSub>
|
93 |
-
|
94 |
-
<MenubarSub>
|
95 |
-
<MenubarSubTrigger>Videos generation</MenubarSubTrigger>
|
96 |
-
<MenubarSubContent>
|
97 |
-
<MenubarCheckboxItem
|
98 |
-
disabled
|
99 |
-
checked={videoRenderingStrategy === RenderingStrategy.ON_DEMAND}
|
100 |
-
onClick={(e) => {
|
101 |
-
setVideoRenderingStrategy(RenderingStrategy.ON_DEMAND)
|
102 |
-
e.stopPropagation()
|
103 |
-
e.preventDefault()
|
104 |
-
return false
|
105 |
-
}}>
|
106 |
-
{labels[RenderingStrategy.ON_DEMAND]}
|
107 |
-
</MenubarCheckboxItem>
|
108 |
-
<MenubarCheckboxItem
|
109 |
-
disabled
|
110 |
-
checked={videoRenderingStrategy === RenderingStrategy.ON_SCREEN_ONLY}
|
111 |
-
onClick={(e) => {
|
112 |
-
setVideoRenderingStrategy(RenderingStrategy.ON_SCREEN_ONLY)
|
113 |
-
e.stopPropagation()
|
114 |
-
e.preventDefault()
|
115 |
-
return false
|
116 |
-
}}>
|
117 |
-
{labels[RenderingStrategy.ON_SCREEN_ONLY]}
|
118 |
-
</MenubarCheckboxItem>
|
119 |
-
<MenubarCheckboxItem
|
120 |
-
disabled
|
121 |
-
checked={videoRenderingStrategy === RenderingStrategy.ON_SCREEN_THEN_SURROUNDING}
|
122 |
-
onClick={(e) => {
|
123 |
-
setVideoRenderingStrategy(RenderingStrategy.ON_SCREEN_THEN_SURROUNDING)
|
124 |
-
e.stopPropagation()
|
125 |
-
e.preventDefault()
|
126 |
-
return false
|
127 |
-
}}>
|
128 |
-
{labels[RenderingStrategy.ON_SCREEN_THEN_SURROUNDING]}
|
129 |
-
</MenubarCheckboxItem>
|
130 |
-
<MenubarCheckboxItem
|
131 |
-
disabled
|
132 |
-
checked={videoRenderingStrategy === RenderingStrategy.ON_SCREEN_THEN_ALL}
|
133 |
-
onClick={(e) => {
|
134 |
-
setVideoRenderingStrategy(RenderingStrategy.ON_SCREEN_THEN_ALL)
|
135 |
-
e.stopPropagation()
|
136 |
-
e.preventDefault()
|
137 |
-
return false
|
138 |
-
}}>
|
139 |
-
{labels[RenderingStrategy.ON_SCREEN_THEN_ALL]}
|
140 |
-
</MenubarCheckboxItem>
|
141 |
-
</MenubarSubContent>
|
142 |
-
</MenubarSub>
|
143 |
-
</MenubarContent>
|
144 |
-
</MenubarMenu>
|
145 |
-
)
|
146 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/components/toolbars/top-menu/sound/index.tsx
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"use client"
|
2 |
+
|
3 |
+
import {
|
4 |
+
MenubarCheckboxItem,
|
5 |
+
MenubarContent,
|
6 |
+
MenubarItem,
|
7 |
+
MenubarMenu,
|
8 |
+
MenubarSeparator,
|
9 |
+
MenubarSub,
|
10 |
+
MenubarSubContent,
|
11 |
+
MenubarSubTrigger,
|
12 |
+
MenubarTrigger
|
13 |
+
} from "@/components/ui/menubar"
|
14 |
+
import { useSettings } from "@/controllers/settings"
|
15 |
+
import { useUI } from "@/controllers/ui"
|
16 |
+
|
17 |
+
import { ProviderList } from "../ProviderList"
|
18 |
+
import { RenderingStrategyList } from "../RenderingStrategyList"
|
19 |
+
import { availableComputeProvidersForSound } from "@/components/settings/constants"
|
20 |
+
|
21 |
+
|
22 |
+
export function TopMenuSound() {
|
23 |
+
const setShowSettings = useUI(s => s.setShowSettings)
|
24 |
+
const soundProvider = useSettings(s => s.soundProvider)
|
25 |
+
const setSoundProvider = useSettings(s => s.setSoundProvider)
|
26 |
+
const soundRenderingStrategy = useSettings((s) => s.soundRenderingStrategy)
|
27 |
+
const setSoundRenderingStrategy = useSettings((s) => s.setSoundRenderingStrategy)
|
28 |
+
return (
|
29 |
+
<MenubarMenu>
|
30 |
+
<MenubarTrigger>Sound</MenubarTrigger>
|
31 |
+
<MenubarContent>
|
32 |
+
<MenubarSub>
|
33 |
+
<MenubarItem onClick={() => { setShowSettings(true) }}>Show advanced settings</MenubarItem>
|
34 |
+
<MenubarSeparator />
|
35 |
+
<ProviderList providers={availableComputeProvidersForSound} current={soundProvider} setter={setSoundProvider} />
|
36 |
+
<RenderingStrategyList current={soundRenderingStrategy} setter={setSoundRenderingStrategy} />
|
37 |
+
<MenubarSeparator />
|
38 |
+
<MenubarItem
|
39 |
+
disabled
|
40 |
+
>Usage and costs: not implemented</MenubarItem>
|
41 |
+
</MenubarSub>
|
42 |
+
</MenubarContent>
|
43 |
+
</MenubarMenu>
|
44 |
+
)
|
45 |
+
}
|
src/components/toolbars/top-menu/video/index.tsx
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"use client"
|
2 |
+
|
3 |
+
import {
|
4 |
+
MenubarCheckboxItem,
|
5 |
+
MenubarContent,
|
6 |
+
MenubarItem,
|
7 |
+
MenubarMenu,
|
8 |
+
MenubarSeparator,
|
9 |
+
MenubarSub,
|
10 |
+
MenubarSubContent,
|
11 |
+
MenubarSubTrigger,
|
12 |
+
MenubarTrigger
|
13 |
+
} from "@/components/ui/menubar"
|
14 |
+
import { useSettings } from "@/controllers/settings"
|
15 |
+
import { useUI } from "@/controllers/ui"
|
16 |
+
|
17 |
+
import { ProviderList } from "../ProviderList"
|
18 |
+
import { RenderingStrategyList } from "../RenderingStrategyList"
|
19 |
+
import { availableComputeProvidersForVideos } from "@/components/settings/constants"
|
20 |
+
|
21 |
+
|
22 |
+
export function TopMenuVideo() {
|
23 |
+
const setShowSettings = useUI(s => s.setShowSettings)
|
24 |
+
const videoProvider = useSettings(s => s.videoProvider)
|
25 |
+
const setVideoProvider = useSettings(s => s.setVideoProvider)
|
26 |
+
const videoRenderingStrategy = useSettings((s) => s.videoRenderingStrategy)
|
27 |
+
const setVideoRenderingStrategy = useSettings((s) => s.setVideoRenderingStrategy)
|
28 |
+
return (
|
29 |
+
<MenubarMenu>
|
30 |
+
<MenubarTrigger>Video</MenubarTrigger>
|
31 |
+
<MenubarContent>
|
32 |
+
<MenubarSub>
|
33 |
+
<MenubarItem onClick={() => { setShowSettings(true) }}>Show advanced settings</MenubarItem>
|
34 |
+
<MenubarSeparator />
|
35 |
+
<ProviderList providers={availableComputeProvidersForVideos} current={videoProvider} setter={setVideoProvider} />
|
36 |
+
<RenderingStrategyList current={videoRenderingStrategy} setter={setVideoRenderingStrategy} />
|
37 |
+
<MenubarSeparator />
|
38 |
+
<MenubarItem
|
39 |
+
disabled
|
40 |
+
>Usage and costs: not implemented</MenubarItem>
|
41 |
+
</MenubarSub>
|
42 |
+
</MenubarContent>
|
43 |
+
</MenubarMenu>
|
44 |
+
)
|
45 |
+
}
|
src/components/toolbars/top-menu/voice/index.tsx
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"use client"
|
2 |
+
|
3 |
+
import {
|
4 |
+
MenubarCheckboxItem,
|
5 |
+
MenubarContent,
|
6 |
+
MenubarItem,
|
7 |
+
MenubarMenu,
|
8 |
+
MenubarSeparator,
|
9 |
+
MenubarSub,
|
10 |
+
MenubarSubContent,
|
11 |
+
MenubarSubTrigger,
|
12 |
+
MenubarTrigger
|
13 |
+
} from "@/components/ui/menubar"
|
14 |
+
import { useSettings } from "@/controllers/settings"
|
15 |
+
import { useUI } from "@/controllers/ui"
|
16 |
+
|
17 |
+
import { ProviderList } from "../ProviderList"
|
18 |
+
import { RenderingStrategyList } from "../RenderingStrategyList"
|
19 |
+
import { availableComputeProvidersForVoice } from "@/components/settings/constants"
|
20 |
+
|
21 |
+
|
22 |
+
export function TopMenuVoice() {
|
23 |
+
const setShowSettings = useUI(s => s.setShowSettings)
|
24 |
+
const voiceProvider = useSettings(s => s.voiceProvider)
|
25 |
+
const setVoiceProvider = useSettings(s => s.setVoiceProvider)
|
26 |
+
const voiceRenderingStrategy = useSettings((s) => s.voiceRenderingStrategy)
|
27 |
+
const setVoiceRenderingStrategy = useSettings((s) => s.setVoiceRenderingStrategy)
|
28 |
+
return (
|
29 |
+
<MenubarMenu>
|
30 |
+
<MenubarTrigger>Voice</MenubarTrigger>
|
31 |
+
<MenubarContent>
|
32 |
+
<MenubarSub>
|
33 |
+
<MenubarItem onClick={() => { setShowSettings(true) }}>Show advanced settings</MenubarItem>
|
34 |
+
<MenubarSeparator />
|
35 |
+
<ProviderList providers={availableComputeProvidersForVoice} current={voiceProvider} setter={setVoiceProvider} />
|
36 |
+
<RenderingStrategyList current={voiceRenderingStrategy} setter={setVoiceRenderingStrategy} />
|
37 |
+
<MenubarSeparator />
|
38 |
+
<MenubarItem
|
39 |
+
disabled
|
40 |
+
>Usage and costs: not implemented</MenubarItem>
|
41 |
+
</MenubarSub>
|
42 |
+
</MenubarContent>
|
43 |
+
</MenubarMenu>
|
44 |
+
)
|
45 |
+
}
|
src/controllers/settings/getDefaultSettingsState.ts
CHANGED
@@ -3,7 +3,7 @@ import { RenderingStrategy } from "@aitube/timeline"
|
|
3 |
import { ComfyIcuAccelerator, ComputeProvider } from "@/types"
|
4 |
|
5 |
import { SettingsState } from "./types"
|
6 |
-
import {
|
7 |
|
8 |
export function getDefaultSettingsState(): SettingsState {
|
9 |
const state: SettingsState = {
|
@@ -22,29 +22,33 @@ export function getDefaultSettingsState(): SettingsState {
|
|
22 |
elevenLabsApiKey: "",
|
23 |
|
24 |
assistantProvider: ComputeProvider.NONE,
|
25 |
-
|
26 |
videoProvider: ComputeProvider.NONE,
|
27 |
soundProvider: ComputeProvider.NONE,
|
28 |
-
|
29 |
musicProvider: ComputeProvider.NONE,
|
30 |
|
31 |
censorNotForAllAudiencesContent: false,
|
32 |
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
videoPromptPrefix: "",
|
37 |
videoPromptSuffix: "",
|
38 |
videoNegativePrompt: "",
|
39 |
|
40 |
-
|
41 |
videoRenderingStrategy: RenderingStrategy.ON_DEMAND,
|
42 |
-
|
|
|
|
|
|
|
|
|
43 |
maxVideosToGenerateInParallel: 1,
|
44 |
|
45 |
-
|
46 |
comfyWorkflowForVideo: "{}",
|
47 |
-
|
48 |
comfyWorkflowForSound: "{}",
|
49 |
comfyWorkflowForMusic: "{}",
|
50 |
|
@@ -53,7 +57,7 @@ export function getDefaultSettingsState(): SettingsState {
|
|
53 |
huggingFaceModelForAssistant: "mistralai/Mixtral-8x7B-Instruct-v0.1",
|
54 |
huggingFaceModelForImage: "sd-community/sdxl-flash",
|
55 |
huggingFaceModelForVideo: "",
|
56 |
-
|
57 |
huggingFaceModelForSound: "",
|
58 |
huggingFaceModelForMusic: "",
|
59 |
|
@@ -68,44 +72,44 @@ export function getDefaultSettingsState(): SettingsState {
|
|
68 |
|
69 |
// note: this model doesn't support width and height parameters
|
70 |
replicateModelForVideo: "camenduru/animatediff-lightning-4-step:be39c6d599942831314b770f03cfd062bfd0faa8cc52e9289bcce830b721fcb6",
|
71 |
-
|
72 |
replicateModelForSound: "sepal/audiogen",
|
73 |
replicateModelForMusic: "meta/musicgen",
|
74 |
|
75 |
stabilityAiModelForImage: "",
|
76 |
stabilityAiModelForVideo: "",
|
77 |
-
|
78 |
stabilityAiModelForSound: "",
|
79 |
stabilityAiModelForMusic: "",
|
80 |
|
81 |
falAiModelForImage: "fal-ai/fast-sdxl", // "fal-ai/fast-lightning-sdxl",
|
82 |
falAiModelForVideo: "fal-ai/fast-animatediff/turbo/text-to-video",
|
83 |
-
|
84 |
falAiModelForSound: "fal-ai/stable-audio",
|
85 |
falAiModelForMusic: "fal-ai/stable-audio",
|
86 |
|
87 |
modelsLabModelForImage: "",
|
88 |
modelsLabModelForVideo: "",
|
89 |
-
|
90 |
modelsLabModelForSound: "",
|
91 |
modelsLabModelForMusic: "",
|
92 |
|
93 |
openaiModelForAssistant: "gpt-4-turbo",
|
94 |
openaiModelForImage: "dall-e-3",
|
95 |
openaiModelForVideo: "sora",
|
96 |
-
|
97 |
|
98 |
groqModelForAssistant: "mixtral-8x7b-32768",
|
99 |
|
100 |
googleModelForAssistant: "gemini",
|
101 |
googleModelForImage: "imagen",
|
102 |
googleModelForVideo: "veo",
|
103 |
-
|
104 |
googleModelForMusic: "MusicLM",
|
105 |
|
106 |
anthropicModelForAssistant: "claude-3-opus-20240229",
|
107 |
|
108 |
-
|
109 |
elevenLabsModelForSound: "v1",
|
110 |
}
|
111 |
return state
|
|
|
3 |
import { ComfyIcuAccelerator, ComputeProvider } from "@/types"
|
4 |
|
5 |
import { SettingsState } from "./types"
|
6 |
+
import { defaultWorkflowForImages } from "./workflows/image"
|
7 |
|
8 |
export function getDefaultSettingsState(): SettingsState {
|
9 |
const state: SettingsState = {
|
|
|
22 |
elevenLabsApiKey: "",
|
23 |
|
24 |
assistantProvider: ComputeProvider.NONE,
|
25 |
+
imageProvider: ComputeProvider.NONE,
|
26 |
videoProvider: ComputeProvider.NONE,
|
27 |
soundProvider: ComputeProvider.NONE,
|
28 |
+
voiceProvider: ComputeProvider.NONE,
|
29 |
musicProvider: ComputeProvider.NONE,
|
30 |
|
31 |
censorNotForAllAudiencesContent: false,
|
32 |
|
33 |
+
imagePromptPrefix: "",
|
34 |
+
imagePromptSuffix: "",
|
35 |
+
imageNegativePrompt: "",
|
36 |
videoPromptPrefix: "",
|
37 |
videoPromptSuffix: "",
|
38 |
videoNegativePrompt: "",
|
39 |
|
40 |
+
imageRenderingStrategy: RenderingStrategy.ON_DEMAND,
|
41 |
videoRenderingStrategy: RenderingStrategy.ON_DEMAND,
|
42 |
+
voiceRenderingStrategy: RenderingStrategy.ON_DEMAND,
|
43 |
+
soundRenderingStrategy: RenderingStrategy.ON_DEMAND,
|
44 |
+
musicRenderingStrategy: RenderingStrategy.ON_DEMAND,
|
45 |
+
|
46 |
+
maxImagesToGenerateInParallel: 1,
|
47 |
maxVideosToGenerateInParallel: 1,
|
48 |
|
49 |
+
comfyWorkflowForImage: defaultWorkflowForImages,
|
50 |
comfyWorkflowForVideo: "{}",
|
51 |
+
comfyWorkflowForVoice: "{}",
|
52 |
comfyWorkflowForSound: "{}",
|
53 |
comfyWorkflowForMusic: "{}",
|
54 |
|
|
|
57 |
huggingFaceModelForAssistant: "mistralai/Mixtral-8x7B-Instruct-v0.1",
|
58 |
huggingFaceModelForImage: "sd-community/sdxl-flash",
|
59 |
huggingFaceModelForVideo: "",
|
60 |
+
huggingFaceModelForVoice: "",
|
61 |
huggingFaceModelForSound: "",
|
62 |
huggingFaceModelForMusic: "",
|
63 |
|
|
|
72 |
|
73 |
// note: this model doesn't support width and height parameters
|
74 |
replicateModelForVideo: "camenduru/animatediff-lightning-4-step:be39c6d599942831314b770f03cfd062bfd0faa8cc52e9289bcce830b721fcb6",
|
75 |
+
replicateModelForVoice: "lucataco/xtts-v2",
|
76 |
replicateModelForSound: "sepal/audiogen",
|
77 |
replicateModelForMusic: "meta/musicgen",
|
78 |
|
79 |
stabilityAiModelForImage: "",
|
80 |
stabilityAiModelForVideo: "",
|
81 |
+
stabilityAiModelForVoice: "",
|
82 |
stabilityAiModelForSound: "",
|
83 |
stabilityAiModelForMusic: "",
|
84 |
|
85 |
falAiModelForImage: "fal-ai/fast-sdxl", // "fal-ai/fast-lightning-sdxl",
|
86 |
falAiModelForVideo: "fal-ai/fast-animatediff/turbo/text-to-video",
|
87 |
+
falAiModelForVoice: "fal-ai/metavoice-v1",
|
88 |
falAiModelForSound: "fal-ai/stable-audio",
|
89 |
falAiModelForMusic: "fal-ai/stable-audio",
|
90 |
|
91 |
modelsLabModelForImage: "",
|
92 |
modelsLabModelForVideo: "",
|
93 |
+
modelsLabModelForVoice: "",
|
94 |
modelsLabModelForSound: "",
|
95 |
modelsLabModelForMusic: "",
|
96 |
|
97 |
openaiModelForAssistant: "gpt-4-turbo",
|
98 |
openaiModelForImage: "dall-e-3",
|
99 |
openaiModelForVideo: "sora",
|
100 |
+
openaiModelForVoice: "v1",
|
101 |
|
102 |
groqModelForAssistant: "mixtral-8x7b-32768",
|
103 |
|
104 |
googleModelForAssistant: "gemini",
|
105 |
googleModelForImage: "imagen",
|
106 |
googleModelForVideo: "veo",
|
107 |
+
googleModelForVoice: "v1",
|
108 |
googleModelForMusic: "MusicLM",
|
109 |
|
110 |
anthropicModelForAssistant: "claude-3-opus-20240229",
|
111 |
|
112 |
+
elevenLabsModelForVoice: "v1",
|
113 |
elevenLabsModelForSound: "v1",
|
114 |
}
|
115 |
return state
|
src/controllers/settings/types.ts
CHANGED
@@ -19,8 +19,8 @@ export type SettingsState = {
|
|
19 |
// ------------- CATEGORY PROVIDERS ---------------
|
20 |
assistantProvider: ComputeProvider
|
21 |
videoProvider: ComputeProvider
|
22 |
-
|
23 |
-
|
24 |
soundProvider: ComputeProvider
|
25 |
musicProvider: ComputeProvider
|
26 |
|
@@ -30,22 +30,26 @@ export type SettingsState = {
|
|
30 |
|
31 |
// -------------- MISC SETTINGS -------------------
|
32 |
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
videoPromptPrefix: string
|
37 |
videoPromptSuffix: string
|
38 |
videoNegativePrompt: string
|
39 |
|
40 |
-
|
41 |
videoRenderingStrategy: RenderingStrategy
|
42 |
-
|
|
|
|
|
|
|
|
|
43 |
maxVideosToGenerateInParallel: number
|
44 |
|
45 |
// ------------ COMFY UI WORKFLOWS -----------------
|
46 |
-
|
47 |
comfyWorkflowForVideo: string
|
48 |
-
|
49 |
comfyWorkflowForSound: string
|
50 |
comfyWorkflowForMusic: string
|
51 |
|
@@ -54,7 +58,7 @@ export type SettingsState = {
|
|
54 |
huggingFaceModelForAssistant: string
|
55 |
huggingFaceModelForImage: string
|
56 |
huggingFaceModelForVideo: string
|
57 |
-
|
58 |
huggingFaceModelForSound: string
|
59 |
huggingFaceModelForMusic: string
|
60 |
|
@@ -67,44 +71,44 @@ export type SettingsState = {
|
|
67 |
|
68 |
replicateModelForImage: string
|
69 |
replicateModelForVideo: string
|
70 |
-
|
71 |
replicateModelForSound: string
|
72 |
replicateModelForMusic: string
|
73 |
|
74 |
stabilityAiModelForImage: string
|
75 |
stabilityAiModelForVideo: string
|
76 |
-
|
77 |
stabilityAiModelForSound: string
|
78 |
stabilityAiModelForMusic: string
|
79 |
|
80 |
falAiModelForImage: string
|
81 |
falAiModelForVideo: string
|
82 |
-
|
83 |
falAiModelForSound: string
|
84 |
falAiModelForMusic: string
|
85 |
|
86 |
modelsLabModelForImage: string
|
87 |
modelsLabModelForVideo: string
|
88 |
-
|
89 |
modelsLabModelForSound: string
|
90 |
modelsLabModelForMusic: string
|
91 |
|
92 |
openaiModelForAssistant: string
|
93 |
openaiModelForImage: string
|
94 |
openaiModelForVideo: string
|
95 |
-
|
96 |
|
97 |
groqModelForAssistant: string
|
98 |
|
99 |
googleModelForAssistant: string
|
100 |
googleModelForImage: string
|
101 |
googleModelForVideo: string
|
102 |
-
|
103 |
googleModelForMusic: string
|
104 |
|
105 |
anthropicModelForAssistant: string
|
106 |
|
107 |
-
|
108 |
elevenLabsModelForSound: string
|
109 |
}
|
110 |
|
@@ -125,34 +129,38 @@ export type SettingsControls = {
|
|
125 |
|
126 |
setAssistantProvider: (assistantProvider?: ComputeProvider) => void
|
127 |
setVideoProvider: (videoProvider?: ComputeProvider) => void
|
128 |
-
|
129 |
-
|
130 |
setSoundProvider: (soundProvider?: ComputeProvider) => void
|
131 |
setMusicProvider: (musicProvider?: ComputeProvider) => void
|
132 |
|
133 |
setCensorNotForAllAudiencesContent: (censorNotForAllAudiencesContent?: boolean) => void
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
setVideoPromptPrefix: (videoPromptPrefix?: string) => void
|
138 |
setVideoPromptSuffix: (videoPromptSuffix?: string) => void
|
139 |
setVideoNegativePrompt: (videoNegativePrompt?: string) => void
|
140 |
|
141 |
-
|
142 |
setVideoRenderingStrategy: (videoRenderingStrategy?: RenderingStrategy) => void
|
143 |
-
|
|
|
|
|
|
|
|
|
144 |
setMaxVideosToGenerateInParallel: (maxVideosToGenerateInParallel?: number) => void
|
145 |
|
146 |
-
|
147 |
setComfyWorkflowForVideo: (comfyWorkflowForVideo?: string) => void
|
148 |
-
|
149 |
setComfyWorkflowForSound: (comfyWorkflowForSound?: string) => void
|
150 |
setComfyWorkflowForMusic: (comfyWorkflowForMusic?: string) => void
|
151 |
|
152 |
setHuggingFaceModelForAssistant: (huggingFaceModelForAssistant?: string) => void
|
153 |
setHuggingFaceModelForImage: (huggingFaceModelForImage?: string) => void
|
154 |
setHuggingFaceModelForVideo: (huggingFaceModelForVideo?: string) => void
|
155 |
-
|
156 |
setHuggingFaceModelForSound: (huggingFaceModelForSound?: string) => void
|
157 |
setHuggingFaceModelForMusic: (huggingFaceModelForMusic?: string) => void
|
158 |
|
@@ -165,44 +173,44 @@ export type SettingsControls = {
|
|
165 |
|
166 |
setReplicateModelForImage: (replicateModelForImage?: string) => void
|
167 |
setReplicateModelForVideo: (replicateModelForVideo?: string) => void
|
168 |
-
|
169 |
setReplicateModelForSound: (replicateModelForSound?: string) => void
|
170 |
setReplicateModelForMusic: (replicateModelForMusic?: string) => void
|
171 |
|
172 |
setStabilityAiModelForImage: (stabilityAiModelForImage?: string) => void
|
173 |
setStabilityAiModelForVideo: (stabilityAiModelForVideo?: string) => void
|
174 |
-
|
175 |
setStabilityAiModelForSound: (stabilityAiModelForSound?: string) => void
|
176 |
setStabilityAiModelForMusic: (stabilityAiModelForMusic?: string) => void
|
177 |
|
178 |
setFalAiModelForImage: (falAiModelForImage?: string) => void
|
179 |
setFalAiModelForVideo: (falAiModelForVideo?: string) => void
|
180 |
-
|
181 |
setFalAiModelForSound: (falAiModelForSound?: string) => void
|
182 |
setFalAiModelForMusic: (falAiModelForMusic?: string) => void
|
183 |
|
184 |
setModelsLabModelForImage: (modelsLabModelForImage?: string) => void
|
185 |
setModelsLabModelForVideo: (modelsLabModelForVideo?: string) => void
|
186 |
-
|
187 |
setModelsLabModelForSound: (modelsLabModelForSound?: string) => void
|
188 |
setModelsLabModelForMusic: (modelsLabModelForMusic?: string) => void
|
189 |
|
190 |
setOpenaiModelForAssistant: (openaiModelForAssistant?: string) => void
|
191 |
setOpenaiModelForImage: (openaiModelForImage?: string) => void
|
192 |
setOpenaiModelForVideo: (openaiModelForVideo?: string) => void
|
193 |
-
|
194 |
|
195 |
setGroqModelForAssistant: (groqModelForAssistant?: string) => void
|
196 |
|
197 |
setGoogleModelForAssistant: (googleModelForAssistant?: string) => void
|
198 |
setGoogleModelForImage: (googleModelForImage?: string) => void
|
199 |
setGoogleModelForVideo: (googleModelForVideo?: string) => void
|
200 |
-
|
201 |
setGoogleModelForMusic: (googleModelForMusic?: string) => void
|
202 |
|
203 |
setAnthropicModelForAssistant: (anthropicModelForAssistant?: string) => void
|
204 |
|
205 |
-
|
206 |
setElevenLabsModelForSound: (elevenLabsModelForSound?: string) => void
|
207 |
|
208 |
getSettings: () => SettingsState
|
|
|
19 |
// ------------- CATEGORY PROVIDERS ---------------
|
20 |
assistantProvider: ComputeProvider
|
21 |
videoProvider: ComputeProvider
|
22 |
+
imageProvider: ComputeProvider
|
23 |
+
voiceProvider: ComputeProvider
|
24 |
soundProvider: ComputeProvider
|
25 |
musicProvider: ComputeProvider
|
26 |
|
|
|
30 |
|
31 |
// -------------- MISC SETTINGS -------------------
|
32 |
|
33 |
+
imagePromptPrefix: string
|
34 |
+
imagePromptSuffix: string
|
35 |
+
imageNegativePrompt: string
|
36 |
videoPromptPrefix: string
|
37 |
videoPromptSuffix: string
|
38 |
videoNegativePrompt: string
|
39 |
|
40 |
+
imageRenderingStrategy: RenderingStrategy
|
41 |
videoRenderingStrategy: RenderingStrategy
|
42 |
+
voiceRenderingStrategy: RenderingStrategy
|
43 |
+
soundRenderingStrategy: RenderingStrategy
|
44 |
+
musicRenderingStrategy: RenderingStrategy
|
45 |
+
|
46 |
+
maxImagesToGenerateInParallel: number
|
47 |
maxVideosToGenerateInParallel: number
|
48 |
|
49 |
// ------------ COMFY UI WORKFLOWS -----------------
|
50 |
+
comfyWorkflowForImage: string
|
51 |
comfyWorkflowForVideo: string
|
52 |
+
comfyWorkflowForVoice: string
|
53 |
comfyWorkflowForSound: string
|
54 |
comfyWorkflowForMusic: string
|
55 |
|
|
|
58 |
huggingFaceModelForAssistant: string
|
59 |
huggingFaceModelForImage: string
|
60 |
huggingFaceModelForVideo: string
|
61 |
+
huggingFaceModelForVoice: string
|
62 |
huggingFaceModelForSound: string
|
63 |
huggingFaceModelForMusic: string
|
64 |
|
|
|
71 |
|
72 |
replicateModelForImage: string
|
73 |
replicateModelForVideo: string
|
74 |
+
replicateModelForVoice: string
|
75 |
replicateModelForSound: string
|
76 |
replicateModelForMusic: string
|
77 |
|
78 |
stabilityAiModelForImage: string
|
79 |
stabilityAiModelForVideo: string
|
80 |
+
stabilityAiModelForVoice: string
|
81 |
stabilityAiModelForSound: string
|
82 |
stabilityAiModelForMusic: string
|
83 |
|
84 |
falAiModelForImage: string
|
85 |
falAiModelForVideo: string
|
86 |
+
falAiModelForVoice: string
|
87 |
falAiModelForSound: string
|
88 |
falAiModelForMusic: string
|
89 |
|
90 |
modelsLabModelForImage: string
|
91 |
modelsLabModelForVideo: string
|
92 |
+
modelsLabModelForVoice: string
|
93 |
modelsLabModelForSound: string
|
94 |
modelsLabModelForMusic: string
|
95 |
|
96 |
openaiModelForAssistant: string
|
97 |
openaiModelForImage: string
|
98 |
openaiModelForVideo: string
|
99 |
+
openaiModelForVoice: string
|
100 |
|
101 |
groqModelForAssistant: string
|
102 |
|
103 |
googleModelForAssistant: string
|
104 |
googleModelForImage: string
|
105 |
googleModelForVideo: string
|
106 |
+
googleModelForVoice: string
|
107 |
googleModelForMusic: string
|
108 |
|
109 |
anthropicModelForAssistant: string
|
110 |
|
111 |
+
elevenLabsModelForVoice: string
|
112 |
elevenLabsModelForSound: string
|
113 |
}
|
114 |
|
|
|
129 |
|
130 |
setAssistantProvider: (assistantProvider?: ComputeProvider) => void
|
131 |
setVideoProvider: (videoProvider?: ComputeProvider) => void
|
132 |
+
setImageProvider: (imageProvider?: ComputeProvider) => void
|
133 |
+
setVoiceProvider: (voiceProvider?: ComputeProvider) => void
|
134 |
setSoundProvider: (soundProvider?: ComputeProvider) => void
|
135 |
setMusicProvider: (musicProvider?: ComputeProvider) => void
|
136 |
|
137 |
setCensorNotForAllAudiencesContent: (censorNotForAllAudiencesContent?: boolean) => void
|
138 |
+
setImagePromptPrefix: (imagePromptPrefix?: string) => void
|
139 |
+
setImagePromptSuffix: (imagePromptSuffix?: string) => void
|
140 |
+
setImageNegativePrompt: (imageNegativePrompt?: string) => void
|
141 |
setVideoPromptPrefix: (videoPromptPrefix?: string) => void
|
142 |
setVideoPromptSuffix: (videoPromptSuffix?: string) => void
|
143 |
setVideoNegativePrompt: (videoNegativePrompt?: string) => void
|
144 |
|
145 |
+
setImageRenderingStrategy: (imageRenderingStrategy?: RenderingStrategy) => void
|
146 |
setVideoRenderingStrategy: (videoRenderingStrategy?: RenderingStrategy) => void
|
147 |
+
setVoiceRenderingStrategy: (voiceRenderingStrategy?: RenderingStrategy) => void
|
148 |
+
setSoundRenderingStrategy: (soundRenderingStrategy?: RenderingStrategy) => void
|
149 |
+
setMusicRenderingStrategy: (musicRenderingStrategy?: RenderingStrategy) => void
|
150 |
+
|
151 |
+
setMaxImagesToGenerateInParallel: (maxImagesToGenerateInParallel?: number) => void
|
152 |
setMaxVideosToGenerateInParallel: (maxVideosToGenerateInParallel?: number) => void
|
153 |
|
154 |
+
setComfyWorkflowForImage: (comfyWorkflowForImage?: string) => void
|
155 |
setComfyWorkflowForVideo: (comfyWorkflowForVideo?: string) => void
|
156 |
+
setComfyWorkflowForVoice: (comfyWorkflowForVoice?: string) => void
|
157 |
setComfyWorkflowForSound: (comfyWorkflowForSound?: string) => void
|
158 |
setComfyWorkflowForMusic: (comfyWorkflowForMusic?: string) => void
|
159 |
|
160 |
setHuggingFaceModelForAssistant: (huggingFaceModelForAssistant?: string) => void
|
161 |
setHuggingFaceModelForImage: (huggingFaceModelForImage?: string) => void
|
162 |
setHuggingFaceModelForVideo: (huggingFaceModelForVideo?: string) => void
|
163 |
+
setHuggingFaceModelForVoice: (huggingFaceModelForVoice?: string) => void
|
164 |
setHuggingFaceModelForSound: (huggingFaceModelForSound?: string) => void
|
165 |
setHuggingFaceModelForMusic: (huggingFaceModelForMusic?: string) => void
|
166 |
|
|
|
173 |
|
174 |
setReplicateModelForImage: (replicateModelForImage?: string) => void
|
175 |
setReplicateModelForVideo: (replicateModelForVideo?: string) => void
|
176 |
+
setReplicateModelForVoice: (replicateModelForVoice?: string) => void
|
177 |
setReplicateModelForSound: (replicateModelForSound?: string) => void
|
178 |
setReplicateModelForMusic: (replicateModelForMusic?: string) => void
|
179 |
|
180 |
setStabilityAiModelForImage: (stabilityAiModelForImage?: string) => void
|
181 |
setStabilityAiModelForVideo: (stabilityAiModelForVideo?: string) => void
|
182 |
+
setStabilityAiModelForVoice: (stabilityAiModelForVoice?: string) => void
|
183 |
setStabilityAiModelForSound: (stabilityAiModelForSound?: string) => void
|
184 |
setStabilityAiModelForMusic: (stabilityAiModelForMusic?: string) => void
|
185 |
|
186 |
setFalAiModelForImage: (falAiModelForImage?: string) => void
|
187 |
setFalAiModelForVideo: (falAiModelForVideo?: string) => void
|
188 |
+
setFalAiModelForVoice: (falAiModelForVoice?: string) => void
|
189 |
setFalAiModelForSound: (falAiModelForSound?: string) => void
|
190 |
setFalAiModelForMusic: (falAiModelForMusic?: string) => void
|
191 |
|
192 |
setModelsLabModelForImage: (modelsLabModelForImage?: string) => void
|
193 |
setModelsLabModelForVideo: (modelsLabModelForVideo?: string) => void
|
194 |
+
setModelsLabModelForVoice: (modelsLabModelForVoice?: string) => void
|
195 |
setModelsLabModelForSound: (modelsLabModelForSound?: string) => void
|
196 |
setModelsLabModelForMusic: (modelsLabModelForMusic?: string) => void
|
197 |
|
198 |
setOpenaiModelForAssistant: (openaiModelForAssistant?: string) => void
|
199 |
setOpenaiModelForImage: (openaiModelForImage?: string) => void
|
200 |
setOpenaiModelForVideo: (openaiModelForVideo?: string) => void
|
201 |
+
setOpenaiModelForVoice: (openaiModelForVoice?: string) => void
|
202 |
|
203 |
setGroqModelForAssistant: (groqModelForAssistant?: string) => void
|
204 |
|
205 |
setGoogleModelForAssistant: (googleModelForAssistant?: string) => void
|
206 |
setGoogleModelForImage: (googleModelForImage?: string) => void
|
207 |
setGoogleModelForVideo: (googleModelForVideo?: string) => void
|
208 |
+
setGoogleModelForVoice: (googleModelForVoice?: string) => void
|
209 |
setGoogleModelForMusic: (googleModelForMusic?: string) => void
|
210 |
|
211 |
setAnthropicModelForAssistant: (anthropicModelForAssistant?: string) => void
|
212 |
|
213 |
+
setElevenLabsModelForVoice: (elevenLabsModelForVoice?: string) => void
|
214 |
setElevenLabsModelForSound: (elevenLabsModelForSound?: string) => void
|
215 |
|
216 |
getSettings: () => SettingsState
|
src/controllers/settings/useSettings.ts
CHANGED
@@ -27,13 +27,13 @@ export const useSettings = create<SettingsStore>()(
|
|
27 |
const { videoProvider: defaultVideoProvider } = getDefaultSettingsState()
|
28 |
set({ videoProvider: parseComputeProvider(videoProvider, defaultVideoProvider) })
|
29 |
},
|
30 |
-
|
31 |
-
const {
|
32 |
-
set({
|
33 |
},
|
34 |
-
|
35 |
-
const {
|
36 |
-
set({
|
37 |
},
|
38 |
setSoundProvider: (soundProvider?: ComputeProvider) => {
|
39 |
const { soundProvider: defaultSoundProvider } = getDefaultSettingsState()
|
@@ -87,14 +87,14 @@ export const useSettings = create<SettingsStore>()(
|
|
87 |
setCensorNotForAllAudiencesContent: (censorNotForAllAudiencesContent?: boolean) => {
|
88 |
set({ censorNotForAllAudiencesContent: getValidBoolean(censorNotForAllAudiencesContent, getDefaultSettingsState().censorNotForAllAudiencesContent) })
|
89 |
},
|
90 |
-
|
91 |
-
set({
|
92 |
},
|
93 |
-
|
94 |
-
set({
|
95 |
},
|
96 |
-
|
97 |
-
set({
|
98 |
},
|
99 |
setVideoPromptPrefix: (videoPromptPrefix?: string) => {
|
100 |
set({ videoPromptPrefix: getValidString(videoPromptPrefix, getDefaultSettingsState().videoPromptPrefix) })
|
@@ -105,22 +105,34 @@ export const useSettings = create<SettingsStore>()(
|
|
105 |
setVideoNegativePrompt: (videoNegativePrompt?: string) => {
|
106 |
set({ videoNegativePrompt: getValidString(videoNegativePrompt, getDefaultSettingsState().videoNegativePrompt) })
|
107 |
},
|
108 |
-
|
109 |
-
const {
|
110 |
-
set({
|
111 |
},
|
112 |
setVideoRenderingStrategy: (videoRenderingStrategy?: RenderingStrategy) => {
|
113 |
const { videoRenderingStrategy: defaultVideoRenderingStrategy } = getDefaultSettingsState()
|
114 |
set({ videoRenderingStrategy: parseRenderingStrategy(videoRenderingStrategy, defaultVideoRenderingStrategy) })
|
115 |
},
|
116 |
-
|
117 |
-
const {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
set({
|
119 |
-
|
120 |
-
|
121 |
1,
|
122 |
HARD_LIMIT_NB_MAX_ASSETS_TO_GENERATE_IN_PARALLEL,
|
123 |
-
|
124 |
)
|
125 |
})
|
126 |
},
|
@@ -135,14 +147,14 @@ export const useSettings = create<SettingsStore>()(
|
|
135 |
)
|
136 |
})
|
137 |
},
|
138 |
-
|
139 |
-
set({
|
140 |
},
|
141 |
setComfyWorkflowForVideo: (comfyWorkflowForVideo?: string) => {
|
142 |
set({ comfyWorkflowForVideo: getValidComfyWorkflowTemplate(comfyWorkflowForVideo, getDefaultSettingsState().comfyWorkflowForVideo) })
|
143 |
},
|
144 |
-
|
145 |
-
set({
|
146 |
},
|
147 |
setComfyWorkflowForSound: (comfyWorkflowForSound?: string) => {
|
148 |
set({ comfyWorkflowForSound: getValidComfyWorkflowTemplate(comfyWorkflowForSound, getDefaultSettingsState().comfyWorkflowForSound) })
|
@@ -160,8 +172,8 @@ export const useSettings = create<SettingsStore>()(
|
|
160 |
setHuggingFaceModelForVideo: (huggingFaceModelForVideo?: string) => {
|
161 |
set({ huggingFaceModelForVideo: getValidString(huggingFaceModelForVideo, getDefaultSettingsState().huggingFaceModelForVideo) })
|
162 |
},
|
163 |
-
|
164 |
-
set({
|
165 |
},
|
166 |
setHuggingFaceModelForSound: (huggingFaceModelForSound?: string) => {
|
167 |
set({ huggingFaceModelForSound: getValidString(huggingFaceModelForSound, getDefaultSettingsState().huggingFaceModelForSound) })
|
@@ -193,8 +205,8 @@ export const useSettings = create<SettingsStore>()(
|
|
193 |
setReplicateModelForVideo: (replicateModelForVideo?: string) => {
|
194 |
set({ replicateModelForVideo: getValidString(replicateModelForVideo, getDefaultSettingsState().replicateModelForVideo) })
|
195 |
},
|
196 |
-
|
197 |
-
set({
|
198 |
},
|
199 |
setReplicateModelForSound: (replicateModelForSound?: string) => {
|
200 |
set({ replicateModelForSound: getValidString(replicateModelForSound, getDefaultSettingsState().replicateModelForSound) })
|
@@ -208,8 +220,8 @@ export const useSettings = create<SettingsStore>()(
|
|
208 |
setStabilityAiModelForVideo: (stabilityAiModelForVideo?: string) => {
|
209 |
set({ stabilityAiModelForVideo: getValidString(stabilityAiModelForVideo, getDefaultSettingsState().stabilityAiModelForVideo) })
|
210 |
},
|
211 |
-
|
212 |
-
set({
|
213 |
},
|
214 |
setStabilityAiModelForSound: (stabilityAiModelForSound?: string) => {
|
215 |
set({ stabilityAiModelForSound: getValidString(stabilityAiModelForSound, getDefaultSettingsState().stabilityAiModelForSound) })
|
@@ -223,8 +235,8 @@ export const useSettings = create<SettingsStore>()(
|
|
223 |
setFalAiModelForVideo: (falAiModelForVideo?: string) => {
|
224 |
set({ falAiModelForVideo: getValidString(falAiModelForVideo, getDefaultSettingsState().falAiModelForVideo) })
|
225 |
},
|
226 |
-
|
227 |
-
set({
|
228 |
},
|
229 |
setFalAiModelForSound: (falAiModelForSound?: string) => {
|
230 |
set({ falAiModelForSound: getValidString(falAiModelForSound, getDefaultSettingsState().falAiModelForSound) })
|
@@ -238,8 +250,8 @@ export const useSettings = create<SettingsStore>()(
|
|
238 |
setModelsLabModelForVideo: (modelsLabModelForVideo?: string) => {
|
239 |
set({ modelsLabModelForVideo: getValidString(modelsLabModelForVideo, getDefaultSettingsState().modelsLabModelForVideo) })
|
240 |
},
|
241 |
-
|
242 |
-
set({
|
243 |
},
|
244 |
setModelsLabModelForSound: (modelsLabModelForSound?: string) => {
|
245 |
set({ modelsLabModelForSound: getValidString(modelsLabModelForSound, getDefaultSettingsState().modelsLabModelForSound) })
|
@@ -256,8 +268,8 @@ export const useSettings = create<SettingsStore>()(
|
|
256 |
setOpenaiModelForVideo: (openaiModelForVideo?: string) => {
|
257 |
set({ openaiModelForVideo: getValidString(openaiModelForVideo, getDefaultSettingsState().openaiModelForVideo) })
|
258 |
},
|
259 |
-
|
260 |
-
set({
|
261 |
},
|
262 |
setGroqModelForAssistant: (groqModelForAssistant?: string) => {
|
263 |
set({ groqModelForAssistant: getValidString(groqModelForAssistant, getDefaultSettingsState().groqModelForAssistant) })
|
@@ -271,8 +283,8 @@ export const useSettings = create<SettingsStore>()(
|
|
271 |
setGoogleModelForVideo: (googleModelForVideo?: string) => {
|
272 |
set({ googleModelForVideo: getValidString(googleModelForVideo, getDefaultSettingsState().googleModelForVideo) })
|
273 |
},
|
274 |
-
|
275 |
-
set({
|
276 |
},
|
277 |
setGoogleModelForMusic: (googleModelForMusic?: string) => {
|
278 |
set({ googleModelForMusic: getValidString(googleModelForMusic, getDefaultSettingsState().googleModelForMusic) })
|
@@ -280,8 +292,8 @@ export const useSettings = create<SettingsStore>()(
|
|
280 |
setAnthropicModelForAssistant: (anthropicModelForAssistant?: string) => {
|
281 |
set({ anthropicModelForAssistant: getValidString(anthropicModelForAssistant, getDefaultSettingsState().anthropicModelForAssistant) })
|
282 |
},
|
283 |
-
|
284 |
-
set({
|
285 |
},
|
286 |
setElevenLabsModelForSound: (elevenLabsModelForSound?: string) => {
|
287 |
set({ elevenLabsModelForSound: getValidString(elevenLabsModelForSound, getDefaultSettingsState().elevenLabsModelForSound) })
|
@@ -293,10 +305,10 @@ export const useSettings = create<SettingsStore>()(
|
|
293 |
// why do we need those fallbacks? because some users will leave the fields empty,
|
294 |
// eg. an empty model string.. basically we want to allow empty config that still works!
|
295 |
assistantProvider: state.assistantProvider || defaultSettings.assistantProvider,
|
296 |
-
|
297 |
videoProvider: state.videoProvider || defaultSettings.videoProvider,
|
298 |
soundProvider: state.soundProvider || defaultSettings.soundProvider,
|
299 |
-
|
300 |
musicProvider: state.musicProvider || defaultSettings.musicProvider,
|
301 |
customComfyUiApiKey: state.customComfyUiApiKey || defaultSettings.customComfyUiApiKey,
|
302 |
replicateApiKey: state.replicateApiKey || defaultSettings.replicateApiKey,
|
@@ -311,25 +323,28 @@ export const useSettings = create<SettingsStore>()(
|
|
311 |
anthropicApiKey: state.anthropicApiKey || defaultSettings.anthropicApiKey,
|
312 |
elevenLabsApiKey: state.elevenLabsApiKey || defaultSettings.elevenLabsApiKey,
|
313 |
censorNotForAllAudiencesContent: state.censorNotForAllAudiencesContent || defaultSettings.censorNotForAllAudiencesContent,
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
videoPromptPrefix: state.videoPromptPrefix || defaultSettings.videoPromptPrefix,
|
318 |
videoPromptSuffix: state.videoPromptSuffix || defaultSettings.videoPromptSuffix,
|
319 |
videoNegativePrompt: state.videoNegativePrompt || defaultSettings.videoNegativePrompt,
|
320 |
-
|
321 |
videoRenderingStrategy: state.videoRenderingStrategy || defaultSettings.videoRenderingStrategy,
|
322 |
-
|
|
|
|
|
|
|
323 |
maxVideosToGenerateInParallel: state.maxVideosToGenerateInParallel || defaultSettings.maxVideosToGenerateInParallel,
|
324 |
-
|
325 |
comfyWorkflowForVideo: state.comfyWorkflowForVideo || defaultSettings.comfyWorkflowForVideo,
|
326 |
-
|
327 |
comfyWorkflowForSound: state.comfyWorkflowForSound || defaultSettings.comfyWorkflowForSound,
|
328 |
comfyWorkflowForMusic: state.comfyWorkflowForMusic || defaultSettings.comfyWorkflowForMusic,
|
329 |
huggingFaceModelForAssistant: state.huggingFaceModelForAssistant || defaultSettings.huggingFaceModelForAssistant,
|
330 |
huggingFaceModelForImage: state.huggingFaceModelForImage || defaultSettings.huggingFaceModelForImage,
|
331 |
huggingFaceModelForVideo: state.huggingFaceModelForVideo || defaultSettings.huggingFaceModelForVideo,
|
332 |
-
|
333 |
huggingFaceModelForSound: state.huggingFaceModelForSound || defaultSettings.huggingFaceModelForSound,
|
334 |
huggingFaceModelForMusic: state.huggingFaceModelForMusic || defaultSettings.huggingFaceModelForMusic,
|
335 |
gradioApiUrlForAssistant: state.gradioApiUrlForAssistant || defaultSettings.gradioApiUrlForAssistant,
|
@@ -340,36 +355,36 @@ export const useSettings = create<SettingsStore>()(
|
|
340 |
gradioApiUrlForMusic: state.gradioApiUrlForMusic || defaultSettings.gradioApiUrlForMusic,
|
341 |
replicateModelForImage: state.replicateModelForImage || defaultSettings.replicateModelForImage,
|
342 |
replicateModelForVideo: state.replicateModelForVideo || defaultSettings.replicateModelForVideo,
|
343 |
-
|
344 |
replicateModelForSound: state.replicateModelForSound || defaultSettings.replicateModelForSound,
|
345 |
replicateModelForMusic: state.replicateModelForMusic || defaultSettings.replicateModelForMusic,
|
346 |
stabilityAiModelForImage: state.stabilityAiModelForImage || defaultSettings.stabilityAiModelForImage,
|
347 |
stabilityAiModelForVideo: state.stabilityAiModelForVideo || defaultSettings.stabilityAiModelForVideo,
|
348 |
-
|
349 |
stabilityAiModelForSound: state.stabilityAiModelForSound || defaultSettings.stabilityAiModelForSound,
|
350 |
stabilityAiModelForMusic: state.stabilityAiModelForMusic || defaultSettings.stabilityAiModelForMusic,
|
351 |
falAiModelForImage: state.falAiModelForImage || defaultSettings.falAiModelForImage,
|
352 |
falAiModelForVideo: state.falAiModelForVideo || defaultSettings.falAiModelForVideo,
|
353 |
-
|
354 |
falAiModelForSound: state.falAiModelForSound || defaultSettings.falAiModelForSound,
|
355 |
falAiModelForMusic: state.falAiModelForMusic || defaultSettings.falAiModelForMusic,
|
356 |
modelsLabModelForImage: state.modelsLabModelForImage || defaultSettings.modelsLabModelForImage,
|
357 |
modelsLabModelForVideo: state.modelsLabModelForVideo || defaultSettings.modelsLabModelForVideo,
|
358 |
-
|
359 |
modelsLabModelForSound: state.modelsLabModelForSound || defaultSettings.modelsLabModelForSound,
|
360 |
modelsLabModelForMusic: state.modelsLabModelForMusic || defaultSettings.modelsLabModelForMusic,
|
361 |
openaiModelForAssistant: state.openaiModelForAssistant || defaultSettings.openaiModelForAssistant,
|
362 |
openaiModelForImage: state.openaiModelForImage || defaultSettings.openaiModelForImage,
|
363 |
openaiModelForVideo: state.openaiModelForVideo || defaultSettings.openaiModelForVideo,
|
364 |
-
|
365 |
groqModelForAssistant: state.groqModelForAssistant || defaultSettings.groqModelForAssistant,
|
366 |
googleModelForAssistant: state.googleModelForAssistant || defaultSettings.googleModelForAssistant,
|
367 |
googleModelForImage: state.googleModelForImage || defaultSettings.googleModelForImage,
|
368 |
googleModelForVideo: state.googleModelForVideo || defaultSettings.googleModelForVideo,
|
369 |
-
|
370 |
googleModelForMusic: state.googleModelForMusic || defaultSettings.googleModelForMusic,
|
371 |
anthropicModelForAssistant: state.anthropicModelForAssistant || defaultSettings.anthropicModelForAssistant,
|
372 |
-
|
373 |
elevenLabsModelForSound: state.elevenLabsModelForSound || defaultSettings.elevenLabsModelForSound,
|
374 |
}
|
375 |
},
|
|
|
27 |
const { videoProvider: defaultVideoProvider } = getDefaultSettingsState()
|
28 |
set({ videoProvider: parseComputeProvider(videoProvider, defaultVideoProvider) })
|
29 |
},
|
30 |
+
setImageProvider: (imageProvider?: ComputeProvider) => {
|
31 |
+
const { imageProvider: defaultImageProvider } = getDefaultSettingsState()
|
32 |
+
set({ imageProvider: parseComputeProvider(imageProvider, defaultImageProvider) })
|
33 |
},
|
34 |
+
setVoiceProvider: (voiceProvider?: ComputeProvider) => {
|
35 |
+
const { voiceProvider: defaultSpeechProvider } = getDefaultSettingsState()
|
36 |
+
set({ voiceProvider: parseComputeProvider(voiceProvider, defaultSpeechProvider) })
|
37 |
},
|
38 |
setSoundProvider: (soundProvider?: ComputeProvider) => {
|
39 |
const { soundProvider: defaultSoundProvider } = getDefaultSettingsState()
|
|
|
87 |
setCensorNotForAllAudiencesContent: (censorNotForAllAudiencesContent?: boolean) => {
|
88 |
set({ censorNotForAllAudiencesContent: getValidBoolean(censorNotForAllAudiencesContent, getDefaultSettingsState().censorNotForAllAudiencesContent) })
|
89 |
},
|
90 |
+
setImagePromptPrefix: (imagePromptPrefix?: string) => {
|
91 |
+
set({ imagePromptPrefix: getValidString(imagePromptPrefix, getDefaultSettingsState().imagePromptPrefix) })
|
92 |
},
|
93 |
+
setImagePromptSuffix: (imagePromptSuffix?: string) => {
|
94 |
+
set({ imagePromptSuffix: getValidString(imagePromptSuffix, getDefaultSettingsState().imagePromptSuffix) })
|
95 |
},
|
96 |
+
setImageNegativePrompt: (imageNegativePrompt?: string) => {
|
97 |
+
set({ imageNegativePrompt: getValidString(imageNegativePrompt, getDefaultSettingsState().imageNegativePrompt) })
|
98 |
},
|
99 |
setVideoPromptPrefix: (videoPromptPrefix?: string) => {
|
100 |
set({ videoPromptPrefix: getValidString(videoPromptPrefix, getDefaultSettingsState().videoPromptPrefix) })
|
|
|
105 |
setVideoNegativePrompt: (videoNegativePrompt?: string) => {
|
106 |
set({ videoNegativePrompt: getValidString(videoNegativePrompt, getDefaultSettingsState().videoNegativePrompt) })
|
107 |
},
|
108 |
+
setImageRenderingStrategy: (imageRenderingStrategy?: RenderingStrategy) => {
|
109 |
+
const { imageRenderingStrategy: defaulImageRenderingStrategy } = getDefaultSettingsState()
|
110 |
+
set({ imageRenderingStrategy: parseRenderingStrategy(imageRenderingStrategy, defaulImageRenderingStrategy) })
|
111 |
},
|
112 |
setVideoRenderingStrategy: (videoRenderingStrategy?: RenderingStrategy) => {
|
113 |
const { videoRenderingStrategy: defaultVideoRenderingStrategy } = getDefaultSettingsState()
|
114 |
set({ videoRenderingStrategy: parseRenderingStrategy(videoRenderingStrategy, defaultVideoRenderingStrategy) })
|
115 |
},
|
116 |
+
setVoiceRenderingStrategy: (voiceRenderingStrategy?: RenderingStrategy) => {
|
117 |
+
const { voiceRenderingStrategy: defaultSpeechRenderingStrategy } = getDefaultSettingsState()
|
118 |
+
set({ voiceRenderingStrategy: parseRenderingStrategy(voiceRenderingStrategy, defaultSpeechRenderingStrategy) })
|
119 |
+
},
|
120 |
+
setSoundRenderingStrategy: (soundRenderingStrategy?: RenderingStrategy) => {
|
121 |
+
const { soundRenderingStrategy: defaultSoundRenderingStrategy } = getDefaultSettingsState()
|
122 |
+
set({ soundRenderingStrategy: parseRenderingStrategy(soundRenderingStrategy, defaultSoundRenderingStrategy) })
|
123 |
+
},
|
124 |
+
setMusicRenderingStrategy: (musicRenderingStrategy?: RenderingStrategy) => {
|
125 |
+
const { musicRenderingStrategy: defaultMusicRenderingStrategy } = getDefaultSettingsState()
|
126 |
+
set({ musicRenderingStrategy: parseRenderingStrategy(musicRenderingStrategy, defaultMusicRenderingStrategy) })
|
127 |
+
},
|
128 |
+
setMaxImagesToGenerateInParallel: (maxImagesToGenerateInParallel?: number) => {
|
129 |
+
const { maxImagesToGenerateInParallel: defaultMaxImagesToGenerateInParallel } = getDefaultSettingsState()
|
130 |
set({
|
131 |
+
maxImagesToGenerateInParallel: getValidNumber(
|
132 |
+
maxImagesToGenerateInParallel,
|
133 |
1,
|
134 |
HARD_LIMIT_NB_MAX_ASSETS_TO_GENERATE_IN_PARALLEL,
|
135 |
+
defaultMaxImagesToGenerateInParallel
|
136 |
)
|
137 |
})
|
138 |
},
|
|
|
147 |
)
|
148 |
})
|
149 |
},
|
150 |
+
setComfyWorkflowForImage: (comfyWorkflowForImage?: string) => {
|
151 |
+
set({ comfyWorkflowForImage: getValidComfyWorkflowTemplate(comfyWorkflowForImage, getDefaultSettingsState().comfyWorkflowForImage) })
|
152 |
},
|
153 |
setComfyWorkflowForVideo: (comfyWorkflowForVideo?: string) => {
|
154 |
set({ comfyWorkflowForVideo: getValidComfyWorkflowTemplate(comfyWorkflowForVideo, getDefaultSettingsState().comfyWorkflowForVideo) })
|
155 |
},
|
156 |
+
setComfyWorkflowForVoice: (comfyWorkflowForVoice?: string) => {
|
157 |
+
set({ comfyWorkflowForVoice: getValidComfyWorkflowTemplate(comfyWorkflowForVoice, getDefaultSettingsState().comfyWorkflowForVoice) })
|
158 |
},
|
159 |
setComfyWorkflowForSound: (comfyWorkflowForSound?: string) => {
|
160 |
set({ comfyWorkflowForSound: getValidComfyWorkflowTemplate(comfyWorkflowForSound, getDefaultSettingsState().comfyWorkflowForSound) })
|
|
|
172 |
setHuggingFaceModelForVideo: (huggingFaceModelForVideo?: string) => {
|
173 |
set({ huggingFaceModelForVideo: getValidString(huggingFaceModelForVideo, getDefaultSettingsState().huggingFaceModelForVideo) })
|
174 |
},
|
175 |
+
setHuggingFaceModelForVoice: (huggingFaceModelForVoice?: string) => {
|
176 |
+
set({ huggingFaceModelForVoice: getValidString(huggingFaceModelForVoice, getDefaultSettingsState().huggingFaceModelForVoice) })
|
177 |
},
|
178 |
setHuggingFaceModelForSound: (huggingFaceModelForSound?: string) => {
|
179 |
set({ huggingFaceModelForSound: getValidString(huggingFaceModelForSound, getDefaultSettingsState().huggingFaceModelForSound) })
|
|
|
205 |
setReplicateModelForVideo: (replicateModelForVideo?: string) => {
|
206 |
set({ replicateModelForVideo: getValidString(replicateModelForVideo, getDefaultSettingsState().replicateModelForVideo) })
|
207 |
},
|
208 |
+
setReplicateModelForVoice: (replicateModelForVoice?: string) => {
|
209 |
+
set({ replicateModelForVoice: getValidString(replicateModelForVoice, getDefaultSettingsState().replicateModelForVoice) })
|
210 |
},
|
211 |
setReplicateModelForSound: (replicateModelForSound?: string) => {
|
212 |
set({ replicateModelForSound: getValidString(replicateModelForSound, getDefaultSettingsState().replicateModelForSound) })
|
|
|
220 |
setStabilityAiModelForVideo: (stabilityAiModelForVideo?: string) => {
|
221 |
set({ stabilityAiModelForVideo: getValidString(stabilityAiModelForVideo, getDefaultSettingsState().stabilityAiModelForVideo) })
|
222 |
},
|
223 |
+
setStabilityAiModelForVoice: (stabilityAiModelForVoice?: string) => {
|
224 |
+
set({ stabilityAiModelForVoice: getValidString(stabilityAiModelForVoice, getDefaultSettingsState().stabilityAiModelForVoice) })
|
225 |
},
|
226 |
setStabilityAiModelForSound: (stabilityAiModelForSound?: string) => {
|
227 |
set({ stabilityAiModelForSound: getValidString(stabilityAiModelForSound, getDefaultSettingsState().stabilityAiModelForSound) })
|
|
|
235 |
setFalAiModelForVideo: (falAiModelForVideo?: string) => {
|
236 |
set({ falAiModelForVideo: getValidString(falAiModelForVideo, getDefaultSettingsState().falAiModelForVideo) })
|
237 |
},
|
238 |
+
setFalAiModelForVoice: (falAiModelForVoice?: string) => {
|
239 |
+
set({ falAiModelForVoice: getValidString(falAiModelForVoice, getDefaultSettingsState().falAiModelForVoice) })
|
240 |
},
|
241 |
setFalAiModelForSound: (falAiModelForSound?: string) => {
|
242 |
set({ falAiModelForSound: getValidString(falAiModelForSound, getDefaultSettingsState().falAiModelForSound) })
|
|
|
250 |
setModelsLabModelForVideo: (modelsLabModelForVideo?: string) => {
|
251 |
set({ modelsLabModelForVideo: getValidString(modelsLabModelForVideo, getDefaultSettingsState().modelsLabModelForVideo) })
|
252 |
},
|
253 |
+
setModelsLabModelForVoice: (modelsLabModelForVoice?: string) => {
|
254 |
+
set({ modelsLabModelForVoice: getValidString(modelsLabModelForVoice, getDefaultSettingsState().modelsLabModelForVoice) })
|
255 |
},
|
256 |
setModelsLabModelForSound: (modelsLabModelForSound?: string) => {
|
257 |
set({ modelsLabModelForSound: getValidString(modelsLabModelForSound, getDefaultSettingsState().modelsLabModelForSound) })
|
|
|
268 |
setOpenaiModelForVideo: (openaiModelForVideo?: string) => {
|
269 |
set({ openaiModelForVideo: getValidString(openaiModelForVideo, getDefaultSettingsState().openaiModelForVideo) })
|
270 |
},
|
271 |
+
setOpenaiModelForVoice: (openaiModelForVoice?: string) => {
|
272 |
+
set({ openaiModelForVoice: getValidString(openaiModelForVoice, getDefaultSettingsState().openaiModelForVoice) })
|
273 |
},
|
274 |
setGroqModelForAssistant: (groqModelForAssistant?: string) => {
|
275 |
set({ groqModelForAssistant: getValidString(groqModelForAssistant, getDefaultSettingsState().groqModelForAssistant) })
|
|
|
283 |
setGoogleModelForVideo: (googleModelForVideo?: string) => {
|
284 |
set({ googleModelForVideo: getValidString(googleModelForVideo, getDefaultSettingsState().googleModelForVideo) })
|
285 |
},
|
286 |
+
setGoogleModelForVoice: (googleModelForVoice?: string) => {
|
287 |
+
set({ googleModelForVoice: getValidString(googleModelForVoice, getDefaultSettingsState().googleModelForVoice) })
|
288 |
},
|
289 |
setGoogleModelForMusic: (googleModelForMusic?: string) => {
|
290 |
set({ googleModelForMusic: getValidString(googleModelForMusic, getDefaultSettingsState().googleModelForMusic) })
|
|
|
292 |
setAnthropicModelForAssistant: (anthropicModelForAssistant?: string) => {
|
293 |
set({ anthropicModelForAssistant: getValidString(anthropicModelForAssistant, getDefaultSettingsState().anthropicModelForAssistant) })
|
294 |
},
|
295 |
+
setElevenLabsModelForVoice: (elevenLabsModelForVoice?: string) => {
|
296 |
+
set({ elevenLabsModelForVoice: getValidString(elevenLabsModelForVoice, getDefaultSettingsState().elevenLabsModelForVoice) })
|
297 |
},
|
298 |
setElevenLabsModelForSound: (elevenLabsModelForSound?: string) => {
|
299 |
set({ elevenLabsModelForSound: getValidString(elevenLabsModelForSound, getDefaultSettingsState().elevenLabsModelForSound) })
|
|
|
305 |
// why do we need those fallbacks? because some users will leave the fields empty,
|
306 |
// eg. an empty model string.. basically we want to allow empty config that still works!
|
307 |
assistantProvider: state.assistantProvider || defaultSettings.assistantProvider,
|
308 |
+
imageProvider: state.imageProvider || defaultSettings.imageProvider,
|
309 |
videoProvider: state.videoProvider || defaultSettings.videoProvider,
|
310 |
soundProvider: state.soundProvider || defaultSettings.soundProvider,
|
311 |
+
voiceProvider: state.voiceProvider || defaultSettings.voiceProvider,
|
312 |
musicProvider: state.musicProvider || defaultSettings.musicProvider,
|
313 |
customComfyUiApiKey: state.customComfyUiApiKey || defaultSettings.customComfyUiApiKey,
|
314 |
replicateApiKey: state.replicateApiKey || defaultSettings.replicateApiKey,
|
|
|
323 |
anthropicApiKey: state.anthropicApiKey || defaultSettings.anthropicApiKey,
|
324 |
elevenLabsApiKey: state.elevenLabsApiKey || defaultSettings.elevenLabsApiKey,
|
325 |
censorNotForAllAudiencesContent: state.censorNotForAllAudiencesContent || defaultSettings.censorNotForAllAudiencesContent,
|
326 |
+
imagePromptPrefix: state.imagePromptPrefix || defaultSettings.imagePromptPrefix,
|
327 |
+
imagePromptSuffix: state.imagePromptSuffix || defaultSettings.imagePromptSuffix,
|
328 |
+
imageNegativePrompt: state.imageNegativePrompt || defaultSettings.imageNegativePrompt,
|
329 |
videoPromptPrefix: state.videoPromptPrefix || defaultSettings.videoPromptPrefix,
|
330 |
videoPromptSuffix: state.videoPromptSuffix || defaultSettings.videoPromptSuffix,
|
331 |
videoNegativePrompt: state.videoNegativePrompt || defaultSettings.videoNegativePrompt,
|
332 |
+
imageRenderingStrategy: state.imageRenderingStrategy || defaultSettings.imageRenderingStrategy,
|
333 |
videoRenderingStrategy: state.videoRenderingStrategy || defaultSettings.videoRenderingStrategy,
|
334 |
+
voiceRenderingStrategy: state.voiceRenderingStrategy || defaultSettings.voiceRenderingStrategy,
|
335 |
+
soundRenderingStrategy: state.soundRenderingStrategy || defaultSettings.soundRenderingStrategy,
|
336 |
+
musicRenderingStrategy: state.musicRenderingStrategy || defaultSettings.musicRenderingStrategy,
|
337 |
+
maxImagesToGenerateInParallel: state.maxImagesToGenerateInParallel || defaultSettings.maxImagesToGenerateInParallel,
|
338 |
maxVideosToGenerateInParallel: state.maxVideosToGenerateInParallel || defaultSettings.maxVideosToGenerateInParallel,
|
339 |
+
comfyWorkflowForImage: state.comfyWorkflowForImage || defaultSettings.comfyWorkflowForImage,
|
340 |
comfyWorkflowForVideo: state.comfyWorkflowForVideo || defaultSettings.comfyWorkflowForVideo,
|
341 |
+
comfyWorkflowForVoice: state.comfyWorkflowForVoice || defaultSettings.comfyWorkflowForVoice,
|
342 |
comfyWorkflowForSound: state.comfyWorkflowForSound || defaultSettings.comfyWorkflowForSound,
|
343 |
comfyWorkflowForMusic: state.comfyWorkflowForMusic || defaultSettings.comfyWorkflowForMusic,
|
344 |
huggingFaceModelForAssistant: state.huggingFaceModelForAssistant || defaultSettings.huggingFaceModelForAssistant,
|
345 |
huggingFaceModelForImage: state.huggingFaceModelForImage || defaultSettings.huggingFaceModelForImage,
|
346 |
huggingFaceModelForVideo: state.huggingFaceModelForVideo || defaultSettings.huggingFaceModelForVideo,
|
347 |
+
huggingFaceModelForVoice: state.huggingFaceModelForVoice || defaultSettings.huggingFaceModelForVoice,
|
348 |
huggingFaceModelForSound: state.huggingFaceModelForSound || defaultSettings.huggingFaceModelForSound,
|
349 |
huggingFaceModelForMusic: state.huggingFaceModelForMusic || defaultSettings.huggingFaceModelForMusic,
|
350 |
gradioApiUrlForAssistant: state.gradioApiUrlForAssistant || defaultSettings.gradioApiUrlForAssistant,
|
|
|
355 |
gradioApiUrlForMusic: state.gradioApiUrlForMusic || defaultSettings.gradioApiUrlForMusic,
|
356 |
replicateModelForImage: state.replicateModelForImage || defaultSettings.replicateModelForImage,
|
357 |
replicateModelForVideo: state.replicateModelForVideo || defaultSettings.replicateModelForVideo,
|
358 |
+
replicateModelForVoice: state.replicateModelForVoice || defaultSettings.replicateModelForVoice,
|
359 |
replicateModelForSound: state.replicateModelForSound || defaultSettings.replicateModelForSound,
|
360 |
replicateModelForMusic: state.replicateModelForMusic || defaultSettings.replicateModelForMusic,
|
361 |
stabilityAiModelForImage: state.stabilityAiModelForImage || defaultSettings.stabilityAiModelForImage,
|
362 |
stabilityAiModelForVideo: state.stabilityAiModelForVideo || defaultSettings.stabilityAiModelForVideo,
|
363 |
+
stabilityAiModelForVoice: state.stabilityAiModelForVoice || defaultSettings.stabilityAiModelForVoice,
|
364 |
stabilityAiModelForSound: state.stabilityAiModelForSound || defaultSettings.stabilityAiModelForSound,
|
365 |
stabilityAiModelForMusic: state.stabilityAiModelForMusic || defaultSettings.stabilityAiModelForMusic,
|
366 |
falAiModelForImage: state.falAiModelForImage || defaultSettings.falAiModelForImage,
|
367 |
falAiModelForVideo: state.falAiModelForVideo || defaultSettings.falAiModelForVideo,
|
368 |
+
falAiModelForVoice: state.falAiModelForVoice || defaultSettings.falAiModelForVoice,
|
369 |
falAiModelForSound: state.falAiModelForSound || defaultSettings.falAiModelForSound,
|
370 |
falAiModelForMusic: state.falAiModelForMusic || defaultSettings.falAiModelForMusic,
|
371 |
modelsLabModelForImage: state.modelsLabModelForImage || defaultSettings.modelsLabModelForImage,
|
372 |
modelsLabModelForVideo: state.modelsLabModelForVideo || defaultSettings.modelsLabModelForVideo,
|
373 |
+
modelsLabModelForVoice: state.modelsLabModelForVoice || defaultSettings.modelsLabModelForVoice,
|
374 |
modelsLabModelForSound: state.modelsLabModelForSound || defaultSettings.modelsLabModelForSound,
|
375 |
modelsLabModelForMusic: state.modelsLabModelForMusic || defaultSettings.modelsLabModelForMusic,
|
376 |
openaiModelForAssistant: state.openaiModelForAssistant || defaultSettings.openaiModelForAssistant,
|
377 |
openaiModelForImage: state.openaiModelForImage || defaultSettings.openaiModelForImage,
|
378 |
openaiModelForVideo: state.openaiModelForVideo || defaultSettings.openaiModelForVideo,
|
379 |
+
openaiModelForVoice: state.openaiModelForVoice || defaultSettings.openaiModelForVoice,
|
380 |
groqModelForAssistant: state.groqModelForAssistant || defaultSettings.groqModelForAssistant,
|
381 |
googleModelForAssistant: state.googleModelForAssistant || defaultSettings.googleModelForAssistant,
|
382 |
googleModelForImage: state.googleModelForImage || defaultSettings.googleModelForImage,
|
383 |
googleModelForVideo: state.googleModelForVideo || defaultSettings.googleModelForVideo,
|
384 |
+
googleModelForVoice: state.googleModelForVoice || defaultSettings.googleModelForVoice,
|
385 |
googleModelForMusic: state.googleModelForMusic || defaultSettings.googleModelForMusic,
|
386 |
anthropicModelForAssistant: state.anthropicModelForAssistant || defaultSettings.anthropicModelForAssistant,
|
387 |
+
elevenLabsModelForVoice: state.elevenLabsModelForVoice || defaultSettings.elevenLabsModelForVoice,
|
388 |
elevenLabsModelForSound: state.elevenLabsModelForSound || defaultSettings.elevenLabsModelForSound,
|
389 |
}
|
390 |
},
|
src/controllers/settings/workflows/{storyboard.ts β image.ts}
RENAMED
@@ -1,7 +1,7 @@
|
|
1 |
|
2 |
|
3 |
// https://replicate.com/fofr/any-comfyui-workflow/examples#ps4f5zcthdrgm0cfqh586zed7r
|
4 |
-
export const
|
5 |
"3": {
|
6 |
"inputs": {
|
7 |
"seed": 156680208700286,
|
|
|
1 |
|
2 |
|
3 |
// https://replicate.com/fofr/any-comfyui-workflow/examples#ps4f5zcthdrgm0cfqh586zed7r
|
4 |
+
export const defaultWorkflowForImages = JSON.stringify({
|
5 |
"3": {
|
6 |
"inputs": {
|
7 |
"seed": 156680208700286,
|
src/lib/utils/getRenderRequestPrompts.ts
CHANGED
@@ -26,13 +26,13 @@ export function getRenderRequestPrompts({
|
|
26 |
segment.category === ClapSegmentCategory.VIDEO
|
27 |
? settings.videoPromptPrefix
|
28 |
: segment.category === ClapSegmentCategory.STORYBOARD
|
29 |
-
? settings.
|
30 |
: "",
|
31 |
videoPrompt,
|
32 |
segment.category === ClapSegmentCategory.VIDEO
|
33 |
? settings.videoPromptSuffix
|
34 |
: segment.category === ClapSegmentCategory.STORYBOARD
|
35 |
-
? settings.
|
36 |
: ""
|
37 |
].map(x => x.trim()).join(", ")
|
38 |
|
@@ -40,7 +40,7 @@ export function getRenderRequestPrompts({
|
|
40 |
segment.category === ClapSegmentCategory.VIDEO
|
41 |
? settings.videoNegativePrompt
|
42 |
: segment.category === ClapSegmentCategory.STORYBOARD
|
43 |
-
? settings.
|
44 |
: ""
|
45 |
].map(x => x.trim()).join(", ")
|
46 |
|
|
|
26 |
segment.category === ClapSegmentCategory.VIDEO
|
27 |
? settings.videoPromptPrefix
|
28 |
: segment.category === ClapSegmentCategory.STORYBOARD
|
29 |
+
? settings.imagePromptPrefix
|
30 |
: "",
|
31 |
videoPrompt,
|
32 |
segment.category === ClapSegmentCategory.VIDEO
|
33 |
? settings.videoPromptSuffix
|
34 |
: segment.category === ClapSegmentCategory.STORYBOARD
|
35 |
+
? settings.imagePromptSuffix
|
36 |
: ""
|
37 |
].map(x => x.trim()).join(", ")
|
38 |
|
|
|
40 |
segment.category === ClapSegmentCategory.VIDEO
|
41 |
? settings.videoNegativePrompt
|
42 |
: segment.category === ClapSegmentCategory.STORYBOARD
|
43 |
+
? settings.imageNegativePrompt
|
44 |
: ""
|
45 |
].map(x => x.trim()).join(", ")
|
46 |
|