fix: restore truncated logic in whisk_client.py (v4)

This commit is contained in:
Khoa.vo 2025-12-30 21:25:54 +07:00
parent b3e17f4cb3
commit b6b8be7b24
3 changed files with 13 additions and 12 deletions

View file

@ -3,7 +3,7 @@
# Configuration # Configuration
REGISTRY="git.khoavo.myds.me" REGISTRY="git.khoavo.myds.me"
IMAGE_NAME="vndangkhoa/apix" IMAGE_NAME="vndangkhoa/apix"
TAG="v3" TAG="v4"
FULL_IMAGE="$REGISTRY/$IMAGE_NAME:$TAG" FULL_IMAGE="$REGISTRY/$IMAGE_NAME:$TAG"
echo "=== Building Docker Image for Linux/AMD64 ===" echo "=== Building Docker Image for Linux/AMD64 ==="

View file

@ -19,7 +19,7 @@
<aside class="sidebar"> <aside class="sidebar">
<div class="sidebar-header"> <div class="sidebar-header">
<div class="brand"> <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>
<div class="sidebar-header-actions"> <div class="sidebar-header-actions">
<button type="button" class="toolbar-info-btn info-icon-btn" data-popup-target="help" <button type="button" class="toolbar-info-btn info-icon-btn" data-popup-target="help"

View file

@ -137,16 +137,17 @@ def generate_image_whisk(prompt, cookie_str, **kwargs):
access_token = get_session_token(cookies) access_token = get_session_token(cookies)
def load_template_favorites(): reference_image_path = kwargs.get('reference_image_path')
path = get_config_path('gallery_favorites.json') # Typo in original? No, it uses gallery_favorites for both? Let's check logic. media_generation_id = None
# Ah, original code had a separate logic or file? if reference_image_path:
# Let me check the original code via view first to be safe. try:
# It seems there was no load_template_favorites definition in the previous view. media_generation_id = upload_reference_image(reference_image_path, cookies)
# I will replace the top of the file definitions if they exist there. except Exception as e:
pass logger.error(f"Failed to upload reference image: {e}")
# Fallback to Text-to-Image? Or fail?
# Retrying with correct strategy: replace the specific lines if I can find them. # If user wants reference, we should probably fail or warn.
# I'll view the file top to locate these helpers first. # For now, let's log and continue (media_generation_id will be None -> T2I)
pass
aspect_ratio_map = { aspect_ratio_map = {
"1:1": "IMAGE_ASPECT_RATIO_SQUARE", "1:1": "IMAGE_ASPECT_RATIO_SQUARE",