fix: restore truncated logic in whisk_client.py (v4)
This commit is contained in:
parent
b3e17f4cb3
commit
b6b8be7b24
3 changed files with 13 additions and 12 deletions
|
|
@ -3,7 +3,7 @@
|
|||
# Configuration
|
||||
REGISTRY="git.khoavo.myds.me"
|
||||
IMAGE_NAME="vndangkhoa/apix"
|
||||
TAG="v3"
|
||||
TAG="v4"
|
||||
FULL_IMAGE="$REGISTRY/$IMAGE_NAME:$TAG"
|
||||
|
||||
echo "=== Building Docker Image for Linux/AMD64 ==="
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
<aside class="sidebar">
|
||||
<div class="sidebar-header">
|
||||
<div class="brand">
|
||||
<h1>aPix <span class="badge">v3.0 DEBUG</span></h1>
|
||||
<h1>aPix <span class="badge">v4.0 DEBUG</span></h1>
|
||||
</div>
|
||||
<div class="sidebar-header-actions">
|
||||
<button type="button" class="toolbar-info-btn info-icon-btn" data-popup-target="help"
|
||||
|
|
|
|||
|
|
@ -137,17 +137,18 @@ def generate_image_whisk(prompt, cookie_str, **kwargs):
|
|||
|
||||
access_token = get_session_token(cookies)
|
||||
|
||||
def load_template_favorites():
|
||||
path = get_config_path('gallery_favorites.json') # Typo in original? No, it uses gallery_favorites for both? Let's check logic.
|
||||
# Ah, original code had a separate logic or file?
|
||||
# Let me check the original code via view first to be safe.
|
||||
# It seems there was no load_template_favorites definition in the previous view.
|
||||
# I will replace the top of the file definitions if they exist there.
|
||||
reference_image_path = kwargs.get('reference_image_path')
|
||||
media_generation_id = None
|
||||
if reference_image_path:
|
||||
try:
|
||||
media_generation_id = upload_reference_image(reference_image_path, cookies)
|
||||
except Exception as e:
|
||||
logger.error(f"Failed to upload reference image: {e}")
|
||||
# Fallback to Text-to-Image? Or fail?
|
||||
# If user wants reference, we should probably fail or warn.
|
||||
# For now, let's log and continue (media_generation_id will be None -> T2I)
|
||||
pass
|
||||
|
||||
# Retrying with correct strategy: replace the specific lines if I can find them.
|
||||
# I'll view the file top to locate these helpers first.
|
||||
|
||||
aspect_ratio_map = {
|
||||
"1:1": "IMAGE_ASPECT_RATIO_SQUARE",
|
||||
"9:16": "IMAGE_ASPECT_RATIO_PORTRAIT",
|
||||
|
|
|
|||
Loading…
Reference in a new issue