Update README.md with proper YAML metadata
Browse files
README.md
CHANGED
|
@@ -1,9 +1,30 @@
|
|
| 1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
## Usage
|
| 6 |
|
|
|
|
|
|
|
| 7 |
```python
|
| 8 |
import requests
|
| 9 |
|
|
@@ -17,4 +38,27 @@ def query(payload):
|
|
| 17 |
output = query({
|
| 18 |
"prompt": "a beautiful mountain landscape"
|
| 19 |
})
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language: en
|
| 3 |
+
license: mit
|
| 4 |
+
tags:
|
| 5 |
+
- vector-graphics
|
| 6 |
+
- svg
|
| 7 |
+
- text-to-image
|
| 8 |
+
- diffsketcher
|
| 9 |
+
pipeline_tag: text-to-image
|
| 10 |
+
widget:
|
| 11 |
+
- text: "a beautiful mountain landscape"
|
| 12 |
+
- text: "a colorful sunset over the ocean"
|
| 13 |
+
- text: "a cute cat sitting on a windowsill"
|
| 14 |
+
---
|
| 15 |
|
| 16 |
+
# DiffSketcher - Vector Graphics Model
|
| 17 |
+
|
| 18 |
+
This repository contains the DiffSketcher model for generating vector graphics (SVG) from text prompts.
|
| 19 |
+
|
| 20 |
+
## Model Description
|
| 21 |
+
|
| 22 |
+
DiffSketcher is a diffusion-based vector graphics generation model that creates high-quality SVG images from text descriptions. The model uses a combination of diffusion models and vector optimization techniques to produce clean, scalable vector graphics.
|
| 23 |
|
| 24 |
## Usage
|
| 25 |
|
| 26 |
+
You can use this model through the Hugging Face Inference API:
|
| 27 |
+
|
| 28 |
```python
|
| 29 |
import requests
|
| 30 |
|
|
|
|
| 38 |
output = query({
|
| 39 |
"prompt": "a beautiful mountain landscape"
|
| 40 |
})
|
| 41 |
+
|
| 42 |
+
# Save the SVG output
|
| 43 |
+
with open("output.svg", "w") as f:
|
| 44 |
+
f.write(output["svg"])
|
| 45 |
```
|
| 46 |
+
|
| 47 |
+
## Limitations
|
| 48 |
+
|
| 49 |
+
- The model may take some time to generate complex images
|
| 50 |
+
- The quality of the output depends on the clarity and specificity of the prompt
|
| 51 |
+
- Some complex concepts may not be rendered accurately
|
| 52 |
+
|
| 53 |
+
## Citation
|
| 54 |
+
|
| 55 |
+
If you use this model in your research, please cite the original DiffSketcher paper:
|
| 56 |
+
|
| 57 |
+
```bibtex
|
| 58 |
+
@inproceedings{xing2023diffsketcher,
|
| 59 |
+
title={DiffSketcher: Text Guided Vector Sketch Synthesis through Latent Diffusion Models},
|
| 60 |
+
author={Ximing Xing and Chuang Wang and Haitao Zhou and Jing Zhang and Qian Yu and Dong Xu},
|
| 61 |
+
booktitle={Advances in Neural Information Processing Systems},
|
| 62 |
+
year={2023}
|
| 63 |
+
}
|
| 64 |
+
```
|