Add LoRA Strength to metadata files

This commit is contained in:
Olivia Godone-Maresca 2023-04-01 11:42:20 -04:00
parent 75445185c4
commit 07b467e4bc
3 changed files with 10 additions and 2 deletions

View File

@ -28,7 +28,7 @@ TASK_TEXT_MAPPING = {
"use_hypernetwork_model": "Hypernetwork model",
"hypernetwork_strength": "Hypernetwork Strength",
"use_lora_model": "LoRA model",
# "lora_alpha": "LoRA Strength",
"lora_alpha": "LoRA Strength",
}

View File

@ -221,7 +221,7 @@
<input id="lora_model" type="text" spellcheck="false" autocomplete="off" class="model-filter" data-path="" />
</td></tr>
<tr id="lora_alpha_container" class="pl-5">
<td><label for="lora_alpha_slider">LoRA strength:</label></td>
<td><label for="lora_alpha_slider">LoRA Strength:</label></td>
<td> <input id="lora_alpha_slider" name="lora_alpha_slider" class="editor-slider" value="50" type="range" min="0" max="100"> <input id="lora_alpha" name="lora_alpha" size="4" pattern="^[0-9\.]+$" onkeypress="preventNonNumericalInput(event)"><br/></td>
</tr>
<tr class="pl-5"><td><label for="hypernetwork_model">Hypernetwork:</i></label></td><td>

View File

@ -245,6 +245,14 @@ const TASK_MAPPING = {
readUI: () => loraModelField.value,
parse: (val) => val
},
lora_alpha: { name: 'LoRA Strength',
setUI: (lora_alpha) => {
loraAlphaField.value = lora_alpha
updateLoraAlphaSlider()
},
readUI: () => parseFloat(loraAlphaField.value),
parse: (val) => parseFloat(val)
},
use_hypernetwork_model: { name: 'Hypernetwork model',
setUI: (use_hypernetwork_model) => {
const oldVal = hypernetworkModelField.value