fal 1.7.0__tar.gz → 1.7.1__tar.gz
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-1.7.0/fal.egg-info → fal-1.7.1}/PKG-INFO +1 -1
- {fal-1.7.0 → fal-1.7.1/fal.egg-info}/PKG-INFO +1 -1
- {fal-1.7.0 → fal-1.7.1}/fal.egg-info/SOURCES.txt +1 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/_fal_version.py +2 -2
- {fal-1.7.0 → fal-1.7.1}/src/fal/auth/__init__.py +4 -1
- fal-1.7.1/src/fal/config.py +23 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/toolkit/file/file.py +10 -22
- {fal-1.7.0 → fal-1.7.1}/tests/integration_test.py +6 -6
- {fal-1.7.0 → fal-1.7.1}/tests/test_stability.py +3 -1
- {fal-1.7.0 → fal-1.7.1}/tests/toolkit/image_test.py +4 -4
- {fal-1.7.0 → fal-1.7.1}/.gitignore +0 -0
- {fal-1.7.0 → fal-1.7.1}/Makefile +0 -0
- {fal-1.7.0 → fal-1.7.1}/README.md +0 -0
- {fal-1.7.0 → fal-1.7.1}/docs/conf.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/docs/index.rst +0 -0
- {fal-1.7.0 → fal-1.7.1}/fal.egg-info/dependency_links.txt +0 -0
- {fal-1.7.0 → fal-1.7.1}/fal.egg-info/entry_points.txt +0 -0
- {fal-1.7.0 → fal-1.7.1}/fal.egg-info/requires.txt +0 -0
- {fal-1.7.0 → fal-1.7.1}/fal.egg-info/top_level.txt +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/README.md +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/__init__.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/api/__init__.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/api/applications/__init__.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/api/applications/app_metadata.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/api/billing/__init__.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/api/billing/get_user_details.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/api/comfy/__init__.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/api/comfy/create_workflow.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/api/comfy/delete_workflow.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/api/comfy/get_workflow.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/api/comfy/list_user_workflows.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/api/comfy/update_workflow.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/api/files/__init__.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/api/files/check_dir_hash.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/api/files/upload_local_file.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/api/users/__init__.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/api/users/get_current_user.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/api/workflows/__init__.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/api/workflows/create_workflow.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/api/workflows/delete_workflow.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/api/workflows/get_workflow.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/api/workflows/list_user_workflows.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/api/workflows/update_workflow.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/client.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/errors.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/models/__init__.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/models/app_metadata_response_app_metadata.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/models/body_upload_local_file.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/models/comfy_workflow_detail.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/models/comfy_workflow_item.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/models/comfy_workflow_schema.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/models/comfy_workflow_schema_extra_data.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/models/comfy_workflow_schema_fal_inputs.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/models/comfy_workflow_schema_fal_inputs_dev_info.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/models/comfy_workflow_schema_prompt.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/models/current_user.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/models/customer_details.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/models/hash_check.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/models/http_validation_error.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/models/lock_reason.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/models/page_comfy_workflow_item.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/models/page_workflow_item.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/models/team_role.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/models/typed_comfy_workflow.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/models/typed_comfy_workflow_update.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/models/typed_workflow.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/models/typed_workflow_update.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/models/user_member.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/models/validation_error.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/models/workflow_contents.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/models/workflow_contents_metadata.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/models/workflow_contents_nodes.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/models/workflow_contents_output.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/models/workflow_detail.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/models/workflow_detail_contents.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/models/workflow_item.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/models/workflow_node.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/models/workflow_node_type.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/models/workflow_schema.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/models/workflow_schema_input.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/models/workflow_schema_output.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/py.typed +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/types.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/pyproject.toml +0 -0
- {fal-1.7.0 → fal-1.7.1}/openapi_rest.config.yaml +0 -0
- {fal-1.7.0 → fal-1.7.1}/pyproject.toml +0 -0
- {fal-1.7.0 → fal-1.7.1}/setup.cfg +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/__init__.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/__main__.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/_serialization.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/_version.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/api.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/app.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/apps.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/auth/auth0.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/auth/local.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/cli/__init__.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/cli/_utils.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/cli/apps.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/cli/auth.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/cli/create.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/cli/debug.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/cli/deploy.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/cli/doctor.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/cli/keys.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/cli/main.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/cli/parser.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/cli/run.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/cli/runners.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/cli/secrets.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/console/__init__.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/console/icons.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/console/ux.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/container.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/exceptions/__init__.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/exceptions/_base.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/exceptions/_cuda.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/exceptions/auth.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/files.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/flags.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/logging/__init__.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/logging/isolate.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/logging/style.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/logging/trace.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/logging/user.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/py.typed +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/rest_client.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/sdk.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/sync.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/toolkit/__init__.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/toolkit/exceptions.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/toolkit/file/__init__.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/toolkit/file/providers/fal.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/toolkit/file/providers/gcp.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/toolkit/file/providers/r2.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/toolkit/file/providers/s3.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/toolkit/file/types.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/toolkit/image/__init__.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/toolkit/image/image.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/toolkit/image/nsfw_filter/__init__.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/toolkit/image/nsfw_filter/env.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/toolkit/image/nsfw_filter/inference.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/toolkit/image/nsfw_filter/model.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/toolkit/image/nsfw_filter/requirements.txt +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/toolkit/image/safety_checker.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/toolkit/optimize.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/toolkit/types.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/toolkit/utils/__init__.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/toolkit/utils/download_utils.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/toolkit/utils/retry.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/utils.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/src/fal/workflows.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/tests/__init__.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/tests/assets/cat.png +0 -0
- {fal-1.7.0 → fal-1.7.1}/tests/cli/__init__.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/tests/cli/test_apps.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/tests/cli/test_auth.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/tests/cli/test_deploy.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/tests/cli/test_keys.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/tests/cli/test_run.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/tests/cli/test_secrets.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/tests/conftest.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/tests/mainify_package/__init__.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/tests/mainify_package/impl.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/tests/mainify_package/utils.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/tests/mainify_target.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/tests/test_apps.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/tests/toolkit/file_test.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/tests/toolkit/test_types.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/tests/toolkit/utils/retry.py +0 -0
- {fal-1.7.0 → fal-1.7.1}/tools/demo_script.py +0 -0
|
@@ -8,6 +8,7 @@ from typing import Optional
|
|
|
8
8
|
import click
|
|
9
9
|
|
|
10
10
|
from fal.auth import auth0, local
|
|
11
|
+
from fal.config import Config
|
|
11
12
|
from fal.console import console
|
|
12
13
|
from fal.console.icons import CHECK_ICON
|
|
13
14
|
from fal.exceptions.auth import UnauthenticatedException
|
|
@@ -61,7 +62,9 @@ def key_credentials() -> tuple[str, str] | None:
|
|
|
61
62
|
if os.environ.get("FAL_FORCE_AUTH_BY_USER") == "1":
|
|
62
63
|
return None
|
|
63
64
|
|
|
64
|
-
|
|
65
|
+
config = Config()
|
|
66
|
+
|
|
67
|
+
key = os.environ.get("FAL_KEY") or config.get("key") or get_colab_token()
|
|
65
68
|
if key:
|
|
66
69
|
key_id, key_secret = key.split(":", 1)
|
|
67
70
|
return (key_id, key_secret)
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import os
|
|
2
|
+
|
|
3
|
+
import tomli
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class Config:
|
|
7
|
+
DEFAULT_CONFIG_PATH = "~/.fal/config.toml"
|
|
8
|
+
DEFAULT_PROFILE = "default"
|
|
9
|
+
|
|
10
|
+
def __init__(self):
|
|
11
|
+
self.config_path = os.path.expanduser(
|
|
12
|
+
os.getenv("FAL_CONFIG_PATH", self.DEFAULT_CONFIG_PATH)
|
|
13
|
+
)
|
|
14
|
+
self.profile = os.getenv("FAL_PROFILE", self.DEFAULT_PROFILE)
|
|
15
|
+
|
|
16
|
+
try:
|
|
17
|
+
with open(self.config_path, "rb") as file:
|
|
18
|
+
self.config = tomli.load(file)
|
|
19
|
+
except FileNotFoundError:
|
|
20
|
+
self.config = {}
|
|
21
|
+
|
|
22
|
+
def get(self, key):
|
|
23
|
+
return self.config.get(self.profile, {}).get(key)
|
|
@@ -47,7 +47,10 @@ BUILT_IN_REPOSITORIES: dict[RepositoryId, FileRepositoryFactory] = {
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
|
|
50
|
-
def get_builtin_repository(id: RepositoryId) -> FileRepository:
|
|
50
|
+
def get_builtin_repository(id: RepositoryId | FileRepository) -> FileRepository:
|
|
51
|
+
if isinstance(id, FileRepository):
|
|
52
|
+
return id
|
|
53
|
+
|
|
51
54
|
if id not in BUILT_IN_REPOSITORIES.keys():
|
|
52
55
|
raise ValueError(f'"{id}" is not a valid built-in file repository')
|
|
53
56
|
return BUILT_IN_REPOSITORIES[id]()
|
|
@@ -122,7 +125,8 @@ class File(BaseModel):
|
|
|
122
125
|
url=url,
|
|
123
126
|
content_type=None,
|
|
124
127
|
file_name=None,
|
|
125
|
-
|
|
128
|
+
file_size=None,
|
|
129
|
+
file_data=None,
|
|
126
130
|
)
|
|
127
131
|
|
|
128
132
|
@classmethod
|
|
@@ -139,11 +143,7 @@ class File(BaseModel):
|
|
|
139
143
|
save_kwargs: Optional[dict] = None,
|
|
140
144
|
fallback_save_kwargs: Optional[dict] = None,
|
|
141
145
|
) -> File:
|
|
142
|
-
repo = (
|
|
143
|
-
repository
|
|
144
|
-
if isinstance(repository, FileRepository)
|
|
145
|
-
else get_builtin_repository(repository)
|
|
146
|
-
)
|
|
146
|
+
repo = get_builtin_repository(repository)
|
|
147
147
|
|
|
148
148
|
save_kwargs = save_kwargs or {}
|
|
149
149
|
fallback_save_kwargs = fallback_save_kwargs or {}
|
|
@@ -160,11 +160,7 @@ class File(BaseModel):
|
|
|
160
160
|
if not fallback_repository:
|
|
161
161
|
raise
|
|
162
162
|
|
|
163
|
-
fallback_repo = (
|
|
164
|
-
fallback_repository
|
|
165
|
-
if isinstance(fallback_repository, FileRepository)
|
|
166
|
-
else get_builtin_repository(fallback_repository)
|
|
167
|
-
)
|
|
163
|
+
fallback_repo = get_builtin_repository(fallback_repository)
|
|
168
164
|
|
|
169
165
|
url = fallback_repo.save(
|
|
170
166
|
fdata, object_lifecycle_preference, **fallback_save_kwargs
|
|
@@ -196,11 +192,7 @@ class File(BaseModel):
|
|
|
196
192
|
if not file_path.exists():
|
|
197
193
|
raise FileNotFoundError(f"File {file_path} does not exist")
|
|
198
194
|
|
|
199
|
-
repo = (
|
|
200
|
-
repository
|
|
201
|
-
if isinstance(repository, FileRepository)
|
|
202
|
-
else get_builtin_repository(repository)
|
|
203
|
-
)
|
|
195
|
+
repo = get_builtin_repository(repository)
|
|
204
196
|
|
|
205
197
|
save_kwargs = save_kwargs or {}
|
|
206
198
|
fallback_save_kwargs = fallback_save_kwargs or {}
|
|
@@ -222,11 +214,7 @@ class File(BaseModel):
|
|
|
222
214
|
if not fallback_repository:
|
|
223
215
|
raise
|
|
224
216
|
|
|
225
|
-
fallback_repo = (
|
|
226
|
-
fallback_repository
|
|
227
|
-
if isinstance(fallback_repository, FileRepository)
|
|
228
|
-
else get_builtin_repository(fallback_repository)
|
|
229
|
-
)
|
|
217
|
+
fallback_repo = get_builtin_repository(fallback_repository)
|
|
230
218
|
|
|
231
219
|
url, data = fallback_repo.save_file(
|
|
232
220
|
file_path,
|
|
@@ -458,7 +458,7 @@ def fal_file_content_matches(file: File, content: str):
|
|
|
458
458
|
|
|
459
459
|
|
|
460
460
|
def test_fal_file_from_path(isolated_client):
|
|
461
|
-
@isolated_client(requirements=[f"pydantic=={pydantic_version}"])
|
|
461
|
+
@isolated_client(requirements=[f"pydantic=={pydantic_version}", "tomli"])
|
|
462
462
|
def fal_file_from_temp(content: str):
|
|
463
463
|
with tempfile.NamedTemporaryFile() as temp_file:
|
|
464
464
|
file_path = temp_file.name
|
|
@@ -475,7 +475,7 @@ def test_fal_file_from_path(isolated_client):
|
|
|
475
475
|
|
|
476
476
|
|
|
477
477
|
def test_fal_file_from_bytes(isolated_client):
|
|
478
|
-
@isolated_client(requirements=[f"pydantic=={pydantic_version}"])
|
|
478
|
+
@isolated_client(requirements=[f"pydantic=={pydantic_version}", "tomli"])
|
|
479
479
|
def fal_file_from_bytes(content: str):
|
|
480
480
|
return File.from_bytes(content.encode(), repository="in_memory")
|
|
481
481
|
|
|
@@ -486,7 +486,7 @@ def test_fal_file_from_bytes(isolated_client):
|
|
|
486
486
|
|
|
487
487
|
|
|
488
488
|
def test_fal_file_save(isolated_client):
|
|
489
|
-
@isolated_client(requirements=[f"pydantic=={pydantic_version}"])
|
|
489
|
+
@isolated_client(requirements=[f"pydantic=={pydantic_version}", "tomli"])
|
|
490
490
|
def fal_file_to_local_file(content: str):
|
|
491
491
|
file = File.from_bytes(content.encode(), repository="in_memory")
|
|
492
492
|
|
|
@@ -521,7 +521,7 @@ def test_fal_file_input(isolated_client, file_url: str, expected_content: str):
|
|
|
521
521
|
class TestInput(BaseModel):
|
|
522
522
|
file: File = Field()
|
|
523
523
|
|
|
524
|
-
@isolated_client(requirements=[f"pydantic=={pydantic_version}"])
|
|
524
|
+
@isolated_client(requirements=[f"pydantic=={pydantic_version}", "tomli"])
|
|
525
525
|
def init_file_on_fal(input: TestInput) -> File:
|
|
526
526
|
return input.file
|
|
527
527
|
|
|
@@ -542,7 +542,7 @@ def test_fal_compressed_file(isolated_client):
|
|
|
542
542
|
class TestInput(BaseModel):
|
|
543
543
|
files: CompressedFile
|
|
544
544
|
|
|
545
|
-
@isolated_client(requirements=[f"pydantic=={pydantic_version}"])
|
|
545
|
+
@isolated_client(requirements=[f"pydantic=={pydantic_version}", "tomli"])
|
|
546
546
|
def init_compressed_file_on_fal(input: TestInput) -> int:
|
|
547
547
|
extracted_file_paths = [file for file in input.files]
|
|
548
548
|
return extracted_file_paths
|
|
@@ -557,7 +557,7 @@ def test_fal_compressed_file(isolated_client):
|
|
|
557
557
|
|
|
558
558
|
|
|
559
559
|
def test_fal_cdn(isolated_client):
|
|
560
|
-
@isolated_client(requirements=[f"pydantic=={pydantic_version}"])
|
|
560
|
+
@isolated_client(requirements=[f"pydantic=={pydantic_version}", "tomli"])
|
|
561
561
|
def upload_to_fal_cdn() -> FalImage:
|
|
562
562
|
return FalImage.from_bytes(b"0", "jpeg", repository="cdn")
|
|
563
563
|
|
|
@@ -595,7 +595,9 @@ def test_fal_storage(isolated_client, repo_type, url_prefix):
|
|
|
595
595
|
assert file.url.startswith(url_prefix)
|
|
596
596
|
assert file.as_bytes().decode().endswith("local")
|
|
597
597
|
|
|
598
|
-
@isolated_client(
|
|
598
|
+
@isolated_client(
|
|
599
|
+
serve=True, requirements=[f"pydantic=={pydantic_version}", "tomli"]
|
|
600
|
+
)
|
|
599
601
|
def hello_file():
|
|
600
602
|
# Run in the isolated environment
|
|
601
603
|
return File.from_bytes(
|
|
@@ -77,7 +77,7 @@ def assert_fal_images_equals(fal_image_1: Image, fal_image_2: Image):
|
|
|
77
77
|
|
|
78
78
|
|
|
79
79
|
def test_fal_image_from_pil(isolated_client):
|
|
80
|
-
@isolated_client(requirements=["pillow", f"pydantic=={pydantic_version}"])
|
|
80
|
+
@isolated_client(requirements=["pillow", f"pydantic=={pydantic_version}", "tomli"])
|
|
81
81
|
def fal_image_from_bytes_remote():
|
|
82
82
|
pil_image = get_image()
|
|
83
83
|
return Image.from_pil(pil_image, repository="in_memory")
|
|
@@ -87,7 +87,7 @@ def test_fal_image_from_pil(isolated_client):
|
|
|
87
87
|
|
|
88
88
|
|
|
89
89
|
def test_fal_image_from_bytes(isolated_client):
|
|
90
|
-
@isolated_client(requirements=["pillow", f"pydantic=={pydantic_version}"])
|
|
90
|
+
@isolated_client(requirements=["pillow", f"pydantic=={pydantic_version}", "tomli"])
|
|
91
91
|
def fal_image_from_bytes_remote():
|
|
92
92
|
image_bytes = get_image(as_bytes=True)
|
|
93
93
|
return Image.from_bytes(image_bytes, repository="in_memory", format="png")
|
|
@@ -107,7 +107,7 @@ def test_fal_image_input(isolated_client, image_url):
|
|
|
107
107
|
class TestInput(BaseModel):
|
|
108
108
|
image: Image = Field()
|
|
109
109
|
|
|
110
|
-
@isolated_client(requirements=["pillow", f"pydantic=={pydantic_version}"])
|
|
110
|
+
@isolated_client(requirements=["pillow", f"pydantic=={pydantic_version}", "tomli"])
|
|
111
111
|
def init_image_on_fal(input: TestInput) -> Image:
|
|
112
112
|
return TestInput(image=input.image).image
|
|
113
113
|
|
|
@@ -127,7 +127,7 @@ def test_fal_image_input_to_pil(isolated_client):
|
|
|
127
127
|
class TestInput(BaseModel):
|
|
128
128
|
image: Image = Field()
|
|
129
129
|
|
|
130
|
-
@isolated_client(requirements=["pillow", f"pydantic=={pydantic_version}"])
|
|
130
|
+
@isolated_client(requirements=["pillow", f"pydantic=={pydantic_version}", "tomli"])
|
|
131
131
|
def init_image_on_fal(input: TestInput) -> bytes:
|
|
132
132
|
input_image = TestInput(image=input.image).image
|
|
133
133
|
pil_image = input_image.to_pil()
|
|
File without changes
|
{fal-1.7.0 → fal-1.7.1}/Makefile
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/api/workflows/list_user_workflows.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/models/comfy_workflow_schema_extra_data.py
RENAMED
|
File without changes
|
{fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/models/comfy_workflow_schema_fal_inputs.py
RENAMED
|
File without changes
|
|
File without changes
|
{fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/models/comfy_workflow_schema_prompt.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/models/page_comfy_workflow_item.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/models/typed_comfy_workflow_update.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/models/workflow_contents_metadata.py
RENAMED
|
File without changes
|
|
File without changes
|
{fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/models/workflow_contents_output.py
RENAMED
|
File without changes
|
|
File without changes
|
{fal-1.7.0 → fal-1.7.1}/openapi-fal-rest/openapi_fal_rest/models/workflow_detail_contents.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|