diff --git a/invokeai/app/invocations/controlnet_image_processors.py b/invokeai/app/invocations/controlnet_image_processors.py index 1987381a7e..fb0457f067 100644 --- a/invokeai/app/invocations/controlnet_image_processors.py +++ b/invokeai/app/invocations/controlnet_image_processors.py @@ -26,7 +26,7 @@ from controlnet_aux import ( OpenposeDetector, PidiNetDetector, ContentShuffleDetector, - # ZoeDetector, # FIXME: uncomment once ZoeDetector is availabel in official controlnet_aux release + ZoeDetector, ) from .image import ImageOutput, build_image_output, PILInvocationConfig @@ -390,16 +390,14 @@ class ContentShuffleImageProcessorInvocation(ImageProcessorInvocation, PILInvoca return processed_image -# # FIXME: ZoeDetector was implemented _after_ most recent official release of controlnet_aux (v0.0.3) -# # so it is commented out until a new release is made -# class ZoeDepthImageProcessorInvocation(ImageProcessorInvocation, PILInvocationConfig): -# """Applies Zoe depth processing to image""" -# # fmt: off -# type: Literal["zoe_depth_image_processor"] = "zoe_depth_image_processor" -# # fmt: on -# -# def run_processor(self, image): -# zoe_depth_processor = ZoeDetector.from_pretrained("lllyasviel/Annotators") -# processed_image = zoe_depth_processor(image) -# return processed_image +class ZoeDepthImageProcessorInvocation(ImageProcessorInvocation, PILInvocationConfig): + """Applies Zoe depth processing to image""" + # fmt: off + type: Literal["zoe_depth_image_processor"] = "zoe_depth_image_processor" + # fmt: on + + def run_processor(self, image): + zoe_depth_processor = ZoeDetector.from_pretrained("lllyasviel/Annotators") + processed_image = zoe_depth_processor(image) + return processed_image diff --git a/pyproject.toml b/pyproject.toml index 6ad1b6ca2e..e65fe00b9a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,8 @@ dependencies = [ "click", "clip_anytorch", # replacing "clip @ https://github.com/openai/CLIP/archive/eaa22acb90a5876642d0507623e859909230a52d.zip", "compel~=1.1.5", - "controlnet-aux==0.0.3", + "controlnet-aux>=0.0.4", + "timm==0.6.13", # needed to override timm latest in controlnet_aux, see https://github.com/isl-org/ZoeDepth/issues/26 "datasets", "diffusers[torch]~=0.16.1", "dnspython==2.2.1",