mirror of
https://github.com/ostris/ai-toolkit.git
synced 2026-05-01 03:31:35 +00:00
Allow clip image to not have processor on dataloader for raw img
This commit is contained in:
@@ -770,6 +770,8 @@ class ClipImageFileItemDTOMixin:
|
|||||||
def load_clip_image(self: 'FileItemDTO'):
|
def load_clip_image(self: 'FileItemDTO'):
|
||||||
is_dynamic_size_and_aspect = isinstance(self.clip_image_processor, PixtralVisionImagePreprocessorCompatible) or \
|
is_dynamic_size_and_aspect = isinstance(self.clip_image_processor, PixtralVisionImagePreprocessorCompatible) or \
|
||||||
isinstance(self.clip_image_processor, SiglipImageProcessor)
|
isinstance(self.clip_image_processor, SiglipImageProcessor)
|
||||||
|
if self.clip_image_processor is None:
|
||||||
|
is_dynamic_size_and_aspect = True # serving it raw
|
||||||
if self.is_vision_clip_cached:
|
if self.is_vision_clip_cached:
|
||||||
self.clip_image_embeds = load_file(self.get_clip_vision_embeddings_path())
|
self.clip_image_embeds = load_file(self.get_clip_vision_embeddings_path())
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user