diffsketcher / README.md
jree423's picture
Update README.md with proper YAML metadata
00cd928 verified
|
raw
history blame
1.83 kB
metadata
language: en
license: mit
tags:
  - vector-graphics
  - svg
  - text-to-image
  - diffsketcher
pipeline_tag: text-to-image
widget:
  - text: a beautiful mountain landscape
  - text: a colorful sunset over the ocean
  - text: a cute cat sitting on a windowsill

DiffSketcher - Vector Graphics Model

This repository contains the DiffSketcher model for generating vector graphics (SVG) from text prompts.

Model Description

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.

Usage

You can use this model through the Hugging Face Inference API:

import requests

API_URL = "https://api-inference.huggingface.co/models/jree423/diffsketcher"
headers = {"Authorization": "Bearer YOUR_API_TOKEN"}

def query(payload):
    response = requests.post(API_URL, headers=headers, json=payload)
    return response.json()

output = query({
    "prompt": "a beautiful mountain landscape"
})

# Save the SVG output
with open("output.svg", "w") as f:
    f.write(output["svg"])

Limitations

  • The model may take some time to generate complex images
  • The quality of the output depends on the clarity and specificity of the prompt
  • Some complex concepts may not be rendered accurately

Citation

If you use this model in your research, please cite the original DiffSketcher paper:

@inproceedings{xing2023diffsketcher,
  title={DiffSketcher: Text Guided Vector Sketch Synthesis through Latent Diffusion Models},
  author={Ximing Xing and Chuang Wang and Haitao Zhou and Jing Zhang and Qian Yu and Dong Xu},
  booktitle={Advances in Neural Information Processing Systems},
  year={2023}
}