| 303 | |
| 304 | |
| 305 | class AbstractPreprocWrapper: |
| 306 | error_msg = "Invalid use of [InsertHere] output. The output of [InsertHere] preprocessor is NOT a usual image, but a latent pretending to be an image - you must connect the output directly to an Apply ControlNet node (advanced or otherwise). It cannot be used for anything else that accepts IMAGE input." |
| 307 | def __init__(self, condhint): |
| 308 | self.condhint = condhint |
| 309 | |
| 310 | def movedim(self, *args, **kwargs): |
| 311 | return self |
| 312 | |
| 313 | def __getattr__(self, *args, **kwargs): |
| 314 | raise AttributeError(self.error_msg) |
| 315 | |
| 316 | def __setattr__(self, name, value): |
| 317 | if name != "condhint": |
| 318 | raise AttributeError(self.error_msg) |
| 319 | super().__setattr__(name, value) |
| 320 | |
| 321 | def __iter__(self, *args, **kwargs): |
| 322 | raise AttributeError(self.error_msg) |
| 323 | |
| 324 | def __next__(self, *args, **kwargs): |
| 325 | raise AttributeError(self.error_msg) |
| 326 | |
| 327 | def __len__(self, *args, **kwargs): |
| 328 | raise AttributeError(self.error_msg) |
| 329 | |
| 330 | def __getitem__(self, *args, **kwargs): |
| 331 | raise AttributeError(self.error_msg) |
| 332 | |
| 333 | def __setitem__(self, *args, **kwargs): |
| 334 | raise AttributeError(self.error_msg) |
| 335 | |
| 336 | |
| 337 | # depending on model, AnimateDiff may inject into GroupNorm, so make sure GroupNorm will be clean |
nothing calls this directly
no outgoing calls
no test coverage detected