mirror of
https://github.com/lllyasviel/stable-diffusion-webui-forge.git
synced 2026-04-29 02:31:16 +00:00
rework several component patcher
backend is 65% finished
This commit is contained in:
@@ -2,7 +2,7 @@ import gradio as gr
|
||||
import ldm_patched.modules.samplers
|
||||
|
||||
from modules import scripts
|
||||
from modules_forge.unet_patcher import copy_and_update_model_options
|
||||
from backend.patcher.base import set_model_options_patch_replace
|
||||
|
||||
|
||||
class PerturbedAttentionGuidanceForForge(scripts.Script):
|
||||
@@ -36,7 +36,7 @@ class PerturbedAttentionGuidanceForForge(scripts.Script):
|
||||
model, cond_denoised, cond, denoised, sigma, x = \
|
||||
args["model"], args["cond_denoised"], args["cond"], args["denoised"], args["sigma"], args["input"]
|
||||
|
||||
new_options = copy_and_update_model_options(args["model_options"], attn_proc, "attn1", "middle", 0)
|
||||
new_options = set_model_options_patch_replace(args["model_options"], attn_proc, "attn1", "middle", 0)
|
||||
|
||||
if scale == 0:
|
||||
return denoised
|
||||
|
||||
Reference in New Issue
Block a user