t2i_adapter: minor type annotation fix

This commit is contained in:
Cédric Deltheil 2023-10-04 15:36:58 +02:00 committed by Cédric Deltheil
parent 9fbe86fbc9
commit 9b1e25e682

View file

@ -25,7 +25,7 @@ class SDXLT2IAdapter(T2IAdapter[SDXLUNet]):
) )
def inject(self: "SDXLT2IAdapter", parent: fl.Chain | None = None) -> "SDXLT2IAdapter": def inject(self: "SDXLT2IAdapter", parent: fl.Chain | None = None) -> "SDXLT2IAdapter":
def sanity_check_t2i(block: fl.Module) -> None: def sanity_check_t2i(block: fl.Chain) -> None:
for t2i_layer in block.layers(layer_type=T2IFeatures): for t2i_layer in block.layers(layer_type=T2IFeatures):
assert t2i_layer.name != self.name, f"T2I-Adapter named {self.name} is already injected" assert t2i_layer.name != self.name, f"T2I-Adapter named {self.name} is already injected"