Comments (6)
Hi, this font file is copyrighted, and we cannot provide a download. You will need to prepare it yourself, as comments in the Installation section:
# Prepare a font file; Arial Unicode MS is recommended, **you need to download it on your own** mv your/path/to/arialuni.ttf ./font/Arial_Unicode.ttf
I found link to the font which would work https://freefonts.co/fonts/arial-unicode-ms-regular
from anytext.
Hi, this font file is copyrighted, and we cannot provide a download. You will need to prepare it yourself, as comments in the Installation section:
# Prepare a font file; Arial Unicode MS is recommended, **you need to download it on your own**
mv your/path/to/arialuni.ttf ./font/Arial_Unicode.ttf
from anytext.
ok, Thnaks!
Is there a way to config the path to the font other than the default path? The font_path argument is part of some config file I believe
from anytext.
ok, Thnaks!
Is there a way to config the path to the font other than the default path? The font_path argument is part of some config file I believe
Yes, you can modify the MyCustomModel::init_model() in ms_wrapper.py(this file is located at where your model downloaded, by default it's: ~/.cache/modelscope/hub
):
def init_model(self, **kwargs):
font_path = kwargs.get('font_path', 'font/Arial_Unicode.ttf') # <---Here!
self.font = ImageFont.truetype(font_path, size=60)
cfg_path = kwargs.get('cfg_path', 'models_yaml/anytext_sd15.yaml')
ckpt_path = kwargs.get('model_path', os.path.join(self.model_dir, 'anytext_v1.1.ckpt'))
clip_path = os.path.join(self.model_dir, 'clip-vit-large-patch14')
self.model = create_model(cfg_path, cond_stage_path=clip_path).cuda().eval()
self.model.load_state_dict(load_state_dict(ckpt_path, location='cuda'), strict=False)
self.ddim_sampler = DDIMSampler(self.model)
self.trans_pipe = pipeline(task=Tasks.translation, model=os.path.join(self.model_dir, 'nlp_csanmt_translation_zh2en'))
from anytext.
@tyxsspa That file is protected by some modelscope revision mechanism that will reset my modification before loading the model.
from anytext.
@tyxsspa That file is protected by some modelscope revision mechanism that will reset my modification before loading the model.
This is a bit strange. In my case, as long as the file name is not changed, modifying the code does not trigger the model scope revision mechanism.
from anytext.
Related Issues (20)
- 请问还会开源训练代码和数据集么? HOT 1
- multiple copies of the OpenMP runtime
- 是否可以通过API进行调用 HOT 4
- anytext评测代码正常运行需要多大显存的服务器 HOT 3
- 使用 inference.py 推理自己的图片时,效果比线上demo差很多 HOT 4
- TypeError: ResourceExhaustedError.__init__() missing 2 required positional arguments: 'op' and 'message' HOT 1
- 请问在训练的时候做orc loss是否需要通过sample生成图片? HOT 4
- 数据集大小 HOT 1
- 编辑图像时,为什么有时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
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.