mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Remove Block Entropy references
Block Entropy shut down their service at the end of 2024.
This commit is contained in:
@ -77,7 +77,6 @@ const sources = {
|
||||
drawthings: 'drawthings',
|
||||
pollinations: 'pollinations',
|
||||
stability: 'stability',
|
||||
blockentropy: 'blockentropy',
|
||||
huggingface: 'huggingface',
|
||||
nanogpt: 'nanogpt',
|
||||
bfl: 'bfl',
|
||||
@ -1300,7 +1299,6 @@ async function onModelChange() {
|
||||
sources.togetherai,
|
||||
sources.pollinations,
|
||||
sources.stability,
|
||||
sources.blockentropy,
|
||||
sources.huggingface,
|
||||
sources.nanogpt,
|
||||
sources.bfl,
|
||||
@ -1511,9 +1509,6 @@ async function loadSamplers() {
|
||||
case sources.stability:
|
||||
samplers = ['N/A'];
|
||||
break;
|
||||
case sources.blockentropy:
|
||||
samplers = ['N/A'];
|
||||
break;
|
||||
case sources.huggingface:
|
||||
samplers = ['N/A'];
|
||||
break;
|
||||
@ -1701,9 +1696,6 @@ async function loadModels() {
|
||||
case sources.stability:
|
||||
models = await loadStabilityModels();
|
||||
break;
|
||||
case sources.blockentropy:
|
||||
models = await loadBlockEntropyModels();
|
||||
break;
|
||||
case sources.huggingface:
|
||||
models = [{ value: '', text: '<Enter Model ID above>' }];
|
||||
break;
|
||||
@ -1799,26 +1791,6 @@ async function loadTogetherAIModels() {
|
||||
return [];
|
||||
}
|
||||
|
||||
async function loadBlockEntropyModels() {
|
||||
if (!secret_state[SECRET_KEYS.BLOCKENTROPY]) {
|
||||
console.debug('Block Entropy API key is not set.');
|
||||
return [];
|
||||
}
|
||||
|
||||
const result = await fetch('/api/sd/blockentropy/models', {
|
||||
method: 'POST',
|
||||
headers: getRequestHeaders(),
|
||||
});
|
||||
console.log(result);
|
||||
if (result.ok) {
|
||||
const data = await result.json();
|
||||
console.log(data);
|
||||
return data;
|
||||
}
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
async function loadNanoGPTModels() {
|
||||
if (!secret_state[SECRET_KEYS.NANOGPT]) {
|
||||
console.debug('NanoGPT API key is not set.');
|
||||
@ -2097,9 +2069,6 @@ async function loadSchedulers() {
|
||||
case sources.stability:
|
||||
schedulers = ['N/A'];
|
||||
break;
|
||||
case sources.blockentropy:
|
||||
schedulers = ['N/A'];
|
||||
break;
|
||||
case sources.huggingface:
|
||||
schedulers = ['N/A'];
|
||||
break;
|
||||
@ -2188,9 +2157,6 @@ async function loadVaes() {
|
||||
case sources.stability:
|
||||
vaes = ['N/A'];
|
||||
break;
|
||||
case sources.blockentropy:
|
||||
vaes = ['N/A'];
|
||||
break;
|
||||
case sources.huggingface:
|
||||
vaes = ['N/A'];
|
||||
break;
|
||||
@ -2757,9 +2723,6 @@ async function sendGenerationRequest(generationType, prompt, additionalNegativeP
|
||||
case sources.stability:
|
||||
result = await generateStabilityImage(prefixedPrompt, negativePrompt, signal);
|
||||
break;
|
||||
case sources.blockentropy:
|
||||
result = await generateBlockEntropyImage(prefixedPrompt, negativePrompt, signal);
|
||||
break;
|
||||
case sources.huggingface:
|
||||
result = await generateHuggingFaceImage(prefixedPrompt, signal);
|
||||
break;
|
||||
@ -2828,40 +2791,6 @@ async function generateTogetherAIImage(prompt, negativePrompt, signal) {
|
||||
}
|
||||
}
|
||||
|
||||
async function generateBlockEntropyImage(prompt, negativePrompt, signal) {
|
||||
const result = await fetch('/api/sd/blockentropy/generate', {
|
||||
method: 'POST',
|
||||
headers: getRequestHeaders(),
|
||||
signal: signal,
|
||||
body: JSON.stringify({
|
||||
prompt: prompt,
|
||||
negative_prompt: negativePrompt,
|
||||
model: extension_settings.sd.model,
|
||||
steps: extension_settings.sd.steps,
|
||||
width: extension_settings.sd.width,
|
||||
height: extension_settings.sd.height,
|
||||
seed: extension_settings.sd.seed >= 0 ? extension_settings.sd.seed : undefined,
|
||||
}),
|
||||
});
|
||||
|
||||
if (result.ok) {
|
||||
const data = await result.json();
|
||||
|
||||
// Default format is 'jpg'
|
||||
let format = 'jpg';
|
||||
|
||||
// Check if a format is specified in the result
|
||||
if (data.format) {
|
||||
format = data.format.toLowerCase();
|
||||
}
|
||||
|
||||
return { format: format, data: data.images[0] };
|
||||
} else {
|
||||
const text = await result.text();
|
||||
throw new Error(text);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates an image using the Pollinations API.
|
||||
* @param {string} prompt - The main instruction used to guide the image generation.
|
||||
@ -3845,8 +3774,6 @@ function isValidState() {
|
||||
return true;
|
||||
case sources.stability:
|
||||
return secret_state[SECRET_KEYS.STABILITY];
|
||||
case sources.blockentropy:
|
||||
return secret_state[SECRET_KEYS.BLOCKENTROPY];
|
||||
case sources.huggingface:
|
||||
return secret_state[SECRET_KEYS.HUGGINGFACE];
|
||||
case sources.nanogpt:
|
||||
|
Reference in New Issue
Block a user