Update forge_ipadapter.py

This commit is contained in:
lllyasviel
2024-01-31 10:34:27 -08:00
parent 4ca012df4d
commit a051a5d3f0

View File

@@ -16,10 +16,8 @@ class PreprocessorClipVisionForIPAdapter(PreprocessorClipVision):
self.model_filename_filters = ['IP-Adapter', 'IP_Adapter'] self.model_filename_filters = ['IP-Adapter', 'IP_Adapter']
def __call__(self, input_image, resolution, slider_1=None, slider_2=None, slider_3=None, **kwargs): def __call__(self, input_image, resolution, slider_1=None, slider_2=None, slider_3=None, **kwargs):
clipvision = self.load_clipvision() return dict(
clip_vision=self.load_clipvision(),
cond = dict(
clipvision=clipvision,
image=numpy_to_pytorch(input_image), image=numpy_to_pytorch(input_image),
weight_type="original", weight_type="original",
noise=0.0, noise=0.0,
@@ -28,8 +26,6 @@ class PreprocessorClipVisionForIPAdapter(PreprocessorClipVision):
unfold_batch=False, unfold_batch=False,
) )
return cond
add_supported_preprocessor(PreprocessorClipVisionForIPAdapter( add_supported_preprocessor(PreprocessorClipVisionForIPAdapter(
name='CLIP-ViT-H (IPAdapter)', name='CLIP-ViT-H (IPAdapter)',