Load pollinations models from an endpoint

This commit is contained in:
Cohee
2024-09-10 10:51:48 +00:00
parent 4522d3cbae
commit 8948354bf0
2 changed files with 36 additions and 22 deletions

View File

@ -1692,28 +1692,17 @@ async function loadStabilityModels() {
}
async function loadPollinationsModels() {
return [
{
value: 'flux',
text: 'FLUX.1 [schnell]',
},
{
value: 'flux-realism',
text: 'FLUX Realism',
},
{
value: 'flux-anime',
text: 'FLUX Anime',
},
{
value: 'flux-3d',
text: 'FLUX 3D',
},
{
value: 'turbo',
text: 'SDXL Turbo',
},
];
const result = await fetch('/api/sd/pollinations/models', {
method: 'POST',
headers: getRequestHeaders(),
});
if (result.ok) {
const data = await result.json();
return data;
}
return [];
}
async function loadTogetherAIModels() {