mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-12-06 10:31:17 -08:00
extra networks UI
rework of hypernets: rather than via settings, hypernets are added directly to prompt as <hypernet:name:weight>
This commit is contained in:
parent
e33cace2c2
commit
40ff6db532
25 changed files with 767 additions and 216 deletions
|
|
@ -196,8 +196,6 @@ function confirm_clear_prompt(prompt, negative_prompt) {
|
|||
return [prompt, negative_prompt]
|
||||
}
|
||||
|
||||
|
||||
|
||||
opts = {}
|
||||
onUiUpdate(function(){
|
||||
if(Object.keys(opts).length != 0) return;
|
||||
|
|
@ -239,11 +237,14 @@ onUiUpdate(function(){
|
|||
return
|
||||
}
|
||||
|
||||
|
||||
prompt.parentElement.insertBefore(counter, prompt)
|
||||
counter.classList.add("token-counter")
|
||||
prompt.parentElement.style.position = "relative"
|
||||
|
||||
textarea.addEventListener("input", () => update_token_counter(id_button));
|
||||
textarea.addEventListener("input", function(){
|
||||
update_token_counter(id_button);
|
||||
});
|
||||
}
|
||||
|
||||
registerTextarea('txt2img_prompt', 'txt2img_token_counter', 'txt2img_token_button')
|
||||
|
|
@ -261,10 +262,8 @@ onUiUpdate(function(){
|
|||
})
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
|
||||
onOptionsChanged(function(){
|
||||
elem = gradioApp().getElementById('sd_checkpoint_hash')
|
||||
sd_checkpoint_hash = opts.sd_checkpoint_hash || ""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue