| 303 | uncond_multiplier=uncond_multiplier, cn_extras=cn_extras) |
| 304 | |
| 305 | class CustomT2IAdapterWeights(io.ComfyNode): |
| 306 | @classmethod |
| 307 | def define_schema(cls) -> io.Schema: |
| 308 | return io.Schema( |
| 309 | node_id='ACN_CustomT2IAdapterWeights', |
| 310 | display_name='T2IAdapter Custom Weights 🛂🅐🅒🅝', |
| 311 | category='Adv-ControlNet 🛂🅐🅒🅝/weights/T2IAdapter', |
| 312 | inputs=[ |
| 313 | io.Float.Input('input_0', default=1.0, max=10.0, min=0.0, step=0.001), |
| 314 | io.Float.Input('input_1', default=1.0, max=10.0, min=0.0, step=0.001), |
| 315 | io.Float.Input('input_2', default=1.0, max=10.0, min=0.0, step=0.001), |
| 316 | io.Float.Input('input_3', default=1.0, max=10.0, min=0.0, step=0.001), |
| 317 | io.Float.Input('uncond_multiplier', optional=True, default=1.0, max=1.0, min=0.0, step=0.01), |
| 318 | io.Custom('CN_WEIGHTS_EXTRAS').Input('cn_extras', optional=True) |
| 319 | ], |
| 320 | outputs=[ |
| 321 | io.Custom('CONTROL_NET_WEIGHTS').Output('CN_WEIGHTS', is_output_list=False), |
| 322 | io.Custom('TIMESTEP_KEYFRAME').Output('TK_SHORTCUT', is_output_list=False) |
| 323 | ] |
| 324 | ) |
| 325 | |
| 326 | |
| 327 | @classmethod |
| 328 | def execute(cls, input_0, input_1, input_2, input_3, |
| 329 | uncond_multiplier: float=1.0, cn_extras: dict[str]={}): |
| 330 | weights = [input_0, input_1, input_2, input_3] |
| 331 | weights = get_properly_arranged_t2i_weights(weights) |
| 332 | weights = ControlWeights.t2iadapter(weights_input=weights, uncond_multiplier=uncond_multiplier, extras=cn_extras, disable_applied_to=True) |
nothing calls this directly
no outgoing calls
no test coverage detected