mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Moved to controlnet_aux v0.0.4, reinstated Zoe controlnet preprocessor. Also in pyproject.toml had to specify downgrade of timm to 0.6.13 _after_ controlnet-aux installs timm >= 0.9.2, because timm >0.6.13 breaks Zoe preprocessor.
This commit is contained in:
parent
020f3ccf07
commit
c4277b0662
@ -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
|
||||
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user