Merge pull request #528 from patriceac/patch-1

Add support for custom modifiers to d&d and clipboard
This commit is contained in:
cmdr2 2022-11-22 16:06:26 +05:30 committed by GitHub
commit 040d7a6563
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,6 +51,13 @@ const TASK_MAPPING = {
readUI: () => negativePromptField.value,
parse: (val) => val
},
active_tags: { name: "Image Modifiers",
setUI: (active_tags) => {
refreshModifiersState(active_tags)
},
readUI: () => activeTags.map(x => x.name),
parse: (val) => val
},
width: { name: 'Width',
setUI: (width) => {
const oldVal = widthField.value
@ -267,11 +274,6 @@ function restoreTaskToUI(task, fieldsToSkip) {
// restore the original tag
promptField.value = task.reqBody.original_prompt || task.reqBody.prompt
// Restore modifiers
if (task.reqBody.active_tags) {
refreshModifiersState(task.reqBody.active_tags)
}
// properly reset checkboxes
if (!('use_face_correction' in task.reqBody)) {
useFaceCorrectionField.checked = false