mirror of
https://github.com/lllyasviel/stable-diffusion-webui-forge.git
synced 2026-04-29 18:51:31 +00:00
Update forge_ipadapter.py
This commit is contained in:
@@ -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)',
|
||||||
|
|||||||
Reference in New Issue
Block a user