Skip to content

Commit ed1d83b

Browse files
committed
update image gen params
1 parent 4f86f40 commit ed1d83b

File tree

1 file changed

+28
-11
lines changed

1 file changed

+28
-11
lines changed

jigsawstack/image_generation.py

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,34 +6,51 @@
66
from typing import List, Union
77
from ._config import ClientConfig
88

9+
class AdvanceConfig(TypedDict):
10+
negative_prompt: NotRequired[str]
11+
guidance: NotRequired[int]
12+
seed: NotRequired[int]
13+
914
class ImageGenerationParams(TypedDict):
1015
prompt: Required[str]
11-
""""
12-
The text to generate the image from."
16+
"""
17+
The text to generate the image from.
1318
"""
1419
aspect_ratio: NotRequired[Literal["1:1", "16:9", "21:9", "3:2", "2:3", "4:5", "5:4", "3:4", "4:3", "9:16", "9:21"]]
1520
"""
1621
The aspect ratio of the image. The default is 1:1.
1722
"""
1823
width: NotRequired[int]
19-
""""
20-
The width of the image. The default is 512."
24+
"""
25+
The width of the image. The default is 512.
2126
"""
2227
height: NotRequired[int]
2328
"""
24-
The height of the image. The default is 512."
29+
The height of the image. The default is 512.
2530
"""
2631
steps: NotRequired[int]
27-
""""
28-
The number of steps to generate the image.""
2932
"""
30-
advance_config: NotRequired[Dict[str, Union[int, str]]]
33+
The number of steps to generate the image.
34+
"""
35+
output_format: NotRequired[Literal["png", "svg"]]
36+
"""
37+
The output format of the generated image. Can be 'png' or 'svg'.
38+
"""
39+
advance_config: NotRequired[AdvanceConfig]
3140
"""
3241
The advance configuration for the image generation. The default is None.
3342
You can pass the following:
34-
- `seed`: The seed for the image generation. The default is None.
35-
- `guidance`: The guidance for the image generation. The default is None.
36-
- `negative_prompt`: The negative prompt for the image generation. The default is None.
43+
- `negative_prompt`: The negative prompt for the image generation
44+
- `guidance`: The guidance scale for the image generation
45+
- `seed`: The seed for reproducible generation
46+
"""
47+
url: NotRequired[str]
48+
"""
49+
URL to use as image input.
50+
"""
51+
file_store_key: NotRequired[str]
52+
"""
53+
File store key to use as image input.
3754
"""
3855

3956
class ImageGenerationResponse(TypedDict):

0 commit comments

Comments
 (0)