Update: Add model card for original implementation
Browse files
README.md
CHANGED
|
@@ -9,11 +9,11 @@ license: mit
|
|
| 9 |
|
| 10 |
# Diffsketcher - Vector Graphics Generation
|
| 11 |
|
| 12 |
-
This model generates vector graphics (SVG) from text prompts. It uses
|
| 13 |
|
| 14 |
## Model Description
|
| 15 |
|
| 16 |
-
DiffSketcher generates vector graphics (SVG) from text prompts. It
|
| 17 |
|
| 18 |
## Usage
|
| 19 |
|
|
@@ -29,48 +29,29 @@ def query(prompt):
|
|
| 29 |
|
| 30 |
# Generate an image
|
| 31 |
with open("output.png", "wb") as f:
|
| 32 |
-
f.write(query("a
|
| 33 |
```
|
| 34 |
|
| 35 |
## Examples
|
| 36 |
|
| 37 |
-
|
| 38 |
- "a red sports car"
|
| 39 |
-
- "a
|
| 40 |
-
- "a
|
| 41 |
-
|
| 42 |
-
### Landscapes
|
| 43 |
-
- "a mountain landscape with a lake"
|
| 44 |
-
- "a forest with a river"
|
| 45 |
-
- "a beach at sunset"
|
| 46 |
-
|
| 47 |
-
### Animals
|
| 48 |
-
- "a brown dog"
|
| 49 |
-
- "a black cat"
|
| 50 |
-
- "a colorful bird"
|
| 51 |
-
|
| 52 |
-
### Buildings
|
| 53 |
-
- "a small house with a garden"
|
| 54 |
-
- "a tall skyscraper"
|
| 55 |
-
- "a medieval castle"
|
| 56 |
-
|
| 57 |
-
### Faces
|
| 58 |
-
- "a smiling woman"
|
| 59 |
-
- "a man with a beard"
|
| 60 |
-
- "a girl with long hair"
|
| 61 |
-
|
| 62 |
-
### Abstract
|
| 63 |
-
- "colorful abstract art"
|
| 64 |
-
- "geometric shapes"
|
| 65 |
-
- "vibrant colors and patterns"
|
| 66 |
|
| 67 |
## How It Works
|
| 68 |
|
| 69 |
-
1. **
|
| 70 |
-
2. **
|
| 71 |
-
3. **SVG Generation**:
|
| 72 |
4. **PNG Conversion**: The SVG is converted to PNG for display.
|
| 73 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
## Citation
|
| 75 |
|
| 76 |
```
|
|
|
|
| 9 |
|
| 10 |
# Diffsketcher - Vector Graphics Generation
|
| 11 |
|
| 12 |
+
This model generates vector graphics (SVG) from text prompts. It uses the original implementation from the official repository.
|
| 13 |
|
| 14 |
## Model Description
|
| 15 |
|
| 16 |
+
DiffSketcher generates vector graphics (SVG) from text prompts. It uses a diffusion model to guide the SVG generation and creates sketches with a specified number of paths.
|
| 17 |
|
| 18 |
## Usage
|
| 19 |
|
|
|
|
| 29 |
|
| 30 |
# Generate an image
|
| 31 |
with open("output.png", "wb") as f:
|
| 32 |
+
f.write(query("a beautiful mountain landscape"))
|
| 33 |
```
|
| 34 |
|
| 35 |
## Examples
|
| 36 |
|
| 37 |
+
- "a beautiful mountain landscape"
|
| 38 |
- "a red sports car"
|
| 39 |
+
- "a portrait of a woman"
|
| 40 |
+
- "a cat playing with a ball"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
|
| 42 |
## How It Works
|
| 43 |
|
| 44 |
+
1. **Text Encoding**: The text prompt is encoded using CLIP.
|
| 45 |
+
2. **Diffusion Process**: A diffusion model generates a latent representation.
|
| 46 |
+
3. **SVG Generation**: The latent representation is used to generate an SVG.
|
| 47 |
4. **PNG Conversion**: The SVG is converted to PNG for display.
|
| 48 |
|
| 49 |
+
## Performance Considerations
|
| 50 |
+
|
| 51 |
+
- The original implementation requires significant computational resources
|
| 52 |
+
- Generation can take several minutes depending on the complexity
|
| 53 |
+
- GPU acceleration is recommended for optimal performance
|
| 54 |
+
|
| 55 |
## Citation
|
| 56 |
|
| 57 |
```
|