Remove Block Entropy references Block Entropy shut down their service at the end of 2024.

2a31f6af2db20c0b7003c9abf5894c57e0d405e2

equal-l2 <eng.equall2@gmail.com>

11 files changed, +1 -269Ignore whitespace
public/index.html+0 -15
@@ -2745,7 +2745,6 @@
27452745 <optgroup>
27462746 <option value="01ai">01.AI (Yi)</option>
27472747 <option value="ai21">AI21</option>
2748- <option value="blockentropy">Block Entropy</option>
27492748 <option value="claude">Claude</option>
27502749 <option value="cohere">Cohere</option>
27512750 <option value="deepseek">DeepSeek</option>
@@ -3375,20 +3374,6 @@
33753374 </select>
33763375 </div>
33773376 </form>
3378- <form id="blockentropy_form" data-source="blockentropy">
3379- <h4 data-i18n="Block Entropy API Key">Block Entropy API Key</h4>
3380- <div class="flex-container">
3381- <input id="api_key_blockentropy" name="api_key_blockentropy" class="text_pole flex1" value="" type="text" autocomplete="off">
3382- <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_blockentropy"></div>
3383- </div>
3384- <div data-for="api_key_blockentropy" class="neutral_warning" data-i18n="For privacy reasons, your API key will be hidden after you reload the page.">
3385- For privacy reasons, your API key will be hidden after you reload the page.
3386- </div>
3387- <h4 data-i18n="Select a Model">Select a Model</h4>
3388- <div class="flex-container">
3389- <select id="model_blockentropy_select" class="text_pole"></select>
3390- </div>
3391- </form>
33923377 <form id="custom_form" data-source="custom">
33933378 <h4 data-i18n="Custom Endpoint (Base URL)">Custom Endpoint (Base URL)</h4>
33943379 <div class="flex-container">
public/scripts/extensions/stable-diffusion/index.js+0 -73
@@ -77,7 +77,6 @@ const sources = {
7777 drawthings: 'drawthings',
7878 pollinations: 'pollinations',
7979 stability: 'stability',
80- blockentropy: 'blockentropy',
8180 huggingface: 'huggingface',
8281 nanogpt: 'nanogpt',
8382 bfl: 'bfl',
@@ -1300,7 +1299,6 @@ async function onModelChange() {
13001299 sources.togetherai,
13011300 sources.pollinations,
13021301 sources.stability,
1303- sources.blockentropy,
13041302 sources.huggingface,
13051303 sources.nanogpt,
13061304 sources.bfl,
@@ -1511,9 +1509,6 @@ async function loadSamplers() {
15111509 case sources.stability:
15121510 samplers = ['N/A'];
15131511 break;
1514- case sources.blockentropy:
1515- samplers = ['N/A'];
1516- break;
15171512 case sources.huggingface:
15181513 samplers = ['N/A'];
15191514 break;
@@ -1701,9 +1696,6 @@ async function loadModels() {
17011696 case sources.stability:
17021697 models = await loadStabilityModels();
17031698 break;
1704- case sources.blockentropy:
1705- models = await loadBlockEntropyModels();
1706- break;
17071699 case sources.huggingface:
17081700 models = [{ value: '', text: '<Enter Model ID above>' }];
17091701 break;
@@ -1799,26 +1791,6 @@ async function loadTogetherAIModels() {
17991791 return [];
18001792}
18011793
1802-async function loadBlockEntropyModels() {
1803- if (!secret_state[SECRET_KEYS.BLOCKENTROPY]) {
1804- console.debug('Block Entropy API key is not set.');
1805- return [];
1806- }
1807-
1808- const result = await fetch('/api/sd/blockentropy/models', {
1809- method: 'POST',
1810- headers: getRequestHeaders(),
1811- });
1812- console.log(result);
1813- if (result.ok) {
1814- const data = await result.json();
1815- console.log(data);
1816- return data;
1817- }
1818-
1819- return [];
1820-}
1821-
18221794async function loadNanoGPTModels() {
18231795 if (!secret_state[SECRET_KEYS.NANOGPT]) {
18241796 console.debug('NanoGPT API key is not set.');
@@ -2097,9 +2069,6 @@ async function loadSchedulers() {
20972069 case sources.stability:
20982070 schedulers = ['N/A'];
20992071 break;
2100- case sources.blockentropy:
2101- schedulers = ['N/A'];
2102- break;
21032072 case sources.huggingface:
21042073 schedulers = ['N/A'];
21052074 break;
@@ -2188,9 +2157,6 @@ async function loadVaes() {
21882157 case sources.stability:
21892158 vaes = ['N/A'];
21902159 break;
2191- case sources.blockentropy:
2192- vaes = ['N/A'];
2193- break;
21942160 case sources.huggingface:
21952161 vaes = ['N/A'];
21962162 break;
@@ -2757,9 +2723,6 @@ async function sendGenerationRequest(generationType, prompt, additionalNegativeP
27572723 case sources.stability:
27582724 result = await generateStabilityImage(prefixedPrompt, negativePrompt, signal);
27592725 break;
2760- case sources.blockentropy:
2761- result = await generateBlockEntropyImage(prefixedPrompt, negativePrompt, signal);
2762- break;
27632726 case sources.huggingface:
27642727 result = await generateHuggingFaceImage(prefixedPrompt, signal);
27652728 break;
@@ -2828,40 +2791,6 @@ async function generateTogetherAIImage(prompt, negativePrompt, signal) {
28282791 }
28292792}
28302793
2831-async function generateBlockEntropyImage(prompt, negativePrompt, signal) {
2832- const result = await fetch('/api/sd/blockentropy/generate', {
2833- method: 'POST',
2834- headers: getRequestHeaders(),
2835- signal: signal,
2836- body: JSON.stringify({
2837- prompt: prompt,
2838- negative_prompt: negativePrompt,
2839- model: extension_settings.sd.model,
2840- steps: extension_settings.sd.steps,
2841- width: extension_settings.sd.width,
2842- height: extension_settings.sd.height,
2843- seed: extension_settings.sd.seed >= 0 ? extension_settings.sd.seed : undefined,
2844- }),
2845- });
2846-
2847- if (result.ok) {
2848- const data = await result.json();
2849-
2850- // Default format is 'jpg'
2851- let format = 'jpg';
2852-
2853- // Check if a format is specified in the result
2854- if (data.format) {
2855- format = data.format.toLowerCase();
2856- }
2857-
2858- return { format: format, data: data.images[0] };
2859- } else {
2860- const text = await result.text();
2861- throw new Error(text);
2862- }
2863-}
2864-
28652794/**
28662795 * Generates an image using the Pollinations API.
28672796 * @param {string} prompt - The main instruction used to guide the image generation.
@@ -3845,8 +3774,6 @@ function isValidState() {
38453774 return true;
38463775 case sources.stability:
38473776 return secret_state[SECRET_KEYS.STABILITY];
3848- case sources.blockentropy:
3849- return secret_state[SECRET_KEYS.BLOCKENTROPY];
38503777 case sources.huggingface:
38513778 return secret_state[SECRET_KEYS.HUGGINGFACE];
38523779 case sources.nanogpt:
public/scripts/extensions/stable-diffusion/settings.html+1 -2
@@ -38,7 +38,6 @@
3838 <label for="sd_source" data-i18n="Source">Source</label>
3939 <select id="sd_source">
4040 <option value="bfl">BFL (Black Forest Labs)</option>
41- <option value="blockentropy">Block Entropy</option>
4241 <option value="comfy">ComfyUI</option>
4342 <option value="drawthings">DrawThings HTTP API</option>
4443 <option value="extras">Extras API (deprecated)</option>
@@ -422,7 +421,7 @@
422421 </label>
423422 </div>
424423
425424 <div data-sd-source="novel,togetherai,pollinations,comfy,drawthings,vlad,auto,horde,extras,stability,blockentropy,bfl" class="marginTop5">
426425 <label for="sd_seed">
427426 <span data-i18n="Seed">Seed</span>
428427 <small data-i18n="(-1 for random)">(-1 for random)</small>
public/scripts/openai.js+0 -71
@@ -182,7 +182,6 @@ export const chat_completion_sources = {
182182 PERPLEXITY: 'perplexity',
183183 GROQ: 'groq',
184184 ZEROONEAI: '01ai',
185- BLOCKENTROPY: 'blockentropy',
186185 NANOGPT: 'nanogpt',
187186 DEEPSEEK: 'deepseek',
188187};
@@ -258,7 +257,6 @@ export const settingsToUpdate = {
258257 nanogpt_model: ['#model_nanogpt_select', 'nanogpt_model', false],
259258 deepseek_model: ['#model_deepseek_select', 'deepseek_model', false],
260259 zerooneai_model: ['#model_01ai_select', 'zerooneai_model', false],
261- blockentropy_model: ['#model_blockentropy_select', 'blockentropy_model', false],
262260 custom_model: ['#custom_model_id', 'custom_model', false],
263261 custom_url: ['#custom_api_url_text', 'custom_url', false],
264262 custom_include_body: ['#custom_include_body', 'custom_include_body', false],
@@ -346,7 +344,6 @@ const default_settings = {
346344 groq_model: 'llama-3.3-70b-versatile',
347345 nanogpt_model: 'gpt-4o-mini',
348346 zerooneai_model: 'yi-large',
349- blockentropy_model: 'be-70b-base-llama3.1',
350347 deepseek_model: 'deepseek-chat',
351348 custom_model: '',
352349 custom_url: '',
@@ -427,7 +424,6 @@ const oai_settings = {
427424 groq_model: 'llama-3.1-70b-versatile',
428425 nanogpt_model: 'gpt-4o-mini',
429426 zerooneai_model: 'yi-large',
430- blockentropy_model: 'be-70b-base-llama3.1',
431427 deepseek_model: 'deepseek-chat',
432428 custom_model: '',
433429 custom_url: '',
@@ -1637,8 +1633,6 @@ export function getChatCompletionModel(source = null) {
16371633 return oai_settings.groq_model;
16381634 case chat_completion_sources.ZEROONEAI:
16391635 return oai_settings.zerooneai_model;
1640- case chat_completion_sources.BLOCKENTROPY:
1641- return oai_settings.blockentropy_model;
16421636 case chat_completion_sources.NANOGPT:
16431637 return oai_settings.nanogpt_model;
16441638 case chat_completion_sources.DEEPSEEK:
@@ -1757,23 +1751,6 @@ function saveModelList(data) {
17571751 $('#model_01ai_select').val(oai_settings.zerooneai_model).trigger('change');
17581752 }
17591753
1760- if (oai_settings.chat_completion_source == chat_completion_sources.BLOCKENTROPY) {
1761- $('#model_blockentropy_select').empty();
1762- model_list.forEach((model) => {
1763- $('#model_blockentropy_select').append(
1764- $('<option>', {
1765- value: model.id,
1766- text: model.id,
1767- }));
1768- });
1769-
1770- if (!oai_settings.blockentropy_model && model_list.length > 0) {
1771- oai_settings.blockentropy_model = model_list[0].id;
1772- }
1773-
1774- $('#model_blockentropy_select').val(oai_settings.blockentropy_model).trigger('change');
1775- }
1776-
17771754 if (oai_settings.chat_completion_source == chat_completion_sources.MISTRALAI) {
17781755 /** @type {HTMLSelectElement} */
17791756 const mistralModelSelect = document.querySelector('#model_mistralai_select');
@@ -3246,7 +3223,6 @@ function loadOpenAISettings(data, settings) {
32463223 oai_settings.groq_model = settings.groq_model ?? default_settings.groq_model;
32473224 oai_settings.nanogpt_model = settings.nanogpt_model ?? default_settings.nanogpt_model;
32483225 oai_settings.deepseek_model = settings.deepseek_model ?? default_settings.deepseek_model;
3249- oai_settings.blockentropy_model = settings.blockentropy_model ?? default_settings.blockentropy_model;
32503226 oai_settings.zerooneai_model = settings.zerooneai_model ?? default_settings.zerooneai_model;
32513227 oai_settings.custom_model = settings.custom_model ?? default_settings.custom_model;
32523228 oai_settings.custom_url = settings.custom_url ?? default_settings.custom_url;
@@ -3333,7 +3309,6 @@ function loadOpenAISettings(data, settings) {
33333309 $('#model_deepseek_select').val(oai_settings.deepseek_model);
33343310 $(`#model_deepseek_select option[value="${oai_settings.deepseek_model}"`).prop('selected', true);
33353311 $('#model_01ai_select').val(oai_settings.zerooneai_model);
3336- $('#model_blockentropy_select').val(oai_settings.blockentropy_model);
33373312 $('#custom_model_id').val(oai_settings.custom_model);
33383313 $('#custom_api_url_text').val(oai_settings.custom_url);
33393314 $('#openai_max_context').val(oai_settings.openai_max_context);
@@ -3613,7 +3588,6 @@ async function saveOpenAIPreset(name, settings, triggerUi = true) {
36133588 perplexity_model: settings.perplexity_model,
36143589 groq_model: settings.groq_model,
36153590 zerooneai_model: settings.zerooneai_model,
3616- blockentropy_model: settings.blockentropy_model,
36173591 custom_model: settings.custom_model,
36183592 custom_url: settings.custom_url,
36193593 custom_include_body: settings.custom_include_body,
@@ -4322,12 +4296,6 @@ async function onModelChange() {
43224296 oai_settings.zerooneai_model = value;
43234297 }
43244298
4325- if (value && $(this).is('#model_blockentropy_select')) {
4326- console.log('Block Entropy model changed to', value);
4327- oai_settings.blockentropy_model = value;
4328- $('#blockentropy_model_id').val(value).trigger('input');
4329- }
4330-
43314299 if (value && $(this).is('#model_custom_select')) {
43324300 console.log('Custom model changed to', value);
43334301 oai_settings.custom_model = value;
@@ -4577,29 +4545,6 @@ async function onModelChange() {
45774545 oai_settings.temp_openai = Math.min(oai_max_temp, oai_settings.temp_openai);
45784546 $('#temp_openai').attr('max', oai_max_temp).val(oai_settings.temp_openai).trigger('input');
45794547 }
4580- if (oai_settings.chat_completion_source === chat_completion_sources.BLOCKENTROPY) {
4581- if (oai_settings.max_context_unlocked) {
4582- $('#openai_max_context').attr('max', unlocked_max);
4583- }
4584- else if (oai_settings.blockentropy_model.includes('llama3.1')) {
4585- $('#openai_max_context').attr('max', max_16k);
4586- }
4587- else if (oai_settings.blockentropy_model.includes('72b')) {
4588- $('#openai_max_context').attr('max', max_16k);
4589- }
4590- else if (oai_settings.blockentropy_model.includes('120b')) {
4591- $('#openai_max_context').attr('max', max_12k);
4592- }
4593- else {
4594- $('#openai_max_context').attr('max', max_8k);
4595- }
4596-
4597- oai_settings.openai_max_context = Math.min(oai_settings.openai_max_context, Number($('#openai_max_context').attr('max')));
4598- $('#openai_max_context').val(oai_settings.openai_max_context).trigger('input');
4599-
4600- oai_settings.temp_openai = Math.min(oai_max_temp, oai_settings.temp_openai);
4601- $('#temp_openai').attr('max', oai_max_temp).val(oai_settings.temp_openai).trigger('input');
4602- }
46034548
46044549 if (oai_settings.chat_completion_source === chat_completion_sources.NANOGPT) {
46054550 if (oai_settings.max_context_unlocked) {
@@ -4866,18 +4811,6 @@ async function onConnectButtonClick(e) {
48664811 return;
48674812 }
48684813 }
4869- if (oai_settings.chat_completion_source == chat_completion_sources.BLOCKENTROPY) {
4870- const api_key_blockentropy = String($('#api_key_blockentropy').val()).trim();
4871-
4872- if (api_key_blockentropy.length) {
4873- await writeSecret(SECRET_KEYS.BLOCKENTROPY, api_key_blockentropy);
4874- }
4875-
4876- if (!secret_state[SECRET_KEYS.BLOCKENTROPY]) {
4877- console.log('No secret key saved for Block Entropy');
4878- return;
4879- }
4880- }
48814814
48824815 startStatusLoading();
48834816 saveSettingsDebounced();
@@ -4932,9 +4865,6 @@ function toggleChatCompletionForms() {
49324865 else if (oai_settings.chat_completion_source == chat_completion_sources.CUSTOM) {
49334866 $('#model_custom_select').trigger('change');
49344867 }
4935- else if (oai_settings.chat_completion_source == chat_completion_sources.BLOCKENTROPY) {
4936- $('#model_blockentropy_select').trigger('change');
4937- }
49384868 else if (oai_settings.chat_completion_source == chat_completion_sources.DEEPSEEK) {
49394869 $('#model_deepseek_select').trigger('change');
49404870 }
@@ -5687,7 +5617,6 @@ export function initOpenAI() {
56875617 $('#model_nanogpt_select').on('change', onModelChange);
56885618 $('#model_deepseek_select').on('change', onModelChange);
56895619 $('#model_01ai_select').on('change', onModelChange);
5690- $('#model_blockentropy_select').on('change', onModelChange);
56915620 $('#model_custom_select').on('change', onModelChange);
56925621 $('#settings_preset_openai').on('change', onSettingsPresetChange);
56935622 $('#new_oai_preset').on('click', onNewPresetClick);
public/scripts/secrets.js+0 -2
@@ -34,7 +34,6 @@ export const SECRET_KEYS = {
3434 ZEROONEAI: 'api_key_01ai',
3535 HUGGINGFACE: 'api_key_huggingface',
3636 STABILITY: 'api_key_stability',
37- BLOCKENTROPY: 'api_key_blockentropy',
3837 CUSTOM_OPENAI_TTS: 'api_key_custom_openai_tts',
3938 NANOGPT: 'api_key_nanogpt',
4039 TAVILY: 'api_key_tavily',
@@ -74,7 +73,6 @@ const INPUT_MAP = {
7473 [SECRET_KEYS.FEATHERLESS]: '#api_key_featherless',
7574 [SECRET_KEYS.ZEROONEAI]: '#api_key_01ai',
7675 [SECRET_KEYS.HUGGINGFACE]: '#api_key_huggingface',
77- [SECRET_KEYS.BLOCKENTROPY]: '#api_key_blockentropy',
7876 [SECRET_KEYS.NANOGPT]: '#api_key_nanogpt',
7977 [SECRET_KEYS.GENERIC]: '#api_key_generic',
8078 [SECRET_KEYS.DEEPSEEK]: '#api_key_deepseek',
public/scripts/slash-commands.js+0 -1
@@ -3936,7 +3936,6 @@ function getModelOptions(quiet) {
39363936 { id: 'model_groq_select', api: 'openai', type: chat_completion_sources.GROQ },
39373937 { id: 'model_nanogpt_select', api: 'openai', type: chat_completion_sources.NANOGPT },
39383938 { id: 'model_01ai_select', api: 'openai', type: chat_completion_sources.ZEROONEAI },
3939- { id: 'model_blockentropy_select', api: 'openai', type: chat_completion_sources.BLOCKENTROPY },
39403939 { id: 'model_deepseek_select', api: 'openai', type: chat_completion_sources.DEEPSEEK },
39413940 { id: 'model_novel_select', api: 'novel', type: null },
39423941 { id: 'horde_model', api: 'koboldhorde', type: null },
public/scripts/tokenizers.js+0 -9
@@ -729,15 +729,6 @@ export function getTokenizerModel() {
729729 return yiTokenizer;
730730 }
731731
732- if (oai_settings.chat_completion_source === chat_completion_sources.BLOCKENTROPY) {
733- if (oai_settings.blockentropy_model.includes('llama3')) {
734- return llama3Tokenizer;
735- }
736- if (oai_settings.blockentropy_model.includes('miqu') || oai_settings.blockentropy_model.includes('mixtral')) {
737- return mistralTokenizer;
738- }
739- }
740-
741732 // Default to Turbo 3.5
742733 return turboTokenizer;
743734}
src/constants.js+0 -1
@@ -174,7 +174,6 @@ export const CHAT_COMPLETION_SOURCES = {
174174 PERPLEXITY: 'perplexity',
175175 GROQ: 'groq',
176176 ZEROONEAI: '01ai',
177- BLOCKENTROPY: 'blockentropy',
178177 NANOGPT: 'nanogpt',
179178 DEEPSEEK: 'deepseek',
180179};
src/endpoints/backends/chat-completions.js+0 -10
@@ -50,7 +50,6 @@ const API_PERPLEXITY = 'https://api.perplexity.ai';
5050const API_GROQ = 'https://api.groq.com/openai/v1';
5151const API_MAKERSUITE = 'https://generativelanguage.googleapis.com';
5252const API_01AI = 'https://api.lingyiwanwu.com/v1';
53-const API_BLOCKENTROPY = 'https://api.blockentropy.ai/v1';
5453const API_AI21 = 'https://api.ai21.com/studio/v1';
5554const API_NANOGPT = 'https://nano-gpt.com/api/v1';
5655const API_DEEPSEEK = 'https://api.deepseek.com/beta';
@@ -865,10 +864,6 @@ router.post('/status', async function (request, response_getstatus_openai) {
865864 api_url = API_01AI;
866865 api_key_openai = readSecret(request.user.directories, SECRET_KEYS.ZEROONEAI);
867866 headers = {};
868- } else if (request.body.chat_completion_source === CHAT_COMPLETION_SOURCES.BLOCKENTROPY) {
869- api_url = API_BLOCKENTROPY;
870- api_key_openai = readSecret(request.user.directories, SECRET_KEYS.BLOCKENTROPY);
871- headers = {};
872867 } else if (request.body.chat_completion_source === CHAT_COMPLETION_SOURCES.NANOGPT) {
873868 api_url = API_NANOGPT;
874869 api_key_openai = readSecret(request.user.directories, SECRET_KEYS.NANOGPT);
@@ -1155,11 +1150,6 @@ router.post('/generate', function (request, response) {
11551150 apiKey = readSecret(request.user.directories, SECRET_KEYS.ZEROONEAI);
11561151 headers = {};
11571152 bodyParams = {};
1158- } else if (request.body.chat_completion_source === CHAT_COMPLETION_SOURCES.BLOCKENTROPY) {
1159- apiUrl = API_BLOCKENTROPY;
1160- apiKey = readSecret(request.user.directories, SECRET_KEYS.BLOCKENTROPY);
1161- headers = {};
1162- bodyParams = {};
11631153 } else {
11641154 console.warn('This chat completion source is not supported yet.');
11651155 return response.status(400).send({ error: true });
src/endpoints/secrets.js+0 -1
@@ -44,7 +44,6 @@ export const SECRET_KEYS = {
4444 ZEROONEAI: 'api_key_01ai',
4545 HUGGINGFACE: 'api_key_huggingface',
4646 STABILITY: 'api_key_stability',
47- BLOCKENTROPY: 'api_key_blockentropy',
4847 CUSTOM_OPENAI_TTS: 'api_key_custom_openai_tts',
4948 TAVILY: 'api_key_tavily',
5049 NANOGPT: 'api_key_nanogpt',
src/endpoints/stable-diffusion.js+0 -84
@@ -907,89 +907,6 @@ stability.post('/generate', async (request, response) => {
907907 }
908908});
909909
910-const blockentropy = express.Router();
911-
912-blockentropy.post('/models', async (request, response) => {
913- try {
914- const key = readSecret(request.user.directories, SECRET_KEYS.BLOCKENTROPY);
915-
916- if (!key) {
917- console.warn('Block Entropy key not found.');
918- return response.sendStatus(400);
919- }
920-
921- const modelsResponse = await fetch('https://api.blockentropy.ai/sdapi/v1/sd-models', {
922- method: 'GET',
923- headers: {
924- 'Authorization': `Bearer ${key}`,
925- },
926- });
927-
928- if (!modelsResponse.ok) {
929- console.warn('Block Entropy returned an error.');
930- return response.sendStatus(500);
931- }
932-
933- const data = await modelsResponse.json();
934-
935- if (!Array.isArray(data)) {
936- console.warn('Block Entropy returned invalid data.');
937- return response.sendStatus(500);
938- }
939- const models = data.map(x => ({ value: x.name, text: x.name }));
940- return response.send(models);
941-
942- } catch (error) {
943- console.error(error);
944- return response.sendStatus(500);
945- }
946-});
947-
948-blockentropy.post('/generate', async (request, response) => {
949- try {
950- const key = readSecret(request.user.directories, SECRET_KEYS.BLOCKENTROPY);
951-
952- if (!key) {
953- console.warn('Block Entropy key not found.');
954- return response.sendStatus(400);
955- }
956-
957- console.debug('Block Entropy request:', request.body);
958-
959- const result = await fetch('https://api.blockentropy.ai/sdapi/v1/txt2img', {
960- method: 'POST',
961- body: JSON.stringify({
962- prompt: request.body.prompt,
963- negative_prompt: request.body.negative_prompt,
964- model: request.body.model,
965- steps: request.body.steps,
966- width: request.body.width,
967- height: request.body.height,
968- // Random seed if negative.
969- seed: request.body.seed >= 0 ? request.body.seed : Math.floor(Math.random() * 10_000_000),
970- }),
971- headers: {
972- 'Content-Type': 'application/json',
973- 'Authorization': `Bearer ${key}`,
974- },
975- });
976-
977- if (!result.ok) {
978- console.warn('Block Entropy returned an error.');
979- return response.sendStatus(500);
980- }
981-
982- const data = await result.json();
983- console.debug('Block Entropy response:', data);
984-
985- return response.send(data);
986- } catch (error) {
987- console.error(error);
988- return response.sendStatus(500);
989- }
990-});
991-
992-
993910const huggingface = express.Router();
994911
995912huggingface.post('/generate', async (request, response) => {
@@ -1358,7 +1275,6 @@ router.use('/together', together);
13581275router.use('/drawthings', drawthings);
13591276router.use('/pollinations', pollinations);
13601277router.use('/stability', stability);
1361-router.use('/blockentropy', blockentropy);
13621278router.use('/huggingface', huggingface);
13631279router.use('/nanogpt', nanogpt);
13641280router.use('/bfl', bfl);