This commit is contained in:
lllyasviel 2024-01-29 19:33:47 -08:00
parent 179a753ce8
commit 459450c48c
2 changed files with 4 additions and 2 deletions

View File

@ -27,7 +27,7 @@ class PreprocessorClipVision(Preprocessor):
)
self.clipvision = ldm_patched.modules.clip_vision.load(ckpt_path)
input_image = numpy_to_pytorch(input_image).to(self.clipvision.patcher.current_device)
input_image = numpy_to_pytorch(input_image)
return self.clipvision.encode_image(input_image)

View File

@ -935,7 +935,9 @@ class ControlNetUiGroup(object):
else None,
)
if not isinstance(result, np.ndarray) and result.nidm == 3 and result.shape[2] < 5:
is_image = isinstance(result, np.ndarray) and result.ndim == 3 and result.shape[2] < 5
if not is_image:
result = img
result = external_code.visualize_inpaint_mask(result)