| 61 | |
| 62 | |
| 63 | class PlusPlusInputGroup: |
| 64 | def __init__(self): |
| 65 | self.controls: dict[str, PlusPlusInput] = {} |
| 66 | |
| 67 | def add(self, pp_input: PlusPlusInput): |
| 68 | if pp_input.control_type in self.controls: |
| 69 | raise Exception(f"Control type '{pp_input.control_type}' is already present; ControlNet++ does not allow more than 1 of each type.") |
| 70 | self.controls[pp_input.control_type] = pp_input |
| 71 | |
| 72 | def clone(self) -> 'PlusPlusInputGroup': |
| 73 | cloned = PlusPlusInputGroup() |
| 74 | for key, value in self.controls.items(): |
| 75 | cloned.controls[key] = value.clone() |
| 76 | return cloned |
| 77 | |
| 78 | |
| 79 | class PlusPlusImageWrapper(AbstractPreprocWrapper): |
no outgoing calls
no test coverage detected