You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(anytext) C:\Users\Administrator\AnyText>python inference.py
2024-01-05 20:24:42,259 - modelscope - INFO - PyTorch version 2.0.1 Found.
2024-01-05 20:24:42,261 - modelscope - INFO - TensorFlow version 2.13.0 Found.
2024-01-05 20:24:42,261 - modelscope - INFO - Loading ast index from C:\Users\Administrator.cache\modelscope\ast_indexer
2024-01-05 20:24:42,314 - modelscope - INFO - Loading done! Current index file version is 1.10.0, with md5 74ad7dd6e2e0ce75b5aa96a1876541a5 and a total number of 946 components indexed
2024-01-05 20:24:43,458 - modelscope - INFO - Use user-specified model revision: v1.1.0
2024-01-05 20:24:45,919 - modelscope - WARNING - ('PIPELINES', 'my-anytext-task', 'my-custom-pipeline') not found in ast index file
2024-01-05 20:24:45,919 - modelscope - INFO - initiate model from C:\Users\Administrator.cache\modelscope\hub\damo\cv_anytext_text_generation_editing
2024-01-05 20:24:45,919 - modelscope - INFO - initiate model from location C:\Users\Administrator.cache\modelscope\hub\damo\cv_anytext_text_generation_editing.
2024-01-05 20:24:45,921 - modelscope - INFO - initialize model from C:\Users\Administrator.cache\modelscope\hub\damo\cv_anytext_text_generation_editing
2024-01-05 20:24:45,923 - modelscope - WARNING - ('MODELS', 'my-anytext-task', 'my-custom-model') not found in ast index file
Traceback (most recent call last):
File "C:\ProgramData\miniconda3\envs\anytext\lib\site-packages\modelscope\utils\registry.py", line 210, in build_from_cfg
return obj_cls._instantiate(**args)
File "C:\ProgramData\miniconda3\envs\anytext\lib\site-packages\modelscope\models\base\base_model.py", line 67, in _instantiate
return cls(**kwargs)
File "C:\Users\Administrator.cache\modelscope\modelscope_modules\cv_anytext_text_generation_editing\ms_wrapper.py", line 43, in init
self.init_model(**kwargs)
File "C:\Users\Administrator.cache\modelscope\modelscope_modules\cv_anytext_text_generation_editing\ms_wrapper.py", line 218, in init_model
self.font = ImageFont.truetype(font_path, size=60)
File "C:\ProgramData\miniconda3\envs\anytext\lib\site-packages\PIL\ImageFont.py", line 996, in truetype
return freetype(font)
File "C:\ProgramData\miniconda3\envs\anytext\lib\site-packages\PIL\ImageFont.py", line 993, in freetype
return FreeTypeFont(font, size, index, encoding, layout_engine)
File "C:\ProgramData\miniconda3\envs\anytext\lib\site-packages\PIL\ImageFont.py", line 248, in init
self.font = core.getfont(
OSError: cannot open resource
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\ProgramData\miniconda3\envs\anytext\lib\site-packages\modelscope\utils\registry.py", line 212, in build_from_cfg
return obj_cls(**args)
File "C:\Users\Administrator.cache\modelscope\modelscope_modules\cv_anytext_text_generation_editing\ms_wrapper.py", line 320, in init
super().init(model=model, auto_collate=False)
File "C:\ProgramData\miniconda3\envs\anytext\lib\site-packages\modelscope\pipelines\base.py", line 99, in init
self.model = self.initiate_single_model(model)
File "C:\ProgramData\miniconda3\envs\anytext\lib\site-packages\modelscope\pipelines\base.py", line 53, in initiate_single_model
return Model.from_pretrained(
File "C:\ProgramData\miniconda3\envs\anytext\lib\site-packages\modelscope\models\base\base_model.py", line 183, in from_pretrained
model = build_model(model_cfg, task_name=task_name)
File "C:\ProgramData\miniconda3\envs\anytext\lib\site-packages\modelscope\models\builder.py", line 35, in build_model
model = build_from_cfg(
File "C:\ProgramData\miniconda3\envs\anytext\lib\site-packages\modelscope\utils\registry.py", line 215, in build_from_cfg
raise type(e)(f'{obj_cls.name}: {e}')
OSError: MyCustomModel: cannot open resource
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Administrator\AnyText\inference.py", line 3, in
pipe = pipeline('my-anytext-task', model='damo/cv_anytext_text_generation_editing', model_revision='v1.1.0')
File "C:\ProgramData\miniconda3\envs\anytext\lib\site-packages\modelscope\pipelines\builder.py", line 170, in pipeline
return build_pipeline(cfg, task_name=task)
File "C:\ProgramData\miniconda3\envs\anytext\lib\site-packages\modelscope\pipelines\builder.py", line 65, in build_pipeline
return build_from_cfg(
File "C:\ProgramData\miniconda3\envs\anytext\lib\site-packages\modelscope\utils\registry.py", line 215, in build_from_cfg
raise type(e)(f'{obj_cls.name}: {e}')
OSError: MyCustomPipeline: MyCustomModel: cannot open resource
The text was updated successfully, but these errors were encountered:
Hi, this error is because no font file loaded, please follow the Installation in readme to prepare your font file. Also it seems like you need to pull the latest code.
(anytext) C:\Users\Administrator\AnyText>python inference.py
2024-01-05 20:24:42,259 - modelscope - INFO - PyTorch version 2.0.1 Found.
2024-01-05 20:24:42,261 - modelscope - INFO - TensorFlow version 2.13.0 Found.
2024-01-05 20:24:42,261 - modelscope - INFO - Loading ast index from C:\Users\Administrator.cache\modelscope\ast_indexer
2024-01-05 20:24:42,314 - modelscope - INFO - Loading done! Current index file version is 1.10.0, with md5 74ad7dd6e2e0ce75b5aa96a1876541a5 and a total number of 946 components indexed
2024-01-05 20:24:43,458 - modelscope - INFO - Use user-specified model revision: v1.1.0
2024-01-05 20:24:45,919 - modelscope - WARNING - ('PIPELINES', 'my-anytext-task', 'my-custom-pipeline') not found in ast index file
2024-01-05 20:24:45,919 - modelscope - INFO - initiate model from C:\Users\Administrator.cache\modelscope\hub\damo\cv_anytext_text_generation_editing
2024-01-05 20:24:45,919 - modelscope - INFO - initiate model from location C:\Users\Administrator.cache\modelscope\hub\damo\cv_anytext_text_generation_editing.
2024-01-05 20:24:45,921 - modelscope - INFO - initialize model from C:\Users\Administrator.cache\modelscope\hub\damo\cv_anytext_text_generation_editing
2024-01-05 20:24:45,923 - modelscope - WARNING - ('MODELS', 'my-anytext-task', 'my-custom-model') not found in ast index file
Traceback (most recent call last):
File "C:\ProgramData\miniconda3\envs\anytext\lib\site-packages\modelscope\utils\registry.py", line 210, in build_from_cfg
return obj_cls._instantiate(**args)
File "C:\ProgramData\miniconda3\envs\anytext\lib\site-packages\modelscope\models\base\base_model.py", line 67, in _instantiate
return cls(**kwargs)
File "C:\Users\Administrator.cache\modelscope\modelscope_modules\cv_anytext_text_generation_editing\ms_wrapper.py", line 43, in init
self.init_model(**kwargs)
File "C:\Users\Administrator.cache\modelscope\modelscope_modules\cv_anytext_text_generation_editing\ms_wrapper.py", line 218, in init_model
self.font = ImageFont.truetype(font_path, size=60)
File "C:\ProgramData\miniconda3\envs\anytext\lib\site-packages\PIL\ImageFont.py", line 996, in truetype
return freetype(font)
File "C:\ProgramData\miniconda3\envs\anytext\lib\site-packages\PIL\ImageFont.py", line 993, in freetype
return FreeTypeFont(font, size, index, encoding, layout_engine)
File "C:\ProgramData\miniconda3\envs\anytext\lib\site-packages\PIL\ImageFont.py", line 248, in init
self.font = core.getfont(
OSError: cannot open resource
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\ProgramData\miniconda3\envs\anytext\lib\site-packages\modelscope\utils\registry.py", line 212, in build_from_cfg
return obj_cls(**args)
File "C:\Users\Administrator.cache\modelscope\modelscope_modules\cv_anytext_text_generation_editing\ms_wrapper.py", line 320, in init
super().init(model=model, auto_collate=False)
File "C:\ProgramData\miniconda3\envs\anytext\lib\site-packages\modelscope\pipelines\base.py", line 99, in init
self.model = self.initiate_single_model(model)
File "C:\ProgramData\miniconda3\envs\anytext\lib\site-packages\modelscope\pipelines\base.py", line 53, in initiate_single_model
return Model.from_pretrained(
File "C:\ProgramData\miniconda3\envs\anytext\lib\site-packages\modelscope\models\base\base_model.py", line 183, in from_pretrained
model = build_model(model_cfg, task_name=task_name)
File "C:\ProgramData\miniconda3\envs\anytext\lib\site-packages\modelscope\models\builder.py", line 35, in build_model
model = build_from_cfg(
File "C:\ProgramData\miniconda3\envs\anytext\lib\site-packages\modelscope\utils\registry.py", line 215, in build_from_cfg
raise type(e)(f'{obj_cls.name}: {e}')
OSError: MyCustomModel: cannot open resource
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Administrator\AnyText\inference.py", line 3, in
pipe = pipeline('my-anytext-task', model='damo/cv_anytext_text_generation_editing', model_revision='v1.1.0')
File "C:\ProgramData\miniconda3\envs\anytext\lib\site-packages\modelscope\pipelines\builder.py", line 170, in pipeline
return build_pipeline(cfg, task_name=task)
File "C:\ProgramData\miniconda3\envs\anytext\lib\site-packages\modelscope\pipelines\builder.py", line 65, in build_pipeline
return build_from_cfg(
File "C:\ProgramData\miniconda3\envs\anytext\lib\site-packages\modelscope\utils\registry.py", line 215, in build_from_cfg
raise type(e)(f'{obj_cls.name}: {e}')
OSError: MyCustomPipeline: MyCustomModel: cannot open resource
The text was updated successfully, but these errors were encountered: