Skip to content

Commit

Permalink
update init and cli
Browse files Browse the repository at this point in the history
  • Loading branch information
yonigozlan committed Dec 11, 2024
1 parent faa41d3 commit 3f8674f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/transformers/commands/add_fast_image_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,8 @@ def write_default_fast_image_processor_file(
" do_center_crop = None\n"
" do_rescale = None\n"
" do_normalize = None\n"
" do_convert_rgb = None\n"
" do_convert_rgb = None\n\n\n"
f'__all__ = ["{fast_image_processor_name}"]\n'
)

content = content_header + imports + content_base_file
Expand Down Expand Up @@ -536,7 +537,8 @@ def add_fast_image_processor_file(
f' do_center_crop = {default_args_dict.get("do_center_crop")}\n'
f' do_rescale = {default_args_dict.get("do_rescale")}\n'
f' do_normalize = {default_args_dict.get("do_normalize")}\n'
f' do_convert_rgb = {default_args_dict.get("do_convert_rgb")}\n'
f' do_convert_rgb = {default_args_dict.get("do_convert_rgb")}\n\n\n'
f'__all__ = ["{fast_image_processor_name}"]\n'
)

imports = "\n\nfrom ...image_processing_utils_fast import BaseImageProcessorFast\n"
Expand Down
3 changes: 3 additions & 0 deletions src/transformers/models/blip/image_processing_blip_fast.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,6 @@ class BlipImageProcessorFast(BaseImageProcessorFast):
do_rescale = True
do_normalize = True
do_convert_rgb = True


__all__ = ["BlipImageProcessorFast"]
3 changes: 3 additions & 0 deletions src/transformers/models/clip/image_processing_clip_fast.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,6 @@ class CLIPImageProcessorFast(BaseImageProcessorFast):
do_rescale = True
do_normalize = True
do_convert_rgb = True


__all__ = ["CLIPImageProcessorFast"]

0 comments on commit 3f8674f

Please sign in to comment.