File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ def __init__(self, json_config):
3434 with open (json_config ) as f :
3535 config = json .load (f )
3636
37+ self .image_size = config .get ("image_size" , 224 )
3738 self .load_device = comfy .model_management .text_encoder_device ()
3839 offload_device = comfy .model_management .text_encoder_offload_device ()
3940 self .dtype = comfy .model_management .text_encoder_dtype (self .load_device )
@@ -50,7 +51,7 @@ def get_sd(self):
5051
5152 def encode_image (self , image ):
5253 comfy .model_management .load_model_gpu (self .patcher )
53- pixel_values = clip_preprocess (image .to (self .load_device )).float ()
54+ pixel_values = clip_preprocess (image .to (self .load_device ), size = self . image_size ).float ()
5455 out = self .model (pixel_values = pixel_values , intermediate_output = - 2 )
5556
5657 outputs = Output ()
You can’t perform that action at this time.
0 commit comments