---
title: cv_anytext2
canonical_url: "https://www.modelscope.cn/models/iic/cv_anytext2"
md_url: "https://www.modelscope.cn/models/iic/cv_anytext2.md"
repository: iic/cv_anytext2
chinese_name: "AnyText2属性可控的图文融合生成编辑"
last_updated: 2025-03-03
license: "Apache License 2.0"
pipeline_tag: text-to-image-synthesis
tasks:
  - text-to-image-synthesis
library_name:
  - pytorch
frameworks:
  - Pytorch
downloads: 3467
stars: 29
tags:
  - "文字生成与编辑"
---

# cv_anytext2

> cv_anytext2 - iic 在 ModelScope 开源的模型。AnyText2，一种可以定制字体和颜色的图文融合生成与编辑方法

iic/cv_anytext2 是 ModelScope 魔搭社区上的text-to-image-synthesis模型，采用 Apache License 2.0 许可。

- **Repository**: iic/cv_anytext2
- **License**: Apache License 2.0
- **Tasks**: text-to-image-synthesis
- **Tags**: 文字生成与编辑
- **Downloads**: 3467
- **Stars**: 29
- **Last updated**: 2025-03-03

Source: https://www.modelscope.cn/models/iic/cv_anytext2

---

### AnyText2: Visual Text Generation and Editing With Customizable Attributes

AnyText2是一种基于扩散模型的视觉文字生成与编辑模型。通过所提出的WriteNet+AttnX架构，以及重新设计的文本嵌入模块，我们的新方法相比原AnyText不仅进一步提升了图像真实感，也使中英文的文本准确率提高了3.3%和9.3%。同时推理速度也提升了19.8%。不仅如此，作为AnyText的扩展，AnyText2可以精确控制图像中文本的字体和颜色等属性，为智能生成设计类应用如商标LOGO、电商海报、商品效果图等提供了更加灵活的解决方案。  
详见：  
Paper: https://arxiv.org/abs/2411.15245  
Code: https://github.com/tyxsspa/AnyText2  
Demo: https://modelscope.cn/studios/iic/studio_anytext2  


#### 您可以通过如下git clone命令，或者ModelScope SDK来下载模型
 
SDK下载
```bash
#安装ModelScope
pip install modelscope
```
```python
#SDK模型下载
from modelscope import snapshot_download
model_dir = snapshot_download('iic/cv_anytext2')
```
Git下载
```
#Git模型下载
git clone https://www.modelscope.cn/iic/cv_anytext2.git
```
