Skip to content

Commit 825761f

Browse files
Fix import replace in minicpm-o (#3056)
CVS-172354
1 parent 6c3e092 commit 825761f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

notebooks/minicpm-o-omnimodal-chatbot/minicpm_o_helper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,12 +315,12 @@ def patch_model_code(orig_model_dir):
315315
content = content.replace("from flash_attn import flash_attn_func", "")
316316
content = content.replace("from flash_attn.bert_padding import index_first_axis", "")
317317
content = content.replace("from flash_attn.bert_padding import pad_input", "")
318-
content = content.replace("ffrom flash_attn.bert_padding import unpad_input", "")
318+
content = content.replace("from flash_attn.bert_padding import unpad_input", "")
319319

320320
with model_file.open("w") as out_f:
321321
out_f.write(content)
322322
resampler_file = orig_model_dir / "resampler.py"
323-
orig_resampler_file = resampler_path.parent / ("orig_" + resampler_file.name)
323+
orig_resampler_file = resampler_file.parent / ("orig_" + resampler_file.name)
324324
if not orig_resampler_file.exists():
325325
resampler_file.rename(orig_resampler_file)
326326
with orig_resampler_file.open("r") as f:

0 commit comments

Comments
 (0)