fal 1.3.2__py3-none-any.whl → 1.3.4__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 fal might be problematic. Click here for more details.
- fal/_fal_version.py +2 -2
- fal/cli/deploy.py +8 -5
- fal/toolkit/image/image.py +4 -0
- {fal-1.3.2.dist-info → fal-1.3.4.dist-info}/METADATA +1 -1
- {fal-1.3.2.dist-info → fal-1.3.4.dist-info}/RECORD +8 -8
- {fal-1.3.2.dist-info → fal-1.3.4.dist-info}/WHEEL +0 -0
- {fal-1.3.2.dist-info → fal-1.3.4.dist-info}/entry_points.txt +0 -0
- {fal-1.3.2.dist-info → fal-1.3.4.dist-info}/top_level.txt +0 -0
fal/_fal_version.py
CHANGED
fal/cli/deploy.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import argparse
|
|
2
2
|
from collections import namedtuple
|
|
3
3
|
from pathlib import Path
|
|
4
|
-
from typing import Optional, Union
|
|
4
|
+
from typing import Literal, Optional, Tuple, Union
|
|
5
5
|
|
|
6
6
|
from ._utils import get_app_data_from_toml, is_app_name
|
|
7
7
|
from .parser import FalClientParser, RefAction
|
|
@@ -63,7 +63,10 @@ def _get_user() -> User:
|
|
|
63
63
|
|
|
64
64
|
|
|
65
65
|
def _deploy_from_reference(
|
|
66
|
-
app_ref:
|
|
66
|
+
app_ref: Tuple[Optional[Union[Path, str]], ...],
|
|
67
|
+
app_name: str,
|
|
68
|
+
auth: Literal["public", "shared", "private"],
|
|
69
|
+
args,
|
|
67
70
|
):
|
|
68
71
|
from fal.api import FalServerlessError, FalServerlessHost
|
|
69
72
|
from fal.utils import load_function_from
|
|
@@ -93,7 +96,7 @@ def _deploy_from_reference(
|
|
|
93
96
|
isolated_function = loaded.function
|
|
94
97
|
app_name = app_name or loaded.app_name # type: ignore
|
|
95
98
|
app_auth = auth or loaded.app_auth or "private"
|
|
96
|
-
deployment_strategy = args.strategy or "
|
|
99
|
+
deployment_strategy = args.strategy or "recreate"
|
|
97
100
|
|
|
98
101
|
app_id = host.register(
|
|
99
102
|
func=isolated_function.func,
|
|
@@ -204,9 +207,9 @@ def add_parser(main_subparsers, parents):
|
|
|
204
207
|
)
|
|
205
208
|
parser.add_argument(
|
|
206
209
|
"--strategy",
|
|
207
|
-
choices=["
|
|
210
|
+
choices=["recreate", "rolling"],
|
|
208
211
|
help="Deployment strategy.",
|
|
209
|
-
default="
|
|
212
|
+
default="recreate",
|
|
210
213
|
)
|
|
211
214
|
|
|
212
215
|
parser.set_defaults(func=_deploy)
|
fal/toolkit/image/image.py
CHANGED
|
@@ -110,6 +110,10 @@ class Image(File):
|
|
|
110
110
|
# enough result quickly to utilize the underlying resources
|
|
111
111
|
# efficiently.
|
|
112
112
|
saving_options["compress_level"] = 1
|
|
113
|
+
elif format == "jpeg":
|
|
114
|
+
# JPEG quality is set to 95 by default, which is a good balance
|
|
115
|
+
# between file size and image quality.
|
|
116
|
+
saving_options["quality"] = 95
|
|
113
117
|
|
|
114
118
|
with io.BytesIO() as f:
|
|
115
119
|
pil_image.save(f, format=format, **saving_options)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
fal/__init__.py,sha256=wXs1G0gSc7ZK60-bHe-B2m0l_sA6TrFk4BxY0tMoLe8,784
|
|
2
2
|
fal/__main__.py,sha256=4JMK66Wj4uLZTKbF-sT3LAxOsr6buig77PmOkJCRRxw,83
|
|
3
|
-
fal/_fal_version.py,sha256=
|
|
3
|
+
fal/_fal_version.py,sha256=q-rMkBhc2cbe8SdkcXn0kh8Fvtl2cIlapH0EvPC1bmc,411
|
|
4
4
|
fal/_serialization.py,sha256=rD2YiSa8iuzCaZohZwN_MPEB-PpSKbWRDeaIDpTEjyY,7653
|
|
5
5
|
fal/_version.py,sha256=EBGqrknaf1WygENX-H4fBefLvHryvJBBGtVJetaB0NY,266
|
|
6
6
|
fal/api.py,sha256=xOPRO8-Y-7tgab_yKkQ2Lh_n4l8av5zd7srs9PCgJ5U,42020
|
|
@@ -24,7 +24,7 @@ fal/cli/apps.py,sha256=-DDp-Gvxz5kHho5YjAhbri8vOny_9cftAI_wP2KR5nU,8175
|
|
|
24
24
|
fal/cli/auth.py,sha256=--MhfHGwxmtHbRkGioyn1prKn_U-pBzbz0G_QeZou-U,1352
|
|
25
25
|
fal/cli/create.py,sha256=a8WDq-nJLFTeoIXqpb5cr7GR7YR9ZZrQCawNm34KXXE,627
|
|
26
26
|
fal/cli/debug.py,sha256=u_urnyFzSlNnrq93zz_GXE9FX4VyVxDoamJJyrZpFI0,1312
|
|
27
|
-
fal/cli/deploy.py,sha256=
|
|
27
|
+
fal/cli/deploy.py,sha256=8iVTpkQPvKHGHEaxZLnCTftRSC0MuZYC94Xf-qG27p0,6857
|
|
28
28
|
fal/cli/doctor.py,sha256=U4ne9LX5gQwNblsYQ27XdO8AYDgbYjTO39EtxhwexRM,983
|
|
29
29
|
fal/cli/keys.py,sha256=trDpA3LJu9S27qE_K8Hr6fKLK4vwVzbxUHq8TFrV4pw,3157
|
|
30
30
|
fal/cli/main.py,sha256=_Wh_DQc02qwh-ZN7v41lZm0lDR1WseViXVOcqUlyWLg,2009
|
|
@@ -53,7 +53,7 @@ fal/toolkit/file/providers/fal.py,sha256=ClCWM4GI11hOjEIVv2IJZj2SdzBNO8iS1r1WaXF
|
|
|
53
53
|
fal/toolkit/file/providers/gcp.py,sha256=pUVH2qNcnO_VrDQQU8MmfYOQZMGaKQIqE4yGnYdQhAc,2003
|
|
54
54
|
fal/toolkit/file/providers/r2.py,sha256=WxmOHF5WxHt6tKMcFjWj7ZWO8a1EXysO9lfYv_tB3MI,2627
|
|
55
55
|
fal/toolkit/image/__init__.py,sha256=aLcU8HzD7HyOxx-C-Bbx9kYCMHdBhy9tR98FSVJ6gSA,1830
|
|
56
|
-
fal/toolkit/image/image.py,sha256=
|
|
56
|
+
fal/toolkit/image/image.py,sha256=RVppM0NQzhaHHw4nWE3ZbgfHA5jn0Uo5Mew80VYlVKY,4435
|
|
57
57
|
fal/toolkit/image/safety_checker.py,sha256=S7ow-HuoVxC6ixHWWcBrAUm2dIlgq3sTAIull6xIbAg,3105
|
|
58
58
|
fal/toolkit/image/nsfw_filter/__init__.py,sha256=0d9D51EhcnJg8cZLYJjgvQJDZT74CfQu6mpvinRYRpA,216
|
|
59
59
|
fal/toolkit/image/nsfw_filter/env.py,sha256=iAP2Q3vzIl--DD8nr8o3o0goAwhExN2v0feYE0nIQjs,212
|
|
@@ -125,8 +125,8 @@ openapi_fal_rest/models/workflow_node_type.py,sha256=-FzyeY2bxcNmizKbJI8joG7byRi
|
|
|
125
125
|
openapi_fal_rest/models/workflow_schema.py,sha256=4K5gsv9u9pxx2ItkffoyHeNjBBYf6ur5bN4m_zePZNY,2019
|
|
126
126
|
openapi_fal_rest/models/workflow_schema_input.py,sha256=2OkOXWHTNsCXHWS6EGDFzcJKkW5FIap-2gfO233EvZQ,1191
|
|
127
127
|
openapi_fal_rest/models/workflow_schema_output.py,sha256=EblwSPAGfWfYVWw_WSSaBzQVju296is9o28rMBAd0mc,1196
|
|
128
|
-
fal-1.3.
|
|
129
|
-
fal-1.3.
|
|
130
|
-
fal-1.3.
|
|
131
|
-
fal-1.3.
|
|
132
|
-
fal-1.3.
|
|
128
|
+
fal-1.3.4.dist-info/METADATA,sha256=1AHPO6TiWM12EKlgzSC4gFPrBHsnLOETeiOs2PJgmQc,3787
|
|
129
|
+
fal-1.3.4.dist-info/WHEEL,sha256=UvcQYKBHoFqaQd6LKyqHw9fxEolWLQnlzP0h_LgJAfI,91
|
|
130
|
+
fal-1.3.4.dist-info/entry_points.txt,sha256=32zwTUC1U1E7nSTIGCoANQOQ3I7-qHG5wI6gsVz5pNU,37
|
|
131
|
+
fal-1.3.4.dist-info/top_level.txt,sha256=r257X1L57oJL8_lM0tRrfGuXFwm66i1huwQygbpLmHw,21
|
|
132
|
+
fal-1.3.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|