SillyTavern/public/scripts/extensions/stable-diffusion/settings.html

286 lines
20 KiB
HTML
Raw Normal View History

<div class="sd_settings">
<div class="inline-drawer">
<div class="inline-drawer-toggle inline-drawer-header">
2023-11-01 21:58:59 +01:00
<b>
2024-05-20 12:15:16 +02:00
<span data-i18n="Image Generation">Image Generation</span>
<a href="https://docs.sillytavern.app/extensions/stable-diffusion/" class="notes-link" target="_blank">
2023-11-01 21:58:59 +01:00
<span class="note-link-span">?</span>
</a>
</b>
<div class="inline-drawer-icon fa-solid fa-circle-chevron-down down"></div>
</div>
<div class="inline-drawer-content">
2024-05-20 07:58:56 +02:00
<label for="sd_refine_mode" class="checkbox_label" data-i18n="[title]sd_refine_mode" title="Allow to edit prompts manually before sending them to generation API">
2024-05-20 12:15:16 +02:00
<input id="sd_refine_mode" type="checkbox" />
<span data-i18n="sd_refine_mode_txt">Edit prompts before generation</span>
</label>
2024-05-20 12:15:16 +02:00
<label for="sd_interactive_mode" class="checkbox_label" data-i18n="[title]sd_interactive_mode" title="Automatically generate images when sending messages like 'send me a picture of cat'.">
2023-11-01 21:58:59 +01:00
<input id="sd_interactive_mode" type="checkbox" />
2024-05-20 12:15:16 +02:00
<span data-i18n="sd_interactive_mode_txt">Interactive mode</span>
2023-11-01 21:58:59 +01:00
</label>
2024-05-20 12:15:16 +02:00
<label for="sd_multimodal_captioning" class="checkbox_label" data-i18n="[title]sd_multimodal_captioning" title="Use multimodal captioning to generate prompts for user and character portraits based on their avatars.">
<input id="sd_multimodal_captioning" type="checkbox" />
2024-05-20 12:15:16 +02:00
<span data-i18n="sd_multimodal_captioning_txt">Use multimodal captioning for portraits</span>
</label>
2024-05-20 12:15:16 +02:00
<label for="sd_expand" class="checkbox_label" data-i18n="[title]sd_expand" title="Automatically extend prompts using text generation model">
2023-10-20 14:03:26 +02:00
<input id="sd_expand" type="checkbox" />
2024-05-20 12:15:16 +02:00
<span data-i18n="sd_expand_txt">Auto-enhance prompts</span>
2023-10-20 14:03:26 +02:00
</label>
2024-05-20 12:15:16 +02:00
<label for="sd_snap" class="checkbox_label" data-i18n="[title]sd_snap" title="Snap generation requests with a forced aspect ratio (portraits, backgrounds) to the nearest known resolution, while trying to preserve the absolute pixel counts (recommended for SDXL).">
<input id="sd_snap" type="checkbox" />
2024-05-20 12:15:16 +02:00
<span data-i18n="sd_snap_txt">Snap auto-adjusted resolutions</span>
</label>
2024-05-20 12:15:16 +02:00
<label for="sd_source" data-i18n="Source">Source</label>
<select id="sd_source">
<option value="comfy">ComfyUI</option>
<option value="drawthings">DrawThings HTTP API</option>
<option value="extras">Extras API (local / remote)</option>
<option value="novel">NovelAI Diffusion</option>
2023-11-06 20:47:00 +01:00
<option value="openai">OpenAI (DALL-E)</option>
<option value="pollinations">Pollinations</option>
<option value="vlad">SD.Next (vladmandic)</option>
<option value="auto">Stable Diffusion Web UI (AUTOMATIC1111)</option>
<option value="horde">Stable Horde</option>
2023-12-18 02:33:05 +01:00
<option value="togetherai">TogetherAI</option>
</select>
<div data-sd-source="auto">
<label for="sd_auto_url">SD Web UI URL</label>
<div class="flex-container flexnowrap">
2024-05-20 12:15:16 +02:00
<input id="sd_auto_url" type="text" class="text_pole" data-i18n="[placeholder]sd_auto_url" placeholder="Example: {{auto_url}}" value="{{auto_url}}" />
<div id="sd_auto_validate" class="menu_button menu_button_icon">
<i class="fa-solid fa-check"></i>
<span data-i18n="Connect">
Connect
</span>
</div>
</div>
2024-05-20 12:15:16 +02:00
<label for="sd_auto_auth" data-i18n="Authentication (optional)">Authentication (optional)</label>
<input id="sd_auto_auth" type="text" class="text_pole" data-i18n="[placeholder]Example: username:password" placeholder="Example: username:password" value="" />
<!-- (Original Text)<b>Important:</b> run SD Web UI with the <tt>--api</tt> flag! The server must be accessible from the SillyTavern host machine. -->
<i><b data-i18n="Important:">Important:</b></i><i data-i18n="sd_auto_auth_warning_1"> run SD Web UI with the </i><i><tt>--api</tt></i><i data-i18n="sd_auto_auth_warning_2"> flag! The server must be accessible from the SillyTavern host machine.</i>
</div>
<div data-sd-source="drawthings">
<label for="sd_drawthings_url">DrawThings API URL</label>
<div class="flex-container flexnowrap">
2024-05-20 12:15:16 +02:00
<input id="sd_drawthings_url" type="text" class="text_pole" data-i18n="[placeholder]sd_drawthings_url" placeholder="Example: {{drawthings_url}}" value="{{drawthings_url}}" />
<div id="sd_drawthings_validate" class="menu_button menu_button_icon">
<i class="fa-solid fa-check"></i>
<span data-i18n="Connect">
Connect
</span>
</div>
</div>
2024-05-20 12:15:16 +02:00
<label for="sd_drawthings_auth" data-i18n="Authentication (optional)">Authentication (optional)</label>
<input id="sd_drawthings_auth" type="text" class="text_pole" data-i18n="[placeholder]Example: username:password" placeholder="Example: username:password" value="" />
2024-05-22 15:12:09 +02:00
<!-- (Original Text)<b>Important:</b> run DrawThings app with HTTP API switch enabled in the UI! The server must be accessible from the SillyTavern host machine. -->
2024-05-20 12:15:16 +02:00
<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>
2023-10-07 17:30:06 +02:00
<div data-sd-source="vlad">
<label for="sd_vlad_url">SD.Next API URL</label>
<div class="flex-container flexnowrap">
2024-05-20 12:15:16 +02:00
<input id="sd_vlad_url" type="text" class="text_pole" data-i18n="[placeholder]sd_vlad_url" placeholder="Example: {{vlad_url}}" value="{{vlad_url}}" />
2023-10-07 17:30:06 +02:00
<div id="sd_vlad_validate" class="menu_button menu_button_icon">
<i class="fa-solid fa-check"></i>
<span data-i18n="Connect">
Connect
</span>
</div>
</div>
2024-05-20 12:15:16 +02:00
<label for="sd_vlad_auth" data-i18n="Authentication (optional)">Authentication (optional)</label>
<input id="sd_vlad_auth" type="text" class="text_pole" data-i18n="[placeholder]Example: username:password" placeholder="Example: username:password" value="" />
<i data-i18n="The server must be accessible from the SillyTavern host machine.">The server must be accessible from the SillyTavern host machine.</i>
2023-10-07 17:30:06 +02:00
</div>
<div data-sd-source="horde">
2024-05-20 12:15:16 +02:00
<i data-i18n="Hint: Save an API key in Horde KoboldAI API settings to use it here.">Hint: Save an API key in Horde KoboldAI API settings to use it here.</i>
<label for="sd_horde_nsfw" class="checkbox_label">
<input id="sd_horde_nsfw" type="checkbox" />
<span data-i18n="Allow NSFW images from Horde">
Allow NSFW images from Horde
</span>
</label>
2023-10-08 21:29:33 +02:00
<label for="sd_horde_sanitize" class="checkbox_label">
<input id="sd_horde_sanitize" type="checkbox" />
<span data-i18n="Sanitize prompts (recommended)">
Sanitize prompts (recommended)
</span>
</label>
</div>
<div data-sd-source="novel">
<div class="flex-container flexFlowColumn">
2024-05-20 12:15:16 +02:00
<label for="sd_novel_anlas_guard" class="checkbox_label flex1" data-i18n="[title]Automatically adjust generation parameters to ensure free image generations." title="Automatically adjust generation parameters to ensure free image generations.">
<input id="sd_novel_anlas_guard" type="checkbox" />
<span data-i18n="Avoid spending Anlas">
Avoid spending Anlas
</span>
<span data-i18n="Opus tier" class="toggle-description">(Opus tier)</span>
</label>
2024-05-20 12:15:16 +02:00
<div id="sd_novel_view_anlas" class="menu_button menu_button_icon" data-i18n="View my Anlas">
View my Anlas
</div>
</div>
<i>Hint: Save an API key in the NovelAI API settings to use it here.</i>
</div>
2023-11-06 20:47:00 +01:00
<div data-sd-source="openai">
2024-05-20 12:15:16 +02:00
<small data-i18n="These settings only apply to DALL-E 3">These settings only apply to DALL-E 3</small>
2023-11-06 20:47:00 +01:00
<div class="flex-container">
2024-05-20 12:15:16 +02:00
<label for="sd_openai_style" data-i18n="Image Style">Image Style</label>
2023-11-06 20:47:00 +01:00
<select id="sd_openai_style">
<option value="vivid">Vivid</option>
<option value="natural">Natural</option>
</select>
2024-05-20 12:15:16 +02:00
<label for="sd_openai_quality" data-i18n="Image Quality">Image Quality</label>
2023-11-06 20:47:00 +01:00
<select id="sd_openai_quality">
2024-05-20 12:15:16 +02:00
<option value="standard" data-i18n="Standard">Standard</option>
<option value="hd" data-i18n="HD">HD</option>
2023-11-06 20:47:00 +01:00
</select>
</div>
</div>
2023-11-19 13:18:48 +01:00
<div data-sd-source="comfy">
<label for="sd_comfy_url">ComfyUI URL</label>
<div class="flex-container flexnowrap">
2024-05-20 12:15:16 +02:00
<input id="sd_comfy_url" type="text" class="text_pole" data-i18n="[placeholder]sd_comfy_url" placeholder="Example: {{comfy_url}}" value="{{comfy_url}}" />
2023-11-19 13:18:48 +01:00
<div id="sd_comfy_validate" class="menu_button menu_button_icon">
<i class="fa-solid fa-check"></i>
<span data-i18n="Connect">
Connect
</span>
</div>
</div>
2024-05-20 12:15:16 +02:00
<p><i><b data-i18n="Important:">Important:</b></i><i data-i18n="The server must be accessible from the SillyTavern host machine."> The server must be accessible from the SillyTavern host machine.</i></p>
2023-11-20 13:13:28 +01:00
<label for="sd_comfy_workflow">ComfyUI Workflow</label>
<div class="flex-container flexnowrap">
<select id="sd_comfy_workflow" class="flex1 text_pole"></select>
2024-05-20 12:15:16 +02:00
<div id="sd_comfy_open_workflow_editor" class="menu_button menu_button_icon" data-i18n="[title]Open workflow editor" title="Open workflow editor">
2023-11-20 13:13:28 +01:00
<i class="fa-solid fa-pen-to-square"></i>
</div>
2024-05-20 12:15:16 +02:00
<div id="sd_comfy_new_workflow" class="menu_button menu_button_icon" data-i18n="[title]Create new workflow" title="Create new workflow">
2023-11-20 13:13:28 +01:00
<i class="fa-solid fa-plus"></i>
</div>
2024-05-20 12:15:16 +02:00
<div id="sd_comfy_delete_workflow" class="menu_button menu_button_icon" data-i18n="[title]Delete workflow" title="Delete workflow">
2023-11-20 13:13:28 +01:00
<i class="fa-solid fa-trash-can"></i>
</div>
</div>
2023-11-19 13:18:48 +01:00
</div>
<div data-sd-source="pollinations">
2024-04-10 20:21:31 +02:00
<p>
<a href="https://pollinations.ai">Pollinations.ai</a>
</p>
<div class="flex-container">
<label class="flex1 checkbox_label" for="sd_pollinations_enhance">
<input id="sd_pollinations_enhance" type="checkbox" />
<span data-i18n="Enhance">
Enhance
</span>
</label>
<label class="flex1 checkbox_label" for="sd_pollinations_refine">
<input id="sd_pollinations_refine" type="checkbox" />
<span data-i18n="Refine">
Refine
</span>
</label>
</div>
</div>
2024-05-20 12:15:16 +02:00
<label for="sd_scale" data-i18n="CFG Scale">CFG Scale (<span id="sd_scale_value"></span>)</label>
<input id="sd_scale" type="range" min="{{scale_min}}" max="{{scale_max}}" step="{{scale_step}}" value="{{scale}}" />
2024-05-20 12:15:16 +02:00
<label for="sd_steps" data-i18n="Sampling steps">Sampling steps (<span id="sd_steps_value"></span>)</label>
<input id="sd_steps" type="range" min="{{steps_min}}" max="{{steps_max}}" step="{{steps_step}}" value="{{steps}}" />
2024-05-20 12:15:16 +02:00
<label for="sd_width" data-i18n="Width">Width (<span id="sd_width_value"></span>)</label>
<input id="sd_width" type="range" max="{{dimension_max}}" min="{{dimension_min}}" step="{{dimension_step}}" value="{{width}}" />
2024-05-20 12:15:16 +02:00
<label for="sd_height" data-i18n="Height">Height (<span id="sd_height_value"></span>)</label>
<input id="sd_height" type="range" max="{{dimension_max}}" min="{{dimension_min}}" step="{{dimension_step}}" value="{{height}}" />
2024-05-20 12:15:16 +02:00
<label for="sd_model" data-i18n="Model">Model</label>
2023-09-03 13:56:02 +02:00
<select id="sd_model"></select>
2024-05-20 12:15:16 +02:00
<label for="sd_sampler" data-i18n="Sampling method">Sampling method</label>
2023-09-03 13:56:02 +02:00
<select id="sd_sampler"></select>
<label data-sd-source="horde" for="sd_horde_karras" class="checkbox_label">
<input id="sd_horde_karras" type="checkbox" />
<span data-i18n="Karras (not all samplers supported)">
Karras (not all samplers supported)
</span>
</label>
<div data-sd-source="novel" class="flex-container">
2024-05-20 12:15:16 +02:00
<label class="flex1 checkbox_label" data-i18n="[title]SMEA versions of samplers are modified to perform better at high resolution." title="SMEA versions of samplers are modified to perform better at high resolution.">
<input id="sd_novel_sm" type="checkbox" />
<span data-i18n="SMEA">
SMEA
</span>
</label>
2024-05-20 12:15:16 +02:00
<label class="flex1 checkbox_label" data-i18n="[title]DYN variants of SMEA samplers often lead to more varied output, but may fail at very high resolutions." title="DYN variants of SMEA samplers often lead to more varied output, but may fail at very high resolutions.">
<input id="sd_novel_sm_dyn" type="checkbox" />
<span data-i18n="DYN">
DYN
</span>
</label>
</div>
2024-05-20 12:15:16 +02:00
<label for="sd_resolution" data-i18n="Resolution">Resolution</label>
2023-11-26 17:19:37 +01:00
<select id="sd_resolution"><!-- Populated in JS --></select>
2023-11-19 13:18:48 +01:00
<div data-sd-source="comfy">
2024-05-20 12:15:16 +02:00
<label for="sd_scheduler" data-i18n="Scheduler">Scheduler</label>
2023-11-19 13:18:48 +01:00
<select id="sd_scheduler"></select>
</div>
2023-11-20 11:35:11 +01:00
<div data-sd-source="comfy">
<label for="sd_vae">VAE</label>
<select id="sd_vae"></select>
</div>
<div class="flex-container marginTop10 margin-bot-10px">
<label class="flex1 checkbox_label">
<input id="sd_restore_faces" type="checkbox" />
2024-05-20 12:15:16 +02:00
<span data-i18n="Restore Faces">Restore Faces</span>
</label>
<label class="flex1 checkbox_label">
<input id="sd_enable_hr" type="checkbox" />
2024-05-20 12:15:16 +02:00
<span data-i18n="Hires. Fix">Hires. Fix</span>
</label>
</div>
2024-05-29 01:14:08 +02:00
<div data-sd-source="auto,vlad,comfy,horde,drawthings">
<label for="sd_clip_skip">CLIP Skip (<span id="sd_clip_skip_value"></span>)</label>
<input type="range" id="sd_clip_skip" min="{{clip_skip_min}}" max="{{clip_skip_max}}" step="{{clip_skip_step}}" value="{{clip_skip}}" />
</div>
2023-10-07 17:30:06 +02:00
<div data-sd-source="auto,vlad">
2024-05-20 12:15:16 +02:00
<label for="sd_hr_upscaler" data-i18n="Upscaler">Upscaler</label>
2023-09-03 13:56:02 +02:00
<select id="sd_hr_upscaler"></select>
2024-05-20 12:15:16 +02:00
<label for="sd_hr_scale"><span data-i18n="Upscale by">Upscale by</span> (<span id="sd_hr_scale_value"></span>)</label>
2023-09-03 13:56:02 +02:00
<input id="sd_hr_scale" type="range" min="{{hr_scale_min}}" max="{{hr_scale_max}}" step="{{hr_scale_step}}" value="{{hr_scale}}" />
2024-05-20 12:15:16 +02:00
<label for="sd_denoising_strength"><span data-i18n="Denoising strength">Denoising strength</span> (<span id="sd_denoising_strength_value"></span>)</label>
2023-09-03 13:56:02 +02:00
<input id="sd_denoising_strength" type="range" min="{{denoising_strength_min}}" max="{{denoising_strength_max}}" step="{{denoising_strength_step}}" value="{{denoising_strength}}" />
2024-05-20 12:49:33 +02:00
<label for="sd_hr_second_pass_steps"><span data-i18n="Hires steps (2nd pass)">Hires steps (2nd pass)</span> (<span id="sd_hr_second_pass_steps_value"></span>)</label>
2023-10-07 17:30:06 +02:00
<input id="sd_hr_second_pass_steps" type="range" min="{{hr_second_pass_steps_min}}" max="{{hr_second_pass_steps_max}}" step="{{hr_second_pass_steps_step}}" value="{{hr_second_pass_steps}}" />
2023-09-03 13:56:02 +02:00
</div>
<div data-sd-source="novel">
2024-05-20 12:15:16 +02:00
<label for="sd_novel_upscale_ratio"><span data-i18n="Upscale by">Upscale by</span> (<span id="sd_novel_upscale_ratio_value"></span>)</label>
<input id="sd_novel_upscale_ratio" type="range" min="{{novel_upscale_ratio_min}}" max="{{novel_upscale_ratio_max}}" step="{{novel_upscale_ratio_step}}" value="{{novel_upscale_ratio}}" />
</div>
2023-10-21 23:10:48 +02:00
<hr>
2024-05-20 12:15:16 +02:00
<h4 data-i18n="[title]Preset for prompt prefix and negative prompt" title="Preset for prompt prefix and negative prompt">
<span data-i18n="Style">Style</span>
2023-10-21 23:10:48 +02:00
</h4>
<div class="flex-container">
<select id="sd_style" class="flex1 text_pole"></select>
2024-05-20 12:15:16 +02:00
<div id="sd_save_style" data-i18n="[title]Save style" title="Save style" class="menu_button">
2023-10-21 23:10:48 +02:00
<i class="fa-solid fa-save"></i>
</div>
</div>
2024-05-20 12:15:16 +02:00
<label for="sd_prompt_prefix" data-i18n="Common prompt prefix">Common prompt prefix</label>
<textarea id="sd_prompt_prefix" class="text_pole textarea_compact" rows="3" data-i18n="[placeholder]sd_prompt_prefix_placeholder" placeholder="Use {prompt} to specify where the generated prompt will be inserted"></textarea>
<label for="sd_negative_prompt" data-i18n="Negative common prompt prefix">Negative common prompt prefix</label>
2023-10-21 23:10:48 +02:00
<textarea id="sd_negative_prompt" class="text_pole textarea_compact" rows="3"></textarea>
<div id="sd_character_prompt_block">
2024-05-20 12:15:16 +02:00
<label for="sd_character_prompt" data-i18n="Character-specific prompt prefix">Character-specific prompt prefix</label>
<small data-i18n="Won't be used in groups.">Won't be used in groups.</small>
<textarea id="sd_character_prompt" class="text_pole textarea_compact" rows="3" data-i18n="[placeholder]sd_character_prompt_placeholder" placeholder="Any characteristics that describe the currently selected character. Will be added after a common prompt prefix.&#10;Example: female, green eyes, brown hair, pink shirt"></textarea>
<label for="sd_character_negative_prompt" data-i18n="Character-specific negative prompt prefix">Character-specific negative prompt prefix</label>
<small data-i18n="Won't be used in groups.">Won't be used in groups.</small>
<textarea id="sd_character_negative_prompt" class="text_pole textarea_compact" rows="3" data-i18n="[placeholder]sd_character_negative_prompt_placeholder" placeholder="Any characteristics that should not appear for the selected character. Will be added after a negative common prompt prefix.&#10;Example: jewellery, shoes, glasses"></textarea>
</div>
</div>
</div>
<div class="inline-drawer">
<div class="inline-drawer-toggle inline-drawer-header">
2024-05-20 12:15:16 +02:00
<b data-i18n="Image Prompt Templates">Image Prompt Templates</b>
<div class="inline-drawer-icon fa-solid fa-circle-chevron-down down"></div>
</div>
<div id="sd_prompt_templates" class="inline-drawer-content">
</div>
</div>
</div>