magic_hour 0.13.0__py3-none-any.whl → 0.14.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of magic_hour might be problematic. Click here for more details.
- magic_hour/environment.py +1 -1
- magic_hour/resources/v1/image_to_video/README.md +2 -2
- magic_hour/resources/v1/image_to_video/client.py +4 -4
- magic_hour/resources/v1/text_to_video/README.md +2 -2
- magic_hour/resources/v1/text_to_video/client.py +2 -2
- magic_hour/types/models/v1_image_projects_get_response.py +1 -1
- magic_hour/types/params/v1_image_to_video_create_body.py +3 -0
- magic_hour/types/params/v1_image_to_video_create_body_style.py +14 -5
- magic_hour/types/params/v1_text_to_video_create_body_style.py +12 -0
- {magic_hour-0.13.0.dist-info → magic_hour-0.14.0.dist-info}/METADATA +1 -1
- {magic_hour-0.13.0.dist-info → magic_hour-0.14.0.dist-info}/RECORD +13 -13
- {magic_hour-0.13.0.dist-info → magic_hour-0.14.0.dist-info}/LICENSE +0 -0
- {magic_hour-0.13.0.dist-info → magic_hour-0.14.0.dist-info}/WHEEL +0 -0
magic_hour/environment.py
CHANGED
|
@@ -20,7 +20,7 @@ res = client.v1.image_to_video.create(
|
|
|
20
20
|
assets={"image_file_path": "api-assets/id/1234.png"},
|
|
21
21
|
end_seconds=5.0,
|
|
22
22
|
height=960,
|
|
23
|
-
style={"prompt": "
|
|
23
|
+
style={"prompt": "a dog running"},
|
|
24
24
|
width=512,
|
|
25
25
|
name="Image To Video video",
|
|
26
26
|
)
|
|
@@ -37,7 +37,7 @@ res = await client.v1.image_to_video.create(
|
|
|
37
37
|
assets={"image_file_path": "api-assets/id/1234.png"},
|
|
38
38
|
end_seconds=5.0,
|
|
39
39
|
height=960,
|
|
40
|
-
style={"prompt": "
|
|
40
|
+
style={"prompt": "a dog running"},
|
|
41
41
|
width=512,
|
|
42
42
|
name="Image To Video video",
|
|
43
43
|
)
|
|
@@ -43,7 +43,7 @@ class ImageToVideoClient:
|
|
|
43
43
|
assets: Provide the assets for image-to-video.
|
|
44
44
|
end_seconds: The total duration of the output video in seconds.
|
|
45
45
|
height: The height of the input video. This value will help determine the final orientation of the output video. The output video resolution may not match the input.
|
|
46
|
-
style:
|
|
46
|
+
style: Attributed used to dictate the style of the output
|
|
47
47
|
width: The width of the input video. This value will help determine the final orientation of the output video. The output video resolution may not match the input.
|
|
48
48
|
request_options: Additional options to customize the HTTP request
|
|
49
49
|
|
|
@@ -60,7 +60,7 @@ class ImageToVideoClient:
|
|
|
60
60
|
assets={"image_file_path": "api-assets/id/1234.png"},
|
|
61
61
|
end_seconds=5.0,
|
|
62
62
|
height=960,
|
|
63
|
-
style={"prompt": "
|
|
63
|
+
style={"prompt": "a dog running"},
|
|
64
64
|
width=512,
|
|
65
65
|
name="Image To Video video",
|
|
66
66
|
)
|
|
@@ -119,7 +119,7 @@ class AsyncImageToVideoClient:
|
|
|
119
119
|
assets: Provide the assets for image-to-video.
|
|
120
120
|
end_seconds: The total duration of the output video in seconds.
|
|
121
121
|
height: The height of the input video. This value will help determine the final orientation of the output video. The output video resolution may not match the input.
|
|
122
|
-
style:
|
|
122
|
+
style: Attributed used to dictate the style of the output
|
|
123
123
|
width: The width of the input video. This value will help determine the final orientation of the output video. The output video resolution may not match the input.
|
|
124
124
|
request_options: Additional options to customize the HTTP request
|
|
125
125
|
|
|
@@ -136,7 +136,7 @@ class AsyncImageToVideoClient:
|
|
|
136
136
|
assets={"image_file_path": "api-assets/id/1234.png"},
|
|
137
137
|
end_seconds=5.0,
|
|
138
138
|
height=960,
|
|
139
|
-
style={"prompt": "
|
|
139
|
+
style={"prompt": "a dog running"},
|
|
140
140
|
width=512,
|
|
141
141
|
name="Image To Video video",
|
|
142
142
|
)
|
|
@@ -19,7 +19,7 @@ client = Client(token=getenv("API_TOKEN"))
|
|
|
19
19
|
res = client.v1.text_to_video.create(
|
|
20
20
|
end_seconds=5.0,
|
|
21
21
|
orientation="landscape",
|
|
22
|
-
style={"prompt": "
|
|
22
|
+
style={"prompt": "a dog running"},
|
|
23
23
|
name="Text To Video video",
|
|
24
24
|
)
|
|
25
25
|
```
|
|
@@ -34,7 +34,7 @@ client = AsyncClient(token=getenv("API_TOKEN"))
|
|
|
34
34
|
res = await client.v1.text_to_video.create(
|
|
35
35
|
end_seconds=5.0,
|
|
36
36
|
orientation="landscape",
|
|
37
|
-
style={"prompt": "
|
|
37
|
+
style={"prompt": "a dog running"},
|
|
38
38
|
name="Text To Video video",
|
|
39
39
|
)
|
|
40
40
|
```
|
|
@@ -56,7 +56,7 @@ class TextToVideoClient:
|
|
|
56
56
|
client.v1.text_to_video.create(
|
|
57
57
|
end_seconds=5.0,
|
|
58
58
|
orientation="landscape",
|
|
59
|
-
style={"prompt": "
|
|
59
|
+
style={"prompt": "a dog running"},
|
|
60
60
|
name="Text To Video video",
|
|
61
61
|
)
|
|
62
62
|
```
|
|
@@ -124,7 +124,7 @@ class AsyncTextToVideoClient:
|
|
|
124
124
|
await client.v1.text_to_video.create(
|
|
125
125
|
end_seconds=5.0,
|
|
126
126
|
orientation="landscape",
|
|
127
|
-
style={"prompt": "
|
|
127
|
+
style={"prompt": "a dog running"},
|
|
128
128
|
name="Text To Video video",
|
|
129
129
|
)
|
|
130
130
|
```
|
|
@@ -72,5 +72,5 @@ class V1ImageProjectsGetResponse(pydantic.BaseModel):
|
|
|
72
72
|
alias="type",
|
|
73
73
|
)
|
|
74
74
|
"""
|
|
75
|
-
The type of the image project. Possible values are AI_HEADSHOT, AI_IMAGE, IMAGE_UPSCALER, FACE_SWAP, PHOTO_EDITOR, QR_CODE, BACKGROUND_REMOVER, CLOTHES_CHANGER, AI_MEME, FACE_EDITOR
|
|
75
|
+
The type of the image project. Possible values are AI_HEADSHOT, AI_IMAGE, IMAGE_UPSCALER, FACE_SWAP, PHOTO_EDITOR, QR_CODE, BACKGROUND_REMOVER, CLOTHES_CHANGER, AI_MEME, FACE_EDITOR, PHOTO_COLORIZER
|
|
76
76
|
"""
|
|
@@ -38,6 +38,9 @@ class V1ImageToVideoCreateBody(typing_extensions.TypedDict):
|
|
|
38
38
|
"""
|
|
39
39
|
|
|
40
40
|
style: typing_extensions.Required[V1ImageToVideoCreateBodyStyle]
|
|
41
|
+
"""
|
|
42
|
+
Attributed used to dictate the style of the output
|
|
43
|
+
"""
|
|
41
44
|
|
|
42
45
|
width: typing_extensions.Required[int]
|
|
43
46
|
"""
|
|
@@ -5,19 +5,27 @@ import typing_extensions
|
|
|
5
5
|
|
|
6
6
|
class V1ImageToVideoCreateBodyStyle(typing_extensions.TypedDict):
|
|
7
7
|
"""
|
|
8
|
-
|
|
8
|
+
Attributed used to dictate the style of the output
|
|
9
9
|
"""
|
|
10
10
|
|
|
11
11
|
high_quality: typing_extensions.NotRequired[bool]
|
|
12
12
|
"""
|
|
13
|
-
|
|
13
|
+
Deprecated: Please use `quality_mode` instead. For backward compatibility, setting `high_quality: true` and `quality_mode: quick` will map to `quality_mode: studio`. Note: `quality_mode: studio` offers the same quality as `high_quality: true`.
|
|
14
14
|
"""
|
|
15
15
|
|
|
16
|
-
prompt: typing_extensions.
|
|
16
|
+
prompt: typing_extensions.NotRequired[str]
|
|
17
17
|
"""
|
|
18
18
|
The prompt used for the video.
|
|
19
19
|
"""
|
|
20
20
|
|
|
21
|
+
quality_mode: typing_extensions.NotRequired[
|
|
22
|
+
typing_extensions.Literal["quick", "studio"]
|
|
23
|
+
]
|
|
24
|
+
"""
|
|
25
|
+
* `quick` - Fastest option for rapid results. Takes ~3 minutes per 5s of video.
|
|
26
|
+
* `studio` - Polished visuals with longer runtime. Takes ~8.5 minutes per 5s of video.
|
|
27
|
+
"""
|
|
28
|
+
|
|
21
29
|
|
|
22
30
|
class _SerializerV1ImageToVideoCreateBodyStyle(pydantic.BaseModel):
|
|
23
31
|
"""
|
|
@@ -32,6 +40,7 @@ class _SerializerV1ImageToVideoCreateBodyStyle(pydantic.BaseModel):
|
|
|
32
40
|
high_quality: typing.Optional[bool] = pydantic.Field(
|
|
33
41
|
alias="high_quality", default=None
|
|
34
42
|
)
|
|
35
|
-
prompt: typing.Optional[str] = pydantic.Field(
|
|
36
|
-
|
|
43
|
+
prompt: typing.Optional[str] = pydantic.Field(alias="prompt", default=None)
|
|
44
|
+
quality_mode: typing.Optional[typing_extensions.Literal["quick", "studio"]] = (
|
|
45
|
+
pydantic.Field(alias="quality_mode", default=None)
|
|
37
46
|
)
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import pydantic
|
|
2
|
+
import typing
|
|
2
3
|
import typing_extensions
|
|
3
4
|
|
|
4
5
|
|
|
@@ -12,6 +13,14 @@ class V1TextToVideoCreateBodyStyle(typing_extensions.TypedDict):
|
|
|
12
13
|
The prompt used for the video.
|
|
13
14
|
"""
|
|
14
15
|
|
|
16
|
+
quality_mode: typing_extensions.NotRequired[
|
|
17
|
+
typing_extensions.Literal["quick", "studio"]
|
|
18
|
+
]
|
|
19
|
+
"""
|
|
20
|
+
* `quick` - Fastest option for rapid results. Takes ~3 minutes per 5s of video.
|
|
21
|
+
* `studio` - Polished visuals with longer runtime. Takes ~8.5 minutes per 5s of video.
|
|
22
|
+
"""
|
|
23
|
+
|
|
15
24
|
|
|
16
25
|
class _SerializerV1TextToVideoCreateBodyStyle(pydantic.BaseModel):
|
|
17
26
|
"""
|
|
@@ -26,3 +35,6 @@ class _SerializerV1TextToVideoCreateBodyStyle(pydantic.BaseModel):
|
|
|
26
35
|
prompt: str = pydantic.Field(
|
|
27
36
|
alias="prompt",
|
|
28
37
|
)
|
|
38
|
+
quality_mode: typing.Optional[typing_extensions.Literal["quick", "studio"]] = (
|
|
39
|
+
pydantic.Field(alias="quality_mode", default=None)
|
|
40
|
+
)
|
|
@@ -10,7 +10,7 @@ magic_hour/core/request.py,sha256=lyHrh2VWY238D7JPbgZJlodTqBlHSmQn4fBJiBfE1Es,50
|
|
|
10
10
|
magic_hour/core/response.py,sha256=Sl7nPL2axmz7em_6d9TkFSnQQKUpalWaVWbPPWoXJgM,10180
|
|
11
11
|
magic_hour/core/type_utils.py,sha256=4bU9WXnMXJ6YTtuqOMiB8t6Xw0RlfVWJ-IDBONlqEtQ,461
|
|
12
12
|
magic_hour/core/utils.py,sha256=34SiC1vw2A0TkYHONgMA_d09soIIYiiBWRXCZGdwGIk,1669
|
|
13
|
-
magic_hour/environment.py,sha256=
|
|
13
|
+
magic_hour/environment.py,sha256=f6sXlVm-SfxzdDLBMF2uFwouyMuLK7wm329NvbtRwRA,213
|
|
14
14
|
magic_hour/resources/v1/__init__.py,sha256=Aj0sjVcoijjQyieNBxv2_uewPYC2vO2UG-ehoBgCz5E,86
|
|
15
15
|
magic_hour/resources/v1/ai_clothes_changer/README.md,sha256=KQTvbttct5GcdOJW3NG5gCsWF6G2qlwIoBjBd92TjUs,977
|
|
16
16
|
magic_hour/resources/v1/ai_clothes_changer/__init__.py,sha256=6W_Y2HxG2sDOBiJyzngK3Q2S3xfQgpK-j8xFRmBAhbQ,142
|
|
@@ -57,15 +57,15 @@ magic_hour/resources/v1/image_background_remover/client.py,sha256=xhinD3VIPOFamp
|
|
|
57
57
|
magic_hour/resources/v1/image_projects/README.md,sha256=-mcL1vJbk9PI3bT1VAmq7XWl7hruM73PbCURdndz-f4,1589
|
|
58
58
|
magic_hour/resources/v1/image_projects/__init__.py,sha256=oBlV4e5IVYe8SclhoEy2VOYB53kKP2DORXwcztAwU3E,130
|
|
59
59
|
magic_hour/resources/v1/image_projects/client.py,sha256=FbqvgvoLFcAjBtqgGtQZMNT8jG5f2bJH7Poxod446sw,5527
|
|
60
|
-
magic_hour/resources/v1/image_to_video/README.md,sha256=
|
|
60
|
+
magic_hour/resources/v1/image_to_video/README.md,sha256=RHo1mqVzymPELMVroYrJN_F4VGzuWuTSufa94iKWcFw,1180
|
|
61
61
|
magic_hour/resources/v1/image_to_video/__init__.py,sha256=tY_ABo6evwKQBRSq-M84lNX-pXqmxoozukmrO6NhCgA,126
|
|
62
|
-
magic_hour/resources/v1/image_to_video/client.py,sha256=
|
|
62
|
+
magic_hour/resources/v1/image_to_video/client.py,sha256=m512tJStl0prro97wyIetZ9jWqbVxI83HslnbBBu6Vs,6043
|
|
63
63
|
magic_hour/resources/v1/lip_sync/README.md,sha256=uNZzAXARbUTmq9CcM3uYFhtfpJbM6xICqxkE6woL0BU,1350
|
|
64
64
|
magic_hour/resources/v1/lip_sync/__init__.py,sha256=MlKUAoHNSKcuNzVyqNfLnLtD_PsqEn3l1TtVpPC1JqQ,106
|
|
65
65
|
magic_hour/resources/v1/lip_sync/client.py,sha256=jVP-RrJSKJSdhLp-FZLnMWWhmxdA45upCzPfiSUV6ao,7339
|
|
66
|
-
magic_hour/resources/v1/text_to_video/README.md,sha256=
|
|
66
|
+
magic_hour/resources/v1/text_to_video/README.md,sha256=ecMH9s8N7DrIL_DkDvrCElbvRGnNxNMvSoX8uHMxyP4,1052
|
|
67
67
|
magic_hour/resources/v1/text_to_video/__init__.py,sha256=F18iHSi9tuYSdgpatznBzb7lbSySNpK-82w96-Om_k4,122
|
|
68
|
-
magic_hour/resources/v1/text_to_video/client.py,sha256=
|
|
68
|
+
magic_hour/resources/v1/text_to_video/client.py,sha256=HFFj6a9VaYEzEsa--5lI8HhsS9az-mpDtpIgjV_Nf6M,5028
|
|
69
69
|
magic_hour/resources/v1/video_projects/README.md,sha256=8z3EpBwXMR1nZL-ba34DAkoCfRZ0S2CyMaYCwLBYCEo,1589
|
|
70
70
|
magic_hour/resources/v1/video_projects/__init__.py,sha256=1aj_tE-GAf8BuQ76RQvjGVn8Y39CjdAJDlcsCPucX0w,130
|
|
71
71
|
magic_hour/resources/v1/video_projects/client.py,sha256=JvhYhf3phYkdVj8VpWxvxF8qWBRU-WaZYi-8lhVgpSQ,5511
|
|
@@ -87,7 +87,7 @@ magic_hour/types/models/v1_face_swap_photo_create_response.py,sha256=d68oxwceXya
|
|
|
87
87
|
magic_hour/types/models/v1_files_upload_urls_create_response.py,sha256=ecdnxoo-ZBTa2kAusHq4nyz6RdugzyN7w4oazJt5ri0,460
|
|
88
88
|
magic_hour/types/models/v1_files_upload_urls_create_response_items_item.py,sha256=AjW1Myj-dB10IdM3zTMEsXouY3tnx8vdN5CW3HLQX_M,799
|
|
89
89
|
magic_hour/types/models/v1_image_background_remover_create_response.py,sha256=jK_RVF3V0VSZn70FzsEjCrA_SEbpvcDdxy1RSlvsygw,631
|
|
90
|
-
magic_hour/types/models/v1_image_projects_get_response.py,sha256=
|
|
90
|
+
magic_hour/types/models/v1_image_projects_get_response.py,sha256=FEt7O6Z_C2pDzFnjkBciC2Cq6A9OfRsq-u8db4JTEqY,2141
|
|
91
91
|
magic_hour/types/models/v1_image_projects_get_response_downloads_item.py,sha256=kC0UhiMug52kxN6Ib1H_u_JQGUbeRc91gjuVaXYaM-c,410
|
|
92
92
|
magic_hour/types/models/v1_image_projects_get_response_error.py,sha256=R1qg-aIt63h6Q7bQ4AvgeC0lbUg5u35rwFXFvU_gvZs,568
|
|
93
93
|
magic_hour/types/models/v1_image_to_video_create_response.py,sha256=9I3MptKUR2gdQW6SbGSZr5Usdte9PRSniq-pjwJySk4,736
|
|
@@ -129,17 +129,17 @@ magic_hour/types/params/v1_files_upload_urls_create_body.py,sha256=X6-ZcUqVVTM3w
|
|
|
129
129
|
magic_hour/types/params/v1_files_upload_urls_create_body_items_item.py,sha256=I26O2Jx5_uhsCOrQCL_-wPeenu0rzhNwCDy0AEI6YuQ,962
|
|
130
130
|
magic_hour/types/params/v1_image_background_remover_create_body.py,sha256=l3sb8UTXjie3gMd4ZJhHik-N1o3zaVzsZ7xDaS_uTG4,1063
|
|
131
131
|
magic_hour/types/params/v1_image_background_remover_create_body_assets.py,sha256=aw9P_bdBTi8YMvgJxH8G0adwn1YswQzvtc0LgNAPQ8s,873
|
|
132
|
-
magic_hour/types/params/v1_image_to_video_create_body.py,sha256=
|
|
132
|
+
magic_hour/types/params/v1_image_to_video_create_body.py,sha256=jU1k75k6Q30RC1Hf41h2_e2fhQbSydiCKhF_ESTTZKc,2113
|
|
133
133
|
magic_hour/types/params/v1_image_to_video_create_body_assets.py,sha256=J39Jv5Bv9bjMaskHzMfbO5VE6QWh-saN3eWOUPRtuRk,830
|
|
134
|
-
magic_hour/types/params/v1_image_to_video_create_body_style.py,sha256=
|
|
134
|
+
magic_hour/types/params/v1_image_to_video_create_body_style.py,sha256=Q7KKr3i0ed7pj2HtwYW0dHQgY-Jjh9xTxUKxGYcBnU0,1535
|
|
135
135
|
magic_hour/types/params/v1_lip_sync_create_body.py,sha256=U5mk_4Oy_e3NyfQIt-Av_FDvt4EYed10hvZZ6tMcEP4,2448
|
|
136
136
|
magic_hour/types/params/v1_lip_sync_create_body_assets.py,sha256=UypixyrVpyyv2nysMgXFj1iyvALCE0D4WRy1D3XEWuI,1883
|
|
137
137
|
magic_hour/types/params/v1_text_to_video_create_body.py,sha256=ax7CQZQ7keVjOWIsYFTQ9lb_PhhwvfMBXzHWX4x1nB8,1436
|
|
138
|
-
magic_hour/types/params/v1_text_to_video_create_body_style.py,sha256=
|
|
138
|
+
magic_hour/types/params/v1_text_to_video_create_body_style.py,sha256=9NTboy7J4efsA8tVub2uOZpmgriiggfOyf5uAodBN3o,1065
|
|
139
139
|
magic_hour/types/params/v1_video_to_video_create_body.py,sha256=iOb3qGXySlI4unyWPAXDmiLMUSHH6ymuDHeiwpmhKeE,2942
|
|
140
140
|
magic_hour/types/params/v1_video_to_video_create_body_assets.py,sha256=_-6iA5d8ndka6iJWyWvlJwzRkQcmurJE6hkg-fDwBmQ,1531
|
|
141
141
|
magic_hour/types/params/v1_video_to_video_create_body_style.py,sha256=2jgpJ3A8LNXksTPQ5pp1tWXtd753zBuhBjA22qqCsTE,5697
|
|
142
|
-
magic_hour-0.
|
|
143
|
-
magic_hour-0.
|
|
144
|
-
magic_hour-0.
|
|
145
|
-
magic_hour-0.
|
|
142
|
+
magic_hour-0.14.0.dist-info/LICENSE,sha256=F3fxj7JXPgB2K0uj8YXRsVss4u-Dgt_-U3V4VXsivNI,1070
|
|
143
|
+
magic_hour-0.14.0.dist-info/METADATA,sha256=eLoBI-qD410IkJndKZydTo7CTO141nMZmvS7_NabfVg,4997
|
|
144
|
+
magic_hour-0.14.0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
|
145
|
+
magic_hour-0.14.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|