@@ -88,6 +88,7 @@ def __init__(
8888 layout_image_size : tuple [int , int ],
8989 min_image_edge : int ,
9090 max_image_edge_ratio : float ,
91+ simple_post_process : bool ,
9192 handle_equation_block : bool ,
9293 abandon_list : bool ,
9394 abandon_paratext : bool ,
@@ -99,6 +100,7 @@ def __init__(
99100 self .layout_image_size = layout_image_size
100101 self .min_image_edge = min_image_edge
101102 self .max_image_edge_ratio = max_image_edge_ratio
103+ self .simple_post_process = simple_post_process
102104 self .handle_equation_block = handle_equation_block
103105 self .abandon_list = abandon_list
104106 self .abandon_paratext = abandon_paratext
@@ -190,6 +192,7 @@ def post_process(self, blocks: list[ContentBlock]) -> list[ContentBlock]:
190192 try :
191193 return post_process (
192194 blocks ,
195+ simple_post_process = self .simple_post_process ,
193196 handle_equation_block = self .handle_equation_block ,
194197 abandon_list = self .abandon_list ,
195198 abandon_paratext = self .abandon_paratext ,
@@ -298,6 +301,7 @@ def __init__(
298301 layout_image_size : tuple [int , int ] = (1036 , 1036 ),
299302 min_image_edge : int = 28 ,
300303 max_image_edge_ratio : float = 50 ,
304+ simple_post_process : bool = False ,
301305 handle_equation_block : bool = True ,
302306 abandon_list : bool = False ,
303307 abandon_paratext : bool = False ,
@@ -337,6 +341,7 @@ def __init__(
337341 )
338342 if processor is None :
339343 processor = AutoProcessor .from_pretrained (model_path , use_fast = True )
344+
340345 elif backend == "mlx-engine" :
341346 if model is None or processor is None :
342347 if not model_path :
@@ -414,6 +419,7 @@ def __init__(
414419 layout_image_size = layout_image_size ,
415420 min_image_edge = min_image_edge ,
416421 max_image_edge_ratio = max_image_edge_ratio ,
422+ simple_post_process = simple_post_process ,
417423 handle_equation_block = handle_equation_block ,
418424 abandon_list = abandon_list ,
419425 abandon_paratext = abandon_paratext ,
0 commit comments