mirror of
https://github.com/lllyasviel/stable-diffusion-webui-forge.git
synced 2026-02-09 01:19:58 +00:00
i
This commit is contained in:
@@ -89,7 +89,7 @@ class ControlNetExampleForge(scripts.Script):
|
||||
unet = apply_controlnet_advanced(unet=unet, controlnet=self.model, image_bhwc=control_image,
|
||||
strength=0.6, start_percent=0.0, end_percent=0.8,
|
||||
positive_advanced_weighting=None, negative_advanced_weighting=None,
|
||||
frame_advanced_weighting=None)
|
||||
advanced_frame_weighting=None)
|
||||
|
||||
p.sd_model.forge_objects.unet = unet
|
||||
|
||||
|
||||
@@ -7,13 +7,13 @@ def apply_controlnet_advanced(
|
||||
end_percent,
|
||||
positive_advanced_weighting=None,
|
||||
negative_advanced_weighting=None,
|
||||
frame_advanced_weighting=None,
|
||||
advanced_frame_weighting=None,
|
||||
):
|
||||
|
||||
cnet = controlnet.copy().set_cond_hint(image_bhwc.movedim(-1, 1), strength, (start_percent, end_percent))
|
||||
cnet.positive_advanced_weighting = positive_advanced_weighting
|
||||
cnet.negative_advanced_weighting = negative_advanced_weighting
|
||||
cnet.frame_advanced_weighting = frame_advanced_weighting
|
||||
cnet.advanced_frame_weighting = advanced_frame_weighting
|
||||
|
||||
m = unet.clone()
|
||||
m.add_patched_controlnet(cnet)
|
||||
|
||||
Reference in New Issue
Block a user