magic_hour 0.20.0__py3-none-any.whl → 0.21.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 CHANGED
@@ -5,4 +5,4 @@ class Environment(enum.Enum):
5
5
  """Pre-defined base URLs for the API"""
6
6
 
7
7
  ENVIRONMENT = "https://api.magichour.ai"
8
- MOCK_SERVER = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.20.0"
8
+ MOCK_SERVER = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.21.0"
@@ -25,6 +25,8 @@ res = client.v1.ai_photo_editor.create(
25
25
  "prompt": "A photo portrait of a person wearing a hat",
26
26
  "prompt_strength": 3.75,
27
27
  "steps": 4,
28
+ "upscale_factor": 2,
29
+ "upscale_fidelity": 0.5,
28
30
  },
29
31
  name="Photo Editor image",
30
32
  )
@@ -47,6 +49,8 @@ res = await client.v1.ai_photo_editor.create(
47
49
  "prompt": "A photo portrait of a person wearing a hat",
48
50
  "prompt_strength": 3.75,
49
51
  "steps": 4,
52
+ "upscale_factor": 2,
53
+ "upscale_fidelity": 0.5,
50
54
  },
51
55
  name="Photo Editor image",
52
56
  )
@@ -65,6 +65,8 @@ class AiPhotoEditorClient:
65
65
  "prompt": "A photo portrait of a person wearing a hat",
66
66
  "prompt_strength": 3.75,
67
67
  "steps": 4,
68
+ "upscale_factor": 2,
69
+ "upscale_fidelity": 0.5,
68
70
  },
69
71
  name="Photo Editor image",
70
72
  )
@@ -144,6 +146,8 @@ class AsyncAiPhotoEditorClient:
144
146
  "prompt": "A photo portrait of a person wearing a hat",
145
147
  "prompt_strength": 3.75,
146
148
  "steps": 4,
149
+ "upscale_factor": 2,
150
+ "upscale_fidelity": 0.5,
147
151
  },
148
152
  name="Photo Editor image",
149
153
  )
@@ -38,6 +38,16 @@ class V1AiPhotoEditorCreateBodyStyle(typing_extensions.TypedDict):
38
38
  Number of iterations used to generate the output. Higher values improve quality and increase the strength of the prompt but increase processing time.
39
39
  """
40
40
 
41
+ upscale_factor: typing_extensions.NotRequired[int]
42
+ """
43
+ The multiplier applied to an image's original dimensions during the upscaling process. For example, a scale of 2 doubles the width and height (e.g., from 512x512 to 1024x1024).
44
+ """
45
+
46
+ upscale_fidelity: typing_extensions.NotRequired[float]
47
+ """
48
+ Upscale fidelity refers to the level of quality desired in the generated image. Fidelity value of 1 means more details.
49
+ """
50
+
41
51
 
42
52
  class _SerializerV1AiPhotoEditorCreateBodyStyle(pydantic.BaseModel):
43
53
  """
@@ -65,3 +75,9 @@ class _SerializerV1AiPhotoEditorCreateBodyStyle(pydantic.BaseModel):
65
75
  alias="prompt_strength",
66
76
  )
67
77
  steps: typing.Optional[int] = pydantic.Field(alias="steps", default=None)
78
+ upscale_factor: typing.Optional[int] = pydantic.Field(
79
+ alias="upscale_factor", default=None
80
+ )
81
+ upscale_fidelity: typing.Optional[float] = pydantic.Field(
82
+ alias="upscale_fidelity", default=None
83
+ )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: magic_hour
3
- Version: 0.20.0
3
+ Version: 0.21.0
4
4
  Summary: Python SDK for Magic Hour API
5
5
  Requires-Python: >=3.8,<4.0
6
6
  Classifier: Programming Language :: Python :: 3
@@ -10,7 +10,7 @@ magic_hour/core/request.py,sha256=_ikn8iZ2fU9Ubqnt7M9hdEnXGV6AAFHJYmDKBtxEY4I,52
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=zppHUVUOt6Y2aej89SSPBfUZtdUSBmh2BLqAIEWj_9Q,213
13
+ magic_hour/environment.py,sha256=HK5djIaAV8tl6fY2AAiv4u0Cj3gVEPVsBm7gT0yyxHs,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
@@ -33,9 +33,9 @@ magic_hour/resources/v1/ai_image_upscaler/client.py,sha256=h06UydWxHm2axdCK7fnEN
33
33
  magic_hour/resources/v1/ai_meme_generator/README.md,sha256=apoW6OAAuK6DJh43ZZt1SwGsjawkVl-IQTiqqMNrDOA,864
34
34
  magic_hour/resources/v1/ai_meme_generator/__init__.py,sha256=x4vtin1KKvoA-va7vhaQ91c__M2z3PmDySLX7yJpRDA,138
35
35
  magic_hour/resources/v1/ai_meme_generator/client.py,sha256=koIrShmzJ5duMoNFe28gli9temiSReKTDv24s2CcB9g,3831
36
- magic_hour/resources/v1/ai_photo_editor/README.md,sha256=H5mahQ4cU15c_ISYSxIwBCx4pROxUtaOSseZCq2ZcF4,1434
36
+ magic_hour/resources/v1/ai_photo_editor/README.md,sha256=6vDvDeZt0wncUhkW9z_4jLru2pZKVNoMZ3Nqb2_WESk,1558
37
37
  magic_hour/resources/v1/ai_photo_editor/__init__.py,sha256=RPG6WaL2KN_DmgrtxImA_jNnEDMm-Ku2o2m2EnNwxts,130
38
- magic_hour/resources/v1/ai_photo_editor/client.py,sha256=oNXR7XhA_pzUpUJ6n0aDJ3mWo8mIyqL-kXFv8GBGCZ0,6233
38
+ magic_hour/resources/v1/ai_photo_editor/client.py,sha256=OvpEVE5elMZGsnD7x9mtLoFWJ_p7ZiHvjOEKBfSyX40,6389
39
39
  magic_hour/resources/v1/ai_qr_code_generator/README.md,sha256=w6IE0mm_D-PnW-bDsIu9k8oPePekZ2TuW3gOFhi95_w,734
40
40
  magic_hour/resources/v1/ai_qr_code_generator/__init__.py,sha256=HnSTg7tB8M5LibZoCDRdE5Q71efmiqZIkNEve5SO1Mg,146
41
41
  magic_hour/resources/v1/ai_qr_code_generator/client.py,sha256=jeqU-1cDWHTpYrfeEq-ABIQqC-jO2elusrfo69Q6pDI,3849
@@ -130,7 +130,7 @@ magic_hour/types/params/v1_ai_meme_generator_create_body.py,sha256=aYbnLZcqeIL4v
130
130
  magic_hour/types/params/v1_ai_meme_generator_create_body_style.py,sha256=olHEhM1LlYDjqcRYXglayUfxklnVBThCv86QP9s28no,1822
131
131
  magic_hour/types/params/v1_ai_photo_editor_create_body.py,sha256=KrlvaPla47WKbH79y_NWruDNEcF4Xl4l3_zw7MqrkF0,1940
132
132
  magic_hour/types/params/v1_ai_photo_editor_create_body_assets.py,sha256=xoDh4VwV-VapU8zUYV6Xnq5LDeE7z-OxNmsmlMlfre0,841
133
- magic_hour/types/params/v1_ai_photo_editor_create_body_style.py,sha256=VPBkdZRjQ7rAFLBcwWt7I-sWmD_oApCa0gyMM0P2-DQ,2073
133
+ magic_hour/types/params/v1_ai_photo_editor_create_body_style.py,sha256=EGPcoSjCDffoTbY3QB-85HVJ97p9swcZkMsYdW_O2JE,2752
134
134
  magic_hour/types/params/v1_ai_qr_code_generator_create_body.py,sha256=_O1654Mbl77SGi9lH4FmKkTwtCXCArH9BeSlgTuLyT0,1109
135
135
  magic_hour/types/params/v1_ai_qr_code_generator_create_body_style.py,sha256=i3ldwmoQPEnrw654PNIARmpsX-kUHZqaT8wjcc22JoA,839
136
136
  magic_hour/types/params/v1_ai_talking_photo_create_body.py,sha256=YOIaCrhespIr0Ue6cOF4R2bg00BGZXQeJwP7RwhJhRI,1408
@@ -158,7 +158,7 @@ magic_hour/types/params/v1_text_to_video_create_body_style.py,sha256=9NTboy7J4ef
158
158
  magic_hour/types/params/v1_video_to_video_create_body.py,sha256=Pgok6GUVHrpW6H3rwdVFA3O5YJvjgviCZkmmHddOSWo,3802
159
159
  magic_hour/types/params/v1_video_to_video_create_body_assets.py,sha256=_-6iA5d8ndka6iJWyWvlJwzRkQcmurJE6hkg-fDwBmQ,1531
160
160
  magic_hour/types/params/v1_video_to_video_create_body_style.py,sha256=2jgpJ3A8LNXksTPQ5pp1tWXtd753zBuhBjA22qqCsTE,5697
161
- magic_hour-0.20.0.dist-info/LICENSE,sha256=F3fxj7JXPgB2K0uj8YXRsVss4u-Dgt_-U3V4VXsivNI,1070
162
- magic_hour-0.20.0.dist-info/METADATA,sha256=zAN1JSubDBg-YepmgpXZIdck90lN02P4XV5pDNXADBU,5483
163
- magic_hour-0.20.0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
164
- magic_hour-0.20.0.dist-info/RECORD,,
161
+ magic_hour-0.21.0.dist-info/LICENSE,sha256=F3fxj7JXPgB2K0uj8YXRsVss4u-Dgt_-U3V4VXsivNI,1070
162
+ magic_hour-0.21.0.dist-info/METADATA,sha256=0hzEUp1XwY7bEE3NPBcQW4480kDU8b3bfCm-DoXlsek,5483
163
+ magic_hour-0.21.0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
164
+ magic_hour-0.21.0.dist-info/RECORD,,