Downloads · 30 days
46
8% of all-time downloads
jree423/svgdreamer
svgdreamer is a text-to-image model from jree423. Use it when you need an image from a text prompt. The card lists the license as mit.
SVGDreamer is an advanced text-to-SVG generation model that creates high-quality vector graphics using a multi-particle optimization approach. It generates multiple SVG variants simultaneously, allowing for diverse an…
Downloads · 30 days
46
8% of all-time downloads
All-time downloads
595
Public
Repo size
28.2 MB
Likes
17
Public
Click a slice to open those files.
.svg30.9 MB · 96%
From the Hugging Face model README
SVGDreamer is an advanced text-to-SVG generation model that creates high-quality vector graphics using a multi-particle optimization approach. It generates multiple SVG variants simultaneously, allowing for diverse and creative outputs.
SVGDreamer leverages Stable Diffusion to guide the generation of vector graphics through a novel multi-particle system. The model optimizes multiple SVG representations in parallel, enabling exploration of different artistic interpretations of the same text prompt.
import requests
API_URL = "https://api-inference.huggingface.co/models/jree423/svgdreamer"
headers = {"Authorization": "Bearer YOUR_HF_TOKEN"}
def query(payload):
response = requests.post(API_URL, headers=headers, json=payload)
return response.json()
output = query({
"inputs": "a majestic eagle soaring through clouds",
"parameters": {
"n_particle": 6,
"num_iter": 1000,
"guidance_scale": 7.5,
"style": "iconography",
"width": 224,
"height": 224,
"seed": 42
}
})
from huggingface_hub import InferenceClient
client = InferenceClient("jree423/svgdreamer")
result = client.post(
json={
"inputs": "a cyberpunk cityscape at night",
"parameters": {
"n_particle": 4,
"style": "pixel_art",
"guidance_scale": 8.0
}
}
)
The model returns a list of JSON objects, one for each particle, containing:
particle_id: Unique identifier for the particlesvg: The generated SVG content as a stringsvg_base64: Base64 encoded SVG for easy transmissionprompt: The input text promptstyle: The style used for generationparameters: The parameters used for generationClean, minimalist vector graphics suitable for icons and logos.
Retro-style graphics with pixelated aesthetics.
Hand-drawn style with organic lines and artistic flair.
Rich, painterly style with complex color gradients.
@inproceedings{xing2024svgdreamer,
title={SVGDreamer: Text Guided SVG Generation with Diffusion Model},
author={Xing, XiMing and others},
booktitle={CVPR},
year={2024}
}
This model is released under the MIT License.