Comments (5)
你好,字体文件需要自行准备,放到指定目录下
from anytext.
谢谢!问题解决了!
from anytext.
如果字體已放了在指定目錄下,但仍出現以下,可怎樣處理?
Traceback (most recent call last):
File "C:\Users\Dennis.conda\envs\anytext\lib\site-packages\modelscope\utils\registry.py", line 212, in build_from_cfg
return obj_cls(**args)
File "C:\Users\Dennis.cache\modelscope\modelscope_modules\cv_anytext_text_generation_editing\ms_wrapper.py", line 336, in init
pipe_model = AnyTextModel(model_dir=model, **kwargs)
File "C:\Users\Dennis.cache\modelscope\modelscope_modules\cv_anytext_text_generation_editing\ms_wrapper.py", line 46, in init
self.init_model(**kwargs)
File "C:\Users\Dennis.cache\modelscope\modelscope_modules\cv_anytext_text_generation_editing\ms_wrapper.py", line 229, in init_model
self.font = ImageFont.truetype(font_path, size=60)
File "C:\Users\Dennis.conda\envs\anytext\lib\site-packages\PIL\ImageFont.py", line 996, in truetype
return freetype(font)
File "C:\Users\Dennis.conda\envs\anytext\lib\site-packages\PIL\ImageFont.py", line 993, in freetype
return FreeTypeFont(font, size, index, encoding, layout_engine)
File "C:\Users\Dennis.conda\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 "F:\AnyText\inference.py", line 3, in
pipe = pipeline('my-anytext-task', model='damo/cv_anytext_text_generation_editing', model_revision='v1.1.1')
File "C:\Users\Dennis.conda\envs\anytext\lib\site-packages\modelscope\pipelines\builder.py", line 170, in pipeline
return build_pipeline(cfg, task_name=task)
File "C:\Users\Dennis.conda\envs\anytext\lib\site-packages\modelscope\pipelines\builder.py", line 65, in build_pipeline
return build_from_cfg(
File "C:\Users\Dennis.conda\envs\anytext\lib\site-packages\modelscope\utils\registry.py", line 215, in build_from_cfg
raise type(e)(f'{obj_cls.name}: {e}')
OSError: AnyTextPipeline: cannot open resource
from anytext.
OSError: cannot open resource
@fatdennis 你好,这一类错误通常是字体ttf文件有问题无法读取,请尝试重新下载一下。Arial Unicode MS的文件大概是23.3M
from anytext.
必须Arial Unicode MS 这个字体?
from anytext.
Related Issues (20)
- 编辑图像时,为什么有时ref图片与edit图片尺寸是不一致的? HOT 1
- 如何复现实验
- ucg超参配置
- pls advise how to fix this
- what's the purpose of setting the hyperparameter mask_img_prob? HOT 2
- Optimizer States
- Inference code for Text Editing
- translation模型一定要存在么? HOT 2
- Download dataset HOT 7
- ./ldm/models/diffusion/ddpm.py line 889 calling self.p_losses
- 急急急!!!Bug!出现黄图 HOT 3
- 训练模型时出错 HOT 4
- Have you ever pretrained the vae or unet in anytext_v1.1.ckpt? HOT 4
- 在标准字体上效果不佳 HOT 4
- Text editing issue HOT 1
- 从一个新的checkpoint继续训练,代码没有任何输出就结束运行了 HOT 1
- 無法解析dataset的json檔
- Is there a separate reason to set max_chars to 20? HOT 1
- 请问使用tool_add_anytext.py合成add_ocr_weights后的1.5系列模型就具有生成文字的能力了吗? HOT 2
- 是否有计划将sd部分升级到2.1 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from anytext.