mirror of
				https://github.com/SillyTavern/SillyTavern.git
				synced 2025-06-05 21:59:27 +02:00 
			
		
		
		
	Small fixes
This commit is contained in:
		| @@ -1242,7 +1242,16 @@ async function onModelChange() { | |||||||
|     extension_settings.sd.model = $('#sd_model').find(':selected').val(); |     extension_settings.sd.model = $('#sd_model').find(':selected').val(); | ||||||
|     saveSettingsDebounced(); |     saveSettingsDebounced(); | ||||||
|  |  | ||||||
|     const cloudSources = [sources.horde, sources.novel, sources.openai, sources.togetherai, sources.pollinations, sources.stability, sources.blockentropy]; |     const cloudSources = [ | ||||||
|  |         sources.horde, | ||||||
|  |         sources.novel, | ||||||
|  |         sources.openai, | ||||||
|  |         sources.togetherai, | ||||||
|  |         sources.pollinations, | ||||||
|  |         sources.stability, | ||||||
|  |         sources.blockentropy, | ||||||
|  |         sources.huggingface, | ||||||
|  |     ]; | ||||||
|  |  | ||||||
|     if (cloudSources.includes(extension_settings.sd.source)) { |     if (cloudSources.includes(extension_settings.sd.source)) { | ||||||
|         return; |         return; | ||||||
| @@ -1457,6 +1466,9 @@ async function loadSamplers() { | |||||||
|         case sources.blockentropy: |         case sources.blockentropy: | ||||||
|             samplers = ['N/A']; |             samplers = ['N/A']; | ||||||
|             break; |             break; | ||||||
|  |         case sources.huggingface: | ||||||
|  |             samplers = ['N/A']; | ||||||
|  |             break; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     for (const sampler of samplers) { |     for (const sampler of samplers) { | ||||||
| @@ -1646,6 +1658,9 @@ async function loadModels() { | |||||||
|         case sources.blockentropy: |         case sources.blockentropy: | ||||||
|             models = await loadBlockEntropyModels(); |             models = await loadBlockEntropyModels(); | ||||||
|             break; |             break; | ||||||
|  |         case sources.huggingface: | ||||||
|  |             models = [{ value: '', text: '<Enter Model ID above>' }]; | ||||||
|  |             break; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     for (const model of models) { |     for (const model of models) { | ||||||
| @@ -1993,6 +2008,9 @@ async function loadSchedulers() { | |||||||
|         case sources.blockentropy: |         case sources.blockentropy: | ||||||
|             schedulers = ['N/A']; |             schedulers = ['N/A']; | ||||||
|             break; |             break; | ||||||
|  |         case sources.huggingface: | ||||||
|  |             schedulers = ['N/A']; | ||||||
|  |             break; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     for (const scheduler of schedulers) { |     for (const scheduler of schedulers) { | ||||||
| @@ -2072,6 +2090,9 @@ async function loadVaes() { | |||||||
|         case sources.blockentropy: |         case sources.blockentropy: | ||||||
|             vaes = ['N/A']; |             vaes = ['N/A']; | ||||||
|             break; |             break; | ||||||
|  |         case sources.huggingface: | ||||||
|  |             vaes = ['N/A']; | ||||||
|  |             break; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     for (const vae of vaes) { |     for (const vae of vaes) { | ||||||
|   | |||||||
| @@ -41,6 +41,7 @@ | |||||||
|                 <option value="comfy">ComfyUI</option> |                 <option value="comfy">ComfyUI</option> | ||||||
|                 <option value="drawthings">DrawThings HTTP API</option> |                 <option value="drawthings">DrawThings HTTP API</option> | ||||||
|                 <option value="extras">Extras API (local / remote)</option> |                 <option value="extras">Extras API (local / remote)</option> | ||||||
|  |                 <option value="huggingface">HuggingFace Inference API (serverless)</option> | ||||||
|                 <option value="novel">NovelAI Diffusion</option> |                 <option value="novel">NovelAI Diffusion</option> | ||||||
|                 <option value="openai">OpenAI (DALL-E)</option> |                 <option value="openai">OpenAI (DALL-E)</option> | ||||||
|                 <option value="pollinations">Pollinations</option> |                 <option value="pollinations">Pollinations</option> | ||||||
| @@ -49,7 +50,6 @@ | |||||||
|                 <option value="auto">Stable Diffusion Web UI (AUTOMATIC1111)</option> |                 <option value="auto">Stable Diffusion Web UI (AUTOMATIC1111)</option> | ||||||
|                 <option value="horde">Stable Horde</option> |                 <option value="horde">Stable Horde</option> | ||||||
|                 <option value="togetherai">TogetherAI</option> |                 <option value="togetherai">TogetherAI</option> | ||||||
|                 <option value="huggingface">HuggingFace (Image Inference Endpoint)</option> |  | ||||||
|             </select> |             </select> | ||||||
|             <div data-sd-source="auto"> |             <div data-sd-source="auto"> | ||||||
|                 <label for="sd_auto_url">SD Web UI URL</label> |                 <label for="sd_auto_url">SD Web UI URL</label> | ||||||
| @@ -84,9 +84,9 @@ | |||||||
|                 <i><b data-i18n="Important:">Important:</b></i><i data-i18n="sd_drawthings_auth_txt"> run DrawThings app with HTTP API switch enabled in the UI! The server must be accessible from the SillyTavern host machine.</i> |                 <i><b data-i18n="Important:">Important:</b></i><i data-i18n="sd_drawthings_auth_txt"> run DrawThings app with HTTP API switch enabled in the UI! The server must be accessible from the SillyTavern host machine.</i> | ||||||
|             </div> |             </div> | ||||||
|             <div data-sd-source="huggingface"> |             <div data-sd-source="huggingface"> | ||||||
|                 <i>Hint: Save an API key in the Hugging Face API settings to use it here.</i> |                 <i>Hint: Save an API key in the Hugging Face (Text Completion) API settings to use it here.</i> | ||||||
|                 <label for="sd_huggingface_model_id" data-i18n="Model ID">Model ID</label> |                 <label for="sd_huggingface_model_id" data-i18n="Model ID">Model ID</label> | ||||||
|                 <input id="sd_huggingface_model_id" type="text" class="text_pole"  data-i18n="[placeholder] e.g. black-forest-labs/FLUX.1-dev" placeholder="e.g. black-forest-labs/FLUX.1-dev" value="" /> |                 <input id="sd_huggingface_model_id" type="text" class="text_pole"  data-i18n="[placeholder]e.g. black-forest-labs/FLUX.1-dev" placeholder="e.g. black-forest-labs/FLUX.1-dev" value="" /> | ||||||
|             </div> |             </div> | ||||||
|             <div data-sd-source="vlad"> |             <div data-sd-source="vlad"> | ||||||
|                 <label for="sd_vlad_url">SD.Next API URL</label> |                 <label for="sd_vlad_url">SD.Next API URL</label> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user