Skip to content

Commit 03677d7

Browse files
committed
fix encoding intern-video
1 parent 1adde2c commit 03677d7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

notebooks/intern-video2-classiciation/ov_internvideo_helper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ def patch_model_code(model_dir):
620620
orig_modeling_file = model_dir / "orig_modeling_internvideo2.py"
621621
if not orig_modeling_file.exists():
622622
modeling_file.rename(orig_modeling_file)
623-
with orig_modeling_file.open("r") as in_f:
623+
with orig_modeling_file.open("r", encoding="utf-8") as in_f:
624624
content = in_f.read()
625625
content = content.replace(
626626
"self.tokenizer = BertTokenizer.from_pretrained(self._config.model.text_encoder.pretrained, local_files_only=True, use_safetensors=True)",
@@ -637,7 +637,7 @@ def patch_model_code(model_dir):
637637
config_file = model_dir / "config.json"
638638
if not orig_config_file.exists():
639639
config_file.rename(orig_config_file)
640-
with orig_config_file.open("r") as in_f:
640+
with orig_config_file.open("r", encoding="utf-8") as in_f:
641641
content = in_f.read()
642642
configs_dir = model_dir / "configs"
643643
content = content.replace('"configs/', f'"{configs_dir.absolute()}/')

notebooks/sdxl-turbo/sdxl-turbo.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@
450450
"\n",
451451
"core = ov.Core()\n",
452452
"\n",
453-
"model_dir_int8 = Path(\"./model_int8\")\n",
453+
"model_dir_int8 = Path(\"./model_int8\")\n",
454454
"UNET_INT8_OV_PATH = model_dir_int8 / \"unet\" / \"openvino_model.xml\"\n",
455455
"UNET_OV_PATH = model_dir / \"unet\" / \"openvino_model.xml\"\n",
456456
"\n",

0 commit comments

Comments
 (0)