Skip to content

Commit 3fc6ebc

Browse files
Add basic style model "multiply" strength.
1 parent 20a560e commit 3fc6ebc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

nodes.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -1008,14 +1008,19 @@ def INPUT_TYPES(s):
10081008
return {"required": {"conditioning": ("CONDITIONING", ),
10091009
"style_model": ("STYLE_MODEL", ),
10101010
"clip_vision_output": ("CLIP_VISION_OUTPUT", ),
1011+
"strength": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 10.0, "step": 0.001}),
1012+
"strength_type": (["multiply"], ),
10111013
}}
10121014
RETURN_TYPES = ("CONDITIONING",)
10131015
FUNCTION = "apply_stylemodel"
10141016

10151017
CATEGORY = "conditioning/style_model"
10161018

1017-
def apply_stylemodel(self, clip_vision_output, style_model, conditioning):
1019+
def apply_stylemodel(self, clip_vision_output, style_model, conditioning, strength, strength_type):
10181020
cond = style_model.get_cond(clip_vision_output).flatten(start_dim=0, end_dim=1).unsqueeze(dim=0)
1021+
if strength_type == "multiply":
1022+
cond *= strength
1023+
10191024
c = []
10201025
for t in conditioning:
10211026
n = [torch.cat((t[0], cond), dim=1), t[1].copy()]

0 commit comments

Comments
 (0)