@@ -98,7 +98,7 @@ const std::string html_content = R"xxx(
9898 }
9999 </style>
100100</head>
101- )xxx" R"xxx(
101+ <!-- )xxx" R"xxx( -->
102102
103103<body>
104104 <div class="container">
@@ -202,47 +202,54 @@ const std::string html_content = R"xxx(
202202 <div class="input-group">
203203 <label for="model">Model:</label>
204204 <select id="model" class="param-input">
205- <option value="" selected>unset</option>
205+ <option value="" selected>keep current</option>
206+ <option value="none">None</option>
206207 </select>
207208 </div>
208209 <div class="input-group">
209210 <label for="diff-model">Diffusion Model:</label>
210211 <select id="diff-model" class="param-input">
211- <option value="" selected>unset</option>
212+ <option value="" selected>keep current</option>
213+ <option value="none">None</option>
212214 </select>
213215 </div>
214216 <div class="line">
215217
216218 <div class="input-group">
217219 <label for="clip_l">Clip_L:</label>
218220 <select id="clip_l" class="param-input">
219- <option value="" selected>unset</option>
221+ <option value="" selected>keep current</option>
222+ <option value="none">None</option>
220223 </select>
221224 </div>
222225 <div class="input-group">
223226 <label for="clip_g">Clip_G:</label>
224227 <select id="clip_g" class="param-input">
225- <option value="" selected>unset</option>
228+ <option value="" selected>keep current</option>
229+ <option value="none">None</option>
226230 </select>
227231 </div>
228232 <div class="input-group">
229233 <label for="t5xxl">T5 XXL:</label>
230234 <select id="t5xxl" class="param-input">
231- <option value="" selected>unset</option>
235+ <option value="" selected>keep current</option>
236+ <option value="none">None</option>
232237 </select>
233238 </div>
234239 </div>
235240 <div class="line">
236241 <div class="input-group">
237242 <label for="vae">VAE:</label>
238243 <select id="vae" class="param-input">
239- <option value="" selected>unset</option>
244+ <option value="" selected>keep current</option>
245+ <option value="none">None</option>
240246 </select>
241247 </div>
242248 <div class="input-group">
243249 <label for="tae">TAE:</label>
244250 <select id="tae" class="param-input">
245- <option value="" selected>unset</option>
251+ <option value="" selected>keep current</option>
252+ <option value="none">None</option>
246253 </select>
247254 </div>
248255 </div>
@@ -258,7 +265,7 @@ const std::string html_content = R"xxx(
258265 <div class="line">
259266 <p>Current task status: <span id="status"> -- </span> | Queue: <span id="queued_tasks">0</span></p>
260267 </div>
261- )xxx" R"xxx(
268+ <!-- )xxx" R"xxx( -->
262269 <script>
263270 let queued_tasks = 0;
264271 async function update_queue() {
@@ -362,7 +369,10 @@ const std::string html_content = R"xxx(
362369 modelsSelect.appendChild(option);
363370 });
364371 } else {
365- const currentOption = modelsSelect.options[modelsSelect.selectedIndex];
372+ modelsSelect.options.length = 1;
373+ const currentOption = modelsSelect.options[0];
374+ currentOption.select = true;
375+ currentOption.value = "";
366376 currentOption.textContent = "unavailable";
367377 }
368378
@@ -375,7 +385,10 @@ const std::string html_content = R"xxx(
375385 diffModelsSelect.appendChild(option);
376386 });
377387 } else {
378- const currentOption = diffModelsSelect.options[diffModelsSelect.selectedIndex];
388+ diffModelsSelect.options.length = 1;
389+ const currentOption = diffModelsSelect.options[0];
390+ currentOption.select = true;
391+ currentOption.value = "";
379392 currentOption.textContent = "unavailable";
380393 }
381394
@@ -388,7 +401,10 @@ const std::string html_content = R"xxx(
388401 clipLSelect.appendChild(option);
389402 });
390403 } else {
391- const currentOption = clipLSelect.options[clipLSelect.selectedIndex];
404+ clipLSelect.options.length = 1;
405+ const currentOption = clipLSelect.options[0];
406+ currentOption.select = true;
407+ currentOption.value = "";
392408 currentOption.textContent = "unavailable";
393409 }
394410
@@ -401,7 +417,10 @@ const std::string html_content = R"xxx(
401417 clipGSelect.appendChild(option);
402418 });
403419 } else {
404- const currentOption = clipGSelect.options[clipGSelect.selectedIndex];
420+ clipGSelect.options.length = 1;
421+ const currentOption = clipGSelect.options[0];
422+ currentOption.select = true;
423+ currentOption.value = "";
405424 currentOption.textContent = "unavailable";
406425 }
407426
@@ -414,7 +433,10 @@ const std::string html_content = R"xxx(
414433 t5xxlSelect.appendChild(option);
415434 });
416435 } else {
417- const currentOption = t5xxlSelect.options[t5xxlSelect.selectedIndex];
436+ t5xxlSelect.options.length = 1;
437+ const currentOption = t5xxlSelect.options[0];
438+ currentOption.select = true;
439+ currentOption.value = "";
418440 currentOption.textContent = "unavailable";
419441 }
420442
@@ -427,7 +449,10 @@ const std::string html_content = R"xxx(
427449 vaeSelect.appendChild(option);
428450 });
429451 } else {
430- const currentOption = vaeSelect.options[vaeSelect.selectedIndex];
452+ vaeSelect.options.length = 1;
453+ const currentOption = vaeSelect.options[0];
454+ currentOption.select = true;
455+ currentOption.value = "";
431456 currentOption.textContent = "unavailable";
432457 }
433458
@@ -440,7 +465,10 @@ const std::string html_content = R"xxx(
440465 taeSelect.appendChild(option);
441466 });
442467 } else {
443- const currentOption = taeSelect.options[taeSelect.selectedIndex];
468+ taeSelect.options.length = 1;
469+ const currentOption = taeSelect.options[0];
470+ currentOption.select = true;
471+ currentOption.value = "";
444472 currentOption.textContent = "unavailable";
445473 }
446474 }
@@ -473,9 +501,9 @@ const std::string html_content = R"xxx(
473501 document.getElementById('preview_interval').value = data.generation_params.preview_interval;
474502 }
475503 }
476- )xxx" R"xxx(
504+ // )xxx" R"xxx(
477505
478- fetchSampleMethods();
506+ fetchSampleMethods();
479507 fetchSchedules();
480508 fetchPreviewMethods();
481509 fetchModelsEncodersAE();
0 commit comments