File size: 32,795 Bytes
b82d373
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
<div class="sd_settings">
    <div class="inline-drawer">
        <div class="inline-drawer-toggle inline-drawer-header">
            <b>
                <span data-i18n="Image Generation">Image Generation</span>
                <a href="https://docs.sillytavern.app/extensions/stable-diffusion/" class="notes-link" target="_blank">
                    <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">
            <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">
                <input id="sd_refine_mode" type="checkbox" />
                <span data-i18n="sd_refine_mode_txt">Edit prompts before generation</span>
            </label>
            <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'.">
                <input id="sd_interactive_mode" type="checkbox" />
                <span data-i18n="sd_interactive_mode_txt">Interactive mode</span>
            </label>
            <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" />
                <span data-i18n="sd_multimodal_captioning_txt">Use multimodal captioning for portraits</span>
            </label>
            <label for="sd_free_extend" class="checkbox_label" data-i18n="[title]sd_free_extend" title="Automatically extend free mode subject prompts (not portraits or backgrounds) using a currently selected LLM.">
                <input id="sd_free_extend" type="checkbox" />
                <span data-i18n="sd_free_extend_txt">Extend free mode prompts</span>
                <small data-i18n="sd_free_extend_small">(interactive/commands)</small>
            </label>
            <label for="sd_expand" class="checkbox_label" data-i18n="[title]sd_expand" title="Automatically extend prompts using text generation model">
                <input id="sd_expand" type="checkbox" />
                <span data-i18n="sd_expand_txt">Auto-extend prompts</span>
                <span class="right_menu_button fa-solid fa-triangle-exclamation" data-i18n="[title]sd_expand_warning" title="May produce unexpected results. Manual prompt editing is recommended."></span>
            </label>
            <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" />
                <span data-i18n="sd_snap_txt">Snap auto-adjusted resolutions</span>
            </label>
            <label for="sd_source" data-i18n="Source">Source</label>
            <select id="sd_source">
                <option value="blockentropy">Block Entropy</option>
                <option value="comfy">ComfyUI</option>
                <option value="drawthings">DrawThings HTTP API</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="openai">OpenAI (DALL-E)</option>
                <option value="pollinations">Pollinations</option>
                <option value="vlad">SD.Next (vladmandic)</option>
                <option value="stability">Stability AI</option>
                <option value="auto">Stable Diffusion Web UI (AUTOMATIC1111)</option>
                <option value="horde">Stable Horde</option>
                <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">
                    <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>
                <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">
                    <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>
                <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="" />
                <!-- (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. -->
                <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 data-sd-source="huggingface">
                <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>
                <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 data-sd-source="vlad">
                <label for="sd_vlad_url">SD.Next API URL</label>
                <div class="flex-container flexnowrap">
                    <input id="sd_vlad_url" type="text" class="text_pole" data-i18n="[placeholder]sd_vlad_url" placeholder="Example: {{vlad_url}}" value="{{vlad_url}}" />
                    <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>
                <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>
            </div>
            <div data-sd-source="horde">
                <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>
                <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">
                    <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>
                    <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>
            <div data-sd-source="openai">
                <small data-i18n="These settings only apply to DALL-E 3">These settings only apply to DALL-E 3</small>
                <div class="flex-container">
                    <div class="flex1">
                        <label for="sd_openai_style" data-i18n="Image Style">Image Style</label>
                        <select id="sd_openai_style">
                            <option value="vivid">Vivid</option>
                            <option value="natural">Natural</option>
                        </select>
                    </div>
                    <div class="flex1">
                        <label for="sd_openai_quality" data-i18n="Image Quality">Image Quality</label>
                        <select id="sd_openai_quality">
                            <option value="standard" data-i18n="Standard">Standard</option>
                            <option value="hd" data-i18n="HD">HD</option>
                        </select>
                    </div>
                </div>
            </div>
            <div data-sd-source="comfy">
                <label for="sd_comfy_url">ComfyUI URL</label>
                <div class="flex-container flexnowrap">
                    <input id="sd_comfy_url" type="text" class="text_pole" data-i18n="[placeholder]sd_comfy_url" placeholder="Example: {{comfy_url}}" value="{{comfy_url}}" />
                    <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>
                <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>
                <label for="sd_comfy_workflow">ComfyUI Workflow</label>
                <div class="flex-container flexnowrap">
                    <select id="sd_comfy_workflow" class="flex1 text_pole"></select>
                    <div id="sd_comfy_open_workflow_editor" class="menu_button menu_button_icon" data-i18n="[title]Open workflow editor" title="Open workflow editor">
                        <i class="fa-solid fa-pen-to-square"></i>
                    </div>
                    <div id="sd_comfy_new_workflow" class="menu_button menu_button_icon" data-i18n="[title]Create new workflow" title="Create new workflow">
                        <i class="fa-solid fa-plus"></i>
                    </div>
                    <div id="sd_comfy_delete_workflow" class="menu_button menu_button_icon" data-i18n="[title]Delete workflow" title="Delete workflow">
                        <i class="fa-solid fa-trash-can"></i>
                    </div>
                </div>
            </div>
            <div data-sd-source="pollinations">
                <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>
            <div data-sd-source="stability">
                <div class="flex-container flexnowrap alignItemsBaseline marginBot5">
                    <strong class="flex1" data-i18n="API Key">API Key</strong>
                    <div id="sd_stability_key" class="menu_button menu_button_icon">
                        <i class="fa-fw fa-solid fa-key"></i>
                        <span data-i18n="Click to set">Click to set</span>
                    </div>
                </div>
                <div class="marginBot5">
                    <i data-i18n="You can find your API key in the Stability AI dashboard.">
                        You can find your API key in the Stability AI dashboard.
                    </i>
                </div>

                <div class="flex-container">
                    <div class="flex1">
                        <label for="sd_stability_style_preset" data-i18n="Style Preset">Style Preset</label>
                        <select id="sd_stability_style_preset">
                            <option value="anime">Anime</option>
                            <option value="3d-model">3D Model</option>
                            <option value="analog-film">Analog Film</option>
                            <option value="cinematic">Cinematic</option>
                            <option value="comic-book">Comic Book</option>
                            <option value="digital-art">Digital Art</option>
                            <option value="enhance">Enhance</option>
                            <option value="fantasy-art">Fantasy Art</option>
                            <option value="isometric">Isometric</option>
                            <option value="line-art">Line Art</option>
                            <option value="low-poly">Low Poly</option>
                            <option value="modeling-compound">Modeling Compound</option>
                            <option value="neon-punk">Neon Punk</option>
                            <option value="origami">Origami</option>
                            <option value="photographic">Photographic</option>
                            <option value="pixel-art">Pixel Art</option>
                            <option value="tile-texture">Tile Texture</option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="flex-container">
                <div class="flex1">
                    <label for="sd_model" data-i18n="Model">Model</label>
                    <select id="sd_model"></select>
                </div>

                <div class="flex1" data-sd-source="comfy,auto">
                    <label for="sd_vae">VAE</label>
                    <select id="sd_vae"></select>
                </div>
            </div>

            <div class="flex-container">
                <div class="flex1" data-sd-source="extras,horde,auto,drawthings,novel,vlad,comfy">
                    <label for="sd_sampler" data-i18n="Sampling method">Sampling method</label>
                    <select id="sd_sampler"></select>
                </div>

                <div class="flex1" data-sd-source="comfy,auto">
                    <label for="sd_scheduler" data-i18n="Scheduler">Scheduler</label>
                    <select id="sd_scheduler"></select>
                </div>
            </div>

            <div class="flex-container">
                <div class="flex1">
                    <label for="sd_resolution" data-i18n="Resolution">Resolution</label>
                    <select id="sd_resolution"><!-- Populated in JS --></select>
                </div>

                <div class="flex1" data-sd-source="auto,vlad,drawthings">
                    <label for="sd_hr_upscaler" data-i18n="Upscaler">Upscaler</label>
                    <select id="sd_hr_upscaler"></select>
                </div>
            </div>

            <div class="flex-container">
                <div class="alignitemscenter flex-container flexFlowColumn flexGrow flexShrink gap0 flexBasis48p">
                    <small>
                        <span data-i18n="Sampling steps">Sampling steps</span>
                    </small>
                    <input class="neo-range-slider" type="range" id="sd_steps" name="sd_steps" min="{{steps_min}}" max="{{steps_max}}" step="{{steps_step}}" value="{{steps}}" >
                    <input class="neo-range-input" type="number" id="sd_steps_value" data-for="sd_steps" min="{{steps_min}}" max="{{steps_max}}" step="{{steps_step}}" value="{{steps}}" >
                </div>

                <div class="alignitemscenter flex-container flexFlowColumn flexGrow flexShrink gap0 flexBasis48p">
                    <small>
                        <span data-i18n="CFG Scale">CFG Scale</span>
                    </small>
                    <input class="neo-range-slider" type="range" id="sd_scale" name="sd_scale" min="{{scale_min}}" max="{{scale_max}}" step="{{scale_step}}" value="{{scale}}" >
                    <input class="neo-range-input" type="number" id="sd_scale_value" data-for="sd_scale" min="{{scale_min}}" max="{{scale_max}}" step="{{scale_step}}" value="{{scale}}" >
                </div>
            </div>

            <div id="sd_dimensions_block" class="flex-container">
                <div class="alignitemscenter flex-container flexFlowColumn flexGrow flexShrink gap0 flexBasis48p">
                    <small>
                        <span data-i18n="Width">Width</span>
                    </small>
                    <input class="neo-range-slider" type="range" id="sd_width" name="sd_width" max="{{dimension_max}}" min="{{dimension_min}}" step="{{dimension_step}}" value="{{width}}" >
                    <input class="neo-range-input" type="number" id="sd_width_value" data-for="sd_width" max="{{dimension_max}}" min="{{dimension_min}}" step="{{dimension_step}}" value="{{width}}" >
                </div>

                <div class="alignitemscenter flex-container flexFlowColumn flexGrow flexShrink gap0 flexBasis48p">
                    <small>
                        <span data-i18n="Height">Height</span>
                    </small>
                    <input class="neo-range-slider" type="range" id="sd_height" name="sd_height" max="{{dimension_max}}" min="{{dimension_min}}" step="{{dimension_step}}" value="{{height}}" >
                    <input class="neo-range-input" type="number" id="sd_height_value" data-for="sd_height" max="{{dimension_max}}" min="{{dimension_min}}" step="{{dimension_step}}" value="{{height}}" >
                </div>

                <div id="sd_swap_dimensions" class="right_menu_button" title="Swap width and height" data-i18n="[title]Swap width and height">
                    <i class="fa-solid fa-arrow-right-arrow-left"></i>
                </div>
            </div>

            <div class="flex-container">
                <div class="alignitemscenter flex-container flexFlowColumn flexGrow flexShrink gap0 flexBasis48p" data-sd-source="auto,vlad,drawthings">
                    <small>
                        <span data-i18n="Upscale by">Upscale by</span>
                    </small>
                    <input class="neo-range-slider" type="range" id="sd_hr_scale" name="sd_hr_scale" min="{{hr_scale_min}}" max="{{hr_scale_max}}" step="{{hr_scale_step}}" value="{{hr_scale}}" >
                    <input class="neo-range-input" type="number" id="sd_hr_scale_value" data-for="sd_hr_scale" min="{{hr_scale_min}}" max="{{hr_scale_max}}" step="{{hr_scale_step}}" value="{{hr_scale}}" >
                </div>

                <div class="alignitemscenter flex-container flexFlowColumn flexGrow flexShrink gap0 flexBasis48p" data-sd-source="auto,vlad">
                    <small>
                        <span data-i18n="Denoising strength">Denoising strength</span>
                    </small>
                    <input class="neo-range-slider" type="range" id="sd_denoising_strength" name="sd_denoising_strength" min="{{denoising_strength_min}}" max="{{denoising_strength_max}}" step="{{denoising_strength_step}}" value="{{denoising_strength}}" >
                    <input class="neo-range-input" type="number" id="sd_denoising_strength_value" data-for="sd_denoising_strength" min="{{denoising_strength_min}}" max="{{denoising_strength_max}}" step="{{denoising_strength_step}}" value="{{denoising_strength}}" >
                </div>

                <div class="alignitemscenter flex-container flexFlowColumn flexGrow flexShrink gap0 flexBasis48p" data-sd-source="auto,vlad">
                    <small>
                        <span data-i18n="Hires steps (2nd pass)">Hires steps (2nd pass)</span>
                    </small>
                    <input class="neo-range-slider" type="range" id="sd_hr_second_pass_steps" name="sd_hr_second_pass_steps" max="{{hr_second_pass_steps_max}}" step="{{hr_second_pass_steps_step}}" value="{{hr_second_pass_steps}}"  >
                    <input class="neo-range-input" type="number" id="sd_hr_second_pass_steps_value" data-for="sd_hr_second_pass_steps" max="{{hr_second_pass_steps_max}}" step="{{hr_second_pass_steps_step}}" value="{{hr_second_pass_steps}}" >
                </div>

                <div class="alignitemscenter flex-container flexFlowColumn flexGrow flexShrink gap0 flexBasis48p" data-sd-source="novel">
                    <small>
                        <span data-i18n="Upscale by">Upscale by</span>
                    </small>
                    <input class="neo-range-slider" type="range" id="sd_novel_upscale_ratio" name="sd_novel_upscale_ratio" min="{{novel_upscale_ratio_min}}" max="{{novel_upscale_ratio_max}}" step="{{novel_upscale_ratio_step}}" value="{{novel_upscale_ratio}}" >
                    <input class="neo-range-input" type="number" id="sd_novel_upscale_ratio_value" data-for="sd_novel_upscale_ratio" min="{{novel_upscale_ratio_min}}" max="{{novel_upscale_ratio_max}}" step="{{novel_upscale_ratio_step}}" value="{{novel_upscale_ratio}}" >
                </div>

                <div class="alignitemscenter flex-container flexFlowColumn flexGrow flexShrink gap0 flexBasis48p" data-sd-source="auto,vlad,comfy,horde,drawthings,extras">
                    <small>
                        <span data-i18n="CLIP Skip">CLIP Skip</span>
                    </small>
                    <input class="neo-range-slider" type="range" id="sd_clip_skip" name="sd_clip_skip" min="{{clip_skip_min}}" max="{{clip_skip_max}}" step="{{clip_skip_step}}" value="{{clip_skip}}" >
                    <input class="neo-range-input" type="number" id="sd_clip_skip_value" data-for="sd_clip_skip" min="{{clip_skip_min}}" max="{{clip_skip_max}}" step="{{clip_skip_step}}" value="{{clip_skip}}" >
                </div>
            </div>

            <div class="flex-container marginTopBot5" data-sd-source="auto,vlad,extras,horde,drawthings,comfy">
                <label class="flex1 checkbox_label">
                    <input id="sd_restore_faces" type="checkbox" />
                    <small data-i18n="Restore Faces">Restore Faces</small>
                </label>
                <label class="flex1 checkbox_label">
                    <input id="sd_enable_hr" type="checkbox" />
                    <small data-i18n="Hires. Fix">Hires. Fix</small>
                </label>
                <label data-sd-source="horde" for="sd_horde_karras" class="flex1 checkbox_label">
                    <input id="sd_horde_karras" type="checkbox" />
                    <small data-i18n="Karras">Karras</small>
                    <i class="fa-solid fa-info-circle fa-sm opacity50p" data-i18n="[title]Not all samplers supported." title="Not all samplers supported."></i>
                </label>
            </div>

            <div class="flex-container marginTopBot5" data-sd-source="novel">
                <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" />
                    <small data-i18n="SMEA">SMEA</small>
                </label>
                <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" />
                    <small data-i18n="DYN">DYN</small>
                </label>
                <label class="flex1 checkbox_label" for="sd_novel_decrisper" title="Reduce artifacts caused by high guidance values.">
                    <input id="sd_novel_decrisper" type="checkbox" />
                    <small data-i18n="Decrisper">Decrisper</small>
                </label>
            </div>

            <div data-sd-source="novel,togetherai,pollinations,comfy,drawthings,vlad,auto,horde,extras,stability,blockentropy" class="marginTop5">
                <label for="sd_seed">
                    <span data-i18n="Seed">Seed</span>
                    <small data-i18n="(-1 for random)">(-1 for random)</small>
                </label>
                <input id="sd_seed" type="number" class="text_pole" min="-1" max="9999999999" step="1" />
            </div>

            <hr>
            <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>
            </h4>
            <div class="flex-container">
                <select id="sd_style" class="flex1 text_pole"></select>
                <div id="sd_save_style" data-i18n="[title]Save style" title="Save style" class="menu_button">
                    <i class="fa-solid fa-save"></i>
                </div>
                <div id="sd_delete_style" data-i18n="[title]Delete style" title="Delete style" class="menu_button">
                    <i class="fa-solid fa-trash-can"></i>
                </div>
            </div>
            <label for="sd_prompt_prefix" data-i18n="Common prompt prefix">Common prompt prefix</label>
            <textarea id="sd_prompt_prefix" class="text_pole textarea_compact" 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>
            <textarea id="sd_negative_prompt" class="text_pole textarea_compact"></textarea>
            <div id="sd_character_prompt_block">
                <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" 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" 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>
                <label for="sd_character_prompt_share" class="checkbox_label flexWrap marginTop5">
                    <input id="sd_character_prompt_share" type="checkbox" />
                    <span data-i18n="Shareable">
                        Shareable
                    </span>
                    <small class="flexBasis100p">
                        When checked, character-specific prompts will be saved with the character card data.
                    </small>
                </label>
            </div>
            <hr>
            <h4 data-i18n="Chat Message Visibility (by source)">
                Chat Message Visibility (by source)
            </h4>
            <small data-i18n="Uncheck to hide the extension's messages in chat prompts.">
                Uncheck to hide the extension's messages in chat prompts.
            </small>
            <div class="flex-container flexFlowColumn marginTopBot5 flexGap10">
                <label for="sd_wand_visible" class="checkbox_label">
                    <span class="flex1 flex-container alignItemsCenter">
                        <i class="fa-solid fa-wand-magic-sparkles"></i>
                        <span data-i18n="Extensions Menu">Extensions Menu</span>
                    </span>
                    <input id="sd_wand_visible" type="checkbox" />
                </label>
                <label for="sd_command_visible" class="checkbox_label">
                    <span class="flex1 flex-container alignItemsCenter">
                        <i class="fa-solid fa-terminal"></i>
                        <span data-i18n="Slash Command">Slash Command</span>
                    </span>
                    <input id="sd_command_visible" type="checkbox" />
                </label>
                <label for="sd_interactive_visible" class="checkbox_label">
                    <span class="flex1 flex-container alignItemsCenter">
                        <i class="fa-solid fa-message"></i>
                        <span data-i18n="Interactive Mode">Interactive Mode</span>
                    </span>
                    <input id="sd_interactive_visible" type="checkbox" />
                </label>
            </div>
        </div>
    </div>
    <div class="inline-drawer">
        <div class="inline-drawer-toggle inline-drawer-header">
            <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>