add Flux_ControlNet_Quantization

This commit is contained in:
tc2000731
2024-10-29 17:29:24 +08:00
parent 7e97a96840
commit 900a1c095f
7 changed files with 558 additions and 2 deletions

View File

@@ -37,6 +37,11 @@ class Annotator:
self.processor_id = processor_id
self.detect_resolution = detect_resolution
def to(self,device):
if hasattr(self.processor,"model") and hasattr(self.processor.model,"to"):
self.processor.model.to(device)
def __call__(self, image, mask=None):
width, height = image.size