xelta-cli 0.1.0__tar.gz → 0.1.2__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.
- {xelta_cli-0.1.0 → xelta_cli-0.1.2}/PKG-INFO +1 -1
- {xelta_cli-0.1.0 → xelta_cli-0.1.2}/pyproject.toml +1 -1
- {xelta_cli-0.1.0 → xelta_cli-0.1.2}/xelta/commands/image.py +7 -2
- {xelta_cli-0.1.0 → xelta_cli-0.1.2}/xelta_cli.egg-info/PKG-INFO +1 -1
- {xelta_cli-0.1.0 → xelta_cli-0.1.2}/setup.cfg +0 -0
- {xelta_cli-0.1.0 → xelta_cli-0.1.2}/xelta/__init__.py +0 -0
- {xelta_cli-0.1.0 → xelta_cli-0.1.2}/xelta/auth.py +0 -0
- {xelta_cli-0.1.0 → xelta_cli-0.1.2}/xelta/cli.py +0 -0
- {xelta_cli-0.1.0 → xelta_cli-0.1.2}/xelta/commands/__init__.py +0 -0
- {xelta_cli-0.1.0 → xelta_cli-0.1.2}/xelta/commands/balance.py +0 -0
- {xelta_cli-0.1.0 → xelta_cli-0.1.2}/xelta/commands/mixboard.py +0 -0
- {xelta_cli-0.1.0 → xelta_cli-0.1.2}/xelta/commands/reel.py +0 -0
- {xelta_cli-0.1.0 → xelta_cli-0.1.2}/xelta/commands/status.py +0 -0
- {xelta_cli-0.1.0 → xelta_cli-0.1.2}/xelta/commands/street_ad.py +0 -0
- {xelta_cli-0.1.0 → xelta_cli-0.1.2}/xelta/commands/website.py +0 -0
- {xelta_cli-0.1.0 → xelta_cli-0.1.2}/xelta/config.py +0 -0
- {xelta_cli-0.1.0 → xelta_cli-0.1.2}/xelta/oauth.py +0 -0
- {xelta_cli-0.1.0 → xelta_cli-0.1.2}/xelta_cli.egg-info/SOURCES.txt +0 -0
- {xelta_cli-0.1.0 → xelta_cli-0.1.2}/xelta_cli.egg-info/dependency_links.txt +0 -0
- {xelta_cli-0.1.0 → xelta_cli-0.1.2}/xelta_cli.egg-info/entry_points.txt +0 -0
- {xelta_cli-0.1.0 → xelta_cli-0.1.2}/xelta_cli.egg-info/requires.txt +0 -0
- {xelta_cli-0.1.0 → xelta_cli-0.1.2}/xelta_cli.egg-info/top_level.txt +0 -0
|
@@ -5,6 +5,7 @@ import typer
|
|
|
5
5
|
from rich.console import Console
|
|
6
6
|
from rich.table import Table
|
|
7
7
|
from xelta.config import IMAGE_GEN_BASE_URL, LIPSYNC_BASE_URL, auth_headers, cookie_headers
|
|
8
|
+
from xelta.auth import load_token
|
|
8
9
|
|
|
9
10
|
console = Console()
|
|
10
11
|
|
|
@@ -36,7 +37,7 @@ async def _image(prompt: str, model_id: str | None, size: str | None, optimize:
|
|
|
36
37
|
if not model_id:
|
|
37
38
|
r = await client.get(
|
|
38
39
|
f"{IMAGE_GEN_BASE_URL}/api/models/image_generation/all",
|
|
39
|
-
headers=auth_headers(),
|
|
40
|
+
headers={**cookie_headers(), **auth_headers()},
|
|
40
41
|
timeout=15,
|
|
41
42
|
)
|
|
42
43
|
r.raise_for_status()
|
|
@@ -86,10 +87,14 @@ async def _image(prompt: str, model_id: str | None, size: str | None, optimize:
|
|
|
86
87
|
}
|
|
87
88
|
r = await client.post(
|
|
88
89
|
f"{IMAGE_GEN_BASE_URL}/api/models/{model_id}/generate",
|
|
89
|
-
headers={**auth_headers(), "Content-Type": "application/json"},
|
|
90
|
+
headers={**cookie_headers(), **auth_headers(), "Content-Type": "application/json"},
|
|
90
91
|
json=payload,
|
|
91
92
|
timeout=120,
|
|
92
93
|
)
|
|
94
|
+
if r.status_code >= 500:
|
|
95
|
+
console.print(f"[red]The xelta image generation service is currently unavailable (HTTP {r.status_code}).[/red]")
|
|
96
|
+
console.print("[dim]This is a server-side issue — please try again in a few minutes or pick a different model.[/dim]")
|
|
97
|
+
raise typer.Exit(1)
|
|
93
98
|
r.raise_for_status()
|
|
94
99
|
resp = r.json()
|
|
95
100
|
|
|
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
|