docs(cases): add ink cases
Browse files- README.md +12 -0
- assets/Ink-BigWildGoosePagoda/init_p0.svg +90 -0
- assets/Ink-BigWildGoosePagoda/init_p1.svg +90 -0
- assets/Ink-BigWildGoosePagoda/init_p2.svg +90 -0
- assets/Ink-BigWildGoosePagoda/init_p3.svg +90 -0
- assets/Ink-BigWildGoosePagoda/init_p4.svg +90 -0
- assets/Ink-BigWildGoosePagoda/init_p5.svg +90 -0
- assets/Ink-BigWildGoosePagoda/p0.svg +90 -0
- assets/Ink-BigWildGoosePagoda/p1.svg +90 -0
- assets/Ink-BigWildGoosePagoda/p2.svg +90 -0
- assets/Ink-BigWildGoosePagoda/p3.svg +90 -0
- assets/Ink-BigWildGoosePagoda/p4.svg +90 -0
- assets/Ink-BigWildGoosePagoda/p5.svg +90 -0
- svgdreamer/painter/painter_params.py +3 -0
README.md
CHANGED
@@ -182,6 +182,18 @@ python svgdreamer.py x=sketch "prompt='A free-hand drawing of A speeding Lamborg
|
|
182 |
|
183 |
#### Ink and Wash style
|
184 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
185 |
```shell
|
186 |
python svgdreamer.py x=ink "prompt='Big Wild Goose Pagoda. ink style. Minimalist abstract art grayscale watercolor. empty background'" neg_prompt='' result_path='./logs/BigWildGoosePagoda'
|
187 |
```
|
|
|
182 |
|
183 |
#### Ink and Wash style
|
184 |
|
185 |
+
**Prompt:** Big Wild Goose Pagoda. ink style. Minimalist abstract art grayscale watercolor. empty background <br/>
|
186 |
+
**Preview:**
|
187 |
+
|
188 |
+
| Particle 1 | Particle 2 | Particle 3 | Particle 4 | Particle 5 | Particle 6 |
|
189 |
+
|:-------------------------------------------------------:|:-------------------------------------------------------:|:-------------------------------------------------------:|:-------------------------------------------------------:|:-------------------------------------------------------:|:-------------------------------------------------------:|
|
190 |
+
| init p1 | init p2 | init p3 | init p4 | init p5 | init p6 |
|
191 |
+
| <img src="./assets/Ink-BigWildGoosePagoda/init_p0.svg"> | <img src="./assets/Ink-BigWildGoosePagoda/init_p1.svg"> | <img src="./assets/Ink-BigWildGoosePagoda/init_p2.svg"> | <img src="./assets/Ink-BigWildGoosePagoda/init_p3.svg"> | <img src="./assets/Ink-BigWildGoosePagoda/init_p4.svg"> | <img src="./assets/Ink-BigWildGoosePagoda/init_p5.svg"> |
|
192 |
+
| final p1 | final p2 | final p3 | final p4 | final p5 | final p6 |
|
193 |
+
| <img src="./assets/Ink-BigWildGoosePagoda/p0.svg"> | <img src="./assets/Ink-BigWildGoosePagoda/p1.svg"> | <img src="./assets/Ink-BigWildGoosePagoda/p2.svg"> | <img src="./assets/Ink-BigWildGoosePagoda/p3.svg"> | <img src="./assets/Ink-BigWildGoosePagoda/p4.svg"> | <img src="./assets/Ink-BigWildGoosePagoda/p5.svg"> |
|
194 |
+
|
195 |
+
**Script:**
|
196 |
+
|
197 |
```shell
|
198 |
python svgdreamer.py x=ink "prompt='Big Wild Goose Pagoda. ink style. Minimalist abstract art grayscale watercolor. empty background'" neg_prompt='' result_path='./logs/BigWildGoosePagoda'
|
199 |
```
|
assets/Ink-BigWildGoosePagoda/init_p0.svg
ADDED
|
assets/Ink-BigWildGoosePagoda/init_p1.svg
ADDED
|
assets/Ink-BigWildGoosePagoda/init_p2.svg
ADDED
|
assets/Ink-BigWildGoosePagoda/init_p3.svg
ADDED
|
assets/Ink-BigWildGoosePagoda/init_p4.svg
ADDED
|
assets/Ink-BigWildGoosePagoda/init_p5.svg
ADDED
|
assets/Ink-BigWildGoosePagoda/p0.svg
ADDED
|
assets/Ink-BigWildGoosePagoda/p1.svg
ADDED
|
assets/Ink-BigWildGoosePagoda/p2.svg
ADDED
|
assets/Ink-BigWildGoosePagoda/p3.svg
ADDED
|
assets/Ink-BigWildGoosePagoda/p4.svg
ADDED
|
assets/Ink-BigWildGoosePagoda/p5.svg
ADDED
|
svgdreamer/painter/painter_params.py
CHANGED
@@ -279,6 +279,8 @@ class Painter(DiffVGState):
|
|
279 |
for group in self.shape_groups:
|
280 |
group.stroke_color.data[:3].clamp_(0., 0.) # to force black stroke
|
281 |
group.stroke_color.data[-1].clamp_(0., 1.) # clip alpha
|
|
|
|
|
282 |
else:
|
283 |
for group in self.shape_groups:
|
284 |
if group.stroke_color is not None:
|
@@ -296,6 +298,7 @@ class Painter(DiffVGState):
|
|
296 |
Notes: Since VF is not open source, this is the version I implemented.
|
297 |
|
298 |
Args:
|
|
|
299 |
opacity_threshold: Threshold of opacity.
|
300 |
area_threshold: Threshold of the closed polygon area.
|
301 |
fpath: The path to save the reinitialized SVG.
|
|
|
279 |
for group in self.shape_groups:
|
280 |
group.stroke_color.data[:3].clamp_(0., 0.) # to force black stroke
|
281 |
group.stroke_color.data[-1].clamp_(0., 1.) # clip alpha
|
282 |
+
for path in self.shapes:
|
283 |
+
path.stroke_width.data.clamp_(1.0, self.stroke_width) # clip width
|
284 |
else:
|
285 |
for group in self.shape_groups:
|
286 |
if group.stroke_color is not None:
|
|
|
298 |
Notes: Since VF is not open source, this is the version I implemented.
|
299 |
|
300 |
Args:
|
301 |
+
infos: log infos
|
302 |
opacity_threshold: Threshold of opacity.
|
303 |
area_threshold: Threshold of the closed polygon area.
|
304 |
fpath: The path to save the reinitialized SVG.
|