diff --git a/.gitattributes b/.gitattributes index 4953df946f829c76f6c5fa373edd63150f9f83d9..42a581ded5fee5857526f92cf5f4c6422de6baa3 100644 --- a/.gitattributes +++ b/.gitattributes @@ -172,3 +172,6 @@ backend/uploads/generated/5b6f11b554f74c5486ce33e390f8c75d.png filter=lfs diff=l backend/uploads/generated/836b20819d49430a9fc94c02e8e07885.png filter=lfs diff=lfs merge=lfs -text backend/uploads/generated/d664c83e3b614760834cdaad28769340.png filter=lfs diff=lfs merge=lfs -text backend/uploads/generated/dbd083972cf5430998885a9f7c36ac0a.png filter=lfs diff=lfs merge=lfs -text +backend/texturas/Texture_wpc_deck/DECK_gris.png filter=lfs diff=lfs merge=lfs -text +backend/texturas/Texture_wpc_deck/DECK_madera_oscuro.png filter=lfs diff=lfs merge=lfs -text +backend/texturas/Texture_wpc_deck/DECK_madera.png filter=lfs diff=lfs merge=lfs -text diff --git a/backend/.dockerignore b/backend/.dockerignore index ecd53e19e5e0b70620f5a6062e6a06d0ee0527ad..c297828decf7aeab21c8a3236076f0b13a39a483 100644 --- a/backend/.dockerignore +++ b/backend/.dockerignore @@ -1,6 +1,6 @@ -.venv/ -__pycache__/ -*.pyc -uploads/ -frontend/node_modules/ -frontend/dist/ +.venv/ +__pycache__/ +*.pyc +uploads/ +frontend/node_modules/ +frontend/dist/ diff --git a/backend/.gitignore b/backend/.gitignore index 64cf336708fa1a0223486f53b0c85792587aea65..cd07a5fd0062816e401518cdd239fa21ec66d166 100644 --- a/backend/.gitignore +++ b/backend/.gitignore @@ -1,33 +1,33 @@ -# Python -__pycache__/ -*.py[cod] -*.pyo -*.pyd -*.cover -*.egg-info/ -.eggs/ -*.egg -pip-log.txt -pip-delete-this-directory.txt -htmlcov/ -.tox/ -.coverage -.coverage.* -.cache -.pytest_cache/ -.pytest_cache -.env -venv/ -ENV/ -env/ -*.env - -# VS Code -.vscode/ - -# Python virtual environment -.venv/ - -# OS files -.DS_Store -Thumbs.db +# Python +__pycache__/ +*.py[cod] +*.pyo +*.pyd +*.cover +*.egg-info/ +.eggs/ +*.egg +pip-log.txt +pip-delete-this-directory.txt +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +.pytest_cache/ +.pytest_cache +.env +venv/ +ENV/ +env/ +*.env + +# VS Code +.vscode/ + +# Python virtual environment +.venv/ + +# OS files +.DS_Store +Thumbs.db diff --git a/backend/Dockerfile b/backend/Dockerfile index 47326e62ba843d2cf67b2380c965ca5d6661d6ba..f03669bb72d922dca6fdfb060378526853ff51ee 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -1,29 +1,29 @@ -FROM python:3.12-slim - -ENV PYTHONDONTWRITEBYTECODE=1 \ - PYTHONUNBUFFERED=1 \ - PIP_NO_CACHE_DIR=1 \ - PORT=8000 \ - HF_HUB_DISABLE_PROGRESS_BARS=0 - -WORKDIR /app - -RUN apt-get update \ - && apt-get install -y --no-install-recommends \ - git libglib2.0-0 libsm6 libxrender1 libxext6 libx11-6 libxcb1 libgl1 libgl1-mesa-dri \ - && rm -rf /var/lib/apt/lists/* - -COPY requirements.txt ./ -RUN python -m pip install --upgrade pip \ - && python -m pip install -r requirements.txt - -COPY . ./ - -RUN chmod +x entrypoint.sh - -# /app/models is mounted as a volume so the SAM2 checkpoint persists across restarts -VOLUME ["/app/models"] - -EXPOSE 8000 - -ENTRYPOINT ["./entrypoint.sh"] +FROM python:3.12-slim + +ENV PYTHONDONTWRITEBYTECODE=1 \ + PYTHONUNBUFFERED=1 \ + PIP_NO_CACHE_DIR=1 \ + PORT=8000 \ + HF_HUB_DISABLE_PROGRESS_BARS=0 + +WORKDIR /app + +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ + git libglib2.0-0 libsm6 libxrender1 libxext6 libx11-6 libxcb1 libgl1 libgl1-mesa-dri \ + && rm -rf /var/lib/apt/lists/* + +COPY requirements.txt ./ +RUN python -m pip install --upgrade pip \ + && python -m pip install -r requirements.txt + +COPY . ./ + +RUN chmod +x entrypoint.sh + +# /app/models is mounted as a volume so the SAM2 checkpoint persists across restarts +VOLUME ["/app/models"] + +EXPOSE 8000 + +ENTRYPOINT ["./entrypoint.sh"] diff --git a/backend/README.md b/backend/README.md index 652e52f20ba339698c86cdb4c991361e9454b709..7d5694407e1b06269515082549b62c0f76a2d740 100644 --- a/backend/README.md +++ b/backend/README.md @@ -1,192 +1,192 @@ -# Backend - PoC SaaS Iframe - -Este documento explica cómo funciona el backend del proyecto, qué endpoints ofrece y cómo se integra con el frontend React. - -## Propósito - -El backend sirve como: - -- API para autenticación con token, configuración y gestión de sesiones. -- servidor de archivos estáticos para el build de React en producción (`frontend/dist`). -- punto de entrada de administración, preview y experiencia embebida. -- watcher opcional que reconstruye el frontend cuando cambian los archivos fuente. - -## Estructura principal - -- `main.py` - servidor FastAPI principal. -- `requirements.txt` - dependencias Python. -- `run_server.bat` - helper para arrancar el backend con el virtual environment local. -- `.venv/` - entorno virtual Python del backend. -- `home.html`, `admin.html`, `preview.html` - páginas de apoyo. - -## Cómo ejecutar - -### Activar entorno virtual - -En Windows CMD: - -```cmd -cd /d C:\Users\alane\OneDrive\Escritorio\Prueba-PoC\backend -.venv\Scripts\activate -``` - -En PowerShell: - -```powershell -cd C:\Users\alane\OneDrive\Escritorio\Prueba-PoC\backend -.\.venv\Scripts\Activate.ps1 -``` - -### Instalar dependencias - -```cmd -pip install -r requirements.txt -``` - -### Ejecutar servidor - -```cmd -python -m uvicorn main:app --reload --host 0.0.0.0 --port 8000 -``` - -O usar el helper: - -```cmd -run_server.bat -``` - -## Comportamiento de producción - -En producción, el backend sirve el build de React desde `frontend/dist` en la ruta `/app`. - -- El HTML principal se carga en `/app` -- Los assets de Vite se sirven en `/app/assets/...` -- Si `frontend/dist/index.html` no existe, se devuelve un mensaje de error claro. - -## Endpoints principales - -### Páginas y visualización - -- `GET /` - `home.html` -- `GET /preview` - `preview.html` -- `GET /admin` - `admin.html` -- `GET /app` - React app estática servida desde `frontend/dist` -- `GET /widget.js` - script JS que inyecta un iframe con el visualizador -- `GET /health` - estado del backend y si el frontend build está listo - -### API de integración - -- `POST /api/token` - genera un token temporal para `client_id` -- `GET /config` - devuelve datos del cliente según `client_id` o `token` -- `POST /session/start` - marca la sesión como activa -- `GET /api/keys` - lista clientes registrados -- `POST /api/generate-key` - genera una nueva API key de cliente -- `GET /api/active-sessions` - muestra sesiones activas actuales - -## Lógica de token y cliente - -### Validación de token - -- Los tokens se guardan en memoria en `TOKENS` -- Cada token vence después de `TOKEN_TTL` segundos -- Si el token ha expirado, se devuelve `401` - -### Configuración del cliente - -- El diccionario `CLIENTS` contiene los clientes registrados por defecto -- Cada cliente tiene `nombre`, `color_primario` y `created_at` -- `POST /api/generate-key` agrega un nuevo cliente a `CLIENTS` - -## Seguridad y headers importantes - -El backend habilita: - -- CORS abierto (`allow_origins=["*"]`) para facilitar el desarrollo -- Eliminación de `x-frame-options` en todas las respuestas -- Agrega `Content-Security-Policy: frame-ancestors *` para permitir iframes - -## Watcher automático de frontend - -El backend también incluye un watcher que observa cambios en el frontend y ejecuta `npm run build` automáticamente. - -### Qué archivos vigila - -- `frontend/src/**/*.{ts,tsx,js,jsx,css,json,html}` -- `frontend/vite.config.ts` -- `frontend/package.json` -- `frontend/tsconfig.json` - -### Cómo funciona - -- Si el backend está ejecutándose, el watcher corre en un hilo daemon. -- Cuando detecta cambios, ejecuta `npm run build` en `frontend/`. -- El resultado actualiza `frontend/dist` para que `/app` sirva la versión nueva. - -### Requisitos del watcher - -- Necesitas tener `npm` instalado y accesible desde el PATH. -- El backend debe arrancarse desde el directorio raíz del proyecto. - -## Desarrollo y producción - -### Desarrollo - -- Para trabajar en el frontend con hot reload, usa el dev server de Vite: - -```cmd -cd /d C:\Users\alane\OneDrive\Escritorio\Prueba-PoC\frontend -npm run dev -``` - -- Abre `http://localhost:5173/app?token=...` - -### Producción / backend - -- Para servir el frontend estático desde el backend: - -```cmd -cd /d C:\Users\alane\OneDrive\Escritorio\Prueba-PoC\frontend -npm run build -``` - -- Luego carga `http://localhost:8000/app?token=...` - -## Integración con hyper-ferreteria - -Este backend puede montar la lógica de `hyper-ferreteria` en un prefijo alterno para evitar conflictos de rutas. - -- Se carga si la carpeta `../hyper-ferreteria` existe junto al directorio `Prueba-PoC`. -- La integración queda disponible en `http://localhost:8000/hf`. -- Las rutas internas de `hyper-ferreteria` se exponen como: - - `http://localhost:8000/hf/upload_async` - - `http://localhost:8000/hf/segment_guided` - - `http://localhost:8000/hf/analyze_scene` - - `http://localhost:8000/hf/apply_texture` - - `http://localhost:8000/hf/textures` - - `http://localhost:8000/hf/image/{filename}` - - `http://localhost:8000/hf/masks/{filename}` - - `http://localhost:8000/hf/ai/{filename}` - - y otras rutas de `hyper-ferreteria` con el prefijo `/hf` - -## Docker - -Se añadió soporte Docker al backend con un `Dockerfile` y `.dockerignore`. - -- El contenedor expone el puerto `8000`. -- El servicio arranca con `uvicorn main:app --host 0.0.0.0 --port 8000`. -- El `requirements.txt` del backend fue ampliado para incluir las dependencias de `hyper-ferreteria`. - -Para construir y correr: - -```cmd -cd /d C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend -docker build -t prueba-poc-backend . -docker run -p 8000:8000 prueba-poc-backend -``` - -## Notas para nuevos desarrolladores - -- El backend es el origen de verdad para la lógica de seguridad y sesiones. -- El frontend puede correr en modo dev para desarrollo rápido. -- En producción, el backend usa el build estático de React. -- Si un cambio en `frontend/src` no se refleja, revisa si estás usando `5173` (dev) o `8000` (backend+build). +# Backend - PoC SaaS Iframe + +Este documento explica cómo funciona el backend del proyecto, qué endpoints ofrece y cómo se integra con el frontend React. + +## Propósito + +El backend sirve como: + +- API para autenticación con token, configuración y gestión de sesiones. +- servidor de archivos estáticos para el build de React en producción (`frontend/dist`). +- punto de entrada de administración, preview y experiencia embebida. +- watcher opcional que reconstruye el frontend cuando cambian los archivos fuente. + +## Estructura principal + +- `main.py` - servidor FastAPI principal. +- `requirements.txt` - dependencias Python. +- `run_server.bat` - helper para arrancar el backend con el virtual environment local. +- `.venv/` - entorno virtual Python del backend. +- `home.html`, `admin.html`, `preview.html` - páginas de apoyo. + +## Cómo ejecutar + +### Activar entorno virtual + +En Windows CMD: + +```cmd +cd /d C:\Users\alane\OneDrive\Escritorio\Prueba-PoC\backend +.venv\Scripts\activate +``` + +En PowerShell: + +```powershell +cd C:\Users\alane\OneDrive\Escritorio\Prueba-PoC\backend +.\.venv\Scripts\Activate.ps1 +``` + +### Instalar dependencias + +```cmd +pip install -r requirements.txt +``` + +### Ejecutar servidor + +```cmd +python -m uvicorn main:app --reload --host 0.0.0.0 --port 8000 +``` + +O usar el helper: + +```cmd +run_server.bat +``` + +## Comportamiento de producción + +En producción, el backend sirve el build de React desde `frontend/dist` en la ruta `/app`. + +- El HTML principal se carga en `/app` +- Los assets de Vite se sirven en `/app/assets/...` +- Si `frontend/dist/index.html` no existe, se devuelve un mensaje de error claro. + +## Endpoints principales + +### Páginas y visualización + +- `GET /` - `home.html` +- `GET /preview` - `preview.html` +- `GET /admin` - `admin.html` +- `GET /app` - React app estática servida desde `frontend/dist` +- `GET /widget.js` - script JS que inyecta un iframe con el visualizador +- `GET /health` - estado del backend y si el frontend build está listo + +### API de integración + +- `POST /api/token` - genera un token temporal para `client_id` +- `GET /config` - devuelve datos del cliente según `client_id` o `token` +- `POST /session/start` - marca la sesión como activa +- `GET /api/keys` - lista clientes registrados +- `POST /api/generate-key` - genera una nueva API key de cliente +- `GET /api/active-sessions` - muestra sesiones activas actuales + +## Lógica de token y cliente + +### Validación de token + +- Los tokens se guardan en memoria en `TOKENS` +- Cada token vence después de `TOKEN_TTL` segundos +- Si el token ha expirado, se devuelve `401` + +### Configuración del cliente + +- El diccionario `CLIENTS` contiene los clientes registrados por defecto +- Cada cliente tiene `nombre`, `color_primario` y `created_at` +- `POST /api/generate-key` agrega un nuevo cliente a `CLIENTS` + +## Seguridad y headers importantes + +El backend habilita: + +- CORS abierto (`allow_origins=["*"]`) para facilitar el desarrollo +- Eliminación de `x-frame-options` en todas las respuestas +- Agrega `Content-Security-Policy: frame-ancestors *` para permitir iframes + +## Watcher automático de frontend + +El backend también incluye un watcher que observa cambios en el frontend y ejecuta `npm run build` automáticamente. + +### Qué archivos vigila + +- `frontend/src/**/*.{ts,tsx,js,jsx,css,json,html}` +- `frontend/vite.config.ts` +- `frontend/package.json` +- `frontend/tsconfig.json` + +### Cómo funciona + +- Si el backend está ejecutándose, el watcher corre en un hilo daemon. +- Cuando detecta cambios, ejecuta `npm run build` en `frontend/`. +- El resultado actualiza `frontend/dist` para que `/app` sirva la versión nueva. + +### Requisitos del watcher + +- Necesitas tener `npm` instalado y accesible desde el PATH. +- El backend debe arrancarse desde el directorio raíz del proyecto. + +## Desarrollo y producción + +### Desarrollo + +- Para trabajar en el frontend con hot reload, usa el dev server de Vite: + +```cmd +cd /d C:\Users\alane\OneDrive\Escritorio\Prueba-PoC\frontend +npm run dev +``` + +- Abre `http://localhost:5173/app?token=...` + +### Producción / backend + +- Para servir el frontend estático desde el backend: + +```cmd +cd /d C:\Users\alane\OneDrive\Escritorio\Prueba-PoC\frontend +npm run build +``` + +- Luego carga `http://localhost:8000/app?token=...` + +## Integración con hyper-ferreteria + +Este backend puede montar la lógica de `hyper-ferreteria` en un prefijo alterno para evitar conflictos de rutas. + +- Se carga si la carpeta `../hyper-ferreteria` existe junto al directorio `Prueba-PoC`. +- La integración queda disponible en `http://localhost:8000/hf`. +- Las rutas internas de `hyper-ferreteria` se exponen como: + - `http://localhost:8000/hf/upload_async` + - `http://localhost:8000/hf/segment_guided` + - `http://localhost:8000/hf/analyze_scene` + - `http://localhost:8000/hf/apply_texture` + - `http://localhost:8000/hf/textures` + - `http://localhost:8000/hf/image/{filename}` + - `http://localhost:8000/hf/masks/{filename}` + - `http://localhost:8000/hf/ai/{filename}` + - y otras rutas de `hyper-ferreteria` con el prefijo `/hf` + +## Docker + +Se añadió soporte Docker al backend con un `Dockerfile` y `.dockerignore`. + +- El contenedor expone el puerto `8000`. +- El servicio arranca con `uvicorn main:app --host 0.0.0.0 --port 8000`. +- El `requirements.txt` del backend fue ampliado para incluir las dependencias de `hyper-ferreteria`. + +Para construir y correr: + +```cmd +cd /d C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend +docker build -t prueba-poc-backend . +docker run -p 8000:8000 prueba-poc-backend +``` + +## Notas para nuevos desarrolladores + +- El backend es el origen de verdad para la lógica de seguridad y sesiones. +- El frontend puede correr en modo dev para desarrollo rápido. +- En producción, el backend usa el build estático de React. +- Si un cambio en `frontend/src` no se refleja, revisa si estás usando `5173` (dev) o `8000` (backend+build). diff --git a/backend/admin.html b/backend/admin.html index d6033f52cebe7b9e4d40631d65b90ef1d21f7814..042c0bf8823620d2d6f980f40c774ce49d919ec9 100644 --- a/backend/admin.html +++ b/backend/admin.html @@ -1,202 +1,202 @@ - - - - - - Panel de Control SaaS - - - -
-
-
-

Panel de Control SaaS

-

- Desde aquí puedes ver usuarios activos, generar nuevas API keys y - obtener el script de integración. -

-
-
- Vista previa - -
-
- -
-
-

Generar nueva API key

-
- - - -
-
- -
-

- Instrucciones de integración -

-

- El desarrollador debe insertar un contenedor y el script del widget - en su HTML: -

-
- -

- Reemplaza ID_UNICO_DEL_CLIENTE_001 por la API key - generada. -

-
-
- -
-
-

Clientes registrados

-
-
-
-

Usuarios activos

-
-
-
-
- - - - + + + + + + Panel de Control SaaS + + + +
+
+
+

Panel de Control SaaS

+

+ Desde aquí puedes ver usuarios activos, generar nuevas API keys y + obtener el script de integración. +

+
+
+ Vista previa + +
+
+ +
+
+

Generar nueva API key

+
+ + + +
+
+ +
+

+ Instrucciones de integración +

+

+ El desarrollador debe insertar un contenedor y el script del widget + en su HTML: +

+
+ +

+ Reemplaza ID_UNICO_DEL_CLIENTE_001 por la API key + generada. +

+
+
+ +
+
+

Clientes registrados

+
+
+
+

Usuarios activos

+
+
+
+
+ + + + diff --git a/backend/core/config.py b/backend/core/config.py index b68f5980d84d7567c7af9d67583eef8d94fe5132..042d330b6933c69fffee90bdb6c670dd01c457c0 100644 --- a/backend/core/config.py +++ b/backend/core/config.py @@ -1,92 +1,92 @@ -import logging -import os -import time -from datetime import datetime, timezone -from pathlib import Path - -BASE_DIR = Path(__file__).resolve().parent.parent - -UPLOAD_DIR = BASE_DIR / "uploads" -UPLOAD_DIR.mkdir(parents=True, exist_ok=True) - -VIDEO_UPLOAD_DIR = UPLOAD_DIR / "videos" -VIDEO_UPLOAD_DIR.mkdir(parents=True, exist_ok=True) - -OUTPUT_DIR = BASE_DIR / "outputs" -OUTPUT_DIR.mkdir(parents=True, exist_ok=True) - -VIDEO_OUTPUT_DIR = OUTPUT_DIR / "videos" -VIDEO_OUTPUT_DIR.mkdir(parents=True, exist_ok=True) - -TEXTURE_DIR = BASE_DIR / "texturas" -TEXTURE_DIR.mkdir(parents=True, exist_ok=True) - -LOG_DIR = BASE_DIR / "logs" -LOG_DIR.mkdir(exist_ok=True) - -TEMPLATES_DIR = BASE_DIR / "templates" -TEMPLATES_DIR.mkdir(parents=True, exist_ok=True) - -CLASSIC_DASHBOARD_HTML_PATH = TEMPLATES_DIR / "classic_dashboard.html" - -logging.basicConfig( - level=logging.INFO, - format="%(asctime)s %(levelname)s %(name)s: %(message)s", - handlers=[ - logging.FileHandler(LOG_DIR / "app.log", encoding="utf-8"), - logging.StreamHandler(), - ], -) -logger = logging.getLogger("backend.segmentation") - -SAM2_CONFIG_PATH = os.getenv("SAM2_CONFIG_PATH", "configs/sam2.1/sam2.1_hiera_l.yaml") -SAM2_MODEL_PATH = os.getenv("SAM2_MODEL_PATH") -SAM2_DEFAULT_MODEL_NAMES = ( - "sam2.1_hiera_large_fresh.pt", - "sam2.1_hiera_large.pt", - "sam2.1_hiera_large.pth", - "sam2_hiera_large.pt", -) -SAM2_MODEL_DIR_CANDIDATES = ("models", "modelo") -SAM2_UNLOAD_AFTER_USE = str(os.getenv("SAM2_UNLOAD_AFTER_USE", "0")).strip().lower() in {"1", "true", "yes"} -FRONTEND_DEBUG = str(os.getenv("FRONTEND_DEBUG", "0")).strip().lower() in {"1", "true", "yes", "on"} - -# URL del Space de Gradio GPU (principal). Si falla, se usa el CPU fallback. -# Local: http://localhost:7860 -# Producción: https://.hf.space -GRADIO_SPACE_URL: str = os.getenv("GRADIO_SPACE_URL", "").rstrip("/") - -# URL del Space de Gradio CPU (respaldo automático si el GPU falla o agota quota). -GRADIO_CPU_FALLBACK_URL: str = os.getenv("GRADIO_CPU_FALLBACK_URL", "").rstrip("/") - -MAX_UPLOAD_WIDTH = 1024 -UPLOAD_JPEG_QUALITY = 82 -SD_JOB_STALE_SECONDS = 120 -UPLOAD_JOB_STALE_SECONDS = 900 -UPLOAD_BASE_SECONDS = 8.0 -UPLOAD_SECONDS_PER_MEGAPIXEL = 70.0 -SD_QUICK_TIMEOUT_SECONDS = 15.0 - -SEMANTIC_MODEL_ID = "nvidia/segformer-b5-finetuned-ade-640-640" -DEPTH_MODEL_ID = "Intel/dpt-hybrid-midas" - - -def utc_now_iso() -> str: - return datetime.now(timezone.utc).isoformat() - - -def log_timing_start(step_name: str) -> float: - started = time.perf_counter() - logger.info(f"[{step_name}] START at {utc_now_iso()}") - return started - - -def log_timing_end(step_name: str, started: float) -> None: - elapsed = time.perf_counter() - started - logger.info(f"[{step_name}] DONE {elapsed:.3f}s at {utc_now_iso()}") - - -def load_classic_dashboard_html() -> str: - if not CLASSIC_DASHBOARD_HTML_PATH.exists() or not CLASSIC_DASHBOARD_HTML_PATH.is_file(): - raise RuntimeError(f"Dashboard HTML template not found: {CLASSIC_DASHBOARD_HTML_PATH}") - return CLASSIC_DASHBOARD_HTML_PATH.read_text(encoding="utf-8") +import logging +import os +import time +from datetime import datetime, timezone +from pathlib import Path + +BASE_DIR = Path(__file__).resolve().parent.parent + +UPLOAD_DIR = BASE_DIR / "uploads" +UPLOAD_DIR.mkdir(parents=True, exist_ok=True) + +VIDEO_UPLOAD_DIR = UPLOAD_DIR / "videos" +VIDEO_UPLOAD_DIR.mkdir(parents=True, exist_ok=True) + +OUTPUT_DIR = BASE_DIR / "outputs" +OUTPUT_DIR.mkdir(parents=True, exist_ok=True) + +VIDEO_OUTPUT_DIR = OUTPUT_DIR / "videos" +VIDEO_OUTPUT_DIR.mkdir(parents=True, exist_ok=True) + +TEXTURE_DIR = BASE_DIR / "texturas" +TEXTURE_DIR.mkdir(parents=True, exist_ok=True) + +LOG_DIR = BASE_DIR / "logs" +LOG_DIR.mkdir(exist_ok=True) + +TEMPLATES_DIR = BASE_DIR / "templates" +TEMPLATES_DIR.mkdir(parents=True, exist_ok=True) + +CLASSIC_DASHBOARD_HTML_PATH = TEMPLATES_DIR / "classic_dashboard.html" + +logging.basicConfig( + level=logging.INFO, + format="%(asctime)s %(levelname)s %(name)s: %(message)s", + handlers=[ + logging.FileHandler(LOG_DIR / "app.log", encoding="utf-8"), + logging.StreamHandler(), + ], +) +logger = logging.getLogger("backend.segmentation") + +SAM2_CONFIG_PATH = os.getenv("SAM2_CONFIG_PATH", "configs/sam2.1/sam2.1_hiera_l.yaml") +SAM2_MODEL_PATH = os.getenv("SAM2_MODEL_PATH") +SAM2_DEFAULT_MODEL_NAMES = ( + "sam2.1_hiera_large_fresh.pt", + "sam2.1_hiera_large.pt", + "sam2.1_hiera_large.pth", + "sam2_hiera_large.pt", +) +SAM2_MODEL_DIR_CANDIDATES = ("models", "modelo") +SAM2_UNLOAD_AFTER_USE = str(os.getenv("SAM2_UNLOAD_AFTER_USE", "0")).strip().lower() in {"1", "true", "yes"} +FRONTEND_DEBUG = str(os.getenv("FRONTEND_DEBUG", "0")).strip().lower() in {"1", "true", "yes", "on"} + +# URL del Space de Gradio GPU (principal). Si falla, se usa el CPU fallback. +# Local: http://localhost:7860 +# Producción: https://.hf.space +GRADIO_SPACE_URL: str = os.getenv("GRADIO_SPACE_URL", "").rstrip("/") + +# URL del Space de Gradio CPU (respaldo automático si el GPU falla o agota quota). +GRADIO_CPU_FALLBACK_URL: str = os.getenv("GRADIO_CPU_FALLBACK_URL", "").rstrip("/") + +MAX_UPLOAD_WIDTH = 1024 +UPLOAD_JPEG_QUALITY = 82 +SD_JOB_STALE_SECONDS = 120 +UPLOAD_JOB_STALE_SECONDS = 900 +UPLOAD_BASE_SECONDS = 8.0 +UPLOAD_SECONDS_PER_MEGAPIXEL = 70.0 +SD_QUICK_TIMEOUT_SECONDS = 15.0 + +SEMANTIC_MODEL_ID = "nvidia/segformer-b5-finetuned-ade-640-640" +DEPTH_MODEL_ID = "Intel/dpt-hybrid-midas" + + +def utc_now_iso() -> str: + return datetime.now(timezone.utc).isoformat() + + +def log_timing_start(step_name: str) -> float: + started = time.perf_counter() + logger.info(f"[{step_name}] START at {utc_now_iso()}") + return started + + +def log_timing_end(step_name: str, started: float) -> None: + elapsed = time.perf_counter() - started + logger.info(f"[{step_name}] DONE {elapsed:.3f}s at {utc_now_iso()}") + + +def load_classic_dashboard_html() -> str: + if not CLASSIC_DASHBOARD_HTML_PATH.exists() or not CLASSIC_DASHBOARD_HTML_PATH.is_file(): + raise RuntimeError(f"Dashboard HTML template not found: {CLASSIC_DASHBOARD_HTML_PATH}") + return CLASSIC_DASHBOARD_HTML_PATH.read_text(encoding="utf-8") diff --git a/backend/home.html b/backend/home.html index 208f040e1fdb5a29cb42614b737a12ad6a005e72..334e661bce929a170efdc2ba35c9e2fbe415df07 100644 --- a/backend/home.html +++ b/backend/home.html @@ -1,61 +1,61 @@ - - - - - - Home - SaaS Dev - - - -
-
-

Home de desarrollo

-

- Esta página es la landing principal para el equipo de desarrollo. - Desde aquí puedes acceder al panel administrador, la vista previa y al - app embebido. -

-
- - - -
-

Sugerencia

-

- Mover el app a /app y mantener / como - landing de desarrollo es una buena práctica. Así el servidor puede - servir contenido para el equipo sin confundirlo con la ruta del - producto embebido. -

-
-
- - + + + + + + Home - SaaS Dev + + + +
+
+

Home de desarrollo

+

+ Esta página es la landing principal para el equipo de desarrollo. + Desde aquí puedes acceder al panel administrador, la vista previa y al + app embebido. +

+
+ + + +
+

Sugerencia

+

+ Mover el app a /app y mantener / como + landing de desarrollo es una buena práctica. Así el servidor puede + servir contenido para el equipo sin confundirlo con la ruta del + producto embebido. +

+
+
+ + diff --git a/backend/logs/app.log b/backend/logs/app.log index 04000c174eb2e2d9cf6fd0b89d6894bce2c2ff0b..98d720fe46c0cd70a8c5b2bb7e589a41895d441a 100644 --- a/backend/logs/app.log +++ b/backend/logs/app.log @@ -1,5220 +1,2392 @@ -2026-04-29 20:12:40,375 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-04-29 20:13:22,434 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "69f2bac20e0544b45d45e6f1"}, "remainingTimeMS": 30} -2026-04-29 20:13:53,491 INFO backend.segmentation: [UPLOAD_BG] START at 2026-04-30T02:13:53.491443+00:00 -2026-04-29 20:13:53,492 INFO backend.segmentation: [JOB 667a8562af1044a6926d53449b625dd6] preparing_image progress=12 -2026-04-29 20:13:53,743 INFO backend.segmentation: [JOB 667a8562af1044a6926d53449b625dd6] segmenting_with_sam2 progress=30 estimated_seconds=51.939840000000004 -2026-04-29 20:13:56,153 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" -2026-04-29 20:13:56,625 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-04-29 20:13:56,675 WARNING services.gradio_client_service: Gradio Space call failed, falling back to local SAM2: Cannot find a function with `api_name`: /segment. -2026-04-29 20:13:56,675 INFO backend.segmentation: [SAM2_GENERATE] START at 2026-04-30T02:13:56.675848+00:00 -2026-04-29 20:13:56,687 INFO backend.segmentation: [SAM2] Mask generator not loaded; attempting on-demand load. -2026-04-29 20:13:56,687 WARNING backend.segmentation: [SAM2] torch not installed — SAM2 unavailable (using Gradio Space) -2026-04-29 20:13:56,687 ERROR backend.segmentation: [JOB 667a8562af1044a6926d53449b625dd6] failed: 500: torch not installed — SAM2 unavailable (using Gradio Space) -Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\image_service.py", line 145, in run_upload_job - label_map, mask_count = generate_label_map(image_rgb) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\scene_service.py", line 134, in generate_label_map - generator = get_sam2_mask_generator() - ^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\sam2_service.py", line 184, in get_sam2_mask_generator - raise HTTPException(status_code=500, detail=detail) -fastapi.exceptions.HTTPException: 500: torch not installed — SAM2 unavailable (using Gradio Space) -2026-04-29 20:13:56,689 INFO backend.segmentation: [UPLOAD_BG] DONE 3.196s at 2026-04-30T02:13:56.689353+00:00 -2026-04-29 20:13:56,689 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-04-29 20:13:57,044 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-04-29 20:13:57,163 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/68121945-8a97-442e-8cbb-59cd817f9df3 "HTTP/1.1 200 OK" -2026-04-29 20:16:38,951 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-04-29 20:16:55,032 INFO backend.segmentation: [UPLOAD_BG] START at 2026-04-30T02:16:55.032702+00:00 -2026-04-29 20:16:55,032 INFO backend.segmentation: [JOB 50d2907ecb844a3fafc2f8a5247620ea] preparing_image progress=12 -2026-04-29 20:16:55,089 INFO backend.segmentation: [JOB 50d2907ecb844a3fafc2f8a5247620ea] segmenting_with_sam2 progress=30 estimated_seconds=51.939840000000004 -2026-04-29 20:16:57,866 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-04-29 20:17:00,098 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-04-29 20:17:00,613 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-04-29 20:17:02,540 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/06d3302a-135c-423c-8294-e950bff0a17a "HTTP/1.1 200 OK" -2026-04-29 20:17:02,542 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-04-29 20:17:04,774 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-04-29 20:17:07,079 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=06d3302a-135c-423c-8294-e950bff0a17a "HTTP/1.1 200 OK" -2026-04-29 20:17:26,593 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\b17b68f6472ad2c6c0bb7499f231e242c50b344237d319bd3b45d56ef2d488aa\image.webp "HTTP/1.1 200 OK" -2026-04-29 20:17:26,607 INFO services.gradio_client_service: Gradio Space segmentation: entorno=🌳 Terraza / Patio / Jardín motor=Híbrido Arquitectura (Cityscapes Grande + DINO Pequeño) mask_count=20 -2026-04-29 20:17:26,607 INFO backend.segmentation: [JOB 50d2907ecb844a3fafc2f8a5247620ea] saving_masks progress=92 -2026-04-29 20:17:26,690 INFO backend.segmentation: [JOB 50d2907ecb844a3fafc2f8a5247620ea] segments_meta saved (20 segments) -2026-04-29 20:17:26,690 INFO backend.segmentation: [JOB 50d2907ecb844a3fafc2f8a5247620ea] done mask_count=20 -2026-04-29 20:17:26,691 INFO backend.segmentation: [UPLOAD_BG] DONE 31.658s at 2026-04-30T02:17:26.691033+00:00 -2026-04-29 20:17:26,691 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-04-29 20:17:45,867 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:17:45.867306+00:00 -2026-04-29 20:17:46,402 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\proyecto-White-Houses.jpg -2026-04-29 20:17:46,702 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.835s at 2026-04-30T02:17:46.702156+00:00 -2026-04-29 20:17:50,496 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:17:50.496976+00:00 -2026-04-29 20:17:50,819 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\proyecto-White-Houses.jpg -2026-04-29 20:17:50,985 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.488s at 2026-04-30T02:17:50.985122+00:00 -2026-04-29 20:17:54,307 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:17:54.307539+00:00 -2026-04-29 20:17:54,768 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\proyecto-White-Houses.jpg -2026-04-29 20:17:54,931 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.624s at 2026-04-30T02:17:54.931489+00:00 -2026-04-29 20:17:56,247 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:17:56.247254+00:00 -2026-04-29 20:17:56,728 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\proyecto-White-Houses.jpg -2026-04-29 20:17:56,898 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.651s at 2026-04-30T02:17:56.898353+00:00 -2026-04-29 20:18:00,146 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:18:00.146989+00:00 -2026-04-29 20:18:00,616 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\proyecto-White-Houses.jpg -2026-04-29 20:18:00,782 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.636s at 2026-04-30T02:18:00.782444+00:00 -2026-04-29 20:18:05,560 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:18:05.560412+00:00 -2026-04-29 20:18:06,116 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\proyecto-White-Houses.jpg -2026-04-29 20:18:06,272 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.712s at 2026-04-30T02:18:06.272748+00:00 -2026-04-29 20:18:11,868 INFO backend.segmentation: [UPLOAD_BG] START at 2026-04-30T02:18:11.868080+00:00 -2026-04-29 20:18:11,868 INFO backend.segmentation: [JOB 6897b1b65f7c4201ab0a5c35bf18b368] preparing_image progress=12 -2026-04-29 20:18:11,941 INFO backend.segmentation: [JOB 6897b1b65f7c4201ab0a5c35bf18b368] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 -2026-04-29 20:18:14,341 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-04-29 20:18:16,543 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-04-29 20:18:16,695 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-04-29 20:18:18,825 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/e332d34b-376c-4071-9631-656973e262a0 "HTTP/1.1 200 OK" -2026-04-29 20:18:18,828 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-04-29 20:18:21,032 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-04-29 20:18:23,304 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=e332d34b-376c-4071-9631-656973e262a0 "HTTP/1.1 200 OK" -2026-04-29 20:18:36,010 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\7b5a7a453887652d3284bb9eabe628e95982e15d5e0f16ff718d22beb5ed2a72\image.webp "HTTP/1.1 200 OK" -2026-04-29 20:18:36,020 INFO services.gradio_client_service: Gradio Space segmentation: entorno=🛁 Baño / Cocina motor=SegFormer (SegFormer ADE20K+ DINO) + SAM 2.1 mask_count=18 -2026-04-29 20:18:36,021 INFO backend.segmentation: [JOB 6897b1b65f7c4201ab0a5c35bf18b368] saving_masks progress=92 -2026-04-29 20:18:36,063 INFO backend.segmentation: [JOB 6897b1b65f7c4201ab0a5c35bf18b368] segments_meta saved (14 segments) -2026-04-29 20:18:36,063 INFO backend.segmentation: [JOB 6897b1b65f7c4201ab0a5c35bf18b368] done mask_count=18 -2026-04-29 20:18:36,063 INFO backend.segmentation: [UPLOAD_BG] DONE 24.195s at 2026-04-30T02:18:36.063054+00:00 -2026-04-29 20:18:36,063 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-04-29 20:18:44,885 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:18:44.885155+00:00 -2026-04-29 20:18:45,431 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-04-29 20:18:45,591 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.706s at 2026-04-30T02:18:45.591016+00:00 -2026-04-29 20:18:49,898 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:18:49.898853+00:00 -2026-04-29 20:18:50,427 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-04-29 20:18:50,573 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.674s at 2026-04-30T02:18:50.573101+00:00 -2026-04-29 20:18:52,643 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:18:52.643494+00:00 -2026-04-29 20:18:53,101 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-04-29 20:18:53,259 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.615s at 2026-04-30T02:18:53.259095+00:00 -2026-04-29 20:18:55,884 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:18:55.884791+00:00 -2026-04-29 20:18:56,336 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-04-29 20:18:56,483 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.599s at 2026-04-30T02:18:56.483159+00:00 -2026-04-29 20:18:58,689 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:18:58.689702+00:00 -2026-04-29 20:18:59,139 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-04-29 20:18:59,285 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.596s at 2026-04-30T02:18:59.285688+00:00 -2026-04-29 20:19:01,587 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:19:01.587113+00:00 -2026-04-29 20:19:02,057 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-04-29 20:19:02,202 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.616s at 2026-04-30T02:19:02.202912+00:00 -2026-04-29 20:19:08,881 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:19:08.881813+00:00 -2026-04-29 20:19:09,450 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-04-29 20:19:09,598 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.716s at 2026-04-30T02:19:09.598660+00:00 -2026-04-29 20:19:14,081 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:19:14.081047+00:00 -2026-04-29 20:19:14,613 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-04-29 20:19:14,765 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.684s at 2026-04-30T02:19:14.765513+00:00 -2026-04-29 20:19:20,588 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:19:20.588691+00:00 -2026-04-29 20:19:21,001 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-04-29 20:19:21,148 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.560s at 2026-04-30T02:19:21.148963+00:00 -2026-04-29 20:19:26,717 INFO backend.segmentation: [UPLOAD_BG] START at 2026-04-30T02:19:26.717015+00:00 -2026-04-29 20:19:26,717 INFO backend.segmentation: [JOB 0e77f0bbab294a828b0dbfbb826c3805] preparing_image progress=12 -2026-04-29 20:19:26,784 INFO backend.segmentation: [JOB 0e77f0bbab294a828b0dbfbb826c3805] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 -2026-04-29 20:19:29,222 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-04-29 20:19:31,597 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-04-29 20:19:31,734 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-04-29 20:19:34,073 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/19c5143b-64ec-4b5d-942b-098f7096a07d "HTTP/1.1 200 OK" -2026-04-29 20:19:34,076 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-04-29 20:19:36,338 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-04-29 20:19:38,618 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=19c5143b-64ec-4b5d-942b-098f7096a07d "HTTP/1.1 200 OK" -2026-04-29 20:19:50,817 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\627367a96ce0d7cea77d51e3b57be3a803ddd9b06e2c8a9547129f322756dd05\image.webp "HTTP/1.1 200 OK" -2026-04-29 20:19:50,828 INFO services.gradio_client_service: Gradio Space segmentation: entorno=🛁 Baño / Cocina motor=SegFormer (SegFormer ADE20K+ DINO) + SAM 2.1 mask_count=13 -2026-04-29 20:19:50,828 INFO backend.segmentation: [JOB 0e77f0bbab294a828b0dbfbb826c3805] saving_masks progress=92 -2026-04-29 20:19:50,860 INFO backend.segmentation: [JOB 0e77f0bbab294a828b0dbfbb826c3805] segments_meta saved (13 segments) -2026-04-29 20:19:50,861 INFO backend.segmentation: [JOB 0e77f0bbab294a828b0dbfbb826c3805] done mask_count=13 -2026-04-29 20:19:50,861 INFO backend.segmentation: [UPLOAD_BG] DONE 24.145s at 2026-04-30T02:19:50.861597+00:00 -2026-04-29 20:19:50,861 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-04-29 20:19:58,632 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:19:58.632422+00:00 -2026-04-29 20:19:58,950 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-04-29 20:19:59,096 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.464s at 2026-04-30T02:19:59.096073+00:00 -2026-04-29 20:20:03,025 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:20:03.025850+00:00 -2026-04-29 20:20:03,491 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-04-29 20:20:03,640 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.615s at 2026-04-30T02:20:03.640105+00:00 -2026-04-29 20:20:20,501 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:20:20.501928+00:00 -2026-04-29 20:20:21,076 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-04-29 20:20:21,227 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.727s at 2026-04-30T02:20:21.227737+00:00 -2026-04-29 20:20:28,266 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:20:28.266563+00:00 -2026-04-29 20:20:28,768 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-04-29 20:20:28,935 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.669s at 2026-04-30T02:20:28.935807+00:00 -2026-04-29 20:20:35,728 INFO backend.segmentation: [UPLOAD_BG] START at 2026-04-30T02:20:35.728058+00:00 -2026-04-29 20:20:35,729 INFO backend.segmentation: [JOB f44cfa950b0546ffbcd7fa090bad49db] preparing_image progress=12 -2026-04-29 20:20:35,790 INFO backend.segmentation: [JOB f44cfa950b0546ffbcd7fa090bad49db] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 -2026-04-29 20:20:38,252 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-04-29 20:20:40,610 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-04-29 20:20:40,810 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-04-29 20:20:43,106 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/31bdf8c4-3e85-4561-b055-cb540bff6222 "HTTP/1.1 200 OK" -2026-04-29 20:20:43,110 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-04-29 20:20:45,435 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-04-29 20:20:47,968 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=31bdf8c4-3e85-4561-b055-cb540bff6222 "HTTP/1.1 200 OK" -2026-04-29 20:21:09,199 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\de39b2da096587a3b0e0d7fb57541b12755192b377f4914a8047c40356bfbf4a\image.webp "HTTP/1.1 200 OK" -2026-04-29 20:21:09,216 INFO services.gradio_client_service: Gradio Space segmentation: entorno=🛁 Baño / Cocina motor=SegFormer (SegFormer ADE20K+ DINO) + SAM 2.1 mask_count=30 -2026-04-29 20:21:09,217 INFO backend.segmentation: [JOB f44cfa950b0546ffbcd7fa090bad49db] saving_masks progress=92 -2026-04-29 20:21:09,330 INFO backend.segmentation: [JOB f44cfa950b0546ffbcd7fa090bad49db] segments_meta saved (18 segments) -2026-04-29 20:21:09,330 INFO backend.segmentation: [JOB f44cfa950b0546ffbcd7fa090bad49db] done mask_count=30 -2026-04-29 20:21:09,331 INFO backend.segmentation: [UPLOAD_BG] DONE 33.603s at 2026-04-30T02:21:09.331315+00:00 -2026-04-29 20:21:09,331 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-04-29 20:21:19,563 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:21:19.563482+00:00 -2026-04-29 20:21:19,875 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-04-29 20:21:20,037 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.474s at 2026-04-30T02:21:20.037544+00:00 -2026-04-29 20:21:27,716 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:21:27.716717+00:00 -2026-04-29 20:21:28,240 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-04-29 20:21:28,388 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.671s at 2026-04-30T02:21:28.388007+00:00 -2026-04-29 20:21:33,770 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:21:33.770053+00:00 -2026-04-29 20:21:34,297 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-04-29 20:21:34,445 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.676s at 2026-04-30T02:21:34.445668+00:00 -2026-04-29 20:21:45,556 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:21:45.556315+00:00 -2026-04-29 20:21:46,063 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-04-29 20:21:46,214 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.658s at 2026-04-30T02:21:46.214366+00:00 -2026-04-29 20:21:54,885 INFO backend.segmentation: [UPLOAD_BG] START at 2026-04-30T02:21:54.885450+00:00 -2026-04-29 20:21:54,886 INFO backend.segmentation: [JOB ec618977b0b7478ca5d30d251fa15945] preparing_image progress=12 -2026-04-29 20:21:55,003 INFO backend.segmentation: [JOB ec618977b0b7478ca5d30d251fa15945] segmenting_with_sam2 progress=30 estimated_seconds=138.4576 -2026-04-29 20:21:57,389 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-04-29 20:21:59,757 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-04-29 20:21:59,891 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-04-29 20:22:02,312 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-04-29 20:22:02,322 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/3f8ed7a1-4b28-46c2-9e01-7e4358b38e76 "HTTP/1.1 200 OK" -2026-04-29 20:22:04,682 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-04-29 20:22:07,179 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=3f8ed7a1-4b28-46c2-9e01-7e4358b38e76 "HTTP/1.1 200 OK" -2026-04-29 20:22:33,186 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\80421cbcd599451a04044e3ece45f375843574c97db6199cd4e3f022f90b9311\image.webp "HTTP/1.1 200 OK" -2026-04-29 20:22:33,213 INFO services.gradio_client_service: Gradio Space segmentation: entorno=🛁 Baño / Cocina motor=SegFormer (SegFormer ADE20K+ DINO) + SAM 2.1 mask_count=16 -2026-04-29 20:22:33,214 INFO backend.segmentation: [JOB ec618977b0b7478ca5d30d251fa15945] saving_masks progress=92 -2026-04-29 20:22:33,419 INFO backend.segmentation: [JOB ec618977b0b7478ca5d30d251fa15945] segments_meta saved (16 segments) -2026-04-29 20:22:33,419 INFO backend.segmentation: [JOB ec618977b0b7478ca5d30d251fa15945] done mask_count=16 -2026-04-29 20:22:33,419 INFO backend.segmentation: [UPLOAD_BG] DONE 38.534s at 2026-04-30T02:22:33.419503+00:00 -2026-04-29 20:22:33,420 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-04-29 20:22:38,594 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:22:38.593824+00:00 -2026-04-29 20:22:38,977 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-04-29 20:22:39,402 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.808s at 2026-04-30T02:22:39.402689+00:00 -2026-04-29 20:22:44,189 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:22:44.189800+00:00 -2026-04-29 20:22:44,726 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-04-29 20:22:45,179 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.990s at 2026-04-30T02:22:45.179303+00:00 -2026-04-29 20:22:50,087 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:22:50.087424+00:00 -2026-04-29 20:22:50,751 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-04-29 20:22:51,466 INFO backend.segmentation: [APPLY_TEXTURE] DONE 1.379s at 2026-04-30T02:22:51.466435+00:00 -2026-04-29 20:26:39,065 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-04-29 20:26:39,964 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-04-29 20:33:56,025 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-04-29 20:34:02,828 INFO backend.segmentation: [UPLOAD_BG] START at 2026-04-30T02:34:02.828129+00:00 -2026-04-29 20:34:02,830 INFO backend.segmentation: [JOB ccecb5fbdf744d9eae57eb2b04e0af13] preparing_image progress=12 -2026-04-29 20:34:02,900 INFO backend.segmentation: [JOB ccecb5fbdf744d9eae57eb2b04e0af13] segmenting_with_sam2 progress=30 estimated_seconds=51.939840000000004 -2026-04-29 20:34:04,067 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" -2026-04-29 20:34:04,727 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-04-29 20:34:05,153 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-04-29 20:34:05,258 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/b306737b-bf28-4f02-8963-83b74032d449 "HTTP/1.1 200 OK" -2026-04-29 20:34:05,354 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" -2026-04-29 20:34:05,788 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-04-29 20:34:06,344 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/data?session_hash=b306737b-bf28-4f02-8963-83b74032d449 "HTTP/1.1 200 OK" -2026-04-29 20:34:24,624 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/file=/tmp/gradio/edcd82066c73a2359a9133192b4091c873fb9fca768c0f377a7a519aeb9f9b3a/image.webp "HTTP/1.1 200 OK" -2026-04-29 20:34:24,678 INFO services.gradio_client_service: Gradio Space segmentation: entorno=🌳 Terraza / Patio / Jardín motor=Híbrido Arquitectura (Cityscapes Grande + DINO Pequeño) mask_count=20 -2026-04-29 20:34:24,684 INFO backend.segmentation: [JOB ccecb5fbdf744d9eae57eb2b04e0af13] saving_masks progress=92 -2026-04-29 20:34:24,781 INFO backend.segmentation: [JOB ccecb5fbdf744d9eae57eb2b04e0af13] segments_meta saved (20 segments) -2026-04-29 20:34:24,782 INFO backend.segmentation: [JOB ccecb5fbdf744d9eae57eb2b04e0af13] done mask_count=20 -2026-04-29 20:34:24,782 INFO backend.segmentation: [UPLOAD_BG] DONE 21.955s at 2026-04-30T02:34:24.782746+00:00 -2026-04-29 20:34:24,783 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-04-29 20:34:27,987 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:34:27.987941+00:00 -2026-04-29 20:34:28,292 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\proyecto-White-Houses.jpg -2026-04-29 20:34:28,570 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.582s at 2026-04-30T02:34:28.570140+00:00 -2026-04-30 11:28:10,082 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=https://eduardo4547-hyper-reality-sam2-gpu.hf.space -2026-04-30 11:28:10,113 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-04-30 11:28:44,116 INFO backend.segmentation: [UPLOAD_BG] START at 2026-04-30T17:28:44.116002+00:00 -2026-04-30 11:28:44,117 INFO backend.segmentation: [JOB 9a15bbfe68f84bde8bdac60a8be4da9e] preparing_image progress=12 -2026-04-30 11:28:44,411 INFO backend.segmentation: [JOB 9a15bbfe68f84bde8bdac60a8be4da9e] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 -2026-04-30 11:28:44,411 INFO services.gradio_client_service: Calling GPU Gradio Space: https://eduardo4547-hyper-reality-sam2-gpu.hf.space -2026-04-30 11:28:47,099 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" -2026-04-30 11:28:47,585 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-04-30 11:28:48,272 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-04-30 11:28:48,363 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/7d7be152-f5b8-4924-8c4d-1a0b61711e8f "HTTP/1.1 200 OK" -2026-04-30 11:28:48,476 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" -2026-04-30 11:28:48,934 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-04-30 11:28:49,386 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/data?session_hash=7d7be152-f5b8-4924-8c4d-1a0b61711e8f "HTTP/1.1 200 OK" -2026-04-30 11:29:08,489 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/file=/tmp/gradio/d71a861910d02311782c5f826bb80cc1fd74d6f6086844534a04a02edf930180/image.webp "HTTP/1.1 200 OK" -2026-04-30 11:29:08,588 INFO services.gradio_client_service: Gradio Space segmentation: entorno=🛁 Baño / Cocina motor=SegFormer (SegFormer ADE20K+ DINO) + SAM 2.1 mask_count=18 -2026-04-30 11:29:08,590 INFO backend.segmentation: [JOB 9a15bbfe68f84bde8bdac60a8be4da9e] saving_masks progress=92 -2026-04-30 11:29:08,688 INFO backend.segmentation: [JOB 9a15bbfe68f84bde8bdac60a8be4da9e] segments_meta saved (14 segments) -2026-04-30 11:29:08,688 INFO backend.segmentation: [JOB 9a15bbfe68f84bde8bdac60a8be4da9e] done mask_count=18 -2026-04-30 11:29:08,689 INFO backend.segmentation: [UPLOAD_BG] DONE 24.573s at 2026-04-30T17:29:08.689489+00:00 -2026-04-30 11:29:08,689 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-04-30 11:34:31,212 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=https://eduardo4547-hyper-reality-sam2-gpu.hf.space -2026-04-30 11:34:31,227 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-04-30 11:35:20,079 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=https://eduardo4547-hyper-reality-sam2-gpu.hf.space -2026-04-30 11:35:20,093 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-04-30 11:35:28,226 INFO backend.segmentation: [UPLOAD_BG] START at 2026-04-30T17:35:28.226030+00:00 -2026-04-30 11:35:28,227 INFO backend.segmentation: [JOB 48baf3b40f2f45d190f44cd2761c709e] preparing_image progress=12 -2026-04-30 11:35:28,315 INFO backend.segmentation: [JOB 48baf3b40f2f45d190f44cd2761c709e] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 -2026-04-30 11:35:28,316 INFO services.gradio_client_service: Calling GPU Gradio Space: https://eduardo4547-hyper-reality-sam2-gpu.hf.space -2026-04-30 11:35:29,381 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" -2026-04-30 11:35:29,927 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-04-30 11:35:30,567 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-04-30 11:35:30,680 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/846ae43c-81a8-48af-97ee-8292d522cc64 "HTTP/1.1 200 OK" -2026-04-30 11:35:30,784 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" -2026-04-30 11:35:31,388 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-04-30 11:35:31,964 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/data?session_hash=846ae43c-81a8-48af-97ee-8292d522cc64 "HTTP/1.1 200 OK" -2026-04-30 11:35:43,682 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/file=/tmp/gradio/d71a861910d02311782c5f826bb80cc1fd74d6f6086844534a04a02edf930180/image.webp "HTTP/1.1 200 OK" -2026-04-30 11:35:43,788 INFO services.gradio_client_service: Gradio Space segmentation: entorno=🛁 Baño / Cocina motor=SegFormer (SegFormer ADE20K+ DINO) + SAM 2.1 mask_count=18 -2026-04-30 11:35:43,788 INFO backend.segmentation: [JOB 48baf3b40f2f45d190f44cd2761c709e] saving_masks progress=92 -2026-04-30 11:35:43,874 INFO backend.segmentation: [JOB 48baf3b40f2f45d190f44cd2761c709e] segments_meta saved (14 segments) -2026-04-30 11:35:43,875 INFO backend.segmentation: [JOB 48baf3b40f2f45d190f44cd2761c709e] done mask_count=18 -2026-04-30 11:35:43,875 INFO backend.segmentation: [UPLOAD_BG] DONE 15.650s at 2026-04-30T17:35:43.875230+00:00 -2026-04-30 11:35:43,876 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-04-30 11:37:18,311 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T17:37:18.311528+00:00 -2026-04-30 11:37:18,787 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-04-30 11:37:19,025 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.714s at 2026-04-30T17:37:19.025433+00:00 -2026-04-30 11:37:22,720 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T17:37:22.720207+00:00 -2026-04-30 11:37:23,223 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-04-30 11:37:23,371 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.651s at 2026-04-30T17:37:23.371172+00:00 -2026-04-30 11:37:27,040 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T17:37:27.040137+00:00 -2026-04-30 11:37:27,461 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-04-30 11:37:27,615 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.576s at 2026-04-30T17:37:27.615284+00:00 -2026-04-30 11:37:32,588 INFO backend.segmentation: [UPLOAD_BG] START at 2026-04-30T17:37:32.588150+00:00 -2026-04-30 11:37:32,589 INFO backend.segmentation: [JOB 5a04157791ee46708b9659b06abc01cd] preparing_image progress=12 -2026-04-30 11:37:32,652 INFO backend.segmentation: [JOB 5a04157791ee46708b9659b06abc01cd] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 -2026-04-30 11:37:32,653 INFO services.gradio_client_service: Calling GPU Gradio Space: https://eduardo4547-hyper-reality-sam2-gpu.hf.space -2026-04-30 11:37:33,265 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" -2026-04-30 11:37:33,854 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-04-30 11:37:34,045 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-04-30 11:37:34,638 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" -2026-04-30 11:37:35,300 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-04-30 11:37:35,353 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/f3fac27d-4abe-4757-a29c-4cc301d3c520 "HTTP/1.1 200 OK" -2026-04-30 11:37:35,860 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/data?session_hash=f3fac27d-4abe-4757-a29c-4cc301d3c520 "HTTP/1.1 200 OK" -2026-04-30 11:37:45,344 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/file=/tmp/gradio/525c342e2500d48137e90e793b9f3884aa3deedaa44ac6a6178e85433dde68ed/image.webp "HTTP/1.1 200 OK" -2026-04-30 11:37:45,399 INFO services.gradio_client_service: Gradio Space segmentation: entorno=🛁 Baño / Cocina motor=SegFormer (SegFormer ADE20K+ DINO) + SAM 2.1 mask_count=19 -2026-04-30 11:37:45,400 INFO backend.segmentation: [JOB 5a04157791ee46708b9659b06abc01cd] saving_masks progress=92 -2026-04-30 11:37:45,496 INFO backend.segmentation: [JOB 5a04157791ee46708b9659b06abc01cd] segments_meta saved (19 segments) -2026-04-30 11:37:45,496 INFO backend.segmentation: [JOB 5a04157791ee46708b9659b06abc01cd] done mask_count=19 -2026-04-30 11:37:45,497 INFO backend.segmentation: [UPLOAD_BG] DONE 12.909s at 2026-04-30T17:37:45.497768+00:00 -2026-04-30 11:37:45,497 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-04-30 11:37:51,411 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T17:37:51.411336+00:00 -2026-04-30 11:37:51,902 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-04-30 11:37:52,048 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.637s at 2026-04-30T17:37:52.048476+00:00 -2026-04-30 11:37:54,874 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T17:37:54.874358+00:00 -2026-04-30 11:37:55,381 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-04-30 11:37:55,525 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.652s at 2026-04-30T17:37:55.525845+00:00 -2026-04-30 11:37:59,388 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T17:37:59.388707+00:00 -2026-04-30 11:37:59,889 INFO backend.segmentation: [APPLY_TEXTURE] flat floor tiling (trap=0.05 < 0.35, skip perspective) -2026-04-30 11:37:59,903 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-04-30 11:38:00,058 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.670s at 2026-04-30T17:38:00.058226+00:00 -2026-04-30 11:38:04,419 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T17:38:04.419644+00:00 -2026-04-30 11:38:04,939 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-04-30 11:38:05,083 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.664s at 2026-04-30T17:38:05.083669+00:00 -2026-04-30 11:38:09,485 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T17:38:09.485185+00:00 -2026-04-30 11:38:10,004 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-04-30 11:38:10,164 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.679s at 2026-04-30T17:38:10.164696+00:00 -2026-04-30 11:38:14,863 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T17:38:14.863574+00:00 -2026-04-30 11:38:15,447 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-04-30 11:38:15,612 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.750s at 2026-04-30T17:38:15.612415+00:00 -2026-04-30 11:38:18,118 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T17:38:18.118131+00:00 -2026-04-30 11:38:18,776 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-04-30 11:38:18,995 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.879s at 2026-04-30T17:38:18.995927+00:00 -2026-04-30 11:38:22,037 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T17:38:22.037510+00:00 -2026-04-30 11:38:22,686 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-04-30 11:38:22,873 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.835s at 2026-04-30T17:38:22.873532+00:00 -2026-04-30 11:38:25,520 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T17:38:25.520184+00:00 -2026-04-30 11:38:26,145 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-04-30 11:38:26,334 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.815s at 2026-04-30T17:38:26.334641+00:00 -2026-04-30 11:38:28,140 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T17:38:28.140486+00:00 -2026-04-30 11:38:28,847 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-04-30 11:38:29,023 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.882s at 2026-04-30T17:38:29.023363+00:00 -2026-04-30 11:38:35,098 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T17:38:35.098342+00:00 -2026-04-30 11:38:35,824 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-04-30 11:38:36,028 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.930s at 2026-04-30T17:38:36.028300+00:00 -2026-04-30 11:41:41,140 INFO backend.segmentation: [UPLOAD_BG] START at 2026-04-30T17:41:41.140015+00:00 -2026-04-30 11:41:41,149 INFO backend.segmentation: [JOB a63a4a48e2114d2a8a8ce7342d8b8443] preparing_image progress=12 -2026-04-30 11:41:41,245 INFO backend.segmentation: [JOB a63a4a48e2114d2a8a8ce7342d8b8443] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 -2026-04-30 11:41:41,246 INFO services.gradio_client_service: Calling GPU Gradio Space: https://eduardo4547-hyper-reality-sam2-gpu.hf.space -2026-04-30 11:41:41,911 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" -2026-04-30 11:41:42,462 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-04-30 11:41:42,643 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-04-30 11:41:43,175 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/3aef8110-e818-4b0d-b6eb-ea6e1e3f6d26 "HTTP/1.1 200 OK" -2026-04-30 11:41:43,286 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" -2026-04-30 11:41:43,879 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-04-30 11:41:44,473 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/data?session_hash=3aef8110-e818-4b0d-b6eb-ea6e1e3f6d26 "HTTP/1.1 200 OK" -2026-04-30 11:41:54,142 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/file=/tmp/gradio/be028661dd9bac57589c50374ec81fba3f6d33d75c68656f138199c7ecd043d5/image.webp "HTTP/1.1 200 OK" -2026-04-30 11:41:54,248 INFO services.gradio_client_service: Gradio Space segmentation: entorno=🛁 Baño / Cocina motor=SegFormer (SegFormer ADE20K+ DINO) + SAM 2.1 mask_count=13 -2026-04-30 11:41:54,250 INFO backend.segmentation: [JOB a63a4a48e2114d2a8a8ce7342d8b8443] saving_masks progress=92 -2026-04-30 11:41:54,306 INFO backend.segmentation: [JOB a63a4a48e2114d2a8a8ce7342d8b8443] segments_meta saved (13 segments) -2026-04-30 11:41:54,307 INFO backend.segmentation: [JOB a63a4a48e2114d2a8a8ce7342d8b8443] done mask_count=13 -2026-04-30 11:41:54,307 INFO backend.segmentation: [UPLOAD_BG] DONE 13.167s at 2026-04-30T17:41:54.307037+00:00 -2026-04-30 11:41:54,308 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-04-30 11:43:18,472 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T17:43:18.472363+00:00 -2026-04-30 11:43:19,016 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-04-30 11:43:19,160 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.688s at 2026-04-30T17:43:19.160192+00:00 -2026-04-30 11:43:30,372 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T17:43:30.372475+00:00 -2026-04-30 11:43:30,954 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-04-30 11:43:31,098 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.727s at 2026-04-30T17:43:31.098668+00:00 -2026-04-30 11:47:34,143 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T17:47:34.143047+00:00 -2026-04-30 11:47:34,404 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-04-30 11:47:34,532 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.389s at 2026-04-30T17:47:34.532555+00:00 -2026-04-30 11:47:55,089 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T17:47:55.089325+00:00 -2026-04-30 11:47:55,583 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-04-30 11:47:55,730 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.641s at 2026-04-30T17:47:55.730378+00:00 -2026-04-30 12:04:38,148 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=https://eduardo4547-hyper-reality-sam2-gpu.hf.space -2026-04-30 12:04:38,173 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-04-30 12:09:38,204 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=https://eduardo4547-hyper-reality-sam2-gpu.hf.space -2026-04-30 12:09:38,219 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-04-30 12:13:52,707 INFO backend.segmentation: [UPLOAD_BG] START at 2026-04-30T18:13:52.707043+00:00 -2026-04-30 12:13:52,707 INFO backend.segmentation: [JOB 1df6118ebf3b4825b6acf36a62eb382b] preparing_image progress=12 -2026-04-30 12:13:52,799 INFO backend.segmentation: [JOB 1df6118ebf3b4825b6acf36a62eb382b] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 -2026-04-30 12:13:52,799 INFO services.gradio_client_service: Calling GPU Gradio Space: https://eduardo4547-hyper-reality-sam2-gpu.hf.space -2026-04-30 12:13:53,878 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" -2026-04-30 12:13:54,504 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-04-30 12:13:55,176 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-04-30 12:13:55,270 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/41cb0056-465a-425e-83c0-301658311ea8 "HTTP/1.1 200 OK" -2026-04-30 12:13:55,368 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" -2026-04-30 12:13:55,904 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-04-30 12:13:56,487 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/data?session_hash=41cb0056-465a-425e-83c0-301658311ea8 "HTTP/1.1 200 OK" -2026-04-30 12:14:07,019 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/file=/tmp/gradio/d71a861910d02311782c5f826bb80cc1fd74d6f6086844534a04a02edf930180/image.webp "HTTP/1.1 200 OK" -2026-04-30 12:14:07,128 INFO services.gradio_client_service: Gradio Space segmentation: entorno=🛁 Baño / Cocina motor=SegFormer (SegFormer ADE20K+ DINO) + SAM 2.1 mask_count=18 -2026-04-30 12:14:07,129 INFO backend.segmentation: [JOB 1df6118ebf3b4825b6acf36a62eb382b] saving_masks progress=92 -2026-04-30 12:14:07,214 INFO backend.segmentation: [JOB 1df6118ebf3b4825b6acf36a62eb382b] segments_meta saved (14 segments) -2026-04-30 12:14:07,214 INFO backend.segmentation: [JOB 1df6118ebf3b4825b6acf36a62eb382b] done mask_count=18 -2026-04-30 12:14:07,215 INFO backend.segmentation: [UPLOAD_BG] DONE 14.509s at 2026-04-30T18:14:07.215535+00:00 -2026-04-30 12:14:07,216 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-04-30 12:15:26,031 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T18:15:26.031154+00:00 -2026-04-30 12:15:26,320 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-04-30 12:15:26,583 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.552s at 2026-04-30T18:15:26.583372+00:00 -2026-04-30 12:15:31,474 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T18:15:31.474416+00:00 -2026-04-30 12:15:31,999 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-04-30 12:15:32,141 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.667s at 2026-04-30T18:15:32.141076+00:00 -2026-04-30 12:15:37,533 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T18:15:37.533421+00:00 -2026-04-30 12:15:38,003 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-04-30 12:15:38,148 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.615s at 2026-04-30T18:15:38.148131+00:00 -2026-04-30 12:15:43,112 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T18:15:43.112106+00:00 -2026-04-30 12:15:43,495 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-04-30 12:15:43,639 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.528s at 2026-04-30T18:15:43.639421+00:00 -2026-04-30 12:15:48,170 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T18:15:48.170441+00:00 -2026-04-30 12:15:48,545 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-04-30 12:15:48,688 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.518s at 2026-04-30T18:15:48.688355+00:00 -2026-04-30 12:21:38,766 INFO backend.segmentation: [UPLOAD_BG] START at 2026-04-30T18:21:38.766212+00:00 -2026-04-30 12:21:38,766 INFO backend.segmentation: [JOB b99cc22c206c4e0380d3b2fe2e24ffc6] preparing_image progress=12 -2026-04-30 12:21:38,838 INFO backend.segmentation: [JOB b99cc22c206c4e0380d3b2fe2e24ffc6] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 -2026-04-30 12:21:38,838 INFO services.gradio_client_service: Calling GPU Gradio Space: https://eduardo4547-hyper-reality-sam2-gpu.hf.space -2026-04-30 12:21:39,938 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" -2026-04-30 12:21:41,143 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-04-30 12:21:41,334 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-04-30 12:21:41,668 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/a637527a-5267-4a6e-acc0-e57a7de5119a "HTTP/1.1 200 OK" -2026-04-30 12:21:41,761 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" -2026-04-30 12:21:42,216 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-04-30 12:21:42,820 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/data?session_hash=a637527a-5267-4a6e-acc0-e57a7de5119a "HTTP/1.1 200 OK" -2026-04-30 12:21:50,974 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/file=/tmp/gradio/d71a861910d02311782c5f826bb80cc1fd74d6f6086844534a04a02edf930180/image.webp "HTTP/1.1 200 OK" -2026-04-30 12:21:51,074 INFO services.gradio_client_service: Gradio Space segmentation: entorno=🛁 Baño / Cocina motor=SegFormer (SegFormer ADE20K+ DINO) + SAM 2.1 mask_count=18 -2026-04-30 12:21:51,074 INFO backend.segmentation: [JOB b99cc22c206c4e0380d3b2fe2e24ffc6] saving_masks progress=92 -2026-04-30 12:21:51,145 INFO backend.segmentation: [JOB b99cc22c206c4e0380d3b2fe2e24ffc6] segments_meta saved (14 segments) -2026-04-30 12:21:51,146 INFO backend.segmentation: [JOB b99cc22c206c4e0380d3b2fe2e24ffc6] done mask_count=18 -2026-04-30 12:21:51,147 INFO backend.segmentation: [UPLOAD_BG] DONE 12.381s at 2026-04-30T18:21:51.147398+00:00 -2026-04-30 12:21:51,147 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-04-30 12:22:28,223 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T18:22:28.223162+00:00 -2026-04-30 12:22:28,488 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-04-30 12:22:28,633 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.410s at 2026-04-30T18:22:28.633219+00:00 -2026-04-30 12:23:38,541 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T18:23:38.541894+00:00 -2026-04-30 12:23:39,059 INFO backend.segmentation: [APPLY_TEXTURE] flat floor tiling (trap=0.28 < 0.35, skip perspective) -2026-04-30 12:23:39,078 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-04-30 12:23:39,224 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.682s at 2026-04-30T18:23:39.224901+00:00 -2026-04-30 12:23:47,739 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T18:23:47.739936+00:00 -2026-04-30 12:23:48,234 INFO backend.segmentation: [APPLY_TEXTURE] flat floor tiling (trap=0.29 < 0.35, skip perspective) -2026-04-30 12:23:48,249 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-04-30 12:23:48,393 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.654s at 2026-04-30T18:23:48.393543+00:00 -2026-04-30 12:35:04,237 INFO backend.segmentation: [UPLOAD_BG] START at 2026-04-30T18:35:04.237929+00:00 -2026-04-30 12:35:04,237 INFO backend.segmentation: [JOB 0e62f0415d394dc8b28fae3fdce6ac1d] preparing_image progress=12 -2026-04-30 12:35:04,252 INFO backend.segmentation: [JOB 0e62f0415d394dc8b28fae3fdce6ac1d] segmenting_with_sam2 progress=30 estimated_seconds=28.89164 -2026-04-30 12:35:04,252 INFO services.gradio_client_service: Calling GPU Gradio Space: https://eduardo4547-hyper-reality-sam2-gpu.hf.space -2026-04-30 12:35:04,919 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" -2026-04-30 12:35:05,542 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-04-30 12:35:05,767 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-04-30 12:35:06,228 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/e02fbff5-268c-40cf-bacf-e1c35bcf4346 "HTTP/1.1 200 OK" -2026-04-30 12:35:06,341 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" -2026-04-30 12:35:06,892 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-04-30 12:35:07,458 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/data?session_hash=e02fbff5-268c-40cf-bacf-e1c35bcf4346 "HTTP/1.1 200 OK" -2026-04-30 12:35:29,382 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/file=/tmp/gradio/75fa9ee4d8e3aa2f3926aa662e35acdfbaa3f94163e61a68527474a5a60675c3/image.webp "HTTP/1.1 200 OK" -2026-04-30 12:35:29,438 INFO services.gradio_client_service: Gradio Space segmentation: entorno=🏙️ Fachada / Exterior motor=Híbrido Arquitectura (Cityscapes Grande + DINO Pequeño) mask_count=12 -2026-04-30 12:35:29,439 INFO backend.segmentation: [JOB 0e62f0415d394dc8b28fae3fdce6ac1d] saving_masks progress=92 -2026-04-30 12:35:29,463 INFO backend.segmentation: [JOB 0e62f0415d394dc8b28fae3fdce6ac1d] segments_meta saved (11 segments) -2026-04-30 12:35:29,463 INFO backend.segmentation: [JOB 0e62f0415d394dc8b28fae3fdce6ac1d] done mask_count=12 -2026-04-30 12:35:29,463 INFO backend.segmentation: [UPLOAD_BG] DONE 25.226s at 2026-04-30T18:35:29.463948+00:00 -2026-04-30 12:35:29,464 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-04-30 15:39:34,392 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=https://eduardo4547-hyper-reality-sam2-gpu.hf.space -2026-04-30 15:39:34,422 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-04-30 15:40:07,782 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "69f3cc370fe929ed6cff073d"}, "remainingTimeMS": 30} -2026-04-30 15:40:18,856 INFO backend.segmentation: [UPLOAD_BG] START at 2026-04-30T21:40:18.856487+00:00 -2026-04-30 15:40:18,856 INFO backend.segmentation: [JOB 65636043fc364d5bba59fca718f4eb87] preparing_image progress=12 -2026-04-30 15:40:19,134 INFO backend.segmentation: [JOB 65636043fc364d5bba59fca718f4eb87] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 -2026-04-30 15:40:19,134 INFO services.gradio_client_service: Calling GPU Gradio Space: https://eduardo4547-hyper-reality-sam2-gpu.hf.space -2026-04-30 15:40:21,980 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" -2026-04-30 15:40:22,624 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-04-30 15:40:23,391 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-04-30 15:40:23,497 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/314c6a15-7cd5-4d38-88c5-58a08df1fad6 "HTTP/1.1 200 OK" -2026-04-30 15:40:23,607 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" -2026-04-30 15:40:24,238 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-04-30 15:40:24,860 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/data?session_hash=314c6a15-7cd5-4d38-88c5-58a08df1fad6 "HTTP/1.1 200 OK" -2026-04-30 15:40:33,216 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/file=/tmp/gradio/d71a861910d02311782c5f826bb80cc1fd74d6f6086844534a04a02edf930180/image.webp "HTTP/1.1 200 OK" -2026-04-30 15:40:33,324 INFO services.gradio_client_service: Gradio Space segmentation: entorno=🛁 Baño / Cocina motor=SegFormer (SegFormer ADE20K+ DINO) + SAM 2.1 mask_count=18 -2026-04-30 15:40:33,325 INFO backend.segmentation: [JOB 65636043fc364d5bba59fca718f4eb87] saving_masks progress=92 -2026-04-30 15:40:33,428 INFO backend.segmentation: [JOB 65636043fc364d5bba59fca718f4eb87] segments_meta saved (14 segments) -2026-04-30 15:40:33,428 INFO backend.segmentation: [JOB 65636043fc364d5bba59fca718f4eb87] done mask_count=18 -2026-04-30 15:40:33,429 INFO backend.segmentation: [UPLOAD_BG] DONE 14.573s at 2026-04-30T21:40:33.429138+00:00 -2026-04-30 15:40:33,429 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-04-30 15:40:38,479 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T21:40:38.479968+00:00 -2026-04-30 15:40:38,976 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-04-30 15:40:39,252 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.773s at 2026-04-30T21:40:39.252883+00:00 -2026-04-30 16:21:48,502 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T22:21:48.502651+00:00 -2026-04-30 16:21:49,012 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-04-30 16:21:49,158 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.656s at 2026-04-30T22:21:49.158351+00:00 -2026-05-06 18:02:51,635 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-06 18:02:51,663 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-06 18:03:05,661 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "69fbd6b9d024dc8e891e4555"}, "remainingTimeMS": 30} -2026-05-06 18:03:54,118 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T00:03:54.118398+00:00 -2026-05-06 18:03:54,119 INFO backend.segmentation: [JOB e0df636678f746dc9b2d4a29256ab769] preparing_image progress=12 -2026-05-06 18:03:54,441 INFO backend.segmentation: [JOB e0df636678f746dc9b2d4a29256ab769] segmenting_with_sam2 progress=30 estimated_seconds=63.05024 -2026-05-06 18:03:54,441 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 -2026-05-06 18:03:59,802 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-06 18:04:02,031 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-06 18:04:02,051 WARNING services.gradio_client_service: GPU Space failed (Cannot find a function with `api_name`: /segment.), trying CPU fallback... -2026-05-06 18:04:02,051 INFO services.gradio_client_service: Calling CPU fallback Space: http://localhost:7860 -2026-05-06 18:04:02,487 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-06 18:04:04,382 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-06 18:04:04,396 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/07a1a8b9-03be-4f34-9425-2b264489eb61 "HTTP/1.1 200 OK" -2026-05-06 18:04:06,807 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-06 18:04:06,810 ERROR backend.segmentation: [JOB e0df636678f746dc9b2d4a29256ab769] failed: cannot access local variable 'exc_gpu' where it is not associated with a value -Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 89, in segment_via_gradio_sync - return _call_gradio_sync(image_path, GRADIO_CPU_FALLBACK_URL) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 36, in _call_gradio_sync - _overlay_file, combined_json_str = client.predict( - ^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\.venv\Lib\site-packages\gradio_client\client.py", line 497, in predict - return self.submit( - ^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\.venv\Lib\site-packages\gradio_client\client.py", line 543, in submit - inferred_fn_index = self._infer_fn_index(api_name, fn_index) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\.venv\Lib\site-packages\gradio_client\client.py", line 881, in _infer_fn_index - raise ValueError(error_message) -ValueError: Cannot find a function with `api_name`: /segment. - -During handling of the above exception, another exception occurred: - -Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\image_service.py", line 137, in run_upload_job - label_map, mask_count = segment_via_gradio_sync(image_path) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 93, in segment_via_gradio_sync - f" GPU ({GRADIO_SPACE_URL}): {exc_gpu}\n" - ^^^^^^^ -UnboundLocalError: cannot access local variable 'exc_gpu' where it is not associated with a value -2026-05-06 18:04:06,834 INFO backend.segmentation: [UPLOAD_BG] DONE 12.716s at 2026-05-07T00:04:06.834047+00:00 -2026-05-06 18:04:06,838 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-06 18:04:06,884 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-06 18:04:09,275 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/04b260c2-1554-4cba-a89f-13976ed4ac4d "HTTP/1.1 200 OK" -2026-05-06 18:09:42,042 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-06 18:09:42,064 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-06 18:09:42,071 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T00:09:42.071378+00:00 -2026-05-06 18:09:42,076 INFO backend.segmentation: [JOB 45db3dde20444c6f97e1653fd7df1d17] preparing_image progress=12 -2026-05-06 18:09:42,120 INFO backend.segmentation: [JOB 45db3dde20444c6f97e1653fd7df1d17] segmenting_with_sam2 progress=30 estimated_seconds=63.05024 -2026-05-06 18:09:42,121 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 -2026-05-06 18:09:44,483 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-06 18:09:46,855 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-06 18:09:46,857 WARNING services.gradio_client_service: GPU Space failed (Cannot find a function with `api_name`: /segment.), trying CPU fallback... -2026-05-06 18:09:46,861 INFO services.gradio_client_service: Calling CPU fallback Space: http://localhost:7860 -2026-05-06 18:09:47,293 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-06 18:09:49,183 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/1780c9d0-ac88-47b0-b6c1-3cf40997667d "HTTP/1.1 200 OK" -2026-05-06 18:09:49,199 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-06 18:09:51,480 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-06 18:09:51,485 ERROR backend.segmentation: [JOB 45db3dde20444c6f97e1653fd7df1d17] failed: Both Gradio Spaces failed. - GPU (http://localhost:7860): Cannot find a function with `api_name`: /segment. - CPU (http://localhost:7860): Cannot find a function with `api_name`: /segment. -Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 91, in segment_via_gradio_sync - return _call_gradio_sync(image_path, GRADIO_CPU_FALLBACK_URL) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 36, in _call_gradio_sync - _overlay_file, combined_json_str = client.predict( - ^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\.venv\Lib\site-packages\gradio_client\client.py", line 497, in predict - return self.submit( - ^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\.venv\Lib\site-packages\gradio_client\client.py", line 543, in submit - inferred_fn_index = self._infer_fn_index(api_name, fn_index) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\.venv\Lib\site-packages\gradio_client\client.py", line 881, in _infer_fn_index - raise ValueError(error_message) -ValueError: Cannot find a function with `api_name`: /segment. - -The above exception was the direct cause of the following exception: - -Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\image_service.py", line 137, in run_upload_job - label_map, mask_count = segment_via_gradio_sync(image_path) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 93, in segment_via_gradio_sync - raise RuntimeError( -RuntimeError: Both Gradio Spaces failed. - GPU (http://localhost:7860): Cannot find a function with `api_name`: /segment. - CPU (http://localhost:7860): Cannot find a function with `api_name`: /segment. -2026-05-06 18:09:51,487 INFO backend.segmentation: [UPLOAD_BG] DONE 9.415s at 2026-05-07T00:09:51.487122+00:00 -2026-05-06 18:09:51,487 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-06 18:09:51,545 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-06 18:09:53,753 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/36233c91-f2f7-4ec1-9a12-3d21c85acebf "HTTP/1.1 200 OK" -2026-05-06 18:13:22,286 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T00:13:22.286531+00:00 -2026-05-06 18:13:22,286 INFO backend.segmentation: [JOB 1d0df1096d5f465b92fae7922f6f7018] preparing_image progress=12 -2026-05-06 18:13:22,361 INFO backend.segmentation: [JOB 1d0df1096d5f465b92fae7922f6f7018] segmenting_with_sam2 progress=30 estimated_seconds=63.05024 -2026-05-06 18:13:22,362 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 -2026-05-06 18:13:24,786 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-06 18:13:27,139 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-06 18:13:27,145 WARNING services.gradio_client_service: GPU Space failed (Cannot find a function with `api_name`: /segment.), trying CPU fallback... -2026-05-06 18:13:27,146 INFO services.gradio_client_service: Calling CPU fallback Space: http://localhost:7860 -2026-05-06 18:13:27,264 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-06 18:13:29,620 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/903b6662-21a9-407f-849d-a09f627bf22b "HTTP/1.1 200 OK" -2026-05-06 18:13:29,696 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-06 18:13:32,103 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-06 18:13:32,109 ERROR backend.segmentation: [JOB 1d0df1096d5f465b92fae7922f6f7018] failed: Both Gradio Spaces failed. - GPU (http://localhost:7860): Cannot find a function with `api_name`: /segment. - CPU (http://localhost:7860): Cannot find a function with `api_name`: /segment. -Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 91, in segment_via_gradio_sync - return _call_gradio_sync(image_path, GRADIO_CPU_FALLBACK_URL) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 36, in _call_gradio_sync - _overlay_file, combined_json_str = client.predict( - ^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\.venv\Lib\site-packages\gradio_client\client.py", line 497, in predict - return self.submit( - ^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\.venv\Lib\site-packages\gradio_client\client.py", line 543, in submit - inferred_fn_index = self._infer_fn_index(api_name, fn_index) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\.venv\Lib\site-packages\gradio_client\client.py", line 881, in _infer_fn_index - raise ValueError(error_message) -ValueError: Cannot find a function with `api_name`: /segment. - -The above exception was the direct cause of the following exception: - -Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\image_service.py", line 137, in run_upload_job - label_map, mask_count = segment_via_gradio_sync(image_path) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 93, in segment_via_gradio_sync - raise RuntimeError( -RuntimeError: Both Gradio Spaces failed. - GPU (http://localhost:7860): Cannot find a function with `api_name`: /segment. - CPU (http://localhost:7860): Cannot find a function with `api_name`: /segment. -2026-05-06 18:13:32,119 INFO backend.segmentation: [UPLOAD_BG] DONE 9.833s at 2026-05-07T00:13:32.119224+00:00 -2026-05-06 18:13:32,120 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-06 18:13:32,165 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-06 18:13:34,556 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/e4f38b15-d04a-41ee-bb91-06226b8fcbae "HTTP/1.1 200 OK" -2026-05-06 18:14:12,194 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-06 18:14:12,207 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-06 18:14:24,360 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T00:14:24.360597+00:00 -2026-05-06 18:14:24,360 INFO backend.segmentation: [JOB d0714cc4813c4ff5b969676107410712] preparing_image progress=12 -2026-05-06 18:14:24,496 INFO backend.segmentation: [JOB d0714cc4813c4ff5b969676107410712] segmenting_with_sam2 progress=30 estimated_seconds=63.05024 -2026-05-06 18:14:24,496 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 -2026-05-06 18:14:27,292 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-06 18:14:29,710 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-06 18:14:29,737 WARNING services.gradio_client_service: GPU Space failed (Cannot find a function with `api_name`: /segment.), trying CPU fallback... -2026-05-06 18:14:29,738 INFO services.gradio_client_service: Calling CPU fallback Space: http://localhost:7860 -2026-05-06 18:14:30,337 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-06 18:14:32,244 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/b1361a06-2ac6-4b8d-8a1c-79a0b653d2d4 "HTTP/1.1 200 OK" -2026-05-06 18:14:32,247 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-06 18:14:34,724 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-06 18:14:34,728 ERROR backend.segmentation: [JOB d0714cc4813c4ff5b969676107410712] failed: Both Gradio Spaces failed. - GPU (http://localhost:7860): Cannot find a function with `api_name`: /segment. - CPU (http://localhost:7860): Cannot find a function with `api_name`: /segment. -Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 91, in segment_via_gradio_sync - return _call_gradio_sync(image_path, GRADIO_CPU_FALLBACK_URL) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 36, in _call_gradio_sync - _overlay_file, combined_json_str = client.predict( - ^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\.venv\Lib\site-packages\gradio_client\client.py", line 497, in predict - return self.submit( - ^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\.venv\Lib\site-packages\gradio_client\client.py", line 543, in submit - inferred_fn_index = self._infer_fn_index(api_name, fn_index) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\.venv\Lib\site-packages\gradio_client\client.py", line 881, in _infer_fn_index - raise ValueError(error_message) -ValueError: Cannot find a function with `api_name`: /segment. - -The above exception was the direct cause of the following exception: - -Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\image_service.py", line 137, in run_upload_job - label_map, mask_count = segment_via_gradio_sync(image_path) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 93, in segment_via_gradio_sync - raise RuntimeError( -RuntimeError: Both Gradio Spaces failed. - GPU (http://localhost:7860): Cannot find a function with `api_name`: /segment. - CPU (http://localhost:7860): Cannot find a function with `api_name`: /segment. -2026-05-06 18:14:34,732 INFO backend.segmentation: [UPLOAD_BG] DONE 10.372s at 2026-05-07T00:14:34.731556+00:00 -2026-05-06 18:14:34,732 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-06 18:14:34,784 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-06 18:14:37,121 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/e7673631-cbf6-43a7-8391-415fae5fc0e9 "HTTP/1.1 200 OK" -2026-05-06 18:16:40,330 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-06 18:16:40,344 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-06 18:16:46,189 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T00:16:46.189444+00:00 -2026-05-06 18:16:46,189 INFO backend.segmentation: [JOB a0e5eea5ea454870abc22c495d503be4] preparing_image progress=12 -2026-05-06 18:16:46,293 INFO backend.segmentation: [JOB a0e5eea5ea454870abc22c495d503be4] segmenting_with_sam2 progress=30 estimated_seconds=63.05024 -2026-05-06 18:16:46,293 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 -2026-05-06 18:16:49,078 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-06 18:16:51,479 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-06 18:16:51,497 WARNING services.gradio_client_service: GPU Space failed (Cannot find a function with `api_name`: /segment.), trying CPU fallback... -2026-05-06 18:16:51,498 INFO services.gradio_client_service: Calling CPU fallback Space: http://localhost:7861 -2026-05-06 18:16:52,101 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-06 18:16:54,019 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/6b53345b-dde9-4c3f-9adc-6c494ed360ef "HTTP/1.1 200 OK" -2026-05-06 18:16:54,024 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" -2026-05-06 18:16:56,487 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-06 18:16:56,549 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-06 18:16:58,924 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/74fea2e0-6f0d-4dda-a138-a42ba84fc0aa "HTTP/1.1 200 OK" -2026-05-06 18:16:58,960 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-06 18:17:01,339 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-06 18:17:03,913 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=74fea2e0-6f0d-4dda-a138-a42ba84fc0aa "HTTP/1.1 200 OK" -2026-05-06 18:19:23,132 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\bdc55057e453f1e4793eccb7f3297d66322074e960cb173c3fcf63268faa1561\image.webp "HTTP/1.1 200 OK" -2026-05-06 18:19:23,155 INFO services.gradio_client_service: Gradio Space segmentation: entorno=🏙️ Fachada / Exterior motor=SAM Auto (Exteriores - Sin Prompts) mask_count=95 -2026-05-06 18:19:23,156 INFO backend.segmentation: [JOB a0e5eea5ea454870abc22c495d503be4] saving_masks progress=92 -2026-05-06 18:19:23,605 INFO backend.segmentation: [JOB a0e5eea5ea454870abc22c495d503be4] segments_meta saved (93 segments) -2026-05-06 18:19:23,607 INFO backend.segmentation: [JOB a0e5eea5ea454870abc22c495d503be4] done mask_count=95 -2026-05-06 18:19:23,607 INFO backend.segmentation: [UPLOAD_BG] DONE 157.419s at 2026-05-07T00:19:23.607772+00:00 -2026-05-06 18:19:23,607 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-06 18:19:34,201 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:19:34.200405+00:00 -2026-05-06 18:19:34,746 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-06 18:19:35,040 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.840s at 2026-05-07T00:19:35.040623+00:00 -2026-05-06 18:19:42,196 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:19:42.196103+00:00 -2026-05-06 18:19:42,742 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-06 18:19:42,974 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.779s at 2026-05-07T00:19:42.974981+00:00 -2026-05-06 18:19:47,421 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:19:47.421826+00:00 -2026-05-06 18:19:47,977 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-06 18:19:48,182 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.759s at 2026-05-07T00:19:48.182179+00:00 -2026-05-06 18:19:54,412 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:19:54.412542+00:00 -2026-05-06 18:19:54,866 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-06 18:19:55,074 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.662s at 2026-05-07T00:19:55.074817+00:00 -2026-05-06 18:19:57,905 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:19:57.905487+00:00 -2026-05-06 18:19:58,384 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-06 18:19:58,598 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.692s at 2026-05-07T00:19:58.598145+00:00 -2026-05-06 18:19:59,918 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:19:59.918562+00:00 -2026-05-06 18:20:00,391 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-06 18:20:00,605 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.687s at 2026-05-07T00:20:00.605635+00:00 -2026-05-06 18:20:01,887 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:20:01.887221+00:00 -2026-05-06 18:20:02,339 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-06 18:20:02,550 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.663s at 2026-05-07T00:20:02.550706+00:00 -2026-05-06 18:20:04,982 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:20:04.982372+00:00 -2026-05-06 18:20:05,541 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-06 18:20:05,754 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.772s at 2026-05-07T00:20:05.753433+00:00 -2026-05-06 18:20:09,130 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:20:09.130132+00:00 -2026-05-06 18:20:09,706 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-06 18:20:09,918 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.788s at 2026-05-07T00:20:09.918209+00:00 -2026-05-06 18:20:13,606 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:20:13.606190+00:00 -2026-05-06 18:20:14,202 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-06 18:20:14,419 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.813s at 2026-05-07T00:20:14.419193+00:00 -2026-05-06 18:20:24,188 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:20:24.188464+00:00 -2026-05-06 18:20:24,558 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-06 18:20:24,768 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.580s at 2026-05-07T00:20:24.768332+00:00 -2026-05-06 18:20:31,993 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:20:31.993128+00:00 -2026-05-06 18:20:32,461 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-06 18:20:32,660 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.667s at 2026-05-07T00:20:32.660620+00:00 -2026-05-06 18:20:39,799 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:20:39.799176+00:00 -2026-05-06 18:20:40,213 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-06 18:20:40,415 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.616s at 2026-05-07T00:20:40.415329+00:00 -2026-05-06 18:20:48,557 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:20:48.557775+00:00 -2026-05-06 18:20:48,957 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-06 18:20:49,152 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.594s at 2026-05-07T00:20:49.152442+00:00 -2026-05-06 18:20:51,499 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:20:51.499668+00:00 -2026-05-06 18:20:51,887 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-06 18:20:52,080 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.581s at 2026-05-07T00:20:52.080875+00:00 -2026-05-06 18:20:58,550 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:20:58.550802+00:00 -2026-05-06 18:20:58,974 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-06 18:20:59,172 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.621s at 2026-05-07T00:20:59.172097+00:00 -2026-05-06 18:21:05,475 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:21:05.475735+00:00 -2026-05-06 18:21:05,968 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-06 18:21:06,170 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.695s at 2026-05-07T00:21:06.170299+00:00 -2026-05-06 18:21:58,411 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:21:58.411200+00:00 -2026-05-06 18:21:58,922 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-06 18:21:59,122 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.711s at 2026-05-07T00:21:59.122602+00:00 -2026-05-06 18:22:03,353 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:22:03.353237+00:00 -2026-05-06 18:22:03,666 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-06 18:22:03,899 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.546s at 2026-05-07T00:22:03.899330+00:00 -2026-05-06 18:22:18,857 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:22:18.857782+00:00 -2026-05-06 18:22:19,152 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-06 18:22:19,352 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.495s at 2026-05-07T00:22:19.351744+00:00 -2026-05-06 18:22:33,242 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:22:33.241502+00:00 -2026-05-06 18:22:33,608 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-06 18:22:33,808 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.566s at 2026-05-07T00:22:33.808058+00:00 -2026-05-06 18:22:46,303 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:22:46.303027+00:00 -2026-05-06 18:22:46,613 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-06 18:22:46,820 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.517s at 2026-05-07T00:22:46.820104+00:00 -2026-05-06 18:22:53,994 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:22:53.994710+00:00 -2026-05-06 18:22:54,335 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-06 18:22:54,531 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.538s at 2026-05-07T00:22:54.531877+00:00 -2026-05-06 18:23:03,058 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:23:03.058568+00:00 -2026-05-06 18:23:03,713 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-06 18:23:03,917 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.859s at 2026-05-07T00:23:03.917765+00:00 -2026-05-06 18:23:13,406 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:23:13.406391+00:00 -2026-05-06 18:23:13,942 INFO backend.segmentation: [APPLY_TEXTURE] flat floor tiling (trap=0.00 < 0.35, skip perspective) -2026-05-06 18:23:13,967 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-06 18:23:14,176 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.771s at 2026-05-07T00:23:14.176983+00:00 -2026-05-06 18:23:56,519 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:23:56.519124+00:00 -2026-05-06 18:23:57,096 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-06 18:23:57,280 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.761s at 2026-05-07T00:23:57.280365+00:00 -2026-05-06 18:30:22,767 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-06 18:30:22,786 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-06 18:30:23,875 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-06 18:30:23,890 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-06 18:30:40,305 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-06 18:30:40,318 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-06 18:30:47,397 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T00:30:47.397798+00:00 -2026-05-06 18:30:47,398 INFO backend.segmentation: [JOB 37f6fc15168b48aea5bf3d353e1cd8bc] preparing_image progress=12 -2026-05-06 18:30:47,494 INFO backend.segmentation: [JOB 37f6fc15168b48aea5bf3d353e1cd8bc] segmenting_with_sam2 progress=30 estimated_seconds=63.05024 -2026-05-06 18:30:47,495 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 -2026-05-06 18:30:50,214 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-06 18:30:52,639 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-06 18:30:52,643 WARNING services.gradio_client_service: GPU Space failed (Cannot find a function with `api_name`: /segment.), trying CPU fallback... -2026-05-06 18:30:52,644 INFO services.gradio_client_service: Calling CPU fallback Space: http://localhost:7861 -2026-05-06 18:30:53,251 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-06 18:30:55,145 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" -2026-05-06 18:30:55,156 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/ecb9300c-1e9f-4a3b-9c4a-3263e97e0a30 "HTTP/1.1 200 OK" -2026-05-06 18:30:57,506 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-06 18:30:57,568 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-06 18:30:59,968 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/b5d0cc5e-3739-47c1-96d5-e2849a4fe991 "HTTP/1.1 200 OK" -2026-05-06 18:30:59,972 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-06 18:31:02,313 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-06 18:31:04,749 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=b5d0cc5e-3739-47c1-96d5-e2849a4fe991 "HTTP/1.1 200 OK" -2026-05-06 18:33:25,005 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\bdc55057e453f1e4793eccb7f3297d66322074e960cb173c3fcf63268faa1561\image.webp "HTTP/1.1 200 OK" -2026-05-06 18:33:25,027 INFO services.gradio_client_service: Gradio Space segmentation: entorno=🏙️ Fachada / Exterior motor=SAM Auto (Exteriores - Sin Prompts) mask_count=95 -2026-05-06 18:33:25,028 INFO backend.segmentation: [JOB 37f6fc15168b48aea5bf3d353e1cd8bc] saving_masks progress=92 -2026-05-06 18:33:25,352 INFO backend.segmentation: [JOB 37f6fc15168b48aea5bf3d353e1cd8bc] segments_meta saved (93 segments) -2026-05-06 18:33:25,353 INFO backend.segmentation: [JOB 37f6fc15168b48aea5bf3d353e1cd8bc] done mask_count=95 -2026-05-06 18:33:25,353 INFO backend.segmentation: [UPLOAD_BG] DONE 157.955s at 2026-05-07T00:33:25.353379+00:00 -2026-05-06 18:33:25,354 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-06 18:33:32,815 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:33:32.815130+00:00 -2026-05-06 18:33:33,172 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-06 18:33:33,554 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.739s at 2026-05-07T00:33:33.554031+00:00 -2026-05-06 18:33:36,147 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:33:36.147891+00:00 -2026-05-06 18:33:36,589 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.53, h_ratio=1.33) -2026-05-06 18:33:36,616 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-06 18:33:36,847 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.700s at 2026-05-07T00:33:36.847452+00:00 -2026-05-06 18:33:39,658 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:33:39.658618+00:00 -2026-05-06 18:33:40,173 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.53, h_ratio=1.33) -2026-05-06 18:33:40,198 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-06 18:33:40,445 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.787s at 2026-05-07T00:33:40.445326+00:00 -2026-05-06 18:33:42,787 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:33:42.787102+00:00 -2026-05-06 18:33:43,295 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-06 18:33:43,530 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.744s at 2026-05-07T00:33:43.530960+00:00 -2026-05-06 18:33:44,949 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:33:44.949548+00:00 -2026-05-06 18:33:45,490 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-06 18:33:45,716 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.768s at 2026-05-07T00:33:45.716664+00:00 -2026-05-06 18:33:53,000 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:33:53.000130+00:00 -2026-05-06 18:33:53,538 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-06 18:33:53,781 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.781s at 2026-05-07T00:33:53.781571+00:00 -2026-05-06 18:34:12,078 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:34:12.078767+00:00 -2026-05-06 18:34:12,759 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-06 18:34:12,996 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.918s at 2026-05-07T00:34:12.996206+00:00 -2026-05-06 18:34:25,880 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:34:25.880027+00:00 -2026-05-06 18:34:26,401 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-06 18:34:26,649 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.770s at 2026-05-07T00:34:26.649818+00:00 -2026-05-06 18:34:33,573 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:34:33.572267+00:00 -2026-05-06 18:34:33,888 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-06 18:34:34,124 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.551s at 2026-05-07T00:34:34.124108+00:00 -2026-05-06 18:34:38,104 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:34:38.104579+00:00 -2026-05-06 18:34:38,547 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-06 18:34:38,781 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.677s at 2026-05-07T00:34:38.781767+00:00 -2026-05-06 18:34:43,958 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:34:43.958224+00:00 -2026-05-06 18:34:44,396 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.53, h_ratio=1.33) -2026-05-06 18:34:44,422 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-06 18:34:44,657 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.700s at 2026-05-07T00:34:44.657499+00:00 -2026-05-06 18:34:50,537 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:34:50.537840+00:00 -2026-05-06 18:34:50,991 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=2.50, h_ratio=1.82) -2026-05-06 18:34:51,019 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-06 18:34:51,263 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.725s at 2026-05-07T00:34:51.263124+00:00 -2026-05-06 18:34:56,797 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:34:56.797730+00:00 -2026-05-06 18:34:57,208 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-06 18:34:57,462 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.666s at 2026-05-07T00:34:57.462972+00:00 -2026-05-06 18:35:00,689 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:35:00.689108+00:00 -2026-05-06 18:35:01,074 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-06 18:35:01,329 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.641s at 2026-05-07T00:35:01.329788+00:00 -2026-05-06 18:35:02,869 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:35:02.869035+00:00 -2026-05-06 18:35:03,292 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.01, h_ratio=1.45) -2026-05-06 18:35:03,313 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-06 18:35:03,548 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.679s at 2026-05-07T00:35:03.548094+00:00 -2026-05-06 18:35:09,675 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:35:09.675245+00:00 -2026-05-06 18:35:10,176 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.21, h_ratio=1.01) -2026-05-06 18:35:10,210 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-06 18:35:10,449 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.775s at 2026-05-07T00:35:10.449920+00:00 -2026-05-06 18:35:57,783 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:35:57.783409+00:00 -2026-05-06 18:35:58,342 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.53, h_ratio=1.33) -2026-05-06 18:35:58,368 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-06 18:35:58,597 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.814s at 2026-05-07T00:35:58.597593+00:00 -2026-05-06 18:36:05,048 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:36:05.048300+00:00 -2026-05-06 18:36:05,424 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.53, h_ratio=1.33) -2026-05-06 18:36:05,446 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-06 18:36:05,683 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.635s at 2026-05-07T00:36:05.683990+00:00 -2026-05-06 18:36:09,348 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:36:09.348934+00:00 -2026-05-06 18:36:09,689 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-06 18:36:09,939 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.591s at 2026-05-07T00:36:09.939262+00:00 -2026-05-06 18:36:11,515 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:36:11.515772+00:00 -2026-05-06 18:36:11,864 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-06 18:36:12,115 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.600s at 2026-05-07T00:36:12.115522+00:00 -2026-05-06 18:36:14,119 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:36:14.119433+00:00 -2026-05-06 18:36:14,467 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-06 18:36:14,703 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.583s at 2026-05-07T00:36:14.703339+00:00 -2026-05-06 18:36:17,955 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:36:17.955143+00:00 -2026-05-06 18:36:18,323 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=2.50, h_ratio=1.82) -2026-05-06 18:36:18,346 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-06 18:36:18,587 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.632s at 2026-05-07T00:36:18.587038+00:00 -2026-05-06 18:36:29,722 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:36:29.722755+00:00 -2026-05-06 18:36:30,041 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.21, h_ratio=1.01) -2026-05-06 18:36:30,075 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-06 18:36:30,316 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.595s at 2026-05-07T00:36:30.316931+00:00 -2026-05-06 18:36:55,258 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:36:55.258246+00:00 -2026-05-06 18:36:55,839 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.21, h_ratio=1.01) -2026-05-06 18:36:55,875 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-06 18:36:56,125 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.867s at 2026-05-07T00:36:56.124977+00:00 -2026-05-06 18:36:59,138 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:36:59.138564+00:00 -2026-05-06 18:36:59,725 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.01, h_ratio=1.45) -2026-05-06 18:36:59,750 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-06 18:36:59,984 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.846s at 2026-05-07T00:36:59.984763+00:00 -2026-05-06 18:37:16,745 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T00:37:16.745961+00:00 -2026-05-06 18:37:16,745 INFO backend.segmentation: [JOB 884dbcda1cef4f96803a35b3a89b9c60] preparing_image progress=12 -2026-05-06 18:37:16,797 INFO backend.segmentation: [JOB 884dbcda1cef4f96803a35b3a89b9c60] segmenting_with_sam2 progress=30 estimated_seconds=94.01599999999999 -2026-05-06 18:37:16,798 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 -2026-05-06 18:37:19,202 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-06 18:37:21,617 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-06 18:37:21,620 WARNING services.gradio_client_service: GPU Space failed (Cannot find a function with `api_name`: /segment.), trying CPU fallback... -2026-05-06 18:37:21,623 INFO services.gradio_client_service: Calling CPU fallback Space: http://localhost:7861 -2026-05-06 18:37:21,755 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-06 18:37:24,077 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/09adaa1b-fd4b-4053-96e7-e3e0b7cb26b3 "HTTP/1.1 200 OK" -2026-05-06 18:37:24,081 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" -2026-05-06 18:37:26,501 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-06 18:37:26,560 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-06 18:37:28,941 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/450ca127-bb6f-4e37-b304-d51b440a9dbd "HTTP/1.1 200 OK" -2026-05-06 18:37:28,947 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-06 18:37:31,443 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-06 18:37:33,986 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=450ca127-bb6f-4e37-b304-d51b440a9dbd "HTTP/1.1 200 OK" -2026-05-06 18:39:54,826 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\8fee556ace9ab88dababff8e3183ddda34f5b57dd22cd0c9c4270241d97fe1a7\image.webp "HTTP/1.1 200 OK" -2026-05-06 18:39:54,847 INFO services.gradio_client_service: Gradio Space segmentation: entorno=🏙️ Fachada / Exterior motor=SAM Auto (Exteriores - Sin Prompts) mask_count=91 -2026-05-06 18:39:54,847 INFO backend.segmentation: [JOB 884dbcda1cef4f96803a35b3a89b9c60] saving_masks progress=92 -2026-05-06 18:39:55,291 INFO backend.segmentation: [JOB 884dbcda1cef4f96803a35b3a89b9c60] segments_meta saved (90 segments) -2026-05-06 18:39:55,291 INFO backend.segmentation: [JOB 884dbcda1cef4f96803a35b3a89b9c60] done mask_count=91 -2026-05-06 18:39:55,292 INFO backend.segmentation: [UPLOAD_BG] DONE 158.546s at 2026-05-07T00:39:55.291225+00:00 -2026-05-06 18:39:55,292 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-06 18:40:28,080 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:40:28.080549+00:00 -2026-05-06 18:40:28,641 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm azul.jpg -2026-05-06 18:40:29,060 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.980s at 2026-05-07T00:40:29.060020+00:00 -2026-05-06 18:40:37,726 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:40:37.726439+00:00 -2026-05-06 18:40:38,269 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm azul.jpg -2026-05-06 18:40:38,656 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.930s at 2026-05-07T00:40:38.656587+00:00 -2026-05-06 18:40:41,361 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:40:41.361471+00:00 -2026-05-06 18:40:41,870 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm azul.jpg -2026-05-06 18:40:42,256 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.895s at 2026-05-07T00:40:42.255570+00:00 -2026-05-06 18:40:50,492 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:40:50.492837+00:00 -2026-05-06 18:40:51,018 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm azul.jpg -2026-05-06 18:40:51,365 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.872s at 2026-05-07T00:40:51.364239+00:00 -2026-05-06 18:40:53,275 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:40:53.275769+00:00 -2026-05-06 18:40:53,826 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm azul.jpg -2026-05-06 18:40:54,179 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.905s at 2026-05-07T00:40:54.179973+00:00 -2026-05-06 18:41:02,123 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:41:02.123703+00:00 -2026-05-06 18:41:02,497 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm azul.jpg -2026-05-06 18:41:02,880 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.756s at 2026-05-07T00:41:02.880196+00:00 -2026-05-06 18:41:13,602 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:41:13.602484+00:00 -2026-05-06 18:41:14,055 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm azul.jpg -2026-05-06 18:41:14,428 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.827s at 2026-05-07T00:41:14.428892+00:00 -2026-05-06 18:41:19,676 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:41:19.676717+00:00 -2026-05-06 18:41:20,113 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm azul.jpg -2026-05-06 18:41:20,484 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.808s at 2026-05-07T00:41:20.484587+00:00 -2026-05-06 18:41:28,383 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:41:28.383560+00:00 -2026-05-06 18:41:28,729 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm azul.jpg -2026-05-06 18:41:29,136 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.752s at 2026-05-07T00:41:29.136269+00:00 -2026-05-06 18:42:20,651 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T00:42:20.651898+00:00 -2026-05-06 18:42:20,652 INFO backend.segmentation: [JOB f7c2c35798df4443b6954b52ae0e50c7] preparing_image progress=12 -2026-05-06 18:42:20,720 INFO backend.segmentation: [JOB f7c2c35798df4443b6954b52ae0e50c7] segmenting_with_sam2 progress=30 estimated_seconds=58.39104 -2026-05-06 18:42:20,722 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 -2026-05-06 18:42:23,169 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-06 18:42:25,513 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-06 18:42:25,518 WARNING services.gradio_client_service: GPU Space failed (Cannot find a function with `api_name`: /segment.), trying CPU fallback... -2026-05-06 18:42:25,523 INFO services.gradio_client_service: Calling CPU fallback Space: http://localhost:7861 -2026-05-06 18:42:25,648 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-06 18:42:27,979 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" -2026-05-06 18:42:28,011 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/eff4d6f4-a526-4e3c-885b-21716e034b5b "HTTP/1.1 200 OK" -2026-05-06 18:42:30,320 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-06 18:42:30,384 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-06 18:42:32,775 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/bb6c3136-6f1c-4623-bf35-86865beea318 "HTTP/1.1 200 OK" -2026-05-06 18:42:32,825 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-06 18:42:35,212 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-06 18:42:37,701 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=bb6c3136-6f1c-4623-bf35-86865beea318 "HTTP/1.1 200 OK" -2026-05-06 18:43:12,742 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\bd5cc89cdf220f59a58e54c17de42ccd2fe478787be6fafda37778eaf1d6f8c0\image.webp "HTTP/1.1 200 OK" -2026-05-06 18:43:12,768 INFO services.gradio_client_service: Gradio Space segmentation: entorno=🛋️ Interiores (Sala / Cuartos) motor=SegFormer (SegFormer ADE20K+ DINO) + SAM 2.1 mask_count=15 -2026-05-06 18:43:12,768 INFO backend.segmentation: [JOB f7c2c35798df4443b6954b52ae0e50c7] saving_masks progress=92 -2026-05-06 18:43:12,827 INFO backend.segmentation: [JOB f7c2c35798df4443b6954b52ae0e50c7] segments_meta saved (9 segments) -2026-05-06 18:43:12,828 INFO backend.segmentation: [JOB f7c2c35798df4443b6954b52ae0e50c7] done mask_count=15 -2026-05-06 18:43:12,828 INFO backend.segmentation: [UPLOAD_BG] DONE 52.177s at 2026-05-07T00:43:12.828557+00:00 -2026-05-06 18:43:12,829 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-06 18:43:24,334 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:43:24.334962+00:00 -2026-05-06 18:43:24,892 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.41.58.jpg -2026-05-06 18:43:25,127 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.792s at 2026-05-07T00:43:25.127393+00:00 -2026-05-06 18:45:52,139 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:45:52.139300+00:00 -2026-05-06 18:45:52,631 INFO backend.segmentation: [APPLY_TEXTURE] flat floor tiling (trap=0.00 < 0.35, skip perspective) -2026-05-06 18:45:52,652 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.41.58.jpg -2026-05-06 18:45:52,934 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.795s at 2026-05-07T00:45:52.934786+00:00 -2026-05-06 18:48:05,742 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T00:48:05.742257+00:00 -2026-05-06 18:48:05,742 INFO backend.segmentation: [JOB 6b7b7b29836840008fe1b69188169fdd] preparing_image progress=12 -2026-05-06 18:48:05,805 INFO backend.segmentation: [JOB 6b7b7b29836840008fe1b69188169fdd] segmenting_with_sam2 progress=30 estimated_seconds=58.39104 -2026-05-06 18:48:05,806 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 -2026-05-06 18:48:08,161 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-06 18:48:10,524 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-06 18:48:10,528 WARNING services.gradio_client_service: GPU Space failed (Cannot find a function with `api_name`: /segment.), trying CPU fallback... -2026-05-06 18:48:10,529 INFO services.gradio_client_service: Calling CPU fallback Space: http://localhost:7861 -2026-05-06 18:48:10,657 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-06 18:48:12,980 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/7be43e9c-5bea-422d-bb06-60720d9880bf "HTTP/1.1 200 OK" -2026-05-06 18:48:12,981 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" -2026-05-06 18:48:15,268 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-06 18:48:15,340 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-06 18:48:17,721 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/562af56b-498c-4c62-9020-b784b3cd3643 "HTTP/1.1 200 OK" -2026-05-06 18:48:17,756 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-06 18:48:20,089 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-06 18:48:22,469 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=562af56b-498c-4c62-9020-b784b3cd3643 "HTTP/1.1 200 OK" -2026-05-06 18:50:33,287 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\307e144a6a358b2b31461825d5a83d98d89d0a4426bbff036b53a58abbce6a7f\image.webp "HTTP/1.1 200 OK" -2026-05-06 18:50:33,299 INFO services.gradio_client_service: Gradio Space segmentation: entorno=auto motor=SAM Auto (Exteriores - Sin Prompts) mask_count=75 -2026-05-06 18:50:33,301 INFO backend.segmentation: [JOB 6b7b7b29836840008fe1b69188169fdd] saving_masks progress=92 -2026-05-06 18:50:33,531 INFO backend.segmentation: [JOB 6b7b7b29836840008fe1b69188169fdd] segments_meta saved (65 segments) -2026-05-06 18:50:33,534 INFO backend.segmentation: [JOB 6b7b7b29836840008fe1b69188169fdd] done mask_count=75 -2026-05-06 18:50:33,534 INFO backend.segmentation: [UPLOAD_BG] DONE 147.793s at 2026-05-07T00:50:33.534228+00:00 -2026-05-06 18:50:33,535 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-06 18:50:43,317 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:50:43.317662+00:00 -2026-05-06 18:50:43,744 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.18, h_ratio=287.00) -2026-05-06 18:50:43,761 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-06 18:50:43,971 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.654s at 2026-05-07T00:50:43.971226+00:00 -2026-05-06 18:50:48,879 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:50:48.879893+00:00 -2026-05-06 18:50:49,294 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-06 18:50:49,529 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.649s at 2026-05-07T00:50:49.529626+00:00 -2026-05-06 18:50:57,857 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:50:57.857319+00:00 -2026-05-06 18:50:58,384 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.03, h_ratio=1.27) -2026-05-06 18:50:58,407 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-06 18:50:58,621 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.764s at 2026-05-07T00:50:58.621573+00:00 -2026-05-06 18:51:06,144 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:51:06.144106+00:00 -2026-05-06 18:51:06,633 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.25, h_ratio=1.00) -2026-05-06 18:51:06,651 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-06 18:51:06,863 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.719s at 2026-05-07T00:51:06.863196+00:00 -2026-05-06 18:51:15,682 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:51:15.682186+00:00 -2026-05-06 18:51:16,277 INFO backend.segmentation: [APPLY_TEXTURE] flat floor tiling (trap=0.00 < 0.35, skip perspective) -2026-05-06 18:51:16,298 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-06 18:51:16,515 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.833s at 2026-05-07T00:51:16.515186+00:00 -2026-05-06 18:51:19,654 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:51:19.654232+00:00 -2026-05-06 18:51:19,971 INFO backend.segmentation: [APPLY_TEXTURE] flat floor tiling (trap=0.00 < 0.35, skip perspective) -2026-05-06 18:51:19,990 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-06 18:51:20,208 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.555s at 2026-05-07T00:51:20.208584+00:00 -2026-05-06 18:52:00,456 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:52:00.456384+00:00 -2026-05-06 18:52:00,996 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.03, h_ratio=292.55) -2026-05-06 18:52:01,022 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-06 18:52:01,244 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.788s at 2026-05-07T00:52:01.244355+00:00 -2026-05-06 18:52:26,614 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:52:26.614595+00:00 -2026-05-06 18:52:27,072 INFO backend.segmentation: [APPLY_TEXTURE] flat floor tiling (trap=0.00 < 0.35, skip perspective) -2026-05-06 18:52:27,091 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-06 18:52:27,309 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.695s at 2026-05-07T00:52:27.309474+00:00 -2026-05-06 18:52:31,418 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:52:31.418579+00:00 -2026-05-06 18:52:31,917 INFO backend.segmentation: [APPLY_TEXTURE] flat floor tiling (trap=0.00 < 0.35, skip perspective) -2026-05-06 18:52:31,937 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-06 18:52:32,167 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.748s at 2026-05-07T00:52:32.167442+00:00 -2026-05-06 18:52:36,908 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:52:36.908697+00:00 -2026-05-06 18:52:37,340 INFO backend.segmentation: [APPLY_TEXTURE] flat floor tiling (trap=0.00 < 0.35, skip perspective) -2026-05-06 18:52:37,360 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-06 18:52:37,571 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.663s at 2026-05-07T00:52:37.571758+00:00 -2026-05-06 18:52:42,394 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:52:42.394838+00:00 -2026-05-06 18:52:42,800 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-06 18:52:43,012 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.618s at 2026-05-07T00:52:43.012733+00:00 -2026-05-06 18:53:17,599 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:53:17.599012+00:00 -2026-05-06 18:53:18,767 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-06 18:53:19,517 INFO backend.segmentation: [APPLY_TEXTURE] DONE 1.918s at 2026-05-07T00:53:19.517003+00:00 -2026-05-06 18:53:20,941 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:53:20.941029+00:00 -2026-05-06 18:53:22,268 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.18, h_ratio=287.00) -2026-05-06 18:53:22,309 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-06 18:53:22,958 INFO backend.segmentation: [APPLY_TEXTURE] DONE 2.017s at 2026-05-07T00:53:22.958657+00:00 -2026-05-06 18:53:26,815 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:53:26.815426+00:00 -2026-05-06 18:53:27,767 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.18, h_ratio=287.00) -2026-05-06 18:53:27,822 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-06 18:53:28,496 INFO backend.segmentation: [APPLY_TEXTURE] DONE 1.681s at 2026-05-07T00:53:28.496136+00:00 -2026-05-06 18:53:29,211 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:53:29.211502+00:00 -2026-05-06 18:53:30,092 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-06 18:53:30,714 INFO backend.segmentation: [APPLY_TEXTURE] DONE 1.503s at 2026-05-07T00:53:30.714065+00:00 -2026-05-06 18:53:43,274 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:53:43.274502+00:00 -2026-05-06 18:53:44,185 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.01, h_ratio=1.80) -2026-05-06 18:53:44,258 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-06 18:53:44,915 INFO backend.segmentation: [APPLY_TEXTURE] DONE 1.642s at 2026-05-07T00:53:44.915473+00:00 -2026-05-06 18:56:42,127 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=https://eduardo4547-hyper-reality-sam2-gpu.hf.space -2026-05-06 18:56:42,164 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-06 18:56:55,483 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T00:56:55.483048+00:00 -2026-05-06 18:56:55,487 INFO backend.segmentation: [JOB b2b162abddce42c7a37266a35a44b3e4] preparing_image progress=12 -2026-05-06 18:56:55,916 INFO backend.segmentation: [JOB b2b162abddce42c7a37266a35a44b3e4] segmenting_with_sam2 progress=30 estimated_seconds=58.39104 -2026-05-06 18:56:55,930 INFO services.gradio_client_service: Calling GPU Gradio Space: https://eduardo4547-hyper-reality-sam2-gpu.hf.space -2026-05-06 18:57:00,068 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" -2026-05-06 18:57:01,629 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-06 18:57:01,716 WARNING services.gradio_client_service: GPU Space failed (Cannot find a function with `api_name`: /segment.), trying CPU fallback... -2026-05-06 18:57:01,731 INFO services.gradio_client_service: Calling CPU fallback Space: http://localhost:7861 -2026-05-06 18:57:02,949 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-06 18:57:03,037 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/a5e246b1-7256-4e47-bd59-4324d860981a "HTTP/1.1 200 OK" -2026-05-06 18:57:04,851 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" -2026-05-06 18:57:08,278 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-06 18:57:08,445 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-06 18:57:11,795 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/80c98c2b-f464-4c63-be57-df896c3ca445 "HTTP/1.1 200 OK" -2026-05-06 18:57:11,848 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-06 18:57:14,425 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-06 18:57:16,934 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=80c98c2b-f464-4c63-be57-df896c3ca445 "HTTP/1.1 200 OK" -2026-05-06 18:59:19,174 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\307e144a6a358b2b31461825d5a83d98d89d0a4426bbff036b53a58abbce6a7f\image.webp "HTTP/1.1 200 OK" -2026-05-06 18:59:19,199 INFO services.gradio_client_service: Gradio Space segmentation: entorno=auto motor=SAM Auto (Exteriores - Sin Prompts) mask_count=75 -2026-05-06 18:59:19,201 INFO backend.segmentation: [JOB b2b162abddce42c7a37266a35a44b3e4] saving_masks progress=92 -2026-05-06 18:59:19,479 INFO backend.segmentation: [JOB b2b162abddce42c7a37266a35a44b3e4] segments_meta saved (65 segments) -2026-05-06 18:59:19,480 INFO backend.segmentation: [JOB b2b162abddce42c7a37266a35a44b3e4] done mask_count=75 -2026-05-06 18:59:19,481 INFO backend.segmentation: [UPLOAD_BG] DONE 143.997s at 2026-05-07T00:59:19.481114+00:00 -2026-05-06 18:59:19,481 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-06 19:00:44,615 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=https://eduardo4547-hyper-reality-sam2-gpu.hf.space -2026-05-06 19:00:44,631 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-06 19:00:54,117 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T01:00:54.117066+00:00 -2026-05-06 19:00:54,118 INFO backend.segmentation: [JOB 857272f2f2794d61a8320ba9fc0a0b9c] preparing_image progress=12 -2026-05-06 19:00:54,227 INFO backend.segmentation: [JOB 857272f2f2794d61a8320ba9fc0a0b9c] segmenting_with_sam2 progress=30 estimated_seconds=58.39104 -2026-05-06 19:00:54,228 INFO services.gradio_client_service: Calling GPU Gradio Space: https://eduardo4547-hyper-reality-sam2-gpu.hf.space -2026-05-06 19:00:55,352 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" -2026-05-06 19:00:55,962 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-06 19:00:56,025 WARNING services.gradio_client_service: GPU Space failed (Cannot find a function with `api_name`: /segment.), trying CPU fallback... -2026-05-06 19:00:56,027 ERROR backend.segmentation: [JOB 857272f2f2794d61a8320ba9fc0a0b9c] failed: GPU Gradio Space failed and no CPU fallback configured. Error: Cannot find a function with `api_name`: /segment. -Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\image_service.py", line 137, in run_upload_job - label_map, mask_count = segment_via_gradio_sync(image_path) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 87, in segment_via_gradio_sync - raise RuntimeError(f"GPU Gradio Space failed and no CPU fallback configured. Error: {gpu_error}") -RuntimeError: GPU Gradio Space failed and no CPU fallback configured. Error: Cannot find a function with `api_name`: /segment. -2026-05-06 19:00:56,028 INFO backend.segmentation: [UPLOAD_BG] DONE 1.912s at 2026-05-07T01:00:56.028803+00:00 -2026-05-06 19:00:56,029 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-06 19:00:56,598 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-06 19:00:56,674 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/4209bbfb-31fd-49ce-8bfa-3bd088857ca8 "HTTP/1.1 200 OK" -2026-05-06 19:01:51,403 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T01:01:51.403342+00:00 -2026-05-06 19:01:51,403 INFO backend.segmentation: [JOB 3767a577a5df43449aa13600c7a14d0c] preparing_image progress=12 -2026-05-06 19:01:51,499 INFO backend.segmentation: [JOB 3767a577a5df43449aa13600c7a14d0c] segmenting_with_sam2 progress=30 estimated_seconds=58.39104 -2026-05-06 19:01:51,499 INFO services.gradio_client_service: Calling GPU Gradio Space: https://eduardo4547-hyper-reality-sam2-gpu.hf.space -2026-05-06 19:01:52,190 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" -2026-05-06 19:01:52,799 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-06 19:01:52,856 WARNING services.gradio_client_service: GPU Space failed (Cannot find a function with `api_name`: /segment.), trying CPU fallback... -2026-05-06 19:01:52,857 ERROR backend.segmentation: [JOB 3767a577a5df43449aa13600c7a14d0c] failed: GPU Gradio Space failed and no CPU fallback configured. Error: Cannot find a function with `api_name`: /segment. -Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\image_service.py", line 137, in run_upload_job - label_map, mask_count = segment_via_gradio_sync(image_path) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 87, in segment_via_gradio_sync - raise RuntimeError(f"GPU Gradio Space failed and no CPU fallback configured. Error: {gpu_error}") -RuntimeError: GPU Gradio Space failed and no CPU fallback configured. Error: Cannot find a function with `api_name`: /segment. -2026-05-06 19:01:52,858 INFO backend.segmentation: [UPLOAD_BG] DONE 1.455s at 2026-05-07T01:01:52.858105+00:00 -2026-05-06 19:01:52,858 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-06 19:01:53,023 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-06 19:01:53,494 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/2c3065a9-d718-45a7-8b87-980f332c885e "HTTP/1.1 200 OK" -2026-05-06 19:17:22,918 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T01:17:22.918521+00:00 -2026-05-06 19:17:22,918 INFO backend.segmentation: [JOB 2f51a6c8a71e4a1abde690771af923c8] preparing_image progress=12 -2026-05-06 19:17:23,012 INFO backend.segmentation: [JOB 2f51a6c8a71e4a1abde690771af923c8] segmenting_with_sam2 progress=30 estimated_seconds=58.39104 -2026-05-06 19:17:23,013 INFO services.gradio_client_service: Calling GPU Gradio Space: https://eduardo4547-hyper-reality-sam2-gpu.hf.space -2026-05-06 19:17:23,790 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" -2026-05-06 19:17:24,541 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-06 19:17:24,595 WARNING services.gradio_client_service: GPU Space failed (Cannot find a function with `api_name`: /segment.), trying CPU fallback... -2026-05-06 19:17:24,596 ERROR backend.segmentation: [JOB 2f51a6c8a71e4a1abde690771af923c8] failed: GPU Gradio Space failed and no CPU fallback configured. Error: Cannot find a function with `api_name`: /segment. -Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\image_service.py", line 137, in run_upload_job - label_map, mask_count = segment_via_gradio_sync(image_path) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 87, in segment_via_gradio_sync - raise RuntimeError(f"GPU Gradio Space failed and no CPU fallback configured. Error: {gpu_error}") -RuntimeError: GPU Gradio Space failed and no CPU fallback configured. Error: Cannot find a function with `api_name`: /segment. -2026-05-06 19:17:24,598 INFO backend.segmentation: [UPLOAD_BG] DONE 1.680s at 2026-05-07T01:17:24.598238+00:00 -2026-05-06 19:17:24,599 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-06 19:17:24,970 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-06 19:17:25,584 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/0dc57ee9-5e05-4959-abe6-f013266fa198 "HTTP/1.1 200 OK" -2026-05-06 19:17:42,518 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-06 19:17:42,533 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-06 19:17:51,915 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T01:17:51.915900+00:00 -2026-05-06 19:17:51,915 INFO backend.segmentation: [JOB 63e59d4c364544d9a7e673575d6476fa] preparing_image progress=12 -2026-05-06 19:17:52,074 INFO backend.segmentation: [JOB 63e59d4c364544d9a7e673575d6476fa] segmenting_with_sam2 progress=30 estimated_seconds=58.39104 -2026-05-06 19:17:52,077 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 -2026-05-06 19:17:55,274 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-06 19:17:57,503 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-06 19:17:57,507 WARNING services.gradio_client_service: GPU Space failed (Cannot find a function with `api_name`: /segment.), trying CPU fallback... -2026-05-06 19:17:57,507 INFO services.gradio_client_service: Calling CPU fallback Space: http://localhost:7861 -2026-05-06 19:17:57,893 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-06 19:17:59,796 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/f7a98d0a-9306-4dbc-93b7-601ff79c950e "HTTP/1.1 200 OK" -2026-05-06 19:17:59,799 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" -2026-05-06 19:18:02,032 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-06 19:18:02,104 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-06 19:18:04,304 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/2d410380-be25-4691-8948-df224948856b "HTTP/1.1 200 OK" -2026-05-06 19:18:04,308 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-06 19:18:06,507 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-06 19:18:08,705 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=2d410380-be25-4691-8948-df224948856b "HTTP/1.1 200 OK" -2026-05-06 19:20:30,315 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\ba6745bca4b9348c165f22fc4ea78e92894e852d9a17a054a2f8f302e7eede49\image.webp "HTTP/1.1 200 OK" -2026-05-06 19:20:30,336 INFO services.gradio_client_service: Gradio Space segmentation: entorno=auto motor=SAM Auto (Exteriores - Sin Prompts) mask_count=108 -2026-05-06 19:20:30,342 INFO backend.segmentation: [JOB 63e59d4c364544d9a7e673575d6476fa] saving_masks progress=92 -2026-05-06 19:20:30,735 INFO backend.segmentation: [JOB 63e59d4c364544d9a7e673575d6476fa] segments_meta saved (94 segments) -2026-05-06 19:20:30,736 INFO backend.segmentation: [JOB 63e59d4c364544d9a7e673575d6476fa] done mask_count=108 -2026-05-06 19:20:30,736 INFO backend.segmentation: [UPLOAD_BG] DONE 158.821s at 2026-05-07T01:20:30.736356+00:00 -2026-05-06 19:20:30,736 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-06 19:20:54,598 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:20:54.598398+00:00 -2026-05-06 19:20:55,454 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.22, h_ratio=1.42) -2026-05-06 19:20:55,479 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-06 19:20:55,852 INFO backend.segmentation: [APPLY_TEXTURE] DONE 1.253s at 2026-05-07T01:20:55.852286+00:00 -2026-05-06 19:21:02,878 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:21:02.878905+00:00 -2026-05-06 19:21:03,409 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.53, h_ratio=1.03) -2026-05-06 19:21:03,430 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-06 19:21:03,652 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.774s at 2026-05-07T01:21:03.652782+00:00 -2026-05-06 19:21:04,556 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:21:04.556252+00:00 -2026-05-06 19:21:05,073 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-06 19:21:05,304 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.749s at 2026-05-07T01:21:05.304889+00:00 -2026-05-06 19:21:09,382 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:21:09.382363+00:00 -2026-05-06 19:21:09,876 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-06 19:21:10,099 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.717s at 2026-05-07T01:21:10.099363+00:00 -2026-05-06 19:21:12,168 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:21:12.168998+00:00 -2026-05-06 19:21:12,676 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-06 19:21:12,902 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.734s at 2026-05-07T01:21:12.902123+00:00 -2026-05-06 19:21:17,676 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:21:17.676155+00:00 -2026-05-06 19:21:18,186 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-06 19:21:18,406 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.730s at 2026-05-07T01:21:18.406221+00:00 -2026-05-06 19:21:28,033 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:21:28.033139+00:00 -2026-05-06 19:21:28,602 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.04, h_ratio=30.15) -2026-05-06 19:21:28,621 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-06 19:21:28,847 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.815s at 2026-05-07T01:21:28.847576+00:00 -2026-05-06 19:21:37,759 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:21:37.759732+00:00 -2026-05-06 19:21:38,294 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.08, h_ratio=2.31) -2026-05-06 19:21:38,324 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-06 19:21:38,542 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.783s at 2026-05-07T01:21:38.542862+00:00 -2026-05-06 19:21:45,517 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:21:45.517095+00:00 -2026-05-06 19:21:45,886 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=2.45, h_ratio=1.00) -2026-05-06 19:21:45,904 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-06 19:21:46,127 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.610s at 2026-05-07T01:21:46.127155+00:00 -2026-05-06 19:21:47,910 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:21:47.910379+00:00 -2026-05-06 19:21:48,240 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.53, h_ratio=1.03) -2026-05-06 19:21:48,258 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-06 19:21:48,550 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.640s at 2026-05-07T01:21:48.550311+00:00 -2026-05-06 19:22:01,490 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:22:01.490043+00:00 -2026-05-06 19:22:01,800 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.40, h_ratio=1.19) -2026-05-06 19:22:01,820 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-06 19:22:02,038 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.549s at 2026-05-07T01:22:02.038685+00:00 -2026-05-06 19:22:14,676 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:22:14.676095+00:00 -2026-05-06 19:22:14,981 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.01, h_ratio=1.24) -2026-05-06 19:22:15,000 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-06 19:22:15,217 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.542s at 2026-05-07T01:22:15.217076+00:00 -2026-05-06 19:22:18,393 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:22:18.393596+00:00 -2026-05-06 19:22:18,727 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=3.19, h_ratio=1.08) -2026-05-06 19:22:18,748 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-06 19:22:18,967 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.573s at 2026-05-07T01:22:18.967471+00:00 -2026-05-06 19:22:20,453 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:22:20.453051+00:00 -2026-05-06 19:22:20,787 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.25, h_ratio=1.00) -2026-05-06 19:22:20,807 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-06 19:22:21,031 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.578s at 2026-05-07T01:22:21.031223+00:00 -2026-05-06 19:22:21,815 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:22:21.815779+00:00 -2026-05-06 19:22:22,122 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-06 19:22:22,328 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.512s at 2026-05-07T01:22:22.328994+00:00 -2026-05-06 19:23:32,211 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:23:32.211857+00:00 -2026-05-06 19:23:32,509 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-06 19:23:32,730 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.518s at 2026-05-07T01:23:32.730152+00:00 -2026-05-06 19:23:38,227 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:23:38.227849+00:00 -2026-05-06 19:23:38,534 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-06 19:23:38,859 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.632s at 2026-05-07T01:23:38.859962+00:00 -2026-05-06 19:26:19,159 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T01:26:19.158670+00:00 -2026-05-06 19:26:19,159 INFO backend.segmentation: [JOB 8008bb4df0774cc693f720f155ffe536] preparing_image progress=12 -2026-05-06 19:26:19,236 INFO backend.segmentation: [JOB 8008bb4df0774cc693f720f155ffe536] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 -2026-05-06 19:26:19,237 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 -2026-05-06 19:26:21,653 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-06 19:26:24,033 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-06 19:26:24,036 WARNING services.gradio_client_service: GPU Space failed (Cannot find a function with `api_name`: /segment.), trying CPU fallback... -2026-05-06 19:26:24,038 INFO services.gradio_client_service: Calling CPU fallback Space: http://localhost:7861 -2026-05-06 19:26:24,154 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-06 19:26:25,313 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T01:26:25.313791+00:00 -2026-05-06 19:26:25,314 INFO backend.segmentation: [JOB 7aac21170040414a9aefcbeb3fbff6c5] preparing_image progress=12 -2026-05-06 19:26:25,380 INFO backend.segmentation: [JOB 7aac21170040414a9aefcbeb3fbff6c5] segmenting_with_sam2 progress=30 estimated_seconds=58.39104 -2026-05-06 19:26:25,382 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 -2026-05-06 19:26:26,501 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" -2026-05-06 19:26:26,514 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/253a1026-e06a-44b1-a442-8e6324d90510 "HTTP/1.1 200 OK" -2026-05-06 19:26:27,773 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-06 19:26:28,745 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-06 19:26:28,804 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-06 19:26:29,998 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-06 19:26:30,000 WARNING services.gradio_client_service: GPU Space failed (Cannot find a function with `api_name`: /segment.), trying CPU fallback... -2026-05-06 19:26:30,000 INFO services.gradio_client_service: Calling CPU fallback Space: http://localhost:7861 -2026-05-06 19:26:30,064 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-06 19:26:31,044 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/ef93ac7c-1d1e-49c1-a68d-1e312c61dbd6 "HTTP/1.1 200 OK" -2026-05-06 19:26:31,045 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-06 19:26:32,302 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/f94b5838-f8e4-404c-b91a-44c18e0fd13d "HTTP/1.1 200 OK" -2026-05-06 19:26:32,303 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" -2026-05-06 19:26:33,276 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-06 19:26:34,511 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-06 19:26:34,571 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-06 19:26:35,511 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=ef93ac7c-1d1e-49c1-a68d-1e312c61dbd6 "HTTP/1.1 200 OK" -2026-05-06 19:26:36,930 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/f61335a1-cff8-4529-990e-d2408f346c4b "HTTP/1.1 200 OK" -2026-05-06 19:26:36,985 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-06 19:26:39,872 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-06 19:26:42,392 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=f61335a1-cff8-4529-990e-d2408f346c4b "HTTP/1.1 200 OK" -2026-05-06 19:28:56,877 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\6ab9a3531b560f214c105197415e0af0532fde83c6bfe58ed1c0313fcd859477\image.webp "HTTP/1.1 200 OK" -2026-05-06 19:28:56,897 INFO services.gradio_client_service: Gradio Space segmentation: entorno=auto motor=SAM Auto (Exteriores - Sin Prompts) mask_count=131 -2026-05-06 19:28:56,898 INFO backend.segmentation: [JOB 8008bb4df0774cc693f720f155ffe536] saving_masks progress=92 -2026-05-06 19:28:57,283 INFO backend.segmentation: [JOB 8008bb4df0774cc693f720f155ffe536] segments_meta saved (100 segments) -2026-05-06 19:28:57,286 INFO backend.segmentation: [JOB 8008bb4df0774cc693f720f155ffe536] done mask_count=131 -2026-05-06 19:28:57,290 INFO backend.segmentation: [UPLOAD_BG] DONE 158.131s at 2026-05-07T01:28:57.289976+00:00 -2026-05-06 19:28:57,290 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-06 19:31:09,088 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\0fad9dd5d2167e81275663b268759f254ced3260a00596d8148c4b82b18a447b\image.webp "HTTP/1.1 200 OK" -2026-05-06 19:31:09,105 INFO services.gradio_client_service: Gradio Space segmentation: entorno=auto motor=SAM Auto (Exteriores - Sin Prompts) mask_count=108 -2026-05-06 19:31:09,106 INFO backend.segmentation: [JOB 7aac21170040414a9aefcbeb3fbff6c5] saving_masks progress=92 -2026-05-06 19:31:09,387 INFO backend.segmentation: [JOB 7aac21170040414a9aefcbeb3fbff6c5] segments_meta saved (83 segments) -2026-05-06 19:31:09,388 INFO backend.segmentation: [JOB 7aac21170040414a9aefcbeb3fbff6c5] done mask_count=108 -2026-05-06 19:31:09,389 INFO backend.segmentation: [UPLOAD_BG] DONE 284.075s at 2026-05-07T01:31:09.389195+00:00 -2026-05-06 19:31:09,389 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-06 19:31:25,769 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:31:25.769543+00:00 -2026-05-06 19:31:26,322 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.38, h_ratio=1.21) -2026-05-06 19:31:26,345 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-06 19:31:26,561 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.791s at 2026-05-07T01:31:26.561149+00:00 -2026-05-06 19:31:30,093 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:31:30.093130+00:00 -2026-05-06 19:31:30,610 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=73.16, h_ratio=1.19) -2026-05-06 19:31:30,630 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-06 19:31:30,852 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.760s at 2026-05-07T01:31:30.852656+00:00 -2026-05-06 19:31:32,510 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:31:32.510227+00:00 -2026-05-06 19:31:33,024 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-06 19:31:33,261 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.751s at 2026-05-07T01:31:33.261864+00:00 -2026-05-06 19:31:34,688 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:31:34.688411+00:00 -2026-05-06 19:31:35,245 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=2.82, h_ratio=1.04) -2026-05-06 19:31:35,273 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-06 19:31:35,585 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.897s at 2026-05-07T01:31:35.585466+00:00 -2026-05-06 19:31:37,308 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:31:37.308846+00:00 -2026-05-06 19:31:37,845 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-06 19:31:38,063 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.754s at 2026-05-07T01:31:38.063134+00:00 -2026-05-06 19:31:39,470 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:31:39.470279+00:00 -2026-05-06 19:31:40,021 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.01, h_ratio=1.28) -2026-05-06 19:31:40,041 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-06 19:31:40,265 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.795s at 2026-05-07T01:31:40.265221+00:00 -2026-05-06 19:32:07,072 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T01:32:07.072763+00:00 -2026-05-06 19:32:07,073 INFO backend.segmentation: [JOB 28de69b0b9f74b04a79ddc8f1c43f4a5] preparing_image progress=12 -2026-05-06 19:32:07,137 INFO backend.segmentation: [JOB 28de69b0b9f74b04a79ddc8f1c43f4a5] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 -2026-05-06 19:32:07,137 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 -2026-05-06 19:32:09,529 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-06 19:32:11,885 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-06 19:32:11,888 WARNING services.gradio_client_service: GPU Space failed (Cannot find a function with `api_name`: /segment.), trying CPU fallback... -2026-05-06 19:32:11,888 INFO services.gradio_client_service: Calling CPU fallback Space: http://localhost:7861 -2026-05-06 19:32:12,020 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-06 19:32:14,326 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/be75cb37-7b07-4bcc-8b3d-efdee17bbc4a "HTTP/1.1 200 OK" -2026-05-06 19:32:14,327 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" -2026-05-06 19:32:16,703 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-06 19:32:16,767 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-06 19:32:19,164 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/c6911703-f527-40a3-889a-6c77edcd8d21 "HTTP/1.1 200 OK" -2026-05-06 19:32:19,202 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-06 19:32:21,606 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-06 19:32:24,189 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=c6911703-f527-40a3-889a-6c77edcd8d21 "HTTP/1.1 200 OK" -2026-05-06 19:34:39,587 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\21889eae2fc6a2146ef59d302265bd9c57edff263c81a559c184526108f142d6\image.webp "HTTP/1.1 200 OK" -2026-05-06 19:34:39,600 INFO services.gradio_client_service: Gradio Space segmentation: entorno=auto motor=SAM Auto (Exteriores - Sin Prompts) mask_count=160 -2026-05-06 19:34:39,601 INFO backend.segmentation: [JOB 28de69b0b9f74b04a79ddc8f1c43f4a5] saving_masks progress=92 -2026-05-06 19:34:39,913 INFO backend.segmentation: [JOB 28de69b0b9f74b04a79ddc8f1c43f4a5] segments_meta saved (109 segments) -2026-05-06 19:34:39,916 INFO backend.segmentation: [JOB 28de69b0b9f74b04a79ddc8f1c43f4a5] done mask_count=160 -2026-05-06 19:34:39,916 INFO backend.segmentation: [UPLOAD_BG] DONE 152.844s at 2026-05-07T01:34:39.916411+00:00 -2026-05-06 19:34:39,917 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-06 19:34:58,860 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:34:58.860869+00:00 -2026-05-06 19:34:59,384 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.01, h_ratio=2.09) -2026-05-06 19:34:59,410 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-05-06 19:34:59,597 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.737s at 2026-05-07T01:34:59.597723+00:00 -2026-05-06 19:35:04,315 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:35:04.314184+00:00 -2026-05-06 19:35:04,828 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-05-06 19:35:05,031 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.717s at 2026-05-07T01:35:05.031564+00:00 -2026-05-06 19:35:07,195 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:35:07.195100+00:00 -2026-05-06 19:35:07,775 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-05-06 19:35:07,959 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.764s at 2026-05-07T01:35:07.959507+00:00 -2026-05-06 19:35:16,717 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:35:16.717055+00:00 -2026-05-06 19:35:17,292 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.12, h_ratio=1.24) -2026-05-06 19:35:17,313 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-05-06 19:35:17,489 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.772s at 2026-05-07T01:35:17.489338+00:00 -2026-05-06 19:35:21,896 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:35:21.896286+00:00 -2026-05-06 19:35:22,460 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.24, h_ratio=2.25) -2026-05-06 19:35:22,477 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-05-06 19:35:22,652 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.756s at 2026-05-07T01:35:22.652693+00:00 -2026-05-06 19:35:31,661 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T01:35:31.661603+00:00 -2026-05-06 19:35:31,662 INFO backend.segmentation: [JOB 97d58fca6faa4b94b385e3762a859555] preparing_image progress=12 -2026-05-06 19:35:31,730 INFO backend.segmentation: [JOB 97d58fca6faa4b94b385e3762a859555] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 -2026-05-06 19:35:31,730 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 -2026-05-06 19:35:34,148 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-06 19:35:36,513 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-06 19:35:36,516 WARNING services.gradio_client_service: GPU Space failed (Cannot find a function with `api_name`: /segment.), trying CPU fallback... -2026-05-06 19:35:36,517 INFO services.gradio_client_service: Calling CPU fallback Space: http://localhost:7861 -2026-05-06 19:35:36,647 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-06 19:35:38,956 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/bee4b6dd-5fb5-46e5-b79e-991fbe34799b "HTTP/1.1 200 OK" -2026-05-06 19:35:38,972 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" -2026-05-06 19:35:41,374 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-06 19:35:41,437 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-06 19:35:43,849 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-06 19:35:43,862 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/d8a928aa-2516-473b-85f5-9bf75d1e3f77 "HTTP/1.1 200 OK" -2026-05-06 19:35:46,265 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-06 19:35:48,784 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=d8a928aa-2516-473b-85f5-9bf75d1e3f77 "HTTP/1.1 200 OK" -2026-05-06 19:38:08,031 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\21889eae2fc6a2146ef59d302265bd9c57edff263c81a559c184526108f142d6\image.webp "HTTP/1.1 200 OK" -2026-05-06 19:38:08,050 INFO services.gradio_client_service: Gradio Space segmentation: entorno=auto motor=SAM Auto (Exteriores - Sin Prompts) mask_count=160 -2026-05-06 19:38:08,051 INFO backend.segmentation: [JOB 97d58fca6faa4b94b385e3762a859555] saving_masks progress=92 -2026-05-06 19:38:08,352 INFO backend.segmentation: [JOB 97d58fca6faa4b94b385e3762a859555] segments_meta saved (109 segments) -2026-05-06 19:38:08,353 INFO backend.segmentation: [JOB 97d58fca6faa4b94b385e3762a859555] done mask_count=160 -2026-05-06 19:38:08,353 INFO backend.segmentation: [UPLOAD_BG] DONE 156.692s at 2026-05-07T01:38:08.353974+00:00 -2026-05-06 19:38:08,353 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-06 19:38:54,725 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:38:54.725946+00:00 -2026-05-06 19:38:55,301 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-05-06 19:38:55,485 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.760s at 2026-05-07T01:38:55.485826+00:00 -2026-05-06 19:39:02,094 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:39:02.094076+00:00 -2026-05-06 19:39:02,676 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-05-06 19:39:02,898 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.805s at 2026-05-07T01:39:02.898407+00:00 -2026-05-06 19:39:05,813 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T01:39:05.813452+00:00 -2026-05-06 19:39:05,813 INFO backend.segmentation: [JOB 90601a35a7a147e784baf2d51c1e45e7] preparing_image progress=12 -2026-05-06 19:39:05,890 INFO backend.segmentation: [JOB 90601a35a7a147e784baf2d51c1e45e7] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 -2026-05-06 19:39:05,891 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 -2026-05-06 19:39:08,294 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-06 19:39:10,647 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-06 19:39:10,650 WARNING services.gradio_client_service: GPU Space failed (Cannot find a function with `api_name`: /segment.), trying CPU fallback... -2026-05-06 19:39:10,650 INFO services.gradio_client_service: Calling CPU fallback Space: http://localhost:7861 -2026-05-06 19:39:10,769 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-06 19:39:13,127 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/4460ecf1-ea82-47e4-a1d6-b5bc3d4c71d2 "HTTP/1.1 200 OK" -2026-05-06 19:39:13,130 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" -2026-05-06 19:39:15,535 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-06 19:39:15,595 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-06 19:39:17,956 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/97643e3a-0304-4e2b-8472-769ee08d3b1b "HTTP/1.1 200 OK" -2026-05-06 19:39:17,959 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-06 19:39:20,370 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-06 19:39:22,889 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=97643e3a-0304-4e2b-8472-769ee08d3b1b "HTTP/1.1 200 OK" -2026-05-06 19:41:28,459 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\76d9b286b2fcdbd80abdc7e15a0a7f680d3f4fbf2b90ca4d6d6f24bbf1545d1c\image.webp "HTTP/1.1 200 OK" -2026-05-06 19:41:28,470 INFO services.gradio_client_service: Gradio Space segmentation: entorno=auto motor=SAM Auto (Exteriores - Sin Prompts) mask_count=166 -2026-05-06 19:41:28,471 INFO backend.segmentation: [JOB 90601a35a7a147e784baf2d51c1e45e7] saving_masks progress=92 -2026-05-06 19:41:28,681 INFO backend.segmentation: [JOB 90601a35a7a147e784baf2d51c1e45e7] segments_meta saved (137 segments) -2026-05-06 19:41:28,681 INFO backend.segmentation: [JOB 90601a35a7a147e784baf2d51c1e45e7] done mask_count=166 -2026-05-06 19:41:28,682 INFO backend.segmentation: [UPLOAD_BG] DONE 142.868s at 2026-05-07T01:41:28.682118+00:00 -2026-05-06 19:41:28,682 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-06 19:50:21,809 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=https://eduardo4547-hyper-reality-sam2-gpu.hf.space -2026-05-06 19:50:21,823 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-06 19:50:26,378 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T01:50:26.378489+00:00 -2026-05-06 19:50:26,384 INFO backend.segmentation: [JOB 3731a48e488e4df2831bb7387b531e3c] preparing_image progress=12 -2026-05-06 19:50:26,471 INFO backend.segmentation: [JOB 3731a48e488e4df2831bb7387b531e3c] segmenting_with_sam2 progress=30 estimated_seconds=58.39104 -2026-05-06 19:50:26,472 INFO services.gradio_client_service: Calling GPU Gradio Space: https://eduardo4547-hyper-reality-sam2-gpu.hf.space -2026-05-06 19:50:27,262 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" -2026-05-06 19:50:27,877 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-06 19:50:27,893 WARNING services.gradio_client_service: GPU Space failed (Cannot find a function with `api_name`: /segment.), trying CPU fallback... -2026-05-06 19:50:27,897 INFO services.gradio_client_service: Calling CPU fallback Space: https://eduardo4547-hyper-reality-sam2-cpu.hf.space -2026-05-06 19:50:28,465 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-06 19:50:28,587 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/5aad3e23-2d4a-4ff2-b2d1-2ff407eed648 "HTTP/1.1 200 OK" -2026-05-06 19:50:28,729 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/config "HTTP/1.1 200 OK" -2026-05-06 19:50:29,178 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-06 19:50:29,318 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-06 19:50:30,078 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-06 19:50:30,375 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/heartbeat/bf131e2f-59cc-4bcb-90cf-326d0eed81f6 "HTTP/1.1 200 OK" -2026-05-06 19:50:30,577 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-06 19:50:30,996 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/queue/data?session_hash=bf131e2f-59cc-4bcb-90cf-326d0eed81f6 "HTTP/1.1 200 OK" -2026-05-06 19:56:12,792 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/file=/tmp/gradio/ca352ba59707f92cf2713ac194ff5f07119898301b89fe92d0d511d51a9854a3/image.webp "HTTP/1.1 200 OK" -2026-05-06 19:56:12,902 INFO services.gradio_client_service: Gradio Space segmentation: entorno=auto motor=SAM Auto (Exteriores - Sin Prompts) mask_count=108 -2026-05-06 19:56:12,904 INFO backend.segmentation: [JOB 3731a48e488e4df2831bb7387b531e3c] saving_masks progress=92 -2026-05-06 19:56:13,248 INFO backend.segmentation: [JOB 3731a48e488e4df2831bb7387b531e3c] segments_meta saved (94 segments) -2026-05-06 19:56:13,248 INFO backend.segmentation: [JOB 3731a48e488e4df2831bb7387b531e3c] done mask_count=108 -2026-05-06 19:56:13,248 INFO backend.segmentation: [UPLOAD_BG] DONE 346.870s at 2026-05-07T01:56:13.248662+00:00 -2026-05-06 19:56:13,249 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-06 19:56:28,190 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:56:28.190920+00:00 -2026-05-06 19:56:28,586 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.89, h_ratio=1.16) -2026-05-06 19:56:28,610 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-06 19:56:28,946 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.756s at 2026-05-07T01:56:28.946955+00:00 -2026-05-06 19:56:32,308 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:56:32.308758+00:00 -2026-05-06 19:56:32,636 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-06 19:56:32,842 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.534s at 2026-05-07T01:56:32.842046+00:00 -2026-05-06 19:56:38,221 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:56:38.221694+00:00 -2026-05-06 19:56:38,549 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=2.45, h_ratio=1.00) -2026-05-06 19:56:38,582 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-06 19:56:38,797 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.576s at 2026-05-07T01:56:38.797605+00:00 -2026-05-06 19:56:40,976 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:56:40.976482+00:00 -2026-05-06 19:56:41,307 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.53, h_ratio=1.03) -2026-05-06 19:56:41,347 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-06 19:56:41,596 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.620s at 2026-05-07T01:56:41.596887+00:00 -2026-05-06 19:56:45,053 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:56:45.053373+00:00 -2026-05-06 19:56:45,558 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-06 19:56:45,750 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.697s at 2026-05-07T01:56:45.750699+00:00 -2026-05-06 19:56:48,758 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:56:48.757132+00:00 -2026-05-06 19:56:49,268 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.08, h_ratio=2.31) -2026-05-06 19:56:49,292 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-06 19:56:49,508 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.751s at 2026-05-07T01:56:49.508898+00:00 -2026-05-06 19:56:53,597 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:56:53.597538+00:00 -2026-05-06 19:56:54,195 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=2.45, h_ratio=1.00) -2026-05-06 19:56:54,219 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-06 19:56:54,438 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.841s at 2026-05-07T01:56:54.438299+00:00 -2026-05-06 20:00:21,372 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T02:00:21.372294+00:00 -2026-05-06 20:00:21,372 INFO backend.segmentation: [JOB 9dd987f4caec430e9a186637a9178708] preparing_image progress=12 -2026-05-06 20:00:21,437 INFO backend.segmentation: [JOB 9dd987f4caec430e9a186637a9178708] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 -2026-05-06 20:00:21,437 INFO services.gradio_client_service: Calling GPU Gradio Space: https://eduardo4547-hyper-reality-sam2-gpu.hf.space -2026-05-06 20:00:22,134 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" -2026-05-06 20:00:22,726 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-06 20:00:22,915 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-06 20:00:23,461 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/c7959aba-7eb6-4ecb-81ad-712329ac5c7c "HTTP/1.1 200 OK" -2026-05-06 20:00:23,560 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-06 20:00:24,012 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-06 20:00:24,861 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/data?session_hash=c7959aba-7eb6-4ecb-81ad-712329ac5c7c "HTTP/1.1 200 OK" -2026-05-06 20:00:42,409 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/file=/tmp/gradio/b16694b4215c6ddd7ab507195e91a516ff5142807df0ec7e847eb878eb7c1ab3/image.webp "HTTP/1.1 200 OK" -2026-05-06 20:00:42,518 INFO services.gradio_client_service: Gradio Space segmentation: entorno=gpu motor=SAM Auto (GPU - ZeroGPU) mask_count=131 -2026-05-06 20:00:42,519 INFO backend.segmentation: [JOB 9dd987f4caec430e9a186637a9178708] saving_masks progress=92 -2026-05-06 20:00:42,727 INFO backend.segmentation: [JOB 9dd987f4caec430e9a186637a9178708] segments_meta saved (114 segments) -2026-05-06 20:00:42,727 INFO backend.segmentation: [JOB 9dd987f4caec430e9a186637a9178708] done mask_count=131 -2026-05-06 20:00:42,727 INFO backend.segmentation: [UPLOAD_BG] DONE 21.356s at 2026-05-07T02:00:42.727446+00:00 -2026-05-06 20:00:42,728 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-06 20:17:14,645 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T02:17:14.645451+00:00 -2026-05-06 20:17:15,135 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.24, h_ratio=1.09) -2026-05-06 20:17:15,152 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-05-06 20:17:15,329 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.684s at 2026-05-07T02:17:15.329979+00:00 -2026-05-06 20:17:15,339 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T02:17:15.339985+00:00 -2026-05-06 20:17:15,656 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.24, h_ratio=1.09) -2026-05-06 20:17:15,678 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-05-06 20:17:15,875 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.535s at 2026-05-07T02:17:15.875096+00:00 -2026-05-06 20:17:34,601 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T02:17:34.601321+00:00 -2026-05-06 20:17:34,920 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-05-06 20:17:35,110 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.510s at 2026-05-07T02:17:35.110889+00:00 -2026-05-06 20:17:42,322 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T02:17:42.322700+00:00 -2026-05-06 20:17:42,821 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-05-06 20:17:42,999 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.677s at 2026-05-07T02:17:42.998640+00:00 -2026-05-06 20:17:46,209 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T02:17:46.209208+00:00 -2026-05-06 20:17:46,792 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.24, h_ratio=1.09) -2026-05-06 20:17:46,811 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-05-06 20:17:46,990 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.781s at 2026-05-07T02:17:46.990848+00:00 -2026-05-07 12:51:24,606 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=https://eduardo4547-hyper-reality-sam2-gpu.hf.space -2026-05-07 12:51:24,620 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-07 12:51:38,487 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T18:51:38.487778+00:00 -2026-05-07 12:51:38,488 INFO backend.segmentation: [JOB 021594e26fe54ec19990002de5a49e1e] preparing_image progress=12 -2026-05-07 12:51:38,722 INFO backend.segmentation: [JOB 021594e26fe54ec19990002de5a49e1e] segmenting_with_sam2 progress=30 estimated_seconds=58.39104 -2026-05-07 12:51:38,722 INFO services.gradio_client_service: Calling GPU Gradio Space: https://eduardo4547-hyper-reality-sam2-gpu.hf.space -2026-05-07 12:51:57,921 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" -2026-05-07 12:51:58,597 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-07 12:51:59,277 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-07 12:51:59,382 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/94b31a0d-c4b3-4776-9bf3-feb7cfb2deb5 "HTTP/1.1 200 OK" -2026-05-07 12:51:59,569 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-07 12:52:00,104 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-07 12:52:00,784 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/data?session_hash=94b31a0d-c4b3-4776-9bf3-feb7cfb2deb5 "HTTP/1.1 200 OK" -2026-05-07 12:52:21,780 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/file=/tmp/gradio/58f73381cbe3266caa6d35a2c12cb77e720345122d5cf9f7cdb96e041ceca7c9/image.webp "HTTP/1.1 200 OK" -2026-05-07 12:52:21,889 INFO services.gradio_client_service: Gradio Space segmentation: entorno=gpu motor=SAM Auto (GPU - ZeroGPU) mask_count=108 -2026-05-07 12:52:21,890 INFO backend.segmentation: [JOB 021594e26fe54ec19990002de5a49e1e] saving_masks progress=92 -2026-05-07 12:52:22,192 INFO backend.segmentation: [JOB 021594e26fe54ec19990002de5a49e1e] segments_meta saved (94 segments) -2026-05-07 12:52:22,192 INFO backend.segmentation: [JOB 021594e26fe54ec19990002de5a49e1e] done mask_count=108 -2026-05-07 12:52:22,192 INFO backend.segmentation: [UPLOAD_BG] DONE 43.706s at 2026-05-07T18:52:22.192480+00:00 -2026-05-07 12:52:22,193 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-07 12:56:10,928 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T18:56:10.928142+00:00 -2026-05-07 12:56:10,929 INFO backend.segmentation: [JOB 6e3dc1caa0ea4d58a9fdb96458cc352a] preparing_image progress=12 -2026-05-07 12:56:10,997 INFO backend.segmentation: [JOB 6e3dc1caa0ea4d58a9fdb96458cc352a] segmenting_with_sam2 progress=30 estimated_seconds=58.39104 -2026-05-07 12:56:10,997 INFO services.gradio_client_service: Calling GPU Gradio Space: https://eduardo4547-hyper-reality-sam2-gpu.hf.space -2026-05-07 12:56:11,625 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" -2026-05-07 12:56:12,229 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-07 12:56:12,412 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-07 12:56:12,966 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/ed1495a1-4a2c-4fab-a409-975c2768b89c "HTTP/1.1 200 OK" -2026-05-07 12:56:13,063 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-07 12:56:13,579 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-07 12:56:14,152 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/data?session_hash=ed1495a1-4a2c-4fab-a409-975c2768b89c "HTTP/1.1 200 OK" -2026-05-07 12:56:25,727 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/file=/tmp/gradio/58f73381cbe3266caa6d35a2c12cb77e720345122d5cf9f7cdb96e041ceca7c9/image.webp "HTTP/1.1 200 OK" -2026-05-07 12:56:25,845 INFO services.gradio_client_service: Gradio Space segmentation: entorno=gpu motor=SAM Auto (GPU - ZeroGPU) mask_count=108 -2026-05-07 12:56:25,845 INFO backend.segmentation: [JOB 6e3dc1caa0ea4d58a9fdb96458cc352a] saving_masks progress=92 -2026-05-07 12:56:26,112 INFO backend.segmentation: [JOB 6e3dc1caa0ea4d58a9fdb96458cc352a] segments_meta saved (94 segments) -2026-05-07 12:56:26,112 INFO backend.segmentation: [JOB 6e3dc1caa0ea4d58a9fdb96458cc352a] done mask_count=108 -2026-05-07 12:56:26,112 INFO backend.segmentation: [UPLOAD_BG] DONE 15.184s at 2026-05-07T18:56:26.112231+00:00 -2026-05-07 12:56:26,112 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-07 13:01:56,800 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T19:01:56.800564+00:00 -2026-05-07 13:01:56,801 INFO backend.segmentation: [JOB c145be47d09942d691ae3f650e362810] preparing_image progress=12 -2026-05-07 13:01:56,873 INFO backend.segmentation: [JOB c145be47d09942d691ae3f650e362810] segmenting_with_sam2 progress=30 estimated_seconds=58.39104 -2026-05-07 13:01:56,874 INFO services.gradio_client_service: Calling GPU Gradio Space: https://eduardo4547-hyper-reality-sam2-gpu.hf.space -2026-05-07 13:01:57,517 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" -2026-05-07 13:01:58,135 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-07 13:01:58,320 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-07 13:01:58,810 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/5c3e334b-800c-4d78-93b4-35d66a611f5d "HTTP/1.1 200 OK" -2026-05-07 13:01:58,963 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-07 13:01:59,514 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-07 13:02:00,027 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/data?session_hash=5c3e334b-800c-4d78-93b4-35d66a611f5d "HTTP/1.1 200 OK" -2026-05-07 13:02:11,627 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/file=/tmp/gradio/58f73381cbe3266caa6d35a2c12cb77e720345122d5cf9f7cdb96e041ceca7c9/image.webp "HTTP/1.1 200 OK" -2026-05-07 13:02:11,743 INFO services.gradio_client_service: Gradio Space segmentation: entorno=gpu motor=SAM Auto (GPU - ZeroGPU) mask_count=108 -2026-05-07 13:02:11,747 INFO backend.segmentation: [JOB c145be47d09942d691ae3f650e362810] saving_masks progress=92 -2026-05-07 13:02:12,035 INFO backend.segmentation: [JOB c145be47d09942d691ae3f650e362810] segments_meta saved (94 segments) -2026-05-07 13:02:12,035 INFO backend.segmentation: [JOB c145be47d09942d691ae3f650e362810] done mask_count=108 -2026-05-07 13:02:12,035 INFO backend.segmentation: [UPLOAD_BG] DONE 15.235s at 2026-05-07T19:02:12.035158+00:00 -2026-05-07 13:02:12,036 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-07 14:54:46,839 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=https://eduardo4547-hyper-reality-sam2-gpu.hf.space -2026-05-07 14:54:46,873 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-07 14:55:18,464 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T20:55:18.464808+00:00 -2026-05-07 14:55:18,465 INFO backend.segmentation: [JOB e2978c252391482ea410013edd5dd614] preparing_image progress=12 -2026-05-07 14:55:18,684 INFO backend.segmentation: [JOB e2978c252391482ea410013edd5dd614] segmenting_with_sam2 progress=30 estimated_seconds=58.39104 -2026-05-07 14:55:18,684 INFO services.gradio_client_service: Calling GPU Gradio Space: https://eduardo4547-hyper-reality-sam2-gpu.hf.space -2026-05-07 14:55:20,941 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" -2026-05-07 14:55:21,523 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-07 14:55:22,147 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-07 14:55:22,266 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/044411e2-1c1d-423c-8a2b-1bf8aa03347d "HTTP/1.1 200 OK" -2026-05-07 14:55:22,418 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-07 14:55:22,953 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-07 14:55:23,627 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/data?session_hash=044411e2-1c1d-423c-8a2b-1bf8aa03347d "HTTP/1.1 200 OK" -2026-05-07 14:55:38,599 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/file=/tmp/gradio/e46ee411d94ec777ba35b9e436d075e4a9639d5f1e564687b887320d75811f38/image.webp "HTTP/1.1 200 OK" -2026-05-07 14:55:38,603 WARNING services.gradio_client_service: GPU Space failed (Gradio Space error: Traceback (most recent call last): - File "/app/app.py", line 133, in segment_for_backend - resultado = sam_vit_pipeline( - pil_image, - ...<5 lines>... - crops_n_layers=PARAMS["crops_n_layers"], - ) - File "/root/.pyenv/versions/3.13.13/lib/python3.13/site-packages/transformers/pipelines/mask_generation.py", line 190, in __call__ - return super().__call__(image, *args, num_workers=num_workers, batch_size=batch_size, **kwargs) - ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^), trying CPU fallback... -2026-05-07 14:55:38,604 INFO services.gradio_client_service: Calling CPU fallback Space: https://eduardo4547-hyper-reality-sam2-cpu.hf.space -2026-05-07 14:55:39,263 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/config "HTTP/1.1 200 OK" -2026-05-07 14:55:39,888 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-07 14:55:40,067 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-07 14:55:40,580 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/heartbeat/0cb7d459-fd3f-4435-b44f-3d93594c3e32 "HTTP/1.1 200 OK" -2026-05-07 14:55:40,750 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-07 14:55:41,291 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-07 14:55:41,867 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/queue/data?session_hash=0cb7d459-fd3f-4435-b44f-3d93594c3e32 "HTTP/1.1 200 OK" -2026-05-07 14:59:17,106 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T20:59:17.106093+00:00 -2026-05-07 14:59:17,106 INFO backend.segmentation: [JOB 9d8e54c57b804dd6a5868f2f16907d6a] preparing_image progress=12 -2026-05-07 14:59:17,177 INFO backend.segmentation: [JOB 9d8e54c57b804dd6a5868f2f16907d6a] segmenting_with_sam2 progress=30 estimated_seconds=58.39104 -2026-05-07 14:59:17,178 INFO services.gradio_client_service: Calling GPU Gradio Space: https://eduardo4547-hyper-reality-sam2-gpu.hf.space -2026-05-07 14:59:17,820 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" -2026-05-07 14:59:18,429 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-07 14:59:18,612 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-07 14:59:19,270 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/4bafc24c-7b3e-47e5-ab5c-040b1104f6ad "HTTP/1.1 200 OK" -2026-05-07 14:59:19,316 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-07 14:59:19,895 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-07 14:59:20,498 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/data?session_hash=4bafc24c-7b3e-47e5-ab5c-040b1104f6ad "HTTP/1.1 200 OK" -2026-05-07 14:59:22,556 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/file=/tmp/gradio/e46ee411d94ec777ba35b9e436d075e4a9639d5f1e564687b887320d75811f38/image.webp "HTTP/1.1 200 OK" -2026-05-07 14:59:22,561 WARNING services.gradio_client_service: GPU Space failed (Gradio Space error: Traceback (most recent call last): - File "/app/app.py", line 133, in segment_for_backend - resultado = sam_vit_pipeline( - pil_image, - ...<5 lines>... - crops_n_layers=PARAMS["crops_n_layers"], - ) - File "/root/.pyenv/versions/3.13.13/lib/python3.13/site-packages/transformers/pipelines/mask_generation.py", line 190, in __call__ - return super().__call__(image, *args, num_workers=num_workers, batch_size=batch_size, **kwargs) - ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^), trying CPU fallback... -2026-05-07 14:59:22,562 INFO services.gradio_client_service: Calling CPU fallback Space: https://eduardo4547-hyper-reality-sam2-cpu.hf.space -2026-05-07 14:59:23,331 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/config "HTTP/1.1 200 OK" -2026-05-07 14:59:24,033 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-07 14:59:24,159 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-07 14:59:24,691 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/heartbeat/58739913-8194-4cc9-ae76-fab58874372a "HTTP/1.1 200 OK" -2026-05-07 14:59:24,844 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-07 14:59:25,478 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-07 14:59:26,087 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/queue/data?session_hash=58739913-8194-4cc9-ae76-fab58874372a "HTTP/1.1 200 OK" -2026-05-07 14:59:38,140 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/file=/tmp/gradio/0870aa16fb1d36280b4436effe666b2d40896a35db44e69dfe24e623f43e743b/image.webp "HTTP/1.1 200 OK" -2026-05-07 14:59:38,143 ERROR backend.segmentation: [JOB e2978c252391482ea410013edd5dd614] failed: Both Gradio Spaces failed. - GPU (https://eduardo4547-hyper-reality-sam2-gpu.hf.space): Gradio Space error: Traceback (most recent call last): - File "/app/app.py", line 133, in segment_for_backend - resultado = sam_vit_pipeline( - pil_image, - ...<5 lines>... - crops_n_layers=PARAMS["crops_n_layers"], - ) - File "/root/.pyenv/versions/3.13.13/lib/python3.13/site-packages/transformers/pipelines/mask_generation.py", line 190, in __call__ - return super().__call__(image, *args, num_workers=num_workers, batch_size=batch_size, **kwargs) - ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^ - CPU (https://eduardo4547-hyper-reality-sam2-cpu.hf.space): Gradio Space error: Traceback (most recent call last): - File "/app/app.py", line 133, in segment_for_backend - resultado = sam_vit_pipeline( - pil_image, - ...<5 lines>... - crops_n_layers=PARAMS["crops_n_layers"], - ) - File "/usr/local/lib/python3.13/site-packages/transformers/pipelines/mask_generation.py", line 190, in __call__ - return super().__call__(image, *args, num_workers=num_workers, batch_size=batch_size, **kwargs) - ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 91, in segment_via_gradio_sync - return _call_gradio_sync(image_path, GRADIO_CPU_FALLBACK_URL) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 47, in _call_gradio_sync - raise RuntimeError(f"Gradio Space error: {combined['error'][:500]}") -RuntimeError: Gradio Space error: Traceback (most recent call last): - File "/app/app.py", line 133, in segment_for_backend - resultado = sam_vit_pipeline( - pil_image, - ...<5 lines>... - crops_n_layers=PARAMS["crops_n_layers"], - ) - File "/usr/local/lib/python3.13/site-packages/transformers/pipelines/mask_generation.py", line 190, in __call__ - return super().__call__(image, *args, num_workers=num_workers, batch_size=batch_size, **kwargs) - ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -The above exception was the direct cause of the following exception: - -Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\image_service.py", line 138, in run_upload_job - label_map, mask_count = segment_via_gradio_sync(image_path) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 93, in segment_via_gradio_sync - raise RuntimeError( -RuntimeError: Both Gradio Spaces failed. - GPU (https://eduardo4547-hyper-reality-sam2-gpu.hf.space): Gradio Space error: Traceback (most recent call last): - File "/app/app.py", line 133, in segment_for_backend - resultado = sam_vit_pipeline( - pil_image, - ...<5 lines>... - crops_n_layers=PARAMS["crops_n_layers"], - ) - File "/root/.pyenv/versions/3.13.13/lib/python3.13/site-packages/transformers/pipelines/mask_generation.py", line 190, in __call__ - return super().__call__(image, *args, num_workers=num_workers, batch_size=batch_size, **kwargs) - ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^ - CPU (https://eduardo4547-hyper-reality-sam2-cpu.hf.space): Gradio Space error: Traceback (most recent call last): - File "/app/app.py", line 133, in segment_for_backend - resultado = sam_vit_pipeline( - pil_image, - ...<5 lines>... - crops_n_layers=PARAMS["crops_n_layers"], - ) - File "/usr/local/lib/python3.13/site-packages/transformers/pipelines/mask_generation.py", line 190, in __call__ - return super().__call__(image, *args, num_workers=num_workers, batch_size=batch_size, **kwargs) - ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -2026-05-07 14:59:38,144 INFO backend.segmentation: [UPLOAD_BG] DONE 259.680s at 2026-05-07T20:59:38.144994+00:00 -2026-05-07 14:59:38,144 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-07 15:02:17,066 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=https://eduardo4547-hyper-reality-sam2-gpu.hf.space -2026-05-07 15:02:17,090 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-07 15:02:54,241 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T21:02:54.241047+00:00 -2026-05-07 15:02:54,241 INFO backend.segmentation: [JOB 77ed4dd081d7432cbc3073f159883876] preparing_image progress=12 -2026-05-07 15:02:54,369 INFO backend.segmentation: [JOB 77ed4dd081d7432cbc3073f159883876] segmenting_with_sam2 progress=30 estimated_seconds=58.39104 -2026-05-07 15:02:54,369 INFO services.gradio_client_service: Calling GPU Gradio Space: https://eduardo4547-hyper-reality-sam2-gpu.hf.space -2026-05-07 15:02:55,466 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" -2026-05-07 15:02:55,989 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-07 15:02:56,471 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-07 15:02:56,561 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/ae72d127-eaf7-4469-8805-b2f2d63b0e9a "HTTP/1.1 200 OK" -2026-05-07 15:02:56,764 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-07 15:02:57,222 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-07 15:02:57,668 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/data?session_hash=ae72d127-eaf7-4469-8805-b2f2d63b0e9a "HTTP/1.1 200 OK" -2026-05-07 15:02:59,650 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/file=/tmp/gradio/e46ee411d94ec777ba35b9e436d075e4a9639d5f1e564687b887320d75811f38/image.webp "HTTP/1.1 200 OK" -2026-05-07 15:02:59,653 WARNING services.gradio_client_service: GPU Space failed (Gradio Space error: Traceback (most recent call last): - File "/app/app.py", line 133, in segment_for_backend - resultado = sam_vit_pipeline( - pil_image, - ...<5 lines>... - crops_n_layers=PARAMS["crops_n_layers"], - ) - File "/root/.pyenv/versions/3.13.13/lib/python3.13/site-packages/transformers/pipelines/mask_generation.py", line 190, in __call__ - return super().__call__(image, *args, num_workers=num_workers, batch_size=batch_size, **kwargs) - ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^), trying CPU fallback... -2026-05-07 15:02:59,654 INFO services.gradio_client_service: Calling CPU fallback Space: https://eduardo4547-hyper-reality-sam2-cpu.hf.space -2026-05-07 15:03:01,621 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/config "HTTP/1.1 200 OK" -2026-05-07 15:03:02,088 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-07 15:03:02,262 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-07 15:03:02,629 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/heartbeat/2f3a5842-bc35-4aa3-8198-e3338bde647a "HTTP/1.1 200 OK" -2026-05-07 15:03:02,785 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-07 15:03:03,183 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-07 15:03:03,623 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/queue/data?session_hash=2f3a5842-bc35-4aa3-8198-e3338bde647a "HTTP/1.1 200 OK" -2026-05-07 15:11:16,099 ERROR backend.segmentation: [JOB 77ed4dd081d7432cbc3073f159883876] failed: Both Gradio Spaces failed. - GPU (https://eduardo4547-hyper-reality-sam2-gpu.hf.space): Gradio Space error: Traceback (most recent call last): - File "/app/app.py", line 133, in segment_for_backend - resultado = sam_vit_pipeline( - pil_image, - ...<5 lines>... - crops_n_layers=PARAMS["crops_n_layers"], - ) - File "/root/.pyenv/versions/3.13.13/lib/python3.13/site-packages/transformers/pipelines/mask_generation.py", line 190, in __call__ - return super().__call__(image, *args, num_workers=num_workers, batch_size=batch_size, **kwargs) - ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^ - CPU (https://eduardo4547-hyper-reality-sam2-cpu.hf.space): -Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 91, in segment_via_gradio_sync - return _call_gradio_sync(image_path, GRADIO_CPU_FALLBACK_URL) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 36, in _call_gradio_sync - _overlay_file, combined_json_str = client.predict( - ^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\.venv\Lib\site-packages\gradio_client\client.py", line 499, in predict - ).result() - ^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\.venv\Lib\site-packages\gradio_client\client.py", line 1484, in result - return super().result(timeout=timeout) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2800.0_x64__qbz5n2kfra8p0\Lib\concurrent\futures\_base.py", line 456, in result - return self.__get_result() - ^^^^^^^^^^^^^^^^^^^ - File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2800.0_x64__qbz5n2kfra8p0\Lib\concurrent\futures\_base.py", line 401, in __get_result - raise self._exception - File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2800.0_x64__qbz5n2kfra8p0\Lib\concurrent\futures\thread.py", line 59, in run - result = self.fn(*self.args, **self.kwargs) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\.venv\Lib\site-packages\gradio_client\client.py", line 1080, in _inner - predictions = _predict(*data, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\.venv\Lib\site-packages\gradio_client\client.py", line 1188, in _predict - result = self._sse_fn_v1plus(helper, event_id, self.protocol) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\.venv\Lib\site-packages\gradio_client\client.py", line 1388, in _sse_fn_v1plus - return utils.get_pred_from_sse_v1plus( - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\.venv\Lib\site-packages\gradio_client\utils.py", line 395, in get_pred_from_sse_v1plus - raise exception - File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2800.0_x64__qbz5n2kfra8p0\Lib\concurrent\futures\thread.py", line 59, in run - result = self.fn(*self.args, **self.kwargs) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\.venv\Lib\site-packages\gradio_client\utils.py", line 511, in stream_sse_v1plus - raise concurrent.futures.CancelledError() -concurrent.futures._base.CancelledError - -The above exception was the direct cause of the following exception: - -Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\image_service.py", line 138, in run_upload_job - label_map, mask_count = segment_via_gradio_sync(image_path) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 93, in segment_via_gradio_sync - raise RuntimeError( -RuntimeError: Both Gradio Spaces failed. - GPU (https://eduardo4547-hyper-reality-sam2-gpu.hf.space): Gradio Space error: Traceback (most recent call last): - File "/app/app.py", line 133, in segment_for_backend - resultado = sam_vit_pipeline( - pil_image, - ...<5 lines>... - crops_n_layers=PARAMS["crops_n_layers"], - ) - File "/root/.pyenv/versions/3.13.13/lib/python3.13/site-packages/transformers/pipelines/mask_generation.py", line 190, in __call__ - return super().__call__(image, *args, num_workers=num_workers, batch_size=batch_size, **kwargs) - ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^ - CPU (https://eduardo4547-hyper-reality-sam2-cpu.hf.space): -2026-05-07 15:11:16,123 INFO backend.segmentation: [UPLOAD_BG] DONE 501.883s at 2026-05-07T21:11:16.123777+00:00 -2026-05-07 15:11:16,123 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-07 15:11:33,448 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=https://eduardo4547-hyper-reality-sam2-gpu.hf.space -2026-05-07 15:11:33,462 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-07 15:11:38,641 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T21:11:38.641727+00:00 -2026-05-07 15:11:38,642 INFO backend.segmentation: [JOB 710a0f404cce4589bd59a34ef7a8fff9] preparing_image progress=12 -2026-05-07 15:11:38,745 INFO backend.segmentation: [JOB 710a0f404cce4589bd59a34ef7a8fff9] segmenting_with_sam2 progress=30 estimated_seconds=58.39104 -2026-05-07 15:11:38,747 INFO services.gradio_client_service: Calling GPU Gradio Space: https://eduardo4547-hyper-reality-sam2-gpu.hf.space -2026-05-07 15:11:39,778 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" -2026-05-07 15:11:40,250 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-07 15:11:40,717 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-07 15:11:40,821 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/2ba41729-fa1a-4207-b1a6-9c3ef6526887 "HTTP/1.1 200 OK" -2026-05-07 15:11:40,924 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-07 15:11:41,336 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-07 15:11:42,039 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/data?session_hash=2ba41729-fa1a-4207-b1a6-9c3ef6526887 "HTTP/1.1 200 OK" -2026-05-07 15:12:02,740 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/file=/tmp/gradio/d17dd4b993c601f166cf197f34896b5d17a23e30a9fe1f5022b368a594a3f823/image.webp "HTTP/1.1 200 OK" -2026-05-07 15:12:02,846 INFO services.gradio_client_service: Gradio Space segmentation: entorno=gpu motor=SAM Auto (GPU - ZeroGPU) mask_count=63 -2026-05-07 15:12:02,846 INFO backend.segmentation: [JOB 710a0f404cce4589bd59a34ef7a8fff9] saving_masks progress=92 -2026-05-07 15:12:02,991 INFO backend.segmentation: [JOB 710a0f404cce4589bd59a34ef7a8fff9] segments_meta saved (54 segments) -2026-05-07 15:12:02,991 INFO backend.segmentation: [JOB 710a0f404cce4589bd59a34ef7a8fff9] done mask_count=63 -2026-05-07 15:12:02,992 INFO backend.segmentation: [UPLOAD_BG] DONE 24.350s at 2026-05-07T21:12:02.992931+00:00 -2026-05-07 15:12:02,992 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-07 15:12:30,031 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:12:30.031296+00:00 -2026-05-07 15:12:30,558 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-07 15:12:30,891 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.860s at 2026-05-07T21:12:30.891199+00:00 -2026-05-07 15:13:18,964 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T21:13:18.964838+00:00 -2026-05-07 15:13:18,964 INFO backend.segmentation: [JOB 27e16fe858474d01905b11a66b235cc4] preparing_image progress=12 -2026-05-07 15:13:19,050 INFO backend.segmentation: [JOB 27e16fe858474d01905b11a66b235cc4] segmenting_with_sam2 progress=30 estimated_seconds=58.39104 -2026-05-07 15:13:19,051 INFO services.gradio_client_service: Calling GPU Gradio Space: https://eduardo4547-hyper-reality-sam2-gpu.hf.space -2026-05-07 15:13:19,623 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" -2026-05-07 15:13:20,207 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-07 15:13:20,445 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-07 15:13:20,882 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/6b2ee8fb-256a-4778-af39-73fbc7180d64 "HTTP/1.1 200 OK" -2026-05-07 15:13:21,064 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-07 15:13:21,680 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-07 15:13:22,271 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/data?session_hash=6b2ee8fb-256a-4778-af39-73fbc7180d64 "HTTP/1.1 200 OK" -2026-05-07 15:13:32,414 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/file=/tmp/gradio/d17dd4b993c601f166cf197f34896b5d17a23e30a9fe1f5022b368a594a3f823/image.webp "HTTP/1.1 200 OK" -2026-05-07 15:13:32,528 INFO services.gradio_client_service: Gradio Space segmentation: entorno=gpu motor=SAM Auto (GPU - ZeroGPU) mask_count=63 -2026-05-07 15:13:32,528 INFO backend.segmentation: [JOB 27e16fe858474d01905b11a66b235cc4] saving_masks progress=92 -2026-05-07 15:13:32,702 INFO backend.segmentation: [JOB 27e16fe858474d01905b11a66b235cc4] segments_meta saved (54 segments) -2026-05-07 15:13:32,703 INFO backend.segmentation: [JOB 27e16fe858474d01905b11a66b235cc4] done mask_count=63 -2026-05-07 15:13:32,703 INFO backend.segmentation: [UPLOAD_BG] DONE 13.740s at 2026-05-07T21:13:32.703517+00:00 -2026-05-07 15:13:32,704 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-07 15:19:48,376 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T21:19:48.376272+00:00 -2026-05-07 15:19:48,376 INFO backend.segmentation: [JOB 6ec5c36da3b941c48ee955a0e6018efd] preparing_image progress=12 -2026-05-07 15:19:48,443 INFO backend.segmentation: [JOB 6ec5c36da3b941c48ee955a0e6018efd] segmenting_with_sam2 progress=30 estimated_seconds=58.39104 -2026-05-07 15:19:48,444 INFO services.gradio_client_service: Calling GPU Gradio Space: https://eduardo4547-hyper-reality-sam2-gpu.hf.space -2026-05-07 15:19:49,095 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" -2026-05-07 15:19:49,716 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-07 15:19:49,928 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-07 15:19:50,414 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/c601fff9-ae77-444d-86f4-c6eb6ee29ae8 "HTTP/1.1 200 OK" -2026-05-07 15:19:50,537 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-07 15:19:51,092 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-07 15:19:51,642 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/data?session_hash=c601fff9-ae77-444d-86f4-c6eb6ee29ae8 "HTTP/1.1 200 OK" -2026-05-07 15:20:01,890 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/file=/tmp/gradio/d17dd4b993c601f166cf197f34896b5d17a23e30a9fe1f5022b368a594a3f823/image.webp "HTTP/1.1 200 OK" -2026-05-07 15:20:02,004 INFO services.gradio_client_service: Gradio Space segmentation: entorno=gpu motor=SAM Auto (GPU - ZeroGPU) mask_count=63 -2026-05-07 15:20:02,005 INFO backend.segmentation: [JOB 6ec5c36da3b941c48ee955a0e6018efd] saving_masks progress=92 -2026-05-07 15:20:02,221 INFO backend.segmentation: [JOB 6ec5c36da3b941c48ee955a0e6018efd] segments_meta saved (54 segments) -2026-05-07 15:20:02,221 INFO backend.segmentation: [JOB 6ec5c36da3b941c48ee955a0e6018efd] done mask_count=63 -2026-05-07 15:20:02,221 INFO backend.segmentation: [UPLOAD_BG] DONE 13.846s at 2026-05-07T21:20:02.221722+00:00 -2026-05-07 15:20:02,222 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-07 15:21:36,330 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:21:36.330551+00:00 -2026-05-07 15:21:36,908 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-07 15:21:37,121 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.790s at 2026-05-07T21:21:37.121352+00:00 -2026-05-07 15:21:45,205 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:21:45.203794+00:00 -2026-05-07 15:21:45,723 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.39, h_ratio=1.19) -2026-05-07 15:21:45,743 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-07 15:21:45,953 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.748s at 2026-05-07T21:21:45.953335+00:00 -2026-05-07 15:21:49,795 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:21:49.795014+00:00 -2026-05-07 15:21:50,312 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.01, h_ratio=1.24) -2026-05-07 15:21:50,331 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-07 15:21:50,547 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.753s at 2026-05-07T21:21:50.547610+00:00 -2026-05-07 15:21:56,068 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:21:56.068945+00:00 -2026-05-07 15:21:56,572 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.18, h_ratio=287.00) -2026-05-07 15:21:56,592 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-07 15:21:56,802 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.734s at 2026-05-07T21:21:56.802967+00:00 -2026-05-07 15:23:52,960 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-07 15:23:52,981 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-07 15:24:42,274 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T21:24:42.274969+00:00 -2026-05-07 15:24:42,274 INFO backend.segmentation: [JOB ca20946463e74f8a9be921cb5dc3580f] preparing_image progress=12 -2026-05-07 15:24:42,409 INFO backend.segmentation: [JOB ca20946463e74f8a9be921cb5dc3580f] segmenting_with_sam2 progress=30 estimated_seconds=58.39104 -2026-05-07 15:24:42,414 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 -2026-05-07 15:24:45,341 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-07 15:24:47,723 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-07 15:24:48,299 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-07 15:24:50,226 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/dab64d79-0e60-4114-b75e-b53930a5d4f7 "HTTP/1.1 200 OK" -2026-05-07 15:24:50,247 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-07 15:24:54,192 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-07 15:24:56,620 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=dab64d79-0e60-4114-b75e-b53930a5d4f7 "HTTP/1.1 200 OK" -2026-05-07 15:27:24,526 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\e9e23a4c03e9b88d2db6cb764c2778b1091e1c8b97c256c28501ff9297140221\image.webp "HTTP/1.1 200 OK" -2026-05-07 15:27:24,538 INFO services.gradio_client_service: Gradio Space segmentation: entorno=gpu motor=SAM Auto (GPU - ZeroGPU) mask_count=63 -2026-05-07 15:27:24,538 INFO backend.segmentation: [JOB ca20946463e74f8a9be921cb5dc3580f] saving_masks progress=92 -2026-05-07 15:27:24,702 INFO backend.segmentation: [JOB ca20946463e74f8a9be921cb5dc3580f] segments_meta saved (63 segments) -2026-05-07 15:27:24,702 INFO backend.segmentation: [JOB ca20946463e74f8a9be921cb5dc3580f] done mask_count=63 -2026-05-07 15:27:24,702 INFO backend.segmentation: [UPLOAD_BG] DONE 162.428s at 2026-05-07T21:27:24.702523+00:00 -2026-05-07 15:27:24,702 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-07 15:27:41,959 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:27:41.959810+00:00 -2026-05-07 15:27:42,278 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.05, h_ratio=416.39) -2026-05-07 15:27:42,305 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-07 15:27:42,814 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.854s at 2026-05-07T21:27:42.814627+00:00 -2026-05-07 15:27:46,763 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:27:46.763830+00:00 -2026-05-07 15:27:47,166 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-07 15:27:47,378 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.614s at 2026-05-07T21:27:47.378508+00:00 -2026-05-07 15:27:49,193 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:27:49.193540+00:00 -2026-05-07 15:27:49,513 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=2.27, h_ratio=1.02) -2026-05-07 15:27:49,532 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-07 15:27:49,729 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.536s at 2026-05-07T21:27:49.729431+00:00 -2026-05-07 15:27:51,249 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:27:51.249369+00:00 -2026-05-07 15:27:51,544 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-07 15:27:51,755 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.506s at 2026-05-07T21:27:51.755618+00:00 -2026-05-07 15:27:52,680 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:27:52.680739+00:00 -2026-05-07 15:27:52,986 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-07 15:27:53,211 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.531s at 2026-05-07T21:27:53.211475+00:00 -2026-05-07 15:27:54,203 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:27:54.203416+00:00 -2026-05-07 15:27:54,500 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-07 15:27:54,736 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.533s at 2026-05-07T21:27:54.736190+00:00 -2026-05-07 15:28:31,805 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:28:31.805147+00:00 -2026-05-07 15:28:32,098 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-07 15:28:32,338 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.534s at 2026-05-07T21:28:32.338930+00:00 -2026-05-07 15:28:42,559 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:28:42.559339+00:00 -2026-05-07 15:28:43,089 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-07 15:28:43,307 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.748s at 2026-05-07T21:28:43.307767+00:00 -2026-05-07 15:28:46,313 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:28:46.313349+00:00 -2026-05-07 15:28:46,831 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.74, h_ratio=1.19) -2026-05-07 15:28:46,865 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-07 15:28:47,077 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.764s at 2026-05-07T21:28:47.077622+00:00 -2026-05-07 15:28:59,114 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:28:59.114208+00:00 -2026-05-07 15:28:59,643 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-07 15:28:59,870 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.756s at 2026-05-07T21:28:59.870175+00:00 -2026-05-07 15:29:02,857 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:29:02.857460+00:00 -2026-05-07 15:29:03,385 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-07 15:29:03,598 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.741s at 2026-05-07T21:29:03.598245+00:00 -2026-05-07 15:29:09,230 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:29:09.230242+00:00 -2026-05-07 15:29:09,812 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=2.27, h_ratio=1.02) -2026-05-07 15:29:09,836 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-07 15:29:10,063 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.832s at 2026-05-07T21:29:10.063265+00:00 -2026-05-07 15:30:08,609 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:30:08.608222+00:00 -2026-05-07 15:30:09,164 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=2.27, h_ratio=1.02) -2026-05-07 15:30:09,188 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-07 15:30:09,393 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.785s at 2026-05-07T21:30:09.393640+00:00 -2026-05-07 15:30:14,390 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:30:14.390221+00:00 -2026-05-07 15:30:14,951 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=2.27, h_ratio=1.02) -2026-05-07 15:30:14,970 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-07 15:30:15,192 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.803s at 2026-05-07T21:30:15.192554+00:00 -2026-05-07 15:30:40,712 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T21:30:40.712459+00:00 -2026-05-07 15:30:40,713 INFO backend.segmentation: [JOB 9d4215753f664bf08bfac6b433db1a36] preparing_image progress=12 -2026-05-07 15:30:40,791 INFO backend.segmentation: [JOB 9d4215753f664bf08bfac6b433db1a36] segmenting_with_sam2 progress=30 estimated_seconds=63.05024 -2026-05-07 15:30:40,792 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 -2026-05-07 15:30:43,195 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-07 15:30:45,588 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-07 15:30:45,733 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-07 15:30:48,162 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-07 15:30:48,173 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/d1c209e4-d368-4e81-8ce0-b7c8824ed437 "HTTP/1.1 200 OK" -2026-05-07 15:30:50,534 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-07 15:30:53,316 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=d1c209e4-d368-4e81-8ce0-b7c8824ed437 "HTTP/1.1 200 OK" -2026-05-07 15:33:13,981 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\3944faeeae589a5b426a0f9b9ce0280816fb839f02b7dd9ab2628c5aef775da2\image.webp "HTTP/1.1 200 OK" -2026-05-07 15:33:13,999 INFO services.gradio_client_service: Gradio Space segmentation: entorno=gpu motor=SAM Auto (GPU - ZeroGPU) mask_count=66 -2026-05-07 15:33:14,000 INFO backend.segmentation: [JOB 9d4215753f664bf08bfac6b433db1a36] saving_masks progress=92 -2026-05-07 15:33:14,323 INFO backend.segmentation: [JOB 9d4215753f664bf08bfac6b433db1a36] segments_meta saved (66 segments) -2026-05-07 15:33:14,324 INFO backend.segmentation: [JOB 9d4215753f664bf08bfac6b433db1a36] done mask_count=66 -2026-05-07 15:33:14,325 INFO backend.segmentation: [UPLOAD_BG] DONE 153.613s at 2026-05-07T21:33:14.324926+00:00 -2026-05-07 15:33:14,325 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-07 15:33:20,991 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:33:20.991904+00:00 -2026-05-07 15:33:21,557 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.23, h_ratio=1.03) -2026-05-07 15:33:21,587 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-07 15:33:21,856 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.865s at 2026-05-07T21:33:21.856475+00:00 -2026-05-07 15:33:23,187 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:33:23.187537+00:00 -2026-05-07 15:33:23,640 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.03, h_ratio=106.02) -2026-05-07 15:33:23,660 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-07 15:33:23,887 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.700s at 2026-05-07T21:33:23.887323+00:00 -2026-05-07 15:33:28,666 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:33:28.666370+00:00 -2026-05-07 15:33:29,256 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.24, h_ratio=1.13) -2026-05-07 15:33:29,278 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-07 15:33:29,514 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.849s at 2026-05-07T21:33:29.514966+00:00 -2026-05-07 15:33:35,559 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:33:35.559814+00:00 -2026-05-07 15:33:36,119 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.23, h_ratio=1.03) -2026-05-07 15:33:36,156 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-07 15:33:36,369 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.810s at 2026-05-07T21:33:36.369980+00:00 -2026-05-07 15:33:41,348 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:33:41.348944+00:00 -2026-05-07 15:33:41,841 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.23, h_ratio=1.03) -2026-05-07 15:33:41,873 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-07 15:33:42,143 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.796s at 2026-05-07T21:33:42.143571+00:00 -2026-05-07 15:34:05,661 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:34:05.661441+00:00 -2026-05-07 15:34:06,223 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.53, h_ratio=1.33) -2026-05-07 15:34:06,245 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg -2026-05-07 15:34:06,458 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.797s at 2026-05-07T21:34:06.458559+00:00 -2026-05-07 15:37:38,373 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T21:37:38.373999+00:00 -2026-05-07 15:37:38,375 INFO backend.segmentation: [JOB 24ce2b1d21234ddb8fbb35b45f4d8792] preparing_image progress=12 -2026-05-07 15:37:38,423 INFO backend.segmentation: [JOB 24ce2b1d21234ddb8fbb35b45f4d8792] segmenting_with_sam2 progress=30 estimated_seconds=94.01599999999999 -2026-05-07 15:37:38,423 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 -2026-05-07 15:37:40,841 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-07 15:37:43,152 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-07 15:37:43,304 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-07 15:37:45,640 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-07 15:37:45,645 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/96233e8c-fcb3-4e6e-a52b-43f262d4afc5 "HTTP/1.1 200 OK" -2026-05-07 15:37:48,001 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-07 15:37:50,838 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=96233e8c-fcb3-4e6e-a52b-43f262d4afc5 "HTTP/1.1 200 OK" -2026-05-07 15:39:30,039 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\56758f540e1c547de434b369fae158810fde033fe3650199c54eecf9fd68ac46\image.webp "HTTP/1.1 200 OK" -2026-05-07 15:39:30,055 INFO services.gradio_client_service: Gradio Space segmentation: entorno=gpu motor=SAM Auto (GPU - ZeroGPU) mask_count=58 -2026-05-07 15:39:30,056 INFO backend.segmentation: [JOB 24ce2b1d21234ddb8fbb35b45f4d8792] saving_masks progress=92 -2026-05-07 15:39:30,380 INFO backend.segmentation: [JOB 24ce2b1d21234ddb8fbb35b45f4d8792] segments_meta saved (58 segments) -2026-05-07 15:39:30,381 INFO backend.segmentation: [JOB 24ce2b1d21234ddb8fbb35b45f4d8792] done mask_count=58 -2026-05-07 15:39:30,381 INFO backend.segmentation: [UPLOAD_BG] DONE 112.008s at 2026-05-07T21:39:30.381897+00:00 -2026-05-07 15:39:30,381 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-07 15:42:27,756 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:42:27.756524+00:00 -2026-05-07 15:42:28,316 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm azul.jpg -2026-05-07 15:42:28,714 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.958s at 2026-05-07T21:42:28.714486+00:00 -2026-05-07 15:42:31,110 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:42:31.110675+00:00 -2026-05-07 15:42:31,681 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm azul.jpg -2026-05-07 15:42:32,030 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.920s at 2026-05-07T21:42:32.030068+00:00 -2026-05-07 15:42:36,790 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:42:36.789013+00:00 -2026-05-07 15:42:37,354 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm azul.jpg -2026-05-07 15:42:37,723 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.934s at 2026-05-07T21:42:37.723785+00:00 -2026-05-07 15:42:43,821 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:42:43.821895+00:00 -2026-05-07 15:42:44,133 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm azul.jpg -2026-05-07 15:42:44,503 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.682s at 2026-05-07T21:42:44.503891+00:00 -2026-05-07 15:42:45,709 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:42:45.709851+00:00 -2026-05-07 15:42:46,014 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm azul.jpg -2026-05-07 15:42:46,365 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.656s at 2026-05-07T21:42:46.365851+00:00 -2026-05-07 15:42:48,755 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:42:48.755885+00:00 -2026-05-07 15:42:49,065 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm azul.jpg -2026-05-07 15:42:49,433 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.677s at 2026-05-07T21:42:49.433452+00:00 -2026-05-07 15:42:56,861 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:42:56.861868+00:00 -2026-05-07 15:42:57,289 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm azul.jpg -2026-05-07 15:42:57,689 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.827s at 2026-05-07T21:42:57.687938+00:00 -2026-05-07 15:47:02,637 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:47:02.637766+00:00 -2026-05-07 15:47:02,987 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm azul.jpg -2026-05-07 15:47:03,354 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.717s at 2026-05-07T21:47:03.354802+00:00 -2026-05-07 15:47:06,315 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:47:06.315345+00:00 -2026-05-07 15:47:06,692 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.31, h_ratio=1.04) -2026-05-07 15:47:06,734 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm azul.jpg -2026-05-07 15:47:07,092 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.777s at 2026-05-07T21:47:07.092208+00:00 -2026-05-07 15:47:19,592 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T21:47:19.592166+00:00 -2026-05-07 15:47:19,593 INFO backend.segmentation: [JOB fe9309b4ebae4857a7b0ff42d9faf677] preparing_image progress=12 -2026-05-07 15:47:20,196 INFO backend.segmentation: [JOB fe9309b4ebae4857a7b0ff42d9faf677] segmenting_with_sam2 progress=30 estimated_seconds=57.674240000000005 -2026-05-07 15:47:20,197 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 -2026-05-07 15:47:22,577 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-07 15:47:24,974 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-07 15:47:25,112 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-07 15:47:27,430 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/9d1507c0-f15b-4ce4-8a14-a75643934023 "HTTP/1.1 200 OK" -2026-05-07 15:47:27,451 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-07 15:47:29,917 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-07 15:47:32,852 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=9d1507c0-f15b-4ce4-8a14-a75643934023 "HTTP/1.1 200 OK" -2026-05-07 15:49:56,285 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\7fb2980e7537a93df201edb46c01cac70b34b0d407baf16d8c766c8326b688bb\image.webp "HTTP/1.1 200 OK" -2026-05-07 15:49:56,299 INFO services.gradio_client_service: Gradio Space segmentation: entorno=gpu motor=SAM Auto (GPU - ZeroGPU) mask_count=56 -2026-05-07 15:49:56,301 INFO backend.segmentation: [JOB fe9309b4ebae4857a7b0ff42d9faf677] saving_masks progress=92 -2026-05-07 15:49:56,485 INFO backend.segmentation: [JOB fe9309b4ebae4857a7b0ff42d9faf677] segments_meta saved (56 segments) -2026-05-07 15:49:56,486 INFO backend.segmentation: [JOB fe9309b4ebae4857a7b0ff42d9faf677] done mask_count=56 -2026-05-07 15:49:56,486 INFO backend.segmentation: [UPLOAD_BG] DONE 156.895s at 2026-05-07T21:49:56.486476+00:00 -2026-05-07 15:49:56,486 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-07 15:50:23,300 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:50:23.300896+00:00 -2026-05-07 15:50:23,632 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.01, h_ratio=1.43) -2026-05-07 15:50:23,649 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\EB-UD3231 (1).jpg -2026-05-07 15:50:23,860 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.560s at 2026-05-07T21:50:23.860900+00:00 -2026-05-07 15:50:25,390 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:50:25.390001+00:00 -2026-05-07 15:50:25,729 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.05, h_ratio=1.59) -2026-05-07 15:50:25,748 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\EB-UD3231 (1).jpg -2026-05-07 15:50:25,961 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.573s at 2026-05-07T21:50:25.961503+00:00 -2026-05-07 15:50:29,067 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:50:29.067701+00:00 -2026-05-07 15:50:29,357 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\EB-UD3231 (1).jpg -2026-05-07 15:50:29,574 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.505s at 2026-05-07T21:50:29.573244+00:00 -2026-05-07 15:50:30,765 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:50:30.765933+00:00 -2026-05-07 15:50:31,113 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.43, h_ratio=1.00) -2026-05-07 15:50:31,135 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\EB-UD3231 (1).jpg -2026-05-07 15:50:31,381 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.616s at 2026-05-07T21:50:31.381120+00:00 -2026-05-07 15:50:34,372 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:50:34.372354+00:00 -2026-05-07 15:50:34,702 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\EB-UD3231 (1).jpg -2026-05-07 15:50:34,919 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.547s at 2026-05-07T21:50:34.919402+00:00 -2026-05-07 15:50:38,283 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:50:38.283908+00:00 -2026-05-07 15:50:38,620 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\EB-UD3231 (1).jpg -2026-05-07 15:50:38,822 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.538s at 2026-05-07T21:50:38.821521+00:00 -2026-05-07 15:50:42,362 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:50:42.362356+00:00 -2026-05-07 15:50:42,752 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.01, h_ratio=81.06) -2026-05-07 15:50:42,770 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\EB-UD3231 (1).jpg -2026-05-07 15:50:42,983 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.622s at 2026-05-07T21:50:42.983933+00:00 -2026-05-07 15:50:46,827 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:50:46.827950+00:00 -2026-05-07 15:50:47,260 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\EB-UD3231 (1).jpg -2026-05-07 15:50:47,509 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.681s at 2026-05-07T21:50:47.509694+00:00 -2026-05-07 15:50:51,671 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:50:51.671277+00:00 -2026-05-07 15:50:52,056 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\EB-UD3231 (1).jpg -2026-05-07 15:50:52,261 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.591s at 2026-05-07T21:50:52.261800+00:00 -2026-05-07 15:51:01,177 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T21:51:01.177947+00:00 -2026-05-07 15:51:01,177 INFO backend.segmentation: [JOB 79a04736dcfa4abc8383a745c149b88c] preparing_image progress=12 -2026-05-07 15:51:01,277 INFO backend.segmentation: [JOB 79a04736dcfa4abc8383a745c149b88c] segmenting_with_sam2 progress=30 estimated_seconds=71.65183999999999 -2026-05-07 15:51:01,279 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 -2026-05-07 15:51:03,724 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-07 15:51:06,105 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-07 15:51:06,299 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-07 15:51:08,531 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/1f6ec649-450c-4d10-a42f-a0714e8554c6 "HTTP/1.1 200 OK" -2026-05-07 15:51:08,533 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-07 15:51:10,974 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-07 15:51:13,861 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=1f6ec649-450c-4d10-a42f-a0714e8554c6 "HTTP/1.1 200 OK" -2026-05-07 15:53:32,035 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\9b2d1c318212280bd44f91bf2c3aa028767f3015780e04d1e67d456398adfe23\image.webp "HTTP/1.1 200 OK" -2026-05-07 15:53:32,051 INFO services.gradio_client_service: Gradio Space segmentation: entorno=gpu motor=SAM Auto (GPU - ZeroGPU) mask_count=55 -2026-05-07 15:53:32,051 INFO backend.segmentation: [JOB 79a04736dcfa4abc8383a745c149b88c] saving_masks progress=92 -2026-05-07 15:53:32,291 INFO backend.segmentation: [JOB 79a04736dcfa4abc8383a745c149b88c] segments_meta saved (55 segments) -2026-05-07 15:53:32,291 INFO backend.segmentation: [JOB 79a04736dcfa4abc8383a745c149b88c] done mask_count=55 -2026-05-07 15:53:32,291 INFO backend.segmentation: [UPLOAD_BG] DONE 151.115s at 2026-05-07T21:53:32.291574+00:00 -2026-05-07 15:53:32,291 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-07 15:53:42,312 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:53:42.312363+00:00 -2026-05-07 15:53:42,838 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.04, h_ratio=1.36) -2026-05-07 15:53:42,868 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\unnamed.jpg -2026-05-07 15:53:43,124 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.812s at 2026-05-07T21:53:43.124323+00:00 -2026-05-07 15:53:45,407 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:53:45.407699+00:00 -2026-05-07 15:53:45,913 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\unnamed.jpg -2026-05-07 15:53:46,160 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.752s at 2026-05-07T21:53:46.160544+00:00 -2026-05-07 15:53:51,917 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:53:51.917268+00:00 -2026-05-07 15:53:52,460 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.04, h_ratio=1.36) -2026-05-07 15:53:52,504 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\unnamed.jpg -2026-05-07 15:53:52,784 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.868s at 2026-05-07T21:53:52.784729+00:00 -2026-05-07 15:53:59,737 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:53:59.737940+00:00 -2026-05-07 15:54:00,303 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.01, h_ratio=1.26) -2026-05-07 15:54:00,325 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\unnamed.jpg -2026-05-07 15:54:00,581 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.843s at 2026-05-07T21:54:00.581113+00:00 -2026-05-07 15:54:07,204 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:54:07.204959+00:00 -2026-05-07 15:54:07,723 INFO backend.segmentation: [APPLY_TEXTURE] flat floor tiling (trap=0.02 < 0.35, skip perspective) -2026-05-07 15:54:07,755 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\unnamed.jpg -2026-05-07 15:54:08,011 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.806s at 2026-05-07T21:54:08.011194+00:00 -2026-05-07 15:54:14,251 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:54:14.251503+00:00 -2026-05-07 15:54:14,586 INFO backend.segmentation: [APPLY_TEXTURE] flat floor tiling (trap=0.02 < 0.35, skip perspective) -2026-05-07 15:54:14,618 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\unnamed.jpg -2026-05-07 15:54:14,893 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.642s at 2026-05-07T21:54:14.893824+00:00 -2026-05-07 15:54:20,951 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:54:20.951821+00:00 -2026-05-07 15:54:21,369 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.00, h_ratio=1.21) -2026-05-07 15:54:21,394 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\unnamed.jpg -2026-05-07 15:54:21,654 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.703s at 2026-05-07T21:54:21.654007+00:00 -2026-05-07 15:55:49,324 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T21:55:49.324991+00:00 -2026-05-07 15:55:49,325 INFO backend.segmentation: [JOB df4da3c76a584af9a84bfa05b6253222] preparing_image progress=12 -2026-05-07 15:55:49,407 INFO backend.segmentation: [JOB df4da3c76a584af9a84bfa05b6253222] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 -2026-05-07 15:55:49,407 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 -2026-05-07 15:55:51,777 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-07 15:55:54,163 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-07 15:55:54,303 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-07 15:55:56,641 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/ddc1fa5d-ad06-492d-be12-a7f5ee46894f "HTTP/1.1 200 OK" -2026-05-07 15:55:56,647 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-07 15:55:59,061 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-07 15:56:01,950 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=ddc1fa5d-ad06-492d-be12-a7f5ee46894f "HTTP/1.1 200 OK" -2026-05-07 15:58:10,784 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\63f35ee774073b13ee87a1d3c7e73d1d3b47b4183190f3b098b633273f464612\image.webp "HTTP/1.1 200 OK" -2026-05-07 15:58:10,799 INFO services.gradio_client_service: Gradio Space segmentation: entorno=gpu motor=SAM Auto (GPU - ZeroGPU) mask_count=61 -2026-05-07 15:58:10,799 INFO backend.segmentation: [JOB df4da3c76a584af9a84bfa05b6253222] saving_masks progress=92 -2026-05-07 15:58:11,031 INFO backend.segmentation: [JOB df4da3c76a584af9a84bfa05b6253222] segments_meta saved (61 segments) -2026-05-07 15:58:11,033 INFO backend.segmentation: [JOB df4da3c76a584af9a84bfa05b6253222] done mask_count=61 -2026-05-07 15:58:11,033 INFO backend.segmentation: [UPLOAD_BG] DONE 141.708s at 2026-05-07T21:58:11.033788+00:00 -2026-05-07 15:58:11,033 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-07 15:58:20,920 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:58:20.920319+00:00 -2026-05-07 15:58:21,375 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.23, h_ratio=1.07) -2026-05-07 15:58:21,407 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-05-07 15:58:21,598 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.679s at 2026-05-07T21:58:21.598068+00:00 -2026-05-07 15:58:24,623 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:58:24.623163+00:00 -2026-05-07 15:58:25,169 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.23, h_ratio=1.07) -2026-05-07 15:58:25,191 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-05-07 15:58:25,360 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.738s at 2026-05-07T21:58:25.360818+00:00 -2026-05-07 15:58:28,165 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:58:28.165635+00:00 -2026-05-07 15:58:28,661 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-05-07 15:58:28,843 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.678s at 2026-05-07T21:58:28.843020+00:00 -2026-05-07 15:58:32,464 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:58:32.464694+00:00 -2026-05-07 15:58:32,978 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.08, h_ratio=1.42) -2026-05-07 15:58:32,994 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-05-07 15:58:33,161 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.696s at 2026-05-07T21:58:33.161634+00:00 -2026-05-07 15:58:38,273 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:58:38.273840+00:00 -2026-05-07 15:58:38,781 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.13, h_ratio=2.54) -2026-05-07 15:58:38,796 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-05-07 15:58:39,000 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.726s at 2026-05-07T21:58:39.000222+00:00 -2026-05-07 15:58:46,330 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:58:46.330265+00:00 -2026-05-07 15:58:46,828 INFO backend.segmentation: [APPLY_TEXTURE] perspective floor tiling applied (trap=1.00) -2026-05-07 15:58:46,842 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-05-07 15:58:47,013 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.682s at 2026-05-07T21:58:47.013199+00:00 -2026-05-07 15:58:50,609 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:58:50.609562+00:00 -2026-05-07 15:58:51,166 INFO backend.segmentation: [APPLY_TEXTURE] perspective floor tiling applied (trap=1.00) -2026-05-07 15:58:51,183 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-05-07 15:58:51,361 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.752s at 2026-05-07T21:58:51.361385+00:00 -2026-05-07 15:58:55,441 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:58:55.441205+00:00 -2026-05-07 15:58:55,946 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-05-07 15:58:56,114 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.673s at 2026-05-07T21:58:56.113779+00:00 -2026-05-07 15:59:08,450 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:59:08.450556+00:00 -2026-05-07 15:59:08,975 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.23, h_ratio=1.07) -2026-05-07 15:59:09,001 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-05-07 15:59:09,173 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.723s at 2026-05-07T21:59:09.173815+00:00 -2026-05-07 15:59:16,551 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T21:59:16.551116+00:00 -2026-05-07 15:59:16,552 INFO backend.segmentation: [JOB 08b23c3c64214b4aa800997fa64cd9a7] preparing_image progress=12 -2026-05-07 15:59:16,631 INFO backend.segmentation: [JOB 08b23c3c64214b4aa800997fa64cd9a7] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 -2026-05-07 15:59:16,631 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 -2026-05-07 15:59:18,993 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-07 15:59:21,337 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-07 15:59:21,485 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-07 15:59:23,779 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/c1c694f0-2678-4cce-a664-ce7657360059 "HTTP/1.1 200 OK" -2026-05-07 15:59:23,799 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-07 15:59:26,196 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-07 15:59:29,114 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=c1c694f0-2678-4cce-a664-ce7657360059 "HTTP/1.1 200 OK" -2026-05-07 16:01:40,463 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\3f4bbc5e6cf6ca3e1f300135e65cb8423907d8d2601a24cab61eaf4e68bb94d8\image.webp "HTTP/1.1 200 OK" -2026-05-07 16:01:40,478 INFO services.gradio_client_service: Gradio Space segmentation: entorno=gpu motor=SAM Auto (GPU - ZeroGPU) mask_count=51 -2026-05-07 16:01:40,479 INFO backend.segmentation: [JOB 08b23c3c64214b4aa800997fa64cd9a7] saving_masks progress=92 -2026-05-07 16:01:40,648 INFO backend.segmentation: [JOB 08b23c3c64214b4aa800997fa64cd9a7] segments_meta saved (51 segments) -2026-05-07 16:01:40,649 INFO backend.segmentation: [JOB 08b23c3c64214b4aa800997fa64cd9a7] done mask_count=51 -2026-05-07 16:01:40,649 INFO backend.segmentation: [UPLOAD_BG] DONE 144.098s at 2026-05-07T22:01:40.649441+00:00 -2026-05-07 16:01:40,649 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-07 16:04:16,992 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T22:04:16.992111+00:00 -2026-05-07 16:04:17,540 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-05-07 16:04:17,715 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.724s at 2026-05-07T22:04:17.715600+00:00 -2026-05-07 16:04:20,514 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T22:04:20.514659+00:00 -2026-05-07 16:04:21,019 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.03, h_ratio=1.38) -2026-05-07 16:04:21,036 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-05-07 16:04:21,242 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.727s at 2026-05-07T22:04:21.242012+00:00 -2026-05-07 16:04:28,071 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T22:04:28.071982+00:00 -2026-05-07 16:04:28,407 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.30, h_ratio=1.35) -2026-05-07 16:04:28,428 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-05-07 16:04:28,596 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.525s at 2026-05-07T22:04:28.596511+00:00 -2026-05-07 16:04:30,490 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T22:04:30.490530+00:00 -2026-05-07 16:04:30,813 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.02, h_ratio=1.81) -2026-05-07 16:04:30,833 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-05-07 16:04:31,008 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.519s at 2026-05-07T22:04:31.008084+00:00 -2026-05-07 16:05:02,767 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T22:05:02.767829+00:00 -2026-05-07 16:05:03,251 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg -2026-05-07 16:05:03,405 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.636s at 2026-05-07T22:05:03.405079+00:00 -2026-05-07 16:05:43,990 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T22:05:43.990943+00:00 -2026-05-07 16:05:43,990 INFO backend.segmentation: [JOB 3e0cf02dd665435db0db0a0143215be8] preparing_image progress=12 -2026-05-07 16:05:44,067 INFO backend.segmentation: [JOB 3e0cf02dd665435db0db0a0143215be8] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 -2026-05-07 16:05:44,067 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 -2026-05-07 16:05:46,491 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-07 16:05:48,868 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-07 16:05:49,016 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-07 16:05:51,323 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/6f95fab4-a857-4501-89ac-ccbf7e0581ea "HTTP/1.1 200 OK" -2026-05-07 16:05:51,327 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-07 16:05:53,691 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-07 16:05:56,691 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=6f95fab4-a857-4501-89ac-ccbf7e0581ea "HTTP/1.1 200 OK" -2026-05-07 16:08:09,268 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\63f35ee774073b13ee87a1d3c7e73d1d3b47b4183190f3b098b633273f464612\image.webp "HTTP/1.1 200 OK" -2026-05-07 16:08:09,288 INFO services.gradio_client_service: Gradio Space segmentation: entorno=gpu motor=SAM Auto (GPU - ZeroGPU) mask_count=61 -2026-05-07 16:08:09,289 INFO backend.segmentation: [JOB 3e0cf02dd665435db0db0a0143215be8] saving_masks progress=92 -2026-05-07 16:08:09,486 INFO backend.segmentation: [JOB 3e0cf02dd665435db0db0a0143215be8] segments_meta saved (61 segments) -2026-05-07 16:08:09,486 INFO backend.segmentation: [JOB 3e0cf02dd665435db0db0a0143215be8] done mask_count=61 -2026-05-07 16:08:09,488 INFO backend.segmentation: [UPLOAD_BG] DONE 145.497s at 2026-05-07T22:08:09.488380+00:00 -2026-05-07 16:08:09,488 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-07 16:22:47,224 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T22:22:47.224087+00:00 -2026-05-07 16:22:47,225 INFO backend.segmentation: [JOB bc86ad310222406a8ffacc5db249c183] preparing_image progress=12 -2026-05-07 16:22:47,297 INFO backend.segmentation: [JOB bc86ad310222406a8ffacc5db249c183] segmenting_with_sam2 progress=30 estimated_seconds=58.39104 -2026-05-07 16:22:47,298 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 -2026-05-07 16:22:49,799 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-07 16:22:52,184 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-07 16:22:52,330 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-07 16:22:54,605 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/3d5ff637-214a-47c4-8a4f-d64d884b7a8b "HTTP/1.1 200 OK" -2026-05-07 16:22:54,640 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-07 16:22:57,021 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-07 16:23:00,162 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=3d5ff637-214a-47c4-8a4f-d64d884b7a8b "HTTP/1.1 200 OK" -2026-05-07 16:25:15,470 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\e9e23a4c03e9b88d2db6cb764c2778b1091e1c8b97c256c28501ff9297140221\image.webp "HTTP/1.1 200 OK" -2026-05-07 16:25:15,487 INFO services.gradio_client_service: Gradio Space segmentation: entorno=gpu motor=SAM Auto (GPU - ZeroGPU) mask_count=63 -2026-05-07 16:25:15,487 INFO backend.segmentation: [JOB bc86ad310222406a8ffacc5db249c183] saving_masks progress=92 -2026-05-07 16:25:15,707 INFO backend.segmentation: [JOB bc86ad310222406a8ffacc5db249c183] segments_meta saved (63 segments) -2026-05-07 16:25:15,708 INFO backend.segmentation: [JOB bc86ad310222406a8ffacc5db249c183] done mask_count=63 -2026-05-07 16:25:15,708 INFO backend.segmentation: [UPLOAD_BG] DONE 148.483s at 2026-05-07T22:25:15.708008+00:00 -2026-05-07 16:25:15,708 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-07 16:29:50,418 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T22:29:50.418894+00:00 -2026-05-07 16:29:50,418 INFO backend.segmentation: [JOB ddc21cbf4f774a4590e387679154a1d1] preparing_image progress=12 -2026-05-07 16:29:50,498 INFO backend.segmentation: [JOB ddc21cbf4f774a4590e387679154a1d1] segmenting_with_sam2 progress=30 estimated_seconds=58.39104 -2026-05-07 16:29:50,500 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 -2026-05-07 16:29:52,926 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-07 16:29:55,311 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-07 16:29:55,457 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-07 16:29:57,773 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/c79c4e3d-25f5-4e6a-a4ba-45e7493b7b23 "HTTP/1.1 200 OK" -2026-05-07 16:29:57,774 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-07 16:30:00,168 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-07 16:30:03,061 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=c79c4e3d-25f5-4e6a-a4ba-45e7493b7b23 "HTTP/1.1 200 OK" -2026-05-07 16:32:17,053 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\e9e23a4c03e9b88d2db6cb764c2778b1091e1c8b97c256c28501ff9297140221\image.webp "HTTP/1.1 200 OK" -2026-05-07 16:32:17,071 INFO services.gradio_client_service: Gradio Space segmentation: entorno=gpu motor=SAM Auto (GPU - ZeroGPU) mask_count=63 -2026-05-07 16:32:17,071 INFO backend.segmentation: [JOB ddc21cbf4f774a4590e387679154a1d1] saving_masks progress=92 -2026-05-07 16:32:17,286 INFO backend.segmentation: [JOB ddc21cbf4f774a4590e387679154a1d1] segments_meta saved (63 segments) -2026-05-07 16:32:17,286 INFO backend.segmentation: [JOB ddc21cbf4f774a4590e387679154a1d1] done mask_count=63 -2026-05-07 16:32:17,288 INFO backend.segmentation: [UPLOAD_BG] DONE 146.869s at 2026-05-07T22:32:17.288291+00:00 -2026-05-07 16:32:17,288 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-07 16:32:41,697 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T22:32:41.697454+00:00 -2026-05-07 16:32:42,204 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-07 16:32:42,424 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.726s at 2026-05-07T22:32:42.424111+00:00 -2026-05-07 16:33:01,624 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T22:33:01.624117+00:00 -2026-05-07 16:33:01,624 INFO backend.segmentation: [JOB e3808e0cd3a54671be6ce77b16600d2d] preparing_image progress=12 -2026-05-07 16:33:01,697 INFO backend.segmentation: [JOB e3808e0cd3a54671be6ce77b16600d2d] segmenting_with_sam2 progress=30 estimated_seconds=58.39104 -2026-05-07 16:33:01,698 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 -2026-05-07 16:33:04,132 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-07 16:33:06,530 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-07 16:33:06,692 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-07 16:33:08,991 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/78cd91de-4ac8-417d-a699-df5ceae4592f "HTTP/1.1 200 OK" -2026-05-07 16:33:08,994 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-07 16:33:11,414 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-07 16:33:14,289 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=78cd91de-4ac8-417d-a699-df5ceae4592f "HTTP/1.1 200 OK" -2026-05-07 16:35:33,030 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\e9e23a4c03e9b88d2db6cb764c2778b1091e1c8b97c256c28501ff9297140221\image.webp "HTTP/1.1 200 OK" -2026-05-07 16:35:33,049 INFO services.gradio_client_service: Gradio Space segmentation: entorno=gpu motor=SAM Auto (GPU - ZeroGPU) mask_count=63 -2026-05-07 16:35:33,049 INFO backend.segmentation: [JOB e3808e0cd3a54671be6ce77b16600d2d] saving_masks progress=92 -2026-05-07 16:35:33,274 INFO backend.segmentation: [JOB e3808e0cd3a54671be6ce77b16600d2d] segments_meta saved (63 segments) -2026-05-07 16:35:33,275 INFO backend.segmentation: [JOB e3808e0cd3a54671be6ce77b16600d2d] done mask_count=63 -2026-05-07 16:35:33,276 INFO backend.segmentation: [UPLOAD_BG] DONE 151.652s at 2026-05-07T22:35:33.276280+00:00 -2026-05-07 16:35:33,276 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-07 16:36:09,236 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T22:36:09.236174+00:00 -2026-05-07 16:36:09,540 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.59, h_ratio=1.44) -2026-05-07 16:36:09,562 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-07 16:36:09,777 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.540s at 2026-05-07T22:36:09.777110+00:00 -2026-05-07 16:36:15,985 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T22:36:15.985071+00:00 -2026-05-07 16:36:16,483 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.16, h_ratio=1.26) -2026-05-07 16:36:16,504 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-07 16:36:16,716 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.731s at 2026-05-07T22:36:16.716050+00:00 -2026-05-07 16:36:25,017 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T22:36:25.017619+00:00 -2026-05-07 16:36:25,564 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.03, h_ratio=1.37) -2026-05-07 16:36:25,587 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-07 16:36:25,803 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.786s at 2026-05-07T22:36:25.803112+00:00 -2026-05-07 16:36:26,817 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T22:36:26.817271+00:00 -2026-05-07 16:36:27,352 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-07 16:36:27,584 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.767s at 2026-05-07T22:36:27.584739+00:00 -2026-05-07 16:36:28,334 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T22:36:28.334300+00:00 -2026-05-07 16:36:28,857 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-07 16:36:29,081 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.747s at 2026-05-07T22:36:29.081102+00:00 -2026-05-07 16:36:32,240 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T22:36:32.240623+00:00 -2026-05-07 16:36:32,772 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-07 16:36:33,003 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.763s at 2026-05-07T22:36:33.003855+00:00 -2026-05-07 16:40:31,573 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T22:40:31.573485+00:00 -2026-05-07 16:40:31,573 INFO backend.segmentation: [JOB abe6fcd597e44e188de85ec16c828d4f] preparing_image progress=12 -2026-05-07 16:40:31,619 INFO backend.segmentation: [JOB abe6fcd597e44e188de85ec16c828d4f] segmenting_with_sam2 progress=30 estimated_seconds=94.01599999999999 -2026-05-07 16:40:31,620 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 -2026-05-07 16:40:34,052 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-07 16:40:36,278 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-07 16:40:36,412 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-07 16:40:38,556 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/e3bbcd8a-d009-4eb7-b2ef-0318dd7f287c "HTTP/1.1 200 OK" -2026-05-07 16:40:38,575 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-07 16:40:40,832 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-07 16:40:43,079 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=e3bbcd8a-d009-4eb7-b2ef-0318dd7f287c "HTTP/1.1 200 OK" -2026-05-07 16:42:01,159 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\56758f540e1c547de434b369fae158810fde033fe3650199c54eecf9fd68ac46\image.webp "HTTP/1.1 200 OK" -2026-05-07 16:42:01,173 INFO services.gradio_client_service: Gradio Space segmentation: entorno=gpu motor=SAM Auto (GPU - ZeroGPU) mask_count=58 -2026-05-07 16:42:01,174 INFO backend.segmentation: [JOB abe6fcd597e44e188de85ec16c828d4f] saving_masks progress=92 -2026-05-07 16:42:01,396 INFO backend.segmentation: [JOB abe6fcd597e44e188de85ec16c828d4f] segments_meta saved (58 segments) -2026-05-07 16:42:01,397 INFO backend.segmentation: [JOB abe6fcd597e44e188de85ec16c828d4f] done mask_count=58 -2026-05-07 16:42:01,397 INFO backend.segmentation: [UPLOAD_BG] DONE 89.824s at 2026-05-07T22:42:01.397333+00:00 -2026-05-07 16:42:01,397 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-07 16:43:02,036 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T22:43:02.036847+00:00 -2026-05-07 16:43:02,036 INFO backend.segmentation: [JOB 98668f875a5a491a9e24d80f6c5877f7] preparing_image progress=12 -2026-05-07 16:43:02,378 INFO backend.segmentation: [JOB 98668f875a5a491a9e24d80f6c5877f7] segmenting_with_sam2 progress=30 estimated_seconds=105.8432 -2026-05-07 16:43:02,380 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 -2026-05-07 16:43:04,773 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-07 16:43:07,148 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-07 16:43:07,281 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-07 16:43:09,603 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/a89250d1-ac0d-45ef-9bdc-7f28bdbd5c74 "HTTP/1.1 200 OK" -2026-05-07 16:43:09,607 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-07 16:43:12,018 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-07 16:43:14,837 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=a89250d1-ac0d-45ef-9bdc-7f28bdbd5c74 "HTTP/1.1 200 OK" -2026-05-07 16:45:52,678 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\fe7e296f49e3953b396fc8aeb7f4885b83ba4201a8d3f8d451ff0339d7391c52\image.webp "HTTP/1.1 200 OK" -2026-05-07 16:45:52,698 INFO services.gradio_client_service: Gradio Space segmentation: entorno=gpu motor=SAM Auto (GPU - ZeroGPU) mask_count=74 -2026-05-07 16:45:52,698 INFO backend.segmentation: [JOB 98668f875a5a491a9e24d80f6c5877f7] saving_masks progress=92 -2026-05-07 16:45:53,143 INFO backend.segmentation: [JOB 98668f875a5a491a9e24d80f6c5877f7] segments_meta saved (74 segments) -2026-05-07 16:45:53,143 INFO backend.segmentation: [JOB 98668f875a5a491a9e24d80f6c5877f7] done mask_count=74 -2026-05-07 16:45:53,144 INFO backend.segmentation: [UPLOAD_BG] DONE 171.106s at 2026-05-07T22:45:53.144055+00:00 -2026-05-07 16:45:53,144 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-07 16:46:04,090 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T22:46:04.090988+00:00 -2026-05-07 16:46:04,428 INFO backend.segmentation: [APPLY_TEXTURE] flat floor tiling (trap=0.31 < 0.35, skip perspective) -2026-05-07 16:46:04,482 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm gris.jpg -2026-05-07 16:46:04,894 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.803s at 2026-05-07T22:46:04.893619+00:00 -2026-05-07 16:46:13,581 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T22:46:13.581681+00:00 -2026-05-07 16:46:13,926 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm gris.jpg -2026-05-07 16:46:14,330 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.749s at 2026-05-07T22:46:14.330751+00:00 -2026-05-07 16:46:19,978 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T22:46:19.978023+00:00 -2026-05-07 16:46:20,448 INFO backend.segmentation: [APPLY_TEXTURE] flat floor tiling (trap=0.31 < 0.35, skip perspective) -2026-05-07 16:46:20,501 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm gris.jpg -2026-05-07 16:46:20,917 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.939s at 2026-05-07T22:46:20.917957+00:00 -2026-05-07 16:46:24,322 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T22:46:24.322422+00:00 -2026-05-07 16:46:24,904 INFO backend.segmentation: [APPLY_TEXTURE] perspective floor tiling applied (trap=1.00) -2026-05-07 16:46:24,949 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm gris.jpg -2026-05-07 16:46:25,362 INFO backend.segmentation: [APPLY_TEXTURE] DONE 1.040s at 2026-05-07T22:46:25.362160+00:00 -2026-05-07 16:46:29,955 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T22:46:29.955304+00:00 -2026-05-07 16:46:30,502 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.72, h_ratio=1.98) -2026-05-07 16:46:30,549 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm gris.jpg -2026-05-07 16:46:30,987 INFO backend.segmentation: [APPLY_TEXTURE] DONE 1.033s at 2026-05-07T22:46:30.987573+00:00 -2026-05-07 16:46:38,234 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T22:46:38.234058+00:00 -2026-05-07 16:46:38,637 INFO backend.segmentation: [APPLY_TEXTURE] flat floor tiling (trap=0.31 < 0.35, skip perspective) -2026-05-07 16:46:38,690 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm gris.jpg -2026-05-07 16:46:39,101 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.867s at 2026-05-07T22:46:39.101314+00:00 -2026-05-07 17:01:04,655 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T23:01:04.655845+00:00 -2026-05-07 17:01:05,250 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.05, h_ratio=1.68) -2026-05-07 17:01:05,308 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm gris.jpg -2026-05-07 17:01:05,726 INFO backend.segmentation: [APPLY_TEXTURE] DONE 1.071s at 2026-05-07T23:01:05.726857+00:00 -2026-05-07 17:19:38,903 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-07 17:19:38,930 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-07 17:20:05,519 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T23:20:05.519131+00:00 -2026-05-07 17:20:05,664 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.72, h_ratio=1.98) -2026-05-07 17:20:05,718 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm gris.jpg -2026-05-07 17:20:06,288 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.770s at 2026-05-07T23:20:06.288369+00:00 -2026-05-07 17:20:10,885 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T23:20:10.885784+00:00 -2026-05-07 17:20:11,012 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.72, h_ratio=1.98) -2026-05-07 17:20:11,057 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm gris.jpg -2026-05-07 17:20:11,494 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.609s at 2026-05-07T23:20:11.493854+00:00 -2026-05-07 17:20:16,040 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T23:20:16.040610+00:00 -2026-05-07 17:20:16,136 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm gris.jpg -2026-05-07 17:20:16,549 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.509s at 2026-05-07T23:20:16.549652+00:00 -2026-05-07 17:20:18,515 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T23:20:18.515915+00:00 -2026-05-07 17:20:18,600 INFO backend.segmentation: [APPLY_TEXTURE] flat floor tiling (trap=0.31 < 0.35, skip perspective) -2026-05-07 17:20:18,652 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm gris.jpg -2026-05-07 17:20:19,065 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.550s at 2026-05-07T23:20:19.065884+00:00 -2026-05-07 17:20:25,048 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T23:20:25.048663+00:00 -2026-05-07 17:20:25,199 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.17, h_ratio=1.48) -2026-05-07 17:20:25,233 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm gris.jpg -2026-05-07 17:20:25,664 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.616s at 2026-05-07T23:20:25.664798+00:00 -2026-05-07 17:20:29,831 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T23:20:29.831966+00:00 -2026-05-07 17:20:29,986 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.17, h_ratio=1.48) -2026-05-07 17:20:30,018 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm gris.jpg -2026-05-07 17:20:30,460 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.629s at 2026-05-07T23:20:30.460822+00:00 -2026-05-07 17:20:31,763 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T23:20:31.763484+00:00 -2026-05-07 17:20:31,886 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.72, h_ratio=1.98) -2026-05-07 17:20:31,929 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm gris.jpg -2026-05-07 17:20:32,354 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.591s at 2026-05-07T23:20:32.354006+00:00 -2026-05-07 17:20:33,945 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T23:20:33.945098+00:00 -2026-05-07 17:20:34,040 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm gris.jpg -2026-05-07 17:20:34,468 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.523s at 2026-05-07T23:20:34.468881+00:00 -2026-05-07 17:20:35,606 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T23:20:35.606548+00:00 -2026-05-07 17:20:35,728 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.72, h_ratio=1.98) -2026-05-07 17:20:35,776 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm gris.jpg -2026-05-07 17:20:36,186 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.580s at 2026-05-07T23:20:36.186410+00:00 -2026-05-07 17:21:19,858 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T23:21:19.858037+00:00 -2026-05-07 17:21:19,984 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.72, h_ratio=1.98) -2026-05-07 17:21:20,031 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm gris.jpg -2026-05-07 17:21:20,492 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.633s at 2026-05-07T23:21:20.492075+00:00 -2026-05-07 17:23:17,203 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-07 17:23:17,220 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-07 17:34:54,520 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-07 17:34:54,537 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-07 17:34:55,382 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-07 17:34:55,400 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-07 17:35:53,725 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "69fd21d97b5fb8b402d113c5"}, "remainingTimeMS": 30} -2026-05-07 17:38:06,088 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T23:38:06.088546+00:00 -2026-05-07 17:38:06,088 INFO backend.segmentation: [JOB 1c11e34d2f414d9e9328b1801e210f5a] preparing_image progress=12 -2026-05-07 17:38:06,177 INFO backend.segmentation: [JOB 1c11e34d2f414d9e9328b1801e210f5a] segmenting_with_sam2 progress=30 estimated_seconds=58.39104 -2026-05-07 17:38:06,178 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 -2026-05-07 17:38:10,859 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-07 17:38:13,266 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-07 17:38:13,842 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-07 17:38:15,792 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/9771f2ad-8cd2-4dbb-bf76-dbcaa54a9e8c "HTTP/1.1 200 OK" -2026-05-07 17:38:15,799 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-07 17:38:18,175 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-07 17:38:21,015 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=9771f2ad-8cd2-4dbb-bf76-dbcaa54a9e8c "HTTP/1.1 200 OK" -2026-05-07 17:39:18,012 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\e9e23a4c03e9b88d2db6cb764c2778b1091e1c8b97c256c28501ff9297140221\image.webp "HTTP/1.1 200 OK" -2026-05-07 17:39:18,026 INFO services.gradio_client_service: Gradio Space segmentation: entorno=gpu motor=SAM Auto (GPU - ZeroGPU) mask_count=63 -2026-05-07 17:39:18,026 INFO backend.segmentation: [JOB 1c11e34d2f414d9e9328b1801e210f5a] saving_masks progress=92 -2026-05-07 17:39:18,184 INFO backend.segmentation: [JOB 1c11e34d2f414d9e9328b1801e210f5a] segments_meta saved (63 segments) -2026-05-07 17:39:18,184 INFO backend.segmentation: [JOB 1c11e34d2f414d9e9328b1801e210f5a] done mask_count=63 -2026-05-07 17:39:18,184 INFO backend.segmentation: [UPLOAD_BG] DONE 72.097s at 2026-05-07T23:39:18.184964+00:00 -2026-05-07 17:39:18,184 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-07 17:41:23,776 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T23:41:23.776644+00:00 -2026-05-07 17:41:24,331 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.39, h_ratio=1.19) -2026-05-07 17:41:24,357 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-07 17:41:24,711 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.935s at 2026-05-07T23:41:24.711180+00:00 -2026-05-07 17:41:27,452 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T23:41:27.452983+00:00 -2026-05-07 17:41:27,541 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=2.27, h_ratio=1.02) -2026-05-07 17:41:27,564 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-07 17:41:27,800 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.348s at 2026-05-07T23:41:27.800164+00:00 -2026-05-07 17:41:30,962 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T23:41:30.962686+00:00 -2026-05-07 17:41:31,048 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=2.27, h_ratio=1.02) -2026-05-07 17:41:31,065 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-07 17:41:31,301 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.338s at 2026-05-07T23:41:31.301380+00:00 -2026-05-07 17:41:33,842 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T23:41:33.842810+00:00 -2026-05-07 17:41:33,933 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=2.27, h_ratio=1.02) -2026-05-07 17:41:33,960 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-07 17:41:34,187 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.345s at 2026-05-07T23:41:34.187626+00:00 -2026-05-07 17:41:37,885 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T23:41:37.885854+00:00 -2026-05-07 17:41:38,391 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-07 17:41:38,616 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.730s at 2026-05-07T23:41:38.616620+00:00 -2026-05-07 17:41:41,951 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T23:41:41.951324+00:00 -2026-05-07 17:41:42,020 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-07 17:41:42,238 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.287s at 2026-05-07T23:41:42.238675+00:00 -2026-05-07 17:41:44,128 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T23:41:44.128975+00:00 -2026-05-07 17:41:44,212 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.39, h_ratio=1.19) -2026-05-07 17:41:44,225 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-07 17:41:44,443 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.314s at 2026-05-07T23:41:44.443647+00:00 -2026-05-07 17:41:53,244 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T23:41:53.244718+00:00 -2026-05-07 17:41:53,307 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-07 17:41:53,534 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.290s at 2026-05-07T23:41:53.534468+00:00 -2026-05-07 17:41:56,242 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T23:41:56.242076+00:00 -2026-05-07 17:41:56,315 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-07 17:41:56,547 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.305s at 2026-05-07T23:41:56.547354+00:00 -2026-05-07 17:42:12,026 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T23:42:12.026351+00:00 -2026-05-07 17:42:12,027 INFO backend.segmentation: [JOB 31ffcc550acc49ebaef7694d019e4738] preparing_image progress=12 -2026-05-07 17:42:12,087 INFO backend.segmentation: [JOB 31ffcc550acc49ebaef7694d019e4738] segmenting_with_sam2 progress=30 estimated_seconds=94.01599999999999 -2026-05-07 17:42:12,087 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 -2026-05-07 17:42:14,504 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-07 17:42:16,891 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-07 17:42:17,033 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-07 17:42:19,359 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-07 17:42:19,359 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/5caf9962-b05a-4b4b-9ff5-a4e57abaa4d1 "HTTP/1.1 200 OK" -2026-05-07 17:42:21,816 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-07 17:42:24,647 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=5caf9962-b05a-4b4b-9ff5-a4e57abaa4d1 "HTTP/1.1 200 OK" -2026-05-07 17:44:44,214 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\56758f540e1c547de434b369fae158810fde033fe3650199c54eecf9fd68ac46\image.webp "HTTP/1.1 200 OK" -2026-05-07 17:44:44,229 INFO services.gradio_client_service: Gradio Space segmentation: entorno=gpu motor=SAM Auto (GPU - ZeroGPU) mask_count=58 -2026-05-07 17:44:44,229 INFO backend.segmentation: [JOB 31ffcc550acc49ebaef7694d019e4738] saving_masks progress=92 -2026-05-07 17:44:44,558 INFO backend.segmentation: [JOB 31ffcc550acc49ebaef7694d019e4738] segments_meta saved (58 segments) -2026-05-07 17:44:44,559 INFO backend.segmentation: [JOB 31ffcc550acc49ebaef7694d019e4738] done mask_count=58 -2026-05-07 17:44:44,559 INFO backend.segmentation: [UPLOAD_BG] DONE 152.534s at 2026-05-07T23:44:44.559631+00:00 -2026-05-07 17:44:44,559 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-07 17:46:08,455 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T23:46:08.455801+00:00 -2026-05-07 17:46:08,553 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm azul.jpg -2026-05-07 17:46:08,947 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.492s at 2026-05-07T23:46:08.947932+00:00 -2026-05-07 17:46:17,471 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T23:46:17.471758+00:00 -2026-05-07 17:46:17,573 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm azul.jpg -2026-05-07 17:46:17,959 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.487s at 2026-05-07T23:46:17.959003+00:00 -2026-05-07 17:46:28,129 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T23:46:28.129424+00:00 -2026-05-07 17:46:28,200 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm azul.jpg -2026-05-07 17:46:28,582 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.453s at 2026-05-07T23:46:28.582760+00:00 -2026-05-07 17:46:33,212 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T23:46:33.212302+00:00 -2026-05-07 17:46:33,309 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm azul.jpg -2026-05-07 17:46:33,672 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.460s at 2026-05-07T23:46:33.672645+00:00 -2026-05-07 17:46:35,529 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T23:46:35.528619+00:00 -2026-05-07 17:46:35,619 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm azul.jpg -2026-05-07 17:46:35,998 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.469s at 2026-05-07T23:46:35.998355+00:00 -2026-05-07 17:46:44,349 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T23:46:44.349770+00:00 -2026-05-07 17:46:44,480 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.47, h_ratio=1.33) -2026-05-07 17:46:44,518 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm azul.jpg -2026-05-07 17:46:44,874 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.525s at 2026-05-07T23:46:44.874683+00:00 -2026-05-07 17:46:47,684 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T23:46:47.684050+00:00 -2026-05-07 17:46:47,763 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm azul.jpg -2026-05-07 17:46:48,178 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.495s at 2026-05-07T23:46:48.178702+00:00 -2026-05-07 17:46:49,167 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T23:46:49.167867+00:00 -2026-05-07 17:46:49,306 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.01, h_ratio=1.21) -2026-05-07 17:46:49,338 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm azul.jpg -2026-05-07 17:46:49,729 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.561s at 2026-05-07T23:46:49.729581+00:00 -2026-05-07 17:46:51,803 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T23:46:51.803036+00:00 -2026-05-07 17:46:51,895 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm azul.jpg -2026-05-07 17:46:52,269 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.466s at 2026-05-07T23:46:52.269260+00:00 -2026-05-07 18:03:29,289 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-07 18:03:29,305 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-07 18:03:30,206 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-07 18:03:30,226 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-07 18:03:32,234 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "69fd28548290d5e8dcce656f"}, "remainingTimeMS": 30} -2026-05-07 18:03:33,344 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "69fd28558290d5e8dcce6570"}, "remainingTimeMS": 30} -2026-05-07 18:06:07,885 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-07 18:06:07,912 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-07 18:06:08,821 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-07 18:06:08,841 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-07 18:06:09,044 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "69fd28f1cb744fdfd968df4f"}, "remainingTimeMS": 30} -2026-05-07 18:06:09,046 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "69fd28f1cb744fdfd968df4f"}, "remainingTimeMS": 30} -2026-05-07 18:06:17,672 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-08T00:06:17.672406+00:00 -2026-05-07 18:06:17,774 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm azul.jpg -2026-05-07 18:06:18,277 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.606s at 2026-05-08T00:06:18.277654+00:00 -2026-05-07 18:06:29,233 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "69fd2905cb744fdfd968df50"}, "remainingTimeMS": 30} -2026-05-07 18:06:29,234 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "69fd2905cb744fdfd968df50"}, "remainingTimeMS": 30} -2026-05-07 18:06:38,021 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-08T00:06:38.021739+00:00 -2026-05-07 18:06:38,533 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.39, h_ratio=1.19) -2026-05-07 18:06:38,551 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-07 18:06:38,763 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.741s at 2026-05-08T00:06:38.763203+00:00 -2026-05-07 18:06:41,375 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-08T00:06:41.375987+00:00 -2026-05-07 18:06:41,901 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=2.27, h_ratio=1.02) -2026-05-07 18:06:41,921 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-07 18:06:42,135 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.760s at 2026-05-08T00:06:42.135731+00:00 -2026-05-07 18:17:10,342 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-08T00:17:10.342893+00:00 -2026-05-07 18:17:10,422 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.39, h_ratio=1.19) -2026-05-07 18:17:10,446 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-07 18:17:10,653 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.310s at 2026-05-08T00:17:10.653040+00:00 -2026-05-07 18:22:51,279 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-07 18:22:51,299 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-07 18:22:52,229 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-07 18:22:52,245 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-07 18:22:52,461 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "69fd2cdc61ddd2197e4f4ad3"}, "remainingTimeMS": 30} -2026-05-07 18:22:52,461 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "69fd2cdc61ddd2197e4f4ad3"}, "remainingTimeMS": 30} -2026-05-07 18:23:18,919 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-08T00:23:18.919571+00:00 -2026-05-07 18:23:19,016 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.39, h_ratio=1.19) -2026-05-07 18:23:19,038 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-07 18:23:19,455 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.535s at 2026-05-08T00:23:19.455089+00:00 -2026-05-07 18:23:32,434 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "69fd2d0461ddd2197e4f4ad4"}, "remainingTimeMS": 30} -2026-05-07 18:23:32,438 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "69fd2d0461ddd2197e4f4ad4"}, "remainingTimeMS": 30} -2026-05-08 08:43:50,985 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=https://eduardo4547-hyper-reality-sam2-gpu.hf.space -2026-05-08 08:43:51,012 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-08 08:51:57,553 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=https://eduardo4547-hyper-reality-sam2-gpu.hf.space -2026-05-08 08:51:57,570 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-08 08:52:05,523 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "69fdf8956fe8a54546e7c788"}, "remainingTimeMS": 30} -2026-05-08 08:52:28,781 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-08T14:52:28.781286+00:00 -2026-05-08 08:52:28,783 INFO backend.segmentation: [JOB c4b00bfba3cd41d8a99b995eb5a3f820] preparing_image progress=12 -2026-05-08 08:52:28,924 INFO backend.segmentation: [JOB c4b00bfba3cd41d8a99b995eb5a3f820] segmenting_with_sam2 progress=30 estimated_seconds=58.39104 -2026-05-08 08:52:28,925 INFO services.gradio_client_service: Calling GPU Gradio Space: https://eduardo4547-hyper-reality-sam2-gpu.hf.space -2026-05-08 08:52:31,787 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" -2026-05-08 08:52:32,342 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-08 08:52:32,963 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-08 08:52:33,084 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/10657327-6236-4afa-91e1-25f259cc9a15 "HTTP/1.1 200 OK" -2026-05-08 08:52:33,241 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-08 08:52:33,773 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-08 08:52:34,439 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/data?session_hash=10657327-6236-4afa-91e1-25f259cc9a15 "HTTP/1.1 200 OK" -2026-05-08 08:52:53,788 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/file=/tmp/gradio/1ee1c9088fcbba7f467623e6851741770894d9f669f8b560de748311e8fd868e/image.webp "HTTP/1.1 200 OK" -2026-05-08 08:52:53,901 INFO services.gradio_client_service: Gradio Space segmentation: entorno=gpu motor=SAM Auto (GPU - ZeroGPU) mask_count=63 -2026-05-08 08:52:53,901 INFO backend.segmentation: [JOB c4b00bfba3cd41d8a99b995eb5a3f820] saving_masks progress=92 -2026-05-08 08:52:54,078 INFO backend.segmentation: [JOB c4b00bfba3cd41d8a99b995eb5a3f820] segments_meta saved (63 segments) -2026-05-08 08:52:54,078 INFO backend.segmentation: [JOB c4b00bfba3cd41d8a99b995eb5a3f820] done mask_count=63 -2026-05-08 08:52:54,079 INFO backend.segmentation: [UPLOAD_BG] DONE 25.297s at 2026-05-08T14:52:54.079206+00:00 -2026-05-08 08:52:54,079 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-08 08:52:56,515 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "69fdf8c86fe8a54546e7c789"}, "remainingTimeMS": 30} -2026-05-08 08:53:03,328 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-08T14:53:03.328974+00:00 -2026-05-08 08:53:03,423 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=2.27, h_ratio=1.02) -2026-05-08 08:53:03,443 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-08 08:53:03,763 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.435s at 2026-05-08T14:53:03.763882+00:00 -2026-05-08 08:54:39,084 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-08T14:54:39.084466+00:00 -2026-05-08 08:54:39,183 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.39, h_ratio=1.19) -2026-05-08 08:54:39,211 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-08 08:54:39,457 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.373s at 2026-05-08T14:54:39.457395+00:00 -2026-05-08 08:59:40,007 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-08T14:59:40.007652+00:00 -2026-05-08 08:59:40,151 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=2.27, h_ratio=1.02) -2026-05-08 08:59:40,169 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-08 08:59:40,385 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.378s at 2026-05-08T14:59:40.385462+00:00 -2026-05-08 08:59:42,685 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-08T14:59:42.685637+00:00 -2026-05-08 08:59:42,813 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=2.27, h_ratio=1.02) -2026-05-08 08:59:42,832 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-08 08:59:43,046 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.361s at 2026-05-08T14:59:43.046868+00:00 -2026-05-08 08:59:49,536 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=https://eduardo4547-hyper-reality-sam2-gpu.hf.space -2026-05-08 08:59:49,552 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-08 08:59:50,331 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=https://eduardo4547-hyper-reality-sam2-gpu.hf.space -2026-05-08 08:59:50,348 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-08 09:00:00,500 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-08T15:00:00.500104+00:00 -2026-05-08 09:00:00,618 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.39, h_ratio=1.19) -2026-05-08 09:00:00,637 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-08 09:00:00,990 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.490s at 2026-05-08T15:00:00.990494+00:00 -2026-05-08 09:00:03,599 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-08T15:00:03.599883+00:00 -2026-05-08 09:00:03,681 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-08 09:00:03,924 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.324s at 2026-05-08T15:00:03.924300+00:00 -2026-05-08 09:00:06,073 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-08T15:00:06.073364+00:00 -2026-05-08 09:00:06,149 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-08 09:00:06,389 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.317s at 2026-05-08T15:00:06.389848+00:00 -2026-05-08 09:00:08,614 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-08T15:00:08.614656+00:00 -2026-05-08 09:00:08,694 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-08 09:00:08,933 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.319s at 2026-05-08T15:00:08.933579+00:00 -2026-05-08 09:00:15,087 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-08T15:00:15.087928+00:00 -2026-05-08 09:00:15,193 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=2.27, h_ratio=1.02) -2026-05-08 09:00:15,214 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-08 09:00:15,452 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.364s at 2026-05-08T15:00:15.452128+00:00 -2026-05-08 09:00:19,768 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-08T15:00:19.768251+00:00 -2026-05-08 09:00:20,270 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=2.27, h_ratio=1.02) -2026-05-08 09:00:20,289 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-08 09:00:20,508 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.740s at 2026-05-08T15:00:20.508968+00:00 -2026-05-08 09:01:38,338 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-08T15:01:38.338166+00:00 -2026-05-08 09:01:38,895 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.39, h_ratio=1.19) -2026-05-08 09:01:38,915 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-08 09:01:39,112 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.774s at 2026-05-08T15:01:39.112500+00:00 -2026-05-08 09:01:42,636 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-08T15:01:42.636107+00:00 -2026-05-08 09:01:42,973 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=2.27, h_ratio=1.02) -2026-05-08 09:01:42,992 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-08 09:01:43,212 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.577s at 2026-05-08T15:01:43.212843+00:00 -2026-05-08 09:01:45,698 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-08T15:01:45.698783+00:00 -2026-05-08 09:01:46,444 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=2.27, h_ratio=1.02) -2026-05-08 09:01:46,465 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-08 09:01:46,680 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.982s at 2026-05-08T15:01:46.680378+00:00 -2026-05-08 09:01:50,327 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-08T15:01:50.326916+00:00 -2026-05-08 09:01:50,647 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=2.27, h_ratio=1.02) -2026-05-08 09:01:50,666 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-08 09:01:50,880 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.552s at 2026-05-08T15:01:50.879093+00:00 -2026-05-08 09:01:57,091 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=https://eduardo4547-hyper-reality-sam2-gpu.hf.space -2026-05-08 09:01:57,117 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-08 09:01:57,294 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-08T15:01:57.294276+00:00 -2026-05-08 09:01:57,340 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-08 09:01:57,569 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.275s at 2026-05-08T15:01:57.569889+00:00 -2026-05-08 09:02:01,866 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-08T15:02:01.866951+00:00 -2026-05-08 09:02:01,933 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-08 09:02:02,153 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.287s at 2026-05-08T15:02:02.153188+00:00 -2026-05-08 09:02:04,075 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-08T15:02:04.075842+00:00 -2026-05-08 09:02:04,140 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-08 09:02:04,356 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.280s at 2026-05-08T15:02:04.356528+00:00 -2026-05-08 09:02:07,755 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-08T15:02:07.755321+00:00 -2026-05-08 09:02:07,822 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-08 09:02:08,037 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.282s at 2026-05-08T15:02:08.037106+00:00 -2026-05-08 09:02:11,723 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-08T15:02:11.723542+00:00 -2026-05-08 09:02:11,786 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-08 09:02:12,003 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.280s at 2026-05-08T15:02:12.003104+00:00 -2026-05-08 09:02:13,461 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-08T15:02:13.461067+00:00 -2026-05-08 09:02:13,526 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-08 09:02:13,743 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.283s at 2026-05-08T15:02:13.743819+00:00 -2026-05-08 09:02:17,645 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-08T15:02:17.645808+00:00 -2026-05-08 09:02:17,709 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg -2026-05-08 09:02:17,928 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.283s at 2026-05-08T15:02:17.928622+00:00 -2026-05-08 09:02:22,278 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "69fdfafe6c3fdb5646f67bd7"}, "remainingTimeMS": 30} -2026-05-10 23:50:21,193 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=https://eduardo4547-hyper-reality-sam2-gpu.hf.space -2026-05-10 23:50:21,209 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-10 23:52:32,876 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a016ea02da1a3ba929adb9d"}, "remainingTimeMS": 30} -2026-05-10 23:52:36,476 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a016ea42da1a3ba929adb9e"}, "remainingTimeMS": 30} -2026-05-10 23:55:43,460 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-10 23:55:43,478 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-10 23:55:50,353 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-11T05:55:50.353980+00:00 -2026-05-10 23:55:50,353 INFO backend.segmentation: [JOB 50532667d23b42dc9499151b792fc9be] preparing_image progress=12 -2026-05-10 23:55:50,403 INFO backend.segmentation: [JOB 50532667d23b42dc9499151b792fc9be] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 -2026-05-10 23:55:50,404 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 -2026-05-10 23:55:54,216 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-10 23:55:56,411 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-10 23:55:56,414 WARNING services.gradio_client_service: GPU Space failed (Cannot find a function with `api_name`: /segment.), trying CPU fallback... -2026-05-10 23:55:56,414 INFO services.gradio_client_service: Calling CPU fallback Space: https://eduardo4547-hyper-reality-sam2-cpu.hf.space -2026-05-10 23:55:57,205 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-10 23:55:58,767 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/82464de0-3009-48e0-8256-dabefa0f9b77 "HTTP/1.1 200 OK" -2026-05-10 23:58:37,808 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/config "HTTP/1.1 200 OK" -2026-05-10 23:58:38,440 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-10 23:58:38,988 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-10 23:58:39,041 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/heartbeat/19141e4f-3688-4e28-b4dd-a1f90267278f "HTTP/1.1 200 OK" -2026-05-10 23:58:39,207 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-10 23:58:39,935 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-10 23:58:40,471 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/queue/data?session_hash=19141e4f-3688-4e28-b4dd-a1f90267278f "HTTP/1.1 200 OK" -2026-05-11 00:02:34,264 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a0170fae955d66f478a478e"}, "remainingTimeMS": 30} -2026-05-11 00:02:41,231 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/file=/tmp/gradio/6c61c4453525a0cc97a55213f8ab16e24157b02ad4d2cba459d14b95c79ac6ab/image.webp "HTTP/1.1 200 OK" -2026-05-11 00:02:41,371 INFO services.gradio_client_service: Gradio Space segmentation: entorno=cpu motor=SAM Auto (CPU) mask_count=61 -2026-05-11 00:02:41,371 INFO backend.segmentation: [JOB 50532667d23b42dc9499151b792fc9be] saving_masks progress=92 -2026-05-11 00:02:41,545 INFO backend.segmentation: [JOB 50532667d23b42dc9499151b792fc9be] segments_meta saved (61 segments) -2026-05-11 00:02:41,545 INFO backend.segmentation: [JOB 50532667d23b42dc9499151b792fc9be] done mask_count=61 -2026-05-11 00:02:41,545 INFO backend.segmentation: [UPLOAD_BG] DONE 411.192s at 2026-05-11T06:02:41.545306+00:00 -2026-05-11 00:02:41,545 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-11 00:05:57,228 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7861 -2026-05-11 00:05:57,248 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 00:06:01,186 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a0171c9cf34de01f7f36598"}, "remainingTimeMS": 30} -2026-05-11 00:06:11,507 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-11T06:06:11.507814+00:00 -2026-05-11 00:06:11,507 INFO backend.segmentation: [JOB 1f4f3f9e44d3493ea86190e1c30a9fdd] preparing_image progress=12 -2026-05-11 00:06:11,556 INFO backend.segmentation: [JOB 1f4f3f9e44d3493ea86190e1c30a9fdd] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 -2026-05-11 00:06:11,556 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7861 -2026-05-11 00:06:14,167 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" -2026-05-11 00:06:16,365 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 00:06:17,144 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 00:06:18,683 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/20b82a1d-db47-495c-b48f-4921056f7df8 "HTTP/1.1 200 OK" -2026-05-11 00:06:18,685 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 00:06:20,907 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 00:06:23,133 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=20b82a1d-db47-495c-b48f-4921056f7df8 "HTTP/1.1 200 OK" -2026-05-11 00:07:29,155 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\fdba6c817445c957bf57f0f37d255298685625d2847381414fb08306405b69d3\image.webp "HTTP/1.1 200 OK" -2026-05-11 00:07:29,169 INFO services.gradio_client_service: Gradio Space segmentation: entorno=gpu motor=SAM Auto (GPU - ZeroGPU) mask_count=61 -2026-05-11 00:07:29,170 INFO backend.segmentation: [JOB 1f4f3f9e44d3493ea86190e1c30a9fdd] saving_masks progress=92 -2026-05-11 00:07:29,294 INFO backend.segmentation: [JOB 1f4f3f9e44d3493ea86190e1c30a9fdd] segments_meta saved (61 segments) -2026-05-11 00:07:29,294 INFO backend.segmentation: [JOB 1f4f3f9e44d3493ea86190e1c30a9fdd] done mask_count=61 -2026-05-11 00:07:29,294 INFO backend.segmentation: [UPLOAD_BG] DONE 77.786s at 2026-05-11T06:07:29.294219+00:00 -2026-05-11 00:07:29,294 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-11 00:07:30,391 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a017222cf34de01f7f36599"}, "remainingTimeMS": 30} -2026-05-11 00:08:14,893 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T06:08:14.893447+00:00 -2026-05-11 00:08:15,380 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\hyper-reality-1778254222964.jpg -2026-05-11 00:08:15,598 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.704s at 2026-05-11T06:08:15.598673+00:00 -2026-05-11 00:51:27,451 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7861 -2026-05-11 00:51:27,474 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 00:53:21,328 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a017ce16ec57028978ccf90"}, "remainingTimeMS": 30} -2026-05-11 00:53:38,590 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-11T06:53:38.590375+00:00 -2026-05-11 00:53:38,591 INFO backend.segmentation: [JOB 8b7706cec4fb4c95b959cf35c8a37258] preparing_image progress=12 -2026-05-11 00:53:38,710 INFO backend.segmentation: [JOB 8b7706cec4fb4c95b959cf35c8a37258] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 -2026-05-11 00:53:38,711 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7861 -2026-05-11 00:53:42,759 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" -2026-05-11 00:53:44,976 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 00:53:45,852 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 00:53:47,365 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/1416991c-29e3-460c-b632-eb0401ae0d7b "HTTP/1.1 200 OK" -2026-05-11 00:53:47,401 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 00:53:49,676 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 00:53:51,904 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=1416991c-29e3-460c-b632-eb0401ae0d7b "HTTP/1.1 200 OK" -2026-05-11 00:54:57,193 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\fdba6c817445c957bf57f0f37d255298685625d2847381414fb08306405b69d3\image.webp "HTTP/1.1 200 OK" -2026-05-11 00:54:57,211 INFO services.gradio_client_service: Gradio Space segmentation: entorno=gpu motor=SAM Auto (GPU - ZeroGPU) mask_count=61 -2026-05-11 00:54:57,211 INFO backend.segmentation: [JOB 8b7706cec4fb4c95b959cf35c8a37258] saving_masks progress=92 -2026-05-11 00:54:57,393 INFO backend.segmentation: [JOB 8b7706cec4fb4c95b959cf35c8a37258] segments_meta saved (61 segments) -2026-05-11 00:54:57,393 INFO backend.segmentation: [JOB 8b7706cec4fb4c95b959cf35c8a37258] done mask_count=61 -2026-05-11 00:54:57,393 INFO backend.segmentation: [UPLOAD_BG] DONE 78.803s at 2026-05-11T06:54:57.393436+00:00 -2026-05-11 00:54:57,393 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-11 00:55:00,244 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a017d446ec57028978ccf91"}, "remainingTimeMS": 30} -2026-05-11 00:59:39,555 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7861 -2026-05-11 00:59:39,579 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 00:59:40,470 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7861 -2026-05-11 00:59:40,489 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 00:59:40,500 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T06:59:40.500380+00:00 -2026-05-11 00:59:44,733 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" -2026-05-11 00:59:46,960 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 00:59:47,683 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 00:59:49,313 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/dfe3d93e-bb61-4ec9-a8f0-c028f671768d "HTTP/1.1 200 OK" -2026-05-11 00:59:49,315 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 00:59:51,671 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 00:59:53,909 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=dfe3d93e-bb61-4ec9-a8f0-c028f671768d "HTTP/1.1 200 OK" -2026-05-11 00:59:58,487 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a017e6eb594a05c6412d9b7"}, "remainingTimeMS": 30} -2026-05-11 00:59:58,935 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a017e6eb594a05c6412d9b8"}, "remainingTimeMS": 30} -2026-05-11 01:00:01,269 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T07:00:01.269120+00:00 -2026-05-11 01:00:06,217 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" -2026-05-11 01:00:06,576 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\6fccbecf855f58faeb9c353aa676bbc1217a2f78a3531d0266304a8da20e5470\image.webp "HTTP/1.1 200 OK" -2026-05-11 01:00:06,583 ERROR backend.segmentation: Failed to save rendered image from Gradio Space -Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\texture_service.py", line 727, in apply_local_texture_sync - img_to_save = Image.open(io.BytesIO(rendered_img_np)) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -TypeError: a bytes-like object is required, not 'str' - -During handling of the above exception, another exception occurred: - -Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\texture_service.py", line 729, in apply_local_texture_sync - raise RuntimeError("Unsupported rendered image type from Gradio Space") -RuntimeError: Unsupported rendered image type from Gradio Space -2026-05-11 01:00:06,585 ERROR backend.segmentation: Error during remote render integration (continuing local flow) -Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\texture_service.py", line 727, in apply_local_texture_sync - img_to_save = Image.open(io.BytesIO(rendered_img_np)) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -TypeError: a bytes-like object is required, not 'str' - -During handling of the above exception, another exception occurred: - -Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\texture_service.py", line 729, in apply_local_texture_sync - raise RuntimeError("Unsupported rendered image type from Gradio Space") -RuntimeError: Unsupported rendered image type from Gradio Space -2026-05-11 01:00:06,942 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\hyper-reality-1778254222964.jpg -2026-05-11 01:00:07,163 INFO backend.segmentation: [APPLY_TEXTURE] DONE 26.663s at 2026-05-11T07:00:07.163579+00:00 -2026-05-11 01:00:08,434 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 01:00:08,866 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 01:00:10,719 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/4f697b34-1aa2-41df-bfd1-f19982489f24 "HTTP/1.1 200 OK" -2026-05-11 01:00:10,737 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 01:00:13,075 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 01:00:15,289 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=4f697b34-1aa2-41df-bfd1-f19982489f24 "HTTP/1.1 200 OK" -2026-05-11 01:00:25,135 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\6fccbecf855f58faeb9c353aa676bbc1217a2f78a3531d0266304a8da20e5470\image.webp "HTTP/1.1 200 OK" -2026-05-11 01:00:25,144 ERROR backend.segmentation: Failed to save rendered image from Gradio Space -Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\texture_service.py", line 727, in apply_local_texture_sync - img_to_save = Image.open(io.BytesIO(rendered_img_np)) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -TypeError: a bytes-like object is required, not 'str' - -During handling of the above exception, another exception occurred: - -Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\texture_service.py", line 729, in apply_local_texture_sync - raise RuntimeError("Unsupported rendered image type from Gradio Space") -RuntimeError: Unsupported rendered image type from Gradio Space -2026-05-11 01:00:25,145 ERROR backend.segmentation: Error during remote render integration (continuing local flow) -Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\texture_service.py", line 727, in apply_local_texture_sync - img_to_save = Image.open(io.BytesIO(rendered_img_np)) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -TypeError: a bytes-like object is required, not 'str' - -During handling of the above exception, another exception occurred: - -Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\texture_service.py", line 729, in apply_local_texture_sync - raise RuntimeError("Unsupported rendered image type from Gradio Space") -RuntimeError: Unsupported rendered image type from Gradio Space -2026-05-11 01:00:25,508 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\hyper-reality-1778254222964.jpg -2026-05-11 01:00:25,634 INFO backend.segmentation: [APPLY_TEXTURE] DONE 24.365s at 2026-05-11T07:00:25.634920+00:00 -2026-05-11 01:01:58,589 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7861 -2026-05-11 01:01:58,609 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 01:02:22,178 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7861 -2026-05-11 01:02:22,198 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 01:02:51,769 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a017f1bad7663b910938dbd"}, "remainingTimeMS": 30} -2026-05-11 01:02:55,731 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T07:02:55.731211+00:00 -2026-05-11 01:02:59,246 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" -2026-05-11 01:03:01,470 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 01:03:02,157 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 01:03:03,788 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/f72e320f-3dd3-495b-8cb0-2aa97d6ec2c9 "HTTP/1.1 200 OK" -2026-05-11 01:03:03,790 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 01:03:06,063 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 01:03:08,281 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=f72e320f-3dd3-495b-8cb0-2aa97d6ec2c9 "HTTP/1.1 200 OK" -2026-05-11 01:03:18,072 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\a0241ac3d66d043389ee63208cf8e598c5bc14a88f1ef0c0ba1204972c9b8f5b\image.webp "HTTP/1.1 200 OK" -2026-05-11 01:03:18,112 INFO backend.segmentation: [APPLY_TEXTURE] DONE 22.382s at 2026-05-11T07:03:18.112675+00:00 -2026-05-11 01:03:28,574 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T07:03:28.574697+00:00 -2026-05-11 01:03:31,794 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" -2026-05-11 01:03:34,004 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 01:03:34,436 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 01:03:36,294 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/5c32843d-f6f9-460a-8e54-d92cbde9f493 "HTTP/1.1 200 OK" -2026-05-11 01:03:36,298 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 01:03:38,567 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 01:03:40,815 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=5c32843d-f6f9-460a-8e54-d92cbde9f493 "HTTP/1.1 200 OK" -2026-05-11 01:03:50,473 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\a36f7f6ce561ff2da1d9b2cd19f3166ad95e0ea69bfa43c4cacd37d43e5f0baf\image.webp "HTTP/1.1 200 OK" -2026-05-11 01:03:50,507 INFO backend.segmentation: [APPLY_TEXTURE] DONE 21.933s at 2026-05-11T07:03:50.507525+00:00 -2026-05-11 01:03:53,829 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T07:03:53.829203+00:00 -2026-05-11 01:03:57,076 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" -2026-05-11 01:03:59,329 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 01:03:59,834 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 01:04:01,620 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/0f966dad-edde-44bb-a9ef-2facb570ff26 "HTTP/1.1 200 OK" -2026-05-11 01:04:01,623 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 01:04:03,890 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 01:04:06,134 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=0f966dad-edde-44bb-a9ef-2facb570ff26 "HTTP/1.1 200 OK" -2026-05-11 01:04:14,611 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\fdb10066803e396b080246b5d53f1444b85ab32ce2f8adc8055ac70779eda6c7\image.webp "HTTP/1.1 200 OK" -2026-05-11 01:04:14,643 INFO backend.segmentation: [APPLY_TEXTURE] DONE 20.815s at 2026-05-11T07:04:14.643822+00:00 -2026-05-11 01:04:31,068 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T07:04:31.068679+00:00 -2026-05-11 01:04:34,297 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" -2026-05-11 01:04:36,522 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 01:04:36,916 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 01:04:38,792 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/41a45a3b-dea6-401b-a961-a43d9eeef146 "HTTP/1.1 200 OK" -2026-05-11 01:04:38,812 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 01:04:41,051 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 01:04:43,255 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=41a45a3b-dea6-401b-a961-a43d9eeef146 "HTTP/1.1 200 OK" -2026-05-11 01:04:53,175 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\c90fa2a168435724e938bd973efa0671ee7b1e14a32cfe2953cccdcddaeed9bd\image.webp "HTTP/1.1 200 OK" -2026-05-11 01:04:53,208 INFO backend.segmentation: [APPLY_TEXTURE] DONE 22.139s at 2026-05-11T07:04:53.208514+00:00 -2026-05-11 01:05:04,897 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T07:05:04.897914+00:00 -2026-05-11 01:05:08,149 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" -2026-05-11 01:05:10,379 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 01:05:10,869 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 01:05:12,635 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 01:05:12,646 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/7f5b04fc-b432-4af7-b397-2093bc848196 "HTTP/1.1 200 OK" -2026-05-11 01:05:14,897 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 01:05:17,124 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=7f5b04fc-b432-4af7-b397-2093bc848196 "HTTP/1.1 200 OK" -2026-05-11 01:05:26,777 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\b800eda83c12f620804b3039c42adc116f1df79b420071d9a18c7e119021b832\image.webp "HTTP/1.1 200 OK" -2026-05-11 01:05:26,810 INFO backend.segmentation: [APPLY_TEXTURE] DONE 21.913s at 2026-05-11T07:05:26.810808+00:00 -2026-05-11 01:06:12,011 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T07:06:12.011565+00:00 -2026-05-11 01:06:17,137 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" -2026-05-11 01:06:19,606 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 01:06:20,093 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 01:06:22,130 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/f6d57324-aa5d-428e-9a3c-6ceb59836305 "HTTP/1.1 200 OK" -2026-05-11 01:06:22,133 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 01:06:24,805 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 01:06:27,208 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=f6d57324-aa5d-428e-9a3c-6ceb59836305 "HTTP/1.1 200 OK" -2026-05-11 01:06:45,355 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\8f50dc9664f9587eae53015e1509b997c04fa98036c9290e6187367512d5da02\image.webp "HTTP/1.1 200 OK" -2026-05-11 01:06:45,416 INFO backend.segmentation: [APPLY_TEXTURE] DONE 33.406s at 2026-05-11T07:06:45.416640+00:00 -2026-05-11 01:07:09,613 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T07:07:09.613619+00:00 -2026-05-11 01:07:13,446 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" -2026-05-11 01:07:15,702 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 01:07:16,128 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 01:07:17,980 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/e84e78f6-9732-4236-a1bf-7e9cc1a9b774 "HTTP/1.1 200 OK" -2026-05-11 01:07:17,997 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 01:07:20,296 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 01:07:22,537 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=e84e78f6-9732-4236-a1bf-7e9cc1a9b774 "HTTP/1.1 200 OK" -2026-05-11 01:07:32,944 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\6227d070ade7cde210e2e9d7df63c2d27989256a412e8ea36974e0a59a13015e\image.webp "HTTP/1.1 200 OK" -2026-05-11 01:07:32,984 INFO backend.segmentation: [APPLY_TEXTURE] DONE 23.370s at 2026-05-11T07:07:32.984168+00:00 -2026-05-11 01:07:48,931 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T07:07:48.931971+00:00 -2026-05-11 01:07:52,682 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" -2026-05-11 01:07:54,896 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 01:07:55,375 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 01:07:57,190 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 01:07:57,201 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/96094a24-9182-483a-8561-4e4e55af553b "HTTP/1.1 200 OK" -2026-05-11 01:07:59,536 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 01:08:01,765 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=96094a24-9182-483a-8561-4e4e55af553b "HTTP/1.1 200 OK" -2026-05-11 01:08:10,238 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\1c41a512aed2c50d7f0c6d4ea72379809f2a3f46e105a41f0f9e38565785841d\image.webp "HTTP/1.1 200 OK" -2026-05-11 01:08:10,282 INFO backend.segmentation: [APPLY_TEXTURE] DONE 21.350s at 2026-05-11T07:08:10.282480+00:00 -2026-05-11 01:08:38,560 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T07:08:38.560140+00:00 -2026-05-11 01:08:42,343 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" -2026-05-11 01:08:44,570 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 01:08:45,003 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 01:08:46,839 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/f8529758-c796-4224-be4c-2294112a68b7 "HTTP/1.1 200 OK" -2026-05-11 01:08:46,841 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 01:08:49,157 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 01:08:51,365 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=f8529758-c796-4224-be4c-2294112a68b7 "HTTP/1.1 200 OK" -2026-05-11 01:09:00,651 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\15f80783b48749ce17b32cc0aa708fd16e5c3c4952e7baa88b58688069e2372f\image.webp "HTTP/1.1 200 OK" -2026-05-11 01:09:00,686 INFO backend.segmentation: [APPLY_TEXTURE] DONE 22.127s at 2026-05-11T07:09:00.686616+00:00 -2026-05-11 01:09:14,687 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T07:09:14.687785+00:00 -2026-05-11 01:09:18,535 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" -2026-05-11 01:09:20,758 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 01:09:21,287 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 01:09:23,032 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/f0604982-22f5-4b8b-b79c-d21ea5d2c527 "HTTP/1.1 200 OK" -2026-05-11 01:09:23,051 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 01:09:25,370 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 01:09:27,610 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=f0604982-22f5-4b8b-b79c-d21ea5d2c527 "HTTP/1.1 200 OK" -2026-05-11 01:09:36,614 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\37c1f8856b784b099916f708990bea28fe50688285c475371b20d242b5fbf0a6\image.webp "HTTP/1.1 200 OK" -2026-05-11 01:09:36,662 INFO backend.segmentation: [APPLY_TEXTURE] DONE 21.974s at 2026-05-11T07:09:36.662611+00:00 -2026-05-11 01:09:47,181 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T07:09:47.181137+00:00 -2026-05-11 01:09:50,937 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" -2026-05-11 01:09:53,178 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 01:09:53,603 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 01:09:55,458 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/8a3b75ca-572e-4915-be54-edf2e0ae0929 "HTTP/1.1 200 OK" -2026-05-11 01:09:55,460 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 01:09:57,802 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 01:10:00,032 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=8a3b75ca-572e-4915-be54-edf2e0ae0929 "HTTP/1.1 200 OK" -2026-05-11 01:10:09,202 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\f28ee25e6084ff886854b49e0a422f18c0c201eb54c115542d6e3da8ae1bff12\image.webp "HTTP/1.1 200 OK" -2026-05-11 01:10:09,238 WARNING services.gradio_client_service: GPU Space render failed (Gradio Space render error: Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\gradio-space\App-que si funciona\app.py", line 346, in render_for_backend - result = renderer.render( - ^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Generandor de texturas\pipeline\renderer.py", line 114, in render - warped = cv2.warpPerspective( - ^^^^^^^^^^^^^^^^^^^^ -cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\imgwar), trying CPU fallback... -2026-05-11 01:10:09,879 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/config "HTTP/1.1 200 OK" -2026-05-11 01:10:10,458 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 01:10:10,527 WARNING backend.segmentation: Remote render via Gradio failed, falling back to local: Both Gradio Spaces render failed. - GPU (http://localhost:7861): Gradio Space render error: Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\gradio-space\App-que si funciona\app.py", line 346, in render_for_backend - result = renderer.render( - ^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Generandor de texturas\pipeline\renderer.py", line 114, in render - warped = cv2.warpPerspective( - ^^^^^^^^^^^^^^^^^^^^ -cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\imgwar - CPU (https://eduardo4547-hyper-reality-sam2-cpu.hf.space): Cannot find a function with `api_name`: /render. -2026-05-11 01:10:10,942 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 01:10:10,996 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\hyper-reality-1778254222964.jpg -2026-05-11 01:10:11,006 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/heartbeat/327144cd-fa09-4141-b0bb-37f9c05564a8 "HTTP/1.1 200 OK" -2026-05-11 01:10:11,380 INFO backend.segmentation: [APPLY_TEXTURE] DONE 24.200s at 2026-05-11T07:10:11.380471+00:00 -2026-05-11 01:10:44,673 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T07:10:44.673006+00:00 -2026-05-11 01:10:48,706 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" -2026-05-11 01:10:50,923 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 01:10:51,405 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 01:10:53,196 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/60ad61fc-6e8a-4f70-a9cf-0326c71edd29 "HTTP/1.1 200 OK" -2026-05-11 01:10:53,214 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 01:10:55,575 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 01:10:57,809 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=60ad61fc-6e8a-4f70-a9cf-0326c71edd29 "HTTP/1.1 200 OK" -2026-05-11 01:11:07,574 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\809563183a76c7f74f9f6ea49fc9595d2a95fa1bcfe5985fa4450dc8dffbe6e7\image.webp "HTTP/1.1 200 OK" -2026-05-11 01:11:07,609 INFO backend.segmentation: [APPLY_TEXTURE] DONE 22.936s at 2026-05-11T07:11:07.609355+00:00 -2026-05-11 01:11:37,447 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T07:11:37.447764+00:00 -2026-05-11 01:11:41,514 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" -2026-05-11 01:11:43,748 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 01:11:44,151 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 01:11:46,044 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/926557a0-6f74-4161-9a0a-49d0f9ec5923 "HTTP/1.1 200 OK" -2026-05-11 01:11:46,048 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 01:11:48,400 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 01:11:50,602 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=926557a0-6f74-4161-9a0a-49d0f9ec5923 "HTTP/1.1 200 OK" -2026-05-11 01:11:59,284 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\503643d8a558a4c61557d2f2c7cdb8ad6d7f9d88fe3d57d119821583a0acfb15\image.webp "HTTP/1.1 200 OK" -2026-05-11 01:11:59,319 INFO backend.segmentation: [APPLY_TEXTURE] DONE 21.871s at 2026-05-11T07:11:59.319274+00:00 -2026-05-11 01:12:24,802 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T07:12:24.802666+00:00 -2026-05-11 01:12:28,874 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" -2026-05-11 01:12:31,118 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 01:12:32,344 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 01:12:33,430 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/aa4ce6a4-a3b8-48d4-b8a2-aae8b10bc2b2 "HTTP/1.1 200 OK" -2026-05-11 01:12:33,434 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 01:12:35,777 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 01:12:38,002 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=aa4ce6a4-a3b8-48d4-b8a2-aae8b10bc2b2 "HTTP/1.1 200 OK" -2026-05-11 01:12:47,307 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\0dab17a794d09e675c5ecbabf7e0aa9b84acce9db17be10ee180bca4497b7945\image.webp "HTTP/1.1 200 OK" -2026-05-11 01:12:47,344 INFO backend.segmentation: [APPLY_TEXTURE] DONE 22.542s at 2026-05-11T07:12:47.344700+00:00 -2026-05-11 01:12:58,776 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T07:12:58.776347+00:00 -2026-05-11 01:13:02,833 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" -2026-05-11 01:13:05,204 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 01:13:05,637 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 01:13:07,486 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/5128ebf4-bef1-4557-887f-9c1d62bef7e3 "HTTP/1.1 200 OK" -2026-05-11 01:13:07,488 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 01:13:09,774 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 01:13:11,988 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=5128ebf4-bef1-4557-887f-9c1d62bef7e3 "HTTP/1.1 200 OK" -2026-05-11 01:13:23,874 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\774616f6c0df92ecd7c74569be071f234650be2c0b86f09160baec998dfd5c90\image.webp "HTTP/1.1 200 OK" -2026-05-11 01:13:23,908 INFO backend.segmentation: [APPLY_TEXTURE] DONE 25.132s at 2026-05-11T07:13:23.908609+00:00 -2026-05-11 01:13:35,636 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T07:13:35.636648+00:00 -2026-05-11 01:13:39,412 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" -2026-05-11 01:13:41,649 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 01:13:42,161 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 01:13:43,959 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/683cce21-955f-4df7-ae78-2a94dd251026 "HTTP/1.1 200 OK" -2026-05-11 01:13:43,960 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 01:13:46,266 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 01:13:48,491 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=683cce21-955f-4df7-ae78-2a94dd251026 "HTTP/1.1 200 OK" -2026-05-11 01:14:00,798 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\24655a4c5a1c05a05c0d28ce9352f9d0b7a3aa2f81a2edea9cf9417691adc9a3\image.webp "HTTP/1.1 200 OK" -2026-05-11 01:14:00,832 INFO backend.segmentation: [APPLY_TEXTURE] DONE 25.196s at 2026-05-11T07:14:00.832652+00:00 -2026-05-11 01:14:10,101 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a0181c2ad7663b910938dbe"}, "remainingTimeMS": 30} -2026-05-11 01:14:15,444 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-11T07:14:15.444171+00:00 -2026-05-11 01:14:15,445 INFO backend.segmentation: [JOB 9c35bdf672b24aa8ab2f8c7d741909d6] preparing_image progress=12 -2026-05-11 01:14:15,480 INFO backend.segmentation: [JOB 9c35bdf672b24aa8ab2f8c7d741909d6] segmenting_with_sam2 progress=30 estimated_seconds=94.01599999999999 -2026-05-11 01:14:15,480 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7861 -2026-05-11 01:14:17,755 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" -2026-05-11 01:14:19,987 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 01:14:20,404 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 01:14:22,250 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/fe34eec8-6368-444c-b506-e7d57c0b670b "HTTP/1.1 200 OK" -2026-05-11 01:14:22,269 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 01:14:24,498 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 01:14:26,739 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=fe34eec8-6368-444c-b506-e7d57c0b670b "HTTP/1.1 200 OK" -2026-05-11 01:15:38,919 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\56758f540e1c547de434b369fae158810fde033fe3650199c54eecf9fd68ac46\image.webp "HTTP/1.1 200 OK" -2026-05-11 01:15:38,938 INFO services.gradio_client_service: Gradio Space segmentation: entorno=gpu motor=SAM Auto (GPU - ZeroGPU) mask_count=58 -2026-05-11 01:15:38,939 INFO backend.segmentation: [JOB 9c35bdf672b24aa8ab2f8c7d741909d6] saving_masks progress=92 -2026-05-11 01:15:39,189 INFO backend.segmentation: [JOB 9c35bdf672b24aa8ab2f8c7d741909d6] segments_meta saved (58 segments) -2026-05-11 01:15:39,189 INFO backend.segmentation: [JOB 9c35bdf672b24aa8ab2f8c7d741909d6] done mask_count=58 -2026-05-11 01:15:39,189 INFO backend.segmentation: [UPLOAD_BG] DONE 83.745s at 2026-05-11T07:15:39.189518+00:00 -2026-05-11 01:15:39,189 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-11 01:15:48,737 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T07:15:48.737247+00:00 -2026-05-11 01:15:49,707 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T07:15:49.707744+00:00 -2026-05-11 01:15:52,680 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" -2026-05-11 01:15:53,631 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" -2026-05-11 01:15:54,911 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 01:15:55,468 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 01:15:55,845 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 01:15:56,044 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 01:15:57,202 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/4a705aa0-f689-46ea-97f5-15863d8baec8 "HTTP/1.1 200 OK" -2026-05-11 01:15:57,203 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 01:15:58,124 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/a2c2c118-eaf6-434d-a743-2fe1deddff99 "HTTP/1.1 200 OK" -2026-05-11 01:15:58,127 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 01:15:59,497 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 01:16:00,430 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 01:16:01,745 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=4a705aa0-f689-46ea-97f5-15863d8baec8 "HTTP/1.1 200 OK" -2026-05-11 01:16:02,667 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=a2c2c118-eaf6-434d-a743-2fe1deddff99 "HTTP/1.1 200 OK" -2026-05-11 01:16:12,415 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\9931b16150cffe4276187d82f98d6d26f2e65768a9a5e29c4841a0cd0ace8c43\image.webp "HTTP/1.1 200 OK" -2026-05-11 01:16:12,476 INFO backend.segmentation: [APPLY_TEXTURE] DONE 23.739s at 2026-05-11T07:16:12.476106+00:00 -2026-05-11 01:16:22,102 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\9931b16150cffe4276187d82f98d6d26f2e65768a9a5e29c4841a0cd0ace8c43\image.webp "HTTP/1.1 200 OK" -2026-05-11 01:16:22,141 INFO backend.segmentation: [APPLY_TEXTURE] DONE 32.434s at 2026-05-11T07:16:22.141876+00:00 -2026-05-11 01:16:34,010 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T07:16:34.010080+00:00 -2026-05-11 01:16:38,027 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" -2026-05-11 01:16:40,260 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 01:16:40,735 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 01:16:42,572 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 01:16:42,584 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/931da22b-6ab6-43e4-bbb1-7f28e8bed3df "HTTP/1.1 200 OK" -2026-05-11 01:16:44,939 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 01:16:47,207 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=931da22b-6ab6-43e4-bbb1-7f28e8bed3df "HTTP/1.1 200 OK" -2026-05-11 01:16:56,571 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\89f7e761e614acc1ce7980f1bc3a57c44c02acffdf1327e62d01abf19e7ac3dd\image.webp "HTTP/1.1 200 OK" -2026-05-11 01:16:56,618 INFO backend.segmentation: [APPLY_TEXTURE] DONE 22.608s at 2026-05-11T07:16:56.618223+00:00 -2026-05-11 01:17:21,863 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T07:17:21.863478+00:00 -2026-05-11 01:17:25,635 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" -2026-05-11 01:17:27,850 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 01:17:28,328 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 01:17:30,124 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/78467926-f639-4fff-b594-b22e73a4e796 "HTTP/1.1 200 OK" -2026-05-11 01:17:30,127 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 01:17:32,444 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 01:17:34,654 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=78467926-f639-4fff-b594-b22e73a4e796 "HTTP/1.1 200 OK" -2026-05-11 01:17:43,596 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\f28ee25e6084ff886854b49e0a422f18c0c201eb54c115542d6e3da8ae1bff12\image.webp "HTTP/1.1 200 OK" -2026-05-11 01:17:43,600 WARNING services.gradio_client_service: GPU Space render failed (Gradio Space render error: Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\gradio-space\App-que si funciona\app.py", line 346, in render_for_backend - result = renderer.render( - ^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Generandor de texturas\pipeline\renderer.py", line 102, in render - canvas = self._tile_texture(texture, tiles_x, tiles_y) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio), trying CPU fallback... -2026-05-11 01:17:44,204 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/config "HTTP/1.1 200 OK" -2026-05-11 01:17:44,752 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 01:17:44,814 WARNING backend.segmentation: Remote render via Gradio failed, falling back to local: Both Gradio Spaces render failed. - GPU (http://localhost:7861): Gradio Space render error: Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\gradio-space\App-que si funciona\app.py", line 346, in render_for_backend - result = renderer.render( - ^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Generandor de texturas\pipeline\renderer.py", line 102, in render - canvas = self._tile_texture(texture, tiles_x, tiles_y) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio - CPU (https://eduardo4547-hyper-reality-sam2-cpu.hf.space): Cannot find a function with `api_name`: /render. -2026-05-11 01:17:45,194 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm azul.jpg -2026-05-11 01:17:45,236 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 01:17:45,299 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/heartbeat/91179f12-20de-4391-a947-92fac749b4a8 "HTTP/1.1 200 OK" -2026-05-11 01:17:45,490 INFO backend.segmentation: [APPLY_TEXTURE] DONE 23.628s at 2026-05-11T07:17:45.490550+00:00 -2026-05-11 01:18:02,698 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T07:18:02.698716+00:00 -2026-05-11 01:18:06,674 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" -2026-05-11 01:18:08,930 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 01:18:09,363 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 01:18:11,211 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/72669362-1cf1-469d-83d1-9b080846fd90 "HTTP/1.1 200 OK" -2026-05-11 01:18:11,228 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 01:18:13,530 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 01:18:15,794 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=72669362-1cf1-469d-83d1-9b080846fd90 "HTTP/1.1 200 OK" -2026-05-11 01:18:25,648 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\f28ee25e6084ff886854b49e0a422f18c0c201eb54c115542d6e3da8ae1bff12\image.webp "HTTP/1.1 200 OK" -2026-05-11 01:18:25,652 WARNING services.gradio_client_service: GPU Space render failed (Gradio Space render error: Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\gradio-space\App-que si funciona\app.py", line 346, in render_for_backend - result = renderer.render( - ^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Generandor de texturas\pipeline\renderer.py", line 102, in render - canvas = self._tile_texture(texture, tiles_x, tiles_y) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio), trying CPU fallback... -2026-05-11 01:18:26,163 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/config "HTTP/1.1 200 OK" -2026-05-11 01:18:26,695 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 01:18:26,760 WARNING backend.segmentation: Remote render via Gradio failed, falling back to local: Both Gradio Spaces render failed. - GPU (http://localhost:7861): Gradio Space render error: Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\gradio-space\App-que si funciona\app.py", line 346, in render_for_backend - result = renderer.render( - ^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Generandor de texturas\pipeline\renderer.py", line 102, in render - canvas = self._tile_texture(texture, tiles_x, tiles_y) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio - CPU (https://eduardo4547-hyper-reality-sam2-cpu.hf.space): Cannot find a function with `api_name`: /render. -2026-05-11 01:18:27,097 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm azul.jpg -2026-05-11 01:18:27,167 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 01:18:27,244 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/heartbeat/e3493f6c-8216-4b3c-ad23-6be8bfee608c "HTTP/1.1 200 OK" -2026-05-11 01:18:27,350 INFO backend.segmentation: [APPLY_TEXTURE] DONE 24.652s at 2026-05-11T07:18:27.350458+00:00 -2026-05-11 01:19:25,431 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T07:19:25.430391+00:00 -2026-05-11 01:19:31,260 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" -2026-05-11 01:19:33,529 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 01:19:34,187 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 01:19:36,012 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/219efbdb-1ac5-4065-ab0a-4961533a75b8 "HTTP/1.1 200 OK" -2026-05-11 01:19:36,041 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 01:19:38,405 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 01:19:40,673 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=219efbdb-1ac5-4065-ab0a-4961533a75b8 "HTTP/1.1 200 OK" -2026-05-11 01:19:56,234 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\fa7fc0fa70fe0bd04e4a677d0ff7567cb5e73db42518b2f94804471cb2f180a3\image.webp "HTTP/1.1 200 OK" -2026-05-11 01:19:56,347 INFO backend.segmentation: [APPLY_TEXTURE] DONE 30.917s at 2026-05-11T07:19:56.347937+00:00 -2026-05-11 01:21:43,185 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T07:21:43.185923+00:00 -2026-05-11 01:21:46,987 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" -2026-05-11 01:21:49,209 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 01:21:49,685 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 01:21:51,506 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/8ef4194a-039a-4899-abbe-ed9c2a60cef3 "HTTP/1.1 200 OK" -2026-05-11 01:21:51,512 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 01:21:53,789 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 01:21:55,997 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=8ef4194a-039a-4899-abbe-ed9c2a60cef3 "HTTP/1.1 200 OK" -2026-05-11 01:22:11,314 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\f28ee25e6084ff886854b49e0a422f18c0c201eb54c115542d6e3da8ae1bff12\image.webp "HTTP/1.1 200 OK" -2026-05-11 01:22:11,322 WARNING services.gradio_client_service: GPU Space render failed (Gradio Space render error: Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\gradio-space\App-que si funciona\app.py", line 346, in render_for_backend - result = renderer.render( - ^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Generandor de texturas\pipeline\renderer.py", line 102, in render - canvas = self._tile_texture(texture, tiles_x, tiles_y) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio), trying CPU fallback... -2026-05-11 01:22:11,894 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/config "HTTP/1.1 200 OK" -2026-05-11 01:22:12,458 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 01:22:12,524 WARNING backend.segmentation: Remote render via Gradio failed, falling back to local: Both Gradio Spaces render failed. - GPU (http://localhost:7861): Gradio Space render error: Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\gradio-space\App-que si funciona\app.py", line 346, in render_for_backend - result = renderer.render( - ^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Generandor de texturas\pipeline\renderer.py", line 102, in render - canvas = self._tile_texture(texture, tiles_x, tiles_y) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio - CPU (https://eduardo4547-hyper-reality-sam2-cpu.hf.space): Cannot find a function with `api_name`: /render. -2026-05-11 01:22:12,912 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm azul.jpg -2026-05-11 01:22:12,938 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 01:22:13,030 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/heartbeat/284ba0cb-0966-4791-889d-4043f7997679 "HTTP/1.1 200 OK" -2026-05-11 01:22:13,210 INFO backend.segmentation: [APPLY_TEXTURE] DONE 30.024s at 2026-05-11T07:22:13.210393+00:00 -2026-05-11 07:13:12,698 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7861 -2026-05-11 07:13:12,725 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 07:13:50,328 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a01d60ed81163beadabb83e"}, "remainingTimeMS": 30} -2026-05-11 07:13:58,568 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a01d616d81163beadabb83f"}, "remainingTimeMS": 30} -2026-05-11 07:15:33,988 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 07:15:34,010 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 07:15:45,946 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T13:15:45.946655+00:00 -2026-05-11 07:15:50,295 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 07:15:52,507 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 07:15:53,306 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 07:15:54,828 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/a11ee22c-36e3-4b24-981b-db3d93d99bea "HTTP/1.1 200 OK" -2026-05-11 07:15:54,847 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 07:15:57,142 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 07:15:59,380 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=a11ee22c-36e3-4b24-981b-db3d93d99bea "HTTP/1.1 200 OK" -2026-05-11 07:16:09,721 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\729d40f29feb319d3a68ae2b4fea5c683335ec7a103e3d78bd6a9d1387940f36\image.webp "HTTP/1.1 200 OK" -2026-05-11 07:16:09,783 INFO backend.segmentation: [APPLY_TEXTURE] DONE 23.837s at 2026-05-11T13:16:09.783095+00:00 -2026-05-11 07:17:13,338 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T13:17:13.338368+00:00 -2026-05-11 07:17:18,532 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 07:17:20,901 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 07:17:21,366 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 07:17:23,344 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/f6e2a1f3-2f5d-4db3-b90b-44c39de26562 "HTTP/1.1 200 OK" -2026-05-11 07:17:23,378 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 07:17:25,720 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 07:17:28,103 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=f6e2a1f3-2f5d-4db3-b90b-44c39de26562 "HTTP/1.1 200 OK" -2026-05-11 07:17:41,263 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\675d61dd04d77c05fa3d52350471a44ad72ba1d471483f3a9aed39ed7a39af6a\image.webp "HTTP/1.1 200 OK" -2026-05-11 07:17:41,323 INFO backend.segmentation: [APPLY_TEXTURE] DONE 27.985s at 2026-05-11T13:17:41.323349+00:00 -2026-05-11 07:17:55,935 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T13:17:55.935240+00:00 -2026-05-11 07:18:01,174 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 07:18:03,556 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 07:18:03,975 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 07:18:05,991 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 07:18:06,001 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/c29c2207-1ec3-4503-8893-9012e86a29e1 "HTTP/1.1 200 OK" -2026-05-11 07:18:08,513 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 07:18:10,864 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=c29c2207-1ec3-4503-8893-9012e86a29e1 "HTTP/1.1 200 OK" -2026-05-11 07:18:24,554 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\ccbb8ca6c7e4be2509d23cfc58038fb418eb8cd45d3d4d98a6d8775a3b07f85a\image.webp "HTTP/1.1 200 OK" -2026-05-11 07:18:24,627 INFO backend.segmentation: [APPLY_TEXTURE] DONE 28.693s at 2026-05-11T13:18:24.627719+00:00 -2026-05-11 07:18:33,797 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T13:18:33.797526+00:00 -2026-05-11 07:18:39,002 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 07:18:41,357 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 07:18:41,968 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 07:18:43,632 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/8ad846f5-30d0-476f-80e2-c217afbf0803 "HTTP/1.1 200 OK" -2026-05-11 07:18:43,635 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 07:18:46,182 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 07:18:48,596 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=8ad846f5-30d0-476f-80e2-c217afbf0803 "HTTP/1.1 200 OK" -2026-05-11 07:19:01,667 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\f28a68084867dd6206a2dc79b6123ec746f4a27cb24d83120172efbf07f8dd75\image.webp "HTTP/1.1 200 OK" -2026-05-11 07:19:01,731 INFO backend.segmentation: [APPLY_TEXTURE] DONE 27.934s at 2026-05-11T13:19:01.731818+00:00 -2026-05-11 07:19:18,283 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T13:19:18.283374+00:00 -2026-05-11 07:19:23,498 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 07:19:25,870 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 07:19:26,324 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 07:19:28,331 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/7c18efe0-2aa1-4a8c-b4de-45ff5ed748d0 "HTTP/1.1 200 OK" -2026-05-11 07:19:28,335 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 07:19:30,917 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 07:19:33,358 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=7c18efe0-2aa1-4a8c-b4de-45ff5ed748d0 "HTTP/1.1 200 OK" -2026-05-11 07:19:48,011 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\22e6a58307d452f4902fa2fb6a95d27241b0ee925497e2ea8e996c57055a5054\image.webp "HTTP/1.1 200 OK" -2026-05-11 07:19:48,073 INFO backend.segmentation: [APPLY_TEXTURE] DONE 29.790s at 2026-05-11T13:19:48.073114+00:00 -2026-05-11 07:21:10,171 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a01d7c64751e61bdffcd21f"}, "remainingTimeMS": 30} -2026-05-11 07:21:11,111 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a01d7c74751e61bdffcd220"}, "remainingTimeMS": 30} -2026-05-11 07:21:20,560 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T13:21:20.560364+00:00 -2026-05-11 07:21:20,666 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\hyper-reality-1778254222964.jpg -2026-05-11 07:21:21,019 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.459s at 2026-05-11T13:21:21.019762+00:00 -2026-05-11 07:27:15,633 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T13:27:15.633288+00:00 -2026-05-11 07:27:18,221 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 07:27:20,612 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 07:27:21,121 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 07:27:23,064 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 07:27:23,090 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/325c2bf9-7929-4ac4-8a3d-9b33144e56b7 "HTTP/1.1 200 OK" -2026-05-11 07:27:25,397 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 07:27:27,782 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=325c2bf9-7929-4ac4-8a3d-9b33144e56b7 "HTTP/1.1 200 OK" -2026-05-11 07:27:42,623 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\f8362e21088d5fd20e87ed36619f4fe1d0e0a2bc6ab13bdd8b4706d6b235624c\image.webp "HTTP/1.1 200 OK" -2026-05-11 07:27:42,670 INFO backend.segmentation: [APPLY_TEXTURE] DONE 27.038s at 2026-05-11T13:27:42.670991+00:00 -2026-05-11 07:27:49,357 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 07:27:49,376 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 07:27:50,356 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 07:27:50,373 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 07:27:50,535 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T13:27:50.535701+00:00 -2026-05-11 07:27:53,100 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 07:27:55,364 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 07:27:56,034 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 07:27:57,702 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/937d3390-5a64-49f4-8474-ccf21a7b6729 "HTTP/1.1 200 OK" -2026-05-11 07:27:57,704 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 07:27:59,916 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 07:28:02,136 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=937d3390-5a64-49f4-8474-ccf21a7b6729 "HTTP/1.1 200 OK" -2026-05-11 07:28:09,421 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\110d2842ccb4068c48b39f1b64f6346b8d4250df6032fb5fcd0702f592783ada\image.webp "HTTP/1.1 200 OK" -2026-05-11 07:28:09,461 INFO backend.segmentation: [APPLY_TEXTURE] DONE 18.926s at 2026-05-11T13:28:09.461663+00:00 -2026-05-11 07:28:25,643 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T13:28:25.643454+00:00 -2026-05-11 07:28:27,945 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 07:28:30,179 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 07:28:30,670 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 07:28:32,504 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/cc5f45a1-db87-4c3f-bb12-92f9dd7a18d9 "HTTP/1.1 200 OK" -2026-05-11 07:28:32,523 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 07:28:34,759 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 07:28:37,032 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=cc5f45a1-db87-4c3f-bb12-92f9dd7a18d9 "HTTP/1.1 200 OK" -2026-05-11 07:28:44,468 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\71a2029e9d632f4b23f28f463bbc5aa1c286b2dee733c22db45bd5e1efaf8736\image.webp "HTTP/1.1 200 OK" -2026-05-11 07:28:44,509 INFO backend.segmentation: [APPLY_TEXTURE] DONE 18.866s at 2026-05-11T13:28:44.509013+00:00 -2026-05-11 07:29:09,586 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T13:29:09.585246+00:00 -2026-05-11 07:29:11,883 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 07:29:14,093 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 07:29:14,652 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 07:29:16,350 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/bc41025f-ff7c-473a-99a4-e2866e146d8f "HTTP/1.1 200 OK" -2026-05-11 07:29:16,369 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 07:29:18,602 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 07:29:20,825 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=bc41025f-ff7c-473a-99a4-e2866e146d8f "HTTP/1.1 200 OK" -2026-05-11 07:29:28,367 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\71a2029e9d632f4b23f28f463bbc5aa1c286b2dee733c22db45bd5e1efaf8736\image.webp "HTTP/1.1 200 OK" -2026-05-11 07:29:28,407 INFO backend.segmentation: [APPLY_TEXTURE] DONE 18.822s at 2026-05-11T13:29:28.407606+00:00 -2026-05-11 07:29:43,030 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T13:29:43.029505+00:00 -2026-05-11 07:29:45,332 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 07:29:47,555 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 07:29:48,053 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 07:29:49,850 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/9b7c17df-0072-4385-8c82-f8409904d2c0 "HTTP/1.1 200 OK" -2026-05-11 07:29:49,867 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 07:29:52,080 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 07:29:54,315 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=9b7c17df-0072-4385-8c82-f8409904d2c0 "HTTP/1.1 200 OK" -2026-05-11 07:30:01,480 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\25f8fa5117371da311a2a13bd9132fa18bd3932b0e211851a8ae1228ddc2fce9\image.webp "HTTP/1.1 200 OK" -2026-05-11 07:30:01,520 INFO backend.segmentation: [APPLY_TEXTURE] DONE 18.491s at 2026-05-11T13:30:01.520860+00:00 -2026-05-11 07:33:43,650 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T13:33:43.650065+00:00 -2026-05-11 07:33:43,719 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\hyper-reality-1778254222964.jpg -2026-05-11 07:33:43,984 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.334s at 2026-05-11T13:33:43.984042+00:00 -2026-05-11 07:33:50,055 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 07:33:50,072 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 07:33:50,909 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 07:33:50,928 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 07:33:55,052 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T13:33:55.052005+00:00 -2026-05-11 07:33:55,120 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\hyper-reality-1778254222964.jpg -2026-05-11 07:33:55,356 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.304s at 2026-05-11T13:33:55.356129+00:00 -2026-05-11 07:34:02,218 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T13:34:02.218913+00:00 -2026-05-11 07:34:02,283 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\hyper-reality-1778254222964.jpg -2026-05-11 07:34:02,430 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.211s at 2026-05-11T13:34:02.430738+00:00 -2026-05-11 07:34:18,953 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 07:34:18,970 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 07:34:59,144 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T13:34:59.144946+00:00 -2026-05-11 07:34:59,206 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\hyper-reality-1778254222964.jpg -2026-05-11 07:34:59,450 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.305s at 2026-05-11T13:34:59.450085+00:00 -2026-05-11 07:35:06,472 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T13:35:06.472072+00:00 -2026-05-11 07:35:06,536 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\hyper-reality-1778254222964.jpg -2026-05-11 07:35:06,689 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.217s at 2026-05-11T13:35:06.689925+00:00 -2026-05-11 07:35:09,562 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T13:35:09.562481+00:00 -2026-05-11 07:35:09,621 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\hyper-reality-1778254222964.jpg -2026-05-11 07:35:09,776 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.214s at 2026-05-11T13:35:09.775774+00:00 -2026-05-11 07:35:16,445 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T13:35:16.445541+00:00 -2026-05-11 07:35:18,941 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 07:35:21,128 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 07:35:21,947 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 07:35:23,459 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/e4b31458-bd8a-4287-ae80-b3088c6194e8 "HTTP/1.1 200 OK" -2026-05-11 07:35:23,477 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 07:35:25,713 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 07:35:27,923 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=e4b31458-bd8a-4287-ae80-b3088c6194e8 "HTTP/1.1 200 OK" -2026-05-11 07:35:34,823 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\0338ca15cb59376406f9703a5fafbe1d16bce8078421b9b5f070f58ae0e1ddf3\image.webp "HTTP/1.1 200 OK" -2026-05-11 07:35:34,864 INFO backend.segmentation: [APPLY_TEXTURE] DONE 18.419s at 2026-05-11T13:35:34.864504+00:00 -2026-05-11 07:35:41,607 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T13:35:41.607751+00:00 -2026-05-11 07:35:41,661 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\hyper-reality-1778254222964.jpg -2026-05-11 07:35:41,798 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.191s at 2026-05-11T13:35:41.798823+00:00 -2026-05-11 07:36:11,418 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T13:36:11.418408+00:00 -2026-05-11 07:36:11,482 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\hyper-reality-1778254222964.jpg -2026-05-11 07:36:11,630 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.212s at 2026-05-11T13:36:11.630491+00:00 -2026-05-11 07:38:10,674 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T13:38:10.674971+00:00 -2026-05-11 07:38:10,733 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\hyper-reality-1778254222964.jpg -2026-05-11 07:38:10,874 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.199s at 2026-05-11T13:38:10.874147+00:00 -2026-05-11 07:38:14,602 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T13:38:14.602624+00:00 -2026-05-11 07:38:14,659 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\hyper-reality-1778254222964.jpg -2026-05-11 07:38:14,788 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.186s at 2026-05-11T13:38:14.788434+00:00 -2026-05-11 07:38:16,586 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T13:38:16.586749+00:00 -2026-05-11 07:38:16,638 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\hyper-reality-1778254222964.jpg -2026-05-11 07:38:16,775 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.189s at 2026-05-11T13:38:16.775439+00:00 -2026-05-11 07:38:22,824 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 07:38:22,841 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 07:38:23,729 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 07:38:23,748 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 07:38:24,732 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T13:38:24.732831+00:00 -2026-05-11 07:38:27,246 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 07:38:29,471 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 07:38:30,373 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 07:38:31,820 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/0bde684e-9409-42df-85ba-a06b9ce26f5d "HTTP/1.1 200 OK" -2026-05-11 07:38:31,823 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 07:38:34,067 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 07:38:36,312 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=0bde684e-9409-42df-85ba-a06b9ce26f5d "HTTP/1.1 200 OK" -2026-05-11 07:38:44,753 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\14adfeb89efc350fed4c091a1c2a36b9963f8f02c3b0acdab1a057c2491bd08b\image.webp "HTTP/1.1 200 OK" -2026-05-11 07:38:44,789 INFO backend.segmentation: [APPLY_TEXTURE] DONE 20.057s at 2026-05-11T13:38:44.789504+00:00 -2026-05-11 07:38:51,084 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T13:38:51.084073+00:00 -2026-05-11 07:38:53,437 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 07:38:55,654 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 07:38:56,151 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 07:38:57,952 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/fcddc33f-ce6c-4a1a-b8e7-e15271bb8b28 "HTTP/1.1 200 OK" -2026-05-11 07:38:57,956 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 07:39:00,194 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 07:39:02,430 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=fcddc33f-ce6c-4a1a-b8e7-e15271bb8b28 "HTTP/1.1 200 OK" -2026-05-11 07:39:09,990 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\3f7673441243a20fb8c1c1296c0604d6add78c532f3b43713dc33c6f5b01c01d\image.webp "HTTP/1.1 200 OK" -2026-05-11 07:39:10,290 INFO backend.segmentation: [APPLY_TEXTURE] DONE 19.207s at 2026-05-11T13:39:10.290307+00:00 -2026-05-11 07:39:38,492 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T13:39:38.492111+00:00 -2026-05-11 07:39:40,832 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 07:39:43,049 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 07:39:43,532 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 07:39:45,309 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/9089d9d6-6621-45d6-8f79-0cad62b5e02e "HTTP/1.1 200 OK" -2026-05-11 07:39:45,327 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 07:39:47,563 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 07:39:49,790 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=9089d9d6-6621-45d6-8f79-0cad62b5e02e "HTTP/1.1 200 OK" -2026-05-11 07:39:57,349 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\edf2f53c824ca65974f0828fb3ec04b4f927ff2b9e1d15f34452a0c9c692c6c1\image.webp "HTTP/1.1 200 OK" -2026-05-11 07:39:57,388 INFO backend.segmentation: [APPLY_TEXTURE] DONE 18.897s at 2026-05-11T13:39:57.388992+00:00 -2026-05-11 07:40:32,684 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T13:40:32.684097+00:00 -2026-05-11 07:40:34,989 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 07:40:37,204 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 07:40:37,643 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 07:40:39,445 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/9309607a-78df-4850-b4ed-d11d8ce128dc "HTTP/1.1 200 OK" -2026-05-11 07:40:39,479 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 07:40:41,701 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 07:40:43,917 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=9309607a-78df-4850-b4ed-d11d8ce128dc "HTTP/1.1 200 OK" -2026-05-11 07:40:51,589 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\93a293fc5f8b3f7ca4a901325b2a8043caa52a8e718eb3f3aaf5e7af683c761e\image.webp "HTTP/1.1 200 OK" -2026-05-11 07:40:51,625 INFO backend.segmentation: [APPLY_TEXTURE] DONE 18.941s at 2026-05-11T13:40:51.625392+00:00 -2026-05-11 07:41:13,398 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T13:41:13.398449+00:00 -2026-05-11 07:41:15,759 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 07:41:18,011 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 07:41:18,516 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 07:41:20,297 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/99b73b62-ad71-4c2b-bd87-9c72f216d0e0 "HTTP/1.1 200 OK" -2026-05-11 07:41:20,299 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 07:41:22,508 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 07:41:24,718 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=99b73b62-ad71-4c2b-bd87-9c72f216d0e0 "HTTP/1.1 200 OK" -2026-05-11 07:41:32,501 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\e939b9878a8afdfede728393e1124bcaf1e59cb72b45f15f0000cf7073ba5417\image.webp "HTTP/1.1 200 OK" -2026-05-11 07:41:32,537 INFO backend.segmentation: [APPLY_TEXTURE] DONE 19.139s at 2026-05-11T13:41:32.537339+00:00 -2026-05-11 07:41:59,745 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T13:41:59.745741+00:00 -2026-05-11 07:42:02,074 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 07:42:04,321 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 07:42:04,758 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 07:42:06,589 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/cba0e5ca-e1fb-4dba-adad-98257d2209d2 "HTTP/1.1 200 OK" -2026-05-11 07:42:06,591 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 07:42:08,826 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 07:42:11,070 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=cba0e5ca-e1fb-4dba-adad-98257d2209d2 "HTTP/1.1 200 OK" -2026-05-11 07:42:18,732 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\7cb0ccfd38250adde7e4e1bbd7e0c134e715b997602e6ae1d49a345e3def99ff\image.webp "HTTP/1.1 200 OK" -2026-05-11 07:42:18,771 INFO backend.segmentation: [APPLY_TEXTURE] DONE 19.026s at 2026-05-11T13:42:18.771536+00:00 -2026-05-11 07:42:51,522 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T13:42:51.522667+00:00 -2026-05-11 07:42:53,886 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 07:42:56,101 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 07:42:56,624 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 07:42:58,399 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 07:42:58,411 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/6392e3d4-2343-4057-a9f3-4266c304696d "HTTP/1.1 200 OK" -2026-05-11 07:43:00,667 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 07:43:02,915 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=6392e3d4-2343-4057-a9f3-4266c304696d "HTTP/1.1 200 OK" -2026-05-11 07:43:10,561 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\12042b72b3e1b7eb8bc40f86c07a6b00feaa7c6496facdea8517ff6d5906573b\image.webp "HTTP/1.1 200 OK" -2026-05-11 07:43:10,596 INFO backend.segmentation: [APPLY_TEXTURE] DONE 19.075s at 2026-05-11T13:43:10.596965+00:00 -2026-05-11 07:43:37,234 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T13:43:37.234198+00:00 -2026-05-11 07:43:39,565 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 07:43:41,794 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 07:43:42,228 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 07:43:44,077 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 07:43:44,090 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/9faceb92-08d2-469d-bba5-65a235389397 "HTTP/1.1 200 OK" -2026-05-11 07:43:46,307 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 07:43:48,512 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=9faceb92-08d2-469d-bba5-65a235389397 "HTTP/1.1 200 OK" -2026-05-11 07:43:56,081 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\f28ee25e6084ff886854b49e0a422f18c0c201eb54c115542d6e3da8ae1bff12\image.webp "HTTP/1.1 200 OK" -2026-05-11 07:43:56,090 WARNING services.gradio_client_service: GPU Space render failed (Gradio Space render error: Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\gradio-space\App-que si funciona\app.py", line 346, in render_for_backend - result = renderer.render( - ^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Generandor de texturas\pipeline\renderer.py", line 114, in render - warped = cv2.warpPerspective( - ^^^^^^^^^^^^^^^^^^^^ -cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\imgwar), trying CPU fallback... -2026-05-11 07:43:56,692 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/config "HTTP/1.1 200 OK" -2026-05-11 07:43:58,256 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 07:43:58,334 WARNING backend.segmentation: Remote render via Gradio failed, falling back to local: Both Gradio Spaces render failed. - GPU (http://localhost:7860): Gradio Space render error: Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\gradio-space\App-que si funciona\app.py", line 346, in render_for_backend - result = renderer.render( - ^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Generandor de texturas\pipeline\renderer.py", line 114, in render - warped = cv2.warpPerspective( - ^^^^^^^^^^^^^^^^^^^^ -cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\imgwar - CPU (https://eduardo4547-hyper-reality-sam2-cpu.hf.space): Cannot find a function with `api_name`: /render. -2026-05-11 07:43:58,384 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\hyper-reality-1778254222964.jpg -2026-05-11 07:43:58,605 INFO backend.segmentation: [APPLY_TEXTURE] DONE 21.372s at 2026-05-11T13:43:58.605602+00:00 -2026-05-11 07:43:58,819 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/heartbeat/31d3bf51-d166-46d7-b293-3bed8d7168e2 "HTTP/1.1 200 OK" -2026-05-11 07:43:58,876 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 07:44:19,811 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T13:44:19.811326+00:00 -2026-05-11 07:44:22,182 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 07:44:24,421 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 07:44:24,819 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 07:44:26,702 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 07:44:26,713 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/e0d0c951-cf23-41f4-ae41-1737485e6342 "HTTP/1.1 200 OK" -2026-05-11 07:44:28,952 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 07:44:31,175 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=e0d0c951-cf23-41f4-ae41-1737485e6342 "HTTP/1.1 200 OK" -2026-05-11 07:44:38,763 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\0daad28c16c3efda612bf1756d7fa4ca142964f11f7d46b2f28cd63398fcf7f5\image.webp "HTTP/1.1 200 OK" -2026-05-11 07:44:38,807 INFO backend.segmentation: [APPLY_TEXTURE] DONE 18.996s at 2026-05-11T13:44:38.807439+00:00 -2026-05-11 07:45:14,328 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T13:45:14.328987+00:00 -2026-05-11 07:45:16,655 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 07:45:18,887 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 07:45:19,378 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 07:45:21,178 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/e9e8492e-0e98-40fc-9b78-5d6a8f089986 "HTTP/1.1 200 OK" -2026-05-11 07:45:21,180 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 07:45:23,442 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 07:45:25,653 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=e9e8492e-0e98-40fc-9b78-5d6a8f089986 "HTTP/1.1 200 OK" -2026-05-11 07:45:33,036 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\f28ee25e6084ff886854b49e0a422f18c0c201eb54c115542d6e3da8ae1bff12\image.webp "HTTP/1.1 200 OK" -2026-05-11 07:45:33,040 WARNING services.gradio_client_service: GPU Space render failed (Gradio Space render error: Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\gradio-space\App-que si funciona\app.py", line 346, in render_for_backend - result = renderer.render( - ^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Generandor de texturas\pipeline\renderer.py", line 114, in render - warped = cv2.warpPerspective( - ^^^^^^^^^^^^^^^^^^^^ -cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\imgwar), trying CPU fallback... -2026-05-11 07:45:33,595 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/config "HTTP/1.1 200 OK" -2026-05-11 07:45:34,139 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 07:45:34,205 WARNING backend.segmentation: Remote render via Gradio failed, falling back to local: Both Gradio Spaces render failed. - GPU (http://localhost:7860): Gradio Space render error: Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\gradio-space\App-que si funciona\app.py", line 346, in render_for_backend - result = renderer.render( - ^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Generandor de texturas\pipeline\renderer.py", line 114, in render - warped = cv2.warpPerspective( - ^^^^^^^^^^^^^^^^^^^^ -cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\imgwar - CPU (https://eduardo4547-hyper-reality-sam2-cpu.hf.space): Cannot find a function with `api_name`: /render. -2026-05-11 07:45:34,251 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\hyper-reality-1778254222964.jpg -2026-05-11 07:45:34,383 INFO backend.segmentation: [APPLY_TEXTURE] DONE 20.055s at 2026-05-11T13:45:34.383184+00:00 -2026-05-11 07:45:34,629 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 07:45:34,706 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/heartbeat/1564da95-6ba7-4dcd-b803-181c06a794ff "HTTP/1.1 200 OK" -2026-05-11 07:46:33,928 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T13:46:33.928213+00:00 -2026-05-11 07:46:36,364 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 07:46:38,648 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 07:46:39,057 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 07:46:41,001 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/a00f5788-7a02-4625-a39f-678676469771 "HTTP/1.1 200 OK" -2026-05-11 07:46:41,003 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 07:46:43,263 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 07:46:45,512 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=a00f5788-7a02-4625-a39f-678676469771 "HTTP/1.1 200 OK" -2026-05-11 07:46:53,902 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\4d35dd1da300e912d4594e91f1dd8e7800f9691a6c461c1feaf24c4f1a84e6b2\image.webp "HTTP/1.1 200 OK" -2026-05-11 07:46:53,937 INFO backend.segmentation: [APPLY_TEXTURE] DONE 20.010s at 2026-05-11T13:46:53.937355+00:00 -2026-05-11 07:47:24,918 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T13:47:24.918247+00:00 -2026-05-11 07:47:27,312 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 07:47:29,573 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 07:47:29,998 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 07:47:31,912 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/357fd497-f65c-4b01-b191-ac1d988235e2 "HTTP/1.1 200 OK" -2026-05-11 07:47:31,913 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 07:47:34,171 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 07:47:36,414 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=357fd497-f65c-4b01-b191-ac1d988235e2 "HTTP/1.1 200 OK" -2026-05-11 07:47:44,980 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\f28ee25e6084ff886854b49e0a422f18c0c201eb54c115542d6e3da8ae1bff12\image.webp "HTTP/1.1 200 OK" -2026-05-11 07:47:44,989 WARNING services.gradio_client_service: GPU Space render failed (Gradio Space render error: Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\gradio-space\App-que si funciona\app.py", line 346, in render_for_backend - result = renderer.render( - ^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Generandor de texturas\pipeline\renderer.py", line 114, in render - warped = cv2.warpPerspective( - ^^^^^^^^^^^^^^^^^^^^ -cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\imgwar), trying CPU fallback... -2026-05-11 07:47:45,614 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/config "HTTP/1.1 200 OK" -2026-05-11 07:47:46,162 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 07:47:46,232 WARNING backend.segmentation: Remote render via Gradio failed, falling back to local: Both Gradio Spaces render failed. - GPU (http://localhost:7860): Gradio Space render error: Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\gradio-space\App-que si funciona\app.py", line 346, in render_for_backend - result = renderer.render( - ^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Generandor de texturas\pipeline\renderer.py", line 114, in render - warped = cv2.warpPerspective( - ^^^^^^^^^^^^^^^^^^^^ -cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\imgwar - CPU (https://eduardo4547-hyper-reality-sam2-cpu.hf.space): Cannot find a function with `api_name`: /render. -2026-05-11 07:47:46,286 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\hyper-reality-1778254222964.jpg -2026-05-11 07:47:46,442 INFO backend.segmentation: [APPLY_TEXTURE] DONE 21.524s at 2026-05-11T13:47:46.442982+00:00 -2026-05-11 07:47:46,714 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 07:47:46,814 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/heartbeat/1f91b04c-d094-4ee1-a145-a4b4e6ae6f77 "HTTP/1.1 200 OK" -2026-05-11 07:47:51,353 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T13:47:51.353332+00:00 -2026-05-11 07:47:53,787 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 07:47:56,074 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 07:47:56,491 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 07:47:58,489 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/9041175c-8b0a-4ec9-8f88-9908152bf966 "HTTP/1.1 200 OK" -2026-05-11 07:47:58,491 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 07:48:00,774 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 07:48:03,043 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=9041175c-8b0a-4ec9-8f88-9908152bf966 "HTTP/1.1 200 OK" -2026-05-11 07:48:11,807 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\f28ee25e6084ff886854b49e0a422f18c0c201eb54c115542d6e3da8ae1bff12\image.webp "HTTP/1.1 200 OK" -2026-05-11 07:48:11,811 WARNING services.gradio_client_service: GPU Space render failed (Gradio Space render error: Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\gradio-space\App-que si funciona\app.py", line 346, in render_for_backend - result = renderer.render( - ^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Generandor de texturas\pipeline\renderer.py", line 114, in render - warped = cv2.warpPerspective( - ^^^^^^^^^^^^^^^^^^^^ -cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\imgwar), trying CPU fallback... -2026-05-11 07:48:12,417 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/config "HTTP/1.1 200 OK" -2026-05-11 07:48:12,978 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 07:48:13,047 WARNING backend.segmentation: Remote render via Gradio failed, falling back to local: Both Gradio Spaces render failed. - GPU (http://localhost:7860): Gradio Space render error: Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\gradio-space\App-que si funciona\app.py", line 346, in render_for_backend - result = renderer.render( - ^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Generandor de texturas\pipeline\renderer.py", line 114, in render - warped = cv2.warpPerspective( - ^^^^^^^^^^^^^^^^^^^^ -cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\imgwar - CPU (https://eduardo4547-hyper-reality-sam2-cpu.hf.space): Cannot find a function with `api_name`: /render. -2026-05-11 07:48:13,100 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\hyper-reality-1778254222964.jpg -2026-05-11 07:48:13,255 INFO backend.segmentation: [APPLY_TEXTURE] DONE 21.901s at 2026-05-11T13:48:13.255523+00:00 -2026-05-11 07:48:13,470 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 07:48:13,570 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/heartbeat/86a5d70d-fa66-4e77-b00d-c6aba4296bf8 "HTTP/1.1 200 OK" -2026-05-11 07:48:30,424 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T13:48:30.424562+00:00 -2026-05-11 07:48:32,748 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 07:48:34,991 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 07:48:35,404 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 07:48:37,281 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/7619bfd6-9537-43ba-8ffc-2e81c5538505 "HTTP/1.1 200 OK" -2026-05-11 07:48:37,296 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 07:48:39,544 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 07:48:41,758 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=7619bfd6-9537-43ba-8ffc-2e81c5538505 "HTTP/1.1 200 OK" -2026-05-11 07:48:50,375 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\f28ee25e6084ff886854b49e0a422f18c0c201eb54c115542d6e3da8ae1bff12\image.webp "HTTP/1.1 200 OK" -2026-05-11 07:48:50,379 WARNING services.gradio_client_service: GPU Space render failed (Gradio Space render error: Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\gradio-space\App-que si funciona\app.py", line 346, in render_for_backend - result = renderer.render( - ^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Generandor de texturas\pipeline\renderer.py", line 114, in render - warped = cv2.warpPerspective( - ^^^^^^^^^^^^^^^^^^^^ -cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\imgwar), trying CPU fallback... -2026-05-11 07:48:50,938 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/config "HTTP/1.1 200 OK" -2026-05-11 07:48:51,496 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 07:48:51,567 WARNING backend.segmentation: Remote render via Gradio failed, falling back to local: Both Gradio Spaces render failed. - GPU (http://localhost:7860): Gradio Space render error: Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\gradio-space\App-que si funciona\app.py", line 346, in render_for_backend - result = renderer.render( - ^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Generandor de texturas\pipeline\renderer.py", line 114, in render - warped = cv2.warpPerspective( - ^^^^^^^^^^^^^^^^^^^^ -cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\imgwar - CPU (https://eduardo4547-hyper-reality-sam2-cpu.hf.space): Cannot find a function with `api_name`: /render. -2026-05-11 07:48:51,612 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\hyper-reality-1778254222964.jpg -2026-05-11 07:48:51,740 INFO backend.segmentation: [APPLY_TEXTURE] DONE 21.315s at 2026-05-11T13:48:51.740122+00:00 -2026-05-11 07:48:52,074 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/heartbeat/a00d1f87-e3ec-4e12-8e9c-2996de163879 "HTTP/1.1 200 OK" -2026-05-11 07:48:52,074 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 07:49:23,980 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T13:49:23.980415+00:00 -2026-05-11 07:49:26,360 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 07:49:28,599 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 07:49:29,020 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 07:49:30,925 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/304091ec-fab3-47d9-96ec-fe167949a362 "HTTP/1.1 200 OK" -2026-05-11 07:49:30,927 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 07:49:33,143 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 07:49:35,383 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=304091ec-fab3-47d9-96ec-fe167949a362 "HTTP/1.1 200 OK" -2026-05-11 07:49:44,261 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\00613741eaeb077b298a6d4d93d8e4bf259c3ef854e9bcf70f1512004c8aa153\image.webp "HTTP/1.1 200 OK" -2026-05-11 07:49:44,308 INFO backend.segmentation: [APPLY_TEXTURE] DONE 20.327s at 2026-05-11T13:49:44.308139+00:00 -2026-05-11 07:50:14,097 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T13:50:14.097240+00:00 -2026-05-11 07:50:16,435 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 07:50:18,683 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 07:50:19,176 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 07:50:21,006 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 07:50:21,020 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/e9f3e165-c3d5-4f55-aa69-0df03df96edb "HTTP/1.1 200 OK" -2026-05-11 07:50:23,258 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 07:50:25,482 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=e9f3e165-c3d5-4f55-aa69-0df03df96edb "HTTP/1.1 200 OK" -2026-05-11 07:50:33,149 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\4b50605c21544baded31f810e531e694fac79169d17d82135ea782303cd12fb4\image.webp "HTTP/1.1 200 OK" -2026-05-11 07:50:33,185 INFO backend.segmentation: [APPLY_TEXTURE] DONE 19.088s at 2026-05-11T13:50:33.185866+00:00 -2026-05-11 07:52:34,828 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T13:52:34.828499+00:00 -2026-05-11 07:52:37,264 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 07:52:39,566 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 07:52:40,098 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 07:52:41,933 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/f4f3cbfa-3f67-4632-81cb-329bb225e919 "HTTP/1.1 200 OK" -2026-05-11 07:52:41,936 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 07:52:44,186 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 07:52:46,470 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=f4f3cbfa-3f67-4632-81cb-329bb225e919 "HTTP/1.1 200 OK" -2026-05-11 07:52:54,457 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\f28ee25e6084ff886854b49e0a422f18c0c201eb54c115542d6e3da8ae1bff12\image.webp "HTTP/1.1 200 OK" -2026-05-11 07:52:54,460 WARNING services.gradio_client_service: GPU Space render failed (Gradio Space render error: Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\gradio-space\App-que si funciona\app.py", line 346, in render_for_backend - result = renderer.render( - ^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Generandor de texturas\pipeline\renderer.py", line 114, in render - H_use = H - ^^^^ -cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\imgwarp.cpp:1603: error: (-215:Assertion faile), trying CPU fallback... -2026-05-11 07:52:55,149 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/config "HTTP/1.1 200 OK" -2026-05-11 07:52:55,689 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 07:52:55,759 WARNING backend.segmentation: Remote render via Gradio failed, falling back to local: Both Gradio Spaces render failed. - GPU (http://localhost:7860): Gradio Space render error: Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\gradio-space\App-que si funciona\app.py", line 346, in render_for_backend - result = renderer.render( - ^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Generandor de texturas\pipeline\renderer.py", line 114, in render - H_use = H - ^^^^ -cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\imgwarp.cpp:1603: error: (-215:Assertion faile - CPU (https://eduardo4547-hyper-reality-sam2-cpu.hf.space): Cannot find a function with `api_name`: /render. -2026-05-11 07:52:55,807 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\hyper-reality-1778254222964.jpg -2026-05-11 07:52:55,946 INFO backend.segmentation: [APPLY_TEXTURE] DONE 21.118s at 2026-05-11T13:52:55.946206+00:00 -2026-05-11 07:52:56,178 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 07:52:56,265 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/heartbeat/9c024d3c-af3e-45de-b8fc-f75c52365214 "HTTP/1.1 200 OK" -2026-05-11 07:58:14,024 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T13:58:14.024477+00:00 -2026-05-11 07:58:16,411 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 07:58:18,656 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 07:58:19,099 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 07:58:20,950 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/d6909bc3-d587-4923-b9cc-fea28e2c8d28 "HTTP/1.1 200 OK" -2026-05-11 07:58:20,952 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 07:58:23,172 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 07:58:25,403 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=d6909bc3-d587-4923-b9cc-fea28e2c8d28 "HTTP/1.1 200 OK" -2026-05-11 07:58:33,857 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\987159a827f379f87e9c995518d269a518dfc37c640f16eff273692570e80f2a\image.webp "HTTP/1.1 200 OK" -2026-05-11 07:58:33,890 INFO backend.segmentation: [APPLY_TEXTURE] DONE 19.866s at 2026-05-11T13:58:33.890680+00:00 -2026-05-11 07:58:39,628 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T13:58:39.628872+00:00 -2026-05-11 07:58:42,010 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 07:58:44,244 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 07:58:44,677 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 07:58:46,514 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/546d7635-9190-4e6a-8700-3eeb733c62ec "HTTP/1.1 200 OK" -2026-05-11 07:58:46,517 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 07:58:48,734 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 07:58:50,947 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=546d7635-9190-4e6a-8700-3eeb733c62ec "HTTP/1.1 200 OK" -2026-05-11 07:58:58,709 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\1490927a61f8d8b34eec3b75cb02ef5d43f3b033f6d87ef87cfc26e65134ede6\image.webp "HTTP/1.1 200 OK" -2026-05-11 07:58:58,747 INFO backend.segmentation: [APPLY_TEXTURE] DONE 19.120s at 2026-05-11T13:58:58.747902+00:00 -2026-05-11 07:59:05,334 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T13:59:05.334329+00:00 -2026-05-11 07:59:07,668 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 07:59:09,896 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 07:59:10,389 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 07:59:12,207 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 07:59:12,250 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/cc7231ca-ad09-4302-8f4f-6a5b3e8f7f48 "HTTP/1.1 200 OK" -2026-05-11 07:59:14,441 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 07:59:16,674 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=cc7231ca-ad09-4302-8f4f-6a5b3e8f7f48 "HTTP/1.1 200 OK" -2026-05-11 07:59:24,158 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\dbb87bc0ebe7e1ac10869ea5eaf4e0d0967caea93684547220068a8b63f78b18\image.webp "HTTP/1.1 200 OK" -2026-05-11 07:59:24,195 INFO backend.segmentation: [APPLY_TEXTURE] DONE 18.861s at 2026-05-11T13:59:24.195698+00:00 -2026-05-11 07:59:46,877 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T13:59:46.876668+00:00 -2026-05-11 07:59:49,210 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 07:59:51,442 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 07:59:51,837 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 07:59:53,724 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/2ee1d35a-5d2e-4286-bee5-254903ec06db "HTTP/1.1 200 OK" -2026-05-11 07:59:53,742 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 07:59:55,977 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 07:59:58,201 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=2ee1d35a-5d2e-4286-bee5-254903ec06db "HTTP/1.1 200 OK" -2026-05-11 08:00:06,702 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\96c46a348b2065bb96f156676c26da6d1cdd056b209721019eca14fd25aa9084\image.webp "HTTP/1.1 200 OK" -2026-05-11 08:00:06,740 INFO backend.segmentation: [APPLY_TEXTURE] DONE 19.864s at 2026-05-11T14:00:06.740786+00:00 -2026-05-11 08:00:34,547 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T14:00:34.547538+00:00 -2026-05-11 08:00:36,904 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 08:00:39,110 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 08:00:39,625 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 08:00:41,406 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 08:00:41,419 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/a01577fb-f880-4ee3-981e-3523977c1b8f "HTTP/1.1 200 OK" -2026-05-11 08:00:43,642 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 08:00:45,881 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=a01577fb-f880-4ee3-981e-3523977c1b8f "HTTP/1.1 200 OK" -2026-05-11 08:00:54,201 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\987159a827f379f87e9c995518d269a518dfc37c640f16eff273692570e80f2a\image.webp "HTTP/1.1 200 OK" -2026-05-11 08:00:54,241 INFO backend.segmentation: [APPLY_TEXTURE] DONE 19.694s at 2026-05-11T14:00:54.241384+00:00 -2026-05-11 08:01:26,566 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T14:01:26.566374+00:00 -2026-05-11 08:01:28,909 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 08:01:31,121 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 08:01:31,535 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 08:01:33,408 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/890ae067-0b8f-489c-9092-de4d752fa564 "HTTP/1.1 200 OK" -2026-05-11 08:01:33,410 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 08:01:35,686 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 08:01:37,910 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=890ae067-0b8f-489c-9092-de4d752fa564 "HTTP/1.1 200 OK" -2026-05-11 08:01:46,590 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\987159a827f379f87e9c995518d269a518dfc37c640f16eff273692570e80f2a\image.webp "HTTP/1.1 200 OK" -2026-05-11 08:01:46,624 INFO backend.segmentation: [APPLY_TEXTURE] DONE 20.059s at 2026-05-11T14:01:46.624359+00:00 -2026-05-11 08:05:00,704 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T14:05:00.704661+00:00 -2026-05-11 08:05:03,047 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 08:05:05,262 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 08:05:05,747 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 08:05:07,565 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/2db5d1bc-826f-4608-a63c-f1cda9a1d15b "HTTP/1.1 200 OK" -2026-05-11 08:05:07,568 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 08:05:09,761 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 08:05:11,989 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=2db5d1bc-826f-4608-a63c-f1cda9a1d15b "HTTP/1.1 200 OK" -2026-05-11 08:05:20,990 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\4dfeaf8db13e7e9ba4d4b373bcbd933917786b8c7251bc842c08f6d35f84e9b6\image.webp "HTTP/1.1 200 OK" -2026-05-11 08:05:21,025 INFO backend.segmentation: [APPLY_TEXTURE] DONE 20.320s at 2026-05-11T14:05:21.025114+00:00 -2026-05-11 08:05:27,461 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 08:05:27,481 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 08:05:28,299 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 08:05:28,319 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 08:05:43,358 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T14:05:43.358604+00:00 -2026-05-11 08:05:46,015 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 08:05:48,276 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 08:05:48,995 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 08:05:50,631 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/38af6323-4f6a-4a33-9a0d-b5be47122b67 "HTTP/1.1 200 OK" -2026-05-11 08:05:50,651 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 08:05:52,883 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 08:05:55,107 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=38af6323-4f6a-4a33-9a0d-b5be47122b67 "HTTP/1.1 200 OK" -2026-05-11 08:06:06,052 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\144b6b0df63f1387ed840eceafe5d2b8f7db1b54609abf7d9a9daa6146354b23\image.webp "HTTP/1.1 200 OK" -2026-05-11 08:06:06,092 INFO backend.segmentation: [APPLY_TEXTURE] DONE 22.734s at 2026-05-11T14:06:06.092403+00:00 -2026-05-11 08:07:29,154 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T14:07:29.154213+00:00 -2026-05-11 08:07:31,494 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 08:07:33,741 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 08:07:34,288 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 08:07:36,021 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/78566e56-129d-40a1-a82c-c9cc572a7804 "HTTP/1.1 200 OK" -2026-05-11 08:07:36,023 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 08:07:38,257 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 08:07:40,458 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=78566e56-129d-40a1-a82c-c9cc572a7804 "HTTP/1.1 200 OK" -2026-05-11 08:07:50,381 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\987159a827f379f87e9c995518d269a518dfc37c640f16eff273692570e80f2a\image.webp "HTTP/1.1 200 OK" -2026-05-11 08:07:50,417 INFO backend.segmentation: [APPLY_TEXTURE] DONE 21.263s at 2026-05-11T14:07:50.417306+00:00 -2026-05-11 08:08:10,461 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T14:08:10.461199+00:00 -2026-05-11 08:08:12,832 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 08:08:15,036 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 08:08:15,501 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 08:08:17,307 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/888913d0-8e69-4520-8597-cbad16ea3cd7 "HTTP/1.1 200 OK" -2026-05-11 08:08:17,326 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 08:08:19,538 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 08:08:21,759 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=888913d0-8e69-4520-8597-cbad16ea3cd7 "HTTP/1.1 200 OK" -2026-05-11 08:08:32,468 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\7e6ff7bf200d28e66c23d75766cb649fc9597f09a8241b45d687be838bfa1085\image.webp "HTTP/1.1 200 OK" -2026-05-11 08:08:32,507 INFO backend.segmentation: [APPLY_TEXTURE] DONE 22.047s at 2026-05-11T14:08:32.507337+00:00 -2026-05-11 08:08:54,411 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T14:08:54.411551+00:00 -2026-05-11 08:08:56,721 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 08:08:58,939 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 08:08:59,460 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 08:09:01,233 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 08:09:01,245 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/4896be72-16b2-4506-91d4-02a27828afaa "HTTP/1.1 200 OK" -2026-05-11 08:09:03,498 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 08:09:05,729 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=4896be72-16b2-4506-91d4-02a27828afaa "HTTP/1.1 200 OK" -2026-05-11 08:09:14,723 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\af4f3fa044a7204adb2c57ef603ef360e3362f85ed00457b04e34a491ec666e8\image.webp "HTTP/1.1 200 OK" -2026-05-11 08:09:14,762 INFO backend.segmentation: [APPLY_TEXTURE] DONE 20.351s at 2026-05-11T14:09:14.762425+00:00 -2026-05-11 08:09:22,534 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T14:09:22.534016+00:00 -2026-05-11 08:09:24,926 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 08:09:27,143 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 08:09:27,537 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 08:09:29,474 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 08:09:29,486 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/fdf76cc5-d79f-46f3-b7db-ca3a2caaf6e3 "HTTP/1.1 200 OK" -2026-05-11 08:09:31,704 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 08:09:33,945 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=fdf76cc5-d79f-46f3-b7db-ca3a2caaf6e3 "HTTP/1.1 200 OK" -2026-05-11 08:09:44,576 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\4ae185acfa96321252f6fbee0b0c47d2ec48d2eb2d8c75a32c9484328757be0a\image.webp "HTTP/1.1 200 OK" -2026-05-11 08:09:44,617 INFO backend.segmentation: [APPLY_TEXTURE] DONE 22.084s at 2026-05-11T14:09:44.617998+00:00 -2026-05-11 08:23:54,106 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T14:23:54.106236+00:00 -2026-05-11 08:23:56,479 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 08:23:58,721 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 08:23:59,155 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 08:24:00,999 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/b27941ee-5963-4362-87b3-9d3fb7816292 "HTTP/1.1 200 OK" -2026-05-11 08:24:01,017 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 08:24:03,224 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 08:24:05,462 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=b27941ee-5963-4362-87b3-9d3fb7816292 "HTTP/1.1 200 OK" -2026-05-11 08:24:14,422 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\8971bd447e4d858b88a21e46216b5cac4da8a62df09b03a0bf9f69414bbfbc3f\image.webp "HTTP/1.1 200 OK" -2026-05-11 08:24:14,459 INFO backend.segmentation: [APPLY_TEXTURE] DONE 20.353s at 2026-05-11T14:24:14.459186+00:00 -2026-05-11 08:24:40,154 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T14:24:40.154067+00:00 -2026-05-11 08:24:42,526 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 08:24:44,739 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 08:24:45,274 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 08:24:47,037 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/8b632d65-db4b-43c5-9d5b-176d77682b4d "HTTP/1.1 200 OK" -2026-05-11 08:24:47,040 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 08:24:49,310 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 08:24:51,551 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=8b632d65-db4b-43c5-9d5b-176d77682b4d "HTTP/1.1 200 OK" -2026-05-11 08:24:59,555 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\61c0bae5452a847a8eec8000fa86bbc92f38895c21cdff51293077db52049b47\image.webp "HTTP/1.1 200 OK" -2026-05-11 08:24:59,609 INFO backend.segmentation: [APPLY_TEXTURE] DONE 19.455s at 2026-05-11T14:24:59.609461+00:00 -2026-05-11 08:25:13,535 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T14:25:13.535983+00:00 -2026-05-11 08:25:15,895 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 08:25:18,148 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 08:25:18,574 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 08:25:20,421 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/372a9de1-06ff-452e-a7b3-83db429db718 "HTTP/1.1 200 OK" -2026-05-11 08:25:20,439 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 08:25:22,688 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 08:25:24,900 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=372a9de1-06ff-452e-a7b3-83db429db718 "HTTP/1.1 200 OK" -2026-05-11 08:25:32,277 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\9f26aae03ee10ee70ed27a8dc4c77d335fdbc500fe706220a08fe067ac89b5b6\image.webp "HTTP/1.1 200 OK" -2026-05-11 08:25:32,315 INFO backend.segmentation: [APPLY_TEXTURE] DONE 18.780s at 2026-05-11T14:25:32.315471+00:00 -2026-05-11 08:25:58,203 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T14:25:58.203693+00:00 -2026-05-11 08:26:00,549 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 08:26:02,797 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 08:26:03,350 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 08:26:05,122 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/32903b23-f36f-4d06-9872-5d0c4d5bfcc3 "HTTP/1.1 200 OK" -2026-05-11 08:26:05,125 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 08:26:07,340 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 08:26:09,559 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=32903b23-f36f-4d06-9872-5d0c4d5bfcc3 "HTTP/1.1 200 OK" -2026-05-11 08:26:17,125 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\bc2165e8db99168984496b0614c2e4d8acc3643d455b108fc45ea30816fdb1dc\image.webp "HTTP/1.1 200 OK" -2026-05-11 08:26:17,174 INFO backend.segmentation: [APPLY_TEXTURE] DONE 18.970s at 2026-05-11T14:26:17.174476+00:00 -2026-05-11 08:26:31,042 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T14:26:31.041862+00:00 -2026-05-11 08:26:33,420 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 08:26:35,669 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 08:26:36,113 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 08:26:37,943 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/35433313-44fe-474d-ac2c-baae2bd6b83c "HTTP/1.1 200 OK" -2026-05-11 08:26:37,944 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 08:26:40,182 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 08:26:42,407 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=35433313-44fe-474d-ac2c-baae2bd6b83c "HTTP/1.1 200 OK" -2026-05-11 08:26:50,028 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\13d6ad76d05f5ab9405eb3cc735976accdd554831cb3965e518f5807fd200d0f\image.webp "HTTP/1.1 200 OK" -2026-05-11 08:26:50,065 INFO backend.segmentation: [APPLY_TEXTURE] DONE 19.023s at 2026-05-11T14:26:50.065448+00:00 -2026-05-11 08:27:11,335 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T14:27:11.333972+00:00 -2026-05-11 08:27:13,771 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 08:27:16,029 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 08:27:16,580 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 08:27:18,321 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/4211851c-0dc2-4655-b683-f49ec03d8ac9 "HTTP/1.1 200 OK" -2026-05-11 08:27:18,323 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 08:27:20,591 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 08:27:22,812 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=4211851c-0dc2-4655-b683-f49ec03d8ac9 "HTTP/1.1 200 OK" -2026-05-11 08:27:30,852 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\d8411de62edcb305f56a0419285ff045890bac7da16c9e9ede06c82d82745b0a\image.webp "HTTP/1.1 200 OK" -2026-05-11 08:27:30,893 INFO backend.segmentation: [APPLY_TEXTURE] DONE 19.558s at 2026-05-11T14:27:30.893186+00:00 -2026-05-11 08:27:51,862 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T14:27:51.862857+00:00 -2026-05-11 08:27:54,224 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 08:27:56,451 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 08:27:56,857 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 08:27:58,745 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/527a694d-cb75-4325-87f2-650065362349 "HTTP/1.1 200 OK" -2026-05-11 08:27:58,765 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 08:28:00,999 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 08:28:03,231 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=527a694d-cb75-4325-87f2-650065362349 "HTTP/1.1 200 OK" -2026-05-11 08:28:10,922 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\dcff331be98568e3944f8891d2773167cc5ba35c0d80ebb3f7ccadd3ae7143b8\image.webp "HTTP/1.1 200 OK" -2026-05-11 08:28:10,979 INFO backend.segmentation: [APPLY_TEXTURE] DONE 19.116s at 2026-05-11T14:28:10.979094+00:00 -2026-05-11 08:28:36,570 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T14:28:36.570999+00:00 -2026-05-11 08:28:38,940 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 08:28:41,158 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 08:28:41,673 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 08:28:43,459 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 08:28:43,473 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/6665df09-7e20-4692-8e06-b25a226b02e9 "HTTP/1.1 200 OK" -2026-05-11 08:28:45,725 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 08:28:47,971 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=6665df09-7e20-4692-8e06-b25a226b02e9 "HTTP/1.1 200 OK" -2026-05-11 08:28:55,196 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\7e652a6d342a1acbbe68f5f4d23dd489bfe3a29e4600388234c84c71e17656f4\image.webp "HTTP/1.1 200 OK" -2026-05-11 08:28:55,230 INFO backend.segmentation: [APPLY_TEXTURE] DONE 18.660s at 2026-05-11T14:28:55.230723+00:00 -2026-05-11 08:29:09,384 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T14:29:09.384232+00:00 -2026-05-11 08:29:11,748 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 08:29:13,956 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 08:29:14,366 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 08:29:16,238 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/1905794c-e373-4ead-a0d2-fc465a2f1e19 "HTTP/1.1 200 OK" -2026-05-11 08:29:16,240 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 08:29:18,523 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 08:29:20,797 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=1905794c-e373-4ead-a0d2-fc465a2f1e19 "HTTP/1.1 200 OK" -2026-05-11 08:29:28,204 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\7e652a6d342a1acbbe68f5f4d23dd489bfe3a29e4600388234c84c71e17656f4\image.webp "HTTP/1.1 200 OK" -2026-05-11 08:29:28,241 INFO backend.segmentation: [APPLY_TEXTURE] DONE 18.857s at 2026-05-11T14:29:28.241322+00:00 -2026-05-11 08:30:13,740 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T14:30:13.740739+00:00 -2026-05-11 08:30:16,122 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 08:30:18,329 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 08:30:18,779 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 08:30:20,610 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/e5d6c046-75e4-4939-9e10-3726e7fd8618 "HTTP/1.1 200 OK" -2026-05-11 08:30:20,626 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 08:30:22,858 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 08:30:25,099 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=e5d6c046-75e4-4939-9e10-3726e7fd8618 "HTTP/1.1 200 OK" -2026-05-11 08:30:33,721 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\83154e5b8e9edada63e73252bbc18818c0fe81e59aa4d5d99ade57189f3f6ecb\image.webp "HTTP/1.1 200 OK" -2026-05-11 08:30:33,759 INFO backend.segmentation: [APPLY_TEXTURE] DONE 20.019s at 2026-05-11T14:30:33.759490+00:00 -2026-05-11 08:31:45,375 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T14:31:45.375338+00:00 -2026-05-11 08:31:47,767 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 08:31:49,996 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 08:31:50,484 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 08:31:52,277 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 08:31:52,291 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/e8b5cc64-7b14-408c-b7a4-9a0e737fafbb "HTTP/1.1 200 OK" -2026-05-11 08:31:54,499 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 08:31:56,704 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=e8b5cc64-7b14-408c-b7a4-9a0e737fafbb "HTTP/1.1 200 OK" -2026-05-11 08:32:04,546 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\7e652a6d342a1acbbe68f5f4d23dd489bfe3a29e4600388234c84c71e17656f4\image.webp "HTTP/1.1 200 OK" -2026-05-11 08:32:04,583 INFO backend.segmentation: [APPLY_TEXTURE] DONE 19.208s at 2026-05-11T14:32:04.583431+00:00 -2026-05-11 08:36:55,499 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T14:36:55.499185+00:00 -2026-05-11 08:36:57,817 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 08:37:00,047 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 08:37:00,610 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 08:37:02,336 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/1ee9b9f4-3788-440b-8a09-56d6d45b1ebb "HTTP/1.1 200 OK" -2026-05-11 08:37:02,370 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 08:37:04,704 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 08:37:06,917 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=1ee9b9f4-3788-440b-8a09-56d6d45b1ebb "HTTP/1.1 200 OK" -2026-05-11 08:37:14,472 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\7e652a6d342a1acbbe68f5f4d23dd489bfe3a29e4600388234c84c71e17656f4\image.webp "HTTP/1.1 200 OK" -2026-05-11 08:37:14,506 INFO backend.segmentation: [APPLY_TEXTURE] DONE 19.007s at 2026-05-11T14:37:14.506589+00:00 -2026-05-11 08:37:47,793 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T14:37:47.793918+00:00 -2026-05-11 08:37:50,139 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 08:37:52,351 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 08:37:52,777 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 08:37:54,618 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/1623e3e9-f0e5-421b-a669-9a00ed197b79 "HTTP/1.1 200 OK" -2026-05-11 08:37:54,636 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 08:37:56,882 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 08:37:59,130 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=1623e3e9-f0e5-421b-a669-9a00ed197b79 "HTTP/1.1 200 OK" -2026-05-11 08:38:06,584 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\dcff331be98568e3944f8891d2773167cc5ba35c0d80ebb3f7ccadd3ae7143b8\image.webp "HTTP/1.1 200 OK" -2026-05-11 08:38:06,614 INFO backend.segmentation: [APPLY_TEXTURE] DONE 18.821s at 2026-05-11T14:38:06.614925+00:00 -2026-05-11 08:38:31,451 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T14:38:31.451279+00:00 -2026-05-11 08:38:33,782 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 08:38:36,013 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 08:38:36,647 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 08:38:38,335 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/34d35216-1db5-4a22-9acb-3a67e6aa0d17 "HTTP/1.1 200 OK" -2026-05-11 08:38:38,337 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 08:38:40,583 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 08:38:42,800 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=34d35216-1db5-4a22-9acb-3a67e6aa0d17 "HTTP/1.1 200 OK" -2026-05-11 08:38:50,479 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\dcff331be98568e3944f8891d2773167cc5ba35c0d80ebb3f7ccadd3ae7143b8\image.webp "HTTP/1.1 200 OK" -2026-05-11 08:38:50,514 INFO backend.segmentation: [APPLY_TEXTURE] DONE 19.064s at 2026-05-11T14:38:50.514463+00:00 -2026-05-11 08:39:30,751 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T14:39:30.751474+00:00 -2026-05-11 08:39:33,103 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 08:39:35,346 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 08:39:35,794 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 08:39:37,684 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/6f204c23-4dad-44b5-89c8-e786b0b6a7ee "HTTP/1.1 200 OK" -2026-05-11 08:39:37,702 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 08:39:39,947 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 08:39:42,157 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=6f204c23-4dad-44b5-89c8-e786b0b6a7ee "HTTP/1.1 200 OK" -2026-05-11 08:39:50,741 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\dcff331be98568e3944f8891d2773167cc5ba35c0d80ebb3f7ccadd3ae7143b8\image.webp "HTTP/1.1 200 OK" -2026-05-11 08:39:50,777 INFO backend.segmentation: [APPLY_TEXTURE] DONE 20.026s at 2026-05-11T14:39:50.777556+00:00 -2026-05-11 08:40:14,350 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T14:40:14.350006+00:00 -2026-05-11 08:40:16,661 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 08:40:18,880 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 08:40:19,481 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 08:40:21,222 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 08:40:21,234 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/7246b853-d6c2-49c5-9647-4ed0ab6849cb "HTTP/1.1 200 OK" -2026-05-11 08:40:23,494 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 08:40:25,725 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=7246b853-d6c2-49c5-9647-4ed0ab6849cb "HTTP/1.1 200 OK" -2026-05-11 08:40:33,271 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\1dcd45ddeba2ebff9bd449c7a8338f6e454b7692f87377fe41d578071fb2bdaf\image.webp "HTTP/1.1 200 OK" -2026-05-11 08:40:33,329 INFO backend.segmentation: [APPLY_TEXTURE] DONE 18.980s at 2026-05-11T14:40:33.329328+00:00 -2026-05-11 08:40:43,390 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T14:40:43.390829+00:00 -2026-05-11 08:40:45,711 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 08:40:47,924 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 08:40:48,359 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 08:40:50,199 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/4271eef2-7dfd-4511-be21-26af887b01d4 "HTTP/1.1 200 OK" -2026-05-11 08:40:50,202 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 08:40:52,424 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 08:40:54,620 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=4271eef2-7dfd-4511-be21-26af887b01d4 "HTTP/1.1 200 OK" -2026-05-11 08:41:02,503 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\5cd5e002d8fff69167b7957e92368cb8e97468efaa3bdd4c6e860e7819dcaac9\image.webp "HTTP/1.1 200 OK" -2026-05-11 08:41:02,539 INFO backend.segmentation: [APPLY_TEXTURE] DONE 19.148s at 2026-05-11T14:41:02.539391+00:00 -2026-05-11 08:41:34,387 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T14:41:34.387746+00:00 -2026-05-11 08:41:37,636 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 08:41:39,853 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 08:41:40,352 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 08:41:42,141 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/c3a6cd96-4566-4c39-932b-14ac11dc7a35 "HTTP/1.1 200 OK" -2026-05-11 08:41:42,143 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 08:41:44,426 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 08:41:46,641 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=c3a6cd96-4566-4c39-932b-14ac11dc7a35 "HTTP/1.1 200 OK" -2026-05-11 08:41:54,021 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\2d2f2f38366272d46f09704fba6cb8174362aa3b5b6cbba1e41367673524af8f\image.webp "HTTP/1.1 200 OK" -2026-05-11 08:41:54,053 INFO backend.segmentation: [APPLY_TEXTURE] DONE 19.666s at 2026-05-11T14:41:54.053833+00:00 -2026-05-11 08:42:14,063 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T14:42:14.063192+00:00 -2026-05-11 08:42:17,270 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 08:42:19,473 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 08:42:19,909 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 08:42:21,750 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/fc9e49b4-003c-41a0-ae9c-b1ee6ea478d8 "HTTP/1.1 200 OK" -2026-05-11 08:42:21,769 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 08:42:24,018 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 08:42:26,271 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=fc9e49b4-003c-41a0-ae9c-b1ee6ea478d8 "HTTP/1.1 200 OK" -2026-05-11 08:42:33,865 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\79ee19af39aca7f0770059713359c1222bef67ba2dfa40219dc5ed09bc6a1bbf\image.webp "HTTP/1.1 200 OK" -2026-05-11 08:42:33,899 INFO backend.segmentation: [APPLY_TEXTURE] DONE 19.835s at 2026-05-11T14:42:33.899026+00:00 -2026-05-11 08:42:55,777 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T14:42:55.777571+00:00 -2026-05-11 08:42:59,934 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 08:43:02,165 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 08:43:02,667 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 08:43:04,456 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/c5d546a8-fd90-4335-bcc4-721cd1ade7d7 "HTTP/1.1 200 OK" -2026-05-11 08:43:04,457 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 08:43:06,765 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 08:43:08,990 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=c5d546a8-fd90-4335-bcc4-721cd1ade7d7 "HTTP/1.1 200 OK" -2026-05-11 08:43:17,157 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\2f4d6d785e964920a977ba3b7450fd8272b489b92b55b4c53bfa0530117ba48d\image.webp "HTTP/1.1 200 OK" -2026-05-11 08:43:17,194 INFO backend.segmentation: [APPLY_TEXTURE] DONE 21.417s at 2026-05-11T14:43:17.194197+00:00 -2026-05-11 08:43:32,204 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T14:43:32.204958+00:00 -2026-05-11 08:43:36,317 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 08:43:38,560 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 08:43:38,993 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 08:43:40,830 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 08:43:40,874 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/9c477ff2-4fe2-49b0-a082-680fb13eaa2f "HTTP/1.1 200 OK" -2026-05-11 08:43:43,189 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 08:43:45,428 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=9c477ff2-4fe2-49b0-a082-680fb13eaa2f "HTTP/1.1 200 OK" -2026-05-11 08:43:53,271 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\2f4d6d785e964920a977ba3b7450fd8272b489b92b55b4c53bfa0530117ba48d\image.webp "HTTP/1.1 200 OK" -2026-05-11 08:43:53,308 INFO backend.segmentation: [APPLY_TEXTURE] DONE 21.104s at 2026-05-11T14:43:53.308454+00:00 -2026-05-11 08:44:02,706 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T14:44:02.706352+00:00 -2026-05-11 08:44:06,505 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 08:44:08,730 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 08:44:09,239 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 08:44:10,993 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/80f646be-2f3c-49fc-8960-5d4ccdc14d16 "HTTP/1.1 200 OK" -2026-05-11 08:44:10,995 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 08:44:13,322 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 08:44:15,541 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=80f646be-2f3c-49fc-8960-5d4ccdc14d16 "HTTP/1.1 200 OK" -2026-05-11 08:44:23,169 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\8898e235f41c3cd8f4a1c7945b36700a650cd05fd3638c36fc6f121eb57ef1c1\image.webp "HTTP/1.1 200 OK" -2026-05-11 08:44:23,199 INFO backend.segmentation: [APPLY_TEXTURE] DONE 20.493s at 2026-05-11T14:44:23.199524+00:00 -2026-05-11 08:44:33,949 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T14:44:33.949552+00:00 -2026-05-11 08:44:37,648 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 08:44:39,892 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 08:44:40,338 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 08:44:42,176 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 08:44:42,189 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/1f820435-9611-4a1c-9379-5285d215750e "HTTP/1.1 200 OK" -2026-05-11 08:44:44,484 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 08:44:46,717 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=1f820435-9611-4a1c-9379-5285d215750e "HTTP/1.1 200 OK" -2026-05-11 08:44:54,137 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\1a4569321d5e6d439a93f05d4ca2972301cb8078dd1216659fa38c87da091446\image.webp "HTTP/1.1 200 OK" -2026-05-11 08:44:54,167 INFO backend.segmentation: [APPLY_TEXTURE] DONE 20.217s at 2026-05-11T14:44:54.167079+00:00 -2026-05-11 08:45:22,200 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T14:45:22.200930+00:00 -2026-05-11 08:45:24,547 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 08:45:26,775 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 08:45:28,298 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 08:45:29,087 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 08:45:29,100 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/149a4d14-b4ab-4b7b-aa79-bbba3d15aaf9 "HTTP/1.1 200 OK" -2026-05-11 08:45:31,372 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 08:45:33,608 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=149a4d14-b4ab-4b7b-aa79-bbba3d15aaf9 "HTTP/1.1 200 OK" -2026-05-11 08:45:41,573 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\081aa45b7d139bf0925e3aef23b1bdb109de5d3ca4c1b7f0dfd21959b6002d38\image.webp "HTTP/1.1 200 OK" -2026-05-11 08:45:41,621 INFO backend.segmentation: [APPLY_TEXTURE] DONE 19.421s at 2026-05-11T14:45:41.621940+00:00 -2026-05-11 08:46:03,424 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T14:46:03.424997+00:00 -2026-05-11 08:46:05,770 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 08:46:08,045 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 08:46:08,450 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 08:46:10,422 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/b4d726ca-cfbc-4833-aba1-0e79f08db999 "HTTP/1.1 200 OK" -2026-05-11 08:46:10,424 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 08:46:12,685 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 08:46:14,942 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=b4d726ca-cfbc-4833-aba1-0e79f08db999 "HTTP/1.1 200 OK" -2026-05-11 08:46:22,847 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\081aa45b7d139bf0925e3aef23b1bdb109de5d3ca4c1b7f0dfd21959b6002d38\image.webp "HTTP/1.1 200 OK" -2026-05-11 08:46:22,882 INFO backend.segmentation: [APPLY_TEXTURE] DONE 19.458s at 2026-05-11T14:46:22.882967+00:00 -2026-05-11 08:50:47,465 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T14:50:47.465466+00:00 -2026-05-11 08:50:49,827 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 08:50:52,047 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 08:50:52,561 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 08:50:54,370 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 08:50:54,384 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/a239d19f-01e6-47df-b239-4d967ade84f2 "HTTP/1.1 200 OK" -2026-05-11 08:50:56,627 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 08:50:58,849 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=a239d19f-01e6-47df-b239-4d967ade84f2 "HTTP/1.1 200 OK" -2026-05-11 08:51:06,774 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\5486932d4813c760e4bd4a21404adf59b93a077c9f5009a3111680cb12dfb668\image.webp "HTTP/1.1 200 OK" -2026-05-11 08:51:06,805 INFO backend.segmentation: [APPLY_TEXTURE] DONE 19.340s at 2026-05-11T14:51:06.805516+00:00 -2026-05-11 08:51:18,641 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T14:51:18.641886+00:00 -2026-05-11 08:51:21,018 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 08:51:23,241 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 08:51:23,656 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 08:51:25,496 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 08:51:25,509 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/f5edb8a3-3489-43ed-83e7-d57a70c15206 "HTTP/1.1 200 OK" -2026-05-11 08:51:27,726 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 08:51:29,974 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=f5edb8a3-3489-43ed-83e7-d57a70c15206 "HTTP/1.1 200 OK" -2026-05-11 08:51:37,230 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\43d6c985beaa52aa9f547d5cad18c47ac5ad1aad074537262134fb3ee33f6f30\image.webp "HTTP/1.1 200 OK" -2026-05-11 08:51:37,265 INFO backend.segmentation: [APPLY_TEXTURE] DONE 18.624s at 2026-05-11T14:51:37.265824+00:00 -2026-05-11 08:51:49,441 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T14:51:49.441371+00:00 -2026-05-11 08:51:51,748 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 08:51:53,992 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 08:51:54,494 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 08:51:56,313 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/7bb87fda-5972-465a-9c5b-ff8cbe9f8658 "HTTP/1.1 200 OK" -2026-05-11 08:51:56,316 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 08:51:58,542 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 08:52:00,803 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=7bb87fda-5972-465a-9c5b-ff8cbe9f8658 "HTTP/1.1 200 OK" -2026-05-11 08:52:09,282 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\16c245147932b16e84272f485aa1e64a205303e1669fe3192f4040c5211bfe65\image.webp "HTTP/1.1 200 OK" -2026-05-11 08:52:09,330 INFO backend.segmentation: [APPLY_TEXTURE] DONE 19.889s at 2026-05-11T14:52:09.330236+00:00 -2026-05-11 08:53:23,170 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a01ed63ac1ef105a6100284"}, "remainingTimeMS": 30} -2026-05-11 08:59:34,053 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=https://eduardo4547-hyper-reality-sam2-gpu.hf.space -2026-05-11 08:59:34,078 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 08:59:56,934 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a01eeec350249fbce1c5550"}, "remainingTimeMS": 30} -2026-05-11 09:00:03,790 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-11T15:00:03.790265+00:00 -2026-05-11 09:00:03,790 INFO backend.segmentation: [JOB 3f36b79482d04fdba69fa180e8d82b55] preparing_image progress=12 -2026-05-11 09:00:03,941 INFO backend.segmentation: [JOB 3f36b79482d04fdba69fa180e8d82b55] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 -2026-05-11 09:00:03,941 INFO services.gradio_client_service: Calling GPU Gradio Space: https://eduardo4547-hyper-reality-sam2-gpu.hf.space -2026-05-11 09:00:06,608 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" -2026-05-11 09:00:07,171 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 09:00:07,919 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/ac77bcfc-7232-4a63-8604-25d45c813fcc "HTTP/1.1 200 OK" -2026-05-11 09:00:08,152 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 09:00:08,179 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 09:00:08,707 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 09:00:09,377 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/data?session_hash=ac77bcfc-7232-4a63-8604-25d45c813fcc "HTTP/1.1 200 OK" -2026-05-11 09:00:28,367 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/file=/tmp/gradio/b1c58c6503edaf5fcdc01526aef97fe3d82c533e6dd5a577bdcf26f56d685366/image.webp "HTTP/1.1 200 OK" -2026-05-11 09:00:28,505 INFO services.gradio_client_service: Gradio Space segmentation: entorno=gpu motor=SAM Auto (GPU - ZeroGPU) mask_count=61 -2026-05-11 09:00:28,507 INFO backend.segmentation: [JOB 3f36b79482d04fdba69fa180e8d82b55] saving_masks progress=92 -2026-05-11 09:00:28,643 INFO backend.segmentation: [JOB 3f36b79482d04fdba69fa180e8d82b55] segments_meta saved (61 segments) -2026-05-11 09:00:28,643 INFO backend.segmentation: [JOB 3f36b79482d04fdba69fa180e8d82b55] done mask_count=61 -2026-05-11 09:00:28,643 INFO backend.segmentation: [UPLOAD_BG] DONE 24.854s at 2026-05-11T15:00:28.643926+00:00 -2026-05-11 09:00:28,643 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-11 09:00:30,184 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a01ef0e350249fbce1c5551"}, "remainingTimeMS": 30} -2026-05-11 09:00:38,461 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T15:00:38.461550+00:00 -2026-05-11 09:00:41,507 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" -2026-05-11 09:00:42,158 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 09:00:42,658 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 09:00:42,805 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/f0a07ce3-8ce5-479c-8a9b-581234198f5c "HTTP/1.1 200 OK" -2026-05-11 09:00:42,967 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 09:01:03,284 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 09:01:03,918 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/data?session_hash=f0a07ce3-8ce5-479c-8a9b-581234198f5c "HTTP/1.1 200 OK" -2026-05-11 09:01:04,561 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/file=/tmp/gradio/23314345710bf7dd21e8b07d1fa654a32440adfbed83aaf2feef6dab22f1a1ca/image.webp "HTTP/1.1 200 OK" -2026-05-11 09:01:04,701 WARNING services.gradio_client_service: GPU Space render failed (Gradio Space render error: import_failed), trying CPU fallback... -2026-05-11 09:01:05,471 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/config "HTTP/1.1 200 OK" -2026-05-11 09:01:06,197 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 09:01:06,263 WARNING backend.segmentation: Remote render via Gradio failed, falling back to local: Both Gradio Spaces render failed. - GPU (https://eduardo4547-hyper-reality-sam2-gpu.hf.space): Gradio Space render error: import_failed - CPU (https://eduardo4547-hyper-reality-sam2-cpu.hf.space): Cannot find a function with `api_name`: /render. -2026-05-11 09:01:06,697 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 09:01:06,790 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\hyper-reality-1778254222964.jpg -2026-05-11 09:01:06,889 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/heartbeat/7549c987-8bbe-4e41-8da5-e08804270246 "HTTP/1.1 200 OK" -2026-05-11 09:01:07,106 INFO backend.segmentation: [APPLY_TEXTURE] DONE 28.645s at 2026-05-11T15:01:07.106365+00:00 -2026-05-11 09:02:27,357 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 09:02:27,381 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 09:02:55,966 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T15:02:55.966358+00:00 -2026-05-11 09:02:58,857 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 09:03:01,243 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 09:03:02,224 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 09:03:03,744 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/65b7a704-e4c5-4883-a51e-20f4487db3f8 "HTTP/1.1 200 OK" -2026-05-11 09:03:03,778 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 09:03:06,155 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 09:03:08,583 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=65b7a704-e4c5-4883-a51e-20f4487db3f8 "HTTP/1.1 200 OK" -2026-05-11 09:03:18,771 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\dee0b06b7f3205e519abee75a0fd781fbc1d05fe893f21dc1d9562e0934ee509\image.webp "HTTP/1.1 200 OK" -2026-05-11 09:03:18,848 INFO backend.segmentation: [APPLY_TEXTURE] DONE 22.883s at 2026-05-11T15:03:18.848958+00:00 -2026-05-11 09:04:16,293 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T15:04:16.293028+00:00 -2026-05-11 09:04:18,844 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 09:04:21,221 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 09:04:21,710 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 09:04:23,638 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 09:04:23,649 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/76dab94b-b9d8-44a8-b036-03e15f1fe2bd "HTTP/1.1 200 OK" -2026-05-11 09:04:25,990 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 09:04:28,339 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=76dab94b-b9d8-44a8-b036-03e15f1fe2bd "HTTP/1.1 200 OK" -2026-05-11 09:04:43,718 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\29aec395f88d98858911bde6acc6466dbf45da9fc592b83acb5a57d64ec466c4\image.webp "HTTP/1.1 200 OK" -2026-05-11 09:04:43,757 INFO backend.segmentation: [APPLY_TEXTURE] DONE 27.465s at 2026-05-11T15:04:43.757815+00:00 -2026-05-11 09:05:26,410 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T15:05:26.410908+00:00 -2026-05-11 09:05:28,958 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 09:05:31,343 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 09:05:31,834 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 09:05:33,794 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 09:05:33,805 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/5d38c3f7-4809-4b8a-b019-e5e4282ccf57 "HTTP/1.1 200 OK" -2026-05-11 09:05:36,147 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 09:05:38,539 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=5d38c3f7-4809-4b8a-b019-e5e4282ccf57 "HTTP/1.1 200 OK" -2026-05-11 09:05:47,129 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\1eb839c12f77649f31745595b80bfae381ebbfe625276d80619558c27fc4100c\image.webp "HTTP/1.1 200 OK" -2026-05-11 09:05:47,169 INFO backend.segmentation: [APPLY_TEXTURE] DONE 20.759s at 2026-05-11T15:05:47.169527+00:00 -2026-05-11 09:07:00,832 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T15:07:00.832585+00:00 -2026-05-11 09:07:03,220 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 09:07:05,487 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 09:07:05,958 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 09:07:07,823 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/d9226b2c-d5c9-4753-831e-11b179671135 "HTTP/1.1 200 OK" -2026-05-11 09:07:07,825 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 09:07:10,066 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 09:07:12,331 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=d9226b2c-d5c9-4753-831e-11b179671135 "HTTP/1.1 200 OK" -2026-05-11 09:07:21,277 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\0c7b3464bcf12e33aeec3d97d77559a8c2e926abb18ebf01ce372c31ed7c3bd1\image.webp "HTTP/1.1 200 OK" -2026-05-11 09:07:21,316 INFO backend.segmentation: [APPLY_TEXTURE] DONE 20.485s at 2026-05-11T15:07:21.316788+00:00 -2026-05-11 09:07:39,324 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a01f0bbb29f424d7c4dde31"}, "remainingTimeMS": 30} -2026-05-11 09:07:56,182 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-11T15:07:56.182552+00:00 -2026-05-11 09:07:56,182 INFO backend.segmentation: [JOB b454dca58f474e8aaed0a05b80f7f04c] preparing_image progress=12 -2026-05-11 09:07:56,226 INFO backend.segmentation: [JOB b454dca58f474e8aaed0a05b80f7f04c] segmenting_with_sam2 progress=30 estimated_seconds=94.01599999999999 -2026-05-11 09:07:56,227 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 -2026-05-11 09:07:58,573 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 09:08:00,842 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 09:08:01,274 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 09:08:03,206 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/7763e966-1bc8-4a49-87f8-9d780f488054 "HTTP/1.1 200 OK" -2026-05-11 09:08:03,210 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 09:08:05,435 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 09:08:07,659 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=7763e966-1bc8-4a49-87f8-9d780f488054 "HTTP/1.1 200 OK" -2026-05-11 09:10:17,025 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\56758f540e1c547de434b369fae158810fde033fe3650199c54eecf9fd68ac46\image.webp "HTTP/1.1 200 OK" -2026-05-11 09:10:17,041 INFO services.gradio_client_service: Gradio Space segmentation: entorno=gpu motor=SAM Auto (GPU - ZeroGPU) mask_count=58 -2026-05-11 09:10:17,043 INFO backend.segmentation: [JOB b454dca58f474e8aaed0a05b80f7f04c] saving_masks progress=92 -2026-05-11 09:10:17,288 INFO backend.segmentation: [JOB b454dca58f474e8aaed0a05b80f7f04c] segments_meta saved (58 segments) -2026-05-11 09:10:17,288 INFO backend.segmentation: [JOB b454dca58f474e8aaed0a05b80f7f04c] done mask_count=58 -2026-05-11 09:10:17,288 INFO backend.segmentation: [UPLOAD_BG] DONE 141.106s at 2026-05-11T15:10:17.288427+00:00 -2026-05-11 09:10:17,288 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-11 09:10:20,270 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a01f15cb29f424d7c4dde32"}, "remainingTimeMS": 30} -2026-05-11 09:10:34,161 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T15:10:34.161901+00:00 -2026-05-11 09:10:38,153 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 09:10:40,400 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 09:10:40,914 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 09:10:42,826 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/5de7167f-1177-4093-ab8e-02c57efd6725 "HTTP/1.1 200 OK" -2026-05-11 09:10:42,829 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 09:10:45,122 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 09:10:47,370 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=5de7167f-1177-4093-ab8e-02c57efd6725 "HTTP/1.1 200 OK" -2026-05-11 09:10:55,340 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\08d0c8382b41a8cb1afd5ca2933402871534ace900c8c25dbc04dfb0c7fac838\image.webp "HTTP/1.1 200 OK" -2026-05-11 09:10:55,382 INFO backend.segmentation: [APPLY_TEXTURE] DONE 21.221s at 2026-05-11T15:10:55.382977+00:00 -2026-05-11 09:11:14,068 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T15:11:14.068589+00:00 -2026-05-11 09:11:18,054 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 09:11:20,338 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 09:11:20,755 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 09:11:22,681 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/aa5ffe1e-cf6f-4a59-8b5d-9f8f844ccf35 "HTTP/1.1 200 OK" -2026-05-11 09:11:22,685 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 09:11:25,069 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 09:11:27,403 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=aa5ffe1e-cf6f-4a59-8b5d-9f8f844ccf35 "HTTP/1.1 200 OK" -2026-05-11 09:11:37,029 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\0d515bdb32e656b506e326f168d5fb2ca05cba9bc53cb511e42dd260d62301f7\image.webp "HTTP/1.1 200 OK" -2026-05-11 09:11:37,090 INFO backend.segmentation: [APPLY_TEXTURE] DONE 23.022s at 2026-05-11T15:11:37.090970+00:00 -2026-05-11 09:11:49,760 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T15:11:49.760016+00:00 -2026-05-11 09:11:53,744 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 09:11:56,074 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 09:11:56,569 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 09:11:58,419 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/859f6de7-07f6-480e-9492-6d73356bbf4c "HTTP/1.1 200 OK" -2026-05-11 09:11:58,437 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 09:12:00,755 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 09:12:03,037 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=859f6de7-07f6-480e-9492-6d73356bbf4c "HTTP/1.1 200 OK" -2026-05-11 09:12:11,490 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\b849e3480a5febb83d4fb8ebb52ed500f40df99c6d5f8a20108eed00ab315153\image.webp "HTTP/1.1 200 OK" -2026-05-11 09:12:11,536 INFO backend.segmentation: [APPLY_TEXTURE] DONE 21.777s at 2026-05-11T15:12:11.536831+00:00 -2026-05-11 09:12:37,043 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T15:12:37.042144+00:00 -2026-05-11 09:12:41,791 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 09:12:44,105 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 09:12:44,550 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 09:12:46,524 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/3deaf637-5ada-4a54-b02b-6b588dec87a5 "HTTP/1.1 200 OK" -2026-05-11 09:12:46,572 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 09:12:48,966 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 09:12:51,228 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=3deaf637-5ada-4a54-b02b-6b588dec87a5 "HTTP/1.1 200 OK" -2026-05-11 09:13:00,100 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\25d12f1c2a9c336c1b887ee7e0398b601b42b7565509d9dfaf16f582b2ca907a\image.webp "HTTP/1.1 200 OK" -2026-05-11 09:13:00,146 INFO backend.segmentation: [APPLY_TEXTURE] DONE 23.104s at 2026-05-11T15:13:00.146803+00:00 -2026-05-11 09:13:10,087 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T15:13:10.087403+00:00 -2026-05-11 09:13:14,037 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 09:13:16,298 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 09:13:16,857 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 09:13:18,704 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/f345958a-a52f-4849-b880-ca96676d7386 "HTTP/1.1 200 OK" -2026-05-11 09:13:18,707 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 09:13:21,027 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 09:13:23,316 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=f345958a-a52f-4849-b880-ca96676d7386 "HTTP/1.1 200 OK" -2026-05-11 09:13:33,722 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\08d0c8382b41a8cb1afd5ca2933402871534ace900c8c25dbc04dfb0c7fac838\image.webp "HTTP/1.1 200 OK" -2026-05-11 09:13:33,775 INFO backend.segmentation: [APPLY_TEXTURE] DONE 23.688s at 2026-05-11T15:13:33.775460+00:00 -2026-05-11 09:14:26,391 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T15:14:26.391654+00:00 -2026-05-11 09:14:30,328 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 09:14:32,580 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 09:14:33,093 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 09:14:34,893 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/71de3a6c-9c39-4178-83cd-abe0743e32ba "HTTP/1.1 200 OK" -2026-05-11 09:14:34,911 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 09:14:37,273 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 09:14:39,540 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=71de3a6c-9c39-4178-83cd-abe0743e32ba "HTTP/1.1 200 OK" -2026-05-11 09:14:47,492 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\29b96e9889e909ab544c7e84938cfd34a01f8b5169111b550e573aa6b0b57b67\image.webp "HTTP/1.1 200 OK" -2026-05-11 09:14:47,538 INFO backend.segmentation: [APPLY_TEXTURE] DONE 21.146s at 2026-05-11T15:14:47.538602+00:00 -2026-05-11 09:15:04,802 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T15:15:04.802101+00:00 -2026-05-11 09:15:09,381 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 09:15:11,700 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 09:15:12,871 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 09:15:14,058 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 09:15:14,069 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/94003c7a-84a3-4b8f-a66a-5460381f8d8b "HTTP/1.1 200 OK" -2026-05-11 09:15:16,401 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 09:15:18,674 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=94003c7a-84a3-4b8f-a66a-5460381f8d8b "HTTP/1.1 200 OK" -2026-05-11 09:15:30,091 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\ccbd80baf8b8064609e97da4a8f97ee6947813f3ee88f8e9057e58426278046d\image.webp "HTTP/1.1 200 OK" -2026-05-11 09:15:30,167 INFO backend.segmentation: [APPLY_TEXTURE] DONE 25.366s at 2026-05-11T15:15:30.167665+00:00 -2026-05-11 09:15:54,665 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-11T15:15:54.665708+00:00 -2026-05-11 09:15:54,666 INFO backend.segmentation: [JOB 14bc0a9c8c784733b22bee657e4a131f] preparing_image progress=12 -2026-05-11 09:15:55,008 INFO backend.segmentation: [JOB 14bc0a9c8c784733b22bee657e4a131f] segmenting_with_sam2 progress=30 estimated_seconds=105.8432 -2026-05-11 09:15:55,008 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 -2026-05-11 09:15:57,374 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 09:15:59,723 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 09:16:00,285 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 09:16:02,177 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/9897633b-f106-45fb-b9a4-78e34f8ccf0f "HTTP/1.1 200 OK" -2026-05-11 09:16:02,181 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 09:16:04,558 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 09:16:07,298 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=9897633b-f106-45fb-b9a4-78e34f8ccf0f "HTTP/1.1 200 OK" -2026-05-11 09:18:04,401 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\fe7e296f49e3953b396fc8aeb7f4885b83ba4201a8d3f8d451ff0339d7391c52\image.webp "HTTP/1.1 200 OK" -2026-05-11 09:18:04,415 INFO services.gradio_client_service: Gradio Space segmentation: entorno=gpu motor=SAM Auto (GPU - ZeroGPU) mask_count=74 -2026-05-11 09:18:04,415 INFO backend.segmentation: [JOB 14bc0a9c8c784733b22bee657e4a131f] saving_masks progress=92 -2026-05-11 09:18:04,694 INFO backend.segmentation: [JOB 14bc0a9c8c784733b22bee657e4a131f] segments_meta saved (74 segments) -2026-05-11 09:18:04,694 INFO backend.segmentation: [JOB 14bc0a9c8c784733b22bee657e4a131f] done mask_count=74 -2026-05-11 09:18:04,694 INFO backend.segmentation: [UPLOAD_BG] DONE 130.029s at 2026-05-11T15:18:04.694806+00:00 -2026-05-11 09:18:04,694 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-11 09:18:14,220 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T15:18:14.220091+00:00 -2026-05-11 09:18:18,813 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 09:18:21,048 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 09:18:21,523 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 09:18:23,424 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/772ed342-ed42-4191-8bab-4d187a9eedab "HTTP/1.1 200 OK" -2026-05-11 09:18:23,426 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 09:18:25,820 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 09:18:28,063 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=772ed342-ed42-4191-8bab-4d187a9eedab "HTTP/1.1 200 OK" -2026-05-11 09:18:36,513 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\0bf73bbc2dfb1dfdbce2bd6f148711a867920edab77a04c28005b7b51bec563e\image.webp "HTTP/1.1 200 OK" -2026-05-11 09:18:36,580 INFO backend.segmentation: [APPLY_TEXTURE] DONE 22.361s at 2026-05-11T15:18:36.580363+00:00 -2026-05-11 09:18:51,861 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T15:18:51.861615+00:00 -2026-05-11 09:18:56,659 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 09:18:58,950 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 09:18:59,388 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 09:19:01,288 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 09:19:01,301 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/02aba9f9-2d22-411e-ada8-d1649e5bf879 "HTTP/1.1 200 OK" -2026-05-11 09:19:03,716 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 09:19:05,979 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=02aba9f9-2d22-411e-ada8-d1649e5bf879 "HTTP/1.1 200 OK" -2026-05-11 09:19:15,134 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\6b114b0f1869c839104ad71d04efe8b1c42c2ada6548a24dd01c0f1195554552\image.webp "HTTP/1.1 200 OK" -2026-05-11 09:19:15,204 INFO backend.segmentation: [APPLY_TEXTURE] DONE 23.342s at 2026-05-11T15:19:15.204045+00:00 -2026-05-11 09:19:25,506 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-11T15:19:25.506664+00:00 -2026-05-11 09:19:25,506 INFO backend.segmentation: [JOB 306b039e65b146b69dd8b75ba05c88b9] preparing_image progress=12 -2026-05-11 09:19:25,535 INFO backend.segmentation: [JOB 306b039e65b146b69dd8b75ba05c88b9] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 -2026-05-11 09:19:25,536 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 -2026-05-11 09:19:27,881 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 09:19:30,133 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 09:19:30,690 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 09:19:32,418 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/8b3cfccf-fbce-49ba-9886-7e60d3a4f9e5 "HTTP/1.1 200 OK" -2026-05-11 09:19:32,420 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 09:19:34,631 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 09:19:36,913 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=8b3cfccf-fbce-49ba-9886-7e60d3a4f9e5 "HTTP/1.1 200 OK" -2026-05-11 09:21:11,357 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\fdba6c817445c957bf57f0f37d255298685625d2847381414fb08306405b69d3\image.webp "HTTP/1.1 200 OK" -2026-05-11 09:21:11,374 INFO services.gradio_client_service: Gradio Space segmentation: entorno=gpu motor=SAM Auto (GPU - ZeroGPU) mask_count=61 -2026-05-11 09:21:11,374 INFO backend.segmentation: [JOB 306b039e65b146b69dd8b75ba05c88b9] saving_masks progress=92 -2026-05-11 09:21:11,543 INFO backend.segmentation: [JOB 306b039e65b146b69dd8b75ba05c88b9] segments_meta saved (61 segments) -2026-05-11 09:21:11,545 INFO backend.segmentation: [JOB 306b039e65b146b69dd8b75ba05c88b9] done mask_count=61 -2026-05-11 09:21:11,545 INFO backend.segmentation: [UPLOAD_BG] DONE 106.039s at 2026-05-11T15:21:11.545131+00:00 -2026-05-11 09:21:11,545 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-11 09:21:23,322 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T15:21:23.322567+00:00 -2026-05-11 09:21:29,196 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 09:21:31,524 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 09:21:32,195 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 09:21:33,987 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 09:21:34,012 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/39c2dd92-8c58-4707-8071-1e597e73530f "HTTP/1.1 200 OK" -2026-05-11 09:21:36,542 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 09:21:38,902 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=39c2dd92-8c58-4707-8071-1e597e73530f "HTTP/1.1 200 OK" -2026-05-11 09:21:55,622 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\0e52d54170d30b6d09308ddfb46b306d2afc5dfc6e4026ae5f907d07f6ed6436\image.webp "HTTP/1.1 200 OK" -2026-05-11 09:21:55,666 INFO backend.segmentation: [APPLY_TEXTURE] DONE 32.343s at 2026-05-11T15:21:55.666246+00:00 -2026-05-11 09:22:14,587 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T15:22:14.587711+00:00 -2026-05-11 09:22:19,127 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 09:22:21,368 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 09:22:21,771 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 09:22:23,686 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/40e6db7c-cb8a-4621-8be5-28c640b19c75 "HTTP/1.1 200 OK" -2026-05-11 09:22:23,705 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 09:22:26,139 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 09:22:28,393 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=40e6db7c-cb8a-4621-8be5-28c640b19c75 "HTTP/1.1 200 OK" -2026-05-11 09:22:37,108 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\61825b19b734baf326a7a6a6d9a5f9ff601d6f3413738e4bb22c0a882ef83af7\image.webp "HTTP/1.1 200 OK" -2026-05-11 09:22:37,145 INFO backend.segmentation: [APPLY_TEXTURE] DONE 22.557s at 2026-05-11T15:22:37.145209+00:00 -2026-05-11 09:22:45,279 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T15:22:45.279333+00:00 -2026-05-11 09:22:49,178 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 09:22:51,446 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 09:22:51,982 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 09:22:53,829 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/d7b9735a-6e78-4fe3-8a42-109575b316a7 "HTTP/1.1 200 OK" -2026-05-11 09:22:53,830 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 09:22:56,146 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 09:22:58,396 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=d7b9735a-6e78-4fe3-8a42-109575b316a7 "HTTP/1.1 200 OK" -2026-05-11 09:23:06,755 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\9d8eab6a52e56697cb95b20e61dcc73246f45f3e0c14549e980ea1d8ab5411db\image.webp "HTTP/1.1 200 OK" -2026-05-11 09:23:06,791 INFO backend.segmentation: [APPLY_TEXTURE] DONE 21.513s at 2026-05-11T15:23:06.791913+00:00 -2026-05-11 09:23:26,777 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-11T15:23:26.777258+00:00 -2026-05-11 09:23:29,185 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 09:23:31,437 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 09:23:31,854 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 09:23:33,733 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/28c290d8-f558-42f2-9807-2eb9a8ee03aa "HTTP/1.1 200 OK" -2026-05-11 09:23:33,753 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 09:23:36,010 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 09:23:38,255 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=28c290d8-f558-42f2-9807-2eb9a8ee03aa "HTTP/1.1 200 OK" -2026-05-11 09:23:46,257 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\dee0b06b7f3205e519abee75a0fd781fbc1d05fe893f21dc1d9562e0934ee509\image.webp "HTTP/1.1 200 OK" -2026-05-11 09:23:46,296 INFO backend.segmentation: [APPLY_TEXTURE] DONE 19.519s at 2026-05-11T15:23:46.296656+00:00 -2026-05-11 15:49:44,491 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 15:49:44,515 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 16:05:50,322 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 16:05:50,344 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 16:05:51,265 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 16:05:51,287 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 16:06:23,124 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a0252df14d88316415be4cb"}, "remainingTimeMS": 30} -2026-05-11 16:06:28,118 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-11T22:06:28.118464+00:00 -2026-05-11 16:06:28,119 INFO backend.segmentation: [JOB 4209423fe883434baa0fc2b4775b34d6] preparing_image progress=12 -2026-05-11 16:06:28,171 INFO backend.segmentation: [JOB 4209423fe883434baa0fc2b4775b34d6] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 -2026-05-11 16:06:28,171 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 -2026-05-11 16:06:30,746 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 16:06:32,996 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 16:06:33,002 WARNING services.gradio_client_service: GPU Space failed (Cannot find a function with `api_name`: /segment.), trying CPU fallback... -2026-05-11 16:06:33,003 INFO services.gradio_client_service: Calling CPU fallback Space: https://eduardo4547-hyper-reality-sam2-cpu.hf.space -2026-05-11 16:06:33,744 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/config "HTTP/1.1 200 OK" -2026-05-11 16:06:33,787 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 16:06:34,375 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 16:06:34,641 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 16:06:35,061 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/heartbeat/4139b1e8-0885-4eda-aa82-fd71c176ecae "HTTP/1.1 200 OK" -2026-05-11 16:06:35,253 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 16:06:35,340 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/cedee08b-ac8c-488b-8942-f0fa0569e68f "HTTP/1.1 200 OK" -2026-05-11 16:06:35,781 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 16:06:36,314 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/queue/data?session_hash=4139b1e8-0885-4eda-aa82-fd71c176ecae "HTTP/1.1 200 OK" -2026-05-11 16:09:43,045 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/file=/tmp/gradio/6c61c4453525a0cc97a55213f8ab16e24157b02ad4d2cba459d14b95c79ac6ab/image.webp "HTTP/1.1 200 OK" -2026-05-11 16:09:43,192 INFO services.gradio_client_service: Gradio Space segmentation: entorno=cpu motor=SAM Auto (CPU) mask_count=61 -2026-05-11 16:09:43,192 INFO backend.segmentation: [JOB 4209423fe883434baa0fc2b4775b34d6] saving_masks progress=92 -2026-05-11 16:09:43,346 INFO backend.segmentation: [JOB 4209423fe883434baa0fc2b4775b34d6] segments_meta saved (61 segments) -2026-05-11 16:09:43,346 INFO backend.segmentation: [JOB 4209423fe883434baa0fc2b4775b34d6] done mask_count=61 -2026-05-11 16:09:43,347 INFO backend.segmentation: [UPLOAD_BG] DONE 195.229s at 2026-05-11T22:09:43.347393+00:00 -2026-05-11 16:09:43,347 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-11 16:10:57,618 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 16:10:57,643 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 16:11:03,882 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-11T22:11:03.882445+00:00 -2026-05-11 16:11:03,882 INFO backend.segmentation: [JOB 180176892d89444989453d181df30ddb] preparing_image progress=12 -2026-05-11 16:11:03,911 INFO backend.segmentation: [JOB 180176892d89444989453d181df30ddb] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 -2026-05-11 16:11:03,912 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 -2026-05-11 16:11:06,418 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" -2026-05-11 16:11:08,689 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 16:11:08,691 WARNING services.gradio_client_service: GPU Space failed (Cannot find a function with `api_name`: /segment.), trying CPU fallback... -2026-05-11 16:11:08,691 INFO services.gradio_client_service: Calling CPU fallback Space: https://eduardo4547-hyper-reality-sam2-cpu.hf.space -2026-05-11 16:11:09,507 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 16:11:09,518 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/config "HTTP/1.1 200 OK" -2026-05-11 16:11:10,059 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" -2026-05-11 16:11:10,323 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" -2026-05-11 16:11:10,728 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/heartbeat/e5da0f2d-1f57-48c5-bb1e-66e9f7fec1b0 "HTTP/1.1 200 OK" -2026-05-11 16:11:10,911 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" -2026-05-11 16:11:11,012 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/e58b3da1-7be9-42cf-81f6-8c546e39f4be "HTTP/1.1 200 OK" -2026-05-11 16:11:11,463 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" -2026-05-11 16:11:12,023 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/queue/data?session_hash=e5da0f2d-1f57-48c5-bb1e-66e9f7fec1b0 "HTTP/1.1 200 OK" -2026-05-11 16:11:16,110 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a025404a5cb3b148eec3621"}, "remainingTimeMS": 30} -2026-05-11 16:11:16,115 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a025404a5cb3b148eec3621"}, "remainingTimeMS": 30} -2026-05-11 16:14:13,810 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/file=/tmp/gradio/6c61c4453525a0cc97a55213f8ab16e24157b02ad4d2cba459d14b95c79ac6ab/image.webp "HTTP/1.1 200 OK" -2026-05-11 16:14:14,003 INFO services.gradio_client_service: Gradio Space segmentation: entorno=cpu motor=SAM Auto (CPU) mask_count=61 -2026-05-11 16:14:14,004 INFO backend.segmentation: [JOB 180176892d89444989453d181df30ddb] saving_masks progress=92 -2026-05-11 16:14:14,147 INFO backend.segmentation: [JOB 180176892d89444989453d181df30ddb] segments_meta saved (61 segments) -2026-05-11 16:14:14,147 INFO backend.segmentation: [JOB 180176892d89444989453d181df30ddb] done mask_count=61 -2026-05-11 16:14:14,148 INFO backend.segmentation: [UPLOAD_BG] DONE 190.266s at 2026-05-11T22:14:14.148092+00:00 -2026-05-11 16:14:14,148 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-11 16:14:15,680 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 16:14:15,699 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 16:14:16,643 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 16:14:16,662 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 16:14:16,931 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a0254b8ea5401b51d0278a3"}, "remainingTimeMS": 30} -2026-05-11 16:14:16,932 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a0254b8ea5401b51d0278a3"}, "remainingTimeMS": 30} -2026-05-11 16:14:49,311 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 16:14:49,337 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 16:15:23,879 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a0254fbaa6db1d011b1e697"}, "remainingTimeMS": 30} -2026-05-11 16:15:24,106 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a0254fcaa6db1d011b1e698"}, "remainingTimeMS": 30} -2026-05-11 16:15:24,108 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a0254fcaa6db1d011b1e698"}, "remainingTimeMS": 30} -2026-05-11 16:27:59,753 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=(not set — using local SAM2) -2026-05-11 16:27:59,757 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=(not set — using local SAM2) -2026-05-11 16:27:59,758 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=(not set — using local SAM2) -2026-05-11 16:27:59,806 INFO backend.segmentation: [SAM2] Checking model paths: -2026-05-11 16:27:59,806 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\sam2.1_hiera_large_fresh.pt | exists=False -2026-05-11 16:27:59,807 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\sam2.1_hiera_large_fresh.pt | exists=False -2026-05-11 16:27:59,807 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\models\sam2.1_hiera_large_fresh.pt | exists=False -2026-05-11 16:27:59,807 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\models\sam2.1_hiera_large_fresh.pt | exists=False -2026-05-11 16:27:59,808 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\modelo\sam2.1_hiera_large_fresh.pt | exists=False -2026-05-11 16:27:59,808 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\modelo\sam2.1_hiera_large_fresh.pt | exists=False -2026-05-11 16:27:59,809 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\sam2.1_hiera_large.pt | exists=False -2026-05-11 16:27:59,809 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\sam2.1_hiera_large.pt | exists=False -2026-05-11 16:27:59,809 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\models\sam2.1_hiera_large.pt | exists=False -2026-05-11 16:27:59,809 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\models\sam2.1_hiera_large.pt | exists=False -2026-05-11 16:27:59,810 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\modelo\sam2.1_hiera_large.pt | exists=False -2026-05-11 16:27:59,810 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\modelo\sam2.1_hiera_large.pt | exists=False -2026-05-11 16:27:59,810 INFO backend.segmentation: [SAM2] Checking model paths: -2026-05-11 16:27:59,810 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\sam2.1_hiera_large.pth | exists=False -2026-05-11 16:27:59,811 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\sam2.1_hiera_large_fresh.pt | exists=False -2026-05-11 16:27:59,811 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\sam2.1_hiera_large.pth | exists=False -2026-05-11 16:27:59,811 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\sam2.1_hiera_large_fresh.pt | exists=False -2026-05-11 16:27:59,811 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\models\sam2.1_hiera_large.pth | exists=False -2026-05-11 16:27:59,811 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\models\sam2.1_hiera_large_fresh.pt | exists=False -2026-05-11 16:27:59,811 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\models\sam2.1_hiera_large.pth | exists=False -2026-05-11 16:27:59,811 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\models\sam2.1_hiera_large_fresh.pt | exists=False -2026-05-11 16:27:59,811 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\modelo\sam2.1_hiera_large.pth | exists=False -2026-05-11 16:27:59,812 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\modelo\sam2.1_hiera_large.pth | exists=False -2026-05-11 16:27:59,812 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\modelo\sam2.1_hiera_large_fresh.pt | exists=False -2026-05-11 16:27:59,812 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\sam2_hiera_large.pt | exists=False -2026-05-11 16:27:59,812 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\modelo\sam2.1_hiera_large_fresh.pt | exists=False -2026-05-11 16:27:59,812 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\sam2_hiera_large.pt | exists=False -2026-05-11 16:27:59,812 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\sam2.1_hiera_large.pt | exists=False -2026-05-11 16:27:59,812 INFO backend.segmentation: [SAM2] Checking model paths: -ve\Escritorio\Trabajo\Prueba-PoC\backend\models\sam2_hiera_large.pt | exists=False -2026-05-11 16:27:59,813 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\sam2.1_hiera_large.pt | exists=False -2026-05-11 16:27:59,813 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\models\sam2_hiera_large.pt | exists=False -2026-05-11 16:27:59,813 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\models\sam2.1_hiera_large.pt | exists=False -2026-05-11 16:27:59,813 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\sam2.1_hiera_large_fresh.pt | exists=False -2026-05-11 16:27:59,813 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\modelo\sam2_hiera_large.pt | exists=False -2026-05-11 16:27:59,813 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\models\sam2.1_hiera_large.pt | exists=False -2026-05-11 16:27:59,813 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\modelo\sam2_hiera_large.pt | exists=False +2026-04-29 20:12:40,375 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. +2026-04-29 20:13:22,434 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "69f2bac20e0544b45d45e6f1"}, "remainingTimeMS": 30} +2026-04-29 20:13:53,491 INFO backend.segmentation: [UPLOAD_BG] START at 2026-04-30T02:13:53.491443+00:00 +2026-04-29 20:13:53,492 INFO backend.segmentation: [JOB 667a8562af1044a6926d53449b625dd6] preparing_image progress=12 +2026-04-29 20:13:53,743 INFO backend.segmentation: [JOB 667a8562af1044a6926d53449b625dd6] segmenting_with_sam2 progress=30 estimated_seconds=51.939840000000004 +2026-04-29 20:13:56,153 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" +2026-04-29 20:13:56,625 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-04-29 20:13:56,675 WARNING services.gradio_client_service: Gradio Space call failed, falling back to local SAM2: Cannot find a function with `api_name`: /segment. +2026-04-29 20:13:56,675 INFO backend.segmentation: [SAM2_GENERATE] START at 2026-04-30T02:13:56.675848+00:00 +2026-04-29 20:13:56,687 INFO backend.segmentation: [SAM2] Mask generator not loaded; attempting on-demand load. +2026-04-29 20:13:56,687 WARNING backend.segmentation: [SAM2] torch not installed — SAM2 unavailable (using Gradio Space) +2026-04-29 20:13:56,687 ERROR backend.segmentation: [JOB 667a8562af1044a6926d53449b625dd6] failed: 500: torch not installed — SAM2 unavailable (using Gradio Space) +Traceback (most recent call last): + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\image_service.py", line 145, in run_upload_job + label_map, mask_count = generate_label_map(image_rgb) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\scene_service.py", line 134, in generate_label_map + generator = get_sam2_mask_generator() + ^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\sam2_service.py", line 184, in get_sam2_mask_generator + raise HTTPException(status_code=500, detail=detail) +fastapi.exceptions.HTTPException: 500: torch not installed — SAM2 unavailable (using Gradio Space) +2026-04-29 20:13:56,689 INFO backend.segmentation: [UPLOAD_BG] DONE 3.196s at 2026-04-30T02:13:56.689353+00:00 +2026-04-29 20:13:56,689 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-04-29 20:13:57,044 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-04-29 20:13:57,163 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/68121945-8a97-442e-8cbb-59cd817f9df3 "HTTP/1.1 200 OK" +2026-04-29 20:16:38,951 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. +2026-04-29 20:16:55,032 INFO backend.segmentation: [UPLOAD_BG] START at 2026-04-30T02:16:55.032702+00:00 +2026-04-29 20:16:55,032 INFO backend.segmentation: [JOB 50d2907ecb844a3fafc2f8a5247620ea] preparing_image progress=12 +2026-04-29 20:16:55,089 INFO backend.segmentation: [JOB 50d2907ecb844a3fafc2f8a5247620ea] segmenting_with_sam2 progress=30 estimated_seconds=51.939840000000004 +2026-04-29 20:16:57,866 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" +2026-04-29 20:17:00,098 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-04-29 20:17:00,613 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-04-29 20:17:02,540 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/06d3302a-135c-423c-8294-e950bff0a17a "HTTP/1.1 200 OK" +2026-04-29 20:17:02,542 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" +2026-04-29 20:17:04,774 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-04-29 20:17:07,079 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=06d3302a-135c-423c-8294-e950bff0a17a "HTTP/1.1 200 OK" +2026-04-29 20:17:26,593 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\b17b68f6472ad2c6c0bb7499f231e242c50b344237d319bd3b45d56ef2d488aa\image.webp "HTTP/1.1 200 OK" +2026-04-29 20:17:26,607 INFO services.gradio_client_service: Gradio Space segmentation: entorno=🌳 Terraza / Patio / Jardín motor=Híbrido Arquitectura (Cityscapes Grande + DINO Pequeño) mask_count=20 +2026-04-29 20:17:26,607 INFO backend.segmentation: [JOB 50d2907ecb844a3fafc2f8a5247620ea] saving_masks progress=92 +2026-04-29 20:17:26,690 INFO backend.segmentation: [JOB 50d2907ecb844a3fafc2f8a5247620ea] segments_meta saved (20 segments) +2026-04-29 20:17:26,690 INFO backend.segmentation: [JOB 50d2907ecb844a3fafc2f8a5247620ea] done mask_count=20 +2026-04-29 20:17:26,691 INFO backend.segmentation: [UPLOAD_BG] DONE 31.658s at 2026-04-30T02:17:26.691033+00:00 +2026-04-29 20:17:26,691 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-04-29 20:17:45,867 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:17:45.867306+00:00 +2026-04-29 20:17:46,402 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\proyecto-White-Houses.jpg +2026-04-29 20:17:46,702 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.835s at 2026-04-30T02:17:46.702156+00:00 +2026-04-29 20:17:50,496 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:17:50.496976+00:00 +2026-04-29 20:17:50,819 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\proyecto-White-Houses.jpg +2026-04-29 20:17:50,985 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.488s at 2026-04-30T02:17:50.985122+00:00 +2026-04-29 20:17:54,307 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:17:54.307539+00:00 +2026-04-29 20:17:54,768 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\proyecto-White-Houses.jpg +2026-04-29 20:17:54,931 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.624s at 2026-04-30T02:17:54.931489+00:00 +2026-04-29 20:17:56,247 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:17:56.247254+00:00 +2026-04-29 20:17:56,728 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\proyecto-White-Houses.jpg +2026-04-29 20:17:56,898 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.651s at 2026-04-30T02:17:56.898353+00:00 +2026-04-29 20:18:00,146 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:18:00.146989+00:00 +2026-04-29 20:18:00,616 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\proyecto-White-Houses.jpg +2026-04-29 20:18:00,782 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.636s at 2026-04-30T02:18:00.782444+00:00 +2026-04-29 20:18:05,560 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:18:05.560412+00:00 +2026-04-29 20:18:06,116 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\proyecto-White-Houses.jpg +2026-04-29 20:18:06,272 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.712s at 2026-04-30T02:18:06.272748+00:00 +2026-04-29 20:18:11,868 INFO backend.segmentation: [UPLOAD_BG] START at 2026-04-30T02:18:11.868080+00:00 +2026-04-29 20:18:11,868 INFO backend.segmentation: [JOB 6897b1b65f7c4201ab0a5c35bf18b368] preparing_image progress=12 +2026-04-29 20:18:11,941 INFO backend.segmentation: [JOB 6897b1b65f7c4201ab0a5c35bf18b368] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 +2026-04-29 20:18:14,341 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" +2026-04-29 20:18:16,543 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-04-29 20:18:16,695 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-04-29 20:18:18,825 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/e332d34b-376c-4071-9631-656973e262a0 "HTTP/1.1 200 OK" +2026-04-29 20:18:18,828 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" +2026-04-29 20:18:21,032 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-04-29 20:18:23,304 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=e332d34b-376c-4071-9631-656973e262a0 "HTTP/1.1 200 OK" +2026-04-29 20:18:36,010 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\7b5a7a453887652d3284bb9eabe628e95982e15d5e0f16ff718d22beb5ed2a72\image.webp "HTTP/1.1 200 OK" +2026-04-29 20:18:36,020 INFO services.gradio_client_service: Gradio Space segmentation: entorno=🛁 Baño / Cocina motor=SegFormer (SegFormer ADE20K+ DINO) + SAM 2.1 mask_count=18 +2026-04-29 20:18:36,021 INFO backend.segmentation: [JOB 6897b1b65f7c4201ab0a5c35bf18b368] saving_masks progress=92 +2026-04-29 20:18:36,063 INFO backend.segmentation: [JOB 6897b1b65f7c4201ab0a5c35bf18b368] segments_meta saved (14 segments) +2026-04-29 20:18:36,063 INFO backend.segmentation: [JOB 6897b1b65f7c4201ab0a5c35bf18b368] done mask_count=18 +2026-04-29 20:18:36,063 INFO backend.segmentation: [UPLOAD_BG] DONE 24.195s at 2026-04-30T02:18:36.063054+00:00 +2026-04-29 20:18:36,063 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-04-29 20:18:44,885 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:18:44.885155+00:00 +2026-04-29 20:18:45,431 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-04-29 20:18:45,591 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.706s at 2026-04-30T02:18:45.591016+00:00 +2026-04-29 20:18:49,898 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:18:49.898853+00:00 +2026-04-29 20:18:50,427 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-04-29 20:18:50,573 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.674s at 2026-04-30T02:18:50.573101+00:00 +2026-04-29 20:18:52,643 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:18:52.643494+00:00 +2026-04-29 20:18:53,101 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-04-29 20:18:53,259 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.615s at 2026-04-30T02:18:53.259095+00:00 +2026-04-29 20:18:55,884 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:18:55.884791+00:00 +2026-04-29 20:18:56,336 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-04-29 20:18:56,483 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.599s at 2026-04-30T02:18:56.483159+00:00 +2026-04-29 20:18:58,689 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:18:58.689702+00:00 +2026-04-29 20:18:59,139 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-04-29 20:18:59,285 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.596s at 2026-04-30T02:18:59.285688+00:00 +2026-04-29 20:19:01,587 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:19:01.587113+00:00 +2026-04-29 20:19:02,057 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-04-29 20:19:02,202 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.616s at 2026-04-30T02:19:02.202912+00:00 +2026-04-29 20:19:08,881 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:19:08.881813+00:00 +2026-04-29 20:19:09,450 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-04-29 20:19:09,598 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.716s at 2026-04-30T02:19:09.598660+00:00 +2026-04-29 20:19:14,081 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:19:14.081047+00:00 +2026-04-29 20:19:14,613 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-04-29 20:19:14,765 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.684s at 2026-04-30T02:19:14.765513+00:00 +2026-04-29 20:19:20,588 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:19:20.588691+00:00 +2026-04-29 20:19:21,001 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-04-29 20:19:21,148 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.560s at 2026-04-30T02:19:21.148963+00:00 +2026-04-29 20:19:26,717 INFO backend.segmentation: [UPLOAD_BG] START at 2026-04-30T02:19:26.717015+00:00 +2026-04-29 20:19:26,717 INFO backend.segmentation: [JOB 0e77f0bbab294a828b0dbfbb826c3805] preparing_image progress=12 +2026-04-29 20:19:26,784 INFO backend.segmentation: [JOB 0e77f0bbab294a828b0dbfbb826c3805] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 +2026-04-29 20:19:29,222 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" +2026-04-29 20:19:31,597 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-04-29 20:19:31,734 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-04-29 20:19:34,073 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/19c5143b-64ec-4b5d-942b-098f7096a07d "HTTP/1.1 200 OK" +2026-04-29 20:19:34,076 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" +2026-04-29 20:19:36,338 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-04-29 20:19:38,618 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=19c5143b-64ec-4b5d-942b-098f7096a07d "HTTP/1.1 200 OK" +2026-04-29 20:19:50,817 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\627367a96ce0d7cea77d51e3b57be3a803ddd9b06e2c8a9547129f322756dd05\image.webp "HTTP/1.1 200 OK" +2026-04-29 20:19:50,828 INFO services.gradio_client_service: Gradio Space segmentation: entorno=🛁 Baño / Cocina motor=SegFormer (SegFormer ADE20K+ DINO) + SAM 2.1 mask_count=13 +2026-04-29 20:19:50,828 INFO backend.segmentation: [JOB 0e77f0bbab294a828b0dbfbb826c3805] saving_masks progress=92 +2026-04-29 20:19:50,860 INFO backend.segmentation: [JOB 0e77f0bbab294a828b0dbfbb826c3805] segments_meta saved (13 segments) +2026-04-29 20:19:50,861 INFO backend.segmentation: [JOB 0e77f0bbab294a828b0dbfbb826c3805] done mask_count=13 +2026-04-29 20:19:50,861 INFO backend.segmentation: [UPLOAD_BG] DONE 24.145s at 2026-04-30T02:19:50.861597+00:00 +2026-04-29 20:19:50,861 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-04-29 20:19:58,632 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:19:58.632422+00:00 +2026-04-29 20:19:58,950 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-04-29 20:19:59,096 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.464s at 2026-04-30T02:19:59.096073+00:00 +2026-04-29 20:20:03,025 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:20:03.025850+00:00 +2026-04-29 20:20:03,491 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-04-29 20:20:03,640 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.615s at 2026-04-30T02:20:03.640105+00:00 +2026-04-29 20:20:20,501 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:20:20.501928+00:00 +2026-04-29 20:20:21,076 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-04-29 20:20:21,227 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.727s at 2026-04-30T02:20:21.227737+00:00 +2026-04-29 20:20:28,266 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:20:28.266563+00:00 +2026-04-29 20:20:28,768 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-04-29 20:20:28,935 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.669s at 2026-04-30T02:20:28.935807+00:00 +2026-04-29 20:20:35,728 INFO backend.segmentation: [UPLOAD_BG] START at 2026-04-30T02:20:35.728058+00:00 +2026-04-29 20:20:35,729 INFO backend.segmentation: [JOB f44cfa950b0546ffbcd7fa090bad49db] preparing_image progress=12 +2026-04-29 20:20:35,790 INFO backend.segmentation: [JOB f44cfa950b0546ffbcd7fa090bad49db] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 +2026-04-29 20:20:38,252 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" +2026-04-29 20:20:40,610 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-04-29 20:20:40,810 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-04-29 20:20:43,106 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/31bdf8c4-3e85-4561-b055-cb540bff6222 "HTTP/1.1 200 OK" +2026-04-29 20:20:43,110 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" +2026-04-29 20:20:45,435 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-04-29 20:20:47,968 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=31bdf8c4-3e85-4561-b055-cb540bff6222 "HTTP/1.1 200 OK" +2026-04-29 20:21:09,199 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\de39b2da096587a3b0e0d7fb57541b12755192b377f4914a8047c40356bfbf4a\image.webp "HTTP/1.1 200 OK" +2026-04-29 20:21:09,216 INFO services.gradio_client_service: Gradio Space segmentation: entorno=🛁 Baño / Cocina motor=SegFormer (SegFormer ADE20K+ DINO) + SAM 2.1 mask_count=30 +2026-04-29 20:21:09,217 INFO backend.segmentation: [JOB f44cfa950b0546ffbcd7fa090bad49db] saving_masks progress=92 +2026-04-29 20:21:09,330 INFO backend.segmentation: [JOB f44cfa950b0546ffbcd7fa090bad49db] segments_meta saved (18 segments) +2026-04-29 20:21:09,330 INFO backend.segmentation: [JOB f44cfa950b0546ffbcd7fa090bad49db] done mask_count=30 +2026-04-29 20:21:09,331 INFO backend.segmentation: [UPLOAD_BG] DONE 33.603s at 2026-04-30T02:21:09.331315+00:00 +2026-04-29 20:21:09,331 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-04-29 20:21:19,563 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:21:19.563482+00:00 +2026-04-29 20:21:19,875 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-04-29 20:21:20,037 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.474s at 2026-04-30T02:21:20.037544+00:00 +2026-04-29 20:21:27,716 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:21:27.716717+00:00 +2026-04-29 20:21:28,240 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-04-29 20:21:28,388 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.671s at 2026-04-30T02:21:28.388007+00:00 +2026-04-29 20:21:33,770 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:21:33.770053+00:00 +2026-04-29 20:21:34,297 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-04-29 20:21:34,445 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.676s at 2026-04-30T02:21:34.445668+00:00 +2026-04-29 20:21:45,556 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:21:45.556315+00:00 +2026-04-29 20:21:46,063 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-04-29 20:21:46,214 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.658s at 2026-04-30T02:21:46.214366+00:00 +2026-04-29 20:21:54,885 INFO backend.segmentation: [UPLOAD_BG] START at 2026-04-30T02:21:54.885450+00:00 +2026-04-29 20:21:54,886 INFO backend.segmentation: [JOB ec618977b0b7478ca5d30d251fa15945] preparing_image progress=12 +2026-04-29 20:21:55,003 INFO backend.segmentation: [JOB ec618977b0b7478ca5d30d251fa15945] segmenting_with_sam2 progress=30 estimated_seconds=138.4576 +2026-04-29 20:21:57,389 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" +2026-04-29 20:21:59,757 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-04-29 20:21:59,891 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-04-29 20:22:02,312 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" +2026-04-29 20:22:02,322 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/3f8ed7a1-4b28-46c2-9e01-7e4358b38e76 "HTTP/1.1 200 OK" +2026-04-29 20:22:04,682 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-04-29 20:22:07,179 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=3f8ed7a1-4b28-46c2-9e01-7e4358b38e76 "HTTP/1.1 200 OK" +2026-04-29 20:22:33,186 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\80421cbcd599451a04044e3ece45f375843574c97db6199cd4e3f022f90b9311\image.webp "HTTP/1.1 200 OK" +2026-04-29 20:22:33,213 INFO services.gradio_client_service: Gradio Space segmentation: entorno=🛁 Baño / Cocina motor=SegFormer (SegFormer ADE20K+ DINO) + SAM 2.1 mask_count=16 +2026-04-29 20:22:33,214 INFO backend.segmentation: [JOB ec618977b0b7478ca5d30d251fa15945] saving_masks progress=92 +2026-04-29 20:22:33,419 INFO backend.segmentation: [JOB ec618977b0b7478ca5d30d251fa15945] segments_meta saved (16 segments) +2026-04-29 20:22:33,419 INFO backend.segmentation: [JOB ec618977b0b7478ca5d30d251fa15945] done mask_count=16 +2026-04-29 20:22:33,419 INFO backend.segmentation: [UPLOAD_BG] DONE 38.534s at 2026-04-30T02:22:33.419503+00:00 +2026-04-29 20:22:33,420 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-04-29 20:22:38,594 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:22:38.593824+00:00 +2026-04-29 20:22:38,977 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-04-29 20:22:39,402 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.808s at 2026-04-30T02:22:39.402689+00:00 +2026-04-29 20:22:44,189 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:22:44.189800+00:00 +2026-04-29 20:22:44,726 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-04-29 20:22:45,179 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.990s at 2026-04-30T02:22:45.179303+00:00 +2026-04-29 20:22:50,087 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:22:50.087424+00:00 +2026-04-29 20:22:50,751 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-04-29 20:22:51,466 INFO backend.segmentation: [APPLY_TEXTURE] DONE 1.379s at 2026-04-30T02:22:51.466435+00:00 +2026-04-29 20:26:39,065 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. +2026-04-29 20:26:39,964 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. +2026-04-29 20:33:56,025 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. +2026-04-29 20:34:02,828 INFO backend.segmentation: [UPLOAD_BG] START at 2026-04-30T02:34:02.828129+00:00 +2026-04-29 20:34:02,830 INFO backend.segmentation: [JOB ccecb5fbdf744d9eae57eb2b04e0af13] preparing_image progress=12 +2026-04-29 20:34:02,900 INFO backend.segmentation: [JOB ccecb5fbdf744d9eae57eb2b04e0af13] segmenting_with_sam2 progress=30 estimated_seconds=51.939840000000004 +2026-04-29 20:34:04,067 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" +2026-04-29 20:34:04,727 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-04-29 20:34:05,153 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-04-29 20:34:05,258 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/b306737b-bf28-4f02-8963-83b74032d449 "HTTP/1.1 200 OK" +2026-04-29 20:34:05,354 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" +2026-04-29 20:34:05,788 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-04-29 20:34:06,344 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/data?session_hash=b306737b-bf28-4f02-8963-83b74032d449 "HTTP/1.1 200 OK" +2026-04-29 20:34:24,624 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/file=/tmp/gradio/edcd82066c73a2359a9133192b4091c873fb9fca768c0f377a7a519aeb9f9b3a/image.webp "HTTP/1.1 200 OK" +2026-04-29 20:34:24,678 INFO services.gradio_client_service: Gradio Space segmentation: entorno=🌳 Terraza / Patio / Jardín motor=Híbrido Arquitectura (Cityscapes Grande + DINO Pequeño) mask_count=20 +2026-04-29 20:34:24,684 INFO backend.segmentation: [JOB ccecb5fbdf744d9eae57eb2b04e0af13] saving_masks progress=92 +2026-04-29 20:34:24,781 INFO backend.segmentation: [JOB ccecb5fbdf744d9eae57eb2b04e0af13] segments_meta saved (20 segments) +2026-04-29 20:34:24,782 INFO backend.segmentation: [JOB ccecb5fbdf744d9eae57eb2b04e0af13] done mask_count=20 +2026-04-29 20:34:24,782 INFO backend.segmentation: [UPLOAD_BG] DONE 21.955s at 2026-04-30T02:34:24.782746+00:00 +2026-04-29 20:34:24,783 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-04-29 20:34:27,987 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T02:34:27.987941+00:00 +2026-04-29 20:34:28,292 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\proyecto-White-Houses.jpg +2026-04-29 20:34:28,570 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.582s at 2026-04-30T02:34:28.570140+00:00 +2026-04-30 11:28:10,082 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=https://eduardo4547-hyper-reality-sam2-gpu.hf.space +2026-04-30 11:28:10,113 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. +2026-04-30 11:28:44,116 INFO backend.segmentation: [UPLOAD_BG] START at 2026-04-30T17:28:44.116002+00:00 +2026-04-30 11:28:44,117 INFO backend.segmentation: [JOB 9a15bbfe68f84bde8bdac60a8be4da9e] preparing_image progress=12 +2026-04-30 11:28:44,411 INFO backend.segmentation: [JOB 9a15bbfe68f84bde8bdac60a8be4da9e] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 +2026-04-30 11:28:44,411 INFO services.gradio_client_service: Calling GPU Gradio Space: https://eduardo4547-hyper-reality-sam2-gpu.hf.space +2026-04-30 11:28:47,099 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" +2026-04-30 11:28:47,585 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-04-30 11:28:48,272 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-04-30 11:28:48,363 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/7d7be152-f5b8-4924-8c4d-1a0b61711e8f "HTTP/1.1 200 OK" +2026-04-30 11:28:48,476 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" +2026-04-30 11:28:48,934 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-04-30 11:28:49,386 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/data?session_hash=7d7be152-f5b8-4924-8c4d-1a0b61711e8f "HTTP/1.1 200 OK" +2026-04-30 11:29:08,489 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/file=/tmp/gradio/d71a861910d02311782c5f826bb80cc1fd74d6f6086844534a04a02edf930180/image.webp "HTTP/1.1 200 OK" +2026-04-30 11:29:08,588 INFO services.gradio_client_service: Gradio Space segmentation: entorno=🛁 Baño / Cocina motor=SegFormer (SegFormer ADE20K+ DINO) + SAM 2.1 mask_count=18 +2026-04-30 11:29:08,590 INFO backend.segmentation: [JOB 9a15bbfe68f84bde8bdac60a8be4da9e] saving_masks progress=92 +2026-04-30 11:29:08,688 INFO backend.segmentation: [JOB 9a15bbfe68f84bde8bdac60a8be4da9e] segments_meta saved (14 segments) +2026-04-30 11:29:08,688 INFO backend.segmentation: [JOB 9a15bbfe68f84bde8bdac60a8be4da9e] done mask_count=18 +2026-04-30 11:29:08,689 INFO backend.segmentation: [UPLOAD_BG] DONE 24.573s at 2026-04-30T17:29:08.689489+00:00 +2026-04-30 11:29:08,689 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-04-30 11:34:31,212 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=https://eduardo4547-hyper-reality-sam2-gpu.hf.space +2026-04-30 11:34:31,227 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. +2026-04-30 11:35:20,079 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=https://eduardo4547-hyper-reality-sam2-gpu.hf.space +2026-04-30 11:35:20,093 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. +2026-04-30 11:35:28,226 INFO backend.segmentation: [UPLOAD_BG] START at 2026-04-30T17:35:28.226030+00:00 +2026-04-30 11:35:28,227 INFO backend.segmentation: [JOB 48baf3b40f2f45d190f44cd2761c709e] preparing_image progress=12 +2026-04-30 11:35:28,315 INFO backend.segmentation: [JOB 48baf3b40f2f45d190f44cd2761c709e] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 +2026-04-30 11:35:28,316 INFO services.gradio_client_service: Calling GPU Gradio Space: https://eduardo4547-hyper-reality-sam2-gpu.hf.space +2026-04-30 11:35:29,381 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" +2026-04-30 11:35:29,927 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-04-30 11:35:30,567 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-04-30 11:35:30,680 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/846ae43c-81a8-48af-97ee-8292d522cc64 "HTTP/1.1 200 OK" +2026-04-30 11:35:30,784 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" +2026-04-30 11:35:31,388 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-04-30 11:35:31,964 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/data?session_hash=846ae43c-81a8-48af-97ee-8292d522cc64 "HTTP/1.1 200 OK" +2026-04-30 11:35:43,682 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/file=/tmp/gradio/d71a861910d02311782c5f826bb80cc1fd74d6f6086844534a04a02edf930180/image.webp "HTTP/1.1 200 OK" +2026-04-30 11:35:43,788 INFO services.gradio_client_service: Gradio Space segmentation: entorno=🛁 Baño / Cocina motor=SegFormer (SegFormer ADE20K+ DINO) + SAM 2.1 mask_count=18 +2026-04-30 11:35:43,788 INFO backend.segmentation: [JOB 48baf3b40f2f45d190f44cd2761c709e] saving_masks progress=92 +2026-04-30 11:35:43,874 INFO backend.segmentation: [JOB 48baf3b40f2f45d190f44cd2761c709e] segments_meta saved (14 segments) +2026-04-30 11:35:43,875 INFO backend.segmentation: [JOB 48baf3b40f2f45d190f44cd2761c709e] done mask_count=18 +2026-04-30 11:35:43,875 INFO backend.segmentation: [UPLOAD_BG] DONE 15.650s at 2026-04-30T17:35:43.875230+00:00 +2026-04-30 11:35:43,876 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-04-30 11:37:18,311 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T17:37:18.311528+00:00 +2026-04-30 11:37:18,787 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-04-30 11:37:19,025 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.714s at 2026-04-30T17:37:19.025433+00:00 +2026-04-30 11:37:22,720 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T17:37:22.720207+00:00 +2026-04-30 11:37:23,223 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-04-30 11:37:23,371 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.651s at 2026-04-30T17:37:23.371172+00:00 +2026-04-30 11:37:27,040 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T17:37:27.040137+00:00 +2026-04-30 11:37:27,461 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-04-30 11:37:27,615 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.576s at 2026-04-30T17:37:27.615284+00:00 +2026-04-30 11:37:32,588 INFO backend.segmentation: [UPLOAD_BG] START at 2026-04-30T17:37:32.588150+00:00 +2026-04-30 11:37:32,589 INFO backend.segmentation: [JOB 5a04157791ee46708b9659b06abc01cd] preparing_image progress=12 +2026-04-30 11:37:32,652 INFO backend.segmentation: [JOB 5a04157791ee46708b9659b06abc01cd] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 +2026-04-30 11:37:32,653 INFO services.gradio_client_service: Calling GPU Gradio Space: https://eduardo4547-hyper-reality-sam2-gpu.hf.space +2026-04-30 11:37:33,265 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" +2026-04-30 11:37:33,854 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-04-30 11:37:34,045 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-04-30 11:37:34,638 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" +2026-04-30 11:37:35,300 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-04-30 11:37:35,353 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/f3fac27d-4abe-4757-a29c-4cc301d3c520 "HTTP/1.1 200 OK" +2026-04-30 11:37:35,860 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/data?session_hash=f3fac27d-4abe-4757-a29c-4cc301d3c520 "HTTP/1.1 200 OK" +2026-04-30 11:37:45,344 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/file=/tmp/gradio/525c342e2500d48137e90e793b9f3884aa3deedaa44ac6a6178e85433dde68ed/image.webp "HTTP/1.1 200 OK" +2026-04-30 11:37:45,399 INFO services.gradio_client_service: Gradio Space segmentation: entorno=🛁 Baño / Cocina motor=SegFormer (SegFormer ADE20K+ DINO) + SAM 2.1 mask_count=19 +2026-04-30 11:37:45,400 INFO backend.segmentation: [JOB 5a04157791ee46708b9659b06abc01cd] saving_masks progress=92 +2026-04-30 11:37:45,496 INFO backend.segmentation: [JOB 5a04157791ee46708b9659b06abc01cd] segments_meta saved (19 segments) +2026-04-30 11:37:45,496 INFO backend.segmentation: [JOB 5a04157791ee46708b9659b06abc01cd] done mask_count=19 +2026-04-30 11:37:45,497 INFO backend.segmentation: [UPLOAD_BG] DONE 12.909s at 2026-04-30T17:37:45.497768+00:00 +2026-04-30 11:37:45,497 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-04-30 11:37:51,411 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T17:37:51.411336+00:00 +2026-04-30 11:37:51,902 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-04-30 11:37:52,048 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.637s at 2026-04-30T17:37:52.048476+00:00 +2026-04-30 11:37:54,874 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T17:37:54.874358+00:00 +2026-04-30 11:37:55,381 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-04-30 11:37:55,525 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.652s at 2026-04-30T17:37:55.525845+00:00 +2026-04-30 11:37:59,388 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T17:37:59.388707+00:00 +2026-04-30 11:37:59,889 INFO backend.segmentation: [APPLY_TEXTURE] flat floor tiling (trap=0.05 < 0.35, skip perspective) +2026-04-30 11:37:59,903 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-04-30 11:38:00,058 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.670s at 2026-04-30T17:38:00.058226+00:00 +2026-04-30 11:38:04,419 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T17:38:04.419644+00:00 +2026-04-30 11:38:04,939 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-04-30 11:38:05,083 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.664s at 2026-04-30T17:38:05.083669+00:00 +2026-04-30 11:38:09,485 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T17:38:09.485185+00:00 +2026-04-30 11:38:10,004 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-04-30 11:38:10,164 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.679s at 2026-04-30T17:38:10.164696+00:00 +2026-04-30 11:38:14,863 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T17:38:14.863574+00:00 +2026-04-30 11:38:15,447 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-04-30 11:38:15,612 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.750s at 2026-04-30T17:38:15.612415+00:00 +2026-04-30 11:38:18,118 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T17:38:18.118131+00:00 +2026-04-30 11:38:18,776 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-04-30 11:38:18,995 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.879s at 2026-04-30T17:38:18.995927+00:00 +2026-04-30 11:38:22,037 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T17:38:22.037510+00:00 +2026-04-30 11:38:22,686 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-04-30 11:38:22,873 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.835s at 2026-04-30T17:38:22.873532+00:00 +2026-04-30 11:38:25,520 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T17:38:25.520184+00:00 +2026-04-30 11:38:26,145 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-04-30 11:38:26,334 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.815s at 2026-04-30T17:38:26.334641+00:00 +2026-04-30 11:38:28,140 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T17:38:28.140486+00:00 +2026-04-30 11:38:28,847 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-04-30 11:38:29,023 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.882s at 2026-04-30T17:38:29.023363+00:00 +2026-04-30 11:38:35,098 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T17:38:35.098342+00:00 +2026-04-30 11:38:35,824 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-04-30 11:38:36,028 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.930s at 2026-04-30T17:38:36.028300+00:00 +2026-04-30 11:41:41,140 INFO backend.segmentation: [UPLOAD_BG] START at 2026-04-30T17:41:41.140015+00:00 +2026-04-30 11:41:41,149 INFO backend.segmentation: [JOB a63a4a48e2114d2a8a8ce7342d8b8443] preparing_image progress=12 +2026-04-30 11:41:41,245 INFO backend.segmentation: [JOB a63a4a48e2114d2a8a8ce7342d8b8443] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 +2026-04-30 11:41:41,246 INFO services.gradio_client_service: Calling GPU Gradio Space: https://eduardo4547-hyper-reality-sam2-gpu.hf.space +2026-04-30 11:41:41,911 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" +2026-04-30 11:41:42,462 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-04-30 11:41:42,643 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-04-30 11:41:43,175 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/3aef8110-e818-4b0d-b6eb-ea6e1e3f6d26 "HTTP/1.1 200 OK" +2026-04-30 11:41:43,286 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" +2026-04-30 11:41:43,879 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-04-30 11:41:44,473 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/data?session_hash=3aef8110-e818-4b0d-b6eb-ea6e1e3f6d26 "HTTP/1.1 200 OK" +2026-04-30 11:41:54,142 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/file=/tmp/gradio/be028661dd9bac57589c50374ec81fba3f6d33d75c68656f138199c7ecd043d5/image.webp "HTTP/1.1 200 OK" +2026-04-30 11:41:54,248 INFO services.gradio_client_service: Gradio Space segmentation: entorno=🛁 Baño / Cocina motor=SegFormer (SegFormer ADE20K+ DINO) + SAM 2.1 mask_count=13 +2026-04-30 11:41:54,250 INFO backend.segmentation: [JOB a63a4a48e2114d2a8a8ce7342d8b8443] saving_masks progress=92 +2026-04-30 11:41:54,306 INFO backend.segmentation: [JOB a63a4a48e2114d2a8a8ce7342d8b8443] segments_meta saved (13 segments) +2026-04-30 11:41:54,307 INFO backend.segmentation: [JOB a63a4a48e2114d2a8a8ce7342d8b8443] done mask_count=13 +2026-04-30 11:41:54,307 INFO backend.segmentation: [UPLOAD_BG] DONE 13.167s at 2026-04-30T17:41:54.307037+00:00 +2026-04-30 11:41:54,308 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-04-30 11:43:18,472 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T17:43:18.472363+00:00 +2026-04-30 11:43:19,016 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-04-30 11:43:19,160 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.688s at 2026-04-30T17:43:19.160192+00:00 +2026-04-30 11:43:30,372 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T17:43:30.372475+00:00 +2026-04-30 11:43:30,954 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-04-30 11:43:31,098 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.727s at 2026-04-30T17:43:31.098668+00:00 +2026-04-30 11:47:34,143 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T17:47:34.143047+00:00 +2026-04-30 11:47:34,404 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-04-30 11:47:34,532 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.389s at 2026-04-30T17:47:34.532555+00:00 +2026-04-30 11:47:55,089 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T17:47:55.089325+00:00 +2026-04-30 11:47:55,583 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-04-30 11:47:55,730 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.641s at 2026-04-30T17:47:55.730378+00:00 +2026-04-30 12:04:38,148 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=https://eduardo4547-hyper-reality-sam2-gpu.hf.space +2026-04-30 12:04:38,173 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. +2026-04-30 12:09:38,204 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=https://eduardo4547-hyper-reality-sam2-gpu.hf.space +2026-04-30 12:09:38,219 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. +2026-04-30 12:13:52,707 INFO backend.segmentation: [UPLOAD_BG] START at 2026-04-30T18:13:52.707043+00:00 +2026-04-30 12:13:52,707 INFO backend.segmentation: [JOB 1df6118ebf3b4825b6acf36a62eb382b] preparing_image progress=12 +2026-04-30 12:13:52,799 INFO backend.segmentation: [JOB 1df6118ebf3b4825b6acf36a62eb382b] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 +2026-04-30 12:13:52,799 INFO services.gradio_client_service: Calling GPU Gradio Space: https://eduardo4547-hyper-reality-sam2-gpu.hf.space +2026-04-30 12:13:53,878 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" +2026-04-30 12:13:54,504 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-04-30 12:13:55,176 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-04-30 12:13:55,270 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/41cb0056-465a-425e-83c0-301658311ea8 "HTTP/1.1 200 OK" +2026-04-30 12:13:55,368 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" +2026-04-30 12:13:55,904 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-04-30 12:13:56,487 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/data?session_hash=41cb0056-465a-425e-83c0-301658311ea8 "HTTP/1.1 200 OK" +2026-04-30 12:14:07,019 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/file=/tmp/gradio/d71a861910d02311782c5f826bb80cc1fd74d6f6086844534a04a02edf930180/image.webp "HTTP/1.1 200 OK" +2026-04-30 12:14:07,128 INFO services.gradio_client_service: Gradio Space segmentation: entorno=🛁 Baño / Cocina motor=SegFormer (SegFormer ADE20K+ DINO) + SAM 2.1 mask_count=18 +2026-04-30 12:14:07,129 INFO backend.segmentation: [JOB 1df6118ebf3b4825b6acf36a62eb382b] saving_masks progress=92 +2026-04-30 12:14:07,214 INFO backend.segmentation: [JOB 1df6118ebf3b4825b6acf36a62eb382b] segments_meta saved (14 segments) +2026-04-30 12:14:07,214 INFO backend.segmentation: [JOB 1df6118ebf3b4825b6acf36a62eb382b] done mask_count=18 +2026-04-30 12:14:07,215 INFO backend.segmentation: [UPLOAD_BG] DONE 14.509s at 2026-04-30T18:14:07.215535+00:00 +2026-04-30 12:14:07,216 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-04-30 12:15:26,031 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T18:15:26.031154+00:00 +2026-04-30 12:15:26,320 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-04-30 12:15:26,583 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.552s at 2026-04-30T18:15:26.583372+00:00 +2026-04-30 12:15:31,474 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T18:15:31.474416+00:00 +2026-04-30 12:15:31,999 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-04-30 12:15:32,141 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.667s at 2026-04-30T18:15:32.141076+00:00 +2026-04-30 12:15:37,533 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T18:15:37.533421+00:00 +2026-04-30 12:15:38,003 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-04-30 12:15:38,148 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.615s at 2026-04-30T18:15:38.148131+00:00 +2026-04-30 12:15:43,112 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T18:15:43.112106+00:00 +2026-04-30 12:15:43,495 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-04-30 12:15:43,639 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.528s at 2026-04-30T18:15:43.639421+00:00 +2026-04-30 12:15:48,170 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T18:15:48.170441+00:00 +2026-04-30 12:15:48,545 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-04-30 12:15:48,688 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.518s at 2026-04-30T18:15:48.688355+00:00 +2026-04-30 12:21:38,766 INFO backend.segmentation: [UPLOAD_BG] START at 2026-04-30T18:21:38.766212+00:00 +2026-04-30 12:21:38,766 INFO backend.segmentation: [JOB b99cc22c206c4e0380d3b2fe2e24ffc6] preparing_image progress=12 +2026-04-30 12:21:38,838 INFO backend.segmentation: [JOB b99cc22c206c4e0380d3b2fe2e24ffc6] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 +2026-04-30 12:21:38,838 INFO services.gradio_client_service: Calling GPU Gradio Space: https://eduardo4547-hyper-reality-sam2-gpu.hf.space +2026-04-30 12:21:39,938 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" +2026-04-30 12:21:41,143 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-04-30 12:21:41,334 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-04-30 12:21:41,668 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/a637527a-5267-4a6e-acc0-e57a7de5119a "HTTP/1.1 200 OK" +2026-04-30 12:21:41,761 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" +2026-04-30 12:21:42,216 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-04-30 12:21:42,820 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/data?session_hash=a637527a-5267-4a6e-acc0-e57a7de5119a "HTTP/1.1 200 OK" +2026-04-30 12:21:50,974 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/file=/tmp/gradio/d71a861910d02311782c5f826bb80cc1fd74d6f6086844534a04a02edf930180/image.webp "HTTP/1.1 200 OK" +2026-04-30 12:21:51,074 INFO services.gradio_client_service: Gradio Space segmentation: entorno=🛁 Baño / Cocina motor=SegFormer (SegFormer ADE20K+ DINO) + SAM 2.1 mask_count=18 +2026-04-30 12:21:51,074 INFO backend.segmentation: [JOB b99cc22c206c4e0380d3b2fe2e24ffc6] saving_masks progress=92 +2026-04-30 12:21:51,145 INFO backend.segmentation: [JOB b99cc22c206c4e0380d3b2fe2e24ffc6] segments_meta saved (14 segments) +2026-04-30 12:21:51,146 INFO backend.segmentation: [JOB b99cc22c206c4e0380d3b2fe2e24ffc6] done mask_count=18 +2026-04-30 12:21:51,147 INFO backend.segmentation: [UPLOAD_BG] DONE 12.381s at 2026-04-30T18:21:51.147398+00:00 +2026-04-30 12:21:51,147 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-04-30 12:22:28,223 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T18:22:28.223162+00:00 +2026-04-30 12:22:28,488 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-04-30 12:22:28,633 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.410s at 2026-04-30T18:22:28.633219+00:00 +2026-04-30 12:23:38,541 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T18:23:38.541894+00:00 +2026-04-30 12:23:39,059 INFO backend.segmentation: [APPLY_TEXTURE] flat floor tiling (trap=0.28 < 0.35, skip perspective) +2026-04-30 12:23:39,078 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-04-30 12:23:39,224 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.682s at 2026-04-30T18:23:39.224901+00:00 +2026-04-30 12:23:47,739 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T18:23:47.739936+00:00 +2026-04-30 12:23:48,234 INFO backend.segmentation: [APPLY_TEXTURE] flat floor tiling (trap=0.29 < 0.35, skip perspective) +2026-04-30 12:23:48,249 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-04-30 12:23:48,393 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.654s at 2026-04-30T18:23:48.393543+00:00 +2026-04-30 12:35:04,237 INFO backend.segmentation: [UPLOAD_BG] START at 2026-04-30T18:35:04.237929+00:00 +2026-04-30 12:35:04,237 INFO backend.segmentation: [JOB 0e62f0415d394dc8b28fae3fdce6ac1d] preparing_image progress=12 +2026-04-30 12:35:04,252 INFO backend.segmentation: [JOB 0e62f0415d394dc8b28fae3fdce6ac1d] segmenting_with_sam2 progress=30 estimated_seconds=28.89164 +2026-04-30 12:35:04,252 INFO services.gradio_client_service: Calling GPU Gradio Space: https://eduardo4547-hyper-reality-sam2-gpu.hf.space +2026-04-30 12:35:04,919 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" +2026-04-30 12:35:05,542 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-04-30 12:35:05,767 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-04-30 12:35:06,228 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/e02fbff5-268c-40cf-bacf-e1c35bcf4346 "HTTP/1.1 200 OK" +2026-04-30 12:35:06,341 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" +2026-04-30 12:35:06,892 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-04-30 12:35:07,458 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/data?session_hash=e02fbff5-268c-40cf-bacf-e1c35bcf4346 "HTTP/1.1 200 OK" +2026-04-30 12:35:29,382 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/file=/tmp/gradio/75fa9ee4d8e3aa2f3926aa662e35acdfbaa3f94163e61a68527474a5a60675c3/image.webp "HTTP/1.1 200 OK" +2026-04-30 12:35:29,438 INFO services.gradio_client_service: Gradio Space segmentation: entorno=🏙️ Fachada / Exterior motor=Híbrido Arquitectura (Cityscapes Grande + DINO Pequeño) mask_count=12 +2026-04-30 12:35:29,439 INFO backend.segmentation: [JOB 0e62f0415d394dc8b28fae3fdce6ac1d] saving_masks progress=92 +2026-04-30 12:35:29,463 INFO backend.segmentation: [JOB 0e62f0415d394dc8b28fae3fdce6ac1d] segments_meta saved (11 segments) +2026-04-30 12:35:29,463 INFO backend.segmentation: [JOB 0e62f0415d394dc8b28fae3fdce6ac1d] done mask_count=12 +2026-04-30 12:35:29,463 INFO backend.segmentation: [UPLOAD_BG] DONE 25.226s at 2026-04-30T18:35:29.463948+00:00 +2026-04-30 12:35:29,464 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-04-30 15:39:34,392 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=https://eduardo4547-hyper-reality-sam2-gpu.hf.space +2026-04-30 15:39:34,422 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. +2026-04-30 15:40:07,782 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "69f3cc370fe929ed6cff073d"}, "remainingTimeMS": 30} +2026-04-30 15:40:18,856 INFO backend.segmentation: [UPLOAD_BG] START at 2026-04-30T21:40:18.856487+00:00 +2026-04-30 15:40:18,856 INFO backend.segmentation: [JOB 65636043fc364d5bba59fca718f4eb87] preparing_image progress=12 +2026-04-30 15:40:19,134 INFO backend.segmentation: [JOB 65636043fc364d5bba59fca718f4eb87] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 +2026-04-30 15:40:19,134 INFO services.gradio_client_service: Calling GPU Gradio Space: https://eduardo4547-hyper-reality-sam2-gpu.hf.space +2026-04-30 15:40:21,980 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" +2026-04-30 15:40:22,624 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-04-30 15:40:23,391 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-04-30 15:40:23,497 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/314c6a15-7cd5-4d38-88c5-58a08df1fad6 "HTTP/1.1 200 OK" +2026-04-30 15:40:23,607 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" +2026-04-30 15:40:24,238 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-04-30 15:40:24,860 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/data?session_hash=314c6a15-7cd5-4d38-88c5-58a08df1fad6 "HTTP/1.1 200 OK" +2026-04-30 15:40:33,216 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/file=/tmp/gradio/d71a861910d02311782c5f826bb80cc1fd74d6f6086844534a04a02edf930180/image.webp "HTTP/1.1 200 OK" +2026-04-30 15:40:33,324 INFO services.gradio_client_service: Gradio Space segmentation: entorno=🛁 Baño / Cocina motor=SegFormer (SegFormer ADE20K+ DINO) + SAM 2.1 mask_count=18 +2026-04-30 15:40:33,325 INFO backend.segmentation: [JOB 65636043fc364d5bba59fca718f4eb87] saving_masks progress=92 +2026-04-30 15:40:33,428 INFO backend.segmentation: [JOB 65636043fc364d5bba59fca718f4eb87] segments_meta saved (14 segments) +2026-04-30 15:40:33,428 INFO backend.segmentation: [JOB 65636043fc364d5bba59fca718f4eb87] done mask_count=18 +2026-04-30 15:40:33,429 INFO backend.segmentation: [UPLOAD_BG] DONE 14.573s at 2026-04-30T21:40:33.429138+00:00 +2026-04-30 15:40:33,429 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-04-30 15:40:38,479 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T21:40:38.479968+00:00 +2026-04-30 15:40:38,976 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-04-30 15:40:39,252 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.773s at 2026-04-30T21:40:39.252883+00:00 +2026-04-30 16:21:48,502 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-04-30T22:21:48.502651+00:00 +2026-04-30 16:21:49,012 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-04-30 16:21:49,158 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.656s at 2026-04-30T22:21:49.158351+00:00 +2026-05-06 18:02:51,635 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 +2026-05-06 18:02:51,663 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. +2026-05-06 18:03:05,661 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "69fbd6b9d024dc8e891e4555"}, "remainingTimeMS": 30} +2026-05-06 18:03:54,118 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T00:03:54.118398+00:00 +2026-05-06 18:03:54,119 INFO backend.segmentation: [JOB e0df636678f746dc9b2d4a29256ab769] preparing_image progress=12 +2026-05-06 18:03:54,441 INFO backend.segmentation: [JOB e0df636678f746dc9b2d4a29256ab769] segmenting_with_sam2 progress=30 estimated_seconds=63.05024 +2026-05-06 18:03:54,441 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 +2026-05-06 18:03:59,802 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" +2026-05-06 18:04:02,031 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-06 18:04:02,051 WARNING services.gradio_client_service: GPU Space failed (Cannot find a function with `api_name`: /segment.), trying CPU fallback... +2026-05-06 18:04:02,051 INFO services.gradio_client_service: Calling CPU fallback Space: http://localhost:7860 +2026-05-06 18:04:02,487 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-06 18:04:04,382 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" +2026-05-06 18:04:04,396 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/07a1a8b9-03be-4f34-9425-2b264489eb61 "HTTP/1.1 200 OK" +2026-05-06 18:04:06,807 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-06 18:04:06,810 ERROR backend.segmentation: [JOB e0df636678f746dc9b2d4a29256ab769] failed: cannot access local variable 'exc_gpu' where it is not associated with a value +Traceback (most recent call last): + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 89, in segment_via_gradio_sync + return _call_gradio_sync(image_path, GRADIO_CPU_FALLBACK_URL) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 36, in _call_gradio_sync + _overlay_file, combined_json_str = client.predict( + ^^^^^^^^^^^^^^^ + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\.venv\Lib\site-packages\gradio_client\client.py", line 497, in predict + return self.submit( + ^^^^^^^^^^^^ + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\.venv\Lib\site-packages\gradio_client\client.py", line 543, in submit + inferred_fn_index = self._infer_fn_index(api_name, fn_index) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\.venv\Lib\site-packages\gradio_client\client.py", line 881, in _infer_fn_index + raise ValueError(error_message) +ValueError: Cannot find a function with `api_name`: /segment. -2026-05-11 16:27:59,813 ERROR backend.segmentation: [SAM2] ERROR: SAM 2 model file not found. Tried the following paths: -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\sam2.1_hiera_large_fresh.pt -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\sam2.1_hiera_large_fresh.pt -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\models\sam2.1_hiera_large_fresh.pt -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\models\sam2.1_hiera_large_fresh.pt -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\modelo\sam2.1_hiera_large_fresh.pt -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\modelo\sam2.1_hiera_large_fresh.pt -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\sam2.1_hiera_large.pt -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\sam2.1_hiera_large.pt -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\models\sam2.1_hiera_large.pt -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\models\sam2.1_hiera_large.pt -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\modelo\sam2.1_hiera_large.pt -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\modelo\sam2.1_hiera_large.pt -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\sam2.1_hiera_large.pth -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\sam2.1_hiera_large.pth -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\models\sam2.1_hiera_large.pth -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\models\sam2.1_hiera_large.pth -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\modelo\sam2.1_hiera_large.pth -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\modelo\sam2.1_hiera_large.pth -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\sam2_hiera_large.pt -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\sam2_hiera_large.pt -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\models\sam2_hiera_large.pt -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\models\sam2_hiera_large.pt -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\modelo\sam2_hiera_large.pt -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\modelo\sam2_hiera_large.pt -Set SAM2_MODEL_PATH to the checkpoint location. -2026-05-11 16:27:59,813 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\modelo\sam2.1_hiera_large.pt | exists=False -2026-05-11 16:27:59,814 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\models\sam2.1_hiera_large_fresh.pt | exists=False -2026-05-11 16:27:59,814 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\modelo\sam2.1_hiera_large.pt | exists=False -2026-05-11 16:27:59,814 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\sam2.1_hiera_large.pth | exists=False -2026-05-11 16:27:59,814 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\modelo\sam2.1_hiera_large_fresh.pt | exists=False -2026-05-11 16:27:59,814 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\sam2.1_hiera_large.pth | exists=False -2026-05-11 16:27:59,814 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\modelo\sam2.1_hiera_large_fresh.pt | exists=False -2026-05-11 16:27:59,814 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\models\sam2.1_hiera_large.pth | exists=False -2026-05-11 16:27:59,814 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\sam2.1_hiera_large.pt | exists=False -2026-05-11 16:27:59,815 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\models\sam2.1_hiera_large.pth | exists=False -2026-05-11 16:27:59,815 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\sam2.1_hiera_large.pt | exists=False -2026-05-11 16:27:59,815 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\modelo\sam2.1_hiera_large.pth | exists=False -2026-05-11 16:27:59,815 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\models\sam2.1_hiera_large.pt | exists=False -2026-05-11 16:27:59,815 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\modelo\sam2.1_hiera_large.pth | exists=False -2026-05-11 16:27:59,815 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\models\sam2.1_hiera_large.pt | exists=False -2026-05-11 16:27:59,815 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\sam2_hiera_large.pt | exists=False -2026-05-11 16:27:59,815 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\modelo\sam2.1_hiera_large.pt | exists=False -2026-05-11 16:27:59,816 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\sam2_hiera_large.pt | exists=False -2026-05-11 16:27:59,816 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\modelo\sam2.1_hiera_large.pt | exists=False -2026-05-11 16:27:59,816 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\models\sam2_hiera_large.pt | exists=False -2026-05-11 16:27:59,816 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\models\sam2_hiera_large.pt | exists=False -2026-05-11 16:27:59,816 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\sam2.1_hiera_large.pth | exists=False -2026-05-11 16:27:59,816 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\modelo\sam2_hiera_large.pt | exists=False -2026-05-11 16:27:59,816 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\sam2.1_hiera_large.pth | exists=False -2026-05-11 16:27:59,816 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\modelo\sam2_hiera_large.pt | exists=False -2026-05-11 16:27:59,816 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\models\sam2.1_hiera_large.pth | exists=False -2026-05-11 16:27:59,817 ERROR backend.segmentation: [SAM2] ERROR: SAM 2 model file not found. Tried the following paths: -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\sam2.1_hiera_large_fresh.pt -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\sam2.1_hiera_large_fresh.pt -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\models\sam2.1_hiera_large_fresh.pt -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\models\sam2.1_hiera_large_fresh.pt -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\modelo\sam2.1_hiera_large_fresh.pt -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\modelo\sam2.1_hiera_large_fresh.pt -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\sam2.1_hiera_large.pt -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\sam2.1_hiera_large.pt -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\models\sam2.1_hiera_large.pt -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\models\sam2.1_hiera_large.pt -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\modelo\sam2.1_hiera_large.pt -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\modelo\sam2.1_hiera_large.pt -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\sam2.1_hiera_large.pth -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\sam2.1_hiera_large.pth -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\models\sam2.1_hiera_large.pth -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\models\sam2.1_hiera_large.pth -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\modelo\sam2.1_hiera_large.pth -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\modelo\sam2.1_hiera_large.pth -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\sam2_hiera_large.pt -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\sam2_hiera_large.pt -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\models\sam2_hiera_large.pt -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\models\sam2_hiera_large.pt -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\modelo\sam2_hiera_large.pt -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\modelo\sam2_hiera_large.pt -Set SAM2_MODEL_PATH to the checkpoint location. -2026-05-11 16:27:59,817 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\models\sam2.1_hiera_large.pth | exists=False -2026-05-11 16:27:59,817 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\modelo\sam2.1_hiera_large.pth | exists=False -2026-05-11 16:27:59,817 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\modelo\sam2.1_hiera_large.pth | exists=False -2026-05-11 16:27:59,817 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\sam2_hiera_large.pt | exists=False -2026-05-11 16:27:59,818 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\sam2_hiera_large.pt | exists=False -2026-05-11 16:27:59,818 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\models\sam2_hiera_large.pt | exists=False -2026-05-11 16:27:59,818 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\models\sam2_hiera_large.pt | exists=False -2026-05-11 16:27:59,818 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\modelo\sam2_hiera_large.pt | exists=False -2026-05-11 16:27:59,818 INFO backend.segmentation: [SAM2] - C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\modelo\sam2_hiera_large.pt | exists=False -2026-05-11 16:27:59,818 ERROR backend.segmentation: [SAM2] ERROR: SAM 2 model file not found. Tried the following paths: -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\sam2.1_hiera_large_fresh.pt -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\sam2.1_hiera_large_fresh.pt -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\models\sam2.1_hiera_large_fresh.pt -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\models\sam2.1_hiera_large_fresh.pt -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\modelo\sam2.1_hiera_large_fresh.pt -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\modelo\sam2.1_hiera_large_fresh.pt -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\sam2.1_hiera_large.pt -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\sam2.1_hiera_large.pt -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\models\sam2.1_hiera_large.pt -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\models\sam2.1_hiera_large.pt -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\modelo\sam2.1_hiera_large.pt -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\modelo\sam2.1_hiera_large.pt -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\sam2.1_hiera_large.pth -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\sam2.1_hiera_large.pth -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\models\sam2.1_hiera_large.pth -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\models\sam2.1_hiera_large.pth -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\modelo\sam2.1_hiera_large.pth -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\modelo\sam2.1_hiera_large.pth -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\sam2_hiera_large.pt -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\sam2_hiera_large.pt -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\models\sam2_hiera_large.pt -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\models\sam2_hiera_large.pt -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\modelo\sam2_hiera_large.pt -- C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\modelo\sam2_hiera_large.pt -Set SAM2_MODEL_PATH to the checkpoint location. -2026-05-11 16:27:59,917 INFO backend.segmentation: Lifespan exiting; releasing resources. -2026-05-11 16:27:59,917 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-11 16:27:59,932 INFO backend.segmentation: Lifespan exiting; releasing resources. -2026-05-11 16:27:59,933 INFO backend.segmentation: Lifespan exiting; releasing resources. -2026-05-11 16:27:59,933 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-11 16:27:59,933 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-11 16:28:07,147 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 16:28:07,147 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 16:28:07,148 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 16:28:07,164 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 16:28:07,164 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 16:28:07,165 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 16:31:47,348 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 16:31:47,360 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 16:31:48,139 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 16:31:48,153 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 16:32:34,878 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 16:32:34,898 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 16:32:35,134 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 16:32:35,142 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 16:32:35,155 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 16:32:35,160 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 16:33:03,614 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 16:33:03,631 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 16:33:03,838 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 16:33:03,857 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 16:33:03,874 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 16:33:03,890 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 16:33:27,698 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 16:33:27,711 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 16:33:28,467 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 16:33:28,479 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 16:33:35,174 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 16:33:35,185 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 16:35:52,942 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 16:35:52,944 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 16:35:52,951 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 16:35:52,968 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 16:35:52,970 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 16:35:52,974 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 16:36:02,795 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 16:36:02,806 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 16:36:02,822 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 16:36:02,837 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 16:36:02,851 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 16:36:02,902 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 16:36:18,763 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 16:36:18,791 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 16:38:44,845 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 16:38:44,846 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 16:38:44,864 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 16:38:44,865 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 16:38:44,946 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 16:38:44,964 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 16:44:31,497 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 16:44:31,522 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 16:45:00,726 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-11T22:45:00.726193+00:00 -2026-05-11 16:45:00,726 INFO backend.segmentation: [JOB 9df754b89e794ddf81b412c1c417a64b] preparing_image progress=12 -2026-05-11 16:45:00,795 INFO backend.segmentation: [JOB 9df754b89e794ddf81b412c1c417a64b] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 -2026-05-11 16:45:00,795 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 -2026-05-11 16:45:01,032 WARNING services.gradio_client_service: GPU Space failed (Client.__init__() got an unexpected keyword argument 'httpx_kwargs'), trying CPU fallback... -2026-05-11 16:45:01,032 INFO services.gradio_client_service: Calling CPU fallback Space: https://eduardo4547-hyper-reality-sam2-cpu.hf.space -2026-05-11 16:45:01,033 ERROR backend.segmentation: [JOB 9df754b89e794ddf81b412c1c417a64b] failed: Both Gradio Spaces failed. - GPU (http://localhost:7860): Client.__init__() got an unexpected keyword argument 'httpx_kwargs' - CPU (https://eduardo4547-hyper-reality-sam2-cpu.hf.space): Client.__init__() got an unexpected keyword argument 'httpx_kwargs' -Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 91, in segment_via_gradio_sync - return _call_gradio_sync(image_path, GRADIO_CPU_FALLBACK_URL) - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 33, in _call_gradio_sync - client = Client(space_url, httpx_kwargs={"timeout": 300.0}) -TypeError: Client.__init__() got an unexpected keyword argument 'httpx_kwargs' - -The above exception was the direct cause of the following exception: - -Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\image_service.py", line 138, in run_upload_job - label_map, mask_count = segment_via_gradio_sync(image_path) - ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 93, in segment_via_gradio_sync - raise RuntimeError( - ...<3 lines>... - ) from exc_cpu -RuntimeError: Both Gradio Spaces failed. - GPU (http://localhost:7860): Client.__init__() got an unexpected keyword argument 'httpx_kwargs' - CPU (https://eduardo4547-hyper-reality-sam2-cpu.hf.space): Client.__init__() got an unexpected keyword argument 'httpx_kwargs' -2026-05-11 16:45:01,034 INFO backend.segmentation: [UPLOAD_BG] DONE 0.308s at 2026-05-11T22:45:01.034236+00:00 -2026-05-11 16:45:01,034 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-11 16:47:49,523 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-11T22:47:49.523811+00:00 -2026-05-11 16:47:49,524 INFO backend.segmentation: [JOB 0742c2f8d0c2446d8c7d8de8d4412464] preparing_image progress=12 -2026-05-11 16:47:49,543 INFO backend.segmentation: [JOB 0742c2f8d0c2446d8c7d8de8d4412464] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 -2026-05-11 16:47:49,543 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 -2026-05-11 16:47:49,543 WARNING services.gradio_client_service: GPU Space failed (Client.__init__() got an unexpected keyword argument 'httpx_kwargs'), trying CPU fallback... -2026-05-11 16:47:49,543 INFO services.gradio_client_service: Calling CPU fallback Space: https://eduardo4547-hyper-reality-sam2-cpu.hf.space -2026-05-11 16:47:49,544 ERROR backend.segmentation: [JOB 0742c2f8d0c2446d8c7d8de8d4412464] failed: Both Gradio Spaces failed. - GPU (http://localhost:7860): Client.__init__() got an unexpected keyword argument 'httpx_kwargs' - CPU (https://eduardo4547-hyper-reality-sam2-cpu.hf.space): Client.__init__() got an unexpected keyword argument 'httpx_kwargs' -Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 91, in segment_via_gradio_sync - return _call_gradio_sync(image_path, GRADIO_CPU_FALLBACK_URL) - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 33, in _call_gradio_sync - client = Client(space_url, httpx_kwargs={"timeout": 300.0}) -TypeError: Client.__init__() got an unexpected keyword argument 'httpx_kwargs' - -The above exception was the direct cause of the following exception: - -Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\image_service.py", line 138, in run_upload_job - label_map, mask_count = segment_via_gradio_sync(image_path) - ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 93, in segment_via_gradio_sync - raise RuntimeError( - ...<3 lines>... - ) from exc_cpu -RuntimeError: Both Gradio Spaces failed. - GPU (http://localhost:7860): Client.__init__() got an unexpected keyword argument 'httpx_kwargs' - CPU (https://eduardo4547-hyper-reality-sam2-cpu.hf.space): Client.__init__() got an unexpected keyword argument 'httpx_kwargs' -2026-05-11 16:47:49,545 INFO backend.segmentation: [UPLOAD_BG] DONE 0.022s at 2026-05-11T22:47:49.545319+00:00 -2026-05-11 16:47:49,545 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-11 16:47:55,620 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-11T22:47:55.620933+00:00 -2026-05-11 16:47:55,621 INFO backend.segmentation: [JOB 6441970dde1b47ca8bb3e489f5839c19] preparing_image progress=12 -2026-05-11 16:47:55,640 INFO backend.segmentation: [JOB 6441970dde1b47ca8bb3e489f5839c19] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 -2026-05-11 16:47:55,640 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 -2026-05-11 16:47:55,641 WARNING services.gradio_client_service: GPU Space failed (Client.__init__() got an unexpected keyword argument 'httpx_kwargs'), trying CPU fallback... -2026-05-11 16:47:55,641 INFO services.gradio_client_service: Calling CPU fallback Space: https://eduardo4547-hyper-reality-sam2-cpu.hf.space -2026-05-11 16:47:55,641 ERROR backend.segmentation: [JOB 6441970dde1b47ca8bb3e489f5839c19] failed: Both Gradio Spaces failed. - GPU (http://localhost:7860): Client.__init__() got an unexpected keyword argument 'httpx_kwargs' - CPU (https://eduardo4547-hyper-reality-sam2-cpu.hf.space): Client.__init__() got an unexpected keyword argument 'httpx_kwargs' -Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 91, in segment_via_gradio_sync - return _call_gradio_sync(image_path, GRADIO_CPU_FALLBACK_URL) - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 33, in _call_gradio_sync - client = Client(space_url, httpx_kwargs={"timeout": 300.0}) -TypeError: Client.__init__() got an unexpected keyword argument 'httpx_kwargs' - -The above exception was the direct cause of the following exception: - -Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\image_service.py", line 138, in run_upload_job - label_map, mask_count = segment_via_gradio_sync(image_path) - ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 93, in segment_via_gradio_sync - raise RuntimeError( - ...<3 lines>... - ) from exc_cpu -RuntimeError: Both Gradio Spaces failed. - GPU (http://localhost:7860): Client.__init__() got an unexpected keyword argument 'httpx_kwargs' - CPU (https://eduardo4547-hyper-reality-sam2-cpu.hf.space): Client.__init__() got an unexpected keyword argument 'httpx_kwargs' -2026-05-11 16:47:55,643 INFO backend.segmentation: [UPLOAD_BG] DONE 0.022s at 2026-05-11T22:47:55.643392+00:00 -2026-05-11 16:47:55,643 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-11 16:48:04,986 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 16:48:05,017 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 16:48:20,560 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-11T22:48:20.560278+00:00 -2026-05-11 16:48:20,560 INFO backend.segmentation: [JOB 926e56e3fb754b469dea9cbaf622e6d8] preparing_image progress=12 -2026-05-11 16:48:20,581 INFO backend.segmentation: [JOB 926e56e3fb754b469dea9cbaf622e6d8] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 -2026-05-11 16:48:20,581 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 -2026-05-11 16:48:20,581 WARNING services.gradio_client_service: GPU Space failed (Client.__init__() got an unexpected keyword argument 'httpx_kwargs'), trying CPU fallback... -2026-05-11 16:48:20,581 INFO services.gradio_client_service: Calling CPU fallback Space: https://eduardo4547-hyper-reality-sam2-cpu.hf.space -2026-05-11 16:48:20,582 ERROR backend.segmentation: [JOB 926e56e3fb754b469dea9cbaf622e6d8] failed: Both Gradio Spaces failed. - GPU (http://localhost:7860): Client.__init__() got an unexpected keyword argument 'httpx_kwargs' - CPU (https://eduardo4547-hyper-reality-sam2-cpu.hf.space): Client.__init__() got an unexpected keyword argument 'httpx_kwargs' -Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 91, in segment_via_gradio_sync - return _call_gradio_sync(image_path, GRADIO_CPU_FALLBACK_URL) - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 33, in _call_gradio_sync - client = Client(space_url, httpx_kwargs={"timeout": 300.0}) -TypeError: Client.__init__() got an unexpected keyword argument 'httpx_kwargs' - -The above exception was the direct cause of the following exception: - -Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\image_service.py", line 138, in run_upload_job - label_map, mask_count = segment_via_gradio_sync(image_path) - ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 93, in segment_via_gradio_sync - raise RuntimeError( - ...<3 lines>... - ) from exc_cpu -RuntimeError: Both Gradio Spaces failed. - GPU (http://localhost:7860): Client.__init__() got an unexpected keyword argument 'httpx_kwargs' - CPU (https://eduardo4547-hyper-reality-sam2-cpu.hf.space): Client.__init__() got an unexpected keyword argument 'httpx_kwargs' -2026-05-11 16:48:20,583 INFO backend.segmentation: [UPLOAD_BG] DONE 0.023s at 2026-05-11T22:48:20.583708+00:00 -2026-05-11 16:48:20,583 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-11 16:58:04,997 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 16:58:05,016 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 16:58:05,950 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 16:58:05,971 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 17:00:40,362 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-11T23:00:40.362157+00:00 -2026-05-11 17:00:40,362 INFO backend.segmentation: [JOB e08dc302227b460db3db112597ff63e2] preparing_image progress=12 -2026-05-11 17:00:40,388 INFO backend.segmentation: [JOB e08dc302227b460db3db112597ff63e2] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 -2026-05-11 17:00:40,389 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 -2026-05-11 17:00:40,389 WARNING services.gradio_client_service: GPU Space failed (Client.__init__() got an unexpected keyword argument 'httpx_kwargs'), trying CPU fallback... -2026-05-11 17:00:40,389 INFO services.gradio_client_service: Calling CPU fallback Space: https://eduardo4547-hyper-reality-sam2-cpu.hf.space -2026-05-11 17:00:40,389 ERROR backend.segmentation: [JOB e08dc302227b460db3db112597ff63e2] failed: Both Gradio Spaces failed. - GPU (http://localhost:7860): Client.__init__() got an unexpected keyword argument 'httpx_kwargs' - CPU (https://eduardo4547-hyper-reality-sam2-cpu.hf.space): Client.__init__() got an unexpected keyword argument 'httpx_kwargs' -Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 91, in segment_via_gradio_sync - return _call_gradio_sync(image_path, GRADIO_CPU_FALLBACK_URL) - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 33, in _call_gradio_sync - client = Client(space_url, httpx_kwargs={"timeout": 300.0}) -TypeError: Client.__init__() got an unexpected keyword argument 'httpx_kwargs' - -The above exception was the direct cause of the following exception: - -Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\image_service.py", line 138, in run_upload_job - # We are simplifying the flow: skipping SAM 2 segmentation. - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 93, in segment_via_gradio_sync - raise RuntimeError( - ...<3 lines>... - ) from exc_cpu -RuntimeError: Both Gradio Spaces failed. - GPU (http://localhost:7860): Client.__init__() got an unexpected keyword argument 'httpx_kwargs' - CPU (https://eduardo4547-hyper-reality-sam2-cpu.hf.space): Client.__init__() got an unexpected keyword argument 'httpx_kwargs' -2026-05-11 17:00:40,393 INFO backend.segmentation: [UPLOAD_BG] DONE 0.031s at 2026-05-11T23:00:40.393043+00:00 -2026-05-11 17:00:40,393 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-11 17:01:51,772 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 17:01:51,792 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. -2026-05-11 17:01:52,577 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-11T23:01:52.577203+00:00 -2026-05-11 17:01:52,577 INFO backend.segmentation: [JOB b248488a436441c1af4769102b3e76a0] preparing_image progress=12 -2026-05-11 17:01:52,605 INFO backend.segmentation: [JOB b248488a436441c1af4769102b3e76a0] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 -2026-05-11 17:01:52,605 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 -2026-05-11 17:01:52,606 WARNING services.gradio_client_service: GPU Space failed (Client.__init__() got an unexpected keyword argument 'httpx_kwargs'), trying CPU fallback... -2026-05-11 17:01:52,606 INFO services.gradio_client_service: Calling CPU fallback Space: https://eduardo4547-hyper-reality-sam2-cpu.hf.space -2026-05-11 17:01:52,606 ERROR backend.segmentation: [JOB b248488a436441c1af4769102b3e76a0] failed: Both Gradio Spaces failed. - GPU (http://localhost:7860): Client.__init__() got an unexpected keyword argument 'httpx_kwargs' - CPU (https://eduardo4547-hyper-reality-sam2-cpu.hf.space): Client.__init__() got an unexpected keyword argument 'httpx_kwargs' -Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 91, in segment_via_gradio_sync - return _call_gradio_sync(image_path, GRADIO_CPU_FALLBACK_URL) - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 33, in _call_gradio_sync - client = Client(space_url, httpx_kwargs={"timeout": 300.0}) -TypeError: Client.__init__() got an unexpected keyword argument 'httpx_kwargs' - -The above exception was the direct cause of the following exception: - -Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\image_service.py", line 138, in run_upload_job - # We are simplifying the flow: skipping SAM 2 segmentation. - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 93, in segment_via_gradio_sync - raise RuntimeError( - ...<3 lines>... - ) from exc_cpu -RuntimeError: Both Gradio Spaces failed. - GPU (http://localhost:7860): Client.__init__() got an unexpected keyword argument 'httpx_kwargs' - CPU (https://eduardo4547-hyper-reality-sam2-cpu.hf.space): Client.__init__() got an unexpected keyword argument 'httpx_kwargs' -2026-05-11 17:01:52,608 INFO backend.segmentation: [UPLOAD_BG] DONE 0.032s at 2026-05-11T23:01:52.608875+00:00 -2026-05-11 17:01:52,609 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-11 17:05:12,352 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 17:05:12,378 INFO backend.segmentation: [SAM2] SAM2 disabled (using Simplified OpenAI flow) -2026-05-11 17:05:12,379 WARNING backend.segmentation: Lifespan startup cancelled. Releasing resources. -2026-05-11 17:05:12,380 INFO backend.segmentation: Releasing resources (full_unload=True) -2026-05-11 17:05:12,418 INFO backend.segmentation: Lifespan exiting; releasing resources. -2026-05-11 17:05:12,419 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-11 17:05:15,614 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 17:05:15,643 INFO backend.segmentation: [SAM2] SAM2 disabled (using Simplified OpenAI flow) -2026-05-11 17:05:22,954 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-11T23:05:22.954684+00:00 -2026-05-11 17:05:22,955 INFO backend.segmentation: [JOB 8c340c544ab84952bec7959289cecf9c] preparing_image progress=12 -2026-05-11 17:05:22,976 INFO backend.segmentation: [JOB 8c340c544ab84952bec7959289cecf9c] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 -2026-05-11 17:05:22,976 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 -2026-05-11 17:05:22,976 WARNING services.gradio_client_service: GPU Space failed (Client.__init__() got an unexpected keyword argument 'httpx_kwargs'), trying CPU fallback... -2026-05-11 17:05:22,977 INFO services.gradio_client_service: Calling CPU fallback Space: https://eduardo4547-hyper-reality-sam2-cpu.hf.space -2026-05-11 17:05:22,977 ERROR backend.segmentation: [JOB 8c340c544ab84952bec7959289cecf9c] failed: Both Gradio Spaces failed. - GPU (http://localhost:7860): Client.__init__() got an unexpected keyword argument 'httpx_kwargs' - CPU (https://eduardo4547-hyper-reality-sam2-cpu.hf.space): Client.__init__() got an unexpected keyword argument 'httpx_kwargs' -Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 91, in segment_via_gradio_sync - raise RuntimeError(f"GPU Gradio Space failed and no CPU fallback configured. Error: {gpu_error}") - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 33, in _call_gradio_sync -TypeError: Client.__init__() got an unexpected keyword argument 'httpx_kwargs' - -The above exception was the direct cause of the following exception: - -Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\image_service.py", line 138, in run_upload_job - # We are simplifying the flow: skipping SAM 2 segmentation. - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 93, in segment_via_gradio_sync - try: - - ...<3 lines>... - raise RuntimeError( - ^^^^^^^^^^^^^^ -RuntimeError: Both Gradio Spaces failed. - GPU (http://localhost:7860): Client.__init__() got an unexpected keyword argument 'httpx_kwargs' - CPU (https://eduardo4547-hyper-reality-sam2-cpu.hf.space): Client.__init__() got an unexpected keyword argument 'httpx_kwargs' -2026-05-11 17:05:22,979 INFO backend.segmentation: [UPLOAD_BG] DONE 0.025s at 2026-05-11T23:05:22.979381+00:00 -2026-05-11 17:05:22,979 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-11 17:07:10,779 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-11T23:07:10.779085+00:00 -2026-05-11 17:07:10,779 INFO backend.segmentation: [JOB 293b338a28b84ed4b5950719a8beecff] preparing_image progress=12 -2026-05-11 17:07:10,800 INFO backend.segmentation: [JOB 293b338a28b84ed4b5950719a8beecff] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 -2026-05-11 17:07:10,800 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 -2026-05-11 17:07:10,800 WARNING services.gradio_client_service: GPU Space failed (Client.__init__() got an unexpected keyword argument 'httpx_kwargs'), trying CPU fallback... -2026-05-11 17:07:10,800 INFO services.gradio_client_service: Calling CPU fallback Space: https://eduardo4547-hyper-reality-sam2-cpu.hf.space -2026-05-11 17:07:10,800 ERROR backend.segmentation: [JOB 293b338a28b84ed4b5950719a8beecff] failed: Both Gradio Spaces failed. - GPU (http://localhost:7860): Client.__init__() got an unexpected keyword argument 'httpx_kwargs' - CPU (https://eduardo4547-hyper-reality-sam2-cpu.hf.space): Client.__init__() got an unexpected keyword argument 'httpx_kwargs' -Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 91, in segment_via_gradio_sync - raise RuntimeError(f"GPU Gradio Space failed and no CPU fallback configured. Error: {gpu_error}") - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 33, in _call_gradio_sync -TypeError: Client.__init__() got an unexpected keyword argument 'httpx_kwargs' - -The above exception was the direct cause of the following exception: - -Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\image_service.py", line 138, in run_upload_job - # We are simplifying the flow: skipping SAM 2 segmentation. - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 93, in segment_via_gradio_sync - try: - - ...<3 lines>... - raise RuntimeError( - ^^^^^^^^^^^^^^ -RuntimeError: Both Gradio Spaces failed. - GPU (http://localhost:7860): Client.__init__() got an unexpected keyword argument 'httpx_kwargs' - CPU (https://eduardo4547-hyper-reality-sam2-cpu.hf.space): Client.__init__() got an unexpected keyword argument 'httpx_kwargs' -2026-05-11 17:07:10,802 INFO backend.segmentation: [UPLOAD_BG] DONE 0.023s at 2026-05-11T23:07:10.802362+00:00 -2026-05-11 17:07:10,802 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-11 17:07:52,210 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-11T23:07:52.210727+00:00 -2026-05-11 17:07:52,211 INFO backend.segmentation: [JOB a5fedf0501a94001b42fc9a71c7b75ca] preparing_image progress=12 -2026-05-11 17:07:52,230 INFO backend.segmentation: [JOB a5fedf0501a94001b42fc9a71c7b75ca] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 -2026-05-11 17:07:52,231 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 -2026-05-11 17:07:52,231 WARNING services.gradio_client_service: GPU Space failed (Client.__init__() got an unexpected keyword argument 'httpx_kwargs'), trying CPU fallback... -2026-05-11 17:07:52,231 INFO services.gradio_client_service: Calling CPU fallback Space: https://eduardo4547-hyper-reality-sam2-cpu.hf.space -2026-05-11 17:07:52,231 ERROR backend.segmentation: [JOB a5fedf0501a94001b42fc9a71c7b75ca] failed: Both Gradio Spaces failed. - GPU (http://localhost:7860): Client.__init__() got an unexpected keyword argument 'httpx_kwargs' - CPU (https://eduardo4547-hyper-reality-sam2-cpu.hf.space): Client.__init__() got an unexpected keyword argument 'httpx_kwargs' -Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 91, in segment_via_gradio_sync - raise RuntimeError(f"GPU Gradio Space failed and no CPU fallback configured. Error: {gpu_error}") - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 33, in _call_gradio_sync -TypeError: Client.__init__() got an unexpected keyword argument 'httpx_kwargs' - -The above exception was the direct cause of the following exception: - -Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\image_service.py", line 138, in run_upload_job - # We are simplifying the flow: skipping SAM 2 segmentation. - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 93, in segment_via_gradio_sync - try: - - ...<3 lines>... - raise RuntimeError( - ^^^^^^^^^^^^^^ -RuntimeError: Both Gradio Spaces failed. - GPU (http://localhost:7860): Client.__init__() got an unexpected keyword argument 'httpx_kwargs' - CPU (https://eduardo4547-hyper-reality-sam2-cpu.hf.space): Client.__init__() got an unexpected keyword argument 'httpx_kwargs' -2026-05-11 17:07:52,233 INFO backend.segmentation: [UPLOAD_BG] DONE 0.023s at 2026-05-11T23:07:52.233475+00:00 -2026-05-11 17:07:52,233 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-11 17:09:10,111 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-11T23:09:10.111062+00:00 -2026-05-11 17:09:10,111 INFO backend.segmentation: [JOB 0a7f381bf0964d229708409bc0c5bd3b] preparing_image progress=12 -2026-05-11 17:09:10,128 INFO backend.segmentation: [JOB 0a7f381bf0964d229708409bc0c5bd3b] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 -2026-05-11 17:09:10,129 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 -2026-05-11 17:09:10,129 WARNING services.gradio_client_service: GPU Space failed (Client.__init__() got an unexpected keyword argument 'httpx_kwargs'), trying CPU fallback... -2026-05-11 17:09:10,129 INFO services.gradio_client_service: Calling CPU fallback Space: https://eduardo4547-hyper-reality-sam2-cpu.hf.space -2026-05-11 17:09:10,129 ERROR backend.segmentation: [JOB 0a7f381bf0964d229708409bc0c5bd3b] failed: Both Gradio Spaces failed. - GPU (http://localhost:7860): Client.__init__() got an unexpected keyword argument 'httpx_kwargs' - CPU (https://eduardo4547-hyper-reality-sam2-cpu.hf.space): Client.__init__() got an unexpected keyword argument 'httpx_kwargs' -Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 91, in segment_via_gradio_sync - raise RuntimeError(f"GPU Gradio Space failed and no CPU fallback configured. Error: {gpu_error}") - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 33, in _call_gradio_sync -TypeError: Client.__init__() got an unexpected keyword argument 'httpx_kwargs' - -The above exception was the direct cause of the following exception: - -Traceback (most recent call last): - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\image_service.py", line 138, in run_upload_job - # We are simplifying the flow: skipping SAM 2 segmentation. - File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 93, in segment_via_gradio_sync - try: - - ...<3 lines>... - raise RuntimeError( - ^^^^^^^^^^^^^^ -RuntimeError: Both Gradio Spaces failed. - GPU (http://localhost:7860): Client.__init__() got an unexpected keyword argument 'httpx_kwargs' - CPU (https://eduardo4547-hyper-reality-sam2-cpu.hf.space): Client.__init__() got an unexpected keyword argument 'httpx_kwargs' -2026-05-11 17:09:10,130 INFO backend.segmentation: [UPLOAD_BG] DONE 0.019s at 2026-05-11T23:09:10.130195+00:00 -2026-05-11 17:09:10,130 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-11 17:10:41,947 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 17:10:41,965 INFO backend.segmentation: [SAM2] SAM2 disabled (using Simplified OpenAI flow) -2026-05-11 17:10:44,865 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a0261f4b9a9473ac9483d03"}, "remainingTimeMS": 30} -2026-05-11 17:10:53,790 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-11T23:10:53.790345+00:00 -2026-05-11 17:10:53,790 INFO backend.segmentation: [JOB e7931cb747a044c0b5798ba3fd043246] preparing_image progress=12 -2026-05-11 17:10:53,918 INFO backend.segmentation: [JOB e7931cb747a044c0b5798ba3fd043246] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 -2026-05-11 17:10:53,919 INFO backend.segmentation: [JOB e7931cb747a044c0b5798ba3fd043246] done (simplified, 0 masks) -2026-05-11 17:10:53,919 INFO backend.segmentation: [UPLOAD_BG] DONE 0.129s at 2026-05-11T23:10:53.919102+00:00 -2026-05-11 17:10:53,919 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-11 17:10:56,143 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a026200b9a9473ac9483d04"}, "remainingTimeMS": 30} -2026-05-11 17:10:58,808 INFO backend.segmentation: [APPLY_TEXTURE_AI] START at 2026-05-11T23:10:58.808470+00:00 -2026-05-11 17:10:58,809 INFO backend.segmentation: [APPLY_TEXTURE_AI] DONE 0.001s at 2026-05-11T23:10:58.809468+00:00 -2026-05-11 17:10:58,809 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-11 17:10:59,967 INFO backend.segmentation: [APPLY_TEXTURE_AI] START at 2026-05-11T23:10:59.967490+00:00 -2026-05-11 17:10:59,967 INFO backend.segmentation: [APPLY_TEXTURE_AI] DONE 0.001s at 2026-05-11T23:10:59.967490+00:00 -2026-05-11 17:10:59,968 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-11 17:11:13,886 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-11T23:11:13.886474+00:00 -2026-05-11 17:11:13,887 INFO backend.segmentation: [JOB 650975a38c7749568b7341423ad4d7d9] preparing_image progress=12 -2026-05-11 17:11:13,906 INFO backend.segmentation: [JOB 650975a38c7749568b7341423ad4d7d9] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 -2026-05-11 17:11:13,907 INFO backend.segmentation: [JOB 650975a38c7749568b7341423ad4d7d9] done (simplified, 0 masks) -2026-05-11 17:11:13,907 INFO backend.segmentation: [UPLOAD_BG] DONE 0.021s at 2026-05-11T23:11:13.907778+00:00 -2026-05-11 17:11:13,907 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-11 17:11:28,374 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-11T23:11:28.374195+00:00 -2026-05-11 17:11:28,374 INFO backend.segmentation: [JOB 3f1f91ed35624099bffaf23f5c5badc3] preparing_image progress=12 -2026-05-11 17:11:28,400 INFO backend.segmentation: [JOB 3f1f91ed35624099bffaf23f5c5badc3] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 -2026-05-11 17:11:28,401 INFO backend.segmentation: [JOB 3f1f91ed35624099bffaf23f5c5badc3] done (simplified, 0 masks) -2026-05-11 17:11:28,401 INFO backend.segmentation: [UPLOAD_BG] DONE 0.027s at 2026-05-11T23:11:28.401201+00:00 -2026-05-11 17:11:28,401 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-11 17:19:23,122 INFO backend.segmentation: Lifespan exiting; releasing resources. -2026-05-11 17:19:23,122 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-11 17:19:25,153 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 17:19:25,157 INFO backend.segmentation: [SAM2] SAM2 disabled (using Simplified OpenAI flow) -2026-05-11 17:19:25,157 WARNING backend.segmentation: Lifespan startup cancelled. Releasing resources. -2026-05-11 17:19:25,157 INFO backend.segmentation: Releasing resources (full_unload=True) -2026-05-11 17:19:25,192 INFO backend.segmentation: Lifespan exiting; releasing resources. -2026-05-11 17:19:25,193 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-11 17:19:26,642 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 17:19:26,646 INFO backend.segmentation: [SAM2] SAM2 disabled (using Simplified OpenAI flow) -2026-05-11 17:19:57,031 INFO backend.segmentation: Lifespan exiting; releasing resources. -2026-05-11 17:19:57,031 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-11 17:19:58,900 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 17:19:58,903 INFO backend.segmentation: [SAM2] SAM2 disabled (using Simplified OpenAI flow) -2026-05-11 17:19:58,904 WARNING backend.segmentation: Lifespan startup cancelled. Releasing resources. -2026-05-11 17:19:58,904 INFO backend.segmentation: Releasing resources (full_unload=True) -2026-05-11 17:19:58,935 INFO backend.segmentation: Lifespan exiting; releasing resources. -2026-05-11 17:19:58,935 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-11 17:20:00,569 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 17:20:00,574 INFO backend.segmentation: [SAM2] SAM2 disabled (using Simplified OpenAI flow) -2026-05-11 17:23:04,040 INFO backend.segmentation: Lifespan exiting; releasing resources. -2026-05-11 17:23:04,040 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-11 17:23:05,765 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 17:23:05,778 INFO backend.segmentation: [SAM2] SAM2 disabled (using Simplified OpenAI flow) -2026-05-11 17:23:05,778 WARNING backend.segmentation: Lifespan startup cancelled. Releasing resources. -2026-05-11 17:23:05,778 INFO backend.segmentation: Releasing resources (full_unload=True) -2026-05-11 17:23:05,805 INFO backend.segmentation: Lifespan exiting; releasing resources. -2026-05-11 17:23:05,805 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-11 17:23:07,223 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 17:23:07,237 INFO backend.segmentation: [SAM2] SAM2 disabled (using Simplified OpenAI flow) -2026-05-11 17:23:38,986 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a0264fa2cee8192599ed7d0"}, "remainingTimeMS": 30} -2026-05-11 17:23:42,830 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-11T23:23:42.830320+00:00 -2026-05-11 17:23:42,831 INFO backend.segmentation: [JOB f67851b861634797a6d951fb8eb77d1c] preparing_image progress=12 -2026-05-11 17:23:42,987 INFO backend.segmentation: [JOB f67851b861634797a6d951fb8eb77d1c] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 -2026-05-11 17:23:42,988 INFO backend.segmentation: [JOB f67851b861634797a6d951fb8eb77d1c] done (simplified, 0 masks) -2026-05-11 17:23:42,989 INFO backend.segmentation: [UPLOAD_BG] DONE 0.158s at 2026-05-11T23:23:42.989362+00:00 -2026-05-11 17:23:42,989 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-11 17:23:50,263 INFO backend.segmentation: Lifespan exiting; releasing resources. -2026-05-11 17:23:50,263 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-11 17:23:52,250 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 17:23:52,264 INFO backend.segmentation: [SAM2] SAM2 disabled (using Simplified OpenAI flow) -2026-05-11 17:23:52,452 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a02650807bfc227790002e0"}, "remainingTimeMS": 30} -2026-05-11 17:35:48,564 INFO backend.segmentation: Lifespan exiting; releasing resources. -2026-05-11 17:35:48,564 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-11 17:35:51,035 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 17:35:51,056 INFO backend.segmentation: [SAM2] SAM2 disabled (using Simplified OpenAI flow) -2026-05-11 17:35:51,056 WARNING backend.segmentation: Lifespan startup cancelled. Releasing resources. -2026-05-11 17:35:51,056 INFO backend.segmentation: Releasing resources (full_unload=True) -2026-05-11 17:35:51,100 INFO backend.segmentation: Lifespan exiting; releasing resources. -2026-05-11 17:35:51,100 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-11 17:35:52,795 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 -2026-05-11 17:35:52,809 INFO backend.segmentation: [SAM2] SAM2 disabled (using Simplified OpenAI flow) -2026-05-11 17:39:57,426 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a0268cd69c7f8481e63f142"}, "remainingTimeMS": 30} -2026-05-11 17:40:06,587 INFO backend.segmentation: [APPLY_TEXTURE_AI] START at 2026-05-11T23:40:06.587125+00:00 -2026-05-11 17:40:06,587 INFO backend.segmentation: [APPLY_TEXTURE_AI] DONE 0.000s at 2026-05-11T23:40:06.587125+00:00 -2026-05-11 17:40:06,587 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-11 17:42:20,430 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a02695c8c7c9cbbe3d73a93"}, "remainingTimeMS": 30} -2026-05-11 17:42:23,168 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a02695fd14dfcab99b31bb0"}, "remainingTimeMS": 30} -2026-05-11 17:42:24,195 INFO backend.segmentation: [APPLY_TEXTURE_AI] START at 2026-05-11T23:42:24.195000+00:00 -2026-05-11 17:42:24,207 INFO backend.segmentation: [APPLY_TEXTURE_AI] DONE 0.012s at 2026-05-11T23:42:24.207474+00:00 -2026-05-11 17:42:24,208 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-11 17:42:49,195 INFO backend.segmentation: [APPLY_TEXTURE_AI] START at 2026-05-11T23:42:49.195264+00:00 -2026-05-11 17:42:49,202 INFO backend.segmentation: [APPLY_TEXTURE_AI] DONE 0.007s at 2026-05-11T23:42:49.202264+00:00 -2026-05-11 17:42:49,202 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-11 17:42:50,897 INFO backend.segmentation: [APPLY_TEXTURE_AI] START at 2026-05-11T23:42:50.897139+00:00 -2026-05-11 17:42:50,905 INFO backend.segmentation: [APPLY_TEXTURE_AI] DONE 0.008s at 2026-05-11T23:42:50.905145+00:00 -2026-05-11 17:42:50,905 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-11 17:42:54,729 INFO backend.segmentation: [APPLY_TEXTURE_AI] START at 2026-05-11T23:42:54.729010+00:00 -2026-05-11 17:42:54,737 INFO backend.segmentation: [APPLY_TEXTURE_AI] DONE 0.008s at 2026-05-11T23:42:54.737010+00:00 -2026-05-11 17:42:54,737 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-11 17:44:02,023 INFO backend.segmentation: [APPLY_TEXTURE_AI] START at 2026-05-11T23:44:02.023505+00:00 -2026-05-11 17:44:02,031 INFO backend.segmentation: [APPLY_TEXTURE_AI] DONE 0.007s at 2026-05-11T23:44:02.031502+00:00 -2026-05-11 17:44:02,031 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-11 17:44:06,912 INFO backend.segmentation: [APPLY_TEXTURE_AI] START at 2026-05-11T23:44:06.912421+00:00 -2026-05-11 17:44:06,919 INFO backend.segmentation: [APPLY_TEXTURE_AI] DONE 0.007s at 2026-05-11T23:44:06.919421+00:00 -2026-05-11 17:44:06,919 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-11 17:44:08,458 INFO backend.segmentation: [APPLY_TEXTURE_AI] START at 2026-05-11T23:44:08.458048+00:00 -2026-05-11 17:44:08,465 INFO backend.segmentation: [APPLY_TEXTURE_AI] DONE 0.007s at 2026-05-11T23:44:08.465047+00:00 -2026-05-11 17:44:08,466 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-11 17:44:15,785 INFO backend.segmentation: [APPLY_TEXTURE_AI] START at 2026-05-11T23:44:15.785067+00:00 -2026-05-11 17:44:15,792 INFO backend.segmentation: [APPLY_TEXTURE_AI] DONE 0.008s at 2026-05-11T23:44:15.792067+00:00 -2026-05-11 17:44:15,793 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-11 17:44:45,666 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a0269eda4c4e67897e4de91"}, "remainingTimeMS": 30} -2026-05-11 17:44:50,557 INFO backend.segmentation: [APPLY_TEXTURE_AI] START at 2026-05-11T23:44:50.557167+00:00 -2026-05-11 17:44:50,565 INFO backend.segmentation: [APPLY_TEXTURE_AI] DONE 0.007s at 2026-05-11T23:44:50.565142+00:00 -2026-05-11 17:44:50,565 INFO backend.segmentation: Releasing resources (full_unload=False) -2026-05-11 17:44:52,481 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a0269f4a4c4e67897e4de92"}, "remainingTimeMS": 30} -2026-05-11 17:44:52,482 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a0269f4a4c4e67897e4de92"}, "remainingTimeMS": 30} -2026-05-11 17:46:59,700 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a026a73d56a3146484b59dd"}, "remainingTimeMS": 30} -2026-05-11 17:47:05,233 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a026a79d56a3146484b59de"}, "remainingTimeMS": 30} -2026-05-11 17:47:05,234 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a026a79d56a3146484b59de"}, "remainingTimeMS": 30} -2026-05-11 17:47:30,427 INFO httpx: HTTP Request: POST https://api.openai.com/v1/images/edits "HTTP/1.1 200 OK" -2026-05-11 17:47:56,420 INFO httpx: HTTP Request: POST https://api.openai.com/v1/images/edits "HTTP/1.1 200 OK" -2026-05-11 17:50:02,713 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a026b2ac773958e310a1326"}, "remainingTimeMS": 30} -2026-05-11 17:50:04,167 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a026b2cc773958e310a1327"}, "remainingTimeMS": 30} -2026-05-11 17:50:04,207 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a026b2cc773958e310a1327"}, "remainingTimeMS": 30} -2026-05-11 17:50:34,550 INFO httpx: HTTP Request: POST https://api.openai.com/v1/images/edits "HTTP/1.1 200 OK" -2026-05-11 17:51:14,601 INFO httpx: HTTP Request: POST https://api.openai.com/v1/images/edits "HTTP/1.1 200 OK" -2026-05-11 17:57:39,513 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a026cf3162482e62cf7ea3e"}, "remainingTimeMS": 30} -2026-05-11 17:57:42,313 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a026cf6472643c8c1e786d8"}, "remainingTimeMS": 30} -2026-05-11 17:58:01,618 INFO httpx: HTTP Request: POST https://api.openai.com/v1/images/edits "HTTP/1.1 200 OK" -2026-05-11 17:58:27,575 INFO httpx: HTTP Request: POST https://api.openai.com/v1/images/edits "HTTP/1.1 200 OK" -2026-05-11 17:59:21,451 INFO httpx: HTTP Request: POST https://api.openai.com/v1/images/edits "HTTP/1.1 200 OK" -2026-05-11 17:59:29,572 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a026d61676e4e120285cb22"}, "remainingTimeMS": 30} -2026-05-11 17:59:32,127 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a026d649325671c76e0d3cc"}, "remainingTimeMS": 30} -2026-05-11 18:00:00,476 INFO httpx: HTTP Request: POST https://api.openai.com/v1/images/edits "HTTP/1.1 200 OK" -2026-05-11 18:00:20,146 INFO httpx: HTTP Request: POST https://api.openai.com/v1/images/edits "HTTP/1.1 200 OK" -2026-05-11 18:00:36,292 INFO httpx: HTTP Request: POST https://api.openai.com/v1/images/edits "HTTP/1.1 200 OK" -2026-05-11 18:13:24,578 INFO httpx: HTTP Request: POST https://api.openai.com/v1/images/edits "HTTP/1.1 200 OK" -2026-05-11 18:22:57,043 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a0272e19325671c76e0d3cd"}, "remainingTimeMS": 30} -2026-05-11 18:22:57,044 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a0272e19325671c76e0d3cd"}, "remainingTimeMS": 30} -2026-05-11 18:23:24,738 INFO httpx: HTTP Request: POST https://api.openai.com/v1/images/edits "HTTP/1.1 200 OK" -2026-05-11 18:43:21,019 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a0277a9666e7bcf74e6e618"}, "remainingTimeMS": 30} -2026-05-11 18:47:06,723 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a02788a666e7bcf74e6e619"}, "remainingTimeMS": 30} -2026-05-11 18:47:06,724 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a02788a666e7bcf74e6e619"}, "remainingTimeMS": 30} -2026-05-11 18:47:14,864 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a0278924b3f5d3d0d27e63c"}, "remainingTimeMS": 30} -2026-05-11 18:47:17,556 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a0278954a12dd2c11934073"}, "remainingTimeMS": 30} -2026-05-11 18:47:40,240 INFO httpx: HTTP Request: POST https://api.openai.com/v1/images/edits "HTTP/1.1 200 OK" -2026-05-11 18:47:53,426 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a0278b94a12dd2c11934074"}, "remainingTimeMS": 30} -2026-05-11 18:47:53,426 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a0278b94a12dd2c11934074"}, "remainingTimeMS": 30} -2026-05-11 19:06:05,368 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a027cfda87b46fdcade70c0"}, "remainingTimeMS": 30} -2026-05-11 19:06:12,738 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a027d04a87b46fdcade70c1"}, "remainingTimeMS": 30} -2026-05-11 19:06:12,739 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a027d04a87b46fdcade70c1"}, "remainingTimeMS": 30} -2026-05-11 19:08:06,520 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a027d761ac5024147e14ddd"}, "remainingTimeMS": 30} -2026-05-11 19:08:47,155 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a027d9f1ac5024147e14dde"}, "remainingTimeMS": 30} -2026-05-11 19:08:47,218 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a027d9f1ac5024147e14dde"}, "remainingTimeMS": 30} -2026-05-11 19:09:25,574 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a027dc593faabe7b94d01db"}, "remainingTimeMS": 30} -2026-05-11 19:09:28,759 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a027dc83e594b87cb65fae1"}, "remainingTimeMS": 30} -2026-05-11 19:11:42,248 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a027e4e8ae5a4bdf2a01b4a"}, "remainingTimeMS": 30} -2026-05-11 19:11:45,646 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a027e511d40e5545928f21a"}, "remainingTimeMS": 30} -2026-05-11 19:12:29,155 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a027e7d6b97ebcd8799b29a"}, "remainingTimeMS": 30} -2026-05-11 19:12:32,505 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a027e803a5d599a0d8af5ec"}, "remainingTimeMS": 30} -2026-05-11 19:12:38,840 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a027e868bf43995e2ac9977"}, "remainingTimeMS": 30} -2026-05-11 19:15:15,838 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a027f23949e3a6713885bd3"}, "remainingTimeMS": 30} -2026-05-11 19:15:16,974 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a027f24949e3a6713885bd4"}, "remainingTimeMS": 30} -2026-05-11 19:15:51,653 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a027f470f7d0c4f53d759f5"}, "remainingTimeMS": 30} -2026-05-11 19:15:52,590 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a027f480f7d0c4f53d759f6"}, "remainingTimeMS": 30} -2026-05-11 19:17:39,169 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a027fb35cc9f5b422b27472"}, "remainingTimeMS": 30} -2026-05-11 19:17:40,232 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a027fb45cc9f5b422b27473"}, "remainingTimeMS": 30} -2026-05-11 19:17:43,584 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a027fb7568814d4963dd0bb"}, "remainingTimeMS": 30} -2026-05-11 19:17:44,583 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a027fb8568814d4963dd0bc"}, "remainingTimeMS": 30} -2026-05-11 19:18:49,835 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a027ff9c4a2c8fb7771ae26"}, "remainingTimeMS": 29} -2026-05-11 19:18:51,007 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a027ffbc4a2c8fb7771ae27"}, "remainingTimeMS": 30} -2026-05-11 19:19:00,509 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a028004c4a2c8fb7771ae28"}, "remainingTimeMS": 30} -2026-05-11 19:19:34,358 INFO httpx: HTTP Request: POST https://api.openai.com/v1/images/edits "HTTP/1.1 200 OK" -2026-05-11 19:20:25,698 INFO httpx: HTTP Request: POST https://api.openai.com/v1/images/edits "HTTP/1.1 200 OK" -2026-05-11 19:23:23,468 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a02810b6e10f71b8416429a"}, "remainingTimeMS": 30} -2026-05-11 19:23:24,520 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a02810c6e10f71b8416429b"}, "remainingTimeMS": 30} -2026-05-11 19:25:05,589 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a02817124161d08478a156b"}, "remainingTimeMS": 30} -2026-05-11 19:25:06,714 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a02817224161d08478a156c"}, "remainingTimeMS": 30} -2026-05-11 19:25:28,914 INFO httpx: HTTP Request: POST https://api.openai.com/v1/images/edits "HTTP/1.1 200 OK" -2026-05-11 19:26:13,818 INFO httpx: HTTP Request: POST https://api.openai.com/v1/images/edits "HTTP/1.1 200 OK" -2026-05-11 19:26:21,775 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a0281bd5ba8caf5a831ae90"}, "remainingTimeMS": 30} -2026-05-11 19:26:22,789 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a0281be5ba8caf5a831ae91"}, "remainingTimeMS": 30} -2026-05-11 19:36:28,448 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a02841c703779c67f0d9b34"}, "remainingTimeMS": 30} -2026-05-11 19:36:29,570 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a02841d703779c67f0d9b35"}, "remainingTimeMS": 30} -2026-05-11 19:36:33,261 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a028421703779c67f0d9b36"}, "remainingTimeMS": 30} -2026-05-11 19:36:33,261 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a028421703779c67f0d9b36"}, "remainingTimeMS": 30} -2026-05-11 19:37:02,209 INFO httpx: HTTP Request: POST https://api.openai.com/v1/images/edits "HTTP/1.1 200 OK" -2026-05-11 19:39:05,683 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a0284b9c02b8a2b4c1fd305"}, "remainingTimeMS": 30} -2026-05-11 19:39:09,088 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a0284bd757457c966632fb6"}, "remainingTimeMS": 30} -2026-05-11 19:39:10,088 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a0284be757457c966632fb7"}, "remainingTimeMS": 30} -2026-05-11 19:39:52,700 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a0284e8757457c966632fb8"}, "remainingTimeMS": 30} -2026-05-11 19:39:52,701 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a0284e8757457c966632fb8"}, "remainingTimeMS": 30} -2026-05-11 19:41:00,305 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a02852c8a1367122245eccc"}, "remainingTimeMS": 30} -2026-05-11 19:41:03,225 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a02852f267122fd694f21e3"}, "remainingTimeMS": 30} -2026-05-11 19:41:04,203 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a028530267122fd694f21e4"}, "remainingTimeMS": 30} -2026-05-11 19:41:41,968 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a0285554c2f7ccbf3415908"}, "remainingTimeMS": 30} -2026-05-11 19:41:42,925 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a0285564c2f7ccbf3415909"}, "remainingTimeMS": 30} -2026-05-11 19:42:05,869 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a02856dac866a27c0a614ce"}, "remainingTimeMS": 30} -2026-05-11 19:42:07,090 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a02856fac866a27c0a614cf"}, "remainingTimeMS": 30} -2026-05-11 19:42:08,500 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a028570ac866a27c0a614d0"}, "remainingTimeMS": 30} -2026-05-11 19:42:08,500 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a028570ac866a27c0a614d0"}, "remainingTimeMS": 30} -2026-05-11 19:42:45,966 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a02859572403ff4d0782b8b"}, "remainingTimeMS": 30} -2026-05-11 19:42:46,913 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a02859672403ff4d0782b8c"}, "remainingTimeMS": 30} -2026-05-11 19:42:59,118 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a0285a372403ff4d0782b8d"}, "remainingTimeMS": 30} -2026-05-11 19:42:59,120 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a0285a372403ff4d0782b8d"}, "remainingTimeMS": 30} -2026-05-11 19:43:13,311 INFO backend.segmentation: /api/generate-image received file: hyper-reality-1778254222964.jpg (84903 bytes) -2026-05-11 19:43:33,906 INFO httpx: HTTP Request: POST https://api.openai.com/v1/images/edits "HTTP/1.1 200 OK" -2026-05-11 19:48:53,424 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a028705348962251040020b"}, "remainingTimeMS": 30} -2026-05-11 19:48:54,613 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a028706348962251040020c"}, "remainingTimeMS": 30} -2026-05-11 19:48:56,049 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a028708348962251040020d"}, "remainingTimeMS": 30} -2026-05-11 19:48:56,050 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a028708348962251040020d"}, "remainingTimeMS": 30} -2026-05-11 19:48:56,051 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a028708348962251040020d"}, "remainingTimeMS": 30} -2026-05-11 19:49:15,705 INFO backend.segmentation: /api/generate-image received file: hyper-reality-1778254222964.jpg (84903 bytes) -2026-05-11 19:49:38,447 INFO httpx: HTTP Request: POST https://api.openai.com/v1/images/edits "HTTP/1.1 200 OK" -2026-05-11 19:51:04,940 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a0287887f7d678f206594ba"}, "remainingTimeMS": 30} -2026-05-11 19:51:07,563 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a02878bd029f8915c55e732"}, "remainingTimeMS": 30} -2026-05-11 19:51:08,470 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a02878cd029f8915c55e733"}, "remainingTimeMS": 30} -2026-05-11 19:51:28,857 INFO backend.segmentation: /api/generate-image received file: hyper-reality-1778254222964.jpg (84903 bytes) -2026-05-11 19:51:49,286 INFO httpx: HTTP Request: POST https://api.openai.com/v1/images/edits "HTTP/1.1 200 OK" -2026-05-11 19:54:05,238 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a02883d15dd6dc3e4f0f0b1"}, "remainingTimeMS": 30} -2026-05-11 19:54:06,288 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a02883e15dd6dc3e4f0f0b2"}, "remainingTimeMS": 30} -2026-05-11 19:54:36,036 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a02885c3027b040c1692ec0"}, "remainingTimeMS": 30} -2026-05-11 19:54:37,006 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a02885d3027b040c1692ec1"}, "remainingTimeMS": 30} -2026-05-11 19:54:42,945 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a0288623027b040c1692ec2"}, "remainingTimeMS": 30} -2026-05-11 19:54:42,945 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a0288623027b040c1692ec2"}, "remainingTimeMS": 30} -2026-05-11 19:54:47,661 INFO backend.segmentation: /api/generate-image received file: hyper-reality-1778254222964.jpg (84903 bytes) -2026-05-11 19:55:09,379 INFO httpx: HTTP Request: POST https://api.openai.com/v1/images/edits "HTTP/1.1 200 OK" -2026-05-11 19:56:05,697 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a0288b57400933c876eea54"}, "remainingTimeMS": 30} -2026-05-11 19:56:06,855 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a0288b67400933c876eea55"}, "remainingTimeMS": 30} -2026-05-11 19:56:16,706 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a0288c07400933c876eea56"}, "remainingTimeMS": 30} -2026-05-11 19:56:16,707 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a0288c07400933c876eea56"}, "remainingTimeMS": 30} -2026-05-11 19:56:28,793 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a0288ccf6c189e773fd6c5d"}, "remainingTimeMS": 30} -2026-05-11 19:56:29,776 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a0288cdf6c189e773fd6c5e"}, "remainingTimeMS": 30} -2026-05-11 19:56:34,696 INFO backend.segmentation: /api/generate-image received file: hyper-reality-1778254222964.jpg (84903 bytes) -2026-05-11 19:56:59,964 INFO httpx: HTTP Request: POST https://api.openai.com/v1/images/edits "HTTP/1.1 200 OK" -2026-05-11 19:58:10,776 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a028932e1953cbd31f51412"}, "remainingTimeMS": 30} -2026-05-11 19:58:11,857 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a028933e1953cbd31f51413"}, "remainingTimeMS": 30} -2026-05-11 19:58:53,417 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a02895dafb540fa4caa5bd7"}, "remainingTimeMS": 30} -2026-05-11 19:58:56,404 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a0289608155a426c77e36e5"}, "remainingTimeMS": 30} -2026-05-11 19:58:57,390 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a0289618155a426c77e36e6"}, "remainingTimeMS": 30} -2026-05-11 19:59:02,129 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a0289668155a426c77e36e7"}, "remainingTimeMS": 30} -2026-05-11 19:59:02,130 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a0289668155a426c77e36e7"}, "remainingTimeMS": 30} -2026-05-11 19:59:07,982 INFO backend.segmentation: /api/generate-image received file: hyper-reality-1778254222964.jpg (84903 bytes) -2026-05-11 19:59:08,264 INFO backend.segmentation: OpenAI prompt length=919 -2026-05-11 19:59:28,536 INFO httpx: HTTP Request: POST https://api.openai.com/v1/images/edits "HTTP/1.1 200 OK" -2026-05-11 20:00:00,304 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a0289a0d1507d375ff12f71"}, "remainingTimeMS": 30} -2026-05-11 20:00:01,492 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a0289a1d1507d375ff12f72"}, "remainingTimeMS": 30} -2026-05-11 20:00:04,295 INFO backend.segmentation: /api/generate-image received file: hyper-reality-1778254222964.jpg (84903 bytes) -2026-05-11 20:00:28,052 INFO httpx: HTTP Request: POST https://api.openai.com/v1/images/edits "HTTP/1.1 200 OK" -2026-05-11 20:00:28,570 INFO backend.segmentation: /api/generate-image received file: hyper-reality-1778254222964.jpg (84903 bytes) -2026-05-11 20:00:43,336 INFO httpx: HTTP Request: POST https://api.openai.com/v1/images/edits "HTTP/1.1 200 OK" -2026-05-11 20:01:48,552 INFO backend.segmentation: /api/generate-image received file: hyper-reality-1778254222964.jpg (84903 bytes) -2026-05-11 20:02:03,110 INFO httpx: HTTP Request: POST https://api.openai.com/v1/images/edits "HTTP/1.1 200 OK" -2026-05-11 20:03:03,014 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a028a578f37a4f8e8d7d66c"}, "remainingTimeMS": 30} -2026-05-11 20:03:04,041 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a028a588f37a4f8e8d7d66d"}, "remainingTimeMS": 30} -2026-05-11 20:03:05,250 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a028a598f37a4f8e8d7d66e"}, "remainingTimeMS": 30} -2026-05-11 20:03:05,250 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a028a598f37a4f8e8d7d66e"}, "remainingTimeMS": 30} -2026-05-11 20:03:16,863 INFO backend.segmentation: /api/generate-image received file: hyper-reality-1778254222964.jpg (84903 bytes) -2026-05-11 20:03:31,328 INFO httpx: HTTP Request: POST https://api.openai.com/v1/images/edits "HTTP/1.1 200 OK" -2026-05-11 20:04:42,487 INFO backend.segmentation: /api/generate-image received file: hyper-reality-1778254222964.jpg (84903 bytes) -2026-05-11 20:04:58,256 INFO httpx: HTTP Request: POST https://api.openai.com/v1/images/edits "HTTP/1.1 200 OK" -2026-05-11 20:06:22,491 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a028b1ebc16a0851415bf50"}, "remainingTimeMS": 29} -2026-05-11 20:06:23,537 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a028b1fbc16a0851415bf51"}, "remainingTimeMS": 30} -2026-05-11 20:06:47,110 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a028b37a802942fd2594f91"}, "remainingTimeMS": 30} -2026-05-11 20:06:49,908 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a028b397b0f25a542e65c27"}, "remainingTimeMS": 30} -2026-05-11 20:06:50,920 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a028b3a7b0f25a542e65c28"}, "remainingTimeMS": 30} -2026-05-11 20:11:50,807 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a028c66b34267fbde5b34af"}, "remainingTimeMS": 30} -2026-05-11 20:11:51,851 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a028c67b34267fbde5b34b0"}, "remainingTimeMS": 30} -2026-05-11 20:13:05,234 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a028cb1215d719b596e53d7"}, "remainingTimeMS": 30} -2026-05-11 20:13:06,341 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a028cb2215d719b596e53d8"}, "remainingTimeMS": 30} -2026-05-11 20:15:36,865 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a028d488e96660a60b8cfc4"}, "remainingTimeMS": 30} -2026-05-11 20:15:37,926 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a028d498e96660a60b8cfc5"}, "remainingTimeMS": 30} -2026-05-11 20:15:39,983 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a028d4b8e96660a60b8cfc6"}, "remainingTimeMS": 30} -2026-05-11 20:15:39,983 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a028d4b8e96660a60b8cfc6"}, "remainingTimeMS": 30} -2026-05-11 20:15:47,786 INFO backend.segmentation: /api/generate-image received file: hyper-reality-1778254222964.jpg (84903 bytes) -2026-05-11 20:16:09,295 INFO httpx: HTTP Request: POST https://api.openai.com/v1/images/edits "HTTP/1.1 200 OK" -2026-05-11 20:16:09,669 INFO backend.segmentation: Saved generated image to C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\generated\2d6e02255c3a4f00804ace65c49f19aa.png -2026-05-11 20:16:09,844 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "", "operation": "update", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a028d698e96660a60b8cfc7"}, "remainingTimeMS": 30} -2026-05-11 20:20:08,586 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a028e58878a8628bfee7a9c"}, "remainingTimeMS": 30} -2026-05-11 20:20:09,725 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a028e59878a8628bfee7a9d"}, "remainingTimeMS": 30} -2026-05-11 20:20:11,253 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a028e5b878a8628bfee7a9e"}, "remainingTimeMS": 30} -2026-05-11 20:20:11,255 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a028e5b878a8628bfee7a9e"}, "remainingTimeMS": 30} -2026-05-11 20:20:16,995 INFO backend.segmentation: /api/generate-image received file: hyper-reality-1778254222964.jpg (84903 bytes) -2026-05-11 20:20:33,482 INFO httpx: HTTP Request: POST https://api.openai.com/v1/images/edits "HTTP/1.1 200 OK" -2026-05-11 20:20:34,342 INFO backend.segmentation: Saved generated image to C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\generated\231900b690ad4adb9883a3d600716a7d.png -2026-05-11 20:20:34,542 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "", "operation": "update", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a028e72878a8628bfee7a9f"}, "remainingTimeMS": 30} -2026-05-11 20:20:46,915 INFO backend.segmentation: /api/generate-image received file: hyper-reality-1778254222964.jpg (84903 bytes) -2026-05-11 20:21:02,580 INFO httpx: HTTP Request: POST https://api.openai.com/v1/images/edits "HTTP/1.1 200 OK" -2026-05-11 20:21:02,987 INFO backend.segmentation: Saved generated image to C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\generated\d664c83e3b614760834cdaad28769340.png -2026-05-11 20:21:03,168 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "", "operation": "update", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a028e8f878a8628bfee7aa0"}, "remainingTimeMS": 30} -2026-05-11 20:24:43,167 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a028f6bdd1d2a0373a94f3c"}, "remainingTimeMS": 30} -2026-05-11 20:24:46,257 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a028f6ef42c431356712eb2"}, "remainingTimeMS": 30} -2026-05-11 20:24:47,309 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a028f6ff42c431356712eb3"}, "remainingTimeMS": 30} -2026-05-11 20:24:48,513 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a028f70f42c431356712eb4"}, "remainingTimeMS": 30} -2026-05-11 20:24:48,514 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a028f70f42c431356712eb4"}, "remainingTimeMS": 30} -2026-05-11 20:24:50,217 INFO backend.segmentation: /api/generate-image received file: hyper-reality-1778254222964.jpg (84903 bytes) -2026-05-11 20:25:09,782 INFO httpx: HTTP Request: POST https://api.openai.com/v1/images/edits "HTTP/1.1 200 OK" -2026-05-11 20:25:10,153 INFO backend.segmentation: Saved generated image to C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\generated\5b6f11b554f74c5486ce33e390f8c75d.png -2026-05-11 20:25:10,323 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "", "operation": "update", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a028f86f42c431356712eb5"}, "remainingTimeMS": 30} -2026-05-11 20:26:39,620 INFO backend.segmentation: /api/generate-image received file: hyper-reality-1778254222964.jpg (84903 bytes) -2026-05-11 20:27:01,355 INFO httpx: HTTP Request: POST https://api.openai.com/v1/images/edits "HTTP/1.1 200 OK" -2026-05-11 20:27:01,729 INFO backend.segmentation: Saved generated image to C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\generated\032d76c129a442cebeac3323bc4fc080.png -2026-05-11 20:27:01,908 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "", "operation": "update", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a028ff5f42c431356712eb6"}, "remainingTimeMS": 30} -2026-05-11 20:27:10,935 INFO backend.segmentation: /api/generate-image received file: hyper-reality-1778254222964.jpg (84903 bytes) -2026-05-11 20:27:31,741 INFO httpx: HTTP Request: POST https://api.openai.com/v1/images/edits "HTTP/1.1 200 OK" -2026-05-11 20:27:32,280 INFO backend.segmentation: Saved generated image to C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\generated\08a1798e9521455a902edda85dc029cc.png -2026-05-11 20:27:32,545 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "", "operation": "update", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a029014f42c431356712eb7"}, "remainingTimeMS": 30} -2026-05-11 20:27:58,182 INFO backend.segmentation: /api/generate-image received file: hyper-reality-1778254222964.jpg (84903 bytes) -2026-05-11 20:28:46,217 INFO httpx: HTTP Request: POST https://api.openai.com/v1/images/edits "HTTP/1.1 200 OK" -2026-05-11 20:28:46,940 INFO backend.segmentation: Saved generated image to C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\generated\1bc4caa711694fb8acca6b23159f754f.png -2026-05-11 20:28:47,112 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "", "operation": "update", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a02905ff42c431356712eb8"}, "remainingTimeMS": 30} -2026-05-11 20:29:03,508 INFO backend.segmentation: /api/generate-image received file: hyper-reality-1778254222964.jpg (84903 bytes) -2026-05-11 20:29:44,213 INFO httpx: HTTP Request: POST https://api.openai.com/v1/images/edits "HTTP/1.1 200 OK" -2026-05-11 20:29:44,750 INFO backend.segmentation: Saved generated image to C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\generated\2a5b913b68a243379027cd01b187b4cd.png -2026-05-11 20:29:44,955 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "", "operation": "update", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a029098f42c431356712eb9"}, "remainingTimeMS": 30} -2026-05-11 20:29:53,559 INFO backend.segmentation: /api/generate-image received file: hyper-reality-1778254222964.jpg (84903 bytes) -2026-05-11 20:30:37,983 INFO httpx: HTTP Request: POST https://api.openai.com/v1/images/edits "HTTP/1.1 200 OK" -2026-05-11 20:30:38,490 INFO backend.segmentation: Saved generated image to C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\generated\836b20819d49430a9fc94c02e8e07885.png -2026-05-11 20:30:38,711 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "", "operation": "update", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a0290cef42c431356712eba"}, "remainingTimeMS": 30} -2026-05-11 21:01:35,945 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a02980ff2c1d98dfeb7f208"}, "remainingTimeMS": 30} -2026-05-11 21:01:37,029 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a029811f2c1d98dfeb7f209"}, "remainingTimeMS": 30} -2026-05-11 21:01:40,034 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a029814f2c1d98dfeb7f20a"}, "remainingTimeMS": 30} -2026-05-11 21:01:47,994 INFO backend.segmentation: /api/generate-image received file: hyper-reality-1778254222964.jpg (84903 bytes) -2026-05-11 21:02:33,393 INFO httpx: HTTP Request: POST https://api.openai.com/v1/images/edits "HTTP/1.1 200 OK" -2026-05-11 21:02:34,216 INFO backend.segmentation: Saved generated image to C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\generated\dbd083972cf5430998885a9f7c36ac0a.png -2026-05-11 21:02:34,417 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "", "operation": "update", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a02984af2c1d98dfeb7f20b"}, "remainingTimeMS": 30} -2026-05-11 21:24:58,204 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a029d8a0918a81303de0d02"}, "remainingTimeMS": 29} -2026-05-11 21:24:59,154 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a029d8b0918a81303de0d03"}, "remainingTimeMS": 29} -2026-05-11 21:40:04,778 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a02a114e143b18e2c2e46c8"}, "remainingTimeMS": 29} -2026-05-11 21:40:05,867 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a02a115e143b18e2c2e46c9"}, "remainingTimeMS": 29} -2026-05-11 21:46:09,477 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a02a281ff1e49d9c28f7695"}, "remainingTimeMS": 29} -2026-05-11 21:46:16,536 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a02a288f90e330b3179de27"}, "remainingTimeMS": 29} -2026-05-11 21:46:17,577 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a02a289f90e330b3179de28"}, "remainingTimeMS": 29} -2026-05-11 21:47:09,901 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a02a2bda0a2f71661c7b112"}, "remainingTimeMS": 29} -2026-05-11 21:47:10,936 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a02a2bea0a2f71661c7b113"}, "remainingTimeMS": 29} -2026-05-11 21:49:09,831 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a02a33516532d6089e0e139"}, "remainingTimeMS": 29} -2026-05-11 21:49:10,788 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a02a33616532d6089e0e13a"}, "remainingTimeMS": 29} -2026-05-11 21:50:09,487 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a02a371f53852099a1aed16"}, "remainingTimeMS": 29} -2026-05-11 21:50:16,933 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a02a378b6b31aba4a4c1c52"}, "remainingTimeMS": 29} -2026-05-11 21:50:17,879 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "count", "topologyDescription": ", , ]>", "clientId": {"$oid": "6a02a379b6b31aba4a4c1c53"}, "remainingTimeMS": 29} +During handling of the above exception, another exception occurred: + +Traceback (most recent call last): + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\image_service.py", line 137, in run_upload_job + label_map, mask_count = segment_via_gradio_sync(image_path) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 93, in segment_via_gradio_sync + f" GPU ({GRADIO_SPACE_URL}): {exc_gpu}\n" + ^^^^^^^ +UnboundLocalError: cannot access local variable 'exc_gpu' where it is not associated with a value +2026-05-06 18:04:06,834 INFO backend.segmentation: [UPLOAD_BG] DONE 12.716s at 2026-05-07T00:04:06.834047+00:00 +2026-05-06 18:04:06,838 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-05-06 18:04:06,884 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-06 18:04:09,275 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/04b260c2-1554-4cba-a89f-13976ed4ac4d "HTTP/1.1 200 OK" +2026-05-06 18:09:42,042 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 +2026-05-06 18:09:42,064 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. +2026-05-06 18:09:42,071 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T00:09:42.071378+00:00 +2026-05-06 18:09:42,076 INFO backend.segmentation: [JOB 45db3dde20444c6f97e1653fd7df1d17] preparing_image progress=12 +2026-05-06 18:09:42,120 INFO backend.segmentation: [JOB 45db3dde20444c6f97e1653fd7df1d17] segmenting_with_sam2 progress=30 estimated_seconds=63.05024 +2026-05-06 18:09:42,121 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 +2026-05-06 18:09:44,483 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" +2026-05-06 18:09:46,855 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-06 18:09:46,857 WARNING services.gradio_client_service: GPU Space failed (Cannot find a function with `api_name`: /segment.), trying CPU fallback... +2026-05-06 18:09:46,861 INFO services.gradio_client_service: Calling CPU fallback Space: http://localhost:7860 +2026-05-06 18:09:47,293 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-06 18:09:49,183 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/1780c9d0-ac88-47b0-b6c1-3cf40997667d "HTTP/1.1 200 OK" +2026-05-06 18:09:49,199 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" +2026-05-06 18:09:51,480 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-06 18:09:51,485 ERROR backend.segmentation: [JOB 45db3dde20444c6f97e1653fd7df1d17] failed: Both Gradio Spaces failed. + GPU (http://localhost:7860): Cannot find a function with `api_name`: /segment. + CPU (http://localhost:7860): Cannot find a function with `api_name`: /segment. +Traceback (most recent call last): + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 91, in segment_via_gradio_sync + return _call_gradio_sync(image_path, GRADIO_CPU_FALLBACK_URL) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 36, in _call_gradio_sync + _overlay_file, combined_json_str = client.predict( + ^^^^^^^^^^^^^^^ + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\.venv\Lib\site-packages\gradio_client\client.py", line 497, in predict + return self.submit( + ^^^^^^^^^^^^ + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\.venv\Lib\site-packages\gradio_client\client.py", line 543, in submit + inferred_fn_index = self._infer_fn_index(api_name, fn_index) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\.venv\Lib\site-packages\gradio_client\client.py", line 881, in _infer_fn_index + raise ValueError(error_message) +ValueError: Cannot find a function with `api_name`: /segment. + +The above exception was the direct cause of the following exception: + +Traceback (most recent call last): + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\image_service.py", line 137, in run_upload_job + label_map, mask_count = segment_via_gradio_sync(image_path) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 93, in segment_via_gradio_sync + raise RuntimeError( +RuntimeError: Both Gradio Spaces failed. + GPU (http://localhost:7860): Cannot find a function with `api_name`: /segment. + CPU (http://localhost:7860): Cannot find a function with `api_name`: /segment. +2026-05-06 18:09:51,487 INFO backend.segmentation: [UPLOAD_BG] DONE 9.415s at 2026-05-07T00:09:51.487122+00:00 +2026-05-06 18:09:51,487 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-05-06 18:09:51,545 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-06 18:09:53,753 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/36233c91-f2f7-4ec1-9a12-3d21c85acebf "HTTP/1.1 200 OK" +2026-05-06 18:13:22,286 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T00:13:22.286531+00:00 +2026-05-06 18:13:22,286 INFO backend.segmentation: [JOB 1d0df1096d5f465b92fae7922f6f7018] preparing_image progress=12 +2026-05-06 18:13:22,361 INFO backend.segmentation: [JOB 1d0df1096d5f465b92fae7922f6f7018] segmenting_with_sam2 progress=30 estimated_seconds=63.05024 +2026-05-06 18:13:22,362 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 +2026-05-06 18:13:24,786 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" +2026-05-06 18:13:27,139 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-06 18:13:27,145 WARNING services.gradio_client_service: GPU Space failed (Cannot find a function with `api_name`: /segment.), trying CPU fallback... +2026-05-06 18:13:27,146 INFO services.gradio_client_service: Calling CPU fallback Space: http://localhost:7860 +2026-05-06 18:13:27,264 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-06 18:13:29,620 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/903b6662-21a9-407f-849d-a09f627bf22b "HTTP/1.1 200 OK" +2026-05-06 18:13:29,696 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" +2026-05-06 18:13:32,103 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-06 18:13:32,109 ERROR backend.segmentation: [JOB 1d0df1096d5f465b92fae7922f6f7018] failed: Both Gradio Spaces failed. + GPU (http://localhost:7860): Cannot find a function with `api_name`: /segment. + CPU (http://localhost:7860): Cannot find a function with `api_name`: /segment. +Traceback (most recent call last): + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 91, in segment_via_gradio_sync + return _call_gradio_sync(image_path, GRADIO_CPU_FALLBACK_URL) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 36, in _call_gradio_sync + _overlay_file, combined_json_str = client.predict( + ^^^^^^^^^^^^^^^ + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\.venv\Lib\site-packages\gradio_client\client.py", line 497, in predict + return self.submit( + ^^^^^^^^^^^^ + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\.venv\Lib\site-packages\gradio_client\client.py", line 543, in submit + inferred_fn_index = self._infer_fn_index(api_name, fn_index) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\.venv\Lib\site-packages\gradio_client\client.py", line 881, in _infer_fn_index + raise ValueError(error_message) +ValueError: Cannot find a function with `api_name`: /segment. + +The above exception was the direct cause of the following exception: + +Traceback (most recent call last): + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\image_service.py", line 137, in run_upload_job + label_map, mask_count = segment_via_gradio_sync(image_path) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 93, in segment_via_gradio_sync + raise RuntimeError( +RuntimeError: Both Gradio Spaces failed. + GPU (http://localhost:7860): Cannot find a function with `api_name`: /segment. + CPU (http://localhost:7860): Cannot find a function with `api_name`: /segment. +2026-05-06 18:13:32,119 INFO backend.segmentation: [UPLOAD_BG] DONE 9.833s at 2026-05-07T00:13:32.119224+00:00 +2026-05-06 18:13:32,120 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-05-06 18:13:32,165 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-06 18:13:34,556 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/e4f38b15-d04a-41ee-bb91-06226b8fcbae "HTTP/1.1 200 OK" +2026-05-06 18:14:12,194 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 +2026-05-06 18:14:12,207 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. +2026-05-06 18:14:24,360 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T00:14:24.360597+00:00 +2026-05-06 18:14:24,360 INFO backend.segmentation: [JOB d0714cc4813c4ff5b969676107410712] preparing_image progress=12 +2026-05-06 18:14:24,496 INFO backend.segmentation: [JOB d0714cc4813c4ff5b969676107410712] segmenting_with_sam2 progress=30 estimated_seconds=63.05024 +2026-05-06 18:14:24,496 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 +2026-05-06 18:14:27,292 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" +2026-05-06 18:14:29,710 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-06 18:14:29,737 WARNING services.gradio_client_service: GPU Space failed (Cannot find a function with `api_name`: /segment.), trying CPU fallback... +2026-05-06 18:14:29,738 INFO services.gradio_client_service: Calling CPU fallback Space: http://localhost:7860 +2026-05-06 18:14:30,337 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-06 18:14:32,244 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/b1361a06-2ac6-4b8d-8a1c-79a0b653d2d4 "HTTP/1.1 200 OK" +2026-05-06 18:14:32,247 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" +2026-05-06 18:14:34,724 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-06 18:14:34,728 ERROR backend.segmentation: [JOB d0714cc4813c4ff5b969676107410712] failed: Both Gradio Spaces failed. + GPU (http://localhost:7860): Cannot find a function with `api_name`: /segment. + CPU (http://localhost:7860): Cannot find a function with `api_name`: /segment. +Traceback (most recent call last): + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 91, in segment_via_gradio_sync + return _call_gradio_sync(image_path, GRADIO_CPU_FALLBACK_URL) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 36, in _call_gradio_sync + _overlay_file, combined_json_str = client.predict( + ^^^^^^^^^^^^^^^ + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\.venv\Lib\site-packages\gradio_client\client.py", line 497, in predict + return self.submit( + ^^^^^^^^^^^^ + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\.venv\Lib\site-packages\gradio_client\client.py", line 543, in submit + inferred_fn_index = self._infer_fn_index(api_name, fn_index) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\.venv\Lib\site-packages\gradio_client\client.py", line 881, in _infer_fn_index + raise ValueError(error_message) +ValueError: Cannot find a function with `api_name`: /segment. + +The above exception was the direct cause of the following exception: + +Traceback (most recent call last): + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\image_service.py", line 137, in run_upload_job + label_map, mask_count = segment_via_gradio_sync(image_path) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 93, in segment_via_gradio_sync + raise RuntimeError( +RuntimeError: Both Gradio Spaces failed. + GPU (http://localhost:7860): Cannot find a function with `api_name`: /segment. + CPU (http://localhost:7860): Cannot find a function with `api_name`: /segment. +2026-05-06 18:14:34,732 INFO backend.segmentation: [UPLOAD_BG] DONE 10.372s at 2026-05-07T00:14:34.731556+00:00 +2026-05-06 18:14:34,732 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-05-06 18:14:34,784 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-06 18:14:37,121 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/e7673631-cbf6-43a7-8391-415fae5fc0e9 "HTTP/1.1 200 OK" +2026-05-06 18:16:40,330 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 +2026-05-06 18:16:40,344 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. +2026-05-06 18:16:46,189 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T00:16:46.189444+00:00 +2026-05-06 18:16:46,189 INFO backend.segmentation: [JOB a0e5eea5ea454870abc22c495d503be4] preparing_image progress=12 +2026-05-06 18:16:46,293 INFO backend.segmentation: [JOB a0e5eea5ea454870abc22c495d503be4] segmenting_with_sam2 progress=30 estimated_seconds=63.05024 +2026-05-06 18:16:46,293 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 +2026-05-06 18:16:49,078 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" +2026-05-06 18:16:51,479 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-06 18:16:51,497 WARNING services.gradio_client_service: GPU Space failed (Cannot find a function with `api_name`: /segment.), trying CPU fallback... +2026-05-06 18:16:51,498 INFO services.gradio_client_service: Calling CPU fallback Space: http://localhost:7861 +2026-05-06 18:16:52,101 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-06 18:16:54,019 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/6b53345b-dde9-4c3f-9adc-6c494ed360ef "HTTP/1.1 200 OK" +2026-05-06 18:16:54,024 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" +2026-05-06 18:16:56,487 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-06 18:16:56,549 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-06 18:16:58,924 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/74fea2e0-6f0d-4dda-a138-a42ba84fc0aa "HTTP/1.1 200 OK" +2026-05-06 18:16:58,960 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" +2026-05-06 18:17:01,339 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-05-06 18:17:03,913 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=74fea2e0-6f0d-4dda-a138-a42ba84fc0aa "HTTP/1.1 200 OK" +2026-05-06 18:19:23,132 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\bdc55057e453f1e4793eccb7f3297d66322074e960cb173c3fcf63268faa1561\image.webp "HTTP/1.1 200 OK" +2026-05-06 18:19:23,155 INFO services.gradio_client_service: Gradio Space segmentation: entorno=🏙️ Fachada / Exterior motor=SAM Auto (Exteriores - Sin Prompts) mask_count=95 +2026-05-06 18:19:23,156 INFO backend.segmentation: [JOB a0e5eea5ea454870abc22c495d503be4] saving_masks progress=92 +2026-05-06 18:19:23,605 INFO backend.segmentation: [JOB a0e5eea5ea454870abc22c495d503be4] segments_meta saved (93 segments) +2026-05-06 18:19:23,607 INFO backend.segmentation: [JOB a0e5eea5ea454870abc22c495d503be4] done mask_count=95 +2026-05-06 18:19:23,607 INFO backend.segmentation: [UPLOAD_BG] DONE 157.419s at 2026-05-07T00:19:23.607772+00:00 +2026-05-06 18:19:23,607 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-05-06 18:19:34,201 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:19:34.200405+00:00 +2026-05-06 18:19:34,746 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-06 18:19:35,040 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.840s at 2026-05-07T00:19:35.040623+00:00 +2026-05-06 18:19:42,196 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:19:42.196103+00:00 +2026-05-06 18:19:42,742 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-06 18:19:42,974 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.779s at 2026-05-07T00:19:42.974981+00:00 +2026-05-06 18:19:47,421 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:19:47.421826+00:00 +2026-05-06 18:19:47,977 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-06 18:19:48,182 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.759s at 2026-05-07T00:19:48.182179+00:00 +2026-05-06 18:19:54,412 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:19:54.412542+00:00 +2026-05-06 18:19:54,866 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-06 18:19:55,074 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.662s at 2026-05-07T00:19:55.074817+00:00 +2026-05-06 18:19:57,905 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:19:57.905487+00:00 +2026-05-06 18:19:58,384 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-06 18:19:58,598 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.692s at 2026-05-07T00:19:58.598145+00:00 +2026-05-06 18:19:59,918 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:19:59.918562+00:00 +2026-05-06 18:20:00,391 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-06 18:20:00,605 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.687s at 2026-05-07T00:20:00.605635+00:00 +2026-05-06 18:20:01,887 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:20:01.887221+00:00 +2026-05-06 18:20:02,339 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-06 18:20:02,550 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.663s at 2026-05-07T00:20:02.550706+00:00 +2026-05-06 18:20:04,982 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:20:04.982372+00:00 +2026-05-06 18:20:05,541 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-06 18:20:05,754 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.772s at 2026-05-07T00:20:05.753433+00:00 +2026-05-06 18:20:09,130 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:20:09.130132+00:00 +2026-05-06 18:20:09,706 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-06 18:20:09,918 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.788s at 2026-05-07T00:20:09.918209+00:00 +2026-05-06 18:20:13,606 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:20:13.606190+00:00 +2026-05-06 18:20:14,202 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-06 18:20:14,419 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.813s at 2026-05-07T00:20:14.419193+00:00 +2026-05-06 18:20:24,188 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:20:24.188464+00:00 +2026-05-06 18:20:24,558 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-06 18:20:24,768 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.580s at 2026-05-07T00:20:24.768332+00:00 +2026-05-06 18:20:31,993 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:20:31.993128+00:00 +2026-05-06 18:20:32,461 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-06 18:20:32,660 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.667s at 2026-05-07T00:20:32.660620+00:00 +2026-05-06 18:20:39,799 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:20:39.799176+00:00 +2026-05-06 18:20:40,213 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-06 18:20:40,415 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.616s at 2026-05-07T00:20:40.415329+00:00 +2026-05-06 18:20:48,557 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:20:48.557775+00:00 +2026-05-06 18:20:48,957 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-06 18:20:49,152 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.594s at 2026-05-07T00:20:49.152442+00:00 +2026-05-06 18:20:51,499 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:20:51.499668+00:00 +2026-05-06 18:20:51,887 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-06 18:20:52,080 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.581s at 2026-05-07T00:20:52.080875+00:00 +2026-05-06 18:20:58,550 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:20:58.550802+00:00 +2026-05-06 18:20:58,974 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-06 18:20:59,172 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.621s at 2026-05-07T00:20:59.172097+00:00 +2026-05-06 18:21:05,475 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:21:05.475735+00:00 +2026-05-06 18:21:05,968 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-06 18:21:06,170 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.695s at 2026-05-07T00:21:06.170299+00:00 +2026-05-06 18:21:58,411 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:21:58.411200+00:00 +2026-05-06 18:21:58,922 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-06 18:21:59,122 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.711s at 2026-05-07T00:21:59.122602+00:00 +2026-05-06 18:22:03,353 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:22:03.353237+00:00 +2026-05-06 18:22:03,666 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-06 18:22:03,899 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.546s at 2026-05-07T00:22:03.899330+00:00 +2026-05-06 18:22:18,857 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:22:18.857782+00:00 +2026-05-06 18:22:19,152 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-06 18:22:19,352 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.495s at 2026-05-07T00:22:19.351744+00:00 +2026-05-06 18:22:33,242 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:22:33.241502+00:00 +2026-05-06 18:22:33,608 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-06 18:22:33,808 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.566s at 2026-05-07T00:22:33.808058+00:00 +2026-05-06 18:22:46,303 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:22:46.303027+00:00 +2026-05-06 18:22:46,613 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-06 18:22:46,820 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.517s at 2026-05-07T00:22:46.820104+00:00 +2026-05-06 18:22:53,994 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:22:53.994710+00:00 +2026-05-06 18:22:54,335 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-06 18:22:54,531 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.538s at 2026-05-07T00:22:54.531877+00:00 +2026-05-06 18:23:03,058 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:23:03.058568+00:00 +2026-05-06 18:23:03,713 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-06 18:23:03,917 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.859s at 2026-05-07T00:23:03.917765+00:00 +2026-05-06 18:23:13,406 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:23:13.406391+00:00 +2026-05-06 18:23:13,942 INFO backend.segmentation: [APPLY_TEXTURE] flat floor tiling (trap=0.00 < 0.35, skip perspective) +2026-05-06 18:23:13,967 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-06 18:23:14,176 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.771s at 2026-05-07T00:23:14.176983+00:00 +2026-05-06 18:23:56,519 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:23:56.519124+00:00 +2026-05-06 18:23:57,096 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-06 18:23:57,280 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.761s at 2026-05-07T00:23:57.280365+00:00 +2026-05-06 18:30:22,767 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 +2026-05-06 18:30:22,786 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. +2026-05-06 18:30:23,875 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 +2026-05-06 18:30:23,890 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. +2026-05-06 18:30:40,305 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 +2026-05-06 18:30:40,318 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. +2026-05-06 18:30:47,397 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T00:30:47.397798+00:00 +2026-05-06 18:30:47,398 INFO backend.segmentation: [JOB 37f6fc15168b48aea5bf3d353e1cd8bc] preparing_image progress=12 +2026-05-06 18:30:47,494 INFO backend.segmentation: [JOB 37f6fc15168b48aea5bf3d353e1cd8bc] segmenting_with_sam2 progress=30 estimated_seconds=63.05024 +2026-05-06 18:30:47,495 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 +2026-05-06 18:30:50,214 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" +2026-05-06 18:30:52,639 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-06 18:30:52,643 WARNING services.gradio_client_service: GPU Space failed (Cannot find a function with `api_name`: /segment.), trying CPU fallback... +2026-05-06 18:30:52,644 INFO services.gradio_client_service: Calling CPU fallback Space: http://localhost:7861 +2026-05-06 18:30:53,251 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-06 18:30:55,145 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" +2026-05-06 18:30:55,156 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/ecb9300c-1e9f-4a3b-9c4a-3263e97e0a30 "HTTP/1.1 200 OK" +2026-05-06 18:30:57,506 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-06 18:30:57,568 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-06 18:30:59,968 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/b5d0cc5e-3739-47c1-96d5-e2849a4fe991 "HTTP/1.1 200 OK" +2026-05-06 18:30:59,972 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" +2026-05-06 18:31:02,313 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-05-06 18:31:04,749 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=b5d0cc5e-3739-47c1-96d5-e2849a4fe991 "HTTP/1.1 200 OK" +2026-05-06 18:33:25,005 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\bdc55057e453f1e4793eccb7f3297d66322074e960cb173c3fcf63268faa1561\image.webp "HTTP/1.1 200 OK" +2026-05-06 18:33:25,027 INFO services.gradio_client_service: Gradio Space segmentation: entorno=🏙️ Fachada / Exterior motor=SAM Auto (Exteriores - Sin Prompts) mask_count=95 +2026-05-06 18:33:25,028 INFO backend.segmentation: [JOB 37f6fc15168b48aea5bf3d353e1cd8bc] saving_masks progress=92 +2026-05-06 18:33:25,352 INFO backend.segmentation: [JOB 37f6fc15168b48aea5bf3d353e1cd8bc] segments_meta saved (93 segments) +2026-05-06 18:33:25,353 INFO backend.segmentation: [JOB 37f6fc15168b48aea5bf3d353e1cd8bc] done mask_count=95 +2026-05-06 18:33:25,353 INFO backend.segmentation: [UPLOAD_BG] DONE 157.955s at 2026-05-07T00:33:25.353379+00:00 +2026-05-06 18:33:25,354 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-05-06 18:33:32,815 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:33:32.815130+00:00 +2026-05-06 18:33:33,172 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-06 18:33:33,554 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.739s at 2026-05-07T00:33:33.554031+00:00 +2026-05-06 18:33:36,147 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:33:36.147891+00:00 +2026-05-06 18:33:36,589 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.53, h_ratio=1.33) +2026-05-06 18:33:36,616 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-06 18:33:36,847 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.700s at 2026-05-07T00:33:36.847452+00:00 +2026-05-06 18:33:39,658 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:33:39.658618+00:00 +2026-05-06 18:33:40,173 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.53, h_ratio=1.33) +2026-05-06 18:33:40,198 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-06 18:33:40,445 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.787s at 2026-05-07T00:33:40.445326+00:00 +2026-05-06 18:33:42,787 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:33:42.787102+00:00 +2026-05-06 18:33:43,295 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-06 18:33:43,530 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.744s at 2026-05-07T00:33:43.530960+00:00 +2026-05-06 18:33:44,949 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:33:44.949548+00:00 +2026-05-06 18:33:45,490 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-06 18:33:45,716 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.768s at 2026-05-07T00:33:45.716664+00:00 +2026-05-06 18:33:53,000 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:33:53.000130+00:00 +2026-05-06 18:33:53,538 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-06 18:33:53,781 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.781s at 2026-05-07T00:33:53.781571+00:00 +2026-05-06 18:34:12,078 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:34:12.078767+00:00 +2026-05-06 18:34:12,759 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-06 18:34:12,996 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.918s at 2026-05-07T00:34:12.996206+00:00 +2026-05-06 18:34:25,880 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:34:25.880027+00:00 +2026-05-06 18:34:26,401 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-06 18:34:26,649 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.770s at 2026-05-07T00:34:26.649818+00:00 +2026-05-06 18:34:33,573 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:34:33.572267+00:00 +2026-05-06 18:34:33,888 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-06 18:34:34,124 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.551s at 2026-05-07T00:34:34.124108+00:00 +2026-05-06 18:34:38,104 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:34:38.104579+00:00 +2026-05-06 18:34:38,547 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-06 18:34:38,781 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.677s at 2026-05-07T00:34:38.781767+00:00 +2026-05-06 18:34:43,958 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:34:43.958224+00:00 +2026-05-06 18:34:44,396 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.53, h_ratio=1.33) +2026-05-06 18:34:44,422 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-06 18:34:44,657 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.700s at 2026-05-07T00:34:44.657499+00:00 +2026-05-06 18:34:50,537 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:34:50.537840+00:00 +2026-05-06 18:34:50,991 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=2.50, h_ratio=1.82) +2026-05-06 18:34:51,019 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-06 18:34:51,263 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.725s at 2026-05-07T00:34:51.263124+00:00 +2026-05-06 18:34:56,797 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:34:56.797730+00:00 +2026-05-06 18:34:57,208 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-06 18:34:57,462 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.666s at 2026-05-07T00:34:57.462972+00:00 +2026-05-06 18:35:00,689 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:35:00.689108+00:00 +2026-05-06 18:35:01,074 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-06 18:35:01,329 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.641s at 2026-05-07T00:35:01.329788+00:00 +2026-05-06 18:35:02,869 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:35:02.869035+00:00 +2026-05-06 18:35:03,292 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.01, h_ratio=1.45) +2026-05-06 18:35:03,313 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-06 18:35:03,548 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.679s at 2026-05-07T00:35:03.548094+00:00 +2026-05-06 18:35:09,675 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:35:09.675245+00:00 +2026-05-06 18:35:10,176 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.21, h_ratio=1.01) +2026-05-06 18:35:10,210 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-06 18:35:10,449 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.775s at 2026-05-07T00:35:10.449920+00:00 +2026-05-06 18:35:57,783 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:35:57.783409+00:00 +2026-05-06 18:35:58,342 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.53, h_ratio=1.33) +2026-05-06 18:35:58,368 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-06 18:35:58,597 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.814s at 2026-05-07T00:35:58.597593+00:00 +2026-05-06 18:36:05,048 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:36:05.048300+00:00 +2026-05-06 18:36:05,424 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.53, h_ratio=1.33) +2026-05-06 18:36:05,446 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-06 18:36:05,683 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.635s at 2026-05-07T00:36:05.683990+00:00 +2026-05-06 18:36:09,348 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:36:09.348934+00:00 +2026-05-06 18:36:09,689 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-06 18:36:09,939 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.591s at 2026-05-07T00:36:09.939262+00:00 +2026-05-06 18:36:11,515 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:36:11.515772+00:00 +2026-05-06 18:36:11,864 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-06 18:36:12,115 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.600s at 2026-05-07T00:36:12.115522+00:00 +2026-05-06 18:36:14,119 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:36:14.119433+00:00 +2026-05-06 18:36:14,467 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-06 18:36:14,703 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.583s at 2026-05-07T00:36:14.703339+00:00 +2026-05-06 18:36:17,955 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:36:17.955143+00:00 +2026-05-06 18:36:18,323 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=2.50, h_ratio=1.82) +2026-05-06 18:36:18,346 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-06 18:36:18,587 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.632s at 2026-05-07T00:36:18.587038+00:00 +2026-05-06 18:36:29,722 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:36:29.722755+00:00 +2026-05-06 18:36:30,041 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.21, h_ratio=1.01) +2026-05-06 18:36:30,075 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-06 18:36:30,316 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.595s at 2026-05-07T00:36:30.316931+00:00 +2026-05-06 18:36:55,258 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:36:55.258246+00:00 +2026-05-06 18:36:55,839 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.21, h_ratio=1.01) +2026-05-06 18:36:55,875 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-06 18:36:56,125 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.867s at 2026-05-07T00:36:56.124977+00:00 +2026-05-06 18:36:59,138 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:36:59.138564+00:00 +2026-05-06 18:36:59,725 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.01, h_ratio=1.45) +2026-05-06 18:36:59,750 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-06 18:36:59,984 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.846s at 2026-05-07T00:36:59.984763+00:00 +2026-05-06 18:37:16,745 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T00:37:16.745961+00:00 +2026-05-06 18:37:16,745 INFO backend.segmentation: [JOB 884dbcda1cef4f96803a35b3a89b9c60] preparing_image progress=12 +2026-05-06 18:37:16,797 INFO backend.segmentation: [JOB 884dbcda1cef4f96803a35b3a89b9c60] segmenting_with_sam2 progress=30 estimated_seconds=94.01599999999999 +2026-05-06 18:37:16,798 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 +2026-05-06 18:37:19,202 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" +2026-05-06 18:37:21,617 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-06 18:37:21,620 WARNING services.gradio_client_service: GPU Space failed (Cannot find a function with `api_name`: /segment.), trying CPU fallback... +2026-05-06 18:37:21,623 INFO services.gradio_client_service: Calling CPU fallback Space: http://localhost:7861 +2026-05-06 18:37:21,755 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-06 18:37:24,077 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/09adaa1b-fd4b-4053-96e7-e3e0b7cb26b3 "HTTP/1.1 200 OK" +2026-05-06 18:37:24,081 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" +2026-05-06 18:37:26,501 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-06 18:37:26,560 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-06 18:37:28,941 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/450ca127-bb6f-4e37-b304-d51b440a9dbd "HTTP/1.1 200 OK" +2026-05-06 18:37:28,947 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" +2026-05-06 18:37:31,443 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-05-06 18:37:33,986 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=450ca127-bb6f-4e37-b304-d51b440a9dbd "HTTP/1.1 200 OK" +2026-05-06 18:39:54,826 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\8fee556ace9ab88dababff8e3183ddda34f5b57dd22cd0c9c4270241d97fe1a7\image.webp "HTTP/1.1 200 OK" +2026-05-06 18:39:54,847 INFO services.gradio_client_service: Gradio Space segmentation: entorno=🏙️ Fachada / Exterior motor=SAM Auto (Exteriores - Sin Prompts) mask_count=91 +2026-05-06 18:39:54,847 INFO backend.segmentation: [JOB 884dbcda1cef4f96803a35b3a89b9c60] saving_masks progress=92 +2026-05-06 18:39:55,291 INFO backend.segmentation: [JOB 884dbcda1cef4f96803a35b3a89b9c60] segments_meta saved (90 segments) +2026-05-06 18:39:55,291 INFO backend.segmentation: [JOB 884dbcda1cef4f96803a35b3a89b9c60] done mask_count=91 +2026-05-06 18:39:55,292 INFO backend.segmentation: [UPLOAD_BG] DONE 158.546s at 2026-05-07T00:39:55.291225+00:00 +2026-05-06 18:39:55,292 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-05-06 18:40:28,080 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:40:28.080549+00:00 +2026-05-06 18:40:28,641 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm azul.jpg +2026-05-06 18:40:29,060 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.980s at 2026-05-07T00:40:29.060020+00:00 +2026-05-06 18:40:37,726 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:40:37.726439+00:00 +2026-05-06 18:40:38,269 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm azul.jpg +2026-05-06 18:40:38,656 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.930s at 2026-05-07T00:40:38.656587+00:00 +2026-05-06 18:40:41,361 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:40:41.361471+00:00 +2026-05-06 18:40:41,870 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm azul.jpg +2026-05-06 18:40:42,256 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.895s at 2026-05-07T00:40:42.255570+00:00 +2026-05-06 18:40:50,492 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:40:50.492837+00:00 +2026-05-06 18:40:51,018 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm azul.jpg +2026-05-06 18:40:51,365 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.872s at 2026-05-07T00:40:51.364239+00:00 +2026-05-06 18:40:53,275 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:40:53.275769+00:00 +2026-05-06 18:40:53,826 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm azul.jpg +2026-05-06 18:40:54,179 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.905s at 2026-05-07T00:40:54.179973+00:00 +2026-05-06 18:41:02,123 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:41:02.123703+00:00 +2026-05-06 18:41:02,497 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm azul.jpg +2026-05-06 18:41:02,880 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.756s at 2026-05-07T00:41:02.880196+00:00 +2026-05-06 18:41:13,602 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:41:13.602484+00:00 +2026-05-06 18:41:14,055 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm azul.jpg +2026-05-06 18:41:14,428 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.827s at 2026-05-07T00:41:14.428892+00:00 +2026-05-06 18:41:19,676 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:41:19.676717+00:00 +2026-05-06 18:41:20,113 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm azul.jpg +2026-05-06 18:41:20,484 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.808s at 2026-05-07T00:41:20.484587+00:00 +2026-05-06 18:41:28,383 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:41:28.383560+00:00 +2026-05-06 18:41:28,729 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm azul.jpg +2026-05-06 18:41:29,136 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.752s at 2026-05-07T00:41:29.136269+00:00 +2026-05-06 18:42:20,651 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T00:42:20.651898+00:00 +2026-05-06 18:42:20,652 INFO backend.segmentation: [JOB f7c2c35798df4443b6954b52ae0e50c7] preparing_image progress=12 +2026-05-06 18:42:20,720 INFO backend.segmentation: [JOB f7c2c35798df4443b6954b52ae0e50c7] segmenting_with_sam2 progress=30 estimated_seconds=58.39104 +2026-05-06 18:42:20,722 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 +2026-05-06 18:42:23,169 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" +2026-05-06 18:42:25,513 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-06 18:42:25,518 WARNING services.gradio_client_service: GPU Space failed (Cannot find a function with `api_name`: /segment.), trying CPU fallback... +2026-05-06 18:42:25,523 INFO services.gradio_client_service: Calling CPU fallback Space: http://localhost:7861 +2026-05-06 18:42:25,648 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-06 18:42:27,979 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" +2026-05-06 18:42:28,011 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/eff4d6f4-a526-4e3c-885b-21716e034b5b "HTTP/1.1 200 OK" +2026-05-06 18:42:30,320 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-06 18:42:30,384 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-06 18:42:32,775 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/bb6c3136-6f1c-4623-bf35-86865beea318 "HTTP/1.1 200 OK" +2026-05-06 18:42:32,825 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" +2026-05-06 18:42:35,212 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-05-06 18:42:37,701 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=bb6c3136-6f1c-4623-bf35-86865beea318 "HTTP/1.1 200 OK" +2026-05-06 18:43:12,742 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\bd5cc89cdf220f59a58e54c17de42ccd2fe478787be6fafda37778eaf1d6f8c0\image.webp "HTTP/1.1 200 OK" +2026-05-06 18:43:12,768 INFO services.gradio_client_service: Gradio Space segmentation: entorno=🛋️ Interiores (Sala / Cuartos) motor=SegFormer (SegFormer ADE20K+ DINO) + SAM 2.1 mask_count=15 +2026-05-06 18:43:12,768 INFO backend.segmentation: [JOB f7c2c35798df4443b6954b52ae0e50c7] saving_masks progress=92 +2026-05-06 18:43:12,827 INFO backend.segmentation: [JOB f7c2c35798df4443b6954b52ae0e50c7] segments_meta saved (9 segments) +2026-05-06 18:43:12,828 INFO backend.segmentation: [JOB f7c2c35798df4443b6954b52ae0e50c7] done mask_count=15 +2026-05-06 18:43:12,828 INFO backend.segmentation: [UPLOAD_BG] DONE 52.177s at 2026-05-07T00:43:12.828557+00:00 +2026-05-06 18:43:12,829 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-05-06 18:43:24,334 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:43:24.334962+00:00 +2026-05-06 18:43:24,892 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.41.58.jpg +2026-05-06 18:43:25,127 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.792s at 2026-05-07T00:43:25.127393+00:00 +2026-05-06 18:45:52,139 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:45:52.139300+00:00 +2026-05-06 18:45:52,631 INFO backend.segmentation: [APPLY_TEXTURE] flat floor tiling (trap=0.00 < 0.35, skip perspective) +2026-05-06 18:45:52,652 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.41.58.jpg +2026-05-06 18:45:52,934 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.795s at 2026-05-07T00:45:52.934786+00:00 +2026-05-06 18:48:05,742 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T00:48:05.742257+00:00 +2026-05-06 18:48:05,742 INFO backend.segmentation: [JOB 6b7b7b29836840008fe1b69188169fdd] preparing_image progress=12 +2026-05-06 18:48:05,805 INFO backend.segmentation: [JOB 6b7b7b29836840008fe1b69188169fdd] segmenting_with_sam2 progress=30 estimated_seconds=58.39104 +2026-05-06 18:48:05,806 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 +2026-05-06 18:48:08,161 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" +2026-05-06 18:48:10,524 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-06 18:48:10,528 WARNING services.gradio_client_service: GPU Space failed (Cannot find a function with `api_name`: /segment.), trying CPU fallback... +2026-05-06 18:48:10,529 INFO services.gradio_client_service: Calling CPU fallback Space: http://localhost:7861 +2026-05-06 18:48:10,657 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-06 18:48:12,980 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/7be43e9c-5bea-422d-bb06-60720d9880bf "HTTP/1.1 200 OK" +2026-05-06 18:48:12,981 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" +2026-05-06 18:48:15,268 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-06 18:48:15,340 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-06 18:48:17,721 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/562af56b-498c-4c62-9020-b784b3cd3643 "HTTP/1.1 200 OK" +2026-05-06 18:48:17,756 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" +2026-05-06 18:48:20,089 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-05-06 18:48:22,469 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=562af56b-498c-4c62-9020-b784b3cd3643 "HTTP/1.1 200 OK" +2026-05-06 18:50:33,287 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\307e144a6a358b2b31461825d5a83d98d89d0a4426bbff036b53a58abbce6a7f\image.webp "HTTP/1.1 200 OK" +2026-05-06 18:50:33,299 INFO services.gradio_client_service: Gradio Space segmentation: entorno=auto motor=SAM Auto (Exteriores - Sin Prompts) mask_count=75 +2026-05-06 18:50:33,301 INFO backend.segmentation: [JOB 6b7b7b29836840008fe1b69188169fdd] saving_masks progress=92 +2026-05-06 18:50:33,531 INFO backend.segmentation: [JOB 6b7b7b29836840008fe1b69188169fdd] segments_meta saved (65 segments) +2026-05-06 18:50:33,534 INFO backend.segmentation: [JOB 6b7b7b29836840008fe1b69188169fdd] done mask_count=75 +2026-05-06 18:50:33,534 INFO backend.segmentation: [UPLOAD_BG] DONE 147.793s at 2026-05-07T00:50:33.534228+00:00 +2026-05-06 18:50:33,535 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-05-06 18:50:43,317 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:50:43.317662+00:00 +2026-05-06 18:50:43,744 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.18, h_ratio=287.00) +2026-05-06 18:50:43,761 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-06 18:50:43,971 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.654s at 2026-05-07T00:50:43.971226+00:00 +2026-05-06 18:50:48,879 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:50:48.879893+00:00 +2026-05-06 18:50:49,294 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-06 18:50:49,529 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.649s at 2026-05-07T00:50:49.529626+00:00 +2026-05-06 18:50:57,857 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:50:57.857319+00:00 +2026-05-06 18:50:58,384 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.03, h_ratio=1.27) +2026-05-06 18:50:58,407 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-06 18:50:58,621 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.764s at 2026-05-07T00:50:58.621573+00:00 +2026-05-06 18:51:06,144 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:51:06.144106+00:00 +2026-05-06 18:51:06,633 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.25, h_ratio=1.00) +2026-05-06 18:51:06,651 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-06 18:51:06,863 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.719s at 2026-05-07T00:51:06.863196+00:00 +2026-05-06 18:51:15,682 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:51:15.682186+00:00 +2026-05-06 18:51:16,277 INFO backend.segmentation: [APPLY_TEXTURE] flat floor tiling (trap=0.00 < 0.35, skip perspective) +2026-05-06 18:51:16,298 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-06 18:51:16,515 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.833s at 2026-05-07T00:51:16.515186+00:00 +2026-05-06 18:51:19,654 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:51:19.654232+00:00 +2026-05-06 18:51:19,971 INFO backend.segmentation: [APPLY_TEXTURE] flat floor tiling (trap=0.00 < 0.35, skip perspective) +2026-05-06 18:51:19,990 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-06 18:51:20,208 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.555s at 2026-05-07T00:51:20.208584+00:00 +2026-05-06 18:52:00,456 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:52:00.456384+00:00 +2026-05-06 18:52:00,996 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.03, h_ratio=292.55) +2026-05-06 18:52:01,022 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-06 18:52:01,244 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.788s at 2026-05-07T00:52:01.244355+00:00 +2026-05-06 18:52:26,614 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:52:26.614595+00:00 +2026-05-06 18:52:27,072 INFO backend.segmentation: [APPLY_TEXTURE] flat floor tiling (trap=0.00 < 0.35, skip perspective) +2026-05-06 18:52:27,091 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-06 18:52:27,309 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.695s at 2026-05-07T00:52:27.309474+00:00 +2026-05-06 18:52:31,418 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:52:31.418579+00:00 +2026-05-06 18:52:31,917 INFO backend.segmentation: [APPLY_TEXTURE] flat floor tiling (trap=0.00 < 0.35, skip perspective) +2026-05-06 18:52:31,937 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-06 18:52:32,167 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.748s at 2026-05-07T00:52:32.167442+00:00 +2026-05-06 18:52:36,908 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:52:36.908697+00:00 +2026-05-06 18:52:37,340 INFO backend.segmentation: [APPLY_TEXTURE] flat floor tiling (trap=0.00 < 0.35, skip perspective) +2026-05-06 18:52:37,360 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-06 18:52:37,571 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.663s at 2026-05-07T00:52:37.571758+00:00 +2026-05-06 18:52:42,394 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:52:42.394838+00:00 +2026-05-06 18:52:42,800 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-06 18:52:43,012 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.618s at 2026-05-07T00:52:43.012733+00:00 +2026-05-06 18:53:17,599 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:53:17.599012+00:00 +2026-05-06 18:53:18,767 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-06 18:53:19,517 INFO backend.segmentation: [APPLY_TEXTURE] DONE 1.918s at 2026-05-07T00:53:19.517003+00:00 +2026-05-06 18:53:20,941 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:53:20.941029+00:00 +2026-05-06 18:53:22,268 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.18, h_ratio=287.00) +2026-05-06 18:53:22,309 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-06 18:53:22,958 INFO backend.segmentation: [APPLY_TEXTURE] DONE 2.017s at 2026-05-07T00:53:22.958657+00:00 +2026-05-06 18:53:26,815 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:53:26.815426+00:00 +2026-05-06 18:53:27,767 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.18, h_ratio=287.00) +2026-05-06 18:53:27,822 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-06 18:53:28,496 INFO backend.segmentation: [APPLY_TEXTURE] DONE 1.681s at 2026-05-07T00:53:28.496136+00:00 +2026-05-06 18:53:29,211 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:53:29.211502+00:00 +2026-05-06 18:53:30,092 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-06 18:53:30,714 INFO backend.segmentation: [APPLY_TEXTURE] DONE 1.503s at 2026-05-07T00:53:30.714065+00:00 +2026-05-06 18:53:43,274 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T00:53:43.274502+00:00 +2026-05-06 18:53:44,185 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.01, h_ratio=1.80) +2026-05-06 18:53:44,258 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-06 18:53:44,915 INFO backend.segmentation: [APPLY_TEXTURE] DONE 1.642s at 2026-05-07T00:53:44.915473+00:00 +2026-05-06 18:56:42,127 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=https://eduardo4547-hyper-reality-sam2-gpu.hf.space +2026-05-06 18:56:42,164 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. +2026-05-06 18:56:55,483 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T00:56:55.483048+00:00 +2026-05-06 18:56:55,487 INFO backend.segmentation: [JOB b2b162abddce42c7a37266a35a44b3e4] preparing_image progress=12 +2026-05-06 18:56:55,916 INFO backend.segmentation: [JOB b2b162abddce42c7a37266a35a44b3e4] segmenting_with_sam2 progress=30 estimated_seconds=58.39104 +2026-05-06 18:56:55,930 INFO services.gradio_client_service: Calling GPU Gradio Space: https://eduardo4547-hyper-reality-sam2-gpu.hf.space +2026-05-06 18:57:00,068 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" +2026-05-06 18:57:01,629 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-06 18:57:01,716 WARNING services.gradio_client_service: GPU Space failed (Cannot find a function with `api_name`: /segment.), trying CPU fallback... +2026-05-06 18:57:01,731 INFO services.gradio_client_service: Calling CPU fallback Space: http://localhost:7861 +2026-05-06 18:57:02,949 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-06 18:57:03,037 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/a5e246b1-7256-4e47-bd59-4324d860981a "HTTP/1.1 200 OK" +2026-05-06 18:57:04,851 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" +2026-05-06 18:57:08,278 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-06 18:57:08,445 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-06 18:57:11,795 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/80c98c2b-f464-4c63-be57-df896c3ca445 "HTTP/1.1 200 OK" +2026-05-06 18:57:11,848 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" +2026-05-06 18:57:14,425 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-05-06 18:57:16,934 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=80c98c2b-f464-4c63-be57-df896c3ca445 "HTTP/1.1 200 OK" +2026-05-06 18:59:19,174 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\307e144a6a358b2b31461825d5a83d98d89d0a4426bbff036b53a58abbce6a7f\image.webp "HTTP/1.1 200 OK" +2026-05-06 18:59:19,199 INFO services.gradio_client_service: Gradio Space segmentation: entorno=auto motor=SAM Auto (Exteriores - Sin Prompts) mask_count=75 +2026-05-06 18:59:19,201 INFO backend.segmentation: [JOB b2b162abddce42c7a37266a35a44b3e4] saving_masks progress=92 +2026-05-06 18:59:19,479 INFO backend.segmentation: [JOB b2b162abddce42c7a37266a35a44b3e4] segments_meta saved (65 segments) +2026-05-06 18:59:19,480 INFO backend.segmentation: [JOB b2b162abddce42c7a37266a35a44b3e4] done mask_count=75 +2026-05-06 18:59:19,481 INFO backend.segmentation: [UPLOAD_BG] DONE 143.997s at 2026-05-07T00:59:19.481114+00:00 +2026-05-06 18:59:19,481 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-05-06 19:00:44,615 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=https://eduardo4547-hyper-reality-sam2-gpu.hf.space +2026-05-06 19:00:44,631 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. +2026-05-06 19:00:54,117 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T01:00:54.117066+00:00 +2026-05-06 19:00:54,118 INFO backend.segmentation: [JOB 857272f2f2794d61a8320ba9fc0a0b9c] preparing_image progress=12 +2026-05-06 19:00:54,227 INFO backend.segmentation: [JOB 857272f2f2794d61a8320ba9fc0a0b9c] segmenting_with_sam2 progress=30 estimated_seconds=58.39104 +2026-05-06 19:00:54,228 INFO services.gradio_client_service: Calling GPU Gradio Space: https://eduardo4547-hyper-reality-sam2-gpu.hf.space +2026-05-06 19:00:55,352 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" +2026-05-06 19:00:55,962 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-06 19:00:56,025 WARNING services.gradio_client_service: GPU Space failed (Cannot find a function with `api_name`: /segment.), trying CPU fallback... +2026-05-06 19:00:56,027 ERROR backend.segmentation: [JOB 857272f2f2794d61a8320ba9fc0a0b9c] failed: GPU Gradio Space failed and no CPU fallback configured. Error: Cannot find a function with `api_name`: /segment. +Traceback (most recent call last): + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\image_service.py", line 137, in run_upload_job + label_map, mask_count = segment_via_gradio_sync(image_path) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 87, in segment_via_gradio_sync + raise RuntimeError(f"GPU Gradio Space failed and no CPU fallback configured. Error: {gpu_error}") +RuntimeError: GPU Gradio Space failed and no CPU fallback configured. Error: Cannot find a function with `api_name`: /segment. +2026-05-06 19:00:56,028 INFO backend.segmentation: [UPLOAD_BG] DONE 1.912s at 2026-05-07T01:00:56.028803+00:00 +2026-05-06 19:00:56,029 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-05-06 19:00:56,598 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-06 19:00:56,674 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/4209bbfb-31fd-49ce-8bfa-3bd088857ca8 "HTTP/1.1 200 OK" +2026-05-06 19:01:51,403 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T01:01:51.403342+00:00 +2026-05-06 19:01:51,403 INFO backend.segmentation: [JOB 3767a577a5df43449aa13600c7a14d0c] preparing_image progress=12 +2026-05-06 19:01:51,499 INFO backend.segmentation: [JOB 3767a577a5df43449aa13600c7a14d0c] segmenting_with_sam2 progress=30 estimated_seconds=58.39104 +2026-05-06 19:01:51,499 INFO services.gradio_client_service: Calling GPU Gradio Space: https://eduardo4547-hyper-reality-sam2-gpu.hf.space +2026-05-06 19:01:52,190 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" +2026-05-06 19:01:52,799 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-06 19:01:52,856 WARNING services.gradio_client_service: GPU Space failed (Cannot find a function with `api_name`: /segment.), trying CPU fallback... +2026-05-06 19:01:52,857 ERROR backend.segmentation: [JOB 3767a577a5df43449aa13600c7a14d0c] failed: GPU Gradio Space failed and no CPU fallback configured. Error: Cannot find a function with `api_name`: /segment. +Traceback (most recent call last): + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\image_service.py", line 137, in run_upload_job + label_map, mask_count = segment_via_gradio_sync(image_path) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 87, in segment_via_gradio_sync + raise RuntimeError(f"GPU Gradio Space failed and no CPU fallback configured. Error: {gpu_error}") +RuntimeError: GPU Gradio Space failed and no CPU fallback configured. Error: Cannot find a function with `api_name`: /segment. +2026-05-06 19:01:52,858 INFO backend.segmentation: [UPLOAD_BG] DONE 1.455s at 2026-05-07T01:01:52.858105+00:00 +2026-05-06 19:01:52,858 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-05-06 19:01:53,023 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-06 19:01:53,494 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/2c3065a9-d718-45a7-8b87-980f332c885e "HTTP/1.1 200 OK" +2026-05-06 19:17:22,918 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T01:17:22.918521+00:00 +2026-05-06 19:17:22,918 INFO backend.segmentation: [JOB 2f51a6c8a71e4a1abde690771af923c8] preparing_image progress=12 +2026-05-06 19:17:23,012 INFO backend.segmentation: [JOB 2f51a6c8a71e4a1abde690771af923c8] segmenting_with_sam2 progress=30 estimated_seconds=58.39104 +2026-05-06 19:17:23,013 INFO services.gradio_client_service: Calling GPU Gradio Space: https://eduardo4547-hyper-reality-sam2-gpu.hf.space +2026-05-06 19:17:23,790 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" +2026-05-06 19:17:24,541 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-06 19:17:24,595 WARNING services.gradio_client_service: GPU Space failed (Cannot find a function with `api_name`: /segment.), trying CPU fallback... +2026-05-06 19:17:24,596 ERROR backend.segmentation: [JOB 2f51a6c8a71e4a1abde690771af923c8] failed: GPU Gradio Space failed and no CPU fallback configured. Error: Cannot find a function with `api_name`: /segment. +Traceback (most recent call last): + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\image_service.py", line 137, in run_upload_job + label_map, mask_count = segment_via_gradio_sync(image_path) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 87, in segment_via_gradio_sync + raise RuntimeError(f"GPU Gradio Space failed and no CPU fallback configured. Error: {gpu_error}") +RuntimeError: GPU Gradio Space failed and no CPU fallback configured. Error: Cannot find a function with `api_name`: /segment. +2026-05-06 19:17:24,598 INFO backend.segmentation: [UPLOAD_BG] DONE 1.680s at 2026-05-07T01:17:24.598238+00:00 +2026-05-06 19:17:24,599 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-05-06 19:17:24,970 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-06 19:17:25,584 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/0dc57ee9-5e05-4959-abe6-f013266fa198 "HTTP/1.1 200 OK" +2026-05-06 19:17:42,518 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 +2026-05-06 19:17:42,533 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. +2026-05-06 19:17:51,915 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T01:17:51.915900+00:00 +2026-05-06 19:17:51,915 INFO backend.segmentation: [JOB 63e59d4c364544d9a7e673575d6476fa] preparing_image progress=12 +2026-05-06 19:17:52,074 INFO backend.segmentation: [JOB 63e59d4c364544d9a7e673575d6476fa] segmenting_with_sam2 progress=30 estimated_seconds=58.39104 +2026-05-06 19:17:52,077 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 +2026-05-06 19:17:55,274 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" +2026-05-06 19:17:57,503 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-06 19:17:57,507 WARNING services.gradio_client_service: GPU Space failed (Cannot find a function with `api_name`: /segment.), trying CPU fallback... +2026-05-06 19:17:57,507 INFO services.gradio_client_service: Calling CPU fallback Space: http://localhost:7861 +2026-05-06 19:17:57,893 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-06 19:17:59,796 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/f7a98d0a-9306-4dbc-93b7-601ff79c950e "HTTP/1.1 200 OK" +2026-05-06 19:17:59,799 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" +2026-05-06 19:18:02,032 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-06 19:18:02,104 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-06 19:18:04,304 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/2d410380-be25-4691-8948-df224948856b "HTTP/1.1 200 OK" +2026-05-06 19:18:04,308 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" +2026-05-06 19:18:06,507 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-05-06 19:18:08,705 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=2d410380-be25-4691-8948-df224948856b "HTTP/1.1 200 OK" +2026-05-06 19:20:30,315 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\ba6745bca4b9348c165f22fc4ea78e92894e852d9a17a054a2f8f302e7eede49\image.webp "HTTP/1.1 200 OK" +2026-05-06 19:20:30,336 INFO services.gradio_client_service: Gradio Space segmentation: entorno=auto motor=SAM Auto (Exteriores - Sin Prompts) mask_count=108 +2026-05-06 19:20:30,342 INFO backend.segmentation: [JOB 63e59d4c364544d9a7e673575d6476fa] saving_masks progress=92 +2026-05-06 19:20:30,735 INFO backend.segmentation: [JOB 63e59d4c364544d9a7e673575d6476fa] segments_meta saved (94 segments) +2026-05-06 19:20:30,736 INFO backend.segmentation: [JOB 63e59d4c364544d9a7e673575d6476fa] done mask_count=108 +2026-05-06 19:20:30,736 INFO backend.segmentation: [UPLOAD_BG] DONE 158.821s at 2026-05-07T01:20:30.736356+00:00 +2026-05-06 19:20:30,736 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-05-06 19:20:54,598 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:20:54.598398+00:00 +2026-05-06 19:20:55,454 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.22, h_ratio=1.42) +2026-05-06 19:20:55,479 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-06 19:20:55,852 INFO backend.segmentation: [APPLY_TEXTURE] DONE 1.253s at 2026-05-07T01:20:55.852286+00:00 +2026-05-06 19:21:02,878 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:21:02.878905+00:00 +2026-05-06 19:21:03,409 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.53, h_ratio=1.03) +2026-05-06 19:21:03,430 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-06 19:21:03,652 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.774s at 2026-05-07T01:21:03.652782+00:00 +2026-05-06 19:21:04,556 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:21:04.556252+00:00 +2026-05-06 19:21:05,073 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-06 19:21:05,304 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.749s at 2026-05-07T01:21:05.304889+00:00 +2026-05-06 19:21:09,382 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:21:09.382363+00:00 +2026-05-06 19:21:09,876 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-06 19:21:10,099 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.717s at 2026-05-07T01:21:10.099363+00:00 +2026-05-06 19:21:12,168 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:21:12.168998+00:00 +2026-05-06 19:21:12,676 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-06 19:21:12,902 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.734s at 2026-05-07T01:21:12.902123+00:00 +2026-05-06 19:21:17,676 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:21:17.676155+00:00 +2026-05-06 19:21:18,186 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-06 19:21:18,406 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.730s at 2026-05-07T01:21:18.406221+00:00 +2026-05-06 19:21:28,033 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:21:28.033139+00:00 +2026-05-06 19:21:28,602 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.04, h_ratio=30.15) +2026-05-06 19:21:28,621 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-06 19:21:28,847 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.815s at 2026-05-07T01:21:28.847576+00:00 +2026-05-06 19:21:37,759 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:21:37.759732+00:00 +2026-05-06 19:21:38,294 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.08, h_ratio=2.31) +2026-05-06 19:21:38,324 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-06 19:21:38,542 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.783s at 2026-05-07T01:21:38.542862+00:00 +2026-05-06 19:21:45,517 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:21:45.517095+00:00 +2026-05-06 19:21:45,886 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=2.45, h_ratio=1.00) +2026-05-06 19:21:45,904 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-06 19:21:46,127 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.610s at 2026-05-07T01:21:46.127155+00:00 +2026-05-06 19:21:47,910 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:21:47.910379+00:00 +2026-05-06 19:21:48,240 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.53, h_ratio=1.03) +2026-05-06 19:21:48,258 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-06 19:21:48,550 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.640s at 2026-05-07T01:21:48.550311+00:00 +2026-05-06 19:22:01,490 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:22:01.490043+00:00 +2026-05-06 19:22:01,800 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.40, h_ratio=1.19) +2026-05-06 19:22:01,820 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-06 19:22:02,038 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.549s at 2026-05-07T01:22:02.038685+00:00 +2026-05-06 19:22:14,676 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:22:14.676095+00:00 +2026-05-06 19:22:14,981 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.01, h_ratio=1.24) +2026-05-06 19:22:15,000 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-06 19:22:15,217 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.542s at 2026-05-07T01:22:15.217076+00:00 +2026-05-06 19:22:18,393 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:22:18.393596+00:00 +2026-05-06 19:22:18,727 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=3.19, h_ratio=1.08) +2026-05-06 19:22:18,748 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-06 19:22:18,967 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.573s at 2026-05-07T01:22:18.967471+00:00 +2026-05-06 19:22:20,453 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:22:20.453051+00:00 +2026-05-06 19:22:20,787 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.25, h_ratio=1.00) +2026-05-06 19:22:20,807 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-06 19:22:21,031 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.578s at 2026-05-07T01:22:21.031223+00:00 +2026-05-06 19:22:21,815 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:22:21.815779+00:00 +2026-05-06 19:22:22,122 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-06 19:22:22,328 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.512s at 2026-05-07T01:22:22.328994+00:00 +2026-05-06 19:23:32,211 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:23:32.211857+00:00 +2026-05-06 19:23:32,509 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-06 19:23:32,730 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.518s at 2026-05-07T01:23:32.730152+00:00 +2026-05-06 19:23:38,227 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:23:38.227849+00:00 +2026-05-06 19:23:38,534 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-06 19:23:38,859 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.632s at 2026-05-07T01:23:38.859962+00:00 +2026-05-06 19:26:19,159 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T01:26:19.158670+00:00 +2026-05-06 19:26:19,159 INFO backend.segmentation: [JOB 8008bb4df0774cc693f720f155ffe536] preparing_image progress=12 +2026-05-06 19:26:19,236 INFO backend.segmentation: [JOB 8008bb4df0774cc693f720f155ffe536] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 +2026-05-06 19:26:19,237 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 +2026-05-06 19:26:21,653 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" +2026-05-06 19:26:24,033 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-06 19:26:24,036 WARNING services.gradio_client_service: GPU Space failed (Cannot find a function with `api_name`: /segment.), trying CPU fallback... +2026-05-06 19:26:24,038 INFO services.gradio_client_service: Calling CPU fallback Space: http://localhost:7861 +2026-05-06 19:26:24,154 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-06 19:26:25,313 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T01:26:25.313791+00:00 +2026-05-06 19:26:25,314 INFO backend.segmentation: [JOB 7aac21170040414a9aefcbeb3fbff6c5] preparing_image progress=12 +2026-05-06 19:26:25,380 INFO backend.segmentation: [JOB 7aac21170040414a9aefcbeb3fbff6c5] segmenting_with_sam2 progress=30 estimated_seconds=58.39104 +2026-05-06 19:26:25,382 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 +2026-05-06 19:26:26,501 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" +2026-05-06 19:26:26,514 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/253a1026-e06a-44b1-a442-8e6324d90510 "HTTP/1.1 200 OK" +2026-05-06 19:26:27,773 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" +2026-05-06 19:26:28,745 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-06 19:26:28,804 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-06 19:26:29,998 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-06 19:26:30,000 WARNING services.gradio_client_service: GPU Space failed (Cannot find a function with `api_name`: /segment.), trying CPU fallback... +2026-05-06 19:26:30,000 INFO services.gradio_client_service: Calling CPU fallback Space: http://localhost:7861 +2026-05-06 19:26:30,064 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-06 19:26:31,044 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/ef93ac7c-1d1e-49c1-a68d-1e312c61dbd6 "HTTP/1.1 200 OK" +2026-05-06 19:26:31,045 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" +2026-05-06 19:26:32,302 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/f94b5838-f8e4-404c-b91a-44c18e0fd13d "HTTP/1.1 200 OK" +2026-05-06 19:26:32,303 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" +2026-05-06 19:26:33,276 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-05-06 19:26:34,511 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-06 19:26:34,571 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-06 19:26:35,511 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=ef93ac7c-1d1e-49c1-a68d-1e312c61dbd6 "HTTP/1.1 200 OK" +2026-05-06 19:26:36,930 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/f61335a1-cff8-4529-990e-d2408f346c4b "HTTP/1.1 200 OK" +2026-05-06 19:26:36,985 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" +2026-05-06 19:26:39,872 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-05-06 19:26:42,392 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=f61335a1-cff8-4529-990e-d2408f346c4b "HTTP/1.1 200 OK" +2026-05-06 19:28:56,877 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\6ab9a3531b560f214c105197415e0af0532fde83c6bfe58ed1c0313fcd859477\image.webp "HTTP/1.1 200 OK" +2026-05-06 19:28:56,897 INFO services.gradio_client_service: Gradio Space segmentation: entorno=auto motor=SAM Auto (Exteriores - Sin Prompts) mask_count=131 +2026-05-06 19:28:56,898 INFO backend.segmentation: [JOB 8008bb4df0774cc693f720f155ffe536] saving_masks progress=92 +2026-05-06 19:28:57,283 INFO backend.segmentation: [JOB 8008bb4df0774cc693f720f155ffe536] segments_meta saved (100 segments) +2026-05-06 19:28:57,286 INFO backend.segmentation: [JOB 8008bb4df0774cc693f720f155ffe536] done mask_count=131 +2026-05-06 19:28:57,290 INFO backend.segmentation: [UPLOAD_BG] DONE 158.131s at 2026-05-07T01:28:57.289976+00:00 +2026-05-06 19:28:57,290 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-05-06 19:31:09,088 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\0fad9dd5d2167e81275663b268759f254ced3260a00596d8148c4b82b18a447b\image.webp "HTTP/1.1 200 OK" +2026-05-06 19:31:09,105 INFO services.gradio_client_service: Gradio Space segmentation: entorno=auto motor=SAM Auto (Exteriores - Sin Prompts) mask_count=108 +2026-05-06 19:31:09,106 INFO backend.segmentation: [JOB 7aac21170040414a9aefcbeb3fbff6c5] saving_masks progress=92 +2026-05-06 19:31:09,387 INFO backend.segmentation: [JOB 7aac21170040414a9aefcbeb3fbff6c5] segments_meta saved (83 segments) +2026-05-06 19:31:09,388 INFO backend.segmentation: [JOB 7aac21170040414a9aefcbeb3fbff6c5] done mask_count=108 +2026-05-06 19:31:09,389 INFO backend.segmentation: [UPLOAD_BG] DONE 284.075s at 2026-05-07T01:31:09.389195+00:00 +2026-05-06 19:31:09,389 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-05-06 19:31:25,769 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:31:25.769543+00:00 +2026-05-06 19:31:26,322 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.38, h_ratio=1.21) +2026-05-06 19:31:26,345 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-06 19:31:26,561 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.791s at 2026-05-07T01:31:26.561149+00:00 +2026-05-06 19:31:30,093 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:31:30.093130+00:00 +2026-05-06 19:31:30,610 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=73.16, h_ratio=1.19) +2026-05-06 19:31:30,630 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-06 19:31:30,852 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.760s at 2026-05-07T01:31:30.852656+00:00 +2026-05-06 19:31:32,510 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:31:32.510227+00:00 +2026-05-06 19:31:33,024 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-06 19:31:33,261 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.751s at 2026-05-07T01:31:33.261864+00:00 +2026-05-06 19:31:34,688 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:31:34.688411+00:00 +2026-05-06 19:31:35,245 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=2.82, h_ratio=1.04) +2026-05-06 19:31:35,273 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-06 19:31:35,585 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.897s at 2026-05-07T01:31:35.585466+00:00 +2026-05-06 19:31:37,308 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:31:37.308846+00:00 +2026-05-06 19:31:37,845 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-06 19:31:38,063 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.754s at 2026-05-07T01:31:38.063134+00:00 +2026-05-06 19:31:39,470 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:31:39.470279+00:00 +2026-05-06 19:31:40,021 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.01, h_ratio=1.28) +2026-05-06 19:31:40,041 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-06 19:31:40,265 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.795s at 2026-05-07T01:31:40.265221+00:00 +2026-05-06 19:32:07,072 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T01:32:07.072763+00:00 +2026-05-06 19:32:07,073 INFO backend.segmentation: [JOB 28de69b0b9f74b04a79ddc8f1c43f4a5] preparing_image progress=12 +2026-05-06 19:32:07,137 INFO backend.segmentation: [JOB 28de69b0b9f74b04a79ddc8f1c43f4a5] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 +2026-05-06 19:32:07,137 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 +2026-05-06 19:32:09,529 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" +2026-05-06 19:32:11,885 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-06 19:32:11,888 WARNING services.gradio_client_service: GPU Space failed (Cannot find a function with `api_name`: /segment.), trying CPU fallback... +2026-05-06 19:32:11,888 INFO services.gradio_client_service: Calling CPU fallback Space: http://localhost:7861 +2026-05-06 19:32:12,020 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-06 19:32:14,326 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/be75cb37-7b07-4bcc-8b3d-efdee17bbc4a "HTTP/1.1 200 OK" +2026-05-06 19:32:14,327 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" +2026-05-06 19:32:16,703 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-06 19:32:16,767 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-06 19:32:19,164 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/c6911703-f527-40a3-889a-6c77edcd8d21 "HTTP/1.1 200 OK" +2026-05-06 19:32:19,202 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" +2026-05-06 19:32:21,606 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-05-06 19:32:24,189 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=c6911703-f527-40a3-889a-6c77edcd8d21 "HTTP/1.1 200 OK" +2026-05-06 19:34:39,587 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\21889eae2fc6a2146ef59d302265bd9c57edff263c81a559c184526108f142d6\image.webp "HTTP/1.1 200 OK" +2026-05-06 19:34:39,600 INFO services.gradio_client_service: Gradio Space segmentation: entorno=auto motor=SAM Auto (Exteriores - Sin Prompts) mask_count=160 +2026-05-06 19:34:39,601 INFO backend.segmentation: [JOB 28de69b0b9f74b04a79ddc8f1c43f4a5] saving_masks progress=92 +2026-05-06 19:34:39,913 INFO backend.segmentation: [JOB 28de69b0b9f74b04a79ddc8f1c43f4a5] segments_meta saved (109 segments) +2026-05-06 19:34:39,916 INFO backend.segmentation: [JOB 28de69b0b9f74b04a79ddc8f1c43f4a5] done mask_count=160 +2026-05-06 19:34:39,916 INFO backend.segmentation: [UPLOAD_BG] DONE 152.844s at 2026-05-07T01:34:39.916411+00:00 +2026-05-06 19:34:39,917 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-05-06 19:34:58,860 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:34:58.860869+00:00 +2026-05-06 19:34:59,384 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.01, h_ratio=2.09) +2026-05-06 19:34:59,410 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-05-06 19:34:59,597 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.737s at 2026-05-07T01:34:59.597723+00:00 +2026-05-06 19:35:04,315 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:35:04.314184+00:00 +2026-05-06 19:35:04,828 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-05-06 19:35:05,031 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.717s at 2026-05-07T01:35:05.031564+00:00 +2026-05-06 19:35:07,195 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:35:07.195100+00:00 +2026-05-06 19:35:07,775 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-05-06 19:35:07,959 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.764s at 2026-05-07T01:35:07.959507+00:00 +2026-05-06 19:35:16,717 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:35:16.717055+00:00 +2026-05-06 19:35:17,292 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.12, h_ratio=1.24) +2026-05-06 19:35:17,313 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-05-06 19:35:17,489 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.772s at 2026-05-07T01:35:17.489338+00:00 +2026-05-06 19:35:21,896 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:35:21.896286+00:00 +2026-05-06 19:35:22,460 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.24, h_ratio=2.25) +2026-05-06 19:35:22,477 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-05-06 19:35:22,652 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.756s at 2026-05-07T01:35:22.652693+00:00 +2026-05-06 19:35:31,661 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T01:35:31.661603+00:00 +2026-05-06 19:35:31,662 INFO backend.segmentation: [JOB 97d58fca6faa4b94b385e3762a859555] preparing_image progress=12 +2026-05-06 19:35:31,730 INFO backend.segmentation: [JOB 97d58fca6faa4b94b385e3762a859555] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 +2026-05-06 19:35:31,730 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 +2026-05-06 19:35:34,148 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" +2026-05-06 19:35:36,513 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-06 19:35:36,516 WARNING services.gradio_client_service: GPU Space failed (Cannot find a function with `api_name`: /segment.), trying CPU fallback... +2026-05-06 19:35:36,517 INFO services.gradio_client_service: Calling CPU fallback Space: http://localhost:7861 +2026-05-06 19:35:36,647 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-06 19:35:38,956 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/bee4b6dd-5fb5-46e5-b79e-991fbe34799b "HTTP/1.1 200 OK" +2026-05-06 19:35:38,972 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" +2026-05-06 19:35:41,374 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-06 19:35:41,437 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-06 19:35:43,849 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" +2026-05-06 19:35:43,862 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/d8a928aa-2516-473b-85f5-9bf75d1e3f77 "HTTP/1.1 200 OK" +2026-05-06 19:35:46,265 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-05-06 19:35:48,784 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=d8a928aa-2516-473b-85f5-9bf75d1e3f77 "HTTP/1.1 200 OK" +2026-05-06 19:38:08,031 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\21889eae2fc6a2146ef59d302265bd9c57edff263c81a559c184526108f142d6\image.webp "HTTP/1.1 200 OK" +2026-05-06 19:38:08,050 INFO services.gradio_client_service: Gradio Space segmentation: entorno=auto motor=SAM Auto (Exteriores - Sin Prompts) mask_count=160 +2026-05-06 19:38:08,051 INFO backend.segmentation: [JOB 97d58fca6faa4b94b385e3762a859555] saving_masks progress=92 +2026-05-06 19:38:08,352 INFO backend.segmentation: [JOB 97d58fca6faa4b94b385e3762a859555] segments_meta saved (109 segments) +2026-05-06 19:38:08,353 INFO backend.segmentation: [JOB 97d58fca6faa4b94b385e3762a859555] done mask_count=160 +2026-05-06 19:38:08,353 INFO backend.segmentation: [UPLOAD_BG] DONE 156.692s at 2026-05-07T01:38:08.353974+00:00 +2026-05-06 19:38:08,353 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-05-06 19:38:54,725 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:38:54.725946+00:00 +2026-05-06 19:38:55,301 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-05-06 19:38:55,485 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.760s at 2026-05-07T01:38:55.485826+00:00 +2026-05-06 19:39:02,094 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:39:02.094076+00:00 +2026-05-06 19:39:02,676 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-05-06 19:39:02,898 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.805s at 2026-05-07T01:39:02.898407+00:00 +2026-05-06 19:39:05,813 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T01:39:05.813452+00:00 +2026-05-06 19:39:05,813 INFO backend.segmentation: [JOB 90601a35a7a147e784baf2d51c1e45e7] preparing_image progress=12 +2026-05-06 19:39:05,890 INFO backend.segmentation: [JOB 90601a35a7a147e784baf2d51c1e45e7] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 +2026-05-06 19:39:05,891 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 +2026-05-06 19:39:08,294 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" +2026-05-06 19:39:10,647 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-06 19:39:10,650 WARNING services.gradio_client_service: GPU Space failed (Cannot find a function with `api_name`: /segment.), trying CPU fallback... +2026-05-06 19:39:10,650 INFO services.gradio_client_service: Calling CPU fallback Space: http://localhost:7861 +2026-05-06 19:39:10,769 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-06 19:39:13,127 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/4460ecf1-ea82-47e4-a1d6-b5bc3d4c71d2 "HTTP/1.1 200 OK" +2026-05-06 19:39:13,130 INFO httpx: HTTP Request: GET http://localhost:7861/config "HTTP/1.1 200 OK" +2026-05-06 19:39:15,535 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-06 19:39:15,595 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-06 19:39:17,956 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/heartbeat/97643e3a-0304-4e2b-8472-769ee08d3b1b "HTTP/1.1 200 OK" +2026-05-06 19:39:17,959 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/upload "HTTP/1.1 200 OK" +2026-05-06 19:39:20,370 INFO httpx: HTTP Request: POST http://localhost:7861/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-05-06 19:39:22,889 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/queue/data?session_hash=97643e3a-0304-4e2b-8472-769ee08d3b1b "HTTP/1.1 200 OK" +2026-05-06 19:41:28,459 INFO httpx: HTTP Request: GET http://localhost:7861/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\76d9b286b2fcdbd80abdc7e15a0a7f680d3f4fbf2b90ca4d6d6f24bbf1545d1c\image.webp "HTTP/1.1 200 OK" +2026-05-06 19:41:28,470 INFO services.gradio_client_service: Gradio Space segmentation: entorno=auto motor=SAM Auto (Exteriores - Sin Prompts) mask_count=166 +2026-05-06 19:41:28,471 INFO backend.segmentation: [JOB 90601a35a7a147e784baf2d51c1e45e7] saving_masks progress=92 +2026-05-06 19:41:28,681 INFO backend.segmentation: [JOB 90601a35a7a147e784baf2d51c1e45e7] segments_meta saved (137 segments) +2026-05-06 19:41:28,681 INFO backend.segmentation: [JOB 90601a35a7a147e784baf2d51c1e45e7] done mask_count=166 +2026-05-06 19:41:28,682 INFO backend.segmentation: [UPLOAD_BG] DONE 142.868s at 2026-05-07T01:41:28.682118+00:00 +2026-05-06 19:41:28,682 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-05-06 19:50:21,809 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=https://eduardo4547-hyper-reality-sam2-gpu.hf.space +2026-05-06 19:50:21,823 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. +2026-05-06 19:50:26,378 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T01:50:26.378489+00:00 +2026-05-06 19:50:26,384 INFO backend.segmentation: [JOB 3731a48e488e4df2831bb7387b531e3c] preparing_image progress=12 +2026-05-06 19:50:26,471 INFO backend.segmentation: [JOB 3731a48e488e4df2831bb7387b531e3c] segmenting_with_sam2 progress=30 estimated_seconds=58.39104 +2026-05-06 19:50:26,472 INFO services.gradio_client_service: Calling GPU Gradio Space: https://eduardo4547-hyper-reality-sam2-gpu.hf.space +2026-05-06 19:50:27,262 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" +2026-05-06 19:50:27,877 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-06 19:50:27,893 WARNING services.gradio_client_service: GPU Space failed (Cannot find a function with `api_name`: /segment.), trying CPU fallback... +2026-05-06 19:50:27,897 INFO services.gradio_client_service: Calling CPU fallback Space: https://eduardo4547-hyper-reality-sam2-cpu.hf.space +2026-05-06 19:50:28,465 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-06 19:50:28,587 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/5aad3e23-2d4a-4ff2-b2d1-2ff407eed648 "HTTP/1.1 200 OK" +2026-05-06 19:50:28,729 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/config "HTTP/1.1 200 OK" +2026-05-06 19:50:29,178 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-06 19:50:29,318 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-06 19:50:30,078 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" +2026-05-06 19:50:30,375 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/heartbeat/bf131e2f-59cc-4bcb-90cf-326d0eed81f6 "HTTP/1.1 200 OK" +2026-05-06 19:50:30,577 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-05-06 19:50:30,996 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/queue/data?session_hash=bf131e2f-59cc-4bcb-90cf-326d0eed81f6 "HTTP/1.1 200 OK" +2026-05-06 19:56:12,792 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/file=/tmp/gradio/ca352ba59707f92cf2713ac194ff5f07119898301b89fe92d0d511d51a9854a3/image.webp "HTTP/1.1 200 OK" +2026-05-06 19:56:12,902 INFO services.gradio_client_service: Gradio Space segmentation: entorno=auto motor=SAM Auto (Exteriores - Sin Prompts) mask_count=108 +2026-05-06 19:56:12,904 INFO backend.segmentation: [JOB 3731a48e488e4df2831bb7387b531e3c] saving_masks progress=92 +2026-05-06 19:56:13,248 INFO backend.segmentation: [JOB 3731a48e488e4df2831bb7387b531e3c] segments_meta saved (94 segments) +2026-05-06 19:56:13,248 INFO backend.segmentation: [JOB 3731a48e488e4df2831bb7387b531e3c] done mask_count=108 +2026-05-06 19:56:13,248 INFO backend.segmentation: [UPLOAD_BG] DONE 346.870s at 2026-05-07T01:56:13.248662+00:00 +2026-05-06 19:56:13,249 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-05-06 19:56:28,190 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:56:28.190920+00:00 +2026-05-06 19:56:28,586 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.89, h_ratio=1.16) +2026-05-06 19:56:28,610 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-06 19:56:28,946 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.756s at 2026-05-07T01:56:28.946955+00:00 +2026-05-06 19:56:32,308 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:56:32.308758+00:00 +2026-05-06 19:56:32,636 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-06 19:56:32,842 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.534s at 2026-05-07T01:56:32.842046+00:00 +2026-05-06 19:56:38,221 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:56:38.221694+00:00 +2026-05-06 19:56:38,549 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=2.45, h_ratio=1.00) +2026-05-06 19:56:38,582 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-06 19:56:38,797 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.576s at 2026-05-07T01:56:38.797605+00:00 +2026-05-06 19:56:40,976 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:56:40.976482+00:00 +2026-05-06 19:56:41,307 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.53, h_ratio=1.03) +2026-05-06 19:56:41,347 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-06 19:56:41,596 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.620s at 2026-05-07T01:56:41.596887+00:00 +2026-05-06 19:56:45,053 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:56:45.053373+00:00 +2026-05-06 19:56:45,558 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-06 19:56:45,750 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.697s at 2026-05-07T01:56:45.750699+00:00 +2026-05-06 19:56:48,758 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:56:48.757132+00:00 +2026-05-06 19:56:49,268 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.08, h_ratio=2.31) +2026-05-06 19:56:49,292 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-06 19:56:49,508 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.751s at 2026-05-07T01:56:49.508898+00:00 +2026-05-06 19:56:53,597 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T01:56:53.597538+00:00 +2026-05-06 19:56:54,195 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=2.45, h_ratio=1.00) +2026-05-06 19:56:54,219 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-06 19:56:54,438 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.841s at 2026-05-07T01:56:54.438299+00:00 +2026-05-06 20:00:21,372 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T02:00:21.372294+00:00 +2026-05-06 20:00:21,372 INFO backend.segmentation: [JOB 9dd987f4caec430e9a186637a9178708] preparing_image progress=12 +2026-05-06 20:00:21,437 INFO backend.segmentation: [JOB 9dd987f4caec430e9a186637a9178708] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 +2026-05-06 20:00:21,437 INFO services.gradio_client_service: Calling GPU Gradio Space: https://eduardo4547-hyper-reality-sam2-gpu.hf.space +2026-05-06 20:00:22,134 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" +2026-05-06 20:00:22,726 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-06 20:00:22,915 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-06 20:00:23,461 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/c7959aba-7eb6-4ecb-81ad-712329ac5c7c "HTTP/1.1 200 OK" +2026-05-06 20:00:23,560 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" +2026-05-06 20:00:24,012 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-05-06 20:00:24,861 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/data?session_hash=c7959aba-7eb6-4ecb-81ad-712329ac5c7c "HTTP/1.1 200 OK" +2026-05-06 20:00:42,409 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/file=/tmp/gradio/b16694b4215c6ddd7ab507195e91a516ff5142807df0ec7e847eb878eb7c1ab3/image.webp "HTTP/1.1 200 OK" +2026-05-06 20:00:42,518 INFO services.gradio_client_service: Gradio Space segmentation: entorno=gpu motor=SAM Auto (GPU - ZeroGPU) mask_count=131 +2026-05-06 20:00:42,519 INFO backend.segmentation: [JOB 9dd987f4caec430e9a186637a9178708] saving_masks progress=92 +2026-05-06 20:00:42,727 INFO backend.segmentation: [JOB 9dd987f4caec430e9a186637a9178708] segments_meta saved (114 segments) +2026-05-06 20:00:42,727 INFO backend.segmentation: [JOB 9dd987f4caec430e9a186637a9178708] done mask_count=131 +2026-05-06 20:00:42,727 INFO backend.segmentation: [UPLOAD_BG] DONE 21.356s at 2026-05-07T02:00:42.727446+00:00 +2026-05-06 20:00:42,728 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-05-06 20:17:14,645 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T02:17:14.645451+00:00 +2026-05-06 20:17:15,135 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.24, h_ratio=1.09) +2026-05-06 20:17:15,152 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-05-06 20:17:15,329 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.684s at 2026-05-07T02:17:15.329979+00:00 +2026-05-06 20:17:15,339 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T02:17:15.339985+00:00 +2026-05-06 20:17:15,656 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.24, h_ratio=1.09) +2026-05-06 20:17:15,678 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-05-06 20:17:15,875 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.535s at 2026-05-07T02:17:15.875096+00:00 +2026-05-06 20:17:34,601 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T02:17:34.601321+00:00 +2026-05-06 20:17:34,920 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-05-06 20:17:35,110 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.510s at 2026-05-07T02:17:35.110889+00:00 +2026-05-06 20:17:42,322 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T02:17:42.322700+00:00 +2026-05-06 20:17:42,821 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-05-06 20:17:42,999 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.677s at 2026-05-07T02:17:42.998640+00:00 +2026-05-06 20:17:46,209 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T02:17:46.209208+00:00 +2026-05-06 20:17:46,792 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.24, h_ratio=1.09) +2026-05-06 20:17:46,811 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-05-06 20:17:46,990 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.781s at 2026-05-07T02:17:46.990848+00:00 +2026-05-07 12:51:24,606 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=https://eduardo4547-hyper-reality-sam2-gpu.hf.space +2026-05-07 12:51:24,620 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. +2026-05-07 12:51:38,487 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T18:51:38.487778+00:00 +2026-05-07 12:51:38,488 INFO backend.segmentation: [JOB 021594e26fe54ec19990002de5a49e1e] preparing_image progress=12 +2026-05-07 12:51:38,722 INFO backend.segmentation: [JOB 021594e26fe54ec19990002de5a49e1e] segmenting_with_sam2 progress=30 estimated_seconds=58.39104 +2026-05-07 12:51:38,722 INFO services.gradio_client_service: Calling GPU Gradio Space: https://eduardo4547-hyper-reality-sam2-gpu.hf.space +2026-05-07 12:51:57,921 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" +2026-05-07 12:51:58,597 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-07 12:51:59,277 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-07 12:51:59,382 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/94b31a0d-c4b3-4776-9bf3-feb7cfb2deb5 "HTTP/1.1 200 OK" +2026-05-07 12:51:59,569 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" +2026-05-07 12:52:00,104 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-05-07 12:52:00,784 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/data?session_hash=94b31a0d-c4b3-4776-9bf3-feb7cfb2deb5 "HTTP/1.1 200 OK" +2026-05-07 12:52:21,780 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/file=/tmp/gradio/58f73381cbe3266caa6d35a2c12cb77e720345122d5cf9f7cdb96e041ceca7c9/image.webp "HTTP/1.1 200 OK" +2026-05-07 12:52:21,889 INFO services.gradio_client_service: Gradio Space segmentation: entorno=gpu motor=SAM Auto (GPU - ZeroGPU) mask_count=108 +2026-05-07 12:52:21,890 INFO backend.segmentation: [JOB 021594e26fe54ec19990002de5a49e1e] saving_masks progress=92 +2026-05-07 12:52:22,192 INFO backend.segmentation: [JOB 021594e26fe54ec19990002de5a49e1e] segments_meta saved (94 segments) +2026-05-07 12:52:22,192 INFO backend.segmentation: [JOB 021594e26fe54ec19990002de5a49e1e] done mask_count=108 +2026-05-07 12:52:22,192 INFO backend.segmentation: [UPLOAD_BG] DONE 43.706s at 2026-05-07T18:52:22.192480+00:00 +2026-05-07 12:52:22,193 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-05-07 12:56:10,928 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T18:56:10.928142+00:00 +2026-05-07 12:56:10,929 INFO backend.segmentation: [JOB 6e3dc1caa0ea4d58a9fdb96458cc352a] preparing_image progress=12 +2026-05-07 12:56:10,997 INFO backend.segmentation: [JOB 6e3dc1caa0ea4d58a9fdb96458cc352a] segmenting_with_sam2 progress=30 estimated_seconds=58.39104 +2026-05-07 12:56:10,997 INFO services.gradio_client_service: Calling GPU Gradio Space: https://eduardo4547-hyper-reality-sam2-gpu.hf.space +2026-05-07 12:56:11,625 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" +2026-05-07 12:56:12,229 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-07 12:56:12,412 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-07 12:56:12,966 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/ed1495a1-4a2c-4fab-a409-975c2768b89c "HTTP/1.1 200 OK" +2026-05-07 12:56:13,063 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" +2026-05-07 12:56:13,579 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-05-07 12:56:14,152 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/data?session_hash=ed1495a1-4a2c-4fab-a409-975c2768b89c "HTTP/1.1 200 OK" +2026-05-07 12:56:25,727 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/file=/tmp/gradio/58f73381cbe3266caa6d35a2c12cb77e720345122d5cf9f7cdb96e041ceca7c9/image.webp "HTTP/1.1 200 OK" +2026-05-07 12:56:25,845 INFO services.gradio_client_service: Gradio Space segmentation: entorno=gpu motor=SAM Auto (GPU - ZeroGPU) mask_count=108 +2026-05-07 12:56:25,845 INFO backend.segmentation: [JOB 6e3dc1caa0ea4d58a9fdb96458cc352a] saving_masks progress=92 +2026-05-07 12:56:26,112 INFO backend.segmentation: [JOB 6e3dc1caa0ea4d58a9fdb96458cc352a] segments_meta saved (94 segments) +2026-05-07 12:56:26,112 INFO backend.segmentation: [JOB 6e3dc1caa0ea4d58a9fdb96458cc352a] done mask_count=108 +2026-05-07 12:56:26,112 INFO backend.segmentation: [UPLOAD_BG] DONE 15.184s at 2026-05-07T18:56:26.112231+00:00 +2026-05-07 12:56:26,112 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-05-07 13:01:56,800 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T19:01:56.800564+00:00 +2026-05-07 13:01:56,801 INFO backend.segmentation: [JOB c145be47d09942d691ae3f650e362810] preparing_image progress=12 +2026-05-07 13:01:56,873 INFO backend.segmentation: [JOB c145be47d09942d691ae3f650e362810] segmenting_with_sam2 progress=30 estimated_seconds=58.39104 +2026-05-07 13:01:56,874 INFO services.gradio_client_service: Calling GPU Gradio Space: https://eduardo4547-hyper-reality-sam2-gpu.hf.space +2026-05-07 13:01:57,517 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" +2026-05-07 13:01:58,135 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-07 13:01:58,320 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-07 13:01:58,810 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/5c3e334b-800c-4d78-93b4-35d66a611f5d "HTTP/1.1 200 OK" +2026-05-07 13:01:58,963 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" +2026-05-07 13:01:59,514 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-05-07 13:02:00,027 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/data?session_hash=5c3e334b-800c-4d78-93b4-35d66a611f5d "HTTP/1.1 200 OK" +2026-05-07 13:02:11,627 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/file=/tmp/gradio/58f73381cbe3266caa6d35a2c12cb77e720345122d5cf9f7cdb96e041ceca7c9/image.webp "HTTP/1.1 200 OK" +2026-05-07 13:02:11,743 INFO services.gradio_client_service: Gradio Space segmentation: entorno=gpu motor=SAM Auto (GPU - ZeroGPU) mask_count=108 +2026-05-07 13:02:11,747 INFO backend.segmentation: [JOB c145be47d09942d691ae3f650e362810] saving_masks progress=92 +2026-05-07 13:02:12,035 INFO backend.segmentation: [JOB c145be47d09942d691ae3f650e362810] segments_meta saved (94 segments) +2026-05-07 13:02:12,035 INFO backend.segmentation: [JOB c145be47d09942d691ae3f650e362810] done mask_count=108 +2026-05-07 13:02:12,035 INFO backend.segmentation: [UPLOAD_BG] DONE 15.235s at 2026-05-07T19:02:12.035158+00:00 +2026-05-07 13:02:12,036 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-05-07 14:54:46,839 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=https://eduardo4547-hyper-reality-sam2-gpu.hf.space +2026-05-07 14:54:46,873 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. +2026-05-07 14:55:18,464 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T20:55:18.464808+00:00 +2026-05-07 14:55:18,465 INFO backend.segmentation: [JOB e2978c252391482ea410013edd5dd614] preparing_image progress=12 +2026-05-07 14:55:18,684 INFO backend.segmentation: [JOB e2978c252391482ea410013edd5dd614] segmenting_with_sam2 progress=30 estimated_seconds=58.39104 +2026-05-07 14:55:18,684 INFO services.gradio_client_service: Calling GPU Gradio Space: https://eduardo4547-hyper-reality-sam2-gpu.hf.space +2026-05-07 14:55:20,941 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" +2026-05-07 14:55:21,523 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-07 14:55:22,147 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-07 14:55:22,266 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/044411e2-1c1d-423c-8a2b-1bf8aa03347d "HTTP/1.1 200 OK" +2026-05-07 14:55:22,418 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" +2026-05-07 14:55:22,953 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-05-07 14:55:23,627 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/data?session_hash=044411e2-1c1d-423c-8a2b-1bf8aa03347d "HTTP/1.1 200 OK" +2026-05-07 14:55:38,599 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/file=/tmp/gradio/e46ee411d94ec777ba35b9e436d075e4a9639d5f1e564687b887320d75811f38/image.webp "HTTP/1.1 200 OK" +2026-05-07 14:55:38,603 WARNING services.gradio_client_service: GPU Space failed (Gradio Space error: Traceback (most recent call last): + File "/app/app.py", line 133, in segment_for_backend + resultado = sam_vit_pipeline( + pil_image, + ...<5 lines>... + crops_n_layers=PARAMS["crops_n_layers"], + ) + File "/root/.pyenv/versions/3.13.13/lib/python3.13/site-packages/transformers/pipelines/mask_generation.py", line 190, in __call__ + return super().__call__(image, *args, num_workers=num_workers, batch_size=batch_size, **kwargs) + ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^), trying CPU fallback... +2026-05-07 14:55:38,604 INFO services.gradio_client_service: Calling CPU fallback Space: https://eduardo4547-hyper-reality-sam2-cpu.hf.space +2026-05-07 14:55:39,263 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/config "HTTP/1.1 200 OK" +2026-05-07 14:55:39,888 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-07 14:55:40,067 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-07 14:55:40,580 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/heartbeat/0cb7d459-fd3f-4435-b44f-3d93594c3e32 "HTTP/1.1 200 OK" +2026-05-07 14:55:40,750 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" +2026-05-07 14:55:41,291 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-05-07 14:55:41,867 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/queue/data?session_hash=0cb7d459-fd3f-4435-b44f-3d93594c3e32 "HTTP/1.1 200 OK" +2026-05-07 14:59:17,106 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T20:59:17.106093+00:00 +2026-05-07 14:59:17,106 INFO backend.segmentation: [JOB 9d8e54c57b804dd6a5868f2f16907d6a] preparing_image progress=12 +2026-05-07 14:59:17,177 INFO backend.segmentation: [JOB 9d8e54c57b804dd6a5868f2f16907d6a] segmenting_with_sam2 progress=30 estimated_seconds=58.39104 +2026-05-07 14:59:17,178 INFO services.gradio_client_service: Calling GPU Gradio Space: https://eduardo4547-hyper-reality-sam2-gpu.hf.space +2026-05-07 14:59:17,820 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" +2026-05-07 14:59:18,429 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-07 14:59:18,612 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-07 14:59:19,270 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/4bafc24c-7b3e-47e5-ab5c-040b1104f6ad "HTTP/1.1 200 OK" +2026-05-07 14:59:19,316 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" +2026-05-07 14:59:19,895 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-05-07 14:59:20,498 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/data?session_hash=4bafc24c-7b3e-47e5-ab5c-040b1104f6ad "HTTP/1.1 200 OK" +2026-05-07 14:59:22,556 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/file=/tmp/gradio/e46ee411d94ec777ba35b9e436d075e4a9639d5f1e564687b887320d75811f38/image.webp "HTTP/1.1 200 OK" +2026-05-07 14:59:22,561 WARNING services.gradio_client_service: GPU Space failed (Gradio Space error: Traceback (most recent call last): + File "/app/app.py", line 133, in segment_for_backend + resultado = sam_vit_pipeline( + pil_image, + ...<5 lines>... + crops_n_layers=PARAMS["crops_n_layers"], + ) + File "/root/.pyenv/versions/3.13.13/lib/python3.13/site-packages/transformers/pipelines/mask_generation.py", line 190, in __call__ + return super().__call__(image, *args, num_workers=num_workers, batch_size=batch_size, **kwargs) + ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^), trying CPU fallback... +2026-05-07 14:59:22,562 INFO services.gradio_client_service: Calling CPU fallback Space: https://eduardo4547-hyper-reality-sam2-cpu.hf.space +2026-05-07 14:59:23,331 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/config "HTTP/1.1 200 OK" +2026-05-07 14:59:24,033 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-07 14:59:24,159 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-07 14:59:24,691 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/heartbeat/58739913-8194-4cc9-ae76-fab58874372a "HTTP/1.1 200 OK" +2026-05-07 14:59:24,844 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" +2026-05-07 14:59:25,478 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-05-07 14:59:26,087 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/queue/data?session_hash=58739913-8194-4cc9-ae76-fab58874372a "HTTP/1.1 200 OK" +2026-05-07 14:59:38,140 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/file=/tmp/gradio/0870aa16fb1d36280b4436effe666b2d40896a35db44e69dfe24e623f43e743b/image.webp "HTTP/1.1 200 OK" +2026-05-07 14:59:38,143 ERROR backend.segmentation: [JOB e2978c252391482ea410013edd5dd614] failed: Both Gradio Spaces failed. + GPU (https://eduardo4547-hyper-reality-sam2-gpu.hf.space): Gradio Space error: Traceback (most recent call last): + File "/app/app.py", line 133, in segment_for_backend + resultado = sam_vit_pipeline( + pil_image, + ...<5 lines>... + crops_n_layers=PARAMS["crops_n_layers"], + ) + File "/root/.pyenv/versions/3.13.13/lib/python3.13/site-packages/transformers/pipelines/mask_generation.py", line 190, in __call__ + return super().__call__(image, *args, num_workers=num_workers, batch_size=batch_size, **kwargs) + ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^ + CPU (https://eduardo4547-hyper-reality-sam2-cpu.hf.space): Gradio Space error: Traceback (most recent call last): + File "/app/app.py", line 133, in segment_for_backend + resultado = sam_vit_pipeline( + pil_image, + ...<5 lines>... + crops_n_layers=PARAMS["crops_n_layers"], + ) + File "/usr/local/lib/python3.13/site-packages/transformers/pipelines/mask_generation.py", line 190, in __call__ + return super().__call__(image, *args, num_workers=num_workers, batch_size=batch_size, **kwargs) + ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Traceback (most recent call last): + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 91, in segment_via_gradio_sync + return _call_gradio_sync(image_path, GRADIO_CPU_FALLBACK_URL) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 47, in _call_gradio_sync + raise RuntimeError(f"Gradio Space error: {combined['error'][:500]}") +RuntimeError: Gradio Space error: Traceback (most recent call last): + File "/app/app.py", line 133, in segment_for_backend + resultado = sam_vit_pipeline( + pil_image, + ...<5 lines>... + crops_n_layers=PARAMS["crops_n_layers"], + ) + File "/usr/local/lib/python3.13/site-packages/transformers/pipelines/mask_generation.py", line 190, in __call__ + return super().__call__(image, *args, num_workers=num_workers, batch_size=batch_size, **kwargs) + ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The above exception was the direct cause of the following exception: + +Traceback (most recent call last): + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\image_service.py", line 138, in run_upload_job + label_map, mask_count = segment_via_gradio_sync(image_path) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 93, in segment_via_gradio_sync + raise RuntimeError( +RuntimeError: Both Gradio Spaces failed. + GPU (https://eduardo4547-hyper-reality-sam2-gpu.hf.space): Gradio Space error: Traceback (most recent call last): + File "/app/app.py", line 133, in segment_for_backend + resultado = sam_vit_pipeline( + pil_image, + ...<5 lines>... + crops_n_layers=PARAMS["crops_n_layers"], + ) + File "/root/.pyenv/versions/3.13.13/lib/python3.13/site-packages/transformers/pipelines/mask_generation.py", line 190, in __call__ + return super().__call__(image, *args, num_workers=num_workers, batch_size=batch_size, **kwargs) + ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^ + CPU (https://eduardo4547-hyper-reality-sam2-cpu.hf.space): Gradio Space error: Traceback (most recent call last): + File "/app/app.py", line 133, in segment_for_backend + resultado = sam_vit_pipeline( + pil_image, + ...<5 lines>... + crops_n_layers=PARAMS["crops_n_layers"], + ) + File "/usr/local/lib/python3.13/site-packages/transformers/pipelines/mask_generation.py", line 190, in __call__ + return super().__call__(image, *args, num_workers=num_workers, batch_size=batch_size, **kwargs) + ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +2026-05-07 14:59:38,144 INFO backend.segmentation: [UPLOAD_BG] DONE 259.680s at 2026-05-07T20:59:38.144994+00:00 +2026-05-07 14:59:38,144 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-05-07 15:02:17,066 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=https://eduardo4547-hyper-reality-sam2-gpu.hf.space +2026-05-07 15:02:17,090 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. +2026-05-07 15:02:54,241 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T21:02:54.241047+00:00 +2026-05-07 15:02:54,241 INFO backend.segmentation: [JOB 77ed4dd081d7432cbc3073f159883876] preparing_image progress=12 +2026-05-07 15:02:54,369 INFO backend.segmentation: [JOB 77ed4dd081d7432cbc3073f159883876] segmenting_with_sam2 progress=30 estimated_seconds=58.39104 +2026-05-07 15:02:54,369 INFO services.gradio_client_service: Calling GPU Gradio Space: https://eduardo4547-hyper-reality-sam2-gpu.hf.space +2026-05-07 15:02:55,466 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" +2026-05-07 15:02:55,989 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-07 15:02:56,471 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-07 15:02:56,561 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/ae72d127-eaf7-4469-8805-b2f2d63b0e9a "HTTP/1.1 200 OK" +2026-05-07 15:02:56,764 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" +2026-05-07 15:02:57,222 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-05-07 15:02:57,668 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/data?session_hash=ae72d127-eaf7-4469-8805-b2f2d63b0e9a "HTTP/1.1 200 OK" +2026-05-07 15:02:59,650 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/file=/tmp/gradio/e46ee411d94ec777ba35b9e436d075e4a9639d5f1e564687b887320d75811f38/image.webp "HTTP/1.1 200 OK" +2026-05-07 15:02:59,653 WARNING services.gradio_client_service: GPU Space failed (Gradio Space error: Traceback (most recent call last): + File "/app/app.py", line 133, in segment_for_backend + resultado = sam_vit_pipeline( + pil_image, + ...<5 lines>... + crops_n_layers=PARAMS["crops_n_layers"], + ) + File "/root/.pyenv/versions/3.13.13/lib/python3.13/site-packages/transformers/pipelines/mask_generation.py", line 190, in __call__ + return super().__call__(image, *args, num_workers=num_workers, batch_size=batch_size, **kwargs) + ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^), trying CPU fallback... +2026-05-07 15:02:59,654 INFO services.gradio_client_service: Calling CPU fallback Space: https://eduardo4547-hyper-reality-sam2-cpu.hf.space +2026-05-07 15:03:01,621 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/config "HTTP/1.1 200 OK" +2026-05-07 15:03:02,088 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-07 15:03:02,262 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-07 15:03:02,629 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/heartbeat/2f3a5842-bc35-4aa3-8198-e3338bde647a "HTTP/1.1 200 OK" +2026-05-07 15:03:02,785 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" +2026-05-07 15:03:03,183 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-05-07 15:03:03,623 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-cpu.hf.space/gradio_api/queue/data?session_hash=2f3a5842-bc35-4aa3-8198-e3338bde647a "HTTP/1.1 200 OK" +2026-05-07 15:11:16,099 ERROR backend.segmentation: [JOB 77ed4dd081d7432cbc3073f159883876] failed: Both Gradio Spaces failed. + GPU (https://eduardo4547-hyper-reality-sam2-gpu.hf.space): Gradio Space error: Traceback (most recent call last): + File "/app/app.py", line 133, in segment_for_backend + resultado = sam_vit_pipeline( + pil_image, + ...<5 lines>... + crops_n_layers=PARAMS["crops_n_layers"], + ) + File "/root/.pyenv/versions/3.13.13/lib/python3.13/site-packages/transformers/pipelines/mask_generation.py", line 190, in __call__ + return super().__call__(image, *args, num_workers=num_workers, batch_size=batch_size, **kwargs) + ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^ + CPU (https://eduardo4547-hyper-reality-sam2-cpu.hf.space): +Traceback (most recent call last): + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 91, in segment_via_gradio_sync + return _call_gradio_sync(image_path, GRADIO_CPU_FALLBACK_URL) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 36, in _call_gradio_sync + _overlay_file, combined_json_str = client.predict( + ^^^^^^^^^^^^^^^ + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\.venv\Lib\site-packages\gradio_client\client.py", line 499, in predict + ).result() + ^^^^^^^^ + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\.venv\Lib\site-packages\gradio_client\client.py", line 1484, in result + return super().result(timeout=timeout) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2800.0_x64__qbz5n2kfra8p0\Lib\concurrent\futures\_base.py", line 456, in result + return self.__get_result() + ^^^^^^^^^^^^^^^^^^^ + File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2800.0_x64__qbz5n2kfra8p0\Lib\concurrent\futures\_base.py", line 401, in __get_result + raise self._exception + File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2800.0_x64__qbz5n2kfra8p0\Lib\concurrent\futures\thread.py", line 59, in run + result = self.fn(*self.args, **self.kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\.venv\Lib\site-packages\gradio_client\client.py", line 1080, in _inner + predictions = _predict(*data, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\.venv\Lib\site-packages\gradio_client\client.py", line 1188, in _predict + result = self._sse_fn_v1plus(helper, event_id, self.protocol) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\.venv\Lib\site-packages\gradio_client\client.py", line 1388, in _sse_fn_v1plus + return utils.get_pred_from_sse_v1plus( + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\.venv\Lib\site-packages\gradio_client\utils.py", line 395, in get_pred_from_sse_v1plus + raise exception + File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2800.0_x64__qbz5n2kfra8p0\Lib\concurrent\futures\thread.py", line 59, in run + result = self.fn(*self.args, **self.kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\.venv\Lib\site-packages\gradio_client\utils.py", line 511, in stream_sse_v1plus + raise concurrent.futures.CancelledError() +concurrent.futures._base.CancelledError + +The above exception was the direct cause of the following exception: + +Traceback (most recent call last): + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\image_service.py", line 138, in run_upload_job + label_map, mask_count = segment_via_gradio_sync(image_path) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\services\gradio_client_service.py", line 93, in segment_via_gradio_sync + raise RuntimeError( +RuntimeError: Both Gradio Spaces failed. + GPU (https://eduardo4547-hyper-reality-sam2-gpu.hf.space): Gradio Space error: Traceback (most recent call last): + File "/app/app.py", line 133, in segment_for_backend + resultado = sam_vit_pipeline( + pil_image, + ...<5 lines>... + crops_n_layers=PARAMS["crops_n_layers"], + ) + File "/root/.pyenv/versions/3.13.13/lib/python3.13/site-packages/transformers/pipelines/mask_generation.py", line 190, in __call__ + return super().__call__(image, *args, num_workers=num_workers, batch_size=batch_size, **kwargs) + ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^ + CPU (https://eduardo4547-hyper-reality-sam2-cpu.hf.space): +2026-05-07 15:11:16,123 INFO backend.segmentation: [UPLOAD_BG] DONE 501.883s at 2026-05-07T21:11:16.123777+00:00 +2026-05-07 15:11:16,123 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-05-07 15:11:33,448 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=https://eduardo4547-hyper-reality-sam2-gpu.hf.space +2026-05-07 15:11:33,462 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. +2026-05-07 15:11:38,641 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T21:11:38.641727+00:00 +2026-05-07 15:11:38,642 INFO backend.segmentation: [JOB 710a0f404cce4589bd59a34ef7a8fff9] preparing_image progress=12 +2026-05-07 15:11:38,745 INFO backend.segmentation: [JOB 710a0f404cce4589bd59a34ef7a8fff9] segmenting_with_sam2 progress=30 estimated_seconds=58.39104 +2026-05-07 15:11:38,747 INFO services.gradio_client_service: Calling GPU Gradio Space: https://eduardo4547-hyper-reality-sam2-gpu.hf.space +2026-05-07 15:11:39,778 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" +2026-05-07 15:11:40,250 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-07 15:11:40,717 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-07 15:11:40,821 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/2ba41729-fa1a-4207-b1a6-9c3ef6526887 "HTTP/1.1 200 OK" +2026-05-07 15:11:40,924 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" +2026-05-07 15:11:41,336 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-05-07 15:11:42,039 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/data?session_hash=2ba41729-fa1a-4207-b1a6-9c3ef6526887 "HTTP/1.1 200 OK" +2026-05-07 15:12:02,740 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/file=/tmp/gradio/d17dd4b993c601f166cf197f34896b5d17a23e30a9fe1f5022b368a594a3f823/image.webp "HTTP/1.1 200 OK" +2026-05-07 15:12:02,846 INFO services.gradio_client_service: Gradio Space segmentation: entorno=gpu motor=SAM Auto (GPU - ZeroGPU) mask_count=63 +2026-05-07 15:12:02,846 INFO backend.segmentation: [JOB 710a0f404cce4589bd59a34ef7a8fff9] saving_masks progress=92 +2026-05-07 15:12:02,991 INFO backend.segmentation: [JOB 710a0f404cce4589bd59a34ef7a8fff9] segments_meta saved (54 segments) +2026-05-07 15:12:02,991 INFO backend.segmentation: [JOB 710a0f404cce4589bd59a34ef7a8fff9] done mask_count=63 +2026-05-07 15:12:02,992 INFO backend.segmentation: [UPLOAD_BG] DONE 24.350s at 2026-05-07T21:12:02.992931+00:00 +2026-05-07 15:12:02,992 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-05-07 15:12:30,031 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:12:30.031296+00:00 +2026-05-07 15:12:30,558 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-07 15:12:30,891 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.860s at 2026-05-07T21:12:30.891199+00:00 +2026-05-07 15:13:18,964 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T21:13:18.964838+00:00 +2026-05-07 15:13:18,964 INFO backend.segmentation: [JOB 27e16fe858474d01905b11a66b235cc4] preparing_image progress=12 +2026-05-07 15:13:19,050 INFO backend.segmentation: [JOB 27e16fe858474d01905b11a66b235cc4] segmenting_with_sam2 progress=30 estimated_seconds=58.39104 +2026-05-07 15:13:19,051 INFO services.gradio_client_service: Calling GPU Gradio Space: https://eduardo4547-hyper-reality-sam2-gpu.hf.space +2026-05-07 15:13:19,623 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" +2026-05-07 15:13:20,207 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-07 15:13:20,445 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-07 15:13:20,882 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/6b2ee8fb-256a-4778-af39-73fbc7180d64 "HTTP/1.1 200 OK" +2026-05-07 15:13:21,064 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" +2026-05-07 15:13:21,680 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-05-07 15:13:22,271 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/data?session_hash=6b2ee8fb-256a-4778-af39-73fbc7180d64 "HTTP/1.1 200 OK" +2026-05-07 15:13:32,414 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/file=/tmp/gradio/d17dd4b993c601f166cf197f34896b5d17a23e30a9fe1f5022b368a594a3f823/image.webp "HTTP/1.1 200 OK" +2026-05-07 15:13:32,528 INFO services.gradio_client_service: Gradio Space segmentation: entorno=gpu motor=SAM Auto (GPU - ZeroGPU) mask_count=63 +2026-05-07 15:13:32,528 INFO backend.segmentation: [JOB 27e16fe858474d01905b11a66b235cc4] saving_masks progress=92 +2026-05-07 15:13:32,702 INFO backend.segmentation: [JOB 27e16fe858474d01905b11a66b235cc4] segments_meta saved (54 segments) +2026-05-07 15:13:32,703 INFO backend.segmentation: [JOB 27e16fe858474d01905b11a66b235cc4] done mask_count=63 +2026-05-07 15:13:32,703 INFO backend.segmentation: [UPLOAD_BG] DONE 13.740s at 2026-05-07T21:13:32.703517+00:00 +2026-05-07 15:13:32,704 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-05-07 15:19:48,376 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T21:19:48.376272+00:00 +2026-05-07 15:19:48,376 INFO backend.segmentation: [JOB 6ec5c36da3b941c48ee955a0e6018efd] preparing_image progress=12 +2026-05-07 15:19:48,443 INFO backend.segmentation: [JOB 6ec5c36da3b941c48ee955a0e6018efd] segmenting_with_sam2 progress=30 estimated_seconds=58.39104 +2026-05-07 15:19:48,444 INFO services.gradio_client_service: Calling GPU Gradio Space: https://eduardo4547-hyper-reality-sam2-gpu.hf.space +2026-05-07 15:19:49,095 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/config "HTTP/1.1 200 OK" +2026-05-07 15:19:49,716 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-07 15:19:49,928 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-07 15:19:50,414 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/heartbeat/c601fff9-ae77-444d-86f4-c6eb6ee29ae8 "HTTP/1.1 200 OK" +2026-05-07 15:19:50,537 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/upload "HTTP/1.1 200 OK" +2026-05-07 15:19:51,092 INFO httpx: HTTP Request: POST https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-05-07 15:19:51,642 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/queue/data?session_hash=c601fff9-ae77-444d-86f4-c6eb6ee29ae8 "HTTP/1.1 200 OK" +2026-05-07 15:20:01,890 INFO httpx: HTTP Request: GET https://eduardo4547-hyper-reality-sam2-gpu.hf.space/gradio_api/file=/tmp/gradio/d17dd4b993c601f166cf197f34896b5d17a23e30a9fe1f5022b368a594a3f823/image.webp "HTTP/1.1 200 OK" +2026-05-07 15:20:02,004 INFO services.gradio_client_service: Gradio Space segmentation: entorno=gpu motor=SAM Auto (GPU - ZeroGPU) mask_count=63 +2026-05-07 15:20:02,005 INFO backend.segmentation: [JOB 6ec5c36da3b941c48ee955a0e6018efd] saving_masks progress=92 +2026-05-07 15:20:02,221 INFO backend.segmentation: [JOB 6ec5c36da3b941c48ee955a0e6018efd] segments_meta saved (54 segments) +2026-05-07 15:20:02,221 INFO backend.segmentation: [JOB 6ec5c36da3b941c48ee955a0e6018efd] done mask_count=63 +2026-05-07 15:20:02,221 INFO backend.segmentation: [UPLOAD_BG] DONE 13.846s at 2026-05-07T21:20:02.221722+00:00 +2026-05-07 15:20:02,222 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-05-07 15:21:36,330 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:21:36.330551+00:00 +2026-05-07 15:21:36,908 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-07 15:21:37,121 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.790s at 2026-05-07T21:21:37.121352+00:00 +2026-05-07 15:21:45,205 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:21:45.203794+00:00 +2026-05-07 15:21:45,723 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.39, h_ratio=1.19) +2026-05-07 15:21:45,743 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-07 15:21:45,953 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.748s at 2026-05-07T21:21:45.953335+00:00 +2026-05-07 15:21:49,795 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:21:49.795014+00:00 +2026-05-07 15:21:50,312 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.01, h_ratio=1.24) +2026-05-07 15:21:50,331 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-07 15:21:50,547 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.753s at 2026-05-07T21:21:50.547610+00:00 +2026-05-07 15:21:56,068 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:21:56.068945+00:00 +2026-05-07 15:21:56,572 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.18, h_ratio=287.00) +2026-05-07 15:21:56,592 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-07 15:21:56,802 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.734s at 2026-05-07T21:21:56.802967+00:00 +2026-05-07 15:23:52,960 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 +2026-05-07 15:23:52,981 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. +2026-05-07 15:24:42,274 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T21:24:42.274969+00:00 +2026-05-07 15:24:42,274 INFO backend.segmentation: [JOB ca20946463e74f8a9be921cb5dc3580f] preparing_image progress=12 +2026-05-07 15:24:42,409 INFO backend.segmentation: [JOB ca20946463e74f8a9be921cb5dc3580f] segmenting_with_sam2 progress=30 estimated_seconds=58.39104 +2026-05-07 15:24:42,414 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 +2026-05-07 15:24:45,341 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" +2026-05-07 15:24:47,723 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-07 15:24:48,299 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-07 15:24:50,226 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/dab64d79-0e60-4114-b75e-b53930a5d4f7 "HTTP/1.1 200 OK" +2026-05-07 15:24:50,247 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" +2026-05-07 15:24:54,192 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-05-07 15:24:56,620 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=dab64d79-0e60-4114-b75e-b53930a5d4f7 "HTTP/1.1 200 OK" +2026-05-07 15:27:24,526 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\e9e23a4c03e9b88d2db6cb764c2778b1091e1c8b97c256c28501ff9297140221\image.webp "HTTP/1.1 200 OK" +2026-05-07 15:27:24,538 INFO services.gradio_client_service: Gradio Space segmentation: entorno=gpu motor=SAM Auto (GPU - ZeroGPU) mask_count=63 +2026-05-07 15:27:24,538 INFO backend.segmentation: [JOB ca20946463e74f8a9be921cb5dc3580f] saving_masks progress=92 +2026-05-07 15:27:24,702 INFO backend.segmentation: [JOB ca20946463e74f8a9be921cb5dc3580f] segments_meta saved (63 segments) +2026-05-07 15:27:24,702 INFO backend.segmentation: [JOB ca20946463e74f8a9be921cb5dc3580f] done mask_count=63 +2026-05-07 15:27:24,702 INFO backend.segmentation: [UPLOAD_BG] DONE 162.428s at 2026-05-07T21:27:24.702523+00:00 +2026-05-07 15:27:24,702 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-05-07 15:27:41,959 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:27:41.959810+00:00 +2026-05-07 15:27:42,278 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.05, h_ratio=416.39) +2026-05-07 15:27:42,305 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-07 15:27:42,814 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.854s at 2026-05-07T21:27:42.814627+00:00 +2026-05-07 15:27:46,763 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:27:46.763830+00:00 +2026-05-07 15:27:47,166 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-07 15:27:47,378 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.614s at 2026-05-07T21:27:47.378508+00:00 +2026-05-07 15:27:49,193 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:27:49.193540+00:00 +2026-05-07 15:27:49,513 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=2.27, h_ratio=1.02) +2026-05-07 15:27:49,532 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-07 15:27:49,729 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.536s at 2026-05-07T21:27:49.729431+00:00 +2026-05-07 15:27:51,249 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:27:51.249369+00:00 +2026-05-07 15:27:51,544 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-07 15:27:51,755 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.506s at 2026-05-07T21:27:51.755618+00:00 +2026-05-07 15:27:52,680 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:27:52.680739+00:00 +2026-05-07 15:27:52,986 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-07 15:27:53,211 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.531s at 2026-05-07T21:27:53.211475+00:00 +2026-05-07 15:27:54,203 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:27:54.203416+00:00 +2026-05-07 15:27:54,500 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-07 15:27:54,736 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.533s at 2026-05-07T21:27:54.736190+00:00 +2026-05-07 15:28:31,805 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:28:31.805147+00:00 +2026-05-07 15:28:32,098 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-07 15:28:32,338 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.534s at 2026-05-07T21:28:32.338930+00:00 +2026-05-07 15:28:42,559 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:28:42.559339+00:00 +2026-05-07 15:28:43,089 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-07 15:28:43,307 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.748s at 2026-05-07T21:28:43.307767+00:00 +2026-05-07 15:28:46,313 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:28:46.313349+00:00 +2026-05-07 15:28:46,831 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.74, h_ratio=1.19) +2026-05-07 15:28:46,865 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-07 15:28:47,077 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.764s at 2026-05-07T21:28:47.077622+00:00 +2026-05-07 15:28:59,114 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:28:59.114208+00:00 +2026-05-07 15:28:59,643 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-07 15:28:59,870 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.756s at 2026-05-07T21:28:59.870175+00:00 +2026-05-07 15:29:02,857 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:29:02.857460+00:00 +2026-05-07 15:29:03,385 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-07 15:29:03,598 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.741s at 2026-05-07T21:29:03.598245+00:00 +2026-05-07 15:29:09,230 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:29:09.230242+00:00 +2026-05-07 15:29:09,812 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=2.27, h_ratio=1.02) +2026-05-07 15:29:09,836 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-07 15:29:10,063 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.832s at 2026-05-07T21:29:10.063265+00:00 +2026-05-07 15:30:08,609 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:30:08.608222+00:00 +2026-05-07 15:30:09,164 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=2.27, h_ratio=1.02) +2026-05-07 15:30:09,188 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-07 15:30:09,393 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.785s at 2026-05-07T21:30:09.393640+00:00 +2026-05-07 15:30:14,390 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:30:14.390221+00:00 +2026-05-07 15:30:14,951 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=2.27, h_ratio=1.02) +2026-05-07 15:30:14,970 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-07 15:30:15,192 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.803s at 2026-05-07T21:30:15.192554+00:00 +2026-05-07 15:30:40,712 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T21:30:40.712459+00:00 +2026-05-07 15:30:40,713 INFO backend.segmentation: [JOB 9d4215753f664bf08bfac6b433db1a36] preparing_image progress=12 +2026-05-07 15:30:40,791 INFO backend.segmentation: [JOB 9d4215753f664bf08bfac6b433db1a36] segmenting_with_sam2 progress=30 estimated_seconds=63.05024 +2026-05-07 15:30:40,792 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 +2026-05-07 15:30:43,195 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" +2026-05-07 15:30:45,588 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-07 15:30:45,733 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-07 15:30:48,162 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" +2026-05-07 15:30:48,173 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/d1c209e4-d368-4e81-8ce0-b7c8824ed437 "HTTP/1.1 200 OK" +2026-05-07 15:30:50,534 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-05-07 15:30:53,316 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=d1c209e4-d368-4e81-8ce0-b7c8824ed437 "HTTP/1.1 200 OK" +2026-05-07 15:33:13,981 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\3944faeeae589a5b426a0f9b9ce0280816fb839f02b7dd9ab2628c5aef775da2\image.webp "HTTP/1.1 200 OK" +2026-05-07 15:33:13,999 INFO services.gradio_client_service: Gradio Space segmentation: entorno=gpu motor=SAM Auto (GPU - ZeroGPU) mask_count=66 +2026-05-07 15:33:14,000 INFO backend.segmentation: [JOB 9d4215753f664bf08bfac6b433db1a36] saving_masks progress=92 +2026-05-07 15:33:14,323 INFO backend.segmentation: [JOB 9d4215753f664bf08bfac6b433db1a36] segments_meta saved (66 segments) +2026-05-07 15:33:14,324 INFO backend.segmentation: [JOB 9d4215753f664bf08bfac6b433db1a36] done mask_count=66 +2026-05-07 15:33:14,325 INFO backend.segmentation: [UPLOAD_BG] DONE 153.613s at 2026-05-07T21:33:14.324926+00:00 +2026-05-07 15:33:14,325 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-05-07 15:33:20,991 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:33:20.991904+00:00 +2026-05-07 15:33:21,557 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.23, h_ratio=1.03) +2026-05-07 15:33:21,587 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-07 15:33:21,856 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.865s at 2026-05-07T21:33:21.856475+00:00 +2026-05-07 15:33:23,187 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:33:23.187537+00:00 +2026-05-07 15:33:23,640 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.03, h_ratio=106.02) +2026-05-07 15:33:23,660 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-07 15:33:23,887 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.700s at 2026-05-07T21:33:23.887323+00:00 +2026-05-07 15:33:28,666 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:33:28.666370+00:00 +2026-05-07 15:33:29,256 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.24, h_ratio=1.13) +2026-05-07 15:33:29,278 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-07 15:33:29,514 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.849s at 2026-05-07T21:33:29.514966+00:00 +2026-05-07 15:33:35,559 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:33:35.559814+00:00 +2026-05-07 15:33:36,119 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.23, h_ratio=1.03) +2026-05-07 15:33:36,156 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-07 15:33:36,369 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.810s at 2026-05-07T21:33:36.369980+00:00 +2026-05-07 15:33:41,348 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:33:41.348944+00:00 +2026-05-07 15:33:41,841 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.23, h_ratio=1.03) +2026-05-07 15:33:41,873 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-07 15:33:42,143 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.796s at 2026-05-07T21:33:42.143571+00:00 +2026-05-07 15:34:05,661 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:34:05.661441+00:00 +2026-05-07 15:34:06,223 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.53, h_ratio=1.33) +2026-05-07 15:34:06,245 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\venta-de-casas-modernas-residencial-los-robles.jpg +2026-05-07 15:34:06,458 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.797s at 2026-05-07T21:34:06.458559+00:00 +2026-05-07 15:37:38,373 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T21:37:38.373999+00:00 +2026-05-07 15:37:38,375 INFO backend.segmentation: [JOB 24ce2b1d21234ddb8fbb35b45f4d8792] preparing_image progress=12 +2026-05-07 15:37:38,423 INFO backend.segmentation: [JOB 24ce2b1d21234ddb8fbb35b45f4d8792] segmenting_with_sam2 progress=30 estimated_seconds=94.01599999999999 +2026-05-07 15:37:38,423 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 +2026-05-07 15:37:40,841 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" +2026-05-07 15:37:43,152 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-07 15:37:43,304 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-07 15:37:45,640 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" +2026-05-07 15:37:45,645 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/96233e8c-fcb3-4e6e-a52b-43f262d4afc5 "HTTP/1.1 200 OK" +2026-05-07 15:37:48,001 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-05-07 15:37:50,838 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=96233e8c-fcb3-4e6e-a52b-43f262d4afc5 "HTTP/1.1 200 OK" +2026-05-07 15:39:30,039 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\56758f540e1c547de434b369fae158810fde033fe3650199c54eecf9fd68ac46\image.webp "HTTP/1.1 200 OK" +2026-05-07 15:39:30,055 INFO services.gradio_client_service: Gradio Space segmentation: entorno=gpu motor=SAM Auto (GPU - ZeroGPU) mask_count=58 +2026-05-07 15:39:30,056 INFO backend.segmentation: [JOB 24ce2b1d21234ddb8fbb35b45f4d8792] saving_masks progress=92 +2026-05-07 15:39:30,380 INFO backend.segmentation: [JOB 24ce2b1d21234ddb8fbb35b45f4d8792] segments_meta saved (58 segments) +2026-05-07 15:39:30,381 INFO backend.segmentation: [JOB 24ce2b1d21234ddb8fbb35b45f4d8792] done mask_count=58 +2026-05-07 15:39:30,381 INFO backend.segmentation: [UPLOAD_BG] DONE 112.008s at 2026-05-07T21:39:30.381897+00:00 +2026-05-07 15:39:30,381 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-05-07 15:42:27,756 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:42:27.756524+00:00 +2026-05-07 15:42:28,316 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm azul.jpg +2026-05-07 15:42:28,714 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.958s at 2026-05-07T21:42:28.714486+00:00 +2026-05-07 15:42:31,110 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:42:31.110675+00:00 +2026-05-07 15:42:31,681 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm azul.jpg +2026-05-07 15:42:32,030 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.920s at 2026-05-07T21:42:32.030068+00:00 +2026-05-07 15:42:36,790 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:42:36.789013+00:00 +2026-05-07 15:42:37,354 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm azul.jpg +2026-05-07 15:42:37,723 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.934s at 2026-05-07T21:42:37.723785+00:00 +2026-05-07 15:42:43,821 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:42:43.821895+00:00 +2026-05-07 15:42:44,133 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm azul.jpg +2026-05-07 15:42:44,503 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.682s at 2026-05-07T21:42:44.503891+00:00 +2026-05-07 15:42:45,709 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:42:45.709851+00:00 +2026-05-07 15:42:46,014 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm azul.jpg +2026-05-07 15:42:46,365 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.656s at 2026-05-07T21:42:46.365851+00:00 +2026-05-07 15:42:48,755 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:42:48.755885+00:00 +2026-05-07 15:42:49,065 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm azul.jpg +2026-05-07 15:42:49,433 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.677s at 2026-05-07T21:42:49.433452+00:00 +2026-05-07 15:42:56,861 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:42:56.861868+00:00 +2026-05-07 15:42:57,289 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm azul.jpg +2026-05-07 15:42:57,689 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.827s at 2026-05-07T21:42:57.687938+00:00 +2026-05-07 15:47:02,637 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:47:02.637766+00:00 +2026-05-07 15:47:02,987 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm azul.jpg +2026-05-07 15:47:03,354 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.717s at 2026-05-07T21:47:03.354802+00:00 +2026-05-07 15:47:06,315 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:47:06.315345+00:00 +2026-05-07 15:47:06,692 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.31, h_ratio=1.04) +2026-05-07 15:47:06,734 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm azul.jpg +2026-05-07 15:47:07,092 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.777s at 2026-05-07T21:47:07.092208+00:00 +2026-05-07 15:47:19,592 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T21:47:19.592166+00:00 +2026-05-07 15:47:19,593 INFO backend.segmentation: [JOB fe9309b4ebae4857a7b0ff42d9faf677] preparing_image progress=12 +2026-05-07 15:47:20,196 INFO backend.segmentation: [JOB fe9309b4ebae4857a7b0ff42d9faf677] segmenting_with_sam2 progress=30 estimated_seconds=57.674240000000005 +2026-05-07 15:47:20,197 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 +2026-05-07 15:47:22,577 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" +2026-05-07 15:47:24,974 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-07 15:47:25,112 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-07 15:47:27,430 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/9d1507c0-f15b-4ce4-8a14-a75643934023 "HTTP/1.1 200 OK" +2026-05-07 15:47:27,451 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" +2026-05-07 15:47:29,917 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-05-07 15:47:32,852 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=9d1507c0-f15b-4ce4-8a14-a75643934023 "HTTP/1.1 200 OK" +2026-05-07 15:49:56,285 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\7fb2980e7537a93df201edb46c01cac70b34b0d407baf16d8c766c8326b688bb\image.webp "HTTP/1.1 200 OK" +2026-05-07 15:49:56,299 INFO services.gradio_client_service: Gradio Space segmentation: entorno=gpu motor=SAM Auto (GPU - ZeroGPU) mask_count=56 +2026-05-07 15:49:56,301 INFO backend.segmentation: [JOB fe9309b4ebae4857a7b0ff42d9faf677] saving_masks progress=92 +2026-05-07 15:49:56,485 INFO backend.segmentation: [JOB fe9309b4ebae4857a7b0ff42d9faf677] segments_meta saved (56 segments) +2026-05-07 15:49:56,486 INFO backend.segmentation: [JOB fe9309b4ebae4857a7b0ff42d9faf677] done mask_count=56 +2026-05-07 15:49:56,486 INFO backend.segmentation: [UPLOAD_BG] DONE 156.895s at 2026-05-07T21:49:56.486476+00:00 +2026-05-07 15:49:56,486 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-05-07 15:50:23,300 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:50:23.300896+00:00 +2026-05-07 15:50:23,632 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.01, h_ratio=1.43) +2026-05-07 15:50:23,649 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\EB-UD3231 (1).jpg +2026-05-07 15:50:23,860 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.560s at 2026-05-07T21:50:23.860900+00:00 +2026-05-07 15:50:25,390 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:50:25.390001+00:00 +2026-05-07 15:50:25,729 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.05, h_ratio=1.59) +2026-05-07 15:50:25,748 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\EB-UD3231 (1).jpg +2026-05-07 15:50:25,961 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.573s at 2026-05-07T21:50:25.961503+00:00 +2026-05-07 15:50:29,067 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:50:29.067701+00:00 +2026-05-07 15:50:29,357 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\EB-UD3231 (1).jpg +2026-05-07 15:50:29,574 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.505s at 2026-05-07T21:50:29.573244+00:00 +2026-05-07 15:50:30,765 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:50:30.765933+00:00 +2026-05-07 15:50:31,113 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.43, h_ratio=1.00) +2026-05-07 15:50:31,135 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\EB-UD3231 (1).jpg +2026-05-07 15:50:31,381 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.616s at 2026-05-07T21:50:31.381120+00:00 +2026-05-07 15:50:34,372 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:50:34.372354+00:00 +2026-05-07 15:50:34,702 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\EB-UD3231 (1).jpg +2026-05-07 15:50:34,919 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.547s at 2026-05-07T21:50:34.919402+00:00 +2026-05-07 15:50:38,283 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:50:38.283908+00:00 +2026-05-07 15:50:38,620 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\EB-UD3231 (1).jpg +2026-05-07 15:50:38,822 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.538s at 2026-05-07T21:50:38.821521+00:00 +2026-05-07 15:50:42,362 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:50:42.362356+00:00 +2026-05-07 15:50:42,752 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.01, h_ratio=81.06) +2026-05-07 15:50:42,770 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\EB-UD3231 (1).jpg +2026-05-07 15:50:42,983 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.622s at 2026-05-07T21:50:42.983933+00:00 +2026-05-07 15:50:46,827 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:50:46.827950+00:00 +2026-05-07 15:50:47,260 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\EB-UD3231 (1).jpg +2026-05-07 15:50:47,509 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.681s at 2026-05-07T21:50:47.509694+00:00 +2026-05-07 15:50:51,671 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:50:51.671277+00:00 +2026-05-07 15:50:52,056 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\EB-UD3231 (1).jpg +2026-05-07 15:50:52,261 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.591s at 2026-05-07T21:50:52.261800+00:00 +2026-05-07 15:51:01,177 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T21:51:01.177947+00:00 +2026-05-07 15:51:01,177 INFO backend.segmentation: [JOB 79a04736dcfa4abc8383a745c149b88c] preparing_image progress=12 +2026-05-07 15:51:01,277 INFO backend.segmentation: [JOB 79a04736dcfa4abc8383a745c149b88c] segmenting_with_sam2 progress=30 estimated_seconds=71.65183999999999 +2026-05-07 15:51:01,279 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 +2026-05-07 15:51:03,724 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" +2026-05-07 15:51:06,105 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-07 15:51:06,299 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-07 15:51:08,531 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/1f6ec649-450c-4d10-a42f-a0714e8554c6 "HTTP/1.1 200 OK" +2026-05-07 15:51:08,533 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" +2026-05-07 15:51:10,974 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-05-07 15:51:13,861 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=1f6ec649-450c-4d10-a42f-a0714e8554c6 "HTTP/1.1 200 OK" +2026-05-07 15:53:32,035 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\9b2d1c318212280bd44f91bf2c3aa028767f3015780e04d1e67d456398adfe23\image.webp "HTTP/1.1 200 OK" +2026-05-07 15:53:32,051 INFO services.gradio_client_service: Gradio Space segmentation: entorno=gpu motor=SAM Auto (GPU - ZeroGPU) mask_count=55 +2026-05-07 15:53:32,051 INFO backend.segmentation: [JOB 79a04736dcfa4abc8383a745c149b88c] saving_masks progress=92 +2026-05-07 15:53:32,291 INFO backend.segmentation: [JOB 79a04736dcfa4abc8383a745c149b88c] segments_meta saved (55 segments) +2026-05-07 15:53:32,291 INFO backend.segmentation: [JOB 79a04736dcfa4abc8383a745c149b88c] done mask_count=55 +2026-05-07 15:53:32,291 INFO backend.segmentation: [UPLOAD_BG] DONE 151.115s at 2026-05-07T21:53:32.291574+00:00 +2026-05-07 15:53:32,291 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-05-07 15:53:42,312 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:53:42.312363+00:00 +2026-05-07 15:53:42,838 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.04, h_ratio=1.36) +2026-05-07 15:53:42,868 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\unnamed.jpg +2026-05-07 15:53:43,124 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.812s at 2026-05-07T21:53:43.124323+00:00 +2026-05-07 15:53:45,407 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:53:45.407699+00:00 +2026-05-07 15:53:45,913 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\unnamed.jpg +2026-05-07 15:53:46,160 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.752s at 2026-05-07T21:53:46.160544+00:00 +2026-05-07 15:53:51,917 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:53:51.917268+00:00 +2026-05-07 15:53:52,460 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.04, h_ratio=1.36) +2026-05-07 15:53:52,504 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\unnamed.jpg +2026-05-07 15:53:52,784 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.868s at 2026-05-07T21:53:52.784729+00:00 +2026-05-07 15:53:59,737 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:53:59.737940+00:00 +2026-05-07 15:54:00,303 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.01, h_ratio=1.26) +2026-05-07 15:54:00,325 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\unnamed.jpg +2026-05-07 15:54:00,581 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.843s at 2026-05-07T21:54:00.581113+00:00 +2026-05-07 15:54:07,204 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:54:07.204959+00:00 +2026-05-07 15:54:07,723 INFO backend.segmentation: [APPLY_TEXTURE] flat floor tiling (trap=0.02 < 0.35, skip perspective) +2026-05-07 15:54:07,755 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\unnamed.jpg +2026-05-07 15:54:08,011 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.806s at 2026-05-07T21:54:08.011194+00:00 +2026-05-07 15:54:14,251 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:54:14.251503+00:00 +2026-05-07 15:54:14,586 INFO backend.segmentation: [APPLY_TEXTURE] flat floor tiling (trap=0.02 < 0.35, skip perspective) +2026-05-07 15:54:14,618 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\unnamed.jpg +2026-05-07 15:54:14,893 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.642s at 2026-05-07T21:54:14.893824+00:00 +2026-05-07 15:54:20,951 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:54:20.951821+00:00 +2026-05-07 15:54:21,369 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.00, h_ratio=1.21) +2026-05-07 15:54:21,394 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\unnamed.jpg +2026-05-07 15:54:21,654 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.703s at 2026-05-07T21:54:21.654007+00:00 +2026-05-07 15:55:49,324 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T21:55:49.324991+00:00 +2026-05-07 15:55:49,325 INFO backend.segmentation: [JOB df4da3c76a584af9a84bfa05b6253222] preparing_image progress=12 +2026-05-07 15:55:49,407 INFO backend.segmentation: [JOB df4da3c76a584af9a84bfa05b6253222] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 +2026-05-07 15:55:49,407 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 +2026-05-07 15:55:51,777 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" +2026-05-07 15:55:54,163 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-07 15:55:54,303 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-07 15:55:56,641 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/ddc1fa5d-ad06-492d-be12-a7f5ee46894f "HTTP/1.1 200 OK" +2026-05-07 15:55:56,647 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" +2026-05-07 15:55:59,061 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-05-07 15:56:01,950 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=ddc1fa5d-ad06-492d-be12-a7f5ee46894f "HTTP/1.1 200 OK" +2026-05-07 15:58:10,784 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\63f35ee774073b13ee87a1d3c7e73d1d3b47b4183190f3b098b633273f464612\image.webp "HTTP/1.1 200 OK" +2026-05-07 15:58:10,799 INFO services.gradio_client_service: Gradio Space segmentation: entorno=gpu motor=SAM Auto (GPU - ZeroGPU) mask_count=61 +2026-05-07 15:58:10,799 INFO backend.segmentation: [JOB df4da3c76a584af9a84bfa05b6253222] saving_masks progress=92 +2026-05-07 15:58:11,031 INFO backend.segmentation: [JOB df4da3c76a584af9a84bfa05b6253222] segments_meta saved (61 segments) +2026-05-07 15:58:11,033 INFO backend.segmentation: [JOB df4da3c76a584af9a84bfa05b6253222] done mask_count=61 +2026-05-07 15:58:11,033 INFO backend.segmentation: [UPLOAD_BG] DONE 141.708s at 2026-05-07T21:58:11.033788+00:00 +2026-05-07 15:58:11,033 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-05-07 15:58:20,920 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:58:20.920319+00:00 +2026-05-07 15:58:21,375 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.23, h_ratio=1.07) +2026-05-07 15:58:21,407 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-05-07 15:58:21,598 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.679s at 2026-05-07T21:58:21.598068+00:00 +2026-05-07 15:58:24,623 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:58:24.623163+00:00 +2026-05-07 15:58:25,169 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.23, h_ratio=1.07) +2026-05-07 15:58:25,191 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-05-07 15:58:25,360 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.738s at 2026-05-07T21:58:25.360818+00:00 +2026-05-07 15:58:28,165 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:58:28.165635+00:00 +2026-05-07 15:58:28,661 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-05-07 15:58:28,843 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.678s at 2026-05-07T21:58:28.843020+00:00 +2026-05-07 15:58:32,464 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:58:32.464694+00:00 +2026-05-07 15:58:32,978 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.08, h_ratio=1.42) +2026-05-07 15:58:32,994 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-05-07 15:58:33,161 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.696s at 2026-05-07T21:58:33.161634+00:00 +2026-05-07 15:58:38,273 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:58:38.273840+00:00 +2026-05-07 15:58:38,781 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.13, h_ratio=2.54) +2026-05-07 15:58:38,796 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-05-07 15:58:39,000 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.726s at 2026-05-07T21:58:39.000222+00:00 +2026-05-07 15:58:46,330 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:58:46.330265+00:00 +2026-05-07 15:58:46,828 INFO backend.segmentation: [APPLY_TEXTURE] perspective floor tiling applied (trap=1.00) +2026-05-07 15:58:46,842 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-05-07 15:58:47,013 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.682s at 2026-05-07T21:58:47.013199+00:00 +2026-05-07 15:58:50,609 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:58:50.609562+00:00 +2026-05-07 15:58:51,166 INFO backend.segmentation: [APPLY_TEXTURE] perspective floor tiling applied (trap=1.00) +2026-05-07 15:58:51,183 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-05-07 15:58:51,361 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.752s at 2026-05-07T21:58:51.361385+00:00 +2026-05-07 15:58:55,441 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:58:55.441205+00:00 +2026-05-07 15:58:55,946 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-05-07 15:58:56,114 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.673s at 2026-05-07T21:58:56.113779+00:00 +2026-05-07 15:59:08,450 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T21:59:08.450556+00:00 +2026-05-07 15:59:08,975 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.23, h_ratio=1.07) +2026-05-07 15:59:09,001 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-05-07 15:59:09,173 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.723s at 2026-05-07T21:59:09.173815+00:00 +2026-05-07 15:59:16,551 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T21:59:16.551116+00:00 +2026-05-07 15:59:16,552 INFO backend.segmentation: [JOB 08b23c3c64214b4aa800997fa64cd9a7] preparing_image progress=12 +2026-05-07 15:59:16,631 INFO backend.segmentation: [JOB 08b23c3c64214b4aa800997fa64cd9a7] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 +2026-05-07 15:59:16,631 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 +2026-05-07 15:59:18,993 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" +2026-05-07 15:59:21,337 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-07 15:59:21,485 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-07 15:59:23,779 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/c1c694f0-2678-4cce-a664-ce7657360059 "HTTP/1.1 200 OK" +2026-05-07 15:59:23,799 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" +2026-05-07 15:59:26,196 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-05-07 15:59:29,114 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=c1c694f0-2678-4cce-a664-ce7657360059 "HTTP/1.1 200 OK" +2026-05-07 16:01:40,463 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\3f4bbc5e6cf6ca3e1f300135e65cb8423907d8d2601a24cab61eaf4e68bb94d8\image.webp "HTTP/1.1 200 OK" +2026-05-07 16:01:40,478 INFO services.gradio_client_service: Gradio Space segmentation: entorno=gpu motor=SAM Auto (GPU - ZeroGPU) mask_count=51 +2026-05-07 16:01:40,479 INFO backend.segmentation: [JOB 08b23c3c64214b4aa800997fa64cd9a7] saving_masks progress=92 +2026-05-07 16:01:40,648 INFO backend.segmentation: [JOB 08b23c3c64214b4aa800997fa64cd9a7] segments_meta saved (51 segments) +2026-05-07 16:01:40,649 INFO backend.segmentation: [JOB 08b23c3c64214b4aa800997fa64cd9a7] done mask_count=51 +2026-05-07 16:01:40,649 INFO backend.segmentation: [UPLOAD_BG] DONE 144.098s at 2026-05-07T22:01:40.649441+00:00 +2026-05-07 16:01:40,649 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-05-07 16:04:16,992 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T22:04:16.992111+00:00 +2026-05-07 16:04:17,540 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-05-07 16:04:17,715 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.724s at 2026-05-07T22:04:17.715600+00:00 +2026-05-07 16:04:20,514 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T22:04:20.514659+00:00 +2026-05-07 16:04:21,019 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.03, h_ratio=1.38) +2026-05-07 16:04:21,036 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-05-07 16:04:21,242 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.727s at 2026-05-07T22:04:21.242012+00:00 +2026-05-07 16:04:28,071 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T22:04:28.071982+00:00 +2026-05-07 16:04:28,407 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.30, h_ratio=1.35) +2026-05-07 16:04:28,428 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-05-07 16:04:28,596 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.525s at 2026-05-07T22:04:28.596511+00:00 +2026-05-07 16:04:30,490 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T22:04:30.490530+00:00 +2026-05-07 16:04:30,813 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.02, h_ratio=1.81) +2026-05-07 16:04:30,833 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-05-07 16:04:31,008 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.519s at 2026-05-07T22:04:31.008084+00:00 +2026-05-07 16:05:02,767 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T22:05:02.767829+00:00 +2026-05-07 16:05:03,251 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\demo-room.jpg +2026-05-07 16:05:03,405 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.636s at 2026-05-07T22:05:03.405079+00:00 +2026-05-07 16:05:43,990 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T22:05:43.990943+00:00 +2026-05-07 16:05:43,990 INFO backend.segmentation: [JOB 3e0cf02dd665435db0db0a0143215be8] preparing_image progress=12 +2026-05-07 16:05:44,067 INFO backend.segmentation: [JOB 3e0cf02dd665435db0db0a0143215be8] segmenting_with_sam2 progress=30 estimated_seconds=49.28768 +2026-05-07 16:05:44,067 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 +2026-05-07 16:05:46,491 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" +2026-05-07 16:05:48,868 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-07 16:05:49,016 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-07 16:05:51,323 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/6f95fab4-a857-4501-89ac-ccbf7e0581ea "HTTP/1.1 200 OK" +2026-05-07 16:05:51,327 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" +2026-05-07 16:05:53,691 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-05-07 16:05:56,691 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=6f95fab4-a857-4501-89ac-ccbf7e0581ea "HTTP/1.1 200 OK" +2026-05-07 16:08:09,268 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\63f35ee774073b13ee87a1d3c7e73d1d3b47b4183190f3b098b633273f464612\image.webp "HTTP/1.1 200 OK" +2026-05-07 16:08:09,288 INFO services.gradio_client_service: Gradio Space segmentation: entorno=gpu motor=SAM Auto (GPU - ZeroGPU) mask_count=61 +2026-05-07 16:08:09,289 INFO backend.segmentation: [JOB 3e0cf02dd665435db0db0a0143215be8] saving_masks progress=92 +2026-05-07 16:08:09,486 INFO backend.segmentation: [JOB 3e0cf02dd665435db0db0a0143215be8] segments_meta saved (61 segments) +2026-05-07 16:08:09,486 INFO backend.segmentation: [JOB 3e0cf02dd665435db0db0a0143215be8] done mask_count=61 +2026-05-07 16:08:09,488 INFO backend.segmentation: [UPLOAD_BG] DONE 145.497s at 2026-05-07T22:08:09.488380+00:00 +2026-05-07 16:08:09,488 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-05-07 16:22:47,224 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T22:22:47.224087+00:00 +2026-05-07 16:22:47,225 INFO backend.segmentation: [JOB bc86ad310222406a8ffacc5db249c183] preparing_image progress=12 +2026-05-07 16:22:47,297 INFO backend.segmentation: [JOB bc86ad310222406a8ffacc5db249c183] segmenting_with_sam2 progress=30 estimated_seconds=58.39104 +2026-05-07 16:22:47,298 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 +2026-05-07 16:22:49,799 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" +2026-05-07 16:22:52,184 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-07 16:22:52,330 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-07 16:22:54,605 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/3d5ff637-214a-47c4-8a4f-d64d884b7a8b "HTTP/1.1 200 OK" +2026-05-07 16:22:54,640 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" +2026-05-07 16:22:57,021 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-05-07 16:23:00,162 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=3d5ff637-214a-47c4-8a4f-d64d884b7a8b "HTTP/1.1 200 OK" +2026-05-07 16:25:15,470 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\e9e23a4c03e9b88d2db6cb764c2778b1091e1c8b97c256c28501ff9297140221\image.webp "HTTP/1.1 200 OK" +2026-05-07 16:25:15,487 INFO services.gradio_client_service: Gradio Space segmentation: entorno=gpu motor=SAM Auto (GPU - ZeroGPU) mask_count=63 +2026-05-07 16:25:15,487 INFO backend.segmentation: [JOB bc86ad310222406a8ffacc5db249c183] saving_masks progress=92 +2026-05-07 16:25:15,707 INFO backend.segmentation: [JOB bc86ad310222406a8ffacc5db249c183] segments_meta saved (63 segments) +2026-05-07 16:25:15,708 INFO backend.segmentation: [JOB bc86ad310222406a8ffacc5db249c183] done mask_count=63 +2026-05-07 16:25:15,708 INFO backend.segmentation: [UPLOAD_BG] DONE 148.483s at 2026-05-07T22:25:15.708008+00:00 +2026-05-07 16:25:15,708 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-05-07 16:29:50,418 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T22:29:50.418894+00:00 +2026-05-07 16:29:50,418 INFO backend.segmentation: [JOB ddc21cbf4f774a4590e387679154a1d1] preparing_image progress=12 +2026-05-07 16:29:50,498 INFO backend.segmentation: [JOB ddc21cbf4f774a4590e387679154a1d1] segmenting_with_sam2 progress=30 estimated_seconds=58.39104 +2026-05-07 16:29:50,500 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 +2026-05-07 16:29:52,926 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" +2026-05-07 16:29:55,311 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-07 16:29:55,457 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-07 16:29:57,773 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/c79c4e3d-25f5-4e6a-a4ba-45e7493b7b23 "HTTP/1.1 200 OK" +2026-05-07 16:29:57,774 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" +2026-05-07 16:30:00,168 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-05-07 16:30:03,061 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=c79c4e3d-25f5-4e6a-a4ba-45e7493b7b23 "HTTP/1.1 200 OK" +2026-05-07 16:32:17,053 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\e9e23a4c03e9b88d2db6cb764c2778b1091e1c8b97c256c28501ff9297140221\image.webp "HTTP/1.1 200 OK" +2026-05-07 16:32:17,071 INFO services.gradio_client_service: Gradio Space segmentation: entorno=gpu motor=SAM Auto (GPU - ZeroGPU) mask_count=63 +2026-05-07 16:32:17,071 INFO backend.segmentation: [JOB ddc21cbf4f774a4590e387679154a1d1] saving_masks progress=92 +2026-05-07 16:32:17,286 INFO backend.segmentation: [JOB ddc21cbf4f774a4590e387679154a1d1] segments_meta saved (63 segments) +2026-05-07 16:32:17,286 INFO backend.segmentation: [JOB ddc21cbf4f774a4590e387679154a1d1] done mask_count=63 +2026-05-07 16:32:17,288 INFO backend.segmentation: [UPLOAD_BG] DONE 146.869s at 2026-05-07T22:32:17.288291+00:00 +2026-05-07 16:32:17,288 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-05-07 16:32:41,697 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T22:32:41.697454+00:00 +2026-05-07 16:32:42,204 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-07 16:32:42,424 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.726s at 2026-05-07T22:32:42.424111+00:00 +2026-05-07 16:33:01,624 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T22:33:01.624117+00:00 +2026-05-07 16:33:01,624 INFO backend.segmentation: [JOB e3808e0cd3a54671be6ce77b16600d2d] preparing_image progress=12 +2026-05-07 16:33:01,697 INFO backend.segmentation: [JOB e3808e0cd3a54671be6ce77b16600d2d] segmenting_with_sam2 progress=30 estimated_seconds=58.39104 +2026-05-07 16:33:01,698 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 +2026-05-07 16:33:04,132 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" +2026-05-07 16:33:06,530 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-07 16:33:06,692 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-07 16:33:08,991 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/78cd91de-4ac8-417d-a699-df5ceae4592f "HTTP/1.1 200 OK" +2026-05-07 16:33:08,994 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" +2026-05-07 16:33:11,414 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-05-07 16:33:14,289 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=78cd91de-4ac8-417d-a699-df5ceae4592f "HTTP/1.1 200 OK" +2026-05-07 16:35:33,030 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\e9e23a4c03e9b88d2db6cb764c2778b1091e1c8b97c256c28501ff9297140221\image.webp "HTTP/1.1 200 OK" +2026-05-07 16:35:33,049 INFO services.gradio_client_service: Gradio Space segmentation: entorno=gpu motor=SAM Auto (GPU - ZeroGPU) mask_count=63 +2026-05-07 16:35:33,049 INFO backend.segmentation: [JOB e3808e0cd3a54671be6ce77b16600d2d] saving_masks progress=92 +2026-05-07 16:35:33,274 INFO backend.segmentation: [JOB e3808e0cd3a54671be6ce77b16600d2d] segments_meta saved (63 segments) +2026-05-07 16:35:33,275 INFO backend.segmentation: [JOB e3808e0cd3a54671be6ce77b16600d2d] done mask_count=63 +2026-05-07 16:35:33,276 INFO backend.segmentation: [UPLOAD_BG] DONE 151.652s at 2026-05-07T22:35:33.276280+00:00 +2026-05-07 16:35:33,276 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-05-07 16:36:09,236 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T22:36:09.236174+00:00 +2026-05-07 16:36:09,540 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.59, h_ratio=1.44) +2026-05-07 16:36:09,562 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-07 16:36:09,777 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.540s at 2026-05-07T22:36:09.777110+00:00 +2026-05-07 16:36:15,985 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T22:36:15.985071+00:00 +2026-05-07 16:36:16,483 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.16, h_ratio=1.26) +2026-05-07 16:36:16,504 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-07 16:36:16,716 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.731s at 2026-05-07T22:36:16.716050+00:00 +2026-05-07 16:36:25,017 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T22:36:25.017619+00:00 +2026-05-07 16:36:25,564 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.03, h_ratio=1.37) +2026-05-07 16:36:25,587 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-07 16:36:25,803 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.786s at 2026-05-07T22:36:25.803112+00:00 +2026-05-07 16:36:26,817 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T22:36:26.817271+00:00 +2026-05-07 16:36:27,352 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-07 16:36:27,584 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.767s at 2026-05-07T22:36:27.584739+00:00 +2026-05-07 16:36:28,334 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T22:36:28.334300+00:00 +2026-05-07 16:36:28,857 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-07 16:36:29,081 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.747s at 2026-05-07T22:36:29.081102+00:00 +2026-05-07 16:36:32,240 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T22:36:32.240623+00:00 +2026-05-07 16:36:32,772 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\WhatsApp Image 2026-05-06 at 18.47.21.jpg +2026-05-07 16:36:33,003 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.763s at 2026-05-07T22:36:33.003855+00:00 +2026-05-07 16:40:31,573 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T22:40:31.573485+00:00 +2026-05-07 16:40:31,573 INFO backend.segmentation: [JOB abe6fcd597e44e188de85ec16c828d4f] preparing_image progress=12 +2026-05-07 16:40:31,619 INFO backend.segmentation: [JOB abe6fcd597e44e188de85ec16c828d4f] segmenting_with_sam2 progress=30 estimated_seconds=94.01599999999999 +2026-05-07 16:40:31,620 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 +2026-05-07 16:40:34,052 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" +2026-05-07 16:40:36,278 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-07 16:40:36,412 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-07 16:40:38,556 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/e3bbcd8a-d009-4eb7-b2ef-0318dd7f287c "HTTP/1.1 200 OK" +2026-05-07 16:40:38,575 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" +2026-05-07 16:40:40,832 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-05-07 16:40:43,079 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=e3bbcd8a-d009-4eb7-b2ef-0318dd7f287c "HTTP/1.1 200 OK" +2026-05-07 16:42:01,159 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\56758f540e1c547de434b369fae158810fde033fe3650199c54eecf9fd68ac46\image.webp "HTTP/1.1 200 OK" +2026-05-07 16:42:01,173 INFO services.gradio_client_service: Gradio Space segmentation: entorno=gpu motor=SAM Auto (GPU - ZeroGPU) mask_count=58 +2026-05-07 16:42:01,174 INFO backend.segmentation: [JOB abe6fcd597e44e188de85ec16c828d4f] saving_masks progress=92 +2026-05-07 16:42:01,396 INFO backend.segmentation: [JOB abe6fcd597e44e188de85ec16c828d4f] segments_meta saved (58 segments) +2026-05-07 16:42:01,397 INFO backend.segmentation: [JOB abe6fcd597e44e188de85ec16c828d4f] done mask_count=58 +2026-05-07 16:42:01,397 INFO backend.segmentation: [UPLOAD_BG] DONE 89.824s at 2026-05-07T22:42:01.397333+00:00 +2026-05-07 16:42:01,397 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-05-07 16:43:02,036 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T22:43:02.036847+00:00 +2026-05-07 16:43:02,036 INFO backend.segmentation: [JOB 98668f875a5a491a9e24d80f6c5877f7] preparing_image progress=12 +2026-05-07 16:43:02,378 INFO backend.segmentation: [JOB 98668f875a5a491a9e24d80f6c5877f7] segmenting_with_sam2 progress=30 estimated_seconds=105.8432 +2026-05-07 16:43:02,380 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 +2026-05-07 16:43:04,773 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" +2026-05-07 16:43:07,148 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-07 16:43:07,281 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-07 16:43:09,603 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/a89250d1-ac0d-45ef-9bdc-7f28bdbd5c74 "HTTP/1.1 200 OK" +2026-05-07 16:43:09,607 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" +2026-05-07 16:43:12,018 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-05-07 16:43:14,837 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=a89250d1-ac0d-45ef-9bdc-7f28bdbd5c74 "HTTP/1.1 200 OK" +2026-05-07 16:45:52,678 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\fe7e296f49e3953b396fc8aeb7f4885b83ba4201a8d3f8d451ff0339d7391c52\image.webp "HTTP/1.1 200 OK" +2026-05-07 16:45:52,698 INFO services.gradio_client_service: Gradio Space segmentation: entorno=gpu motor=SAM Auto (GPU - ZeroGPU) mask_count=74 +2026-05-07 16:45:52,698 INFO backend.segmentation: [JOB 98668f875a5a491a9e24d80f6c5877f7] saving_masks progress=92 +2026-05-07 16:45:53,143 INFO backend.segmentation: [JOB 98668f875a5a491a9e24d80f6c5877f7] segments_meta saved (74 segments) +2026-05-07 16:45:53,143 INFO backend.segmentation: [JOB 98668f875a5a491a9e24d80f6c5877f7] done mask_count=74 +2026-05-07 16:45:53,144 INFO backend.segmentation: [UPLOAD_BG] DONE 171.106s at 2026-05-07T22:45:53.144055+00:00 +2026-05-07 16:45:53,144 INFO backend.segmentation: Releasing resources (full_unload=False) +2026-05-07 16:46:04,090 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T22:46:04.090988+00:00 +2026-05-07 16:46:04,428 INFO backend.segmentation: [APPLY_TEXTURE] flat floor tiling (trap=0.31 < 0.35, skip perspective) +2026-05-07 16:46:04,482 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm gris.jpg +2026-05-07 16:46:04,894 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.803s at 2026-05-07T22:46:04.893619+00:00 +2026-05-07 16:46:13,581 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T22:46:13.581681+00:00 +2026-05-07 16:46:13,926 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm gris.jpg +2026-05-07 16:46:14,330 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.749s at 2026-05-07T22:46:14.330751+00:00 +2026-05-07 16:46:19,978 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T22:46:19.978023+00:00 +2026-05-07 16:46:20,448 INFO backend.segmentation: [APPLY_TEXTURE] flat floor tiling (trap=0.31 < 0.35, skip perspective) +2026-05-07 16:46:20,501 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm gris.jpg +2026-05-07 16:46:20,917 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.939s at 2026-05-07T22:46:20.917957+00:00 +2026-05-07 16:46:24,322 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T22:46:24.322422+00:00 +2026-05-07 16:46:24,904 INFO backend.segmentation: [APPLY_TEXTURE] perspective floor tiling applied (trap=1.00) +2026-05-07 16:46:24,949 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm gris.jpg +2026-05-07 16:46:25,362 INFO backend.segmentation: [APPLY_TEXTURE] DONE 1.040s at 2026-05-07T22:46:25.362160+00:00 +2026-05-07 16:46:29,955 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T22:46:29.955304+00:00 +2026-05-07 16:46:30,502 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.72, h_ratio=1.98) +2026-05-07 16:46:30,549 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm gris.jpg +2026-05-07 16:46:30,987 INFO backend.segmentation: [APPLY_TEXTURE] DONE 1.033s at 2026-05-07T22:46:30.987573+00:00 +2026-05-07 16:46:38,234 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T22:46:38.234058+00:00 +2026-05-07 16:46:38,637 INFO backend.segmentation: [APPLY_TEXTURE] flat floor tiling (trap=0.31 < 0.35, skip perspective) +2026-05-07 16:46:38,690 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm gris.jpg +2026-05-07 16:46:39,101 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.867s at 2026-05-07T22:46:39.101314+00:00 +2026-05-07 17:01:04,655 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T23:01:04.655845+00:00 +2026-05-07 17:01:05,250 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.05, h_ratio=1.68) +2026-05-07 17:01:05,308 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm gris.jpg +2026-05-07 17:01:05,726 INFO backend.segmentation: [APPLY_TEXTURE] DONE 1.071s at 2026-05-07T23:01:05.726857+00:00 +2026-05-07 17:19:38,903 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 +2026-05-07 17:19:38,930 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. +2026-05-07 17:20:05,519 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T23:20:05.519131+00:00 +2026-05-07 17:20:05,664 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.72, h_ratio=1.98) +2026-05-07 17:20:05,718 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm gris.jpg +2026-05-07 17:20:06,288 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.770s at 2026-05-07T23:20:06.288369+00:00 +2026-05-07 17:20:10,885 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T23:20:10.885784+00:00 +2026-05-07 17:20:11,012 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.72, h_ratio=1.98) +2026-05-07 17:20:11,057 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm gris.jpg +2026-05-07 17:20:11,494 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.609s at 2026-05-07T23:20:11.493854+00:00 +2026-05-07 17:20:16,040 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T23:20:16.040610+00:00 +2026-05-07 17:20:16,136 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm gris.jpg +2026-05-07 17:20:16,549 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.509s at 2026-05-07T23:20:16.549652+00:00 +2026-05-07 17:20:18,515 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T23:20:18.515915+00:00 +2026-05-07 17:20:18,600 INFO backend.segmentation: [APPLY_TEXTURE] flat floor tiling (trap=0.31 < 0.35, skip perspective) +2026-05-07 17:20:18,652 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm gris.jpg +2026-05-07 17:20:19,065 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.550s at 2026-05-07T23:20:19.065884+00:00 +2026-05-07 17:20:25,048 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T23:20:25.048663+00:00 +2026-05-07 17:20:25,199 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.17, h_ratio=1.48) +2026-05-07 17:20:25,233 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm gris.jpg +2026-05-07 17:20:25,664 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.616s at 2026-05-07T23:20:25.664798+00:00 +2026-05-07 17:20:29,831 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T23:20:29.831966+00:00 +2026-05-07 17:20:29,986 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.17, h_ratio=1.48) +2026-05-07 17:20:30,018 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm gris.jpg +2026-05-07 17:20:30,460 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.629s at 2026-05-07T23:20:30.460822+00:00 +2026-05-07 17:20:31,763 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T23:20:31.763484+00:00 +2026-05-07 17:20:31,886 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.72, h_ratio=1.98) +2026-05-07 17:20:31,929 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm gris.jpg +2026-05-07 17:20:32,354 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.591s at 2026-05-07T23:20:32.354006+00:00 +2026-05-07 17:20:33,945 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T23:20:33.945098+00:00 +2026-05-07 17:20:34,040 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm gris.jpg +2026-05-07 17:20:34,468 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.523s at 2026-05-07T23:20:34.468881+00:00 +2026-05-07 17:20:35,606 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T23:20:35.606548+00:00 +2026-05-07 17:20:35,728 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.72, h_ratio=1.98) +2026-05-07 17:20:35,776 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm gris.jpg +2026-05-07 17:20:36,186 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.580s at 2026-05-07T23:20:36.186410+00:00 +2026-05-07 17:21:19,858 INFO backend.segmentation: [APPLY_TEXTURE] START at 2026-05-07T23:21:19.858037+00:00 +2026-05-07 17:21:19,984 INFO backend.segmentation: [APPLY_TEXTURE] perspective wall tiling applied (w_ratio=1.72, h_ratio=1.98) +2026-05-07 17:21:20,031 INFO backend.segmentation: [APPLY_TEXTURE] cleared mask from original source: C:\Users\alane\OneDrive\Escritorio\Trabajo\Prueba-PoC\backend\uploads\acm gris.jpg +2026-05-07 17:21:20,492 INFO backend.segmentation: [APPLY_TEXTURE] DONE 0.633s at 2026-05-07T23:21:20.492075+00:00 +2026-05-07 17:23:17,203 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 +2026-05-07 17:23:17,220 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. +2026-05-07 17:34:54,520 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 +2026-05-07 17:34:54,537 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. +2026-05-07 17:34:55,382 INFO backend.segmentation: [STARTUP] GRADIO_SPACE_URL=http://localhost:7860 +2026-05-07 17:34:55,400 INFO backend.segmentation: [LIFESPAN] GRADIO_SPACE_URL set — skipping local SAM2 load. +2026-05-07 17:35:53,725 INFO pymongo.serverSelection: {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": ", , ]>", "clientId": {"$oid": "69fd21d97b5fb8b402d113c5"}, "remainingTimeMS": 30} +2026-05-07 17:38:06,088 INFO backend.segmentation: [UPLOAD_BG] START at 2026-05-07T23:38:06.088546+00:00 +2026-05-07 17:38:06,088 INFO backend.segmentation: [JOB 1c11e34d2f414d9e9328b1801e210f5a] preparing_image progress=12 +2026-05-07 17:38:06,177 INFO backend.segmentation: [JOB 1c11e34d2f414d9e9328b1801e210f5a] segmenting_with_sam2 progress=30 estimated_seconds=58.39104 +2026-05-07 17:38:06,178 INFO services.gradio_client_service: Calling GPU Gradio Space: http://localhost:7860 +2026-05-07 17:38:10,859 INFO httpx: HTTP Request: GET http://localhost:7860/config "HTTP/1.1 200 OK" +2026-05-07 17:38:13,266 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/info?serialize=False "HTTP/1.1 200 OK" +2026-05-07 17:38:13,842 INFO httpx: HTTP Request: HEAD https://huggingface.co/api/telemetry/py_client/initiated "HTTP/1.1 200 OK" +2026-05-07 17:38:15,792 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/heartbeat/9771f2ad-8cd2-4dbb-bf76-dbcaa54a9e8c "HTTP/1.1 200 OK" +2026-05-07 17:38:15,799 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/upload "HTTP/1.1 200 OK" +2026-05-07 17:38:18,175 INFO httpx: HTTP Request: POST http://localhost:7860/gradio_api/queue/join "HTTP/1.1 200 OK" +2026-05-07 17:38:21,015 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/queue/data?session_hash=9771f2ad-8cd2-4dbb-bf76-dbcaa54a9e8c "HTTP/1.1 200 OK" +2026-05-07 17:39:18,012 INFO httpx: HTTP Request: GET http://localhost:7860/gradio_api/file=C:\Users\alane\AppData\Local\Temp\gradio\e9e23a4c03e9b88d2db6cb764c2778b1091e1c8b97c256c28501ff9297140221\image.webp "HTTP/1.1 200 OK" +2026-05-07 17:39:18,026 INFO services.gradio_client_service: Gradio Space segmentation: entorno=gpu motor=SAM Auto (GPU - ZeroGPU) mask_count=63 +2026-05-07 17:39:18,026 INFO backend.segmentation: [JOB 1c11e34d2f414d9e9328b1801e210f5a] saving_masks progress=92 +2026-05-07 17:39:18,184 INFO backend.segmentation: [JOB 1c11e34d2f414d9e9328b1801e210f5a] segments_meta saved (63 segments) +2026-05-07 17:39:18,184 INFO backend.segmentation: [JOB 1c11e34d2f414d9e9328b1801e210f5a] done mask_count=63 +2026-05-07 17:39:18,184 INFO backend.segmentation: [UPLOAD_BG] DONE 72.097s at 2026-05-07T23:39:18.184964+00:00 +2026-05-07 17:39:18,184 INFO backend.segmentation: Releasing resources (full_unload=False) diff --git a/backend/main.py b/backend/main.py index 00ef88c46c9bb07c0d6be505fca3abc7f50cbd04..4124d71f52b02ea7f28f86ba7f8323a94b4a0758 100644 --- a/backend/main.py +++ b/backend/main.py @@ -1,176 +1,128 @@ -import mimetypes -import os -import subprocess -import shutil -import threading -import time -from pathlib import Path - -from dotenv import load_dotenv -load_dotenv(Path(__file__).resolve().parent / ".env") - -from fastapi import FastAPI, Request -from fastapi.responses import RedirectResponse, FileResponse -from fastapi.middleware.cors import CORSMiddleware -from fastapi.staticfiles import StaticFiles - -from core.config import logger -from routers import auth, catalog, media, pages, segmentation, sessions, share, openai_image, active_sessions -from routers.catalog import seed_catalog - -mimetypes.add_type("application/javascript", ".js", strict=True) -mimetypes.add_type("text/css", ".css", strict=True) -mimetypes.add_type("image/svg+xml", ".svg", strict=True) - -app = FastAPI(title="Hyper Reality Backend") - -app.add_middleware( - CORSMiddleware, - allow_origins=["*"], - allow_credentials=True, - allow_methods=["GET", "POST", "PUT", "DELETE", "OPTIONS"], - allow_headers=["*"], -) - - -@app.middleware("http") -async def remove_x_frame_options(request: Request, call_next): - response = await call_next(request) - if "x-frame-options" in response.headers: - del response.headers["x-frame-options"] - response.headers["Content-Security-Policy"] = "frame-ancestors *" - return response - - -# Routers -# Mantener sólo la ruta de subida de imágenes (/api/upload-image). -# Comentamos las demás inclusiones para deshabilitar funcionalidades -# posteriores (segmentación, inpainting, sesiones, catálogo, etc.). -# Re-activar routers necesarios para el frontend -app.include_router(auth.router) -app.include_router(media.router) -app.include_router(pages.router) -app.include_router(sessions.router) -app.include_router(segmentation.router) -app.include_router(openai_image.router) -app.include_router(active_sessions.router) -app.include_router(catalog.router) - -# Static files -BASE_DIR = Path(__file__).resolve().parent -UPLOADS_DIR = BASE_DIR / "uploads" -FRONTEND_DIST = BASE_DIR.parent / "frontend" / "dist" - -UPLOADS_DIR.mkdir(parents=True, exist_ok=True) -app.mount("/uploads", StaticFiles(directory=UPLOADS_DIR), name="uploads") - -if (FRONTEND_DIST / "index.html").exists(): - # Montar la SPA únicamente en /app (el servidor tiene su propia landing en /) - app.mount("/app", StaticFiles(directory=FRONTEND_DIST, html=True), name="frontend_app") - # También exponer los assets estáticos en la raíz /assets para que los - # archivos generados por Vite (con rutas absolutas `/assets/...`) sean - # resueltos correctamente cuando la SPA se carga desde /app. - assets_dir = FRONTEND_DIST / "assets" - if assets_dir.exists(): - app.mount("/assets", StaticFiles(directory=assets_dir), name="frontend_assets") - # Servir manifest y favicon desde el dist para PWA/links absolutos - manifest = FRONTEND_DIST / "manifest.json" - favicon = FRONTEND_DIST / "favicon.svg" - if manifest.exists(): - @app.get("/manifest.json") - async def _manifest(): - return FileResponse(str(manifest), media_type="application/manifest+json") - if favicon.exists(): - @app.get("/favicon.svg") - async def _favicon(): - return FileResponse(str(favicon), media_type="image/svg+xml") - -# Ruta raíz: servir `backend/home.html` cuando exista (landing del servidor) -HOME_HTML = BASE_DIR / "home.html" -if HOME_HTML.exists(): - @app.get("/") - async def _root_home(): - return FileResponse(str(HOME_HTML), media_type="text/html") -else: - # Si no existe `home.html`, redirigimos a la SPA en /app - @app.get("/") - async def _root_redirect(): - return RedirectResponse(url="/app") - - -# Frontend watcher (development helper) -FRONTEND_DIR = BASE_DIR.parent / "frontend" -FRONTEND_SRC = FRONTEND_DIR / "src" - - -def scan_frontend_sources() -> dict: - if not FRONTEND_SRC.exists(): - return {} - files = {} - for path in FRONTEND_SRC.rglob("*"): - if path.is_file() and path.suffix in {".ts", ".tsx", ".js", ".jsx", ".css", ".json", ".html"}: - files[path] = path.stat().st_mtime - for extra in [FRONTEND_DIR / "vite.config.ts", FRONTEND_DIR / "package.json", FRONTEND_DIR / "tsconfig.json"]: - if extra.exists(): - files[extra] = extra.stat().st_mtime - return files - - -def run_frontend_build() -> None: - if not FRONTEND_DIR.exists(): - return - # Allow disabling automatic frontend builds (useful in production or CI without Node installed) - if os.getenv("SKIP_FRONTEND_BUILD", "").lower() in {"1", "true", "yes"}: - print("[backend] SKIP_FRONTEND_BUILD is set — skipping frontend build.") - return - - npm_path = shutil.which("npm") - if not npm_path: - print("[backend] npm not found in PATH — skipping frontend build. Install Node.js/npm to enable auto-build or set SKIP_FRONTEND_BUILD=1 to disable this message.") - return - - print("[backend] Ejecutando build del frontend...") - try: - result = subprocess.run([npm_path, "run", "build"], cwd=str(FRONTEND_DIR), capture_output=True, text=True) - except FileNotFoundError: - print("[backend] Error: npm executable not found when attempting to run build. Skipping frontend build.") - return - - if result.returncode != 0: - print("[backend] Build falló:") - print(result.stdout) - print(result.stderr) - else: - print("[backend] Build completado correctamente.") - - -def watch_frontend_changes(interval: float = 2.0) -> None: - last_state = scan_frontend_sources() - while True: - time.sleep(interval) - current_state = scan_frontend_sources() - if current_state != last_state: - if last_state: - print("[backend] Cambio detectado en frontend. Reconstruyendo...") - run_frontend_build() - last_state = current_state - - -@app.on_event("startup") -async def startup_seed_catalog(): - if MONGODB_URI := os.getenv("MONGODB_URI", ""): - try: - await seed_catalog() - except Exception as exc: - logger.warning("[STARTUP] seed_catalog falló: %s", exc) - - -@app.on_event("startup") -async def startup_watch_frontend(): - thread = threading.Thread(target=watch_frontend_changes, daemon=True) - thread.start() - - -if __name__ == "__main__": - import uvicorn - uvicorn.run(app, host="0.0.0.0", port=8000, log_level="info") +import mimetypes +import os +import subprocess +import threading +import time +from pathlib import Path + +from dotenv import load_dotenv +load_dotenv(Path(__file__).resolve().parent / ".env") + +from fastapi import FastAPI, Request +from fastapi.middleware.cors import CORSMiddleware +from fastapi.staticfiles import StaticFiles + +from core.config import GRADIO_SPACE_URL, logger +from routers import auth, catalog, media, pages, segmentation, sessions, share +from routers.catalog import seed_catalog +from services.sam2_service import lifespan + +mimetypes.add_type("application/javascript", ".js", strict=True) +mimetypes.add_type("text/css", ".css", strict=True) +mimetypes.add_type("image/svg+xml", ".svg", strict=True) + +logger.info("[STARTUP] GRADIO_SPACE_URL=%s", GRADIO_SPACE_URL or "(not set — using local SAM2)") + +app = FastAPI(title="Hyper Reality Backend", lifespan=lifespan) + +app.add_middleware( + CORSMiddleware, + allow_origins=["*"], + allow_credentials=True, + allow_methods=["GET", "POST", "PUT", "DELETE", "OPTIONS"], + allow_headers=["*"], +) + + +@app.middleware("http") +async def remove_x_frame_options(request: Request, call_next): + response = await call_next(request) + if "x-frame-options" in response.headers: + del response.headers["x-frame-options"] + response.headers["Content-Security-Policy"] = "frame-ancestors *" + return response + + +# Routers +app.include_router(pages.router) +app.include_router(auth.router) +app.include_router(share.router) +app.include_router(media.router) +app.include_router(catalog.router) +app.include_router(sessions.router) +app.include_router(segmentation.router) + +# Static files +BASE_DIR = Path(__file__).resolve().parent +UPLOADS_DIR = BASE_DIR / "uploads" +FRONTEND_DIST = BASE_DIR.parent / "frontend" / "dist" + +UPLOADS_DIR.mkdir(parents=True, exist_ok=True) +app.mount("/uploads", StaticFiles(directory=UPLOADS_DIR), name="uploads") + +if (FRONTEND_DIST / "index.html").exists(): + # Montado en "/" como catch-all para SPA — los routers de API tienen prioridad + app.mount("/", StaticFiles(directory=FRONTEND_DIST, html=True), name="frontend") + + +# Frontend watcher (development helper) +FRONTEND_DIR = BASE_DIR.parent / "frontend" +FRONTEND_SRC = FRONTEND_DIR / "src" + + +def scan_frontend_sources() -> dict: + if not FRONTEND_SRC.exists(): + return {} + files = {} + for path in FRONTEND_SRC.rglob("*"): + if path.is_file() and path.suffix in {".ts", ".tsx", ".js", ".jsx", ".css", ".json", ".html"}: + files[path] = path.stat().st_mtime + for extra in [FRONTEND_DIR / "vite.config.ts", FRONTEND_DIR / "package.json", FRONTEND_DIR / "tsconfig.json"]: + if extra.exists(): + files[extra] = extra.stat().st_mtime + return files + + +def run_frontend_build() -> None: + if not FRONTEND_DIR.exists(): + return + print("[backend] Ejecutando build del frontend...") + result = subprocess.run(["npm", "run", "build"], cwd=str(FRONTEND_DIR), capture_output=True, text=True) + if result.returncode != 0: + print("[backend] Build falló:") + print(result.stdout) + print(result.stderr) + else: + print("[backend] Build completado correctamente.") + + +def watch_frontend_changes(interval: float = 2.0) -> None: + last_state = scan_frontend_sources() + while True: + time.sleep(interval) + current_state = scan_frontend_sources() + if current_state != last_state: + if last_state: + print("[backend] Cambio detectado en frontend. Reconstruyendo...") + run_frontend_build() + last_state = current_state + + +@app.on_event("startup") +async def startup_seed_catalog(): + if MONGODB_URI := os.getenv("MONGODB_URI", ""): + try: + await seed_catalog() + except Exception as exc: + logger.warning("[STARTUP] seed_catalog falló: %s", exc) + + +@app.on_event("startup") +async def startup_watch_frontend(): + thread = threading.Thread(target=watch_frontend_changes, daemon=True) + thread.start() + + +if __name__ == "__main__": + import uvicorn + uvicorn.run(app, host="0.0.0.0", port=8000, log_level="info") diff --git a/backend/models/schemas.py b/backend/models/schemas.py index e11337e242da2a879a7ca3bdbb8703994fc01a18..8dafd515c5368ebdb39978c249fa96179c2ebc7a 100644 --- a/backend/models/schemas.py +++ b/backend/models/schemas.py @@ -112,7 +112,5 @@ class ApplyColorRequest(BaseModel): class ApplyTextureAIRequest(BaseModel): filename: str original_filename: str = "" - mask_filename: str = "" + mask_filename: str prompt: str = "" - texture_name: str = "" - diff --git a/backend/preview.html b/backend/preview.html index bee7cabdbf05d5d4939926995555a667304a99c7..382e6c185500c2dca6c5f565c3b73ca378b87a38 100644 --- a/backend/preview.html +++ b/backend/preview.html @@ -1,242 +1,242 @@ - - - - - - Vista previa del app - - - -
-
-
-

Vista previa del app

-

- Aquí puedes ver cómo se despliega el visualizador con una API key de - ejemplo. -

-
- Ir al panel -
- -
- -
-
-

Puente de desarrollo

-

- Esta vista previa se conecta con el app React embebido. Puedes enviar - comandos y ver las respuestas del iframe. -

-
-
- - -
-
- - -
-
-
- - - - -
-
-
- - -
-

Nota

-

- Esta vista previa genera un token de acceso para el cliente - ID_UNICO_DEL_CLIENTE_001 y carga el app con él. -

-
-
- - + + + + + + Vista previa del app + + + +
+
+
+

Vista previa del app

+

+ Aquí puedes ver cómo se despliega el visualizador con una API key de + ejemplo. +

+
+ Ir al panel +
+ +
+ +
+
+

Puente de desarrollo

+

+ Esta vista previa se conecta con el app React embebido. Puedes enviar + comandos y ver las respuestas del iframe. +

+
+
+ + +
+
+ + +
+
+
+ + + + +
+
+
+ + +
+

Nota

+

+ Esta vista previa genera un token de acceso para el cliente + ID_UNICO_DEL_CLIENTE_001 y carga el app con él. +

+
+
+ + diff --git a/backend/requirements.txt b/backend/requirements.txt index 9cdd6f80918e68712eb7a2223f6323bb95d490bc..3175b21c48e925ab26cc56aff8037f1b7054dea8 100644 --- a/backend/requirements.txt +++ b/backend/requirements.txt @@ -9,4 +9,3 @@ pydantic python-multipart gradio_client opencv-python-headless -openai diff --git a/backend/routers/auth.py b/backend/routers/auth.py index 974d50bbe63f179d8125a217fe291f5745b546e3..3035696dae49b1393b46b569662febb7ee2a9aa6 100644 --- a/backend/routers/auth.py +++ b/backend/routers/auth.py @@ -21,7 +21,7 @@ def _get_col(): global _client, _db, _col if _col is None: if not MONGODB_URI: - return None + raise RuntimeError("MONGODB_URI no configurado") _client = AsyncIOMotorClient(MONGODB_URI) _db = _client["hyper_reality"] _col = _db["clients"] @@ -87,14 +87,6 @@ async def startup(): @router.post("/api/token") async def token(client_id: str = Form(...)): - if not MONGODB_URI: - # fallback in-memory lookup - doc = next((c for c in _DEFAULT_CLIENTS if c["_id"] == client_id), None) - if not doc: - return JSONResponse(content={"error": "client_id inválido"}, status_code=400) - tok = generate_token_for_client(client_id) - return JSONResponse(content={"token": tok, "expires_in": TOKEN_TTL}) - col = _get_col() doc = await col.find_one({"_id": client_id}) if not doc: @@ -111,13 +103,10 @@ async def config(client_id: str = Query(None), token: str = Query(None)): return JSONResponse(content={"error": "token inválido o expirado"}, status_code=401) if not client_id: return JSONResponse(content={"error": "client_id o token requerido"}, status_code=400) - if not MONGODB_URI: - doc = next((c for c in _DEFAULT_CLIENTS if c["_id"] == client_id), None) - datos = doc or {"nombre": "Cliente Desconocido", "color_primario": "#f97316", "created_at": _now_iso()} - else: - col = _get_col() - doc = await col.find_one({"_id": client_id}) - datos = doc or {"nombre": "Cliente Desconocido", "color_primario": "#f97316", "created_at": _now_iso()} + + col = _get_col() + doc = await col.find_one({"_id": client_id}) + datos = doc or {"nombre": "Cliente Desconocido", "color_primario": "#f97316", "created_at": _now_iso()} datos.pop("_id", None) ACTIVE_SESSIONS[client_id] = _now_iso() return JSONResponse(content={"client_id": client_id, **datos}) @@ -137,18 +126,6 @@ async def session_start(client_id: str = Form(None), token: str = Form(None)): @router.get("/api/keys") async def api_keys(): - if not MONGODB_URI: - keys = [ - { - "client_id": d["_id"], - "nombre": d.get("nombre", ""), - "color_primario": d.get("color_primario", ""), - "created_at": d.get("created_at", ""), - } - for d in _DEFAULT_CLIENTS - ] - return JSONResponse(content={"keys": keys, "count": len(keys)}) - col = _get_col() docs = await col.find({}).to_list(length=500) keys = [ @@ -167,11 +144,8 @@ async def api_keys(): async def generate_key(request: Request, nombre: str = Form(...), color_primario: str = Form("#8b5cf6")): new_key = f"CLIENTE_{uuid4().hex[:8].upper()}" doc = {"_id": new_key, "nombre": nombre, "color_primario": color_primario, "created_at": _now_iso()} - if not MONGODB_URI: - _DEFAULT_CLIENTS.append(doc) - else: - col = _get_col() - await col.insert_one(doc) + col = _get_col() + await col.insert_one(doc) base_url = str(request.base_url).rstrip("/") if request.headers.get("x-forwarded-proto") == "https" and base_url.startswith("http://"): base_url = "https://" + base_url[7:] @@ -190,13 +164,6 @@ async def generate_key(request: Request, nombre: str = Form(...), color_primario @router.delete("/api/keys/{client_id}") async def delete_key(client_id: str): - if not MONGODB_URI: - before = len(_DEFAULT_CLIENTS) - _DEFAULT_CLIENTS[:] = [c for c in _DEFAULT_CLIENTS if c["_id"] != client_id] - if len(_DEFAULT_CLIENTS) == before: - return JSONResponse(content={"error": "client_id no encontrado"}, status_code=404) - return JSONResponse(content={"status": "eliminado", "client_id": client_id}) - col = _get_col() result = await col.delete_one({"_id": client_id}) if result.deleted_count == 0: diff --git a/backend/routers/catalog.py b/backend/routers/catalog.py index 978c6be94108390b28ea660ab7387774ebeb0730..d13e3edd80331a3a2cea6c1abefb92d794d54e8c 100644 --- a/backend/routers/catalog.py +++ b/backend/routers/catalog.py @@ -1,240 +1,240 @@ -import os -from datetime import datetime - -from fastapi import APIRouter -from fastapi.responses import JSONResponse -from motor.motor_asyncio import AsyncIOMotorClient -from pydantic import BaseModel - -router = APIRouter(prefix="/api/catalog") - -MONGODB_URI = os.getenv("MONGODB_URI", "") -_client: AsyncIOMotorClient | None = None -_db = None -_col = None - - -def _get_col(): - global _client, _db, _col - if _col is None: - if not MONGODB_URI: - raise RuntimeError("MONGODB_URI no configurado") - _client = AsyncIOMotorClient(MONGODB_URI) - _db = _client["hyper_reality"] - _col = _db["catalog"] - return _col - - -# ── Datos iniciales (se insertan solo si la colección está vacía) ───────────── -_SEED = [ - { - "_id": "acm", - "nombre": "ACM (Aluminio Compuesto)", - "tipo": "paredes", - "descripcion": "Paneles de aluminio compuesto para fachadas y exteriores", - "especificaciones": [ - "Espesor de ACM 4mm.", - "Medida 1.22m x 2.44m", - "Facil Mantenimiento.", - "Espesor de Aluminio 0.40mm.", - "Se puede doblar o biselar", - ], - "url_detalle": "https://heyzine.com/flip-book/447fe3eb8e.html#page/16", - "productos": [ - {"id": "acm_white", "nombre": "Glossy White", "textura": "Texture_ACM/ACM_White.png", "url_preview": "/seg/texture-preview/Texture_ACM/ACM_White.png", "dimensiones": ["1.22x2.44", "1.50x4.98"]}, - {"id": "acm_amarillo", "nombre": "Amarillo", "textura": "Texture_ACM/ACM_Amarillo.png", "url_preview": "/seg/texture-preview/Texture_ACM/ACM_Amarillo.png", "dimensiones": ["1.22x2.44", "1.50x4.98"]}, - {"id": "acm_orange", "nombre": "Glossy Orange", "textura": "Texture_ACM/ACM_Orange.png", "url_preview": "/seg/texture-preview/Texture_ACM/ACM_Orange.png", "dimensiones": ["1.22x2.44", "1.50x4.98"]}, - {"id": "acm_red", "nombre": "Glossy Red", "textura": "Texture_ACM/ACM_Glossy_Red.png", "url_preview": "/seg/texture-preview/Texture_ACM/ACM_Glossy_Red.png", "dimensiones": ["1.22x2.44", "1.50x4.98"]}, - {"id": "acm_light_blue", "nombre": "Light Blue", "textura": "Texture_ACM/ACM_Light_Blue.png", "url_preview": "/seg/texture-preview/Texture_ACM/ACM_Light_Blue.png", "dimensiones": ["1.22x2.44"]}, - {"id": "acm_azul", "nombre": "Azul", "textura": "Texture_ACM/ACM_Azul.png", "url_preview": "/seg/texture-preview/Texture_ACM/ACM_Azul.png", "dimensiones": ["1.22x2.44", "1.50x4.98"]}, - {"id": "acm_verde_hn", "nombre": "Verde HN", "textura": "Texture_ACM/ACM_Verde_HN.png", "url_preview": "/seg/texture-preview/Texture_ACM/ACM_Verde_HN.png", "dimensiones": ["1.22x2.44"]}, - {"id": "acm_verde_lima", "nombre": "Verde Lima", "textura": "Texture_ACM/ACM_Verde_Lima.png", "url_preview": "/seg/texture-preview/Texture_ACM/ACM_Verde_Lima.png", "dimensiones": ["1.22x2.44", "1.50x4.98"]}, - {"id": "acm_verde", "nombre": "Verde", "textura": "Texture_ACM/ACM_Verde.png", "url_preview": "/seg/texture-preview/Texture_ACM/ACM_Verde.png", "dimensiones": ["1.22x2.44", "1.50x4.98"]}, - {"id": "acm_madera_clara","nombre": "Madera Clara", "textura": "Texture_ACM/ACM_Madera_Clara.png", "url_preview": "/seg/texture-preview/Texture_ACM/ACM_Madera_Clara.png", "dimensiones": ["1.22x2.44"]}, - {"id": "acm_roble", "nombre": "Roble (Oak)", "textura": "Texture_ACM/ACM_ROBLE(OAK).png", "url_preview": "/seg/texture-preview/Texture_ACM/ACM_ROBLE(OAK).png", "dimensiones": ["1.22x2.44"]}, - {"id": "acm_grafito", "nombre": "Grafito", "textura": "Texture_ACM/ACM_Grafito.png", "url_preview": "/seg/texture-preview/Texture_ACM/ACM_Grafito.png", "dimensiones": ["1.22x2.44", "1.50x4.98"]}, - {"id": "acm_metalic", "nombre": "Silver Metallic", "textura": "Texture_ACM/ACM_Metalic.png", "url_preview": "/seg/texture-preview/Texture_ACM/ACM_Metalic.png", "dimensiones": ["1.22x2.44", "1.50x4.98"]}, - {"id": "acm_mouse_grey", "nombre": "Mouse Grey", "textura": "Texture_ACM/ACM_MouseGrey.png", "url_preview": "/seg/texture-preview/Texture_ACM/ACM_MouseGrey.png", "dimensiones": ["1.22x2.44", "1.50x4.98"]}, - {"id": "acm_matte_black", "nombre": "Matte Black", "textura": "Texture_ACM/ACM_Matteblack.png", "url_preview": "/seg/texture-preview/Texture_ACM/ACM_Matteblack.png", "dimensiones": ["1.22x2.44", "1.50x4.98"]}, - {"id": "acm_glossy_black","nombre": "Glossy Black", "textura": "Texture_ACM/ACM_Glossy_Black.png", "url_preview": "/seg/texture-preview/Texture_ACM/ACM_Glossy_Black.png", "dimensiones": ["1.22x2.44", "1.50x4.98"]}, - ], - "created_at": "2026-04-20T00:00:00Z", - }, - { - "_id": "wpc", - "nombre": "WPC (Exterior e Interior)", - "tipo": "paredes", - "descripcion": "Los paneles de WPC se utilizan como revestimiento decorativo para paredes. No se deforma, no requiere mantenimiento constante y tiene mayor durabilidad. Crea mayor estetica e instalacion rapida.", - "especificaciones": [ - "Revestimiento decorativo para paredes.", - "No se deforma ni requiere mantenimiento constante.", - "Mayor durabilidad y estetica.", - "Instalacion rapida.", - "Ideal para: sala principal (pared protagonista), comedor, interior de oficina, pasillo o entradas.", - ], - "url_detalle": "https://heyzine.com/flip-book/447fe3eb8e.html#page/39", - "productos": [ - {"id": "WPC_madera_oscuro", "nombre": "WPC Madera Oscuro", "textura": "Texture_WPC_EXTERIOR_INTERIOR/WPC_madera_oscuro.png", "url_preview": "/seg/texture-preview/Texture_WPC_EXTERIOR_INTERIOR/WPC_madera_oscuro.png", "dimensiones": ["2.90x0.25"]}, - {"id": "WPC_madera_claro", "nombre": "WPC Madera Claro", "textura": "Texture_WPC_EXTERIOR_INTERIOR/WPC_madera_claro.png", "url_preview": "/seg/texture-preview/Texture_WPC_EXTERIOR_INTERIOR/WPC_madera_claro.png", "dimensiones": ["2.90x0.25"]}, - {"id": "WPC_madera_gris", "nombre": "WPC Madera Gris", "textura": "Texture_WPC_EXTERIOR_INTERIOR/WPC_madera_gris.png", "url_preview": "/seg/texture-preview/Texture_WPC_EXTERIOR_INTERIOR/WPC_madera_gris.png", "dimensiones": ["2.90x0.25"]}, - {"id": "WPC_negro", "nombre": "WPC Negro", "textura": "Texture_WPC_EXTERIOR_INTERIOR/WPC_negro.png", "url_preview": "/seg/texture-preview/Texture_WPC_EXTERIOR_INTERIOR/WPC_negro.png", "dimensiones": ["2.90x0.25"]}, - ], - "created_at": "2026-05-07T00:00:00Z", - }, - { - "_id": "wpc_deck", - "nombre": "WPC Deck", - "tipo": "suelos", - "descripcion": "Deck de WPC para exteriores e interiores. Ideal para terrazas, jardines, bordes de piscina y espacios al aire libre.", - "especificaciones": [ - "Resistencia a la intemperie.", - "Bajo mantenimiento.", - "Respetuosa con el medio ambiente.", - "Esteticamente agradable.", - ], - "url_detalle": "https://heyzine.com/flip-book/447fe3eb8e.html#page/38", - "productos": [ - {"id": "DECK_madera", "nombre": "Deck Madera", "textura": "Texture_WPC_DECK/DECK_madera.png", "url_preview": "/seg/texture-preview/Texture_WPC_DECK/DECK_madera.png", "dimensiones": ["2.90x0.14"]}, - {"id": "DECK_madera_oscuro", "nombre": "Deck Madera Oscuro", "textura": "Texture_WPC_DECK/DECK_madera_oscuro.png", "url_preview": "/seg/texture-preview/Texture_WPC_DECK/DECK_madera_oscuro.png", "dimensiones": ["2.90x0.14"]}, - {"id": "DECK_gris", "nombre": "Deck Gris", "textura": "Texture_WPC_DECK/DECK_gris.png", "url_preview": "/seg/texture-preview/Texture_WPC_DECK/DECK_gris.png", "dimensiones": ["2.90x0.14"]}, - ], - "created_at": "2026-05-08T00:00:00Z", - }, -] - - -async def seed_catalog() -> None: - col = _get_col() - count = await col.count_documents({}) - if count == 0: - await col.insert_many(_SEED) - return - - # Migrar documentos existentes: añadir campos que falten según _SEED - for seed_item in _SEED: - doc = await col.find_one({"_id": seed_item["_id"]}) - if not doc: - continue - patch = {k: v for k, v in seed_item.items() if k not in doc and k != "_id"} - if patch: - await col.update_one({"_id": seed_item["_id"]}, {"$set": patch}) - - -def _serialize(doc: dict) -> dict: - out = dict(doc) - out["id"] = str(out.pop("_id")) - return out - - -def _seed_as_response() -> list[dict]: - return [{**{k: v for k, v in item.items() if k != "_id"}, "id": item["_id"]} for item in _SEED] - - -# ── Endpoints de lectura ────────────────────────────────────────────────────── - -@router.get("/textures") -async def get_texture_catalog() -> JSONResponse: - try: - col = _get_col() - docs = await col.find({}).to_list(length=200) - if docs: - return JSONResponse(content={"categories": [_serialize(d) for d in docs]}) - except Exception: - pass - # Fallback a datos estáticos si MongoDB no está disponible o la colección está vacía - return JSONResponse(content={"categories": _seed_as_response()}) - - -@router.get("/textures/{category_id}") -async def get_texture_category(category_id: str) -> JSONResponse: - try: - col = _get_col() - doc = await col.find_one({"_id": category_id}) - if doc: - return JSONResponse(content=_serialize(doc)) - except Exception: - pass - fallback = next((item for item in _SEED if item["_id"] == category_id), None) - if fallback: - return JSONResponse(content=_seed_as_response()[_SEED.index(fallback)]) - return JSONResponse(content={"detail": f"Categoria '{category_id}' no encontrada"}, status_code=404) - - -# ── Modelos ─────────────────────────────────────────────────────────────────── - -class ProductoItem(BaseModel): - id: str - nombre: str - textura: str - url_preview: str - dimensiones: list[str] = [] - - -class CategoriaBody(BaseModel): - id: str - nombre: str - tipo: str = "paredes" - descripcion: str = "" - especificaciones: list[str] = [] - url_detalle: str = "" - productos: list[ProductoItem] = [] - - -# ── Endpoints de escritura ──────────────────────────────────────────────────── - -@router.post("/category") -async def add_category(body: CategoriaBody) -> JSONResponse: - col = _get_col() - existing = await col.find_one({"_id": body.id}) - if existing: - return JSONResponse(content={"error": f"Categoria '{body.id}' ya existe"}, status_code=409) - doc = body.model_dump() - doc["_id"] = doc.pop("id") - doc["created_at"] = datetime.utcnow().isoformat() + "Z" - await col.insert_one(doc) - return JSONResponse(content={"ok": True, "id": body.id}, status_code=201) - - -@router.put("/category/{category_id}") -async def update_category(category_id: str, body: CategoriaBody) -> JSONResponse: - col = _get_col() - doc = body.model_dump() - doc.pop("id", None) - doc["updated_at"] = datetime.utcnow().isoformat() + "Z" - result = await col.update_one({"_id": category_id}, {"$set": doc}) - if result.matched_count == 0: - return JSONResponse(content={"error": "Categoria no encontrada"}, status_code=404) - return JSONResponse(content={"ok": True}) - - -@router.delete("/category/{category_id}") -async def delete_category(category_id: str) -> JSONResponse: - col = _get_col() - result = await col.delete_one({"_id": category_id}) - if result.deleted_count == 0: - return JSONResponse(content={"error": "Categoria no encontrada"}, status_code=404) - return JSONResponse(content={"ok": True, "deleted": category_id}) - - -@router.post("/category/{category_id}/product") -async def add_product(category_id: str, product: ProductoItem) -> JSONResponse: - col = _get_col() - result = await col.update_one( - {"_id": category_id, "productos.id": {"$ne": product.id}}, - {"$push": {"productos": product.model_dump()}, "$set": {"updated_at": datetime.utcnow().isoformat() + "Z"}}, - ) - if result.matched_count == 0: - return JSONResponse(content={"error": "Categoria no encontrada o producto duplicado"}, status_code=409) - return JSONResponse(content={"ok": True}, status_code=201) - - -@router.delete("/category/{category_id}/product/{product_id}") -async def delete_product(category_id: str, product_id: str) -> JSONResponse: - col = _get_col() - result = await col.update_one( - {"_id": category_id}, - {"$pull": {"productos": {"id": product_id}}, "$set": {"updated_at": datetime.utcnow().isoformat() + "Z"}}, - ) - if result.matched_count == 0: - return JSONResponse(content={"error": "Categoria no encontrada"}, status_code=404) - return JSONResponse(content={"ok": True}) +import os +from datetime import datetime + +from fastapi import APIRouter +from fastapi.responses import JSONResponse +from motor.motor_asyncio import AsyncIOMotorClient +from pydantic import BaseModel + +router = APIRouter(prefix="/api/catalog") + +MONGODB_URI = os.getenv("MONGODB_URI", "") +_client: AsyncIOMotorClient | None = None +_db = None +_col = None + + +def _get_col(): + global _client, _db, _col + if _col is None: + if not MONGODB_URI: + raise RuntimeError("MONGODB_URI no configurado") + _client = AsyncIOMotorClient(MONGODB_URI) + _db = _client["hyper_reality"] + _col = _db["catalog"] + return _col + + +# ── Datos iniciales (se insertan solo si la colección está vacía) ───────────── +_SEED = [ + { + "_id": "acm", + "nombre": "ACM (Aluminio Compuesto)", + "tipo": "paredes", + "descripcion": "Paneles de aluminio compuesto para fachadas y exteriores", + "especificaciones": [ + "Espesor de ACM 4mm.", + "Medida 1.22m x 2.44m", + "Facil Mantenimiento.", + "Espesor de Aluminio 0.40mm.", + "Se puede doblar o biselar", + ], + "url_detalle": "https://heyzine.com/flip-book/447fe3eb8e.html#page/16", + "productos": [ + {"id": "acm_white", "nombre": "Glossy White", "textura": "Texture_ACM/ACM_White.png", "url_preview": "/seg/texture-preview/Texture_ACM/ACM_White.png", "dimensiones": ["1.22x2.44", "1.50x4.98"]}, + {"id": "acm_amarillo", "nombre": "Amarillo", "textura": "Texture_ACM/ACM_Amarillo.png", "url_preview": "/seg/texture-preview/Texture_ACM/ACM_Amarillo.png", "dimensiones": ["1.22x2.44", "1.50x4.98"]}, + {"id": "acm_orange", "nombre": "Glossy Orange", "textura": "Texture_ACM/ACM_Orange.png", "url_preview": "/seg/texture-preview/Texture_ACM/ACM_Orange.png", "dimensiones": ["1.22x2.44", "1.50x4.98"]}, + {"id": "acm_red", "nombre": "Glossy Red", "textura": "Texture_ACM/ACM_Glossy_Red.png", "url_preview": "/seg/texture-preview/Texture_ACM/ACM_Glossy_Red.png", "dimensiones": ["1.22x2.44", "1.50x4.98"]}, + {"id": "acm_light_blue", "nombre": "Light Blue", "textura": "Texture_ACM/ACM_Light_Blue.png", "url_preview": "/seg/texture-preview/Texture_ACM/ACM_Light_Blue.png", "dimensiones": ["1.22x2.44"]}, + {"id": "acm_azul", "nombre": "Azul", "textura": "Texture_ACM/ACM_Azul.png", "url_preview": "/seg/texture-preview/Texture_ACM/ACM_Azul.png", "dimensiones": ["1.22x2.44", "1.50x4.98"]}, + {"id": "acm_verde_hn", "nombre": "Verde HN", "textura": "Texture_ACM/ACM_Verde_HN.png", "url_preview": "/seg/texture-preview/Texture_ACM/ACM_Verde_HN.png", "dimensiones": ["1.22x2.44"]}, + {"id": "acm_verde_lima", "nombre": "Verde Lima", "textura": "Texture_ACM/ACM_Verde_Lima.png", "url_preview": "/seg/texture-preview/Texture_ACM/ACM_Verde_Lima.png", "dimensiones": ["1.22x2.44", "1.50x4.98"]}, + {"id": "acm_verde", "nombre": "Verde", "textura": "Texture_ACM/ACM_Verde.png", "url_preview": "/seg/texture-preview/Texture_ACM/ACM_Verde.png", "dimensiones": ["1.22x2.44", "1.50x4.98"]}, + {"id": "acm_madera_clara","nombre": "Madera Clara", "textura": "Texture_ACM/ACM_Madera_Clara.png", "url_preview": "/seg/texture-preview/Texture_ACM/ACM_Madera_Clara.png", "dimensiones": ["1.22x2.44"]}, + {"id": "acm_roble", "nombre": "Roble (Oak)", "textura": "Texture_ACM/ACM_ROBLE(OAK).png", "url_preview": "/seg/texture-preview/Texture_ACM/ACM_ROBLE(OAK).png", "dimensiones": ["1.22x2.44"]}, + {"id": "acm_grafito", "nombre": "Grafito", "textura": "Texture_ACM/ACM_Grafito.png", "url_preview": "/seg/texture-preview/Texture_ACM/ACM_Grafito.png", "dimensiones": ["1.22x2.44", "1.50x4.98"]}, + {"id": "acm_metalic", "nombre": "Silver Metallic", "textura": "Texture_ACM/ACM_Metalic.png", "url_preview": "/seg/texture-preview/Texture_ACM/ACM_Metalic.png", "dimensiones": ["1.22x2.44", "1.50x4.98"]}, + {"id": "acm_mouse_grey", "nombre": "Mouse Grey", "textura": "Texture_ACM/ACM_MouseGrey.png", "url_preview": "/seg/texture-preview/Texture_ACM/ACM_MouseGrey.png", "dimensiones": ["1.22x2.44", "1.50x4.98"]}, + {"id": "acm_matte_black", "nombre": "Matte Black", "textura": "Texture_ACM/ACM_Matteblack.png", "url_preview": "/seg/texture-preview/Texture_ACM/ACM_Matteblack.png", "dimensiones": ["1.22x2.44", "1.50x4.98"]}, + {"id": "acm_glossy_black","nombre": "Glossy Black", "textura": "Texture_ACM/ACM_Glossy_Black.png", "url_preview": "/seg/texture-preview/Texture_ACM/ACM_Glossy_Black.png", "dimensiones": ["1.22x2.44", "1.50x4.98"]}, + ], + "created_at": "2026-04-20T00:00:00Z", + }, + { + "_id": "wpc", + "nombre": "WPC (Exterior e Interior)", + "tipo": "paredes", + "descripcion": "Los paneles de WPC se utilizan como revestimiento decorativo para paredes. No se deforma, no requiere mantenimiento constante y tiene mayor durabilidad. Crea mayor estetica e instalacion rapida.", + "especificaciones": [ + "Revestimiento decorativo para paredes.", + "No se deforma ni requiere mantenimiento constante.", + "Mayor durabilidad y estetica.", + "Instalacion rapida.", + "Ideal para: sala principal (pared protagonista), comedor, interior de oficina, pasillo o entradas.", + ], + "url_detalle": "https://heyzine.com/flip-book/447fe3eb8e.html#page/39", + "productos": [ + {"id": "WPC_madera_oscuro", "nombre": "WPC Madera Oscuro", "textura": "Texture_WPC_EXTERIOR_INTERIOR/WPC_madera_oscuro.png", "url_preview": "/seg/texture-preview/Texture_WPC_EXTERIOR_INTERIOR/WPC_madera_oscuro.png", "dimensiones": ["2.90x0.25"]}, + {"id": "WPC_madera_claro", "nombre": "WPC Madera Claro", "textura": "Texture_WPC_EXTERIOR_INTERIOR/WPC_madera_claro.png", "url_preview": "/seg/texture-preview/Texture_WPC_EXTERIOR_INTERIOR/WPC_madera_claro.png", "dimensiones": ["2.90x0.25"]}, + {"id": "WPC_madera_gris", "nombre": "WPC Madera Gris", "textura": "Texture_WPC_EXTERIOR_INTERIOR/WPC_madera_gris.png", "url_preview": "/seg/texture-preview/Texture_WPC_EXTERIOR_INTERIOR/WPC_madera_gris.png", "dimensiones": ["2.90x0.25"]}, + {"id": "WPC_negro", "nombre": "WPC Negro", "textura": "Texture_WPC_EXTERIOR_INTERIOR/WPC_negro.png", "url_preview": "/seg/texture-preview/Texture_WPC_EXTERIOR_INTERIOR/WPC_negro.png", "dimensiones": ["2.90x0.25"]}, + ], + "created_at": "2026-05-07T00:00:00Z", + }, + { + "_id": "wpc_deck", + "nombre": "WPC Deck", + "tipo": "suelos", + "descripcion": "Deck de WPC para exteriores e interiores. Ideal para terrazas, jardines, bordes de piscina y espacios al aire libre.", + "especificaciones": [ + "Resistencia a la intemperie.", + "Bajo mantenimiento.", + "Respetuosa con el medio ambiente.", + "Esteticamente agradable.", + ], + "url_detalle": "https://heyzine.com/flip-book/447fe3eb8e.html#page/38", + "productos": [ + {"id": "DECK_madera", "nombre": "Deck Madera", "textura": "Texture_wpc_deck/DECK_madera.png", "url_preview": "/seg/texture-preview/Texture_wpc_deck/DECK_madera.png", "dimensiones": ["2.90x0.14"]}, + {"id": "DECK_madera_oscuro", "nombre": "Deck Madera Oscuro", "textura": "Texture_wpc_deck/DECK_madera_oscuro.png", "url_preview": "/seg/texture-preview/Texture_wpc_deck/DECK_madera_oscuro.png", "dimensiones": ["2.90x0.14"]}, + {"id": "DECK_gris", "nombre": "Deck Gris", "textura": "Texture_wpc_deck/DECK_gris.png", "url_preview": "/seg/texture-preview/Texture_wpc_deck/DECK_gris.png", "dimensiones": ["2.90x0.14"]}, + ], + "created_at": "2026-05-08T00:00:00Z", + }, +] + + +async def seed_catalog() -> None: + col = _get_col() + count = await col.count_documents({}) + if count == 0: + await col.insert_many(_SEED) + return + + # Migrar documentos existentes: añadir campos que falten según _SEED + for seed_item in _SEED: + doc = await col.find_one({"_id": seed_item["_id"]}) + if not doc: + continue + patch = {k: v for k, v in seed_item.items() if k not in doc and k != "_id"} + if patch: + await col.update_one({"_id": seed_item["_id"]}, {"$set": patch}) + + +def _serialize(doc: dict) -> dict: + out = dict(doc) + out["id"] = str(out.pop("_id")) + return out + + +def _seed_as_response() -> list[dict]: + return [{**{k: v for k, v in item.items() if k != "_id"}, "id": item["_id"]} for item in _SEED] + + +# ── Endpoints de lectura ────────────────────────────────────────────────────── + +@router.get("/textures") +async def get_texture_catalog() -> JSONResponse: + try: + col = _get_col() + docs = await col.find({}).to_list(length=200) + if docs: + return JSONResponse(content={"categories": [_serialize(d) for d in docs]}) + except Exception: + pass + # Fallback a datos estáticos si MongoDB no está disponible o la colección está vacía + return JSONResponse(content={"categories": _seed_as_response()}) + + +@router.get("/textures/{category_id}") +async def get_texture_category(category_id: str) -> JSONResponse: + try: + col = _get_col() + doc = await col.find_one({"_id": category_id}) + if doc: + return JSONResponse(content=_serialize(doc)) + except Exception: + pass + fallback = next((item for item in _SEED if item["_id"] == category_id), None) + if fallback: + return JSONResponse(content=_seed_as_response()[_SEED.index(fallback)]) + return JSONResponse(content={"detail": f"Categoria '{category_id}' no encontrada"}, status_code=404) + + +# ── Modelos ─────────────────────────────────────────────────────────────────── + +class ProductoItem(BaseModel): + id: str + nombre: str + textura: str + url_preview: str + dimensiones: list[str] = [] + + +class CategoriaBody(BaseModel): + id: str + nombre: str + tipo: str = "paredes" + descripcion: str = "" + especificaciones: list[str] = [] + url_detalle: str = "" + productos: list[ProductoItem] = [] + + +# ── Endpoints de escritura ──────────────────────────────────────────────────── + +@router.post("/category") +async def add_category(body: CategoriaBody) -> JSONResponse: + col = _get_col() + existing = await col.find_one({"_id": body.id}) + if existing: + return JSONResponse(content={"error": f"Categoria '{body.id}' ya existe"}, status_code=409) + doc = body.model_dump() + doc["_id"] = doc.pop("id") + doc["created_at"] = datetime.utcnow().isoformat() + "Z" + await col.insert_one(doc) + return JSONResponse(content={"ok": True, "id": body.id}, status_code=201) + + +@router.put("/category/{category_id}") +async def update_category(category_id: str, body: CategoriaBody) -> JSONResponse: + col = _get_col() + doc = body.model_dump() + doc.pop("id", None) + doc["updated_at"] = datetime.utcnow().isoformat() + "Z" + result = await col.update_one({"_id": category_id}, {"$set": doc}) + if result.matched_count == 0: + return JSONResponse(content={"error": "Categoria no encontrada"}, status_code=404) + return JSONResponse(content={"ok": True}) + + +@router.delete("/category/{category_id}") +async def delete_category(category_id: str) -> JSONResponse: + col = _get_col() + result = await col.delete_one({"_id": category_id}) + if result.deleted_count == 0: + return JSONResponse(content={"error": "Categoria no encontrada"}, status_code=404) + return JSONResponse(content={"ok": True, "deleted": category_id}) + + +@router.post("/category/{category_id}/product") +async def add_product(category_id: str, product: ProductoItem) -> JSONResponse: + col = _get_col() + result = await col.update_one( + {"_id": category_id, "productos.id": {"$ne": product.id}}, + {"$push": {"productos": product.model_dump()}, "$set": {"updated_at": datetime.utcnow().isoformat() + "Z"}}, + ) + if result.matched_count == 0: + return JSONResponse(content={"error": "Categoria no encontrada o producto duplicado"}, status_code=409) + return JSONResponse(content={"ok": True}, status_code=201) + + +@router.delete("/category/{category_id}/product/{product_id}") +async def delete_product(category_id: str, product_id: str) -> JSONResponse: + col = _get_col() + result = await col.update_one( + {"_id": category_id}, + {"$pull": {"productos": {"id": product_id}}, "$set": {"updated_at": datetime.utcnow().isoformat() + "Z"}}, + ) + if result.matched_count == 0: + return JSONResponse(content={"error": "Categoria no encontrada"}, status_code=404) + return JSONResponse(content={"ok": True}) diff --git a/backend/routers/segmentation.py b/backend/routers/segmentation.py index 11b5612b2d7355abf7dcd9348b6677f3a227fe98..b36dbba70bc7ac99405b8d4b9e485a4e63aa9f4d 100644 --- a/backend/routers/segmentation.py +++ b/backend/routers/segmentation.py @@ -1,760 +1,723 @@ -""" -Segmentation router - todos los endpoints del editor de texturas con SAM2. -Prefijo: /seg -""" -import asyncio -import uuid -from datetime import datetime, timezone -from pathlib import Path -from typing import Any, cast - -from fastapi import APIRouter, BackgroundTasks, File, HTTPException, UploadFile -from fastapi.responses import FileResponse, HTMLResponse, Response - -from core.config import ( - FRONTEND_DEBUG, - OUTPUT_DIR, - SD_JOB_STALE_SECONDS, - SD_QUICK_TIMEOUT_SECONDS, - UPLOAD_DIR, - UPLOAD_JOB_STALE_SECONDS, - VIDEO_OUTPUT_DIR, - VIDEO_UPLOAD_DIR, - load_classic_dashboard_html, - log_timing_end, - log_timing_start, - logger, - utc_now_iso, -) -from pydantic import BaseModel - -from models.schemas import ( - ApplyColorRequest, - ApplyTextureAIRequest, - ApplyTextureRequest, - ExteriorBrickRequest, - ExteriorDepthRequest, - ExteriorGrabCutRequest, - ExteriorHybridRequest, - ExteriorSuggestRequest, - GuidedSegmentRequest, - SceneAnalyzeRequest, - SegmentAdaptiveRequest, - SegmentVideoRequest, -) -from services.image_service import ( - prepare_and_store_upload, - run_upload_job, - save_label_map_for_owner, -) -from services.inpainting_service import run_inpainting_job, run_inpainting_sync -from services.sam2_service import jobs, jobs_lock, release_resources -from services.openai_service import generate_image_with_openai -from PIL import Image -from services.scene_service import ( - build_adaptive_plan, - generate_label_map, - infer_scene_type, - normalize_priority, - normalize_scene_hint, - rank_exterior_candidates, - rank_interior_candidates, -) -from services.segmentation_service import ( - generate_guided_label_map, - parse_mask_index, - parse_rgb_color, - segment_exterior_brick_sync, - segment_exterior_depth_sync, - segment_exterior_grabcut_sync, - segment_exterior_hybrid_sync, - segment_video_sync, -) -from services.texture_service import ( - apply_local_texture_sync, - build_texture_preview_jpeg, - generate_texture_variations, - list_available_textures, - resolve_texture_path, -) - -import cv2 - -router = APIRouter(prefix="/seg") - - -@router.get("/", response_class=HTMLResponse) -async def home() -> HTMLResponse: - dashboard_html = load_classic_dashboard_html().replace( - "__FRONTEND_DEBUG_ENABLED__", - "true" if FRONTEND_DEBUG else "false", - ) - return HTMLResponse(content=dashboard_html) - - -@router.post("/upload_video") -async def upload_video(file: UploadFile = File(...)) -> dict[str, Any]: - if not file.content_type or not file.content_type.startswith("video/"): - raise HTTPException(status_code=400, detail="Only video files are allowed") - - safe_name = Path(file.filename or "uploaded_video").name - if not safe_name: - raise HTTPException(status_code=400, detail="Invalid filename") - - destination = VIDEO_UPLOAD_DIR / safe_name - content = await file.read() - if not content: - raise HTTPException(status_code=400, detail="Uploaded video is empty") - - destination.write_bytes(content) - return { - "message": "Video uploaded successfully", - "filename": safe_name, - "url": f"/seg/video/{safe_name}", - } - - -@router.post("/upload_async") -async def upload_image_async( - background_tasks: BackgroundTasks, - file: UploadFile = File(...), -) -> dict[str, Any]: - if not file.content_type or not file.content_type.startswith("image/"): - raise HTTPException(status_code=400, detail="Only image files are allowed") - - content = await file.read() - job_id = uuid.uuid4().hex - with jobs_lock: - jobs[job_id] = { - "kind": "upload", - "status": "processing", - "stage": "queued", - "progress": 2, - "message": "Queued for segmentation", - "created_at": utc_now_iso(), - "updated_at": utc_now_iso(), - } - - background_tasks.add_task(run_upload_job, job_id, content, file.filename or "uploaded_image") - return { - "processing": True, - "job_id": job_id, - "status": "processing", - "stage": "queued", - "progress": 2, - "message": "Upload accepted. Segmentation started in background.", - "status_url": f"/seg/jobs/{job_id}", - } - - -@router.post("/segment_guided") -async def segment_guided(payload: GuidedSegmentRequest) -> dict[str, Any]: - started = log_timing_start("SEGMENT_GUIDED") - try: - from services.image_service import load_image_rgb_for_edit - safe_name, image_rgb = await asyncio.to_thread(load_image_rgb_for_edit, payload.filename) - label_map, ranked_scores = await asyncio.to_thread( - generate_guided_label_map, - image_rgb, - [list(point) for point in payload.point_coords], - list(payload.point_labels), - list(payload.box_xyxy) if payload.box_xyxy is not None else [], - payload.multimask_output, - ) - - guided_owner = f"{Path(safe_name).stem}_guided.jpg" - label_owner = await asyncio.to_thread(save_label_map_for_owner, guided_owner, label_map) - available_indices = list(range(1, len(ranked_scores) + 1)) - - return { - "message": "Guided segmentation completed", - "filename": safe_name, - "original_filename_for_apply": label_owner, - "mask_count": len(ranked_scores), - "available_mask_indices": available_indices, - "recommended_mask_index": 1, - "scores": [round(score, 6) for score in ranked_scores], - } - finally: - log_timing_end("SEGMENT_GUIDED", started) - try: - release_resources() - except Exception: - logger.exception("Error releasing resources after SEGMENT_GUIDED") - - -@router.post("/suggest_exterior_masks") -async def suggest_exterior_masks(payload: ExteriorSuggestRequest) -> dict[str, Any]: - started = log_timing_start("EXTERIOR_SUGGEST") - try: - from services.image_service import load_image_rgb_for_edit - safe_name, image_rgb = await asyncio.to_thread(load_image_rgb_for_edit, payload.filename) - - label_owner_name = Path(payload.original_filename).name if payload.original_filename else safe_name - - masks_dir = UPLOAD_DIR / "masks" - label_path = masks_dir / f"{label_owner_name}_labels.png" - if not label_path.exists(): - label_map, _ = await asyncio.to_thread(generate_label_map, image_rgb) - label_owner_name = await asyncio.to_thread(save_label_map_for_owner, label_owner_name, label_map) - label_path = masks_dir / f"{label_owner_name}_labels.png" - - label_map_arr = cv2.imread(str(label_path), cv2.IMREAD_GRAYSCALE) - if label_map_arr is None: - raise HTTPException(status_code=404, detail="Label map not found") - - candidates = rank_exterior_candidates( - label_map_arr, - payload.top_k, - target=payload.target, - min_area_ratio=payload.min_area_ratio, - max_area_ratio=payload.max_area_ratio, - ) - - return { - "message": "Exterior mask suggestions generated", - "filename": safe_name, - "original_filename_for_apply": label_owner_name, - "suggestions": candidates, - "target": payload.target, - } - finally: - log_timing_end("EXTERIOR_SUGGEST", started) - try: - release_resources() - except Exception: - logger.exception("Error releasing resources after EXTERIOR_SUGGEST") - - -@router.post("/analyze_scene") -async def analyze_scene(payload: SceneAnalyzeRequest) -> dict[str, Any]: - started = log_timing_start("ANALYZE_SCENE") - try: - from services.image_service import load_image_rgb_for_edit - safe_name, image_rgb = await asyncio.to_thread(load_image_rgb_for_edit, payload.filename) - - label_owner_name = Path(payload.original_filename).name if payload.original_filename else safe_name - masks_dir = UPLOAD_DIR / "masks" - label_path = masks_dir / f"{label_owner_name}_labels.png" - - if not label_path.exists(): - label_map, _ = await asyncio.to_thread(generate_label_map, image_rgb) - label_owner_name = await asyncio.to_thread(save_label_map_for_owner, label_owner_name, label_map) - - scene_info = await asyncio.to_thread( - infer_scene_type, - image_rgb, - payload.semantic_keywords, - payload.exterior_target, - payload.min_area_ratio, - payload.max_area_ratio, - ) - scene_type = scene_info["scene_type"] - scene_hint = normalize_scene_hint(payload.scene_hint) - effective_scene = scene_hint if scene_hint != "auto" else scene_type - - adaptive_plan = build_adaptive_plan(effective_scene, payload.priority, payload.exterior_target) - - label_map_arr = cv2.imread(str(masks_dir / f"{label_owner_name}_labels.png"), cv2.IMREAD_GRAYSCALE) - suggestions: list[dict[str, Any]] = [] - if label_map_arr is not None: - if effective_scene == "exterior": - suggestions = rank_exterior_candidates( - label_map_arr, payload.top_k, - target=payload.exterior_target, - min_area_ratio=payload.min_area_ratio, - max_area_ratio=payload.max_area_ratio, - ) - else: - suggestions = rank_interior_candidates(label_map_arr, payload.top_k) - - return { - "message": "Scene analysis completed", - "filename": safe_name, - "original_filename_for_apply": label_owner_name, - "scene_type": scene_type, - "effective_scene": effective_scene, - "confidence": scene_info["confidence"], - "signals": scene_info["signals"], - "adaptive_plan": adaptive_plan, - "suggestions": suggestions, - "priority": normalize_priority(payload.priority), - } - finally: - log_timing_end("ANALYZE_SCENE", started) - try: - release_resources() - except Exception: - logger.exception("Error releasing resources after ANALYZE_SCENE") - - -@router.post("/segment_adaptive") -async def segment_adaptive(payload: SegmentAdaptiveRequest) -> dict[str, Any]: - started = log_timing_start("SEGMENT_ADAPTIVE") - try: - from services.image_service import load_image_rgb_for_edit - safe_name, image_rgb = await asyncio.to_thread(load_image_rgb_for_edit, payload.filename) - - scene_info = await asyncio.to_thread( - infer_scene_type, - image_rgb, - payload.semantic_keywords, - payload.exterior_target, - ) - scene_hint = normalize_scene_hint(payload.scene_hint) - effective_scene = scene_hint if scene_hint != "auto" else scene_info["scene_type"] - priority = normalize_priority(payload.priority) - adaptive_plan = build_adaptive_plan(effective_scene, priority, payload.exterior_target) - - label_owner_name = Path(payload.original_filename).name if payload.original_filename else safe_name - - if effective_scene == "exterior": - from services.segmentation_service import segment_exterior_depth_sync as seg_depth - from models.schemas import ExteriorDepthRequest as DepthReq - - depth_payload = DepthReq( - filename=payload.filename, - exterior_target=payload.exterior_target, - rect_xywh=payload.rect_xywh, - smooth_strength=1, - sam2_merge_top_k=12, - iterations=6, - use_semantic_hint=True, - use_depth_hint=True, - semantic_keywords=payload.semantic_keywords, - ) - result = await asyncio.to_thread(seg_depth, depth_payload) - else: - label_map, _ = await asyncio.to_thread(generate_label_map, image_rgb) - label_owner_name = await asyncio.to_thread(save_label_map_for_owner, label_owner_name, label_map) - top_k = 4 if priority == "speed" else (10 if priority == "quality" else 6) - candidates = rank_interior_candidates(label_map, top_k) - result = { - "message": "Interior adaptive segmentation completed", - "filename": safe_name, - "original_filename_for_apply": label_owner_name, - "scene_type": effective_scene, - "suggestions": candidates, - } - - result["adaptive_plan"] = adaptive_plan - result["detected_scene_type"] = scene_info["scene_type"] - result["effective_scene"] = effective_scene - result["scene_confidence"] = scene_info["confidence"] - return result - finally: - log_timing_end("SEGMENT_ADAPTIVE", started) - try: - release_resources() - except Exception: - logger.exception("Error releasing resources after SEGMENT_ADAPTIVE") - - -@router.post("/segment_video") -async def segment_video(payload: SegmentVideoRequest) -> dict[str, Any]: - try: - return await asyncio.to_thread(segment_video_sync, payload) - except HTTPException: - raise - except Exception as exc: - raise HTTPException(status_code=500, detail=f"Video segmentation failed: {exc}") from exc - - -@router.post("/segment_exterior_grabcut") -async def segment_exterior_grabcut(payload: ExteriorGrabCutRequest) -> dict[str, Any]: - try: - return await asyncio.to_thread(segment_exterior_grabcut_sync, payload) - except HTTPException: - raise - except Exception as exc: - raise HTTPException(status_code=500, detail=f"GrabCut segmentation failed: {exc}") from exc - - -@router.post("/segment_exterior_hybrid") -async def segment_exterior_hybrid(payload: ExteriorHybridRequest) -> dict[str, Any]: - try: - return await asyncio.to_thread(segment_exterior_hybrid_sync, payload) - except HTTPException: - raise - except Exception as exc: - raise HTTPException(status_code=500, detail=f"Hybrid exterior segmentation failed: {exc}") from exc - - -@router.post("/segment_exterior_brick") -async def segment_exterior_brick(payload: ExteriorBrickRequest) -> dict[str, Any]: - try: - return await asyncio.to_thread(segment_exterior_brick_sync, payload) - except HTTPException: - raise - except Exception as exc: - raise HTTPException(status_code=500, detail=f"Brick segmentation failed: {exc}") from exc - - -@router.post("/segment_exterior_depth") -async def segment_exterior_depth(payload: ExteriorDepthRequest) -> dict[str, Any]: - try: - return await asyncio.to_thread(segment_exterior_depth_sync, payload) - except HTTPException: - raise - except Exception as exc: - raise HTTPException(status_code=500, detail=f"Depth exterior segmentation failed: {exc}") from exc - - -@router.post("/apply_texture_ai") -async def apply_texture_ai( - payload: ApplyTextureAIRequest, - background_tasks: BackgroundTasks, -) -> dict[str, Any]: - started = log_timing_start("APPLY_TEXTURE_AI") - try: - # Try to run OpenAI generation synchronously within the quick timeout - def _run_openai(): - safe_name = Path(payload.filename).name - image_path = UPLOAD_DIR / safe_name - if not image_path.exists(): - image_path = OUTPUT_DIR / safe_name - - if not image_path.exists(): - return {"error": f"Image not found: {payload.filename}"} - - try: - pil = Image.open(str(image_path)).convert("RGBA") - except Exception as e: - return {"error": f"Cannot open image: {e}"} - - texture = payload.texture_name or payload.prompt or "" - png_bytes, msg = generate_image_with_openai(None, pil, texture) - if png_bytes is None: - return {"error": msg} - - out_name = f"{Path(safe_name).stem}_ai_{uuid.uuid4().hex}.png" - out_path = OUTPUT_DIR / out_name - out_path.write_bytes(png_bytes) - return {"message": msg, "filename": out_name, "url": f"/seg/ai/{out_name}", "processing": False} - - result = await asyncio.wait_for(asyncio.to_thread(_run_openai), timeout=SD_QUICK_TIMEOUT_SECONDS) - log_timing_end("APPLY_TEXTURE_AI", started) - try: - release_resources() - except Exception: - logger.exception("Error releasing resources after APPLY_TEXTURE_AI") - result["processing"] = False - return result - except asyncio.TimeoutError: - job_id = uuid.uuid4().hex - with jobs_lock: - jobs[job_id] = {"status": "processing", "created_at": utc_now_iso(), "updated_at": utc_now_iso()} - # enqueue background job that runs the OpenAI generation - def _run_openai_job(job_id_inner: str, payload_inner: ApplyTextureAIRequest) -> None: - try: - res = _run_openai() - with jobs_lock: - if "error" in res: - jobs[job_id_inner] = {"status": "failed", "error": res.get("error"), "updated_at": utc_now_iso()} - else: - jobs[job_id_inner] = {"status": "done", "result": res, "updated_at": utc_now_iso()} - except Exception as exc: - with jobs_lock: - jobs[job_id_inner] = {"status": "failed", "error": str(exc), "updated_at": utc_now_iso()} - - background_tasks.add_task(_run_openai_job, job_id, payload) - log_timing_end("APPLY_TEXTURE_AI", started) - try: - release_resources() - except Exception: - pass - return { - "processing": True, - "job_id": job_id, - "message": "Inpainting is taking longer than expected and continues in background.", - "status_url": f"/seg/jobs/{job_id}", - } - except HTTPException: - log_timing_end("APPLY_TEXTURE_AI", started) - try: - release_resources() - except Exception: - pass - raise - except Exception as exc: - log_timing_end("APPLY_TEXTURE_AI", started) - try: - release_resources() - except Exception: - pass - raise HTTPException(status_code=500, detail=f"Inpainting failed: {exc}") from exc - - -@router.get("/jobs/{job_id}") -async def get_job_status(job_id: str) -> dict[str, Any]: - with jobs_lock: - job = jobs.get(job_id) - - if job is None: - raise HTTPException(status_code=404, detail="Job not found") - - if job.get("status") == "processing": - kind = str(job.get("kind", "generic")) - stage = str(job.get("stage", "processing")) - progress = int(job.get("progress", 0) or 0) - eta_seconds: int | None = None - - if kind == "upload" and stage == "segmenting_with_sam2": - stage_started_at_text = job.get("stage_started_at") - estimated_seconds = float(job.get("estimated_seconds", 0.0) or 0.0) - if stage_started_at_text and estimated_seconds > 0: - try: - stage_started_at = datetime.fromisoformat(str(stage_started_at_text)) - elapsed = (datetime.now(timezone.utc) - stage_started_at).total_seconds() - eta_seconds = max(0, int(estimated_seconds - elapsed)) - estimated_progress = int(min(95, 30 + (max(0.0, elapsed) / estimated_seconds) * 60)) - progress = max(progress, estimated_progress) - except ValueError: - pass - - stale_limit_seconds = UPLOAD_JOB_STALE_SECONDS if kind == "upload" else SD_JOB_STALE_SECONDS - created_at_text = job.get("created_at") - if created_at_text: - try: - created_at = datetime.fromisoformat(str(created_at_text)) - age_seconds = (datetime.now(timezone.utc) - created_at).total_seconds() - if age_seconds > stale_limit_seconds: - return { - "processing": False, - "status": "timeout", - "message": "The process is taking too long. Please retry.", - "job_id": job_id, - } - except ValueError: - pass - - response: dict[str, Any] = { - "processing": True, - "status": "processing", - "job_id": job_id, - "kind": kind, - "stage": stage, - "progress": progress, - "message": str(job.get("message", "Still processing.")), - } - if eta_seconds is not None: - response["eta_seconds"] = eta_seconds - return response - - if job.get("status") == "done": - result = cast(dict[str, Any], job.get("result", {})) - result["processing"] = False - result["job_id"] = job_id - result["status"] = "done" - return result - - if job.get("status") == "failed": - return { - "processing": False, - "status": "failed", - "job_id": job_id, - "message": job.get("error", "Background task failed"), - } - - return {"processing": True, "status": "processing", "job_id": job_id, "message": "Still processing."} - - -@router.post("/apply_color") -async def apply_color(payload: ApplyColorRequest) -> dict[str, Any]: - started = log_timing_start("APPLY_COLOR") - try: - safe_name = Path(payload.filename).name - if not safe_name: - raise HTTPException(status_code=400, detail="Invalid filename") - - label_safe_name = Path(payload.original_filename).name if payload.original_filename else safe_name - - image_path = UPLOAD_DIR / safe_name - if not image_path.exists(): - image_path = OUTPUT_DIR / safe_name - if not image_path.exists() or not image_path.is_file(): - raise HTTPException(status_code=404, detail=f"Image not found: {safe_name}") - - image_bgr = cv2.imread(str(image_path)) - if image_bgr is None: - raise HTTPException(status_code=400, detail="Image could not be read") - - mask_index = parse_mask_index(payload.mask_filename) - red, green, blue = parse_rgb_color(payload.color) - - label_path = UPLOAD_DIR / "masks" / f"{label_safe_name}_labels.png" - label_map = cv2.imread(str(label_path), cv2.IMREAD_GRAYSCALE) - if label_map is None: - raise HTTPException( - status_code=404, - detail="Label map not found. Upload the image first to generate segments.", - ) - - segmentation = label_map == mask_index - if not segmentation.any(): - raise HTTPException(status_code=400, detail=f"Segment index {mask_index} not found in label map.") - - edited_image = image_bgr.copy() - edited_image[segmentation] = (blue, green, red) - - original_stem = Path(label_safe_name).stem - out_filename = f"{original_stem}_edit.jpg" - out_path = UPLOAD_DIR / out_filename - if not cv2.imwrite(str(out_path), edited_image): - raise HTTPException(status_code=500, detail="Failed to save edited image") - - return { - "message": "Color applied successfully", - "output_filename": out_filename, - "output_url": f"/seg/image/{out_filename}", - } - finally: - log_timing_end("APPLY_COLOR", started) - try: - release_resources() - except Exception: - logger.exception("Error releasing resources after APPLY_COLOR") - - -@router.post("/apply_texture") -async def apply_texture(payload: ApplyTextureRequest) -> dict[str, Any]: - try: - result = await asyncio.to_thread(apply_local_texture_sync, payload) - result["processing"] = False - return result - except HTTPException: - raise - except Exception as exc: - raise HTTPException(status_code=500, detail=f"Texture apply failed: {exc}") from exc - - -@router.get("/textures") -async def get_textures() -> dict[str, Any]: - return {"textures": list_available_textures()} - - -class _GenerateVariationsRequest(BaseModel): - texture_name: str - - class Config: - extra = "ignore" - - -@router.post("/textures/generate") -async def generate_variations(payload: _GenerateVariationsRequest) -> dict[str, Any]: - if not payload.texture_name: - raise HTTPException(status_code=400, detail="texture_name is required") - try: - variations = await asyncio.to_thread(generate_texture_variations, payload.texture_name) - return {"variations": variations} - except HTTPException: - raise - except Exception as exc: - raise HTTPException(status_code=500, detail=f"Variation generation failed: {exc}") from exc - - -@router.get("/texture-preview/{filename:path}") -async def get_texture_preview(filename: str) -> Response: - texture_path = resolve_texture_path(filename) - jpeg = await asyncio.to_thread(build_texture_preview_jpeg, texture_path) - return Response(content=jpeg, media_type="image/jpeg", headers={"Cache-Control": "public, max-age=3600"}) - - -@router.get("/video/{filename}") -async def get_video(filename: str) -> FileResponse: - if Path(filename).name != filename: - raise HTTPException(status_code=400, detail="Invalid file name") - video_path = VIDEO_UPLOAD_DIR / filename - if not video_path.exists() or not video_path.is_file(): - raise HTTPException(status_code=404, detail="Video not found") - return FileResponse(video_path) - - -@router.get("/output-video/{filename}") -async def get_output_video(filename: str) -> FileResponse: - if Path(filename).name != filename: - raise HTTPException(status_code=400, detail="Invalid file name") - video_path = VIDEO_OUTPUT_DIR / filename - if not video_path.exists() or not video_path.is_file(): - raise HTTPException(status_code=404, detail="Output video not found") - return FileResponse(video_path) - - -@router.get("/image/{filename}") -async def get_image(filename: str) -> FileResponse: - if Path(filename).name != filename: - raise HTTPException(status_code=400, detail="Invalid file name") - image_path = UPLOAD_DIR / filename - if not image_path.exists() or not image_path.is_file(): - raise HTTPException(status_code=404, detail="Image not found") - return FileResponse(image_path) - - -@router.post("/masks/reclassify/{filename}") -async def reclassify_mask_metadata(filename: str) -> dict[str, Any]: - """Re-run semantic classification on an already-segmented image and overwrite its metadata JSON.""" - import json as _json - safe = Path(filename).name - if not safe: - raise HTTPException(status_code=400, detail="Invalid filename") - - masks_dir = UPLOAD_DIR / "masks" - label_path = masks_dir / f"{safe}_labels.png" - if not label_path.exists(): - raise HTTPException(status_code=404, detail="Label map not found — upload the image first") - - label_map = cv2.imread(str(label_path), cv2.IMREAD_GRAYSCALE) - if label_map is None: - raise HTTPException(status_code=500, detail="Could not read label map") - - image_path = UPLOAD_DIR / safe - image_rgb: Any = None - if image_path.exists(): - img_bgr = cv2.imread(str(image_path)) - if img_bgr is not None: - image_rgb = cv2.cvtColor(img_bgr, cv2.COLOR_BGR2RGB) - - from services.scene_service import classify_all_label_map_segments - h, w = label_map.shape[:2] - segments_meta = await asyncio.to_thread( - classify_all_label_map_segments, label_map, w, h, image_rgb - ) - meta_path = masks_dir / f"{safe}_labels_meta.json" - meta_path.write_text(_json.dumps({"segments": segments_meta}, ensure_ascii=False), encoding="utf-8") - - return {"segments": segments_meta, "count": len(segments_meta)} - - -@router.get("/masks/meta/{filename}") -async def get_mask_metadata(filename: str) -> dict: - import json as _json - safe = Path(filename).name - if not safe: - raise HTTPException(status_code=400, detail="Invalid filename") - meta_path = UPLOAD_DIR / "masks" / f"{safe}_labels_meta.json" - if not meta_path.exists() or not meta_path.is_file(): - raise HTTPException(status_code=404, detail="Segment metadata not found") - try: - return _json.loads(meta_path.read_text(encoding="utf-8")) - except Exception as exc: - raise HTTPException(status_code=500, detail=f"Failed to read metadata: {exc}") from exc - - -@router.get("/masks/{filename}") -async def get_mask_labels(filename: str) -> FileResponse: - if Path(filename).name != filename: - raise HTTPException(status_code=400, detail="Invalid file name") - label_path = UPLOAD_DIR / "masks" / f"{filename}_labels.png" - if not label_path.exists() or not label_path.is_file(): - raise HTTPException(status_code=404, detail="Label map not found") - return FileResponse(label_path) - - -@router.get("/ai/{filename}") -async def get_ai_image(filename: str) -> FileResponse: - if Path(filename).name != filename: - raise HTTPException(status_code=400, detail="Invalid file name") - out_path = OUTPUT_DIR / filename - if not out_path.exists() or not out_path.is_file(): - raise HTTPException(status_code=404, detail="AI output image not found") - return FileResponse(out_path) +""" +Segmentation router - todos los endpoints del editor de texturas con SAM2. +Prefijo: /seg +""" +import asyncio +import uuid +from datetime import datetime, timezone +from pathlib import Path +from typing import Any, cast + +from fastapi import APIRouter, BackgroundTasks, File, HTTPException, UploadFile +from fastapi.responses import FileResponse, HTMLResponse, Response + +from core.config import ( + FRONTEND_DEBUG, + OUTPUT_DIR, + SD_JOB_STALE_SECONDS, + SD_QUICK_TIMEOUT_SECONDS, + UPLOAD_DIR, + UPLOAD_JOB_STALE_SECONDS, + VIDEO_OUTPUT_DIR, + VIDEO_UPLOAD_DIR, + load_classic_dashboard_html, + log_timing_end, + log_timing_start, + logger, + utc_now_iso, +) +from pydantic import BaseModel + +from models.schemas import ( + ApplyColorRequest, + ApplyTextureAIRequest, + ApplyTextureRequest, + ExteriorBrickRequest, + ExteriorDepthRequest, + ExteriorGrabCutRequest, + ExteriorHybridRequest, + ExteriorSuggestRequest, + GuidedSegmentRequest, + SceneAnalyzeRequest, + SegmentAdaptiveRequest, + SegmentVideoRequest, +) +from services.image_service import ( + prepare_and_store_upload, + run_upload_job, + save_label_map_for_owner, +) +from services.inpainting_service import run_inpainting_job, run_inpainting_sync +from services.sam2_service import jobs, jobs_lock, release_resources +from services.scene_service import ( + build_adaptive_plan, + generate_label_map, + infer_scene_type, + normalize_priority, + normalize_scene_hint, + rank_exterior_candidates, + rank_interior_candidates, +) +from services.segmentation_service import ( + generate_guided_label_map, + parse_mask_index, + parse_rgb_color, + segment_exterior_brick_sync, + segment_exterior_depth_sync, + segment_exterior_grabcut_sync, + segment_exterior_hybrid_sync, + segment_video_sync, +) +from services.texture_service import ( + apply_local_texture_sync, + build_texture_preview_jpeg, + generate_texture_variations, + list_available_textures, + resolve_texture_path, +) + +import cv2 + +router = APIRouter(prefix="/seg") + + +@router.get("/", response_class=HTMLResponse) +async def home() -> HTMLResponse: + dashboard_html = load_classic_dashboard_html().replace( + "__FRONTEND_DEBUG_ENABLED__", + "true" if FRONTEND_DEBUG else "false", + ) + return HTMLResponse(content=dashboard_html) + + +@router.post("/upload_video") +async def upload_video(file: UploadFile = File(...)) -> dict[str, Any]: + if not file.content_type or not file.content_type.startswith("video/"): + raise HTTPException(status_code=400, detail="Only video files are allowed") + + safe_name = Path(file.filename or "uploaded_video").name + if not safe_name: + raise HTTPException(status_code=400, detail="Invalid filename") + + destination = VIDEO_UPLOAD_DIR / safe_name + content = await file.read() + if not content: + raise HTTPException(status_code=400, detail="Uploaded video is empty") + + destination.write_bytes(content) + return { + "message": "Video uploaded successfully", + "filename": safe_name, + "url": f"/seg/video/{safe_name}", + } + + +@router.post("/upload_async") +async def upload_image_async( + background_tasks: BackgroundTasks, + file: UploadFile = File(...), +) -> dict[str, Any]: + if not file.content_type or not file.content_type.startswith("image/"): + raise HTTPException(status_code=400, detail="Only image files are allowed") + + content = await file.read() + job_id = uuid.uuid4().hex + with jobs_lock: + jobs[job_id] = { + "kind": "upload", + "status": "processing", + "stage": "queued", + "progress": 2, + "message": "Queued for segmentation", + "created_at": utc_now_iso(), + "updated_at": utc_now_iso(), + } + + background_tasks.add_task(run_upload_job, job_id, content, file.filename or "uploaded_image") + return { + "processing": True, + "job_id": job_id, + "status": "processing", + "stage": "queued", + "progress": 2, + "message": "Upload accepted. Segmentation started in background.", + "status_url": f"/seg/jobs/{job_id}", + } + + +@router.post("/segment_guided") +async def segment_guided(payload: GuidedSegmentRequest) -> dict[str, Any]: + started = log_timing_start("SEGMENT_GUIDED") + try: + from services.image_service import load_image_rgb_for_edit + safe_name, image_rgb = await asyncio.to_thread(load_image_rgb_for_edit, payload.filename) + label_map, ranked_scores = await asyncio.to_thread( + generate_guided_label_map, + image_rgb, + [list(point) for point in payload.point_coords], + list(payload.point_labels), + list(payload.box_xyxy) if payload.box_xyxy is not None else [], + payload.multimask_output, + ) + + guided_owner = f"{Path(safe_name).stem}_guided.jpg" + label_owner = await asyncio.to_thread(save_label_map_for_owner, guided_owner, label_map) + available_indices = list(range(1, len(ranked_scores) + 1)) + + return { + "message": "Guided segmentation completed", + "filename": safe_name, + "original_filename_for_apply": label_owner, + "mask_count": len(ranked_scores), + "available_mask_indices": available_indices, + "recommended_mask_index": 1, + "scores": [round(score, 6) for score in ranked_scores], + } + finally: + log_timing_end("SEGMENT_GUIDED", started) + try: + release_resources() + except Exception: + logger.exception("Error releasing resources after SEGMENT_GUIDED") + + +@router.post("/suggest_exterior_masks") +async def suggest_exterior_masks(payload: ExteriorSuggestRequest) -> dict[str, Any]: + started = log_timing_start("EXTERIOR_SUGGEST") + try: + from services.image_service import load_image_rgb_for_edit + safe_name, image_rgb = await asyncio.to_thread(load_image_rgb_for_edit, payload.filename) + + label_owner_name = Path(payload.original_filename).name if payload.original_filename else safe_name + + masks_dir = UPLOAD_DIR / "masks" + label_path = masks_dir / f"{label_owner_name}_labels.png" + if not label_path.exists(): + label_map, _ = await asyncio.to_thread(generate_label_map, image_rgb) + label_owner_name = await asyncio.to_thread(save_label_map_for_owner, label_owner_name, label_map) + label_path = masks_dir / f"{label_owner_name}_labels.png" + + label_map_arr = cv2.imread(str(label_path), cv2.IMREAD_GRAYSCALE) + if label_map_arr is None: + raise HTTPException(status_code=404, detail="Label map not found") + + candidates = rank_exterior_candidates( + label_map_arr, + payload.top_k, + target=payload.target, + min_area_ratio=payload.min_area_ratio, + max_area_ratio=payload.max_area_ratio, + ) + + return { + "message": "Exterior mask suggestions generated", + "filename": safe_name, + "original_filename_for_apply": label_owner_name, + "suggestions": candidates, + "target": payload.target, + } + finally: + log_timing_end("EXTERIOR_SUGGEST", started) + try: + release_resources() + except Exception: + logger.exception("Error releasing resources after EXTERIOR_SUGGEST") + + +@router.post("/analyze_scene") +async def analyze_scene(payload: SceneAnalyzeRequest) -> dict[str, Any]: + started = log_timing_start("ANALYZE_SCENE") + try: + from services.image_service import load_image_rgb_for_edit + safe_name, image_rgb = await asyncio.to_thread(load_image_rgb_for_edit, payload.filename) + + label_owner_name = Path(payload.original_filename).name if payload.original_filename else safe_name + masks_dir = UPLOAD_DIR / "masks" + label_path = masks_dir / f"{label_owner_name}_labels.png" + + if not label_path.exists(): + label_map, _ = await asyncio.to_thread(generate_label_map, image_rgb) + label_owner_name = await asyncio.to_thread(save_label_map_for_owner, label_owner_name, label_map) + + scene_info = await asyncio.to_thread( + infer_scene_type, + image_rgb, + payload.semantic_keywords, + payload.exterior_target, + payload.min_area_ratio, + payload.max_area_ratio, + ) + scene_type = scene_info["scene_type"] + scene_hint = normalize_scene_hint(payload.scene_hint) + effective_scene = scene_hint if scene_hint != "auto" else scene_type + + adaptive_plan = build_adaptive_plan(effective_scene, payload.priority, payload.exterior_target) + + label_map_arr = cv2.imread(str(masks_dir / f"{label_owner_name}_labels.png"), cv2.IMREAD_GRAYSCALE) + suggestions: list[dict[str, Any]] = [] + if label_map_arr is not None: + if effective_scene == "exterior": + suggestions = rank_exterior_candidates( + label_map_arr, payload.top_k, + target=payload.exterior_target, + min_area_ratio=payload.min_area_ratio, + max_area_ratio=payload.max_area_ratio, + ) + else: + suggestions = rank_interior_candidates(label_map_arr, payload.top_k) + + return { + "message": "Scene analysis completed", + "filename": safe_name, + "original_filename_for_apply": label_owner_name, + "scene_type": scene_type, + "effective_scene": effective_scene, + "confidence": scene_info["confidence"], + "signals": scene_info["signals"], + "adaptive_plan": adaptive_plan, + "suggestions": suggestions, + "priority": normalize_priority(payload.priority), + } + finally: + log_timing_end("ANALYZE_SCENE", started) + try: + release_resources() + except Exception: + logger.exception("Error releasing resources after ANALYZE_SCENE") + + +@router.post("/segment_adaptive") +async def segment_adaptive(payload: SegmentAdaptiveRequest) -> dict[str, Any]: + started = log_timing_start("SEGMENT_ADAPTIVE") + try: + from services.image_service import load_image_rgb_for_edit + safe_name, image_rgb = await asyncio.to_thread(load_image_rgb_for_edit, payload.filename) + + scene_info = await asyncio.to_thread( + infer_scene_type, + image_rgb, + payload.semantic_keywords, + payload.exterior_target, + ) + scene_hint = normalize_scene_hint(payload.scene_hint) + effective_scene = scene_hint if scene_hint != "auto" else scene_info["scene_type"] + priority = normalize_priority(payload.priority) + adaptive_plan = build_adaptive_plan(effective_scene, priority, payload.exterior_target) + + label_owner_name = Path(payload.original_filename).name if payload.original_filename else safe_name + + if effective_scene == "exterior": + from services.segmentation_service import segment_exterior_depth_sync as seg_depth + from models.schemas import ExteriorDepthRequest as DepthReq + + depth_payload = DepthReq( + filename=payload.filename, + exterior_target=payload.exterior_target, + rect_xywh=payload.rect_xywh, + smooth_strength=1, + sam2_merge_top_k=12, + iterations=6, + use_semantic_hint=True, + use_depth_hint=True, + semantic_keywords=payload.semantic_keywords, + ) + result = await asyncio.to_thread(seg_depth, depth_payload) + else: + label_map, _ = await asyncio.to_thread(generate_label_map, image_rgb) + label_owner_name = await asyncio.to_thread(save_label_map_for_owner, label_owner_name, label_map) + top_k = 4 if priority == "speed" else (10 if priority == "quality" else 6) + candidates = rank_interior_candidates(label_map, top_k) + result = { + "message": "Interior adaptive segmentation completed", + "filename": safe_name, + "original_filename_for_apply": label_owner_name, + "scene_type": effective_scene, + "suggestions": candidates, + } + + result["adaptive_plan"] = adaptive_plan + result["detected_scene_type"] = scene_info["scene_type"] + result["effective_scene"] = effective_scene + result["scene_confidence"] = scene_info["confidence"] + return result + finally: + log_timing_end("SEGMENT_ADAPTIVE", started) + try: + release_resources() + except Exception: + logger.exception("Error releasing resources after SEGMENT_ADAPTIVE") + + +@router.post("/segment_video") +async def segment_video(payload: SegmentVideoRequest) -> dict[str, Any]: + try: + return await asyncio.to_thread(segment_video_sync, payload) + except HTTPException: + raise + except Exception as exc: + raise HTTPException(status_code=500, detail=f"Video segmentation failed: {exc}") from exc + + +@router.post("/segment_exterior_grabcut") +async def segment_exterior_grabcut(payload: ExteriorGrabCutRequest) -> dict[str, Any]: + try: + return await asyncio.to_thread(segment_exterior_grabcut_sync, payload) + except HTTPException: + raise + except Exception as exc: + raise HTTPException(status_code=500, detail=f"GrabCut segmentation failed: {exc}") from exc + + +@router.post("/segment_exterior_hybrid") +async def segment_exterior_hybrid(payload: ExteriorHybridRequest) -> dict[str, Any]: + try: + return await asyncio.to_thread(segment_exterior_hybrid_sync, payload) + except HTTPException: + raise + except Exception as exc: + raise HTTPException(status_code=500, detail=f"Hybrid exterior segmentation failed: {exc}") from exc + + +@router.post("/segment_exterior_brick") +async def segment_exterior_brick(payload: ExteriorBrickRequest) -> dict[str, Any]: + try: + return await asyncio.to_thread(segment_exterior_brick_sync, payload) + except HTTPException: + raise + except Exception as exc: + raise HTTPException(status_code=500, detail=f"Brick segmentation failed: {exc}") from exc + + +@router.post("/segment_exterior_depth") +async def segment_exterior_depth(payload: ExteriorDepthRequest) -> dict[str, Any]: + try: + return await asyncio.to_thread(segment_exterior_depth_sync, payload) + except HTTPException: + raise + except Exception as exc: + raise HTTPException(status_code=500, detail=f"Depth exterior segmentation failed: {exc}") from exc + + +@router.post("/apply_texture_ai") +async def apply_texture_ai( + payload: ApplyTextureAIRequest, + background_tasks: BackgroundTasks, +) -> dict[str, Any]: + started = log_timing_start("APPLY_TEXTURE_AI") + try: + result = await asyncio.wait_for( + asyncio.to_thread(run_inpainting_sync, payload), + timeout=SD_QUICK_TIMEOUT_SECONDS, + ) + log_timing_end("APPLY_TEXTURE_AI", started) + try: + release_resources() + except Exception: + logger.exception("Error releasing resources after APPLY_TEXTURE_AI") + result["processing"] = False + return result + except asyncio.TimeoutError: + job_id = uuid.uuid4().hex + with jobs_lock: + jobs[job_id] = {"status": "processing", "created_at": utc_now_iso(), "updated_at": utc_now_iso()} + background_tasks.add_task(run_inpainting_job, job_id, payload) + log_timing_end("APPLY_TEXTURE_AI", started) + try: + release_resources() + except Exception: + pass + return { + "processing": True, + "job_id": job_id, + "message": "Inpainting is taking longer than expected and continues in background.", + "status_url": f"/seg/jobs/{job_id}", + } + except HTTPException: + log_timing_end("APPLY_TEXTURE_AI", started) + try: + release_resources() + except Exception: + pass + raise + except Exception as exc: + log_timing_end("APPLY_TEXTURE_AI", started) + try: + release_resources() + except Exception: + pass + raise HTTPException(status_code=500, detail=f"Inpainting failed: {exc}") from exc + + +@router.get("/jobs/{job_id}") +async def get_job_status(job_id: str) -> dict[str, Any]: + with jobs_lock: + job = jobs.get(job_id) + + if job is None: + raise HTTPException(status_code=404, detail="Job not found") + + if job.get("status") == "processing": + kind = str(job.get("kind", "generic")) + stage = str(job.get("stage", "processing")) + progress = int(job.get("progress", 0) or 0) + eta_seconds: int | None = None + + if kind == "upload" and stage == "segmenting_with_sam2": + stage_started_at_text = job.get("stage_started_at") + estimated_seconds = float(job.get("estimated_seconds", 0.0) or 0.0) + if stage_started_at_text and estimated_seconds > 0: + try: + stage_started_at = datetime.fromisoformat(str(stage_started_at_text)) + elapsed = (datetime.now(timezone.utc) - stage_started_at).total_seconds() + eta_seconds = max(0, int(estimated_seconds - elapsed)) + estimated_progress = int(min(95, 30 + (max(0.0, elapsed) / estimated_seconds) * 60)) + progress = max(progress, estimated_progress) + except ValueError: + pass + + stale_limit_seconds = UPLOAD_JOB_STALE_SECONDS if kind == "upload" else SD_JOB_STALE_SECONDS + created_at_text = job.get("created_at") + if created_at_text: + try: + created_at = datetime.fromisoformat(str(created_at_text)) + age_seconds = (datetime.now(timezone.utc) - created_at).total_seconds() + if age_seconds > stale_limit_seconds: + return { + "processing": False, + "status": "timeout", + "message": "The process is taking too long. Please retry.", + "job_id": job_id, + } + except ValueError: + pass + + response: dict[str, Any] = { + "processing": True, + "status": "processing", + "job_id": job_id, + "kind": kind, + "stage": stage, + "progress": progress, + "message": str(job.get("message", "Still processing.")), + } + if eta_seconds is not None: + response["eta_seconds"] = eta_seconds + return response + + if job.get("status") == "done": + result = cast(dict[str, Any], job.get("result", {})) + result["processing"] = False + result["job_id"] = job_id + result["status"] = "done" + return result + + if job.get("status") == "failed": + return { + "processing": False, + "status": "failed", + "job_id": job_id, + "message": job.get("error", "Background task failed"), + } + + return {"processing": True, "status": "processing", "job_id": job_id, "message": "Still processing."} + + +@router.post("/apply_color") +async def apply_color(payload: ApplyColorRequest) -> dict[str, Any]: + started = log_timing_start("APPLY_COLOR") + try: + safe_name = Path(payload.filename).name + if not safe_name: + raise HTTPException(status_code=400, detail="Invalid filename") + + label_safe_name = Path(payload.original_filename).name if payload.original_filename else safe_name + + image_path = UPLOAD_DIR / safe_name + if not image_path.exists(): + image_path = OUTPUT_DIR / safe_name + if not image_path.exists() or not image_path.is_file(): + raise HTTPException(status_code=404, detail=f"Image not found: {safe_name}") + + image_bgr = cv2.imread(str(image_path)) + if image_bgr is None: + raise HTTPException(status_code=400, detail="Image could not be read") + + mask_index = parse_mask_index(payload.mask_filename) + red, green, blue = parse_rgb_color(payload.color) + + label_path = UPLOAD_DIR / "masks" / f"{label_safe_name}_labels.png" + label_map = cv2.imread(str(label_path), cv2.IMREAD_GRAYSCALE) + if label_map is None: + raise HTTPException( + status_code=404, + detail="Label map not found. Upload the image first to generate segments.", + ) + + segmentation = label_map == mask_index + if not segmentation.any(): + raise HTTPException(status_code=400, detail=f"Segment index {mask_index} not found in label map.") + + edited_image = image_bgr.copy() + edited_image[segmentation] = (blue, green, red) + + original_stem = Path(label_safe_name).stem + out_filename = f"{original_stem}_edit.jpg" + out_path = UPLOAD_DIR / out_filename + if not cv2.imwrite(str(out_path), edited_image): + raise HTTPException(status_code=500, detail="Failed to save edited image") + + return { + "message": "Color applied successfully", + "output_filename": out_filename, + "output_url": f"/seg/image/{out_filename}", + } + finally: + log_timing_end("APPLY_COLOR", started) + try: + release_resources() + except Exception: + logger.exception("Error releasing resources after APPLY_COLOR") + + +@router.post("/apply_texture") +async def apply_texture(payload: ApplyTextureRequest) -> dict[str, Any]: + try: + result = await asyncio.to_thread(apply_local_texture_sync, payload) + result["processing"] = False + return result + except HTTPException: + raise + except Exception as exc: + raise HTTPException(status_code=500, detail=f"Texture apply failed: {exc}") from exc + + +@router.get("/textures") +async def get_textures() -> dict[str, Any]: + return {"textures": list_available_textures()} + + +class _GenerateVariationsRequest(BaseModel): + texture_name: str + + class Config: + extra = "ignore" + + +@router.post("/textures/generate") +async def generate_variations(payload: _GenerateVariationsRequest) -> dict[str, Any]: + if not payload.texture_name: + raise HTTPException(status_code=400, detail="texture_name is required") + try: + variations = await asyncio.to_thread(generate_texture_variations, payload.texture_name) + return {"variations": variations} + except HTTPException: + raise + except Exception as exc: + raise HTTPException(status_code=500, detail=f"Variation generation failed: {exc}") from exc + + +@router.get("/texture-preview/{filename:path}") +async def get_texture_preview(filename: str) -> Response: + texture_path = resolve_texture_path(filename) + jpeg = await asyncio.to_thread(build_texture_preview_jpeg, texture_path) + return Response(content=jpeg, media_type="image/jpeg", headers={"Cache-Control": "public, max-age=3600"}) + + +@router.get("/video/{filename}") +async def get_video(filename: str) -> FileResponse: + if Path(filename).name != filename: + raise HTTPException(status_code=400, detail="Invalid file name") + video_path = VIDEO_UPLOAD_DIR / filename + if not video_path.exists() or not video_path.is_file(): + raise HTTPException(status_code=404, detail="Video not found") + return FileResponse(video_path) + + +@router.get("/output-video/{filename}") +async def get_output_video(filename: str) -> FileResponse: + if Path(filename).name != filename: + raise HTTPException(status_code=400, detail="Invalid file name") + video_path = VIDEO_OUTPUT_DIR / filename + if not video_path.exists() or not video_path.is_file(): + raise HTTPException(status_code=404, detail="Output video not found") + return FileResponse(video_path) + + +@router.get("/image/{filename}") +async def get_image(filename: str) -> FileResponse: + if Path(filename).name != filename: + raise HTTPException(status_code=400, detail="Invalid file name") + image_path = UPLOAD_DIR / filename + if not image_path.exists() or not image_path.is_file(): + raise HTTPException(status_code=404, detail="Image not found") + return FileResponse(image_path) + + +@router.post("/masks/reclassify/{filename}") +async def reclassify_mask_metadata(filename: str) -> dict[str, Any]: + """Re-run semantic classification on an already-segmented image and overwrite its metadata JSON.""" + import json as _json + safe = Path(filename).name + if not safe: + raise HTTPException(status_code=400, detail="Invalid filename") + + masks_dir = UPLOAD_DIR / "masks" + label_path = masks_dir / f"{safe}_labels.png" + if not label_path.exists(): + raise HTTPException(status_code=404, detail="Label map not found — upload the image first") + + label_map = cv2.imread(str(label_path), cv2.IMREAD_GRAYSCALE) + if label_map is None: + raise HTTPException(status_code=500, detail="Could not read label map") + + image_path = UPLOAD_DIR / safe + image_rgb: Any = None + if image_path.exists(): + img_bgr = cv2.imread(str(image_path)) + if img_bgr is not None: + image_rgb = cv2.cvtColor(img_bgr, cv2.COLOR_BGR2RGB) + + from services.scene_service import classify_all_label_map_segments + h, w = label_map.shape[:2] + segments_meta = await asyncio.to_thread( + classify_all_label_map_segments, label_map, w, h, image_rgb + ) + meta_path = masks_dir / f"{safe}_labels_meta.json" + meta_path.write_text(_json.dumps({"segments": segments_meta}, ensure_ascii=False), encoding="utf-8") + + return {"segments": segments_meta, "count": len(segments_meta)} + + +@router.get("/masks/meta/{filename}") +async def get_mask_metadata(filename: str) -> dict: + import json as _json + safe = Path(filename).name + if not safe: + raise HTTPException(status_code=400, detail="Invalid filename") + meta_path = UPLOAD_DIR / "masks" / f"{safe}_labels_meta.json" + if not meta_path.exists() or not meta_path.is_file(): + raise HTTPException(status_code=404, detail="Segment metadata not found") + try: + return _json.loads(meta_path.read_text(encoding="utf-8")) + except Exception as exc: + raise HTTPException(status_code=500, detail=f"Failed to read metadata: {exc}") from exc + + +@router.get("/masks/{filename}") +async def get_mask_labels(filename: str) -> FileResponse: + if Path(filename).name != filename: + raise HTTPException(status_code=400, detail="Invalid file name") + label_path = UPLOAD_DIR / "masks" / f"{filename}_labels.png" + if not label_path.exists() or not label_path.is_file(): + raise HTTPException(status_code=404, detail="Label map not found") + return FileResponse(label_path) + + +@router.get("/ai/{filename}") +async def get_ai_image(filename: str) -> FileResponse: + if Path(filename).name != filename: + raise HTTPException(status_code=400, detail="Invalid file name") + out_path = OUTPUT_DIR / filename + if not out_path.exists() or not out_path.is_file(): + raise HTTPException(status_code=404, detail="AI output image not found") + return FileResponse(out_path) diff --git a/backend/run_server.bat b/backend/run_server.bat index bcc1a54cdd83f00d54f2fcbcee22c0e209047b7f..10921a1271c2fb24847837ef5c5c96c87d8bf546 100644 --- a/backend/run_server.bat +++ b/backend/run_server.bat @@ -1,12 +1,12 @@ -@echo off -REM Usa el Python del entorno virtual local dentro de backend y arranca uvicorn con recarga en caliente. -if exist .venv\Scripts\python.exe ( - set "PYTHON_EXE=.venv\Scripts\python.exe" -) else if exist .venv\bin\python.exe ( - set "PYTHON_EXE=.venv\bin\python.exe" -) else ( - echo No se encontró Python en .venv. Crea el entorno virtual primero. - pause - exit /b 1 -) -%PYTHON_EXE% -m uvicorn main:app --reload --host 0.0.0.0 --port 8000 +@echo off +REM Usa el Python del entorno virtual local dentro de backend y arranca uvicorn con recarga en caliente. +if exist .venv\Scripts\python.exe ( + set "PYTHON_EXE=.venv\Scripts\python.exe" +) else if exist .venv\bin\python.exe ( + set "PYTHON_EXE=.venv\bin\python.exe" +) else ( + echo No se encontró Python en .venv. Crea el entorno virtual primero. + pause + exit /b 1 +) +%PYTHON_EXE% -m uvicorn main:app --reload --host 0.0.0.0 --port 8000 diff --git a/backend/services/gradio_client_service.py b/backend/services/gradio_client_service.py index 21592fb3a212ae553affec2c3a943e8d7c778b7e..95d162080ba3a6d3da0255b056993f3d874b09e2 100644 --- a/backend/services/gradio_client_service.py +++ b/backend/services/gradio_client_service.py @@ -1,108 +1,104 @@ -""" -Cliente para llamar al Gradio Space de ZeroGPU (SAM2 + SegFormer + DINO). -Se activa solo si GRADIO_SPACE_URL está definido en el entorno. -""" -import asyncio -import base64 -import io -import json -import logging -from pathlib import Path - -import numpy as np -from PIL import Image - -from core.config import GRADIO_CPU_FALLBACK_URL, GRADIO_SPACE_URL - -logger = logging.getLogger(__name__) - - -def is_gradio_enabled() -> bool: - # Desactivado por petición del usuario para usar el nuevo flujo simplificado con OpenAI - return False - - - -def _call_gradio_sync(image_path: Path, space_url: str) -> tuple[np.ndarray, int]: - """ - Synchronous Gradio call — safe to invoke from a background thread. - Returns (label_map, mask_count). - Raises on any error so the caller can handle fallback. - """ - from gradio_client import Client, file # type: ignore - - # 300s timeout: ZeroGPU cold start + SAM2+DINO inference can take 60-120s - # client = Client(space_url, httpx_kwargs={"timeout": 300.0}) - client = Client(space_url) # httpx_kwargs no es compatible con todas las versiones - - - # segment_for_backend returns (overlay_image, combined_json_str) - _overlay_file, combined_json_str = client.predict( - file(str(image_path)), - api_name="/segment", - ) - - if not isinstance(combined_json_str, str): - raise ValueError(f"Unexpected response type from Gradio Space: {type(combined_json_str)}") - - combined: dict = json.loads(combined_json_str) - - if "error" in combined: - raise RuntimeError(f"Gradio Space error: {combined['error'][:500]}") - - label_map_b64: str = combined.get("label_map_b64", "") - if not label_map_b64: - return np.zeros((1, 1), dtype=np.uint8), 0 - - # Decode PNG-encoded label map (lossless uint8 grayscale) - label_map_bytes = base64.b64decode(label_map_b64) - pil_label = Image.open(io.BytesIO(label_map_bytes)) - label_map = np.array(pil_label, dtype=np.uint8) - mask_count = int(label_map.max()) - - entorno = combined.get("entorno", "?") - motor = combined.get("motor", "?") - logger.info( - "Gradio Space segmentation: entorno=%s motor=%s mask_count=%d", - entorno, motor, mask_count, - ) - - return label_map, mask_count - - -def segment_via_gradio_sync(image_path: Path) -> tuple[np.ndarray, int]: - """ - Blocking call to the Gradio Space from a sync context (background task thread). - Tries the GPU Space first; if it fails, falls back to the CPU Space. - Raises RuntimeError if both fail or neither is configured. - """ - if not is_gradio_enabled(): - raise RuntimeError("GRADIO_SPACE_URL is not configured") - - gpu_error: Exception | None = None - try: - logger.info("Calling GPU Gradio Space: %s", GRADIO_SPACE_URL) - return _call_gradio_sync(image_path, GRADIO_SPACE_URL) - except Exception as e: - gpu_error = e - logger.warning("GPU Space failed (%s), trying CPU fallback...", gpu_error) - - if not GRADIO_CPU_FALLBACK_URL: - raise RuntimeError(f"GPU Gradio Space failed and no CPU fallback configured. Error: {gpu_error}") - - try: - logger.info("Calling CPU fallback Space: %s", GRADIO_CPU_FALLBACK_URL) - return _call_gradio_sync(image_path, GRADIO_CPU_FALLBACK_URL) - except Exception as exc_cpu: - raise RuntimeError( - f"Both Gradio Spaces failed.\n" - f" GPU ({GRADIO_SPACE_URL}): {gpu_error}\n" - f" CPU ({GRADIO_CPU_FALLBACK_URL}): {exc_cpu}" - ) from exc_cpu - - -async def segment_via_gradio(image_path: Path) -> tuple[np.ndarray, int]: - """ - Async wrapper — offloads the blocking call (with GPU→CPU fallback) to a thread. - """ - return await asyncio.to_thread(segment_via_gradio_sync, image_path) +""" +Cliente para llamar al Gradio Space de ZeroGPU (SAM2 + SegFormer + DINO). +Se activa solo si GRADIO_SPACE_URL está definido en el entorno. +""" +import asyncio +import base64 +import io +import json +import logging +from pathlib import Path + +import numpy as np +from PIL import Image + +from core.config import GRADIO_CPU_FALLBACK_URL, GRADIO_SPACE_URL + +logger = logging.getLogger(__name__) + + +def is_gradio_enabled() -> bool: + return bool(GRADIO_SPACE_URL) + + +def _call_gradio_sync(image_path: Path, space_url: str) -> tuple[np.ndarray, int]: + """ + Synchronous Gradio call — safe to invoke from a background thread. + Returns (label_map, mask_count). + Raises on any error so the caller can handle fallback. + """ + from gradio_client import Client, file # type: ignore + + # 300s timeout: ZeroGPU cold start + SAM2+DINO inference can take 60-120s + client = Client(space_url, httpx_kwargs={"timeout": 300.0}) + + # segment_for_backend returns (overlay_image, combined_json_str) + _overlay_file, combined_json_str = client.predict( + file(str(image_path)), + api_name="/segment", + ) + + if not isinstance(combined_json_str, str): + raise ValueError(f"Unexpected response type from Gradio Space: {type(combined_json_str)}") + + combined: dict = json.loads(combined_json_str) + + if "error" in combined: + raise RuntimeError(f"Gradio Space error: {combined['error'][:500]}") + + label_map_b64: str = combined.get("label_map_b64", "") + if not label_map_b64: + return np.zeros((1, 1), dtype=np.uint8), 0 + + # Decode PNG-encoded label map (lossless uint8 grayscale) + label_map_bytes = base64.b64decode(label_map_b64) + pil_label = Image.open(io.BytesIO(label_map_bytes)) + label_map = np.array(pil_label, dtype=np.uint8) + mask_count = int(label_map.max()) + + entorno = combined.get("entorno", "?") + motor = combined.get("motor", "?") + logger.info( + "Gradio Space segmentation: entorno=%s motor=%s mask_count=%d", + entorno, motor, mask_count, + ) + + return label_map, mask_count + + +def segment_via_gradio_sync(image_path: Path) -> tuple[np.ndarray, int]: + """ + Blocking call to the Gradio Space from a sync context (background task thread). + Tries the GPU Space first; if it fails, falls back to the CPU Space. + Raises RuntimeError if both fail or neither is configured. + """ + if not is_gradio_enabled(): + raise RuntimeError("GRADIO_SPACE_URL is not configured") + + gpu_error: Exception | None = None + try: + logger.info("Calling GPU Gradio Space: %s", GRADIO_SPACE_URL) + return _call_gradio_sync(image_path, GRADIO_SPACE_URL) + except Exception as e: + gpu_error = e + logger.warning("GPU Space failed (%s), trying CPU fallback...", gpu_error) + + if not GRADIO_CPU_FALLBACK_URL: + raise RuntimeError(f"GPU Gradio Space failed and no CPU fallback configured. Error: {gpu_error}") + + try: + logger.info("Calling CPU fallback Space: %s", GRADIO_CPU_FALLBACK_URL) + return _call_gradio_sync(image_path, GRADIO_CPU_FALLBACK_URL) + except Exception as exc_cpu: + raise RuntimeError( + f"Both Gradio Spaces failed.\n" + f" GPU ({GRADIO_SPACE_URL}): {gpu_error}\n" + f" CPU ({GRADIO_CPU_FALLBACK_URL}): {exc_cpu}" + ) from exc_cpu + + +async def segment_via_gradio(image_path: Path) -> tuple[np.ndarray, int]: + """ + Async wrapper — offloads the blocking call (with GPU→CPU fallback) to a thread. + """ + return await asyncio.to_thread(segment_via_gradio_sync, image_path) diff --git a/backend/services/image_service.py b/backend/services/image_service.py index 5e6621f71d4e9f681be29e58924fd5d9fe8b90d3..08265d2eb68bb2ba6388f1207b71e0da92cbd3b3 100644 --- a/backend/services/image_service.py +++ b/backend/services/image_service.py @@ -18,13 +18,13 @@ from core.config import ( logger, utc_now_iso, ) +from services.gradio_client_service import is_gradio_enabled, segment_via_gradio_sync from services.sam2_service import ( jobs, jobs_lock, release_resources, ) - # Imported lazily to avoid circular imports def _get_generate_label_map(): from services.scene_service import generate_label_map @@ -134,15 +134,47 @@ def run_upload_job(job_id: str, content: bytes, original_name: str) -> None: logger.info(f"[JOB {job_id}] segmenting_with_sam2 progress=30 estimated_seconds={estimated_seconds}") image_path = UPLOAD_DIR / safe_name - - # We are simplifying the flow: skipping SAM 2 segmentation. - # The result will have 0 masks. - + if is_gradio_enabled(): + label_map, mask_count = segment_via_gradio_sync(image_path) + else: + generate_label_map = _get_generate_label_map() + label_map, mask_count = generate_label_map(image_rgb) + + with jobs_lock: + job = jobs.setdefault(job_id, {}) + job.update({ + "stage": "saving_masks", + "progress": 92, + "message": "Saving mask map", + "updated_at": utc_now_iso(), + }) + logger.info(f"[JOB {job_id}] saving_masks progress=92") + + masks_dir = UPLOAD_DIR / "masks" + masks_dir.mkdir(exist_ok=True) + label_path = masks_dir / f"{safe_name}_labels.png" + if not cv2.imwrite(str(label_path), label_map): + raise HTTPException(status_code=500, detail="Failed to save label map") + + # Classify each segment and save metadata + try: + from services.scene_service import classify_all_label_map_segments + h, w = image_rgb.shape[:2] + segments_meta = classify_all_label_map_segments(label_map, w, h, image_rgb) + meta_path = masks_dir / f"{safe_name}_labels_meta.json" + meta_path.write_text( + json.dumps({"segments": segments_meta}, ensure_ascii=False), + encoding="utf-8", + ) + logger.info(f"[JOB {job_id}] segments_meta saved ({len(segments_meta)} segments)") + except Exception: + logger.exception(f"[JOB {job_id}] Failed to save segment metadata") + result: dict[str, Any] = { "message": "Image uploaded successfully", "filename": safe_name, "url": f"/seg/image/{safe_name}", - "mask_count": 0, + "mask_count": mask_count, } with jobs_lock: @@ -151,15 +183,11 @@ def run_upload_job(job_id: str, content: bytes, original_name: str) -> None: "status": "done", "stage": "done", "progress": 100, - "message": "Upload complete (Simplified flow)", + "message": "Segmentation complete", "result": result, "updated_at": utc_now_iso(), } - logger.info(f"[JOB {job_id}] done (simplified, 0 masks)") - - # Segmentation-related files (masks, metadata) are skipped in the simplified flow. - pass - + logger.info(f"[JOB {job_id}] done mask_count={mask_count}") except Exception as exc: logger.exception(f"[JOB {job_id}] failed: {exc}") diff --git a/backend/services/inpainting_service.py b/backend/services/inpainting_service.py index 6409dbf0b5d4cd73103fddeef5310887a172eced..476c0190851ae1ef169939a88dc442adddbbf5cd 100644 --- a/backend/services/inpainting_service.py +++ b/backend/services/inpainting_service.py @@ -1,220 +1,28 @@ -import io -import os -import base64 -import openai -from pathlib import Path -from PIL import Image, ImageOps from typing import Any -import numpy as np -from core.config import UPLOAD_DIR, OUTPUT_DIR, logger, utc_now_iso -from services.openai_service import _get_texture_hex +from core.config import utc_now_iso from models.schemas import ApplyTextureAIRequest from services.sam2_service import jobs, jobs_lock -# ─── Descripciones en inglés para el prompt de DALL-E ───────────────────────── -TEXTURE_DESCRIPTIONS = { - "ACM_Amarillo": "bright yellow smooth aluminum composite panel exterior cladding", - "ACM_Azul": "blue aluminum composite panel exterior cladding", - "ACM_Glossy_Black": "glossy black aluminum composite panel exterior cladding", - "ACM_Glossy_Red": "glossy red aluminum composite panel exterior cladding", - "ACM_Grafito": "graphite dark grey aluminum composite panel exterior cladding", - "ACM_Light_Blue": "light sky blue aluminum composite panel exterior cladding", - "ACM_Madera_Clara": "light wood grain aluminum composite panel exterior cladding", - "ACM_Matteblack": "matte black aluminum composite panel exterior cladding", - "ACM_Metalic": "metallic silver brushed aluminum composite panel exterior cladding", - "ACM_MouseGrey": "mouse grey aluminum composite panel exterior cladding", - "ACM_Orange": "orange aluminum composite panel exterior cladding", - "ACM_ROBLE(OAK)": "oak wood grain aluminum composite panel exterior cladding", - "ACM_Verde": "green aluminum composite panel exterior cladding", - "ACM_Verde_HN": "dark forest green aluminum composite panel exterior cladding", - "ACM_Verde_Lima": "lime yellow-green aluminum composite panel exterior cladding", - "ACM_White": "white aluminum composite panel exterior cladding", - "DECK_gris": "grey WPC wood-plastic composite deck boards", - "DECK_madera": "natural wood-look WPC composite deck boards", - "DECK_madera_oscuro": "dark brown WPC composite deck boards", - "WPC_madera_claro": "light beige wood-grain WPC exterior wall cladding", - "WPC_madera_gris": "grey weathered wood-look WPC exterior wall cladding", - "WPC_madera_oscuro": "dark espresso wood-grain WPC exterior wall cladding", - "WPC_negro": "black WPC exterior wall cladding", -} - -def prepare_image_square(pil_img, size=1024): - """ - Ajusta la imagen a un cuadrado de 1024x1024 añadiendo padding - para no deformar la imagen original. - """ - orig_w, orig_h = pil_img.size - ratio = orig_w / orig_h - - if ratio > 1: # Es más ancha que alta (Horizontal) - new_w = size - new_h = int(size / ratio) - padding = (0, (size - new_h) // 2) - else: # Es más alta que ancha (Vertical) - new_h = size - new_w = int(size * ratio) - padding = ((size - new_w) // 2, 0) - - # Redimensionar manteniendo proporción - resized_img = pil_img.resize((new_w, new_h), Image.LANCZOS) - - # Crear fondo cuadrado con transparencia - new_img = Image.new("RGBA", (size, size), (255, 255, 255, 0)) - new_img.paste(resized_img, padding) - - return new_img, padding, (new_w, new_h) def run_inpainting_sync(payload: ApplyTextureAIRequest) -> dict[str, Any]: - """ - Usa DALL-E 2 para editar la imagen de la casa reemplazando las texturas. - Inspirado en la lógica de 'imagneConaI/app.py'. - """ - api_key = os.getenv("OPENAI_API_KEY") - if not api_key: - return {"error": "OpenAI API Key not found in environment"} - - safe_name = Path(payload.filename).name - image_path = UPLOAD_DIR / safe_name - if not image_path.exists(): - image_path = OUTPUT_DIR / safe_name - - if not image_path.exists(): - return {"error": f"Image not found: {payload.filename}"} - - # Determinar descripción de textura - texture_name = payload.texture_name or "ACM_White" - texture_stem = Path(texture_name).stem - texture_desc = TEXTURE_DESCRIPTIONS.get(texture_stem, texture_name) - - # Specs técnicas para el prompt - acm_specs = "" - if texture_stem.startswith("ACM"): - acm_specs = ( - "ACM aluminum composite panel 4mm thick, 0.40mm aluminum layers, " - "panels sized 1.22m x 2.44m, clean precision-cut joints between panels, " - ) - elif "WPC" in texture_stem or "DECK" in texture_stem: - acm_specs = "WPC wood-plastic composite profile boards, " - - try: - client = openai.OpenAI(api_key=api_key) - - pil_img_orig = Image.open(str(image_path)).convert("RGBA") - orig_size = pil_img_orig.size - - square_img, padding, resized_dims = prepare_image_square(pil_img_orig) - - buf = io.BytesIO() - square_img.save(buf, format="PNG") - buf.seek(0) - - # Usar el prompt enviado o generar uno por defecto - prompt = payload.prompt or ( - f"Edit ONLY the exterior wall cladding material of this house. " - f"Replace all facade wall surfaces with {acm_specs}{texture_desc}. " - f"Keep EVERYTHING ELSE exactly the same: the house structure, shape, proportions, " - f"roof, windows, doors, garage, balcony railings, garden, plants, sky and lighting. " - f"Only change the wall surface material. " - f"Result must look like a photorealistic architectural photo. " - f"CRITICAL: Do NOT stylize, do NOT apply artistic filters, do NOT add painterly or CGI effects. " - f"Preserve photographic grain, camera exposure, highlights and shadows, and match original lighting and perspective. " - f"Avoid oversmoothing — keep realistic texture detail and crisp panel edges." - ) - - # If texture file exists, compute representative hex and request exact color match - tex_hex = _get_texture_hex(texture_name or "") if texture_name else None - if tex_hex: - prompt += f" Use the exact color sample {tex_hex} from the reference texture and match its hue, saturation and brightness precisely. Do not alter the color tone." + return { + "message": "Inpainting not configured", + "filename": payload.filename, + "prompt": payload.prompt, + "processing": False, + } - # gpt-image-1 solo acepta 1024x1024 - # If a texture file exists, attach it as a reference image when possible - tex_path = None - if texture_name: - try: - from services.texture_service import resolve_texture_path as _resolve - tex_path = _resolve(texture_name) - except Exception: - tex_path = None - - if tex_path: - try: - with open(tex_path, "rb") as tf: - tex_buf = io.BytesIO(tf.read()) - tex_buf.seek(0) - response = client.images.edit( - model="gpt-image-1", - image=("house.png", buf, "image/png"), - reference_image=(Path(tex_path).name, tex_buf, "image/png"), - prompt=prompt, - n=1, - size="1024x1024", - response_format="b64_json", - ) - except Exception: - response = client.images.edit( - model="gpt-image-1", - image=("house.png", buf, "image/png"), - prompt=prompt, - n=1, - size="1024x1024", - response_format="b64_json", - ) - else: - response = client.images.edit( - model="gpt-image-1", - image=("house.png", buf, "image/png"), - prompt=prompt, - n=1, - size="1024x1024", - response_format="b64_json", - ) - - img_data = base64.b64decode(response.data[0].b64_json) - result_square = Image.open(io.BytesIO(img_data)).convert("RGBA") - - # 2. Recortar el resultado para volver al aspecto original (quitar padding) - left, top = padding - right, bottom = left + resized_dims[0], top + resized_dims[1] - result_cropped = result_square.crop((left, top, right, bottom)) - - # 3. Redimensionar al tamaño original exacto - result = result_cropped.resize(orig_size, Image.LANCZOS).convert("RGB") - - # Return generated result without blending with original image - final = result - - out_filename = f"{Path(safe_name).stem}_ai_{texture_stem}.jpg" - out_path = OUTPUT_DIR / out_filename - final.save(str(out_path), "JPEG", quality=90) - - return { - "message": f"AI Texture applied: {texture_name}", - "filename": out_filename, - "url": f"/seg/ai/{out_filename}", - "processing": False - } - - except Exception as e: - logger.error(f"DALL-E Error: {e}") - return {"error": str(e)} def run_inpainting_job(job_id: str, payload: ApplyTextureAIRequest) -> None: try: result = run_inpainting_sync(payload) with jobs_lock: - if "error" in result: - jobs[job_id] = { - "status": "failed", - "error": result["error"], - "updated_at": utc_now_iso(), - } - else: - jobs[job_id] = { - "status": "done", - "result": result, - "updated_at": utc_now_iso(), - } + jobs[job_id] = { + "status": "done", + "result": result, + "updated_at": utc_now_iso(), + } except Exception as exc: with jobs_lock: jobs[job_id] = { diff --git a/backend/services/sam2_service.py b/backend/services/sam2_service.py index a455a74fde940f78ed21527a7e7caa6c6c6b6f1f..dc729c9e48607fa82e02bb2f52be8542ca98d44a 100644 --- a/backend/services/sam2_service.py +++ b/backend/services/sam2_service.py @@ -112,9 +112,6 @@ def find_sam2_model_path() -> Path: def load_sam2_model() -> None: global sam2_mask_generator, sam2_image_predictor, sam2_load_error - sam2_load_error = "SAM2 disabled (using Simplified OpenAI flow)" - logger.info(f"[SAM2] {sam2_load_error}") - return if not _TORCH_AVAILABLE: sam2_load_error = "torch not installed — SAM2 unavailable (using Gradio Space)" diff --git a/backend/services/texture_service.py b/backend/services/texture_service.py index 61914b709052fd339c9205b052b2da7f2a7e4d5f..70c4d96d96ff16ce0b66e46210abaf64076d8955 100644 --- a/backend/services/texture_service.py +++ b/backend/services/texture_service.py @@ -1,851 +1,851 @@ -import io -import shutil -import uuid -from pathlib import Path -from typing import Any - -import cv2 -import numpy as np -from fastapi import HTTPException -from PIL import Image - -from core.config import ( - OUTPUT_DIR, - TEXTURE_DIR, - UPLOAD_DIR, - UPLOAD_JPEG_QUALITY, - log_timing_end, - log_timing_start, - logger, -) -from models.schemas import ApplyTextureRequest - - -def generate_texture_variations(texture_name: str) -> list[dict[str, str]]: - """ - Genera variaciones de color/brillo/saturación de una textura de referencia usando HSV. - Los archivos se cachean en TEXTURE_DIR/generated/ — si ya existen no se regeneran. - Devuelve lista de {ref, label, preview_url}. - """ - texture_path = resolve_texture_path(texture_name) - generated_dir = TEXTURE_DIR / "generated" - generated_dir.mkdir(parents=True, exist_ok=True) - - tex_pil = load_texture_pil_rgb(texture_path) - tex_bgr = cv2.cvtColor(np.array(tex_pil, dtype=np.uint8), cv2.COLOR_RGB2BGR) - tex_hsv = cv2.cvtColor(tex_bgr, cv2.COLOR_BGR2HSV).astype(np.int32) - - base_stem = Path(texture_name).stem - results: list[dict[str, str]] = [] - - def _save(hsv: np.ndarray, suffix: str, label: str) -> None: - fname = f"{base_stem}__{suffix}.jpg" - out_path = generated_dir / fname - if not out_path.exists(): - bgr = cv2.cvtColor(np.clip(hsv, 0, 255).astype(np.uint8), cv2.COLOR_HSV2BGR) - rgb = cv2.cvtColor(bgr, cv2.COLOR_BGR2RGB) - Image.fromarray(rgb).save(str(out_path), format="JPEG", quality=92, optimize=True) - ref = f"generated/{fname}" - results.append({"ref": ref, "label": label, "preview_url": f"/seg/texture-preview/{ref}"}) - - # Rotaciones de tono: 12 pasos de 30° recorriendo el círculo cromático - # En OpenCV HSV, H ∈ [0,179] → shift en grados / 2 - for deg, label in [ - (30, "Naranja"), - (60, "Amarillo"), - (90, "Verde lima"), - (120, "Verde"), - (150, "Verde agua"), - (165, "Cyan"), - (180, "Azul cielo"), - (210, "Azul"), - (240, "Índigo"), - (270, "Violeta"), - (300, "Magenta"), - (330, "Rosa"), - ]: - v = tex_hsv.copy() - v[:, :, 0] = (v[:, :, 0] + deg // 2) % 180 - _save(v, f"hue{deg}", label) - - # Variaciones de brillo - for factor, label, suffix in [ - (0.45, "Oscuro", "dark"), - (1.55, "Claro", "light"), - ]: - v = tex_hsv.copy() - v[:, :, 2] = np.clip(v[:, :, 2] * factor, 0, 255) - _save(v, suffix, label) - - # Variaciones de saturación - for factor, label, suffix in [ - (0.0, "Gris", "gray"), - (0.45, "Apagado", "muted"), - (1.75, "Vívido", "vivid"), - ]: - v = tex_hsv.copy() - v[:, :, 1] = np.clip(v[:, :, 1] * factor, 0, 255) - _save(v, suffix, label) - - return results - - -def list_available_textures() -> list[str]: - allowed = {".jpg", ".jpeg", ".png", ".webp", ".bmp", ".tif", ".tiff", ".exr"} - return [ - str(path.relative_to(TEXTURE_DIR)).replace("\\", "/") - for path in sorted(TEXTURE_DIR.rglob("*")) - if path.is_file() and path.suffix.lower() in allowed - ] - - -def resolve_texture_path(texture_name: str) -> Path: - if not texture_name: - raise HTTPException(status_code=400, detail="Invalid texture_name") - - normalized = texture_name.replace("\\", "/").strip("/") - candidate = (TEXTURE_DIR / normalized).resolve() - base = TEXTURE_DIR.resolve() - - try: - candidate.relative_to(base) - except ValueError as exc: - raise HTTPException(status_code=400, detail="Invalid texture_name") from exc - - if not candidate.exists() or not candidate.is_file(): - raise HTTPException(status_code=404, detail=f"Texture not found: {normalized}") - - return candidate - - -def build_texture_preview_jpeg(texture_path: Path, max_size: int = 320) -> bytes: - pil_img = load_texture_pil_rgb(texture_path) - pil_img.thumbnail((max_size, max_size), Image.Resampling.LANCZOS) - out = io.BytesIO() - pil_img.save(out, format="JPEG", quality=88, optimize=True) - return out.getvalue() - - -def load_texture_pil_rgb(texture_path: Path) -> Image.Image: - suffix = texture_path.suffix.lower() - - if suffix != ".exr": - try: - return Image.open(str(texture_path)).convert("RGB") - except Exception as exc: - raise HTTPException(status_code=500, detail=f"Could not read texture file: {exc}") from exc - - exr = cv2.imread(str(texture_path), cv2.IMREAD_UNCHANGED) - if exr is None: - raise HTTPException(status_code=500, detail="Could not decode EXR texture") - - if exr.ndim == 2: - exr = np.stack([exr, exr, exr], axis=-1) - if exr.ndim != 3: - raise HTTPException(status_code=500, detail="EXR texture has unsupported shape") - if exr.shape[2] > 3: - exr = exr[:, :, :3] - - exr = np.nan_to_num(exr, nan=0.0, posinf=0.0, neginf=0.0) - exr = np.maximum(exr, 0) - - if np.issubdtype(exr.dtype, np.floating): - scale = float(np.percentile(exr, 99.0)) - if scale <= 1e-8: - scale = float(np.max(exr)) - if scale <= 1e-8: - scale = 1.0 - img = np.clip(exr / scale, 0.0, 1.0) - img = np.power(img, 1.0 / 2.2) - img_u8 = (img * 255.0).astype(np.uint8) - elif exr.dtype == np.uint16: - img_u8 = (exr / 257.0).astype(np.uint8) - else: - img_u8 = np.clip(exr, 0, 255).astype(np.uint8) - - img_rgb = cv2.cvtColor(img_u8, cv2.COLOR_BGR2RGB) - return Image.fromarray(img_rgb).convert("RGB") - - -def estimate_mask_orientation_degrees(binary_mask: np.ndarray) -> float: - mask_u8 = (binary_mask > 0).astype(np.uint8) - contours, _ = cv2.findContours(mask_u8, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE) - if not contours: - return 0.0 - - largest = max(contours, key=cv2.contourArea) - if cv2.contourArea(largest) < 25.0: - return 0.0 - - rect = cv2.minAreaRect(largest) - (_, _), (width, height), angle = rect - - dominant_angle = float(angle) - if width < height: - dominant_angle += 90.0 - - dominant_angle %= 180.0 - return dominant_angle - - -def _compute_trapezoid_score_from_mask( - binary_mask: np.ndarray, - ys: np.ndarray, - xs: np.ndarray, - min_y: int, - max_y: int, - bbox_h: int, -) -> float: - """Return 0..1 indicating how floor-like (wider at bottom) the mask shape is.""" - quarter = max(1, bbox_h // 4) - top_xs = xs[ys <= (min_y + quarter)] - bot_xs = xs[ys >= (max_y - quarter)] - if len(top_xs) < 3 or len(bot_xs) < 3: - return 0.0 - top_w = float(top_xs.max() - top_xs.min()) - bot_w = float(bot_xs.max() - bot_xs.min()) - if top_w < 5.0: - return 1.0 if bot_w > 20.0 else 0.0 - ratio = bot_w / top_w - return float(np.clip((ratio - 1.0) / 1.8, 0.0, 1.0)) - - -def _sort_quad_corners(pts: np.ndarray) -> np.ndarray: - """Sort 4 points into [TL, TR, BR, BL] order.""" - result = np.zeros((4, 2), dtype=np.float32) - s = pts[:, 0] + pts[:, 1] - d = pts[:, 0] - pts[:, 1] - result[0] = pts[np.argmin(s)] - result[1] = pts[np.argmax(d)] - result[2] = pts[np.argmax(s)] - result[3] = pts[np.argmin(d)] - return result - - -def _extract_mask_quad(binary_mask: np.ndarray) -> np.ndarray | None: - """Approximate mask as 4-corner polygon sorted [TL, TR, BR, BL], or None.""" - mask_u8 = (binary_mask > 0).astype(np.uint8) - contours, _ = cv2.findContours(mask_u8, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE) - if not contours: - return None - largest = max(contours, key=cv2.contourArea) - if cv2.contourArea(largest) < 400.0: - return None - hull = cv2.convexHull(largest) - peri = cv2.arcLength(hull, True) - for eps_frac in (0.03, 0.05, 0.08, 0.10, 0.13): - approx = cv2.approxPolyDP(hull, eps_frac * peri, True) - if len(approx) == 4: - return _sort_quad_corners(approx.reshape(4, 2).astype(np.float32)) - return None - - -def _tile_texture_perspective( - tex_pil: Image.Image, - quad: np.ndarray, - image_width: int, - image_height: int, -) -> Image.Image | None: - """ - Tile texture with perspective correction for a floor surface. - quad: [TL, TR, BR, BL] in image coordinates. - Returns full-image-size PIL image with warped tiled texture, or None on failure. - Pixels outside the perspective quad are filled with regular tiling to avoid black gaps. - """ - tl, tr, br, bl = quad - bot_w = float(np.linalg.norm(br.astype(float) - bl.astype(float))) - top_w = float(np.linalg.norm(tr.astype(float) - tl.astype(float))) - left_h = float(np.linalg.norm(bl.astype(float) - tl.astype(float))) - right_h = float(np.linalg.norm(br.astype(float) - tr.astype(float))) - rect_w = min(int(max(bot_w, top_w)) + 1, image_width * 2) - rect_h = min(int(max(left_h, right_h)) + 1, image_height * 2) - if rect_w < 8 or rect_h < 8: - return None - tex_arr = np.array(tex_pil.convert("RGB"), dtype=np.uint8) - th, tw = tex_arr.shape[:2] - if tw < 1 or th < 1: - return None - rect_tiled = np.zeros((rect_h, rect_w, 3), dtype=np.uint8) - for ry in range(0, rect_h, th): - for rx in range(0, rect_w, tw): - py = min(th, rect_h - ry) - px = min(tw, rect_w - rx) - rect_tiled[ry : ry + py, rx : rx + px] = tex_arr[:py, :px] - src_pts = np.array( - [[0.0, 0.0], [float(rect_w - 1), 0.0], [float(rect_w - 1), float(rect_h - 1)], [0.0, float(rect_h - 1)]], - dtype=np.float32, - ) - dst_pts = quad.astype(np.float32) - try: - H = cv2.getPerspectiveTransform(src_pts, dst_pts) - warped = cv2.warpPerspective(rect_tiled, H, (image_width, image_height)) - # Mapa de cobertura: píxeles realmente cubiertos por el warp - cov_src = np.ones((rect_h, rect_w), dtype=np.uint8) * 255 - coverage = cv2.warpPerspective(cov_src, H, (image_width, image_height)) - except cv2.error: - return None - - # Rellenar píxeles sin cobertura (fuera del quad) con tiling regular - # para evitar espacios negros donde la máscara supera el quad aproximado - regular = np.zeros((image_height, image_width, 3), dtype=np.uint8) - for ry in range(0, image_height, th): - for rx in range(0, image_width, tw): - py = min(th, image_height - ry) - px = min(tw, image_width - rx) - regular[ry : ry + py, rx : rx + px] = tex_arr[:py, :px] - - uncovered = coverage < 128 - warped[uncovered] = regular[uncovered] - - return Image.fromarray(warped) - - -def classify_texture_material(texture_name: str) -> str: - texture_key = texture_name.lower() - if "acm" in texture_key or "wpc" in texture_key: - return "acm" - if any(hint in texture_key for hint in ("deck", "wood", "plank", "laminate", "floor")): - return "wood" - if any(hint in texture_key for hint in ("marble", "granite", "tile", "brick", "cobblestone", "stone", "cartago", "riverbed")): - return "stone" - if any(hint in texture_key for hint in ("metal", "rust", "iron", "steel")): - return "metal" - return "generic" - - -def infer_surface_type_and_direction( - binary_mask: np.ndarray, - image_width: int, - image_height: int, - texture_name: str, -) -> tuple[str, float, float, int]: - mask_u8 = (binary_mask > 0).astype(np.uint8) - ys, xs = np.where(mask_u8 > 0) - if ys.size == 0 or xs.size == 0: - return ("wall", 0.0, 0.78, max(180, image_width // 4)) - - min_x, max_x = int(xs.min()), int(xs.max()) - min_y, max_y = int(ys.min()), int(ys.max()) - bbox_w = max(1, max_x - min_x + 1) - bbox_h = max(1, max_y - min_y + 1) - aspect = bbox_w / max(1.0, float(bbox_h)) - center_y = float(ys.mean()) / max(1.0, float(image_height)) - dominant_angle = estimate_mask_orientation_degrees(binary_mask) - material = classify_texture_material(texture_name) - - # Trapezoid score: floor in perspective is wider at the bottom than the top - trapezoid_score = _compute_trapezoid_score_from_mask(binary_mask, ys, xs, min_y, max_y, bbox_h) - - is_ceiling = center_y < 0.26 and aspect > 1.35 - # Floor: low center + trapezoidal shape, OR clearly low + wide - is_floor = ( - (center_y > 0.55 and aspect >= 0.9 and trapezoid_score > 0.30) - or (center_y > 0.68 and aspect > 1.15) - ) - - if is_ceiling: - surface_type = "ceiling" - angle = 0.0 - blend_alpha = 0.58 - tile_width = max(128, image_width // 5) - elif is_floor: - if material == "wood": - surface_type = "deck" - angle = dominant_angle if 8.0 <= dominant_angle <= 172.0 else 0.0 - blend_alpha = 0.82 - tile_width = max(320, int(bbox_w * 0.95), image_width // 2) - else: - surface_type = "floor" - angle = 0.0 - blend_alpha = 0.80 - # ACM floor: ~3 large-format panels visible on the near edge - tile_width = max(200, int(bbox_w * 0.35)) if material == "acm" else max(144, image_width // 3) - else: - surface_type = "wall" - angle = 0.0 - if material == "acm": - blend_alpha = 0.78 - # ACM wall panels: ~3 panels across the surface width - tile_width = max(180, int(bbox_w * 0.33)) - elif material == "wood": - blend_alpha = 0.70 - tile_width = max(220, int(bbox_w * 0.55), image_width // 4) - elif material == "stone": - blend_alpha = 0.84 - tile_width = max(128, image_width // 4) - else: - blend_alpha = 0.66 - tile_width = max(128, image_width // 4) - - return (surface_type, float(angle % 180.0), float(blend_alpha), int(tile_width)) - - -def choose_auto_texture_settings(material: str, surface_type: str) -> tuple[float, float, float]: - strength_map = {"acm": 0.98, "stone": 0.96, "wood": 0.88, "metal": 0.91, "generic": 0.9} - intensity_map = {"acm": 0.08, "stone": 0.36, "wood": 0.3, "metal": 0.34, "generic": 0.32} - - strength = float(strength_map.get(material, 0.9)) - intensity = float(intensity_map.get(material, 0.32)) - - if surface_type in {"wall", "facade"}: - strength += 0.02 - angle = 28.0 - elif surface_type in {"roof"}: - angle = 42.0 - intensity += 0.03 - elif surface_type in {"floor", "deck"}: - angle = 24.0 - intensity += 0.02 - else: - angle = 35.0 - - return ( - float(np.clip(strength, 0.55, 0.99)), - float(angle % 360.0), - float(np.clip(intensity, 0.0, 1.0)), - ) - - -def build_feather_mask(binary_mask: np.ndarray, sigma: float = 2.2) -> np.ndarray: - mask = (binary_mask > 0).astype(np.float32) - if mask.max() <= 0: - return mask - feather = cv2.GaussianBlur(mask, (0, 0), sigmaX=sigma, sigmaY=sigma) - return np.clip(feather, 0.0, 1.0) - - -def build_scene_luminance_map(orig_rgb: np.ndarray) -> np.ndarray: - orig_u8 = orig_rgb.astype(np.uint8) - orig_lab = cv2.cvtColor(orig_u8, cv2.COLOR_RGB2LAB).astype(np.float32) - l_channel = orig_lab[:, :, 0] / 255.0 - broad_light = cv2.GaussianBlur(l_channel, (0, 0), sigmaX=18.0, sigmaY=18.0) - local_detail = l_channel - cv2.GaussianBlur(l_channel, (0, 0), sigmaX=4.0, sigmaY=4.0) - light_map = 0.82 + (broad_light * 0.36) + (local_detail * 0.18) - return np.clip(light_map, 0.72, 1.22) - - -def build_texture_relief_map(tex_rgb: np.ndarray, material: str = "generic") -> np.ndarray: - tex_u8 = tex_rgb.astype(np.uint8) - tex_gray = cv2.cvtColor(tex_u8, cv2.COLOR_RGB2GRAY).astype(np.float32) / 255.0 - micro_relief = tex_gray - cv2.GaussianBlur(tex_gray, (0, 0), sigmaX=3.0, sigmaY=3.0) - - relief_scale = {"acm": 0.35, "stone": 2.8, "wood": 2.2, "metal": 1.8}.get(material, 2.0) - return np.clip(micro_relief * relief_scale, -1.0, 1.0) - - -def build_directional_light_map( - tex_rgb: np.ndarray, - material: str, - light_angle_degrees: float, - light_intensity: float, -) -> np.ndarray: - tex_u8 = tex_rgb.astype(np.uint8) - tex_gray = cv2.cvtColor(tex_u8, cv2.COLOR_RGB2GRAY).astype(np.float32) / 255.0 - height_map = cv2.GaussianBlur(tex_gray, (0, 0), sigmaX=1.4, sigmaY=1.4) - grad_x = cv2.Sobel(height_map, cv2.CV_32F, 1, 0, ksize=3) - grad_y = cv2.Sobel(height_map, cv2.CV_32F, 0, 1, ksize=3) - - relief_scale = {"acm": 0.45, "stone": 3.0, "wood": 2.4, "metal": 1.6}.get(material, 2.0) - - nx = -grad_x * relief_scale - ny = -grad_y * relief_scale - nz = np.ones_like(nx, dtype=np.float32) - norm = np.sqrt((nx * nx) + (ny * ny) + (nz * nz)) + 1e-6 - nx = nx / norm - ny = ny / norm - nz = nz / norm - - theta = np.deg2rad(float(light_angle_degrees)) - lx = float(np.cos(theta)) - ly = float(-np.sin(theta)) - lz = 0.82 - light_norm = max(1e-6, float(np.sqrt((lx * lx) + (ly * ly) + (lz * lz)))) - lx /= light_norm - ly /= light_norm - lz /= light_norm - - diffuse = np.clip((nx * lx) + (ny * ly) + (nz * lz), 0.0, 1.0) - strength = float(np.clip(light_intensity, 0.0, 1.0)) - if material == "acm": - return np.clip(0.97 + (diffuse * (0.03 + (0.12 * strength))), 0.95, 1.12) - return np.clip(0.86 + (diffuse * (0.14 + (0.60 * strength))), 0.72, 1.35) - - -def build_mask_edge_occlusion(binary_mask: np.ndarray, light_intensity: float) -> np.ndarray: - mask_u8 = (binary_mask > 0).astype(np.uint8) - if mask_u8.max() == 0: - return np.ones(mask_u8.shape, dtype=np.float32) - - distance = cv2.distanceTransform(mask_u8, cv2.DIST_L2, 5).astype(np.float32) - inner_values = distance[mask_u8 > 0] - if inner_values.size == 0: - return np.ones(mask_u8.shape, dtype=np.float32) - - max_distance = max(1.0, float(np.percentile(inner_values, 95))) - normalized = np.clip(distance / (max_distance * 0.16), 0.0, 1.0) - edge_strength = 1.0 - normalized - occlusion = 1.0 - (edge_strength * (0.04 + (0.08 * float(np.clip(light_intensity, 0.0, 1.0))))) - occlusion[mask_u8 == 0] = 1.0 - return np.clip(occlusion, 0.88, 1.0) - - -def apply_surface_lighting( - tex_rgb: np.ndarray, - orig_rgb: np.ndarray, - binary_mask: np.ndarray, - material: str, - lighting_mode: str, - light_angle_degrees: float, - light_intensity: float, -) -> np.ndarray: - scene_light = build_scene_luminance_map(orig_rgb) - directional_light = build_directional_light_map(tex_rgb, material, light_angle_degrees, light_intensity) - relief_map = build_texture_relief_map(tex_rgb, material) - edge_occlusion = build_mask_edge_occlusion(binary_mask, light_intensity) - - if material == "acm": - if lighting_mode == "directional": - light_map = directional_light - elif lighting_mode == "flat": - light_map = np.ones(scene_light.shape, dtype=np.float32) - else: - # 45 % scene luminance so ACM panels inherit shadows/gradients from photo - light_map = (scene_light * 0.45) + (directional_light * 0.55) - elif lighting_mode == "directional": - light_map = directional_light - elif lighting_mode == "flat": - light_map = np.ones(scene_light.shape, dtype=np.float32) - else: - light_map = (scene_light * 0.78) + (directional_light * 0.22) - - detail_scale = 0.02 + (0.05 * float(np.clip(light_intensity, 0.0, 1.0))) if material == "acm" else 0.08 + (0.18 * float(np.clip(light_intensity, 0.0, 1.0))) - detail_boost = 1.0 + (relief_map * detail_scale) - enhanced = tex_rgb.astype(np.float32) - enhanced *= light_map[:, :, None] - enhanced *= detail_boost[:, :, None] - enhanced *= edge_occlusion[:, :, None] - return np.clip(enhanced, 0, 255).astype(np.uint8) - - -def blend_texture_preserve_shading( - orig_rgb: np.ndarray, - tex_rgb: np.ndarray, - alpha_mask: np.ndarray, - blend_alpha: float, - material: str = "generic", -) -> np.ndarray: - orig_u8 = orig_rgb.astype(np.uint8) - tex_u8 = tex_rgb.astype(np.uint8) - - orig_lab = cv2.cvtColor(orig_u8, cv2.COLOR_RGB2LAB).astype(np.float32) - tex_lab = cv2.cvtColor(tex_u8, cv2.COLOR_RGB2LAB).astype(np.float32) - - mixed_lab = tex_lab.copy() - if material == "acm": - # 30 % original luminance → panels inherit scene shadows while keeping panel colour - mixed_lab[:, :, 0] = (0.30 * orig_lab[:, :, 0]) + (0.70 * tex_lab[:, :, 0]) - mixed_lab[:, :, 1] = (0.97 * tex_lab[:, :, 1]) + (0.03 * orig_lab[:, :, 1]) - mixed_lab[:, :, 2] = (0.97 * tex_lab[:, :, 2]) + (0.03 * orig_lab[:, :, 2]) - elif material == "wood": - mixed_lab[:, :, 0] = (0.78 * orig_lab[:, :, 0]) + (0.22 * tex_lab[:, :, 0]) - mixed_lab[:, :, 1] = (0.9 * tex_lab[:, :, 1]) + (0.1 * orig_lab[:, :, 1]) - mixed_lab[:, :, 2] = (0.9 * tex_lab[:, :, 2]) + (0.1 * orig_lab[:, :, 2]) - elif material == "stone": - orig_l_base = cv2.GaussianBlur(orig_lab[:, :, 0], (0, 0), sigmaX=11.0, sigmaY=11.0) - mixed_lab[:, :, 0] = (0.18 * orig_l_base) + (0.82 * tex_lab[:, :, 0]) - mixed_lab[:, :, 1] = (0.95 * tex_lab[:, :, 1]) + (0.05 * orig_lab[:, :, 1]) - mixed_lab[:, :, 2] = (0.95 * tex_lab[:, :, 2]) + (0.05 * orig_lab[:, :, 2]) - else: - mixed_lab[:, :, 0] = orig_lab[:, :, 0] - mixed_lab[:, :, 1] = (0.8 * tex_lab[:, :, 1]) + (0.2 * orig_lab[:, :, 1]) - mixed_lab[:, :, 2] = (0.8 * tex_lab[:, :, 2]) + (0.2 * orig_lab[:, :, 2]) - - shaded_tex = cv2.cvtColor(np.clip(mixed_lab, 0, 255).astype(np.uint8), cv2.COLOR_LAB2RGB).astype(np.float32) - if material == "wood": - tex_gray = cv2.cvtColor(tex_u8, cv2.COLOR_RGB2GRAY).astype(np.float32) - tex_base = cv2.GaussianBlur(tex_gray, (0, 0), sigmaX=9.0, sigmaY=9.0) - tex_detail = np.clip((tex_gray - tex_base) / 255.0, -0.35, 0.35) - shaded_tex *= (1.0 + (tex_detail[:, :, None] * 0.28)) - - alpha = np.clip(alpha_mask[:, :, None] * float(blend_alpha), 0.0, 1.0) - composite = (orig_rgb * (1.0 - alpha)) + (shaded_tex * alpha) - return np.clip(composite, 0, 255).astype(np.uint8) - - -def blend_texture_direct( - orig_rgb: np.ndarray, - tex_rgb: np.ndarray, - alpha_mask: np.ndarray, - blend_alpha: float, -) -> np.ndarray: - alpha = np.clip(alpha_mask[:, :, None] * float(blend_alpha), 0.0, 1.0) - composite = (orig_rgb * (1.0 - alpha)) + (tex_rgb * alpha) - return np.clip(composite, 0, 255).astype(np.uint8) - - -def apply_local_texture_sync(payload: ApplyTextureRequest) -> dict[str, Any]: - step = "APPLY_TEXTURE" - started = log_timing_start(step) - try: - safe_name = Path(payload.filename).name - if not safe_name: - raise HTTPException(status_code=400, detail="Invalid filename") - - label_safe_name = Path(payload.original_filename).name if payload.original_filename else safe_name - - image_path = UPLOAD_DIR / safe_name - if not image_path.exists() or not image_path.is_file(): - image_path = OUTPUT_DIR / safe_name - - if (not image_path.exists() or not image_path.is_file()) and payload.original_filename: - orig_name = Path(payload.original_filename).name - image_path = UPLOAD_DIR / orig_name - if not image_path.exists() or not image_path.is_file(): - image_path = OUTPUT_DIR / orig_name - - if not image_path.exists() or not image_path.is_file(): - raise HTTPException( - status_code=404, - detail=f"Image not found: {safe_name} (also tried original: {payload.original_filename or 'n/a'})", - ) - - masks_dir = UPLOAD_DIR / "masks" - masks_dir.mkdir(exist_ok=True) - label_owner = Path(image_path).stem - label_path = masks_dir / f"{label_owner}_labels.png" - if not label_path.exists() and payload.original_filename: - alt_owner = Path(payload.original_filename).name - alt_label = masks_dir / f"{alt_owner}_labels.png" - if alt_label.exists(): - label_path = alt_label - - if not label_path.exists(): - raise HTTPException( - status_code=404, - detail=f"Label map not found for {label_owner}. Upload/segment the image first.", - ) - - if not payload.mask_indices: - raise HTTPException(status_code=400, detail="No mask indices provided") - - texture_path = resolve_texture_path(payload.texture_name) - orig_pil = Image.open(str(image_path)).convert("RGB") - width, height = orig_pil.size - - label_map = cv2.imread(str(label_path), cv2.IMREAD_GRAYSCALE) - if label_map is None: - raise HTTPException(status_code=500, detail="Could not read label map") - - binary_mask = np.zeros((label_map.shape[0], label_map.shape[1]), dtype=np.uint8) - for idx in payload.mask_indices: - binary_mask |= (label_map == idx).astype(np.uint8) - - if binary_mask.max() == 0: - raise HTTPException(status_code=400, detail="None of the selected segments were found in the label map.") - - direction_mode = str(payload.direction_mode or "auto").strip().lower() - if direction_mode not in {"auto", "manual", "none"}: - raise HTTPException(status_code=400, detail="Invalid direction_mode. Use auto, manual, or none.") - - replace_mode = str(getattr(payload, "replace_mode", "realistic") or "realistic").strip().lower() - lighting_mode = str(getattr(payload, "lighting_mode", "scene") or "scene").strip().lower() - - material = classify_texture_material(payload.texture_name) - surface_type, inferred_angle, blend_alpha, target_w = infer_surface_type_and_direction( - binary_mask, width, height, payload.texture_name, - ) - replace_strength, light_angle_degrees, light_intensity = choose_auto_texture_settings(material, surface_type) - effective_alpha = float(np.clip(blend_alpha * (0.55 + (0.75 * replace_strength)), 0.0, 0.98)) - if material == "acm": - effective_alpha = float(max(effective_alpha, 0.92)) - - applied_angle = 0.0 - if direction_mode == "auto": - applied_angle = inferred_angle - elif direction_mode == "manual": - applied_angle = float(payload.angle_degrees) - - tex_pil = load_texture_pil_rgb(texture_path) - - # Escalar al tamaño de tile deseado ANTES de rotar - tex_w, tex_h = tex_pil.size - scale = target_w / max(1, tex_w) - if abs(scale - 1.0) > 0.05: - tex_pil = tex_pil.resize( - (max(1, int(tex_w * scale)), max(1, int(tex_h * scale))), - Image.Resampling.LANCZOS, - ) - tex_w, tex_h = tex_pil.size - - tiled: Image.Image | None = None - - # Floor surfaces: perspective tiling solo cuando la perspectiva es fuerte. - # Para pisos de dormitorio/habitación (perspectiva suave) el quad aproximado - # no cubre bien el mask irregular → produce negro. Se usa tiling regular en esos casos. - if surface_type == "floor" and direction_mode in {"auto", "none"}: - ys_m, xs_m = np.where(binary_mask > 0) - if ys_m.size > 0: - min_y_m, max_y_m = int(ys_m.min()), int(ys_m.max()) - bbox_h_m = max(1, max_y_m - min_y_m + 1) - trap_score = _compute_trapezoid_score_from_mask( - binary_mask, ys_m, xs_m, min_y_m, max_y_m, bbox_h_m - ) - if trap_score > 0.35: - quad = _extract_mask_quad(binary_mask) - if quad is not None: - tiled = _tile_texture_perspective(tex_pil, quad, width, height) - if tiled is not None: - logger.info(f"[APPLY_TEXTURE] perspective floor tiling applied (trap={trap_score:.2f})") - else: - logger.info(f"[APPLY_TEXTURE] flat floor tiling (trap={trap_score:.2f} < 0.35, skip perspective)") - - # Wall / ceiling surfaces: perspective tiling cuando el quad es significativamente - # no-rectangular (pared fotografiada en ángulo). Un ratio > 1.20 entre lado mayor - # y lado menor indica distorsión perspectiva visible. - if surface_type in {"wall", "ceiling"} and tiled is None and direction_mode in {"auto", "none"}: - quad = _extract_mask_quad(binary_mask) - if quad is not None: - tl, tr, br, bl = quad - top_w = float(np.linalg.norm(tr.astype(float) - tl.astype(float))) - bot_w = float(np.linalg.norm(br.astype(float) - bl.astype(float))) - left_h = float(np.linalg.norm(bl.astype(float) - tl.astype(float))) - right_h = float(np.linalg.norm(br.astype(float) - tr.astype(float))) - w_ratio = max(top_w, bot_w) / max(1.0, min(top_w, bot_w)) - h_ratio = max(left_h, right_h) / max(1.0, min(left_h, right_h)) - if w_ratio > 1.20 or h_ratio > 1.20: - tiled = _tile_texture_perspective(tex_pil, quad, width, height) - if tiled is not None: - logger.info( - f"[APPLY_TEXTURE] perspective wall tiling applied " - f"(w_ratio={w_ratio:.2f}, h_ratio={h_ratio:.2f})" - ) - - if tiled is None: - if abs(applied_angle) > 0.01: - # Tile on a large canvas first, then rotate the full canvas to avoid black corners - diag = int(np.ceil(np.sqrt(width ** 2 + height ** 2))) + max(tex_w, tex_h) - large_w = width + diag - large_h = height + diag - large = Image.new("RGB", (large_w, large_h)) - for y in range(0, large_h, tex_h): - for x in range(0, large_w, tex_w): - large.paste(tex_pil, (x, y)) - large = large.rotate(-applied_angle, resample=Image.Resampling.BICUBIC, expand=False) - cx = (large_w - width) // 2 - cy = (large_h - height) // 2 - tiled = large.crop((cx, cy, cx + width, cy + height)) - else: - tiled = Image.new("RGB", (width, height)) - for y in range(0, height, tex_h): - for x in range(0, width, tex_w): - tiled.paste(tex_pil, (x, y)) - - orig_u8 = np.array(orig_pil, dtype=np.uint8) - - try: - if bool(getattr(payload, "clear_mask_before_apply", False)): - orig_candidate = None - if payload.original_filename: - cand = UPLOAD_DIR / Path(payload.original_filename).name - if cand.exists() and cand.is_file(): - orig_candidate = cand - else: - cand2 = OUTPUT_DIR / Path(payload.original_filename).name - if cand2.exists() and cand2.is_file(): - orig_candidate = cand2 - if orig_candidate is None: - stem = Path(image_path).stem - if "_edit_" in stem: - base_name = stem.split("_edit_")[0] + ".jpg" - cand = UPLOAD_DIR / base_name - if cand.exists() and cand.is_file(): - orig_candidate = cand - else: - cand2 = OUTPUT_DIR / base_name - if cand2.exists() and cand2.is_file(): - orig_candidate = cand2 - - if orig_candidate is not None: - try: - base_pil = Image.open(str(orig_candidate)).convert("RGB") - if base_pil.size != (width, height): - base_pil = base_pil.resize((width, height), Image.Resampling.LANCZOS) - base_arr = np.array(base_pil, dtype=np.uint8) - mask_bool = (binary_mask > 0) - orig_u8[mask_bool] = base_arr[mask_bool] - logger.info(f"[APPLY_TEXTURE] cleared mask from original source: {orig_candidate}") - except Exception: - logger.exception("Failed to restore original pixels for clear_mask_before_apply") - except Exception: - logger.exception("Error handling clear_mask_before_apply") - - tiled_arr = np.array(tiled, dtype=np.uint8) - - # Parchar píxeles muy oscuros (suma R+G+B < 20) dentro de la máscara. - # Cubren tanto negro exacto (0,0,0) como píxeles casi negros que el warp - # de perspectiva puede generar en bordes del quad o zonas sin cobertura. - mask_bool = binary_mask > 0 - dark_in_mask = mask_bool & (tiled_arr.sum(axis=2) < 20) - if dark_in_mask.any(): - th_f, tw_f = tex_pil.size[1], tex_pil.size[0] - tex_np = np.array(tex_pil, dtype=np.uint8) - ys_b, xs_b = np.where(dark_in_mask) - tiled_arr[ys_b, xs_b] = tex_np[ys_b % th_f, xs_b % tw_f] - - lit_tex = apply_surface_lighting( - tiled_arr, - orig_u8, - binary_mask, - material, - lighting_mode, - light_angle_degrees, - light_intensity, - ) - - orig_arr = orig_u8.astype(np.float32) - tex_arr = lit_tex.astype(np.float32) - - if replace_mode in {"hard", "absolute", "force", "replace"}: - mask_bool = (binary_mask > 0).astype(bool) - composite_arr = orig_arr.copy() - composite_arr[mask_bool] = tex_arr[mask_bool] - composite = np.clip(composite_arr, 0, 255).astype(np.uint8) - else: - feather_mask = build_feather_mask(binary_mask) - # All materials use shading-preservation so scene luminance (shadows/highlights) - # from the original photo is transferred onto the texture. - composite = blend_texture_preserve_shading(orig_arr, tex_arr, feather_mask, effective_alpha, material) - - input_stem = Path(image_path).stem - edit_suffix = uuid.uuid4().hex[:8] - out_filename = f"{input_stem}_edit_{edit_suffix}.jpg" - out_path = UPLOAD_DIR / out_filename - Image.fromarray(composite).save(str(out_path), format="JPEG", quality=UPLOAD_JPEG_QUALITY, optimize=True) - - try: - out_label_path = masks_dir / f"{Path(out_filename).stem}_labels.png" - if label_path.exists(): - shutil.copyfile(str(label_path), str(out_label_path)) - except Exception: - logger.exception("Failed to copy label map for output image") - - return { - "message": "Texture applied successfully", - "original": safe_name, - "mask_indices": payload.mask_indices, - "texture_name": payload.texture_name, - "material": material, - "direction_mode": direction_mode, - "surface_type": surface_type, - "replace_mode": replace_mode, - "replace_strength": round(replace_strength, 3), - "lighting_mode": lighting_mode, - "light_angle_degrees": round(light_angle_degrees, 2), - "light_intensity": round(light_intensity, 3), - "blend_alpha": round(effective_alpha, 3), - "applied_angle_degrees": round(applied_angle, 2), - "output_filename": out_filename, - "output_url": f"/seg/image/{out_filename}", - } - finally: - log_timing_end(step, started) +import io +import shutil +import uuid +from pathlib import Path +from typing import Any + +import cv2 +import numpy as np +from fastapi import HTTPException +from PIL import Image + +from core.config import ( + OUTPUT_DIR, + TEXTURE_DIR, + UPLOAD_DIR, + UPLOAD_JPEG_QUALITY, + log_timing_end, + log_timing_start, + logger, +) +from models.schemas import ApplyTextureRequest + + +def generate_texture_variations(texture_name: str) -> list[dict[str, str]]: + """ + Genera variaciones de color/brillo/saturación de una textura de referencia usando HSV. + Los archivos se cachean en TEXTURE_DIR/generated/ — si ya existen no se regeneran. + Devuelve lista de {ref, label, preview_url}. + """ + texture_path = resolve_texture_path(texture_name) + generated_dir = TEXTURE_DIR / "generated" + generated_dir.mkdir(parents=True, exist_ok=True) + + tex_pil = load_texture_pil_rgb(texture_path) + tex_bgr = cv2.cvtColor(np.array(tex_pil, dtype=np.uint8), cv2.COLOR_RGB2BGR) + tex_hsv = cv2.cvtColor(tex_bgr, cv2.COLOR_BGR2HSV).astype(np.int32) + + base_stem = Path(texture_name).stem + results: list[dict[str, str]] = [] + + def _save(hsv: np.ndarray, suffix: str, label: str) -> None: + fname = f"{base_stem}__{suffix}.jpg" + out_path = generated_dir / fname + if not out_path.exists(): + bgr = cv2.cvtColor(np.clip(hsv, 0, 255).astype(np.uint8), cv2.COLOR_HSV2BGR) + rgb = cv2.cvtColor(bgr, cv2.COLOR_BGR2RGB) + Image.fromarray(rgb).save(str(out_path), format="JPEG", quality=92, optimize=True) + ref = f"generated/{fname}" + results.append({"ref": ref, "label": label, "preview_url": f"/seg/texture-preview/{ref}"}) + + # Rotaciones de tono: 12 pasos de 30° recorriendo el círculo cromático + # En OpenCV HSV, H ∈ [0,179] → shift en grados / 2 + for deg, label in [ + (30, "Naranja"), + (60, "Amarillo"), + (90, "Verde lima"), + (120, "Verde"), + (150, "Verde agua"), + (165, "Cyan"), + (180, "Azul cielo"), + (210, "Azul"), + (240, "Índigo"), + (270, "Violeta"), + (300, "Magenta"), + (330, "Rosa"), + ]: + v = tex_hsv.copy() + v[:, :, 0] = (v[:, :, 0] + deg // 2) % 180 + _save(v, f"hue{deg}", label) + + # Variaciones de brillo + for factor, label, suffix in [ + (0.45, "Oscuro", "dark"), + (1.55, "Claro", "light"), + ]: + v = tex_hsv.copy() + v[:, :, 2] = np.clip(v[:, :, 2] * factor, 0, 255) + _save(v, suffix, label) + + # Variaciones de saturación + for factor, label, suffix in [ + (0.0, "Gris", "gray"), + (0.45, "Apagado", "muted"), + (1.75, "Vívido", "vivid"), + ]: + v = tex_hsv.copy() + v[:, :, 1] = np.clip(v[:, :, 1] * factor, 0, 255) + _save(v, suffix, label) + + return results + + +def list_available_textures() -> list[str]: + allowed = {".jpg", ".jpeg", ".png", ".webp", ".bmp", ".tif", ".tiff", ".exr"} + return [ + str(path.relative_to(TEXTURE_DIR)).replace("\\", "/") + for path in sorted(TEXTURE_DIR.rglob("*")) + if path.is_file() and path.suffix.lower() in allowed + ] + + +def resolve_texture_path(texture_name: str) -> Path: + if not texture_name: + raise HTTPException(status_code=400, detail="Invalid texture_name") + + normalized = texture_name.replace("\\", "/").strip("/") + candidate = (TEXTURE_DIR / normalized).resolve() + base = TEXTURE_DIR.resolve() + + try: + candidate.relative_to(base) + except ValueError as exc: + raise HTTPException(status_code=400, detail="Invalid texture_name") from exc + + if not candidate.exists() or not candidate.is_file(): + raise HTTPException(status_code=404, detail=f"Texture not found: {normalized}") + + return candidate + + +def build_texture_preview_jpeg(texture_path: Path, max_size: int = 320) -> bytes: + pil_img = load_texture_pil_rgb(texture_path) + pil_img.thumbnail((max_size, max_size), Image.Resampling.LANCZOS) + out = io.BytesIO() + pil_img.save(out, format="JPEG", quality=88, optimize=True) + return out.getvalue() + + +def load_texture_pil_rgb(texture_path: Path) -> Image.Image: + suffix = texture_path.suffix.lower() + + if suffix != ".exr": + try: + return Image.open(str(texture_path)).convert("RGB") + except Exception as exc: + raise HTTPException(status_code=500, detail=f"Could not read texture file: {exc}") from exc + + exr = cv2.imread(str(texture_path), cv2.IMREAD_UNCHANGED) + if exr is None: + raise HTTPException(status_code=500, detail="Could not decode EXR texture") + + if exr.ndim == 2: + exr = np.stack([exr, exr, exr], axis=-1) + if exr.ndim != 3: + raise HTTPException(status_code=500, detail="EXR texture has unsupported shape") + if exr.shape[2] > 3: + exr = exr[:, :, :3] + + exr = np.nan_to_num(exr, nan=0.0, posinf=0.0, neginf=0.0) + exr = np.maximum(exr, 0) + + if np.issubdtype(exr.dtype, np.floating): + scale = float(np.percentile(exr, 99.0)) + if scale <= 1e-8: + scale = float(np.max(exr)) + if scale <= 1e-8: + scale = 1.0 + img = np.clip(exr / scale, 0.0, 1.0) + img = np.power(img, 1.0 / 2.2) + img_u8 = (img * 255.0).astype(np.uint8) + elif exr.dtype == np.uint16: + img_u8 = (exr / 257.0).astype(np.uint8) + else: + img_u8 = np.clip(exr, 0, 255).astype(np.uint8) + + img_rgb = cv2.cvtColor(img_u8, cv2.COLOR_BGR2RGB) + return Image.fromarray(img_rgb).convert("RGB") + + +def estimate_mask_orientation_degrees(binary_mask: np.ndarray) -> float: + mask_u8 = (binary_mask > 0).astype(np.uint8) + contours, _ = cv2.findContours(mask_u8, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE) + if not contours: + return 0.0 + + largest = max(contours, key=cv2.contourArea) + if cv2.contourArea(largest) < 25.0: + return 0.0 + + rect = cv2.minAreaRect(largest) + (_, _), (width, height), angle = rect + + dominant_angle = float(angle) + if width < height: + dominant_angle += 90.0 + + dominant_angle %= 180.0 + return dominant_angle + + +def _compute_trapezoid_score_from_mask( + binary_mask: np.ndarray, + ys: np.ndarray, + xs: np.ndarray, + min_y: int, + max_y: int, + bbox_h: int, +) -> float: + """Return 0..1 indicating how floor-like (wider at bottom) the mask shape is.""" + quarter = max(1, bbox_h // 4) + top_xs = xs[ys <= (min_y + quarter)] + bot_xs = xs[ys >= (max_y - quarter)] + if len(top_xs) < 3 or len(bot_xs) < 3: + return 0.0 + top_w = float(top_xs.max() - top_xs.min()) + bot_w = float(bot_xs.max() - bot_xs.min()) + if top_w < 5.0: + return 1.0 if bot_w > 20.0 else 0.0 + ratio = bot_w / top_w + return float(np.clip((ratio - 1.0) / 1.8, 0.0, 1.0)) + + +def _sort_quad_corners(pts: np.ndarray) -> np.ndarray: + """Sort 4 points into [TL, TR, BR, BL] order.""" + result = np.zeros((4, 2), dtype=np.float32) + s = pts[:, 0] + pts[:, 1] + d = pts[:, 0] - pts[:, 1] + result[0] = pts[np.argmin(s)] + result[1] = pts[np.argmax(d)] + result[2] = pts[np.argmax(s)] + result[3] = pts[np.argmin(d)] + return result + + +def _extract_mask_quad(binary_mask: np.ndarray) -> np.ndarray | None: + """Approximate mask as 4-corner polygon sorted [TL, TR, BR, BL], or None.""" + mask_u8 = (binary_mask > 0).astype(np.uint8) + contours, _ = cv2.findContours(mask_u8, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE) + if not contours: + return None + largest = max(contours, key=cv2.contourArea) + if cv2.contourArea(largest) < 400.0: + return None + hull = cv2.convexHull(largest) + peri = cv2.arcLength(hull, True) + for eps_frac in (0.03, 0.05, 0.08, 0.10, 0.13): + approx = cv2.approxPolyDP(hull, eps_frac * peri, True) + if len(approx) == 4: + return _sort_quad_corners(approx.reshape(4, 2).astype(np.float32)) + return None + + +def _tile_texture_perspective( + tex_pil: Image.Image, + quad: np.ndarray, + image_width: int, + image_height: int, +) -> Image.Image | None: + """ + Tile texture with perspective correction for a floor surface. + quad: [TL, TR, BR, BL] in image coordinates. + Returns full-image-size PIL image with warped tiled texture, or None on failure. + Pixels outside the perspective quad are filled with regular tiling to avoid black gaps. + """ + tl, tr, br, bl = quad + bot_w = float(np.linalg.norm(br.astype(float) - bl.astype(float))) + top_w = float(np.linalg.norm(tr.astype(float) - tl.astype(float))) + left_h = float(np.linalg.norm(bl.astype(float) - tl.astype(float))) + right_h = float(np.linalg.norm(br.astype(float) - tr.astype(float))) + rect_w = min(int(max(bot_w, top_w)) + 1, image_width * 2) + rect_h = min(int(max(left_h, right_h)) + 1, image_height * 2) + if rect_w < 8 or rect_h < 8: + return None + tex_arr = np.array(tex_pil.convert("RGB"), dtype=np.uint8) + th, tw = tex_arr.shape[:2] + if tw < 1 or th < 1: + return None + rect_tiled = np.zeros((rect_h, rect_w, 3), dtype=np.uint8) + for ry in range(0, rect_h, th): + for rx in range(0, rect_w, tw): + py = min(th, rect_h - ry) + px = min(tw, rect_w - rx) + rect_tiled[ry : ry + py, rx : rx + px] = tex_arr[:py, :px] + src_pts = np.array( + [[0.0, 0.0], [float(rect_w - 1), 0.0], [float(rect_w - 1), float(rect_h - 1)], [0.0, float(rect_h - 1)]], + dtype=np.float32, + ) + dst_pts = quad.astype(np.float32) + try: + H = cv2.getPerspectiveTransform(src_pts, dst_pts) + warped = cv2.warpPerspective(rect_tiled, H, (image_width, image_height)) + # Mapa de cobertura: píxeles realmente cubiertos por el warp + cov_src = np.ones((rect_h, rect_w), dtype=np.uint8) * 255 + coverage = cv2.warpPerspective(cov_src, H, (image_width, image_height)) + except cv2.error: + return None + + # Rellenar píxeles sin cobertura (fuera del quad) con tiling regular + # para evitar espacios negros donde la máscara supera el quad aproximado + regular = np.zeros((image_height, image_width, 3), dtype=np.uint8) + for ry in range(0, image_height, th): + for rx in range(0, image_width, tw): + py = min(th, image_height - ry) + px = min(tw, image_width - rx) + regular[ry : ry + py, rx : rx + px] = tex_arr[:py, :px] + + uncovered = coverage < 128 + warped[uncovered] = regular[uncovered] + + return Image.fromarray(warped) + + +def classify_texture_material(texture_name: str) -> str: + texture_key = texture_name.lower() + if "acm" in texture_key or "wpc" in texture_key: + return "acm" + if any(hint in texture_key for hint in ("deck", "wood", "plank", "laminate", "floor")): + return "wood" + if any(hint in texture_key for hint in ("marble", "granite", "tile", "brick", "cobblestone", "stone", "cartago", "riverbed")): + return "stone" + if any(hint in texture_key for hint in ("metal", "rust", "iron", "steel")): + return "metal" + return "generic" + + +def infer_surface_type_and_direction( + binary_mask: np.ndarray, + image_width: int, + image_height: int, + texture_name: str, +) -> tuple[str, float, float, int]: + mask_u8 = (binary_mask > 0).astype(np.uint8) + ys, xs = np.where(mask_u8 > 0) + if ys.size == 0 or xs.size == 0: + return ("wall", 0.0, 0.78, max(180, image_width // 4)) + + min_x, max_x = int(xs.min()), int(xs.max()) + min_y, max_y = int(ys.min()), int(ys.max()) + bbox_w = max(1, max_x - min_x + 1) + bbox_h = max(1, max_y - min_y + 1) + aspect = bbox_w / max(1.0, float(bbox_h)) + center_y = float(ys.mean()) / max(1.0, float(image_height)) + dominant_angle = estimate_mask_orientation_degrees(binary_mask) + material = classify_texture_material(texture_name) + + # Trapezoid score: floor in perspective is wider at the bottom than the top + trapezoid_score = _compute_trapezoid_score_from_mask(binary_mask, ys, xs, min_y, max_y, bbox_h) + + is_ceiling = center_y < 0.26 and aspect > 1.35 + # Floor: low center + trapezoidal shape, OR clearly low + wide + is_floor = ( + (center_y > 0.55 and aspect >= 0.9 and trapezoid_score > 0.30) + or (center_y > 0.68 and aspect > 1.15) + ) + + if is_ceiling: + surface_type = "ceiling" + angle = 0.0 + blend_alpha = 0.58 + tile_width = max(128, image_width // 5) + elif is_floor: + if material == "wood": + surface_type = "deck" + angle = dominant_angle if 8.0 <= dominant_angle <= 172.0 else 0.0 + blend_alpha = 0.82 + tile_width = max(320, int(bbox_w * 0.95), image_width // 2) + else: + surface_type = "floor" + angle = 0.0 + blend_alpha = 0.80 + # ACM floor: ~3 large-format panels visible on the near edge + tile_width = max(200, int(bbox_w * 0.35)) if material == "acm" else max(144, image_width // 3) + else: + surface_type = "wall" + angle = 0.0 + if material == "acm": + blend_alpha = 0.78 + # ACM wall panels: ~3 panels across the surface width + tile_width = max(180, int(bbox_w * 0.33)) + elif material == "wood": + blend_alpha = 0.70 + tile_width = max(220, int(bbox_w * 0.55), image_width // 4) + elif material == "stone": + blend_alpha = 0.84 + tile_width = max(128, image_width // 4) + else: + blend_alpha = 0.66 + tile_width = max(128, image_width // 4) + + return (surface_type, float(angle % 180.0), float(blend_alpha), int(tile_width)) + + +def choose_auto_texture_settings(material: str, surface_type: str) -> tuple[float, float, float]: + strength_map = {"acm": 0.98, "stone": 0.96, "wood": 0.88, "metal": 0.91, "generic": 0.9} + intensity_map = {"acm": 0.08, "stone": 0.36, "wood": 0.3, "metal": 0.34, "generic": 0.32} + + strength = float(strength_map.get(material, 0.9)) + intensity = float(intensity_map.get(material, 0.32)) + + if surface_type in {"wall", "facade"}: + strength += 0.02 + angle = 28.0 + elif surface_type in {"roof"}: + angle = 42.0 + intensity += 0.03 + elif surface_type in {"floor", "deck"}: + angle = 24.0 + intensity += 0.02 + else: + angle = 35.0 + + return ( + float(np.clip(strength, 0.55, 0.99)), + float(angle % 360.0), + float(np.clip(intensity, 0.0, 1.0)), + ) + + +def build_feather_mask(binary_mask: np.ndarray, sigma: float = 2.2) -> np.ndarray: + mask = (binary_mask > 0).astype(np.float32) + if mask.max() <= 0: + return mask + feather = cv2.GaussianBlur(mask, (0, 0), sigmaX=sigma, sigmaY=sigma) + return np.clip(feather, 0.0, 1.0) + + +def build_scene_luminance_map(orig_rgb: np.ndarray) -> np.ndarray: + orig_u8 = orig_rgb.astype(np.uint8) + orig_lab = cv2.cvtColor(orig_u8, cv2.COLOR_RGB2LAB).astype(np.float32) + l_channel = orig_lab[:, :, 0] / 255.0 + broad_light = cv2.GaussianBlur(l_channel, (0, 0), sigmaX=18.0, sigmaY=18.0) + local_detail = l_channel - cv2.GaussianBlur(l_channel, (0, 0), sigmaX=4.0, sigmaY=4.0) + light_map = 0.82 + (broad_light * 0.36) + (local_detail * 0.18) + return np.clip(light_map, 0.72, 1.22) + + +def build_texture_relief_map(tex_rgb: np.ndarray, material: str = "generic") -> np.ndarray: + tex_u8 = tex_rgb.astype(np.uint8) + tex_gray = cv2.cvtColor(tex_u8, cv2.COLOR_RGB2GRAY).astype(np.float32) / 255.0 + micro_relief = tex_gray - cv2.GaussianBlur(tex_gray, (0, 0), sigmaX=3.0, sigmaY=3.0) + + relief_scale = {"acm": 0.35, "stone": 2.8, "wood": 2.2, "metal": 1.8}.get(material, 2.0) + return np.clip(micro_relief * relief_scale, -1.0, 1.0) + + +def build_directional_light_map( + tex_rgb: np.ndarray, + material: str, + light_angle_degrees: float, + light_intensity: float, +) -> np.ndarray: + tex_u8 = tex_rgb.astype(np.uint8) + tex_gray = cv2.cvtColor(tex_u8, cv2.COLOR_RGB2GRAY).astype(np.float32) / 255.0 + height_map = cv2.GaussianBlur(tex_gray, (0, 0), sigmaX=1.4, sigmaY=1.4) + grad_x = cv2.Sobel(height_map, cv2.CV_32F, 1, 0, ksize=3) + grad_y = cv2.Sobel(height_map, cv2.CV_32F, 0, 1, ksize=3) + + relief_scale = {"acm": 0.45, "stone": 3.0, "wood": 2.4, "metal": 1.6}.get(material, 2.0) + + nx = -grad_x * relief_scale + ny = -grad_y * relief_scale + nz = np.ones_like(nx, dtype=np.float32) + norm = np.sqrt((nx * nx) + (ny * ny) + (nz * nz)) + 1e-6 + nx = nx / norm + ny = ny / norm + nz = nz / norm + + theta = np.deg2rad(float(light_angle_degrees)) + lx = float(np.cos(theta)) + ly = float(-np.sin(theta)) + lz = 0.82 + light_norm = max(1e-6, float(np.sqrt((lx * lx) + (ly * ly) + (lz * lz)))) + lx /= light_norm + ly /= light_norm + lz /= light_norm + + diffuse = np.clip((nx * lx) + (ny * ly) + (nz * lz), 0.0, 1.0) + strength = float(np.clip(light_intensity, 0.0, 1.0)) + if material == "acm": + return np.clip(0.97 + (diffuse * (0.03 + (0.12 * strength))), 0.95, 1.12) + return np.clip(0.86 + (diffuse * (0.14 + (0.60 * strength))), 0.72, 1.35) + + +def build_mask_edge_occlusion(binary_mask: np.ndarray, light_intensity: float) -> np.ndarray: + mask_u8 = (binary_mask > 0).astype(np.uint8) + if mask_u8.max() == 0: + return np.ones(mask_u8.shape, dtype=np.float32) + + distance = cv2.distanceTransform(mask_u8, cv2.DIST_L2, 5).astype(np.float32) + inner_values = distance[mask_u8 > 0] + if inner_values.size == 0: + return np.ones(mask_u8.shape, dtype=np.float32) + + max_distance = max(1.0, float(np.percentile(inner_values, 95))) + normalized = np.clip(distance / (max_distance * 0.16), 0.0, 1.0) + edge_strength = 1.0 - normalized + occlusion = 1.0 - (edge_strength * (0.04 + (0.08 * float(np.clip(light_intensity, 0.0, 1.0))))) + occlusion[mask_u8 == 0] = 1.0 + return np.clip(occlusion, 0.88, 1.0) + + +def apply_surface_lighting( + tex_rgb: np.ndarray, + orig_rgb: np.ndarray, + binary_mask: np.ndarray, + material: str, + lighting_mode: str, + light_angle_degrees: float, + light_intensity: float, +) -> np.ndarray: + scene_light = build_scene_luminance_map(orig_rgb) + directional_light = build_directional_light_map(tex_rgb, material, light_angle_degrees, light_intensity) + relief_map = build_texture_relief_map(tex_rgb, material) + edge_occlusion = build_mask_edge_occlusion(binary_mask, light_intensity) + + if material == "acm": + if lighting_mode == "directional": + light_map = directional_light + elif lighting_mode == "flat": + light_map = np.ones(scene_light.shape, dtype=np.float32) + else: + # 45 % scene luminance so ACM panels inherit shadows/gradients from photo + light_map = (scene_light * 0.45) + (directional_light * 0.55) + elif lighting_mode == "directional": + light_map = directional_light + elif lighting_mode == "flat": + light_map = np.ones(scene_light.shape, dtype=np.float32) + else: + light_map = (scene_light * 0.78) + (directional_light * 0.22) + + detail_scale = 0.02 + (0.05 * float(np.clip(light_intensity, 0.0, 1.0))) if material == "acm" else 0.08 + (0.18 * float(np.clip(light_intensity, 0.0, 1.0))) + detail_boost = 1.0 + (relief_map * detail_scale) + enhanced = tex_rgb.astype(np.float32) + enhanced *= light_map[:, :, None] + enhanced *= detail_boost[:, :, None] + enhanced *= edge_occlusion[:, :, None] + return np.clip(enhanced, 0, 255).astype(np.uint8) + + +def blend_texture_preserve_shading( + orig_rgb: np.ndarray, + tex_rgb: np.ndarray, + alpha_mask: np.ndarray, + blend_alpha: float, + material: str = "generic", +) -> np.ndarray: + orig_u8 = orig_rgb.astype(np.uint8) + tex_u8 = tex_rgb.astype(np.uint8) + + orig_lab = cv2.cvtColor(orig_u8, cv2.COLOR_RGB2LAB).astype(np.float32) + tex_lab = cv2.cvtColor(tex_u8, cv2.COLOR_RGB2LAB).astype(np.float32) + + mixed_lab = tex_lab.copy() + if material == "acm": + # 30 % original luminance → panels inherit scene shadows while keeping panel colour + mixed_lab[:, :, 0] = (0.30 * orig_lab[:, :, 0]) + (0.70 * tex_lab[:, :, 0]) + mixed_lab[:, :, 1] = (0.97 * tex_lab[:, :, 1]) + (0.03 * orig_lab[:, :, 1]) + mixed_lab[:, :, 2] = (0.97 * tex_lab[:, :, 2]) + (0.03 * orig_lab[:, :, 2]) + elif material == "wood": + mixed_lab[:, :, 0] = (0.78 * orig_lab[:, :, 0]) + (0.22 * tex_lab[:, :, 0]) + mixed_lab[:, :, 1] = (0.9 * tex_lab[:, :, 1]) + (0.1 * orig_lab[:, :, 1]) + mixed_lab[:, :, 2] = (0.9 * tex_lab[:, :, 2]) + (0.1 * orig_lab[:, :, 2]) + elif material == "stone": + orig_l_base = cv2.GaussianBlur(orig_lab[:, :, 0], (0, 0), sigmaX=11.0, sigmaY=11.0) + mixed_lab[:, :, 0] = (0.18 * orig_l_base) + (0.82 * tex_lab[:, :, 0]) + mixed_lab[:, :, 1] = (0.95 * tex_lab[:, :, 1]) + (0.05 * orig_lab[:, :, 1]) + mixed_lab[:, :, 2] = (0.95 * tex_lab[:, :, 2]) + (0.05 * orig_lab[:, :, 2]) + else: + mixed_lab[:, :, 0] = orig_lab[:, :, 0] + mixed_lab[:, :, 1] = (0.8 * tex_lab[:, :, 1]) + (0.2 * orig_lab[:, :, 1]) + mixed_lab[:, :, 2] = (0.8 * tex_lab[:, :, 2]) + (0.2 * orig_lab[:, :, 2]) + + shaded_tex = cv2.cvtColor(np.clip(mixed_lab, 0, 255).astype(np.uint8), cv2.COLOR_LAB2RGB).astype(np.float32) + if material == "wood": + tex_gray = cv2.cvtColor(tex_u8, cv2.COLOR_RGB2GRAY).astype(np.float32) + tex_base = cv2.GaussianBlur(tex_gray, (0, 0), sigmaX=9.0, sigmaY=9.0) + tex_detail = np.clip((tex_gray - tex_base) / 255.0, -0.35, 0.35) + shaded_tex *= (1.0 + (tex_detail[:, :, None] * 0.28)) + + alpha = np.clip(alpha_mask[:, :, None] * float(blend_alpha), 0.0, 1.0) + composite = (orig_rgb * (1.0 - alpha)) + (shaded_tex * alpha) + return np.clip(composite, 0, 255).astype(np.uint8) + + +def blend_texture_direct( + orig_rgb: np.ndarray, + tex_rgb: np.ndarray, + alpha_mask: np.ndarray, + blend_alpha: float, +) -> np.ndarray: + alpha = np.clip(alpha_mask[:, :, None] * float(blend_alpha), 0.0, 1.0) + composite = (orig_rgb * (1.0 - alpha)) + (tex_rgb * alpha) + return np.clip(composite, 0, 255).astype(np.uint8) + + +def apply_local_texture_sync(payload: ApplyTextureRequest) -> dict[str, Any]: + step = "APPLY_TEXTURE" + started = log_timing_start(step) + try: + safe_name = Path(payload.filename).name + if not safe_name: + raise HTTPException(status_code=400, detail="Invalid filename") + + label_safe_name = Path(payload.original_filename).name if payload.original_filename else safe_name + + image_path = UPLOAD_DIR / safe_name + if not image_path.exists() or not image_path.is_file(): + image_path = OUTPUT_DIR / safe_name + + if (not image_path.exists() or not image_path.is_file()) and payload.original_filename: + orig_name = Path(payload.original_filename).name + image_path = UPLOAD_DIR / orig_name + if not image_path.exists() or not image_path.is_file(): + image_path = OUTPUT_DIR / orig_name + + if not image_path.exists() or not image_path.is_file(): + raise HTTPException( + status_code=404, + detail=f"Image not found: {safe_name} (also tried original: {payload.original_filename or 'n/a'})", + ) + + masks_dir = UPLOAD_DIR / "masks" + masks_dir.mkdir(exist_ok=True) + label_owner = Path(image_path).stem + label_path = masks_dir / f"{label_owner}_labels.png" + if not label_path.exists() and payload.original_filename: + alt_owner = Path(payload.original_filename).name + alt_label = masks_dir / f"{alt_owner}_labels.png" + if alt_label.exists(): + label_path = alt_label + + if not label_path.exists(): + raise HTTPException( + status_code=404, + detail=f"Label map not found for {label_owner}. Upload/segment the image first.", + ) + + if not payload.mask_indices: + raise HTTPException(status_code=400, detail="No mask indices provided") + + texture_path = resolve_texture_path(payload.texture_name) + orig_pil = Image.open(str(image_path)).convert("RGB") + width, height = orig_pil.size + + label_map = cv2.imread(str(label_path), cv2.IMREAD_GRAYSCALE) + if label_map is None: + raise HTTPException(status_code=500, detail="Could not read label map") + + binary_mask = np.zeros((label_map.shape[0], label_map.shape[1]), dtype=np.uint8) + for idx in payload.mask_indices: + binary_mask |= (label_map == idx).astype(np.uint8) + + if binary_mask.max() == 0: + raise HTTPException(status_code=400, detail="None of the selected segments were found in the label map.") + + direction_mode = str(payload.direction_mode or "auto").strip().lower() + if direction_mode not in {"auto", "manual", "none"}: + raise HTTPException(status_code=400, detail="Invalid direction_mode. Use auto, manual, or none.") + + replace_mode = str(getattr(payload, "replace_mode", "realistic") or "realistic").strip().lower() + lighting_mode = str(getattr(payload, "lighting_mode", "scene") or "scene").strip().lower() + + material = classify_texture_material(payload.texture_name) + surface_type, inferred_angle, blend_alpha, target_w = infer_surface_type_and_direction( + binary_mask, width, height, payload.texture_name, + ) + replace_strength, light_angle_degrees, light_intensity = choose_auto_texture_settings(material, surface_type) + effective_alpha = float(np.clip(blend_alpha * (0.55 + (0.75 * replace_strength)), 0.0, 0.98)) + if material == "acm": + effective_alpha = float(max(effective_alpha, 0.92)) + + applied_angle = 0.0 + if direction_mode == "auto": + applied_angle = inferred_angle + elif direction_mode == "manual": + applied_angle = float(payload.angle_degrees) + + tex_pil = load_texture_pil_rgb(texture_path) + + # Escalar al tamaño de tile deseado ANTES de rotar + tex_w, tex_h = tex_pil.size + scale = target_w / max(1, tex_w) + if abs(scale - 1.0) > 0.05: + tex_pil = tex_pil.resize( + (max(1, int(tex_w * scale)), max(1, int(tex_h * scale))), + Image.Resampling.LANCZOS, + ) + tex_w, tex_h = tex_pil.size + + tiled: Image.Image | None = None + + # Floor surfaces: perspective tiling solo cuando la perspectiva es fuerte. + # Para pisos de dormitorio/habitación (perspectiva suave) el quad aproximado + # no cubre bien el mask irregular → produce negro. Se usa tiling regular en esos casos. + if surface_type == "floor" and direction_mode in {"auto", "none"}: + ys_m, xs_m = np.where(binary_mask > 0) + if ys_m.size > 0: + min_y_m, max_y_m = int(ys_m.min()), int(ys_m.max()) + bbox_h_m = max(1, max_y_m - min_y_m + 1) + trap_score = _compute_trapezoid_score_from_mask( + binary_mask, ys_m, xs_m, min_y_m, max_y_m, bbox_h_m + ) + if trap_score > 0.35: + quad = _extract_mask_quad(binary_mask) + if quad is not None: + tiled = _tile_texture_perspective(tex_pil, quad, width, height) + if tiled is not None: + logger.info(f"[APPLY_TEXTURE] perspective floor tiling applied (trap={trap_score:.2f})") + else: + logger.info(f"[APPLY_TEXTURE] flat floor tiling (trap={trap_score:.2f} < 0.35, skip perspective)") + + # Wall / ceiling surfaces: perspective tiling cuando el quad es significativamente + # no-rectangular (pared fotografiada en ángulo). Un ratio > 1.20 entre lado mayor + # y lado menor indica distorsión perspectiva visible. + if surface_type in {"wall", "ceiling"} and tiled is None and direction_mode in {"auto", "none"}: + quad = _extract_mask_quad(binary_mask) + if quad is not None: + tl, tr, br, bl = quad + top_w = float(np.linalg.norm(tr.astype(float) - tl.astype(float))) + bot_w = float(np.linalg.norm(br.astype(float) - bl.astype(float))) + left_h = float(np.linalg.norm(bl.astype(float) - tl.astype(float))) + right_h = float(np.linalg.norm(br.astype(float) - tr.astype(float))) + w_ratio = max(top_w, bot_w) / max(1.0, min(top_w, bot_w)) + h_ratio = max(left_h, right_h) / max(1.0, min(left_h, right_h)) + if w_ratio > 1.20 or h_ratio > 1.20: + tiled = _tile_texture_perspective(tex_pil, quad, width, height) + if tiled is not None: + logger.info( + f"[APPLY_TEXTURE] perspective wall tiling applied " + f"(w_ratio={w_ratio:.2f}, h_ratio={h_ratio:.2f})" + ) + + if tiled is None: + if abs(applied_angle) > 0.01: + # Tile on a large canvas first, then rotate the full canvas to avoid black corners + diag = int(np.ceil(np.sqrt(width ** 2 + height ** 2))) + max(tex_w, tex_h) + large_w = width + diag + large_h = height + diag + large = Image.new("RGB", (large_w, large_h)) + for y in range(0, large_h, tex_h): + for x in range(0, large_w, tex_w): + large.paste(tex_pil, (x, y)) + large = large.rotate(-applied_angle, resample=Image.Resampling.BICUBIC, expand=False) + cx = (large_w - width) // 2 + cy = (large_h - height) // 2 + tiled = large.crop((cx, cy, cx + width, cy + height)) + else: + tiled = Image.new("RGB", (width, height)) + for y in range(0, height, tex_h): + for x in range(0, width, tex_w): + tiled.paste(tex_pil, (x, y)) + + orig_u8 = np.array(orig_pil, dtype=np.uint8) + + try: + if bool(getattr(payload, "clear_mask_before_apply", False)): + orig_candidate = None + if payload.original_filename: + cand = UPLOAD_DIR / Path(payload.original_filename).name + if cand.exists() and cand.is_file(): + orig_candidate = cand + else: + cand2 = OUTPUT_DIR / Path(payload.original_filename).name + if cand2.exists() and cand2.is_file(): + orig_candidate = cand2 + if orig_candidate is None: + stem = Path(image_path).stem + if "_edit_" in stem: + base_name = stem.split("_edit_")[0] + ".jpg" + cand = UPLOAD_DIR / base_name + if cand.exists() and cand.is_file(): + orig_candidate = cand + else: + cand2 = OUTPUT_DIR / base_name + if cand2.exists() and cand2.is_file(): + orig_candidate = cand2 + + if orig_candidate is not None: + try: + base_pil = Image.open(str(orig_candidate)).convert("RGB") + if base_pil.size != (width, height): + base_pil = base_pil.resize((width, height), Image.Resampling.LANCZOS) + base_arr = np.array(base_pil, dtype=np.uint8) + mask_bool = (binary_mask > 0) + orig_u8[mask_bool] = base_arr[mask_bool] + logger.info(f"[APPLY_TEXTURE] cleared mask from original source: {orig_candidate}") + except Exception: + logger.exception("Failed to restore original pixels for clear_mask_before_apply") + except Exception: + logger.exception("Error handling clear_mask_before_apply") + + tiled_arr = np.array(tiled, dtype=np.uint8) + + # Parchar píxeles muy oscuros (suma R+G+B < 20) dentro de la máscara. + # Cubren tanto negro exacto (0,0,0) como píxeles casi negros que el warp + # de perspectiva puede generar en bordes del quad o zonas sin cobertura. + mask_bool = binary_mask > 0 + dark_in_mask = mask_bool & (tiled_arr.sum(axis=2) < 20) + if dark_in_mask.any(): + th_f, tw_f = tex_pil.size[1], tex_pil.size[0] + tex_np = np.array(tex_pil, dtype=np.uint8) + ys_b, xs_b = np.where(dark_in_mask) + tiled_arr[ys_b, xs_b] = tex_np[ys_b % th_f, xs_b % tw_f] + + lit_tex = apply_surface_lighting( + tiled_arr, + orig_u8, + binary_mask, + material, + lighting_mode, + light_angle_degrees, + light_intensity, + ) + + orig_arr = orig_u8.astype(np.float32) + tex_arr = lit_tex.astype(np.float32) + + if replace_mode in {"hard", "absolute", "force", "replace"}: + mask_bool = (binary_mask > 0).astype(bool) + composite_arr = orig_arr.copy() + composite_arr[mask_bool] = tex_arr[mask_bool] + composite = np.clip(composite_arr, 0, 255).astype(np.uint8) + else: + feather_mask = build_feather_mask(binary_mask) + # All materials use shading-preservation so scene luminance (shadows/highlights) + # from the original photo is transferred onto the texture. + composite = blend_texture_preserve_shading(orig_arr, tex_arr, feather_mask, effective_alpha, material) + + input_stem = Path(image_path).stem + edit_suffix = uuid.uuid4().hex[:8] + out_filename = f"{input_stem}_edit_{edit_suffix}.jpg" + out_path = UPLOAD_DIR / out_filename + Image.fromarray(composite).save(str(out_path), format="JPEG", quality=UPLOAD_JPEG_QUALITY, optimize=True) + + try: + out_label_path = masks_dir / f"{Path(out_filename).stem}_labels.png" + if label_path.exists(): + shutil.copyfile(str(label_path), str(out_label_path)) + except Exception: + logger.exception("Failed to copy label map for output image") + + return { + "message": "Texture applied successfully", + "original": safe_name, + "mask_indices": payload.mask_indices, + "texture_name": payload.texture_name, + "material": material, + "direction_mode": direction_mode, + "surface_type": surface_type, + "replace_mode": replace_mode, + "replace_strength": round(replace_strength, 3), + "lighting_mode": lighting_mode, + "light_angle_degrees": round(light_angle_degrees, 2), + "light_intensity": round(light_intensity, 3), + "blend_alpha": round(effective_alpha, 3), + "applied_angle_degrees": round(applied_angle, 2), + "output_filename": out_filename, + "output_url": f"/seg/image/{out_filename}", + } + finally: + log_timing_end(step, started) diff --git a/backend/templates/classic_dashboard.html b/backend/templates/classic_dashboard.html index 555eeb45fb289affcdf4cd44c127b18a9898c2d2..e965634bce645622dba2ea93e60fdeca8c1c31bb 100644 --- a/backend/templates/classic_dashboard.html +++ b/backend/templates/classic_dashboard.html @@ -1,2347 +1,2347 @@ - - - - - - SAM Editor - - - -
- HyperReality - No image loaded -
-
-
- - -
-
- - - -
-
-
-
-
- -
- - - - - - - - - - - - -
- - -
-
- - -
- -
- - - -
-
-
-
-
- -
-
- -
-
-
- - - -
-
-
-
-
-
-
-
Ver los productos en su cuarto
-
Sube una foto de tu habitación
-
Prueba nuestras texturas
- -
-
- Vista previa de imagen -
- Arrastra tu imagen aqui
o haz clic para seleccionar -
-
-
-
- -
-
-
-
-
-
-
-
Procesando imagen...
-
-
Estamos subiendo y segmentando tu foto.
-
-
- - - + + + + + + SAM Editor + + + +
+ HyperReality + No image loaded +
+
+
+ + +
+
+ + + +
+
+
+
+
+ +
+ + + + + + + + + + + + +
+ + +
+
+ + +
+ +
+ + + +
+
+
+
+
+ +
+
+ +
+
+
+ + + +
+
+
+
+
+
+
+
Ver los productos en su cuarto
+
Sube una foto de tu habitación
+
Prueba nuestras texturas
+ +
+
+ Vista previa de imagen +
+ Arrastra tu imagen aqui
o haz clic para seleccionar +
+
+
+
+ +
+
+
+
+
+
+
+
Procesando imagen...
+
+
Estamos subiendo y segmentando tu foto.
+
+
+ + + diff --git a/backend/texturas/Texture_wpc_deck/DECK_gris.png b/backend/texturas/Texture_wpc_deck/DECK_gris.png new file mode 100644 index 0000000000000000000000000000000000000000..ed4299c88919598daeb0c8f9b28e73bd554b168e --- /dev/null +++ b/backend/texturas/Texture_wpc_deck/DECK_gris.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:55daa6f6e902f484bb4e0327609a3aab8ffd8cd45e37a2eb8b0575983ef0b97b +size 1443643 diff --git a/backend/texturas/Texture_wpc_deck/DECK_madera.png b/backend/texturas/Texture_wpc_deck/DECK_madera.png new file mode 100644 index 0000000000000000000000000000000000000000..a6b969ba90677ecd7e0702c1626c2200527e821c --- /dev/null +++ b/backend/texturas/Texture_wpc_deck/DECK_madera.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:781cd371ee4970775220d90950f3a03d1735b15dc5175eb7c3c338e344607d5b +size 1954535 diff --git a/backend/texturas/Texture_wpc_deck/DECK_madera_oscuro.png b/backend/texturas/Texture_wpc_deck/DECK_madera_oscuro.png new file mode 100644 index 0000000000000000000000000000000000000000..605099e14526bd470815f7dd520d7fc02a0c3331 --- /dev/null +++ b/backend/texturas/Texture_wpc_deck/DECK_madera_oscuro.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aad5dc59e369431186149eaa324c91098037b1a3d4cb258045bcd923897f5843 +size 1876489 diff --git a/backend/visualizador.html b/backend/visualizador.html index 04397fdc26aee48396941f9ff88c1474733f366f..668b69fdf1bf2d2da49eea2daef7a399f4407444 100644 --- a/backend/visualizador.html +++ b/backend/visualizador.html @@ -1,125 +1,125 @@ - - - - - - Visualizador SaaS fasdfadsf - - - - - -
- - - - + + + + + + Visualizador SaaS fasdfadsf + + + + + +
+ + + + diff --git a/frontend/.gitignore b/frontend/.gitignore index 4108b33e7b3aae71ade8d7e209a72f99f17c3485..a547bf36d8d11a4f89c59c144f24795749086dd1 100644 --- a/frontend/.gitignore +++ b/frontend/.gitignore @@ -1,24 +1,24 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* -lerna-debug.log* - -node_modules -dist -dist-ssr -*.local - -# Editor directories and files -.vscode/* -!.vscode/extensions.json -.idea -.DS_Store -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw? +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/frontend/FRONTEND_DOCUMENTATION.md b/frontend/FRONTEND_DOCUMENTATION.md index b50f35ce49361c410473644f18c6ff3ad7d0ed5f..100b7ca36d144e890c92178994735a46fe322d42 100644 --- a/frontend/FRONTEND_DOCUMENTATION.md +++ b/frontend/FRONTEND_DOCUMENTATION.md @@ -1,250 +1,250 @@ -# Documentación del Frontend - -Este documento describe la arquitectura, las rutas, los estados, los hooks y los componentes principales del frontend React + TypeScript ubicado en `frontend/`. - ---- - -## 1. Visión general - -El frontend está construido con: - -- React 19 -- TypeScript -- Vite -- React Router DOM -- Zustand para estado global -- @tanstack/react-query para consultas asíncronas -- Tailwind CSS para estilos -- Arquitectura basada en características (`features`) - -La carpeta principal de la aplicación es `frontend/src`. - ---- - -## 2. Estructura de carpetas clave - -- `src/main.tsx` - punto de entrada, configuración de router y React Query -- `src/App.tsx` - rutas principales de la aplicación -- `src/store` - estado global con Zustand -- `src/api` - cliente y funciones de API centralizadas -- `src/hooks` - hooks reutilizables del frontend -- `src/features` - features organizadas por dominio -- `src/utils` - utilidades compartidas -- `src/types.ts` - tipos globales de la aplicación - ---- - -## 3. Rutas principales - -`src/App.tsx` define las rutas: - -- `/` → `RoomSetup` -- `/visualizer` → `RoomVisualizer` -- `/settings` → `SettingsPage` -- `*` → redirección a `/` - ---- - -## 4. Estado global (Zustand) - -`src/store/useAppStore.ts` almacena: - -- `previewImage` - URL de la imagen cargada -- `uploadMessage` - estado de mensaje de subida -- `openProductId` - producto seleccionado en `RoomVisualizer` -- `viewMode` - vista actual de productos en el visualizador (`grid` o `list`) - -Funciones disponibles: - -- `setPreviewImage` -- `setUploadMessage` -- `setOpenProductId` -- `setViewMode` -- `reset` - ---- - -## 5. Cliente API centralizado - -`src/api/client.ts` incluye: - -- `DEV_API_BASE` y `API_BASE` para la URL del backend -- `getApiBase` / `buildApiUrl` para construir endpoints -- `fetchClientConfig` para obtener configuración de cliente -- `uploadRoomImage` para subir imágenes al servidor -- `startSession` para iniciar una sesión remota - -Esta capa permite mantener la URL del backend en un solo lugar y soportar un token de desarrollo automático. - ---- - -## 6. Hooks compartidos - -### `src/hooks/useUploadImage.ts` - -- Maneja la subida de imágenes al backend -- Controla `isUploading` y `uploadError` -- Envuelve `uploadRoomImage` del cliente API - ---- - -## 7. Tipos globales - -`src/types.ts` declara tipos comunes como: - -- `ClientData` -- `RouteItem` -- `Product` - -El tipo `Product` se usa en el visualizador para productos de catálogo. - ---- - -## 8. Feature: Room Setup - -### Archivos - -- `src/features/roomSetup/RoomSetup.tsx` -- `src/features/roomSetup/roomSetupHooks.ts` -- `src/features/roomSetup/RoomSetupComponents.tsx` -- `src/data/roomSetupData.ts` - -### Comportamiento - -`RoomSetup` es la página principal donde el usuario puede: - -- subir una imagen arrastrando o seleccionando archivo -- ver una vista previa de la imagen -- iniciar la navegación hacia el visualizador -- ver habitaciones de demostración filtrables - -### `useRoomSetup` - -Este hook abstrae toda la lógica de: - -- drag & drop -- selección de archivos -- subida de imagen -- gestión de estados de carga -- navegación con `useNavigate` - -### Componentes auxiliares - -- `FilterButton` - botón de filtrado por categoría -- `RoomCard` - tarjeta de habitación de demostración - ---- - -## 9. Feature: Room Visualizer - -### Archivos - -- `src/features/roomVisualizer/RoomVisualizer.tsx` -- `src/features/roomVisualizer/roomVisualizerHooks.ts` -- `src/features/roomVisualizer/roomVisualizerData.ts` -- `src/features/roomVisualizer/ProductCards.tsx` - -### Comportamiento - -`RoomVisualizer` muestra: - -- la imagen subida por el usuario -- controles de zoom y arrastre de la imagen -- lista / grid de productos para aplicar en la habitación -- selección de producto y detalles asociados - -### `useRoomVisualizer` - -Extrae la lógica de visualización de productos: - -- modo de vista (`grid` / `list`) -- búsqueda y filtros básicos -- producto seleccionado -- manejo de selección de producto -- agrupación en chunks para renderizar grillas - -### Datos de productos - -- `roomVisualizerData.ts` contiene el catálogo de productos estáticos usados en la vista. - -### Componentes - -- `ProductGroupCard` - renderiza un grupo de 3 productos en grid -- `IndividualProductCard` - renderiza un producto en modo lista - ---- - -## 10. Feature: Settings - -### Archivo - -- `src/features/settings/SettingsPage.tsx` - -### Comportamiento - -La página de configuración permite al usuario: - -- definir la URL base de la API -- activar / desactivar la lista de rutas en el viewer -- definir token de desarrollo automático - -### Soporte de almacenamiento - -`src/utils/settings.ts` gestiona: - -- carga de `localStorage` -- guardado de configuración -- valores por defecto - ---- - -## 11. Componentes comunes - -- `src/components/ui/LoadingScreen.tsx` - pantalla de carga reutilizable - ---- - -## 12. Flujo principal de la app - -1. Usuario entra en `/` -2. Sube una imagen en `RoomSetup` -3. Se crea una vista previa y se almacena en Zustand -4. Se navega a `/visualizer` -5. `RoomVisualizer` usa la imagen y muestra productos -6. El usuario filtra, busca y selecciona productos -7. `SettingsPage` permite ajustar la API y opciones de la app - ---- - -## 13. Cómo ejecutar el frontend - -Desde `frontend/`: - -```bash -npm install -npm run dev -``` - -Construcción de producción: - -```bash -npm run build -``` - ---- - -## 14. Posibles mejoras futuras - -- mover `roomVisualizerProducts` a una API real o servicio de datos -- extraer más componentes presentacionales del visualizador -- usar React Query para cargar configuración del cliente en lugar de gestión manual -- añadir tests unitarios para hooks y componentes -- normalizar rutas y nombres de features - ---- - -## 15. Observaciones adicionales - -- La base API se controla desde `VITE_API_BASE_URL` o `DEV_API_BASE` en desarrollo. -- La aplicación usa `queryClient` de React Query, aunque hoy solo se usa para potenciales fetches futuros. -- El estado global es ligero y se usa principalmente para compartir imagen previa, modo de vista y selección de producto. +# Documentación del Frontend + +Este documento describe la arquitectura, las rutas, los estados, los hooks y los componentes principales del frontend React + TypeScript ubicado en `frontend/`. + +--- + +## 1. Visión general + +El frontend está construido con: + +- React 19 +- TypeScript +- Vite +- React Router DOM +- Zustand para estado global +- @tanstack/react-query para consultas asíncronas +- Tailwind CSS para estilos +- Arquitectura basada en características (`features`) + +La carpeta principal de la aplicación es `frontend/src`. + +--- + +## 2. Estructura de carpetas clave + +- `src/main.tsx` - punto de entrada, configuración de router y React Query +- `src/App.tsx` - rutas principales de la aplicación +- `src/store` - estado global con Zustand +- `src/api` - cliente y funciones de API centralizadas +- `src/hooks` - hooks reutilizables del frontend +- `src/features` - features organizadas por dominio +- `src/utils` - utilidades compartidas +- `src/types.ts` - tipos globales de la aplicación + +--- + +## 3. Rutas principales + +`src/App.tsx` define las rutas: + +- `/` → `RoomSetup` +- `/visualizer` → `RoomVisualizer` +- `/settings` → `SettingsPage` +- `*` → redirección a `/` + +--- + +## 4. Estado global (Zustand) + +`src/store/useAppStore.ts` almacena: + +- `previewImage` - URL de la imagen cargada +- `uploadMessage` - estado de mensaje de subida +- `openProductId` - producto seleccionado en `RoomVisualizer` +- `viewMode` - vista actual de productos en el visualizador (`grid` o `list`) + +Funciones disponibles: + +- `setPreviewImage` +- `setUploadMessage` +- `setOpenProductId` +- `setViewMode` +- `reset` + +--- + +## 5. Cliente API centralizado + +`src/api/client.ts` incluye: + +- `DEV_API_BASE` y `API_BASE` para la URL del backend +- `getApiBase` / `buildApiUrl` para construir endpoints +- `fetchClientConfig` para obtener configuración de cliente +- `uploadRoomImage` para subir imágenes al servidor +- `startSession` para iniciar una sesión remota + +Esta capa permite mantener la URL del backend en un solo lugar y soportar un token de desarrollo automático. + +--- + +## 6. Hooks compartidos + +### `src/hooks/useUploadImage.ts` + +- Maneja la subida de imágenes al backend +- Controla `isUploading` y `uploadError` +- Envuelve `uploadRoomImage` del cliente API + +--- + +## 7. Tipos globales + +`src/types.ts` declara tipos comunes como: + +- `ClientData` +- `RouteItem` +- `Product` + +El tipo `Product` se usa en el visualizador para productos de catálogo. + +--- + +## 8. Feature: Room Setup + +### Archivos + +- `src/features/roomSetup/RoomSetup.tsx` +- `src/features/roomSetup/roomSetupHooks.ts` +- `src/features/roomSetup/RoomSetupComponents.tsx` +- `src/data/roomSetupData.ts` + +### Comportamiento + +`RoomSetup` es la página principal donde el usuario puede: + +- subir una imagen arrastrando o seleccionando archivo +- ver una vista previa de la imagen +- iniciar la navegación hacia el visualizador +- ver habitaciones de demostración filtrables + +### `useRoomSetup` + +Este hook abstrae toda la lógica de: + +- drag & drop +- selección de archivos +- subida de imagen +- gestión de estados de carga +- navegación con `useNavigate` + +### Componentes auxiliares + +- `FilterButton` - botón de filtrado por categoría +- `RoomCard` - tarjeta de habitación de demostración + +--- + +## 9. Feature: Room Visualizer + +### Archivos + +- `src/features/roomVisualizer/RoomVisualizer.tsx` +- `src/features/roomVisualizer/roomVisualizerHooks.ts` +- `src/features/roomVisualizer/roomVisualizerData.ts` +- `src/features/roomVisualizer/ProductCards.tsx` + +### Comportamiento + +`RoomVisualizer` muestra: + +- la imagen subida por el usuario +- controles de zoom y arrastre de la imagen +- lista / grid de productos para aplicar en la habitación +- selección de producto y detalles asociados + +### `useRoomVisualizer` + +Extrae la lógica de visualización de productos: + +- modo de vista (`grid` / `list`) +- búsqueda y filtros básicos +- producto seleccionado +- manejo de selección de producto +- agrupación en chunks para renderizar grillas + +### Datos de productos + +- `roomVisualizerData.ts` contiene el catálogo de productos estáticos usados en la vista. + +### Componentes + +- `ProductGroupCard` - renderiza un grupo de 3 productos en grid +- `IndividualProductCard` - renderiza un producto en modo lista + +--- + +## 10. Feature: Settings + +### Archivo + +- `src/features/settings/SettingsPage.tsx` + +### Comportamiento + +La página de configuración permite al usuario: + +- definir la URL base de la API +- activar / desactivar la lista de rutas en el viewer +- definir token de desarrollo automático + +### Soporte de almacenamiento + +`src/utils/settings.ts` gestiona: + +- carga de `localStorage` +- guardado de configuración +- valores por defecto + +--- + +## 11. Componentes comunes + +- `src/components/ui/LoadingScreen.tsx` - pantalla de carga reutilizable + +--- + +## 12. Flujo principal de la app + +1. Usuario entra en `/` +2. Sube una imagen en `RoomSetup` +3. Se crea una vista previa y se almacena en Zustand +4. Se navega a `/visualizer` +5. `RoomVisualizer` usa la imagen y muestra productos +6. El usuario filtra, busca y selecciona productos +7. `SettingsPage` permite ajustar la API y opciones de la app + +--- + +## 13. Cómo ejecutar el frontend + +Desde `frontend/`: + +```bash +npm install +npm run dev +``` + +Construcción de producción: + +```bash +npm run build +``` + +--- + +## 14. Posibles mejoras futuras + +- mover `roomVisualizerProducts` a una API real o servicio de datos +- extraer más componentes presentacionales del visualizador +- usar React Query para cargar configuración del cliente en lugar de gestión manual +- añadir tests unitarios para hooks y componentes +- normalizar rutas y nombres de features + +--- + +## 15. Observaciones adicionales + +- La base API se controla desde `VITE_API_BASE_URL` o `DEV_API_BASE` en desarrollo. +- La aplicación usa `queryClient` de React Query, aunque hoy solo se usa para potenciales fetches futuros. +- El estado global es ligero y se usa principalmente para compartir imagen previa, modo de vista y selección de producto. diff --git a/frontend/README.md b/frontend/README.md index 34232b5b0ec06c40d634003f8dce48f5aeccf25f..7dbf7ebf3b2a3d84ad526bc47810d1d211331b8b 100644 --- a/frontend/README.md +++ b/frontend/README.md @@ -1,73 +1,73 @@ -# React + TypeScript + Vite - -This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. - -Currently, two official plugins are available: - -- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Oxc](https://oxc.rs) -- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) - -## React Compiler - -The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation). - -## Expanding the ESLint configuration - -If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules: - -```js -export default defineConfig([ - globalIgnores(['dist']), - { - files: ['**/*.{ts,tsx}'], - extends: [ - // Other configs... - - // Remove tseslint.configs.recommended and replace with this - tseslint.configs.recommendedTypeChecked, - // Alternatively, use this for stricter rules - tseslint.configs.strictTypeChecked, - // Optionally, add this for stylistic rules - tseslint.configs.stylisticTypeChecked, - - // Other configs... - ], - languageOptions: { - parserOptions: { - project: ['./tsconfig.node.json', './tsconfig.app.json'], - tsconfigRootDir: import.meta.dirname, - }, - // other options... - }, - }, -]) -``` - -You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules: - -```js -// eslint.config.js -import reactX from 'eslint-plugin-react-x' -import reactDom from 'eslint-plugin-react-dom' - -export default defineConfig([ - globalIgnores(['dist']), - { - files: ['**/*.{ts,tsx}'], - extends: [ - // Other configs... - // Enable lint rules for React - reactX.configs['recommended-typescript'], - // Enable lint rules for React DOM - reactDom.configs.recommended, - ], - languageOptions: { - parserOptions: { - project: ['./tsconfig.node.json', './tsconfig.app.json'], - tsconfigRootDir: import.meta.dirname, - }, - // other options... - }, - }, -]) -``` +# React + TypeScript + Vite + +This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. + +Currently, two official plugins are available: + +- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Oxc](https://oxc.rs) +- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) + +## React Compiler + +The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation). + +## Expanding the ESLint configuration + +If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules: + +```js +export default defineConfig([ + globalIgnores(['dist']), + { + files: ['**/*.{ts,tsx}'], + extends: [ + // Other configs... + + // Remove tseslint.configs.recommended and replace with this + tseslint.configs.recommendedTypeChecked, + // Alternatively, use this for stricter rules + tseslint.configs.strictTypeChecked, + // Optionally, add this for stylistic rules + tseslint.configs.stylisticTypeChecked, + + // Other configs... + ], + languageOptions: { + parserOptions: { + project: ['./tsconfig.node.json', './tsconfig.app.json'], + tsconfigRootDir: import.meta.dirname, + }, + // other options... + }, + }, +]) +``` + +You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules: + +```js +// eslint.config.js +import reactX from 'eslint-plugin-react-x' +import reactDom from 'eslint-plugin-react-dom' + +export default defineConfig([ + globalIgnores(['dist']), + { + files: ['**/*.{ts,tsx}'], + extends: [ + // Other configs... + // Enable lint rules for React + reactX.configs['recommended-typescript'], + // Enable lint rules for React DOM + reactDom.configs.recommended, + ], + languageOptions: { + parserOptions: { + project: ['./tsconfig.node.json', './tsconfig.app.json'], + tsconfigRootDir: import.meta.dirname, + }, + // other options... + }, + }, +]) +``` diff --git a/frontend/eslint.config.js b/frontend/eslint.config.js index d41a94898978b552cc09e2ed0cac1449a31fe30b..5e6b472f583e34a1cca751440d4f241495475723 100644 --- a/frontend/eslint.config.js +++ b/frontend/eslint.config.js @@ -1,23 +1,23 @@ -import js from '@eslint/js' -import globals from 'globals' -import reactHooks from 'eslint-plugin-react-hooks' -import reactRefresh from 'eslint-plugin-react-refresh' -import tseslint from 'typescript-eslint' -import { defineConfig, globalIgnores } from 'eslint/config' - -export default defineConfig([ - globalIgnores(['dist']), - { - files: ['**/*.{ts,tsx}'], - extends: [ - js.configs.recommended, - tseslint.configs.recommended, - reactHooks.configs.flat.recommended, - reactRefresh.configs.vite, - ], - languageOptions: { - ecmaVersion: 2020, - globals: globals.browser, - }, - }, -]) +import js from '@eslint/js' +import globals from 'globals' +import reactHooks from 'eslint-plugin-react-hooks' +import reactRefresh from 'eslint-plugin-react-refresh' +import tseslint from 'typescript-eslint' +import { defineConfig, globalIgnores } from 'eslint/config' + +export default defineConfig([ + globalIgnores(['dist']), + { + files: ['**/*.{ts,tsx}'], + extends: [ + js.configs.recommended, + tseslint.configs.recommended, + reactHooks.configs.flat.recommended, + reactRefresh.configs.vite, + ], + languageOptions: { + ecmaVersion: 2020, + globals: globals.browser, + }, + }, +]) diff --git a/frontend/index.html b/frontend/index.html index 4e43d7613289d19607b2b206d081005d17bd0ef1..edb4df1ef81e845d34be41842ed0a55a70ea5e86 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -1,35 +1,28 @@ - - - - - - - - - - - - - - - - - - - - - - - Hyper Reality Visualizer - - -
- - - + + + + + + + + + + + + + + + + + + + + + + Hyper Reality Visualizer + + +
+ + + diff --git a/frontend/package.json b/frontend/package.json index daaf694248843191f2d7c86bdc2e03705bae687c..777bdbc00cd7f2df82da15a4c9569631a099d13c 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,47 +1,47 @@ -{ - "name": "frontend", - "private": true, - "version": "0.1.0", - "type": "module", - "scripts": { - "dev": "vite", - "build": "tsc -b && vite build", - "build:app": "npm run build", - "lint": "eslint .", - "preview": "vite preview", - "generate:version": "node ./scripts/generate-version.js", - "predev": "npm run generate:version", - "prebuild": "npm run generate:version", - "version:patch": "npm version patch --no-git-tag-version", - "version:minor": "npm version minor --no-git-tag-version", - "version:major": "npm version major --no-git-tag-version" - }, - "dependencies": { - "@tanstack/react-query": "^5.99.2", - "@tanstack/react-query-devtools": "^5.99.2", - "lucide-react": "^1.8.0", - "react": "^19.2.5", - "react-dom": "^19.2.5", - "react-router-dom": "^7.14.2", - "react-share": "^5.3.0", - "sweetalert2": "^11.26.24", - "zustand": "^5.0.12" - }, - "devDependencies": { - "@eslint/js": "^9.39.4", - "@types/node": "^24.12.2", - "@types/react": "^19.2.14", - "@types/react-dom": "^19.2.3", - "@vitejs/plugin-react": "^6.0.1", - "autoprefixer": "^10.4.19", - "eslint": "^9.39.4", - "eslint-plugin-react-hooks": "^7.1.1", - "eslint-plugin-react-refresh": "^0.5.2", - "globals": "^17.5.0", - "postcss": "^8.5.10", - "tailwindcss": "^3.4.5", - "typescript": "~6.0.2", - "typescript-eslint": "^8.58.2", - "vite": "^8.0.9" - } -} +{ + "name": "frontend", + "private": true, + "version": "0.1.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc -b && vite build", + "build:app": "npm run build", + "lint": "eslint .", + "preview": "vite preview", + "generate:version": "node ./scripts/generate-version.js", + "predev": "npm run generate:version", + "prebuild": "npm run generate:version", + "version:patch": "npm version patch --no-git-tag-version", + "version:minor": "npm version minor --no-git-tag-version", + "version:major": "npm version major --no-git-tag-version" + }, + "dependencies": { + "@tanstack/react-query": "^5.99.2", + "@tanstack/react-query-devtools": "^5.99.2", + "lucide-react": "^1.8.0", + "react": "^19.2.5", + "react-dom": "^19.2.5", + "react-router-dom": "^7.14.2", + "react-share": "^5.3.0", + "sweetalert2": "^11.26.24", + "zustand": "^5.0.12" + }, + "devDependencies": { + "@eslint/js": "^9.39.4", + "@types/node": "^24.12.2", + "@types/react": "^19.2.14", + "@types/react-dom": "^19.2.3", + "@vitejs/plugin-react": "^6.0.1", + "autoprefixer": "^10.4.19", + "eslint": "^9.39.4", + "eslint-plugin-react-hooks": "^7.1.1", + "eslint-plugin-react-refresh": "^0.5.2", + "globals": "^17.5.0", + "postcss": "^8.5.10", + "tailwindcss": "^3.4.5", + "typescript": "~6.0.2", + "typescript-eslint": "^8.58.2", + "vite": "^8.0.9" + } +} diff --git a/frontend/postcss.config.js b/frontend/postcss.config.js index daedffd2bf4950df77bf2c9d6920181331f4c48a..2aa7205d4b402a1bdfbe07110c61df920b370066 100644 --- a/frontend/postcss.config.js +++ b/frontend/postcss.config.js @@ -1,6 +1,6 @@ -export default { - plugins: { - tailwindcss: {}, - autoprefixer: {}, - }, -}; +export default { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +}; diff --git a/frontend/public/icons.svg b/frontend/public/icons.svg index 5615851e102ba0b9d90688db879e9f9db99ab0fa..e9522193d9f796a9748e9ad8c952a5df73c87db9 100644 --- a/frontend/public/icons.svg +++ b/frontend/public/icons.svg @@ -1,24 +1,24 @@ - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/frontend/rewrite_css.py b/frontend/rewrite_css.py index 0ad2dc7ebceabb4cb7b711284365b410b91eca19..185b7d3af6bf0ce2f731248055d21b08c11f60b5 100644 --- a/frontend/rewrite_css.py +++ b/frontend/rewrite_css.py @@ -1,509 +1,509 @@ -from pathlib import Path - -app_css = ''' -:root { - font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; - color: #111827; - background: #f8fafc; - line-height: 1.5; -} - -*, *::before, *::after { - box-sizing: border-box; -} - -html, body, #root { - min-height: 100%; -} - -body { - margin: 0; - background: #f8fafc; - color: #111827; -} - -button, input, select, textarea { - font: inherit; -} - -button { - cursor: pointer; -} - -.app-shell { - max-width: 1200px; - margin: 0 auto; - padding: 24px; -} - -.topbar { - display: flex; - flex-wrap: wrap; - justify-content: space-between; - align-items: center; - gap: 16px; - padding: 22px 24px; - background: #ffffff; - border: 1px solid #e5e7eb; - border-radius: 18px; -} - -.topbar h1 { - margin: 0; - font-size: clamp(1.9rem, 2.5vw, 2.6rem); -} - -.topbar p { - margin: 6px 0 0; - color: #475569; -} - -.topbar-nav { - display: flex; - flex-wrap: wrap; - gap: 10px; -} - -.topbar-nav a { - display: inline-flex; - align-items: center; - justify-content: center; - padding: 10px 14px; - border-radius: 14px; - background: #f8fafc; - color: #334155; - text-decoration: none; - border: 1px solid transparent; - transition: background 0.2s ease, border-color 0.2s ease; -} - -.topbar-nav a:hover { - background: #ffffff; - border-color: #d1d5db; -} - -.content-viewer { - margin-top: 24px; -} - -.route-index, -.panel, -.viewer-panel, -.bridge-panel, -.room-setup-dropzone, -.room-setup-card, -.room-setup-preview { - background: #ffffff; - border: 1px solid #e5e7eb; - border-radius: 20px; -} - -.route-index, -.panel, -.viewer-panel, -.bridge-panel, -.room-setup-card { - padding: 22px; -} - -.route-index h2, -.panel h2, -.viewer-panel h2, -.room-setup-copy h1, -.room-setup-bottom h2 { - margin: 0 0 16px; -} - -.route-index p, -.room-setup-features li, -.room-setup-drop-content p, -.room-setup-drop-content small, -.room-setup-card h3, -.topbar p, -.error-box, -.empty-state { - color: #475569; -} - -.route-index ul, -.room-setup-features, -.room-setup-filters, -.room-setup-grid { - margin: 0; - padding: 0; - list-style: none; -} - -.route-index ul { - display: grid; - gap: 12px; -} - -.form-row { - display: grid; - gap: 14px; - margin-bottom: 20px; -} - -label { - font-size: 0.95rem; - color: #334155; -} - -input, -select, -textarea { - width: 100%; - padding: 14px 16px; - border-radius: 14px; - border: 1px solid #d1d5db; - background: #f8fafc; - color: #111827; -} - -input:focus, -select:focus, -textarea:focus { - outline: 2px solid #cbd5e1; - outline-offset: 2px; -} - -.button, -.button-primary, -.button-secondary { - display: inline-flex; - align-items: center; - justify-content: center; - gap: 10px; - border-radius: 16px; - padding: 14px 18px; - font-weight: 700; - border: 1px solid transparent; - transition: all 0.2s ease; -} - -.button { - background: #111827; - color: #ffffff; -} - -.button:hover { - opacity: 0.95; -} - -.button.secondary, -.button-secondary { - background: #f3f4f6; - color: #111827; - border-color: #d1d5db; -} - -.error-box { - margin-top: 16px; - padding: 16px; - border-radius: 16px; - background: #fef2f2; - color: #991b1b; - border: 1px solid #fecaca; -} - -.empty-state { - min-height: 220px; - display: grid; - place-content: center; - border: 1px dashed #d1d5db; - border-radius: 18px; -} - -.room-setup { - background: #f8fafc; -} - -.room-setup-inner { - max-width: 1200px; - margin: 0 auto; - padding: 32px 24px; -} - -.room-setup-header { - display: flex; - justify-content: flex-end; - margin-bottom: 24px; -} - -.room-setup-close { - border: none; - background: transparent; - color: #475569; - padding: 10px; - border-radius: 999px; - cursor: pointer; -} - -.room-setup-close:hover { - background: #e5e7eb; -} - -.room-setup-top { - display: grid; - gap: 24px; - grid-template-columns: 1.1fr 0.9fr; - margin-bottom: 40px; -} - -.room-setup-copy h1 { - margin: 0 0 24px; - font-size: clamp(2rem, 2.5vw, 3rem); - color: #111827; -} - -.room-setup-features { - display: grid; - gap: 16px; -} - -.room-setup-features li { - display: flex; - align-items: center; - gap: 12px; - color: #475569; -} - -.room-setup-actions { - display: grid; - gap: 16px; -} - -.button-primary { - background: #111827; - color: #ffffff; -} - -.button-primary:hover { - opacity: 0.95; -} - -.button-secondary { - background: #ffffff; - color: #334155; - border-color: #d1d5db; -} - -.button-secondary:hover { - background: #f3f4f6; -} - -.button-icon-border { - display: inline-flex; - align-items: center; - justify-content: center; - width: 30px; - height: 30px; - border-radius: 10px; - border: 1px solid #d1d5db; -} - -.room-setup-dropzone { - position: relative; - min-height: 420px; - display: flex; - align-items: center; - justify-content: center; - transition: all 0.2s ease; - padding: 24px; - border: 1px dashed #d1d5db; - border-radius: 28px; -} - -.room-setup-dropzone.dragging { - background: #f3f4f6; -} - -.room-setup-file-input { - position: absolute; - inset: 0; - width: 100%; - height: 100%; - opacity: 0; - cursor: pointer; -} - -.room-setup-drop-content { - text-align: center; -} - -.room-setup-drop-icon { - display: inline-flex; - align-items: center; - justify-content: center; - width: 72px; - height: 72px; - border-radius: 999px; - background: #e2e8f0; - color: #64748b; - margin-bottom: 18px; -} - -.room-setup-drop-icon.active { - background: #dbeafe; - color: #1e293b; -} - -.room-setup-drop-content h3 { - margin: 0 0 8px; - font-size: 1.2rem; -} - -.room-setup-drop-content p, -.room-setup-drop-content small { - margin: 0; - color: #64748b; -} - -.room-setup-preview { - position: relative; - width: 100%; - height: 100%; -} - -.room-setup-preview img { - width: 100%; - height: 100%; - object-fit: cover; -} - -.room-setup-preview-overlay { - position: absolute; - inset: 0; - background: rgba(255, 255, 255, 0.85); - display: flex; - align-items: center; - justify-content: center; - opacity: 0; - transition: opacity 0.2s ease; -} - -.room-setup-preview:hover .room-setup-preview-overlay { - opacity: 1; -} - -.button-delete { - background: #ffffff; - color: #111827; - padding: 12px 16px; - border-radius: 14px; - font-weight: 600; - border: 1px solid #d1d5db; -} - -.room-setup-bottom h2 { - margin: 0 0 24px; -} - -.room-setup-filters { - display: flex; - flex-wrap: wrap; - gap: 10px; - margin-bottom: 24px; -} - -.room-setup-filter { - border: 1px solid #d1d5db; - background: #ffffff; - color: #334155; - padding: 10px 16px; - border-radius: 16px; - cursor: pointer; - transition: all 0.2s ease; -} - -.room-setup-filter.active { - background: #f3f4f6; -} - -.room-setup-grid { - display: grid; - grid-template-columns: repeat(1, minmax(0, 1fr)); - gap: 20px; -} - -.room-setup-card { - overflow: hidden; - border-radius: 24px; - background: #ffffff; - box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06); -} - -.room-setup-card-image { - position: relative; - aspect-ratio: 4 / 3; - overflow: hidden; -} - -.room-setup-card-image img { - width: 100%; - height: 100%; - object-fit: cover; - transition: transform 0.4s ease; -} - -.room-setup-card:hover .room-setup-card-image img { - transform: scale(1.04); -} - -.room-setup-card h3 { - margin: 16px; - font-size: 1rem; - color: #334155; -} - -.app-version-badge { - position: fixed; - right: 0; - bottom: 0; - padding: 10px 14px; - border-radius: 12px 0 0 0; - background: rgba(255, 255, 255, 0.95); - border: 1px solid #e5e7eb; - color: #475569; - font-size: 0.8rem; - z-index: 1000; -} - -.app-version-badge span { - display: block; - font-weight: 700; - color: #111827; -} - -.app-version-badge small { - display: block; - margin-top: 2px; -} - -@media (max-width: 960px) { - .room-setup-top { - grid-template-columns: 1fr; - } - - .room-setup-grid { - grid-template-columns: repeat(2, minmax(0, 1fr)); - } -} - -@media (max-width: 640px) { - .room-setup-inner { - padding: 20px 16px; - } - - .room-setup-grid { - grid-template-columns: 1fr; - } -} - -@media (max-width: 900px) { - .content { - grid-template-columns: 1fr; - } -} +from pathlib import Path + +app_css = ''' +:root { + font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; + color: #111827; + background: #f8fafc; + line-height: 1.5; +} + +*, *::before, *::after { + box-sizing: border-box; +} + +html, body, #root { + min-height: 100%; +} + +body { + margin: 0; + background: #f8fafc; + color: #111827; +} + +button, input, select, textarea { + font: inherit; +} + +button { + cursor: pointer; +} + +.app-shell { + max-width: 1200px; + margin: 0 auto; + padding: 24px; +} + +.topbar { + display: flex; + flex-wrap: wrap; + justify-content: space-between; + align-items: center; + gap: 16px; + padding: 22px 24px; + background: #ffffff; + border: 1px solid #e5e7eb; + border-radius: 18px; +} + +.topbar h1 { + margin: 0; + font-size: clamp(1.9rem, 2.5vw, 2.6rem); +} + +.topbar p { + margin: 6px 0 0; + color: #475569; +} + +.topbar-nav { + display: flex; + flex-wrap: wrap; + gap: 10px; +} + +.topbar-nav a { + display: inline-flex; + align-items: center; + justify-content: center; + padding: 10px 14px; + border-radius: 14px; + background: #f8fafc; + color: #334155; + text-decoration: none; + border: 1px solid transparent; + transition: background 0.2s ease, border-color 0.2s ease; +} + +.topbar-nav a:hover { + background: #ffffff; + border-color: #d1d5db; +} + +.content-viewer { + margin-top: 24px; +} + +.route-index, +.panel, +.viewer-panel, +.bridge-panel, +.room-setup-dropzone, +.room-setup-card, +.room-setup-preview { + background: #ffffff; + border: 1px solid #e5e7eb; + border-radius: 20px; +} + +.route-index, +.panel, +.viewer-panel, +.bridge-panel, +.room-setup-card { + padding: 22px; +} + +.route-index h2, +.panel h2, +.viewer-panel h2, +.room-setup-copy h1, +.room-setup-bottom h2 { + margin: 0 0 16px; +} + +.route-index p, +.room-setup-features li, +.room-setup-drop-content p, +.room-setup-drop-content small, +.room-setup-card h3, +.topbar p, +.error-box, +.empty-state { + color: #475569; +} + +.route-index ul, +.room-setup-features, +.room-setup-filters, +.room-setup-grid { + margin: 0; + padding: 0; + list-style: none; +} + +.route-index ul { + display: grid; + gap: 12px; +} + +.form-row { + display: grid; + gap: 14px; + margin-bottom: 20px; +} + +label { + font-size: 0.95rem; + color: #334155; +} + +input, +select, +textarea { + width: 100%; + padding: 14px 16px; + border-radius: 14px; + border: 1px solid #d1d5db; + background: #f8fafc; + color: #111827; +} + +input:focus, +select:focus, +textarea:focus { + outline: 2px solid #cbd5e1; + outline-offset: 2px; +} + +.button, +.button-primary, +.button-secondary { + display: inline-flex; + align-items: center; + justify-content: center; + gap: 10px; + border-radius: 16px; + padding: 14px 18px; + font-weight: 700; + border: 1px solid transparent; + transition: all 0.2s ease; +} + +.button { + background: #111827; + color: #ffffff; +} + +.button:hover { + opacity: 0.95; +} + +.button.secondary, +.button-secondary { + background: #f3f4f6; + color: #111827; + border-color: #d1d5db; +} + +.error-box { + margin-top: 16px; + padding: 16px; + border-radius: 16px; + background: #fef2f2; + color: #991b1b; + border: 1px solid #fecaca; +} + +.empty-state { + min-height: 220px; + display: grid; + place-content: center; + border: 1px dashed #d1d5db; + border-radius: 18px; +} + +.room-setup { + background: #f8fafc; +} + +.room-setup-inner { + max-width: 1200px; + margin: 0 auto; + padding: 32px 24px; +} + +.room-setup-header { + display: flex; + justify-content: flex-end; + margin-bottom: 24px; +} + +.room-setup-close { + border: none; + background: transparent; + color: #475569; + padding: 10px; + border-radius: 999px; + cursor: pointer; +} + +.room-setup-close:hover { + background: #e5e7eb; +} + +.room-setup-top { + display: grid; + gap: 24px; + grid-template-columns: 1.1fr 0.9fr; + margin-bottom: 40px; +} + +.room-setup-copy h1 { + margin: 0 0 24px; + font-size: clamp(2rem, 2.5vw, 3rem); + color: #111827; +} + +.room-setup-features { + display: grid; + gap: 16px; +} + +.room-setup-features li { + display: flex; + align-items: center; + gap: 12px; + color: #475569; +} + +.room-setup-actions { + display: grid; + gap: 16px; +} + +.button-primary { + background: #111827; + color: #ffffff; +} + +.button-primary:hover { + opacity: 0.95; +} + +.button-secondary { + background: #ffffff; + color: #334155; + border-color: #d1d5db; +} + +.button-secondary:hover { + background: #f3f4f6; +} + +.button-icon-border { + display: inline-flex; + align-items: center; + justify-content: center; + width: 30px; + height: 30px; + border-radius: 10px; + border: 1px solid #d1d5db; +} + +.room-setup-dropzone { + position: relative; + min-height: 420px; + display: flex; + align-items: center; + justify-content: center; + transition: all 0.2s ease; + padding: 24px; + border: 1px dashed #d1d5db; + border-radius: 28px; +} + +.room-setup-dropzone.dragging { + background: #f3f4f6; +} + +.room-setup-file-input { + position: absolute; + inset: 0; + width: 100%; + height: 100%; + opacity: 0; + cursor: pointer; +} + +.room-setup-drop-content { + text-align: center; +} + +.room-setup-drop-icon { + display: inline-flex; + align-items: center; + justify-content: center; + width: 72px; + height: 72px; + border-radius: 999px; + background: #e2e8f0; + color: #64748b; + margin-bottom: 18px; +} + +.room-setup-drop-icon.active { + background: #dbeafe; + color: #1e293b; +} + +.room-setup-drop-content h3 { + margin: 0 0 8px; + font-size: 1.2rem; +} + +.room-setup-drop-content p, +.room-setup-drop-content small { + margin: 0; + color: #64748b; +} + +.room-setup-preview { + position: relative; + width: 100%; + height: 100%; +} + +.room-setup-preview img { + width: 100%; + height: 100%; + object-fit: cover; +} + +.room-setup-preview-overlay { + position: absolute; + inset: 0; + background: rgba(255, 255, 255, 0.85); + display: flex; + align-items: center; + justify-content: center; + opacity: 0; + transition: opacity 0.2s ease; +} + +.room-setup-preview:hover .room-setup-preview-overlay { + opacity: 1; +} + +.button-delete { + background: #ffffff; + color: #111827; + padding: 12px 16px; + border-radius: 14px; + font-weight: 600; + border: 1px solid #d1d5db; +} + +.room-setup-bottom h2 { + margin: 0 0 24px; +} + +.room-setup-filters { + display: flex; + flex-wrap: wrap; + gap: 10px; + margin-bottom: 24px; +} + +.room-setup-filter { + border: 1px solid #d1d5db; + background: #ffffff; + color: #334155; + padding: 10px 16px; + border-radius: 16px; + cursor: pointer; + transition: all 0.2s ease; +} + +.room-setup-filter.active { + background: #f3f4f6; +} + +.room-setup-grid { + display: grid; + grid-template-columns: repeat(1, minmax(0, 1fr)); + gap: 20px; +} + +.room-setup-card { + overflow: hidden; + border-radius: 24px; + background: #ffffff; + box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06); +} + +.room-setup-card-image { + position: relative; + aspect-ratio: 4 / 3; + overflow: hidden; +} + +.room-setup-card-image img { + width: 100%; + height: 100%; + object-fit: cover; + transition: transform 0.4s ease; +} + +.room-setup-card:hover .room-setup-card-image img { + transform: scale(1.04); +} + +.room-setup-card h3 { + margin: 16px; + font-size: 1rem; + color: #334155; +} + +.app-version-badge { + position: fixed; + right: 0; + bottom: 0; + padding: 10px 14px; + border-radius: 12px 0 0 0; + background: rgba(255, 255, 255, 0.95); + border: 1px solid #e5e7eb; + color: #475569; + font-size: 0.8rem; + z-index: 1000; +} + +.app-version-badge span { + display: block; + font-weight: 700; + color: #111827; +} + +.app-version-badge small { + display: block; + margin-top: 2px; +} + +@media (max-width: 960px) { + .room-setup-top { + grid-template-columns: 1fr; + } + + .room-setup-grid { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } +} + +@media (max-width: 640px) { + .room-setup-inner { + padding: 20px 16px; + } + + .room-setup-grid { + grid-template-columns: 1fr; + } +} + +@media (max-width: 900px) { + .content { + grid-template-columns: 1fr; + } +} '@; Set-Content -Path '.\src\App.css' -Value $content" \ No newline at end of file diff --git a/frontend/scripts/generate-version.js b/frontend/scripts/generate-version.js index babb8f01406614bcd3da29b6d3724d63c0abfd2d..7477ab8c75953bc7924132a840f4b7ab7e981828 100644 --- a/frontend/scripts/generate-version.js +++ b/frontend/scripts/generate-version.js @@ -1,19 +1,19 @@ -import { readFileSync, writeFileSync } from "node:fs"; -import { dirname, join } from "node:path"; -import { fileURLToPath } from "node:url"; - -const root = dirname(fileURLToPath(import.meta.url)); -const frontendRoot = join(root, ".."); -const pkg = JSON.parse( - readFileSync(join(frontendRoot, "package.json"), "utf8"), -); -const version = pkg.version || "0.0.0"; -const timestamp = new Date() - .toISOString() - .replace(/[-:]/g, "") - .replace(/\.\d+Z$/, ""); -const fullVersion = `${version}-dev.${timestamp}`; -const content = `export const appVersion = ${JSON.stringify(fullVersion)};\n`; - -writeFileSync(join(frontendRoot, "src", "version.ts"), content, "utf8"); -console.log(`Generated version: ${fullVersion}`); +import { readFileSync, writeFileSync } from "node:fs"; +import { dirname, join } from "node:path"; +import { fileURLToPath } from "node:url"; + +const root = dirname(fileURLToPath(import.meta.url)); +const frontendRoot = join(root, ".."); +const pkg = JSON.parse( + readFileSync(join(frontendRoot, "package.json"), "utf8"), +); +const version = pkg.version || "0.0.0"; +const timestamp = new Date() + .toISOString() + .replace(/[-:]/g, "") + .replace(/\.\d+Z$/, ""); +const fullVersion = `${version}-dev.${timestamp}`; +const content = `export const appVersion = ${JSON.stringify(fullVersion)};\n`; + +writeFileSync(join(frontendRoot, "src", "version.ts"), content, "utf8"); +console.log(`Generated version: ${fullVersion}`); diff --git a/frontend/src/App.css b/frontend/src/App.css index 88bdd297400b7f41962df107956307b4c822a537..118acc923fb1be3f8fcadf52864bbc27d1c87e5c 100644 --- a/frontend/src/App.css +++ b/frontend/src/App.css @@ -1,542 +1,542 @@ -:root { - font-family: - Inter, - ui-sans-serif, - system-ui, - -apple-system, - BlinkMacSystemFont, - "Segoe UI", - sans-serif; - color: var(--brand-black); - background: var(--brand-light); - line-height: 1.5; -} - -* { - box-sizing: border-box; -} - -html, -body, -#root { - min-height: 100%; -} - -body { - margin: 0; - background: var(--brand-light); - color: var(--brand-black); -} - -button, -input, -select, -textarea { - font: inherit; -} - -button { - cursor: pointer; -} - -.app-shell { - max-width: 1200px; - margin: 0 auto; - padding: 24px; -} - -.topbar { - display: flex; - flex-wrap: wrap; - justify-content: space-between; - align-items: center; - gap: 16px; - padding: 22px 24px; - background: var(--brand-surface); - border: 1px solid var(--brand-border); - border-radius: 18px; -} - -.topbar h1 { - margin: 0; - font-size: clamp(1.9rem, 2.5vw, 2.6rem); -} - -.topbar p { - margin: 6px 0 0; - color: var(--brand-gray); -} - -.topbar-nav { - display: flex; - flex-wrap: wrap; - gap: 10px; -} - -.topbar-nav a { - display: inline-flex; - align-items: center; - justify-content: center; - padding: 10px 14px; - border-radius: 14px; - background: var(--brand-surface); - color: var(--brand-black); - text-decoration: none; - border: 1px solid transparent; - transition: - background 0.2s ease, - border-color 0.2s ease; -} - -.topbar-nav a:hover { - background: #ffffff; - border-color: #d1d5db; -} - -.content { - display: grid; - gap: 24px; - grid-template-columns: 1.2fr 1.8fr; - margin-top: 24px; -} - -.route-index, -.panel, -.viewer-panel, -.bridge-panel, -.room-setup-dropzone, -.room-setup-card, -.room-setup-preview { - background: var(--brand-surface); - border: 1px solid var(--brand-border); - border-radius: 20px; -} - -.route-index, -.panel, -.viewer-panel, -.bridge-panel, -.room-setup-card { - padding: 22px; -} - -.route-index h2, -.panel h2, -.viewer-panel h2, -.room-setup-copy h1, -.room-setup-bottom h2 { - margin: 0 0 16px; -} - -.route-index p, -.room-setup-features li, -.room-setup-drop-content p, -.room-setup-drop-content small, -.room-setup-card h3, -.topbar p, -.error-box, -.empty-state { - color: #475569; -} - -.route-index ul, -.room-setup-features, -.room-setup-filters, -.room-setup-grid { - margin: 0; - padding: 0; - list-style: none; -} - -.route-index ul { - display: grid; - gap: 12px; -} - -.form-row { - display: grid; - gap: 14px; - margin-bottom: 20px; -} - -label { - font-size: 0.95rem; - color: var(--brand-black); -} - -input, -select, -textarea { - width: 100%; - padding: 14px 16px; - border-radius: 14px; - border: 1px solid #d1d5db; - background: #ffffff; - color: #111827; -} - -input:focus, -select:focus, -textarea:focus { - outline: 2px solid var(--brand-blue); - outline-offset: 2px; -} - -.button, -.button-primary, -.button-secondary { - display: inline-flex; - align-items: center; - justify-content: center; - gap: 10px; - border-radius: 16px; - padding: 14px 18px; - font-weight: 700; - border: 1px solid transparent; - transition: all 0.2s ease; -} - -.button { - background: var(--brand-black); - color: var(--brand-surface); -} - -.button:hover { - opacity: 0.95; -} - -.button.secondary, -.button-secondary { - background: var(--brand-surface); - color: var(--brand-black); - border-color: var(--brand-border); -} - -.error-box { - margin-top: 16px; - padding: 16px; - border-radius: 16px; - background: #fef2f2; - color: #991b1b; - border: 1px solid #fecaca; -} - -.empty-state { - min-height: 220px; - display: grid; - place-content: center; - border: 1px dashed #d1d5db; - border-radius: 18px; -} - -.room-setup { - background: var(--brand-light); -} - -.room-setup-inner { - max-width: 1200px; - margin: 0 auto; - padding: 32px 24px; -} - -.room-setup-header { - display: flex; - justify-content: flex-end; - margin-bottom: 24px; -} - -.room-setup-close { - border: none; - background: transparent; - color: var(--brand-black); - padding: 10px; - border-radius: 999px; - cursor: pointer; -} - -.room-setup-close:hover { - background: var(--brand-border); -} - -.room-setup-top { - display: grid; - gap: 24px; - grid-template-columns: 1.1fr 0.9fr; - margin-bottom: 40px; -} - -.room-setup-copy h1 { - margin: 0 0 24px; - font-size: clamp(2rem, 2.5vw, 3rem); - color: #111827; -} - -.room-setup-features { - display: grid; - gap: 16px; -} - -.room-setup-features li { - display: flex; - align-items: center; - gap: 12px; - color: #475569; -} - -.room-setup-actions { - display: grid; - gap: 16px; -} - -.button-primary { - background: #111827; - color: #ffffff; -} - -.button-primary:hover { - opacity: 0.95; -} - -.button-secondary { - background: #ffffff; - color: #334155; - border-color: #d1d5db; -} - -.button-secondary:hover { - background: #f3f4f6; -} - -.button-icon-border { - display: inline-flex; - align-items: center; - justify-content: center; - width: 30px; - height: 30px; - border-radius: 10px; - border: 1px solid #d1d5db; -} - -.room-setup-dropzone { - position: relative; - min-height: 420px; - display: flex; - align-items: center; - justify-content: center; - transition: all 0.2s ease; - padding: 24px; - border: 1px dashed #d1d5db; - border-radius: 28px; -} - -.room-setup-dropzone.dragging { - background: #f3f4f6; -} - -.room-setup-file-input { - position: absolute; - inset: 0; - width: 100%; - height: 100%; - opacity: 0; - cursor: pointer; -} - -.room-setup-drop-content { - text-align: center; -} - -.room-setup-drop-icon { - display: inline-flex; - align-items: center; - justify-content: center; - width: 72px; - height: 72px; - border-radius: 999px; - background: #e2e8f0; - color: #64748b; - margin-bottom: 18px; -} - -.room-setup-drop-icon.active { - background: #dbeafe; - color: #1e293b; -} - -.room-setup-drop-content h3 { - margin: 0 0 8px; - font-size: 1.2rem; -} - -.room-setup-drop-content p, -.room-setup-drop-content small { - margin: 0; - color: #64748b; -} - -.room-setup-preview { - position: relative; - width: 100%; - height: 100%; -} - -.room-setup-preview img { - width: 100%; - height: 100%; - object-fit: cover; -} - -.room-setup-preview-overlay { - position: absolute; - inset: 0; - background: rgba(255, 255, 255, 0.85); - display: flex; - align-items: center; - justify-content: center; - opacity: 0; - transition: opacity 0.2s ease; -} - -.room-setup-preview:hover .room-setup-preview-overlay { - opacity: 1; -} - -.button-delete { - background: #ffffff; - color: #111827; - padding: 12px 16px; - border-radius: 14px; - font-weight: 600; - border: 1px solid #d1d5db; -} - -.room-setup-bottom h2 { - margin: 0 0 24px; -} - -.room-setup-filters { - display: flex; - flex-wrap: wrap; - gap: 10px; - margin-bottom: 24px; -} - -.room-setup-filter { - border: 1px solid #d1d5db; - background: #ffffff; - color: #334155; - padding: 10px 16px; - border-radius: 16px; - cursor: pointer; - transition: all 0.2s ease; -} - -.room-setup-filter.active { - background: #f3f4f6; -} - -.room-setup-grid { - display: grid; - grid-template-columns: repeat(1, minmax(0, 1fr)); - gap: 20px; -} - -.room-setup-card { - overflow: hidden; - border-radius: 24px; - background: #ffffff; - box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06); -} - -.room-setup-card-image { - position: relative; - aspect-ratio: 4 / 3; - overflow: hidden; -} - -.room-setup-card-image img { - width: 100%; - height: 100%; - object-fit: cover; - transition: transform 0.4s ease; -} - -.room-setup-card:hover .room-setup-card-image img { - transform: scale(1.04); -} - -.room-setup-card h3 { - margin: 16px; - font-size: 1rem; - color: #334155; -} - -@media (max-width: 960px) { - .room-setup-top { - grid-template-columns: 1fr; - } - - .room-setup-grid { - grid-template-columns: repeat(2, minmax(0, 1fr)); - } -} - -@media (max-width: 640px) { - .room-setup-inner { - padding: 20px 16px; - } - - .room-setup-grid { - grid-template-columns: 1fr; - } -} - -.app-version-badge { - position: fixed; - right: 0; - bottom: 0; - padding: 6px 10px; - border-radius: 12px 0 0 0; - background: rgba(255, 255, 255, 0.95); - border: 1px solid #e5e7eb; - color: #475569; - font-size: 0.78rem; - text-align: right; - box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08); - z-index: 1000; -} - -.app-version-badge:hover { - opacity: 1; -} - -.app-version-badge span { - display: block; - font-weight: 700; - color: #111827; -} - -.app-version-badge small { - display: block; - margin-top: 1px; - color: #6b7280; -} - -@media (max-width: 640px) { - .app-version-badge { - right: 6px; - bottom: 6px; - padding: 5px 8px; - font-size: 0.72rem; - } - - .app-version-badge small { - margin-top: 0.5px; - } -} - -@media (max-width: 900px) { - .content { - grid-template-columns: 1fr; - } -} +:root { + font-family: + Inter, + ui-sans-serif, + system-ui, + -apple-system, + BlinkMacSystemFont, + "Segoe UI", + sans-serif; + color: var(--brand-black); + background: var(--brand-light); + line-height: 1.5; +} + +* { + box-sizing: border-box; +} + +html, +body, +#root { + min-height: 100%; +} + +body { + margin: 0; + background: var(--brand-light); + color: var(--brand-black); +} + +button, +input, +select, +textarea { + font: inherit; +} + +button { + cursor: pointer; +} + +.app-shell { + max-width: 1200px; + margin: 0 auto; + padding: 24px; +} + +.topbar { + display: flex; + flex-wrap: wrap; + justify-content: space-between; + align-items: center; + gap: 16px; + padding: 22px 24px; + background: var(--brand-surface); + border: 1px solid var(--brand-border); + border-radius: 18px; +} + +.topbar h1 { + margin: 0; + font-size: clamp(1.9rem, 2.5vw, 2.6rem); +} + +.topbar p { + margin: 6px 0 0; + color: var(--brand-gray); +} + +.topbar-nav { + display: flex; + flex-wrap: wrap; + gap: 10px; +} + +.topbar-nav a { + display: inline-flex; + align-items: center; + justify-content: center; + padding: 10px 14px; + border-radius: 14px; + background: var(--brand-surface); + color: var(--brand-black); + text-decoration: none; + border: 1px solid transparent; + transition: + background 0.2s ease, + border-color 0.2s ease; +} + +.topbar-nav a:hover { + background: #ffffff; + border-color: #d1d5db; +} + +.content { + display: grid; + gap: 24px; + grid-template-columns: 1.2fr 1.8fr; + margin-top: 24px; +} + +.route-index, +.panel, +.viewer-panel, +.bridge-panel, +.room-setup-dropzone, +.room-setup-card, +.room-setup-preview { + background: var(--brand-surface); + border: 1px solid var(--brand-border); + border-radius: 20px; +} + +.route-index, +.panel, +.viewer-panel, +.bridge-panel, +.room-setup-card { + padding: 22px; +} + +.route-index h2, +.panel h2, +.viewer-panel h2, +.room-setup-copy h1, +.room-setup-bottom h2 { + margin: 0 0 16px; +} + +.route-index p, +.room-setup-features li, +.room-setup-drop-content p, +.room-setup-drop-content small, +.room-setup-card h3, +.topbar p, +.error-box, +.empty-state { + color: #475569; +} + +.route-index ul, +.room-setup-features, +.room-setup-filters, +.room-setup-grid { + margin: 0; + padding: 0; + list-style: none; +} + +.route-index ul { + display: grid; + gap: 12px; +} + +.form-row { + display: grid; + gap: 14px; + margin-bottom: 20px; +} + +label { + font-size: 0.95rem; + color: var(--brand-black); +} + +input, +select, +textarea { + width: 100%; + padding: 14px 16px; + border-radius: 14px; + border: 1px solid #d1d5db; + background: #ffffff; + color: #111827; +} + +input:focus, +select:focus, +textarea:focus { + outline: 2px solid var(--brand-blue); + outline-offset: 2px; +} + +.button, +.button-primary, +.button-secondary { + display: inline-flex; + align-items: center; + justify-content: center; + gap: 10px; + border-radius: 16px; + padding: 14px 18px; + font-weight: 700; + border: 1px solid transparent; + transition: all 0.2s ease; +} + +.button { + background: var(--brand-black); + color: var(--brand-surface); +} + +.button:hover { + opacity: 0.95; +} + +.button.secondary, +.button-secondary { + background: var(--brand-surface); + color: var(--brand-black); + border-color: var(--brand-border); +} + +.error-box { + margin-top: 16px; + padding: 16px; + border-radius: 16px; + background: #fef2f2; + color: #991b1b; + border: 1px solid #fecaca; +} + +.empty-state { + min-height: 220px; + display: grid; + place-content: center; + border: 1px dashed #d1d5db; + border-radius: 18px; +} + +.room-setup { + background: var(--brand-light); +} + +.room-setup-inner { + max-width: 1200px; + margin: 0 auto; + padding: 32px 24px; +} + +.room-setup-header { + display: flex; + justify-content: flex-end; + margin-bottom: 24px; +} + +.room-setup-close { + border: none; + background: transparent; + color: var(--brand-black); + padding: 10px; + border-radius: 999px; + cursor: pointer; +} + +.room-setup-close:hover { + background: var(--brand-border); +} + +.room-setup-top { + display: grid; + gap: 24px; + grid-template-columns: 1.1fr 0.9fr; + margin-bottom: 40px; +} + +.room-setup-copy h1 { + margin: 0 0 24px; + font-size: clamp(2rem, 2.5vw, 3rem); + color: #111827; +} + +.room-setup-features { + display: grid; + gap: 16px; +} + +.room-setup-features li { + display: flex; + align-items: center; + gap: 12px; + color: #475569; +} + +.room-setup-actions { + display: grid; + gap: 16px; +} + +.button-primary { + background: #111827; + color: #ffffff; +} + +.button-primary:hover { + opacity: 0.95; +} + +.button-secondary { + background: #ffffff; + color: #334155; + border-color: #d1d5db; +} + +.button-secondary:hover { + background: #f3f4f6; +} + +.button-icon-border { + display: inline-flex; + align-items: center; + justify-content: center; + width: 30px; + height: 30px; + border-radius: 10px; + border: 1px solid #d1d5db; +} + +.room-setup-dropzone { + position: relative; + min-height: 420px; + display: flex; + align-items: center; + justify-content: center; + transition: all 0.2s ease; + padding: 24px; + border: 1px dashed #d1d5db; + border-radius: 28px; +} + +.room-setup-dropzone.dragging { + background: #f3f4f6; +} + +.room-setup-file-input { + position: absolute; + inset: 0; + width: 100%; + height: 100%; + opacity: 0; + cursor: pointer; +} + +.room-setup-drop-content { + text-align: center; +} + +.room-setup-drop-icon { + display: inline-flex; + align-items: center; + justify-content: center; + width: 72px; + height: 72px; + border-radius: 999px; + background: #e2e8f0; + color: #64748b; + margin-bottom: 18px; +} + +.room-setup-drop-icon.active { + background: #dbeafe; + color: #1e293b; +} + +.room-setup-drop-content h3 { + margin: 0 0 8px; + font-size: 1.2rem; +} + +.room-setup-drop-content p, +.room-setup-drop-content small { + margin: 0; + color: #64748b; +} + +.room-setup-preview { + position: relative; + width: 100%; + height: 100%; +} + +.room-setup-preview img { + width: 100%; + height: 100%; + object-fit: cover; +} + +.room-setup-preview-overlay { + position: absolute; + inset: 0; + background: rgba(255, 255, 255, 0.85); + display: flex; + align-items: center; + justify-content: center; + opacity: 0; + transition: opacity 0.2s ease; +} + +.room-setup-preview:hover .room-setup-preview-overlay { + opacity: 1; +} + +.button-delete { + background: #ffffff; + color: #111827; + padding: 12px 16px; + border-radius: 14px; + font-weight: 600; + border: 1px solid #d1d5db; +} + +.room-setup-bottom h2 { + margin: 0 0 24px; +} + +.room-setup-filters { + display: flex; + flex-wrap: wrap; + gap: 10px; + margin-bottom: 24px; +} + +.room-setup-filter { + border: 1px solid #d1d5db; + background: #ffffff; + color: #334155; + padding: 10px 16px; + border-radius: 16px; + cursor: pointer; + transition: all 0.2s ease; +} + +.room-setup-filter.active { + background: #f3f4f6; +} + +.room-setup-grid { + display: grid; + grid-template-columns: repeat(1, minmax(0, 1fr)); + gap: 20px; +} + +.room-setup-card { + overflow: hidden; + border-radius: 24px; + background: #ffffff; + box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06); +} + +.room-setup-card-image { + position: relative; + aspect-ratio: 4 / 3; + overflow: hidden; +} + +.room-setup-card-image img { + width: 100%; + height: 100%; + object-fit: cover; + transition: transform 0.4s ease; +} + +.room-setup-card:hover .room-setup-card-image img { + transform: scale(1.04); +} + +.room-setup-card h3 { + margin: 16px; + font-size: 1rem; + color: #334155; +} + +@media (max-width: 960px) { + .room-setup-top { + grid-template-columns: 1fr; + } + + .room-setup-grid { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } +} + +@media (max-width: 640px) { + .room-setup-inner { + padding: 20px 16px; + } + + .room-setup-grid { + grid-template-columns: 1fr; + } +} + +.app-version-badge { + position: fixed; + right: 0; + bottom: 0; + padding: 6px 10px; + border-radius: 12px 0 0 0; + background: rgba(255, 255, 255, 0.95); + border: 1px solid #e5e7eb; + color: #475569; + font-size: 0.78rem; + text-align: right; + box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08); + z-index: 1000; +} + +.app-version-badge:hover { + opacity: 1; +} + +.app-version-badge span { + display: block; + font-weight: 700; + color: #111827; +} + +.app-version-badge small { + display: block; + margin-top: 1px; + color: #6b7280; +} + +@media (max-width: 640px) { + .app-version-badge { + right: 6px; + bottom: 6px; + padding: 5px 8px; + font-size: 0.72rem; + } + + .app-version-badge small { + margin-top: 0.5px; + } +} + +@media (max-width: 900px) { + .content { + grid-template-columns: 1fr; + } +} diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 26449f7f4cae32c8bf373c4b486182a3a2b7972a..69a7cf256e83839a057a802a9d2370335c36e40d 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -1,20 +1,20 @@ -import { Routes, Route, Navigate } from "react-router-dom"; -import SettingsPage from "./features/settings/SettingsPage"; -import RoomSetup from "./features/roomSetup/RoomSetup"; -import RoomVisualizer from "./features/roomVisualizer/RoomVisualizer"; -import SharedView from "./features/shared/SharedView"; -import "./App.css"; - -export default function App() { - return ( -
- - } /> - } /> - } /> - } /> - } /> - -
- ); -} +import { Routes, Route, Navigate } from "react-router-dom"; +import SettingsPage from "./features/settings/SettingsPage"; +import RoomSetup from "./features/roomSetup/RoomSetup"; +import RoomVisualizer from "./features/roomVisualizer/RoomVisualizer"; +import SharedView from "./features/shared/SharedView"; +import "./App.css"; + +export default function App() { + return ( +
+ + } /> + } /> + } /> + } /> + } /> + +
+ ); +} diff --git a/frontend/src/api/client.ts b/frontend/src/api/client.ts index a361c51ffe711eb7c838f18a79c07278dbd04d4b..a32d51510f0a7c09c21e5d3baf5be034573ed8ec 100644 --- a/frontend/src/api/client.ts +++ b/frontend/src/api/client.ts @@ -1,100 +1,100 @@ -import type { ClientData } from "../types"; - -export const DEV_API_BASE = "http://localhost:8000"; -export const API_BASE = - import.meta.env.VITE_API_BASE_URL ?? - (import.meta.env.DEV ? DEV_API_BASE : ""); -const DEV_CLIENT_ID = "ID_UNICO_DEL_CLIENTE_001"; - -export interface ClientConfigResponse { - cliente: ClientData; - query: string; -} - -export function getApiBase(customApiBase?: string) { - return customApiBase?.trim() ? customApiBase : API_BASE; -} - -export function buildApiUrl(path: string, customApiBase?: string) { - return `${getApiBase(customApiBase)}${path}`; -} - -export async function fetchClientConfig( - token: string, - clientId: string, - customApiBase?: string, - useDevToken = true, -): Promise { - let finalToken = token; - const finalClientId = clientId; - - if (!finalToken && !finalClientId) { - if (!import.meta.env.DEV || !useDevToken) { - throw new Error("No se encontró el token o key en la URL."); - } - - const tokenRes = await fetch(buildApiUrl("/api/token", customApiBase), { - method: "POST", - headers: { "Content-Type": "application/x-www-form-urlencoded" }, - body: `client_id=${encodeURIComponent(DEV_CLIENT_ID)}`, - }); - - if (!tokenRes.ok) { - throw new Error("No se pudo generar el token de prueba en desarrollo."); - } - - const tokenData = await tokenRes.json(); - finalToken = tokenData.token; - } - - const query = finalToken - ? `token=${encodeURIComponent(finalToken)}` - : `client_id=${encodeURIComponent(finalClientId)}`; - - const res = await fetch(buildApiUrl(`/config?${query}`, customApiBase)); - if (!res.ok) { - const text = await res.text(); - throw new Error( - `No se pudo obtener la configuración del cliente. ${res.status} ${text}`, - ); - } - - const cliente = await res.json(); - return { cliente, query }; -} - -export interface UploadImageResponse { - filename: string; - [key: string]: unknown; -} - -export async function uploadRoomImage( - file: File, - customApiBase?: string, -): Promise { - const formData = new FormData(); - formData.append("file", file); - - const response = await fetch( - buildApiUrl("/api/upload-image", customApiBase), - { - method: "POST", - body: formData, - }, - ); - - if (!response.ok) { - const text = await response.text(); - throw new Error(text || "Error al subir la imagen"); - } - - return response.json(); -} - -export async function startSession(query: string, customApiBase?: string) { - await fetch(buildApiUrl("/session/start", customApiBase), { - method: "POST", - headers: { "Content-Type": "application/x-www-form-urlencoded" }, - body: query, - }); -} +import type { ClientData } from "../types"; + +export const DEV_API_BASE = "http://localhost:8000"; +export const API_BASE = + import.meta.env.VITE_API_BASE_URL ?? + (import.meta.env.DEV ? DEV_API_BASE : ""); +const DEV_CLIENT_ID = "ID_UNICO_DEL_CLIENTE_001"; + +export interface ClientConfigResponse { + cliente: ClientData; + query: string; +} + +export function getApiBase(customApiBase?: string) { + return customApiBase?.trim() ? customApiBase : API_BASE; +} + +export function buildApiUrl(path: string, customApiBase?: string) { + return `${getApiBase(customApiBase)}${path}`; +} + +export async function fetchClientConfig( + token: string, + clientId: string, + customApiBase?: string, + useDevToken = true, +): Promise { + let finalToken = token; + const finalClientId = clientId; + + if (!finalToken && !finalClientId) { + if (!import.meta.env.DEV || !useDevToken) { + throw new Error("No se encontró el token o key en la URL."); + } + + const tokenRes = await fetch(buildApiUrl("/api/token", customApiBase), { + method: "POST", + headers: { "Content-Type": "application/x-www-form-urlencoded" }, + body: `client_id=${encodeURIComponent(DEV_CLIENT_ID)}`, + }); + + if (!tokenRes.ok) { + throw new Error("No se pudo generar el token de prueba en desarrollo."); + } + + const tokenData = await tokenRes.json(); + finalToken = tokenData.token; + } + + const query = finalToken + ? `token=${encodeURIComponent(finalToken)}` + : `client_id=${encodeURIComponent(finalClientId)}`; + + const res = await fetch(buildApiUrl(`/config?${query}`, customApiBase)); + if (!res.ok) { + const text = await res.text(); + throw new Error( + `No se pudo obtener la configuración del cliente. ${res.status} ${text}`, + ); + } + + const cliente = await res.json(); + return { cliente, query }; +} + +export interface UploadImageResponse { + filename: string; + [key: string]: unknown; +} + +export async function uploadRoomImage( + file: File, + customApiBase?: string, +): Promise { + const formData = new FormData(); + formData.append("file", file); + + const response = await fetch( + buildApiUrl("/api/upload-image", customApiBase), + { + method: "POST", + body: formData, + }, + ); + + if (!response.ok) { + const text = await response.text(); + throw new Error(text || "Error al subir la imagen"); + } + + return response.json(); +} + +export async function startSession(query: string, customApiBase?: string) { + await fetch(buildApiUrl("/session/start", customApiBase), { + method: "POST", + headers: { "Content-Type": "application/x-www-form-urlencoded" }, + body: query, + }); +} diff --git a/frontend/src/assets/vite.svg b/frontend/src/assets/vite.svg index 25ee512b1d236712b9dcd251ee1bc7253b5a62de..5101b674df391399da71c767aa5c976426c9dc7a 100644 --- a/frontend/src/assets/vite.svg +++ b/frontend/src/assets/vite.svg @@ -1 +1 @@ -Vite +Vite diff --git a/frontend/src/components/ui/LoadingScreen.tsx b/frontend/src/components/ui/LoadingScreen.tsx index 86d574c10649e5e93d8f64315ba2447c81ecff6c..4b05c2199af422095acb999da9369a0ff6ee31d4 100644 --- a/frontend/src/components/ui/LoadingScreen.tsx +++ b/frontend/src/components/ui/LoadingScreen.tsx @@ -1,33 +1,33 @@ -import { Image } from "lucide-react"; - -export default function LoadingScreen() { - return ( -
-
-
-
- -
-
-
- -
-

- Encontrar los mejores productos -

-
-
-
-
-
-
-
- -
-

- Cargando Catálogo v2.0 -

-
-
- ); -} +import { Image } from "lucide-react"; + +export default function LoadingScreen() { + return ( +
+
+
+
+ +
+
+
+ +
+

+ Encontrar los mejores productos +

+
+
+
+
+
+
+
+ +
+

+ Cargando Catálogo v2.0 +

+
+
+ ); +} diff --git a/frontend/src/data/roomSetupData.ts b/frontend/src/data/roomSetupData.ts index c37e9efb908d6411424c0698143dc6a1dc3cff99..b7e9d4da82a657cba86651ba9324df44c69e905d 100644 --- a/frontend/src/data/roomSetupData.ts +++ b/frontend/src/data/roomSetupData.ts @@ -1,329 +1,329 @@ -export type RoomCategory = { - id: string; - label: string; - count: number; -}; - -export type RoomItem = { - id: number; - title: string; - category: string; - img: string; -}; - -export const categorias: RoomCategory[] = [ - { id: "todos", label: "Todos", count: 33 }, - { id: "bano", label: "Baño", count: 10 }, - { id: "cocina", label: "Cocina", count: 2 }, - { id: "comedor", label: "Comedor", count: 3 }, - { id: "dormitorio", label: "Dormitorio", count: 5 }, - { id: "espacio_abierto", label: "Espacio abierto", count: 7 }, - { id: "sala", label: "Sala de estar", count: 1 }, - { id: "terraza", label: "Terraza", count: 5 }, -]; - -export const habitaciones: RoomItem[] = [ - { - id: 1, - title: "Refugio de Spa Contemporáneo", - category: "bano", - img: new URL( - "../assets/imagens-default-room/bathroom/bathroom1.png", - import.meta.url, - ).href, - }, - { - id: 2, - title: "Oasis de Mármol Sereno", - category: "bano", - img: new URL( - "../assets/imagens-default-room/bathroom/bathroom2.png", - import.meta.url, - ).href, - }, - { - id: 3, - title: "Baño Zen de Luz Natural", - category: "bano", - img: new URL( - "../assets/imagens-default-room/bathroom/bathroom3.png", - import.meta.url, - ).href, - }, - { - id: 4, - title: "Retiro de Spa Blanco", - category: "bano", - img: new URL( - "../assets/imagens-default-room/bathroom/bathroom4.png", - import.meta.url, - ).href, - }, - { - id: 5, - title: "Lavabo de Encanto Minimalista", - category: "bano", - img: new URL( - "../assets/imagens-default-room/bathroom/bathroom5.png", - import.meta.url, - ).href, - }, - { - id: 6, - title: "Baño Escandinavo Refinado", - category: "bano", - img: new URL( - "../assets/imagens-default-room/bathroom/bathroom6.png", - import.meta.url, - ).href, - }, - { - id: 7, - title: "Santuario de Mármol Pálido", - category: "bano", - img: new URL( - "../assets/imagens-default-room/bathroom/bathroom7.png", - import.meta.url, - ).href, - }, - { - id: 8, - title: "Oasis Sereno de Blanco y Luz", - category: "bano", - img: new URL( - "../assets/imagens-default-room/bathroom/bathroom8.png", - import.meta.url, - ).href, - }, - { - id: 9, - title: "Retiro de Mármol y Madera", - category: "bano", - img: new URL( - "../assets/imagens-default-room/bathroom/bathroom9.png", - import.meta.url, - ).href, - }, - { - id: 10, - title: "Baño de Luz Cálida", - category: "bano", - img: new URL( - "../assets/imagens-default-room/bathroom/bathroom10.png", - import.meta.url, - ).href, - }, - - { - id: 11, - title: "Cocina Gourmet de Autor", - category: "cocina", - img: new URL( - "../assets/imagens-default-room/Kitchen/kitchen1.png", - import.meta.url, - ).href, - }, - { - id: 12, - title: "Cocina Contemporánea Urbana", - category: "cocina", - img: new URL( - "../assets/imagens-default-room/Kitchen/kitchen2.png", - import.meta.url, - ).href, - }, - - { - id: 13, - title: "Comedor de Gala Moderno", - category: "comedor", - img: new URL( - "../assets/imagens-default-room/dining room/diningroom1.png", - import.meta.url, - ).href, - }, - { - id: 14, - title: "Comedor Clásico de Lujo", - category: "comedor", - img: new URL( - "../assets/imagens-default-room/dining room/diningroom2.png", - import.meta.url, - ).href, - }, - { - id: 15, - title: "Sala de Banquetes Minimalista", - category: "comedor", - img: new URL( - "../assets/imagens-default-room/dining room/diningroom3.png", - import.meta.url, - ).href, - }, - - { - id: 16, - title: "Suite del Amanecer", - category: "dormitorio", - img: new URL( - "../assets/imagens-default-room/bedroom/bedroom1.png", - import.meta.url, - ).href, - }, - { - id: 17, - title: "Dormitorio de Seda", - category: "dormitorio", - img: new URL( - "../assets/imagens-default-room/bedroom/bedroom2.png", - import.meta.url, - ).href, - }, - { - id: 18, - title: "Alcoba Tranquila", - category: "dormitorio", - img: new URL( - "../assets/imagens-default-room/bedroom/bedroom3.png", - import.meta.url, - ).href, - }, - { - id: 19, - title: "Retiro de Noche Azul", - category: "dormitorio", - img: new URL( - "../assets/imagens-default-room/bedroom/bedroom4.png", - import.meta.url, - ).href, - }, - { - id: 20, - title: "Quinta Esencia del Descanso", - category: "dormitorio", - img: new URL( - "../assets/imagens-default-room/bedroom/bedroom5.png", - import.meta.url, - ).href, - }, - - { - id: 21, - title: "Salón Contemporáneo Sereno", - category: "sala", - img: new URL( - "../assets/imagens-default-room/living room/livingroom1.png", - import.meta.url, - ).href, - }, - - { - id: 22, - title: "Loft de Claridad", - category: "espacio_abierto", - img: new URL( - "../assets/imagens-default-room/open space/openspace1.png", - import.meta.url, - ).href, - }, - { - id: 23, - title: "Galería Abierta Suave", - category: "espacio_abierto", - img: new URL( - "../assets/imagens-default-room/open space/openspace2.png", - import.meta.url, - ).href, - }, - { - id: 24, - title: "Ático de Luz Serena", - category: "espacio_abierto", - img: new URL( - "../assets/imagens-default-room/open space/openspace3.png", - import.meta.url, - ).href, - }, - { - id: 25, - title: "Salón Multifuncional Luminoso", - category: "espacio_abierto", - img: new URL( - "../assets/imagens-default-room/open space/openspace4.png", - import.meta.url, - ).href, - }, - { - id: 26, - title: "Atrio de Cielo Blanco", - category: "espacio_abierto", - img: new URL( - "../assets/imagens-default-room/open space/openspace5.png", - import.meta.url, - ).href, - }, - { - id: 27, - title: "Estudio de Altura", - category: "espacio_abierto", - img: new URL( - "../assets/imagens-default-room/open space/openspace6.png", - import.meta.url, - ).href, - }, - { - id: 28, - title: "Retiro Etéreo", - category: "espacio_abierto", - img: new URL( - "../assets/imagens-default-room/open space/openspace7.png", - import.meta.url, - ).href, - }, - - { - id: 29, - title: "Terraza Nocturna de Ciudad", - category: "terraza", - img: new URL( - "../assets/imagens-default-room/terrace/terrace1.png", - import.meta.url, - ).href, - }, - { - id: 30, - title: "Terraza Contemporánea", - category: "terraza", - img: new URL( - "../assets/imagens-default-room/terrace/terrace2.png", - import.meta.url, - ).href, - }, - { - id: 31, - title: "Terraza de Rooftop Chic", - category: "terraza", - img: new URL( - "../assets/imagens-default-room/terrace/terrace3.png", - import.meta.url, - ).href, - }, - { - id: 32, - title: "Terraza de Diseño Iluminado", - category: "terraza", - img: new URL( - "../assets/imagens-default-room/terrace/terrace4.png", - import.meta.url, - ).href, - }, - { - id: 33, - title: "Terraza de Encanto Nocturno", - category: "terraza", - img: new URL( - "../assets/imagens-default-room/terrace/terrace5.png", - import.meta.url, - ).href, - }, -]; +export type RoomCategory = { + id: string; + label: string; + count: number; +}; + +export type RoomItem = { + id: number; + title: string; + category: string; + img: string; +}; + +export const categorias: RoomCategory[] = [ + { id: "todos", label: "Todos", count: 33 }, + { id: "bano", label: "Baño", count: 10 }, + { id: "cocina", label: "Cocina", count: 2 }, + { id: "comedor", label: "Comedor", count: 3 }, + { id: "dormitorio", label: "Dormitorio", count: 5 }, + { id: "espacio_abierto", label: "Espacio abierto", count: 7 }, + { id: "sala", label: "Sala de estar", count: 1 }, + { id: "terraza", label: "Terraza", count: 5 }, +]; + +export const habitaciones: RoomItem[] = [ + { + id: 1, + title: "Refugio de Spa Contemporáneo", + category: "bano", + img: new URL( + "../assets/imagens-default-room/bathroom/bathroom1.png", + import.meta.url, + ).href, + }, + { + id: 2, + title: "Oasis de Mármol Sereno", + category: "bano", + img: new URL( + "../assets/imagens-default-room/bathroom/bathroom2.png", + import.meta.url, + ).href, + }, + { + id: 3, + title: "Baño Zen de Luz Natural", + category: "bano", + img: new URL( + "../assets/imagens-default-room/bathroom/bathroom3.png", + import.meta.url, + ).href, + }, + { + id: 4, + title: "Retiro de Spa Blanco", + category: "bano", + img: new URL( + "../assets/imagens-default-room/bathroom/bathroom4.png", + import.meta.url, + ).href, + }, + { + id: 5, + title: "Lavabo de Encanto Minimalista", + category: "bano", + img: new URL( + "../assets/imagens-default-room/bathroom/bathroom5.png", + import.meta.url, + ).href, + }, + { + id: 6, + title: "Baño Escandinavo Refinado", + category: "bano", + img: new URL( + "../assets/imagens-default-room/bathroom/bathroom6.png", + import.meta.url, + ).href, + }, + { + id: 7, + title: "Santuario de Mármol Pálido", + category: "bano", + img: new URL( + "../assets/imagens-default-room/bathroom/bathroom7.png", + import.meta.url, + ).href, + }, + { + id: 8, + title: "Oasis Sereno de Blanco y Luz", + category: "bano", + img: new URL( + "../assets/imagens-default-room/bathroom/bathroom8.png", + import.meta.url, + ).href, + }, + { + id: 9, + title: "Retiro de Mármol y Madera", + category: "bano", + img: new URL( + "../assets/imagens-default-room/bathroom/bathroom9.png", + import.meta.url, + ).href, + }, + { + id: 10, + title: "Baño de Luz Cálida", + category: "bano", + img: new URL( + "../assets/imagens-default-room/bathroom/bathroom10.png", + import.meta.url, + ).href, + }, + + { + id: 11, + title: "Cocina Gourmet de Autor", + category: "cocina", + img: new URL( + "../assets/imagens-default-room/Kitchen/kitchen1.png", + import.meta.url, + ).href, + }, + { + id: 12, + title: "Cocina Contemporánea Urbana", + category: "cocina", + img: new URL( + "../assets/imagens-default-room/Kitchen/kitchen2.png", + import.meta.url, + ).href, + }, + + { + id: 13, + title: "Comedor de Gala Moderno", + category: "comedor", + img: new URL( + "../assets/imagens-default-room/dining room/diningroom1.png", + import.meta.url, + ).href, + }, + { + id: 14, + title: "Comedor Clásico de Lujo", + category: "comedor", + img: new URL( + "../assets/imagens-default-room/dining room/diningroom2.png", + import.meta.url, + ).href, + }, + { + id: 15, + title: "Sala de Banquetes Minimalista", + category: "comedor", + img: new URL( + "../assets/imagens-default-room/dining room/diningroom3.png", + import.meta.url, + ).href, + }, + + { + id: 16, + title: "Suite del Amanecer", + category: "dormitorio", + img: new URL( + "../assets/imagens-default-room/bedroom/bedroom1.png", + import.meta.url, + ).href, + }, + { + id: 17, + title: "Dormitorio de Seda", + category: "dormitorio", + img: new URL( + "../assets/imagens-default-room/bedroom/bedroom2.png", + import.meta.url, + ).href, + }, + { + id: 18, + title: "Alcoba Tranquila", + category: "dormitorio", + img: new URL( + "../assets/imagens-default-room/bedroom/bedroom3.png", + import.meta.url, + ).href, + }, + { + id: 19, + title: "Retiro de Noche Azul", + category: "dormitorio", + img: new URL( + "../assets/imagens-default-room/bedroom/bedroom4.png", + import.meta.url, + ).href, + }, + { + id: 20, + title: "Quinta Esencia del Descanso", + category: "dormitorio", + img: new URL( + "../assets/imagens-default-room/bedroom/bedroom5.png", + import.meta.url, + ).href, + }, + + { + id: 21, + title: "Salón Contemporáneo Sereno", + category: "sala", + img: new URL( + "../assets/imagens-default-room/living room/livingroom1.png", + import.meta.url, + ).href, + }, + + { + id: 22, + title: "Loft de Claridad", + category: "espacio_abierto", + img: new URL( + "../assets/imagens-default-room/open space/openspace1.png", + import.meta.url, + ).href, + }, + { + id: 23, + title: "Galería Abierta Suave", + category: "espacio_abierto", + img: new URL( + "../assets/imagens-default-room/open space/openspace2.png", + import.meta.url, + ).href, + }, + { + id: 24, + title: "Ático de Luz Serena", + category: "espacio_abierto", + img: new URL( + "../assets/imagens-default-room/open space/openspace3.png", + import.meta.url, + ).href, + }, + { + id: 25, + title: "Salón Multifuncional Luminoso", + category: "espacio_abierto", + img: new URL( + "../assets/imagens-default-room/open space/openspace4.png", + import.meta.url, + ).href, + }, + { + id: 26, + title: "Atrio de Cielo Blanco", + category: "espacio_abierto", + img: new URL( + "../assets/imagens-default-room/open space/openspace5.png", + import.meta.url, + ).href, + }, + { + id: 27, + title: "Estudio de Altura", + category: "espacio_abierto", + img: new URL( + "../assets/imagens-default-room/open space/openspace6.png", + import.meta.url, + ).href, + }, + { + id: 28, + title: "Retiro Etéreo", + category: "espacio_abierto", + img: new URL( + "../assets/imagens-default-room/open space/openspace7.png", + import.meta.url, + ).href, + }, + + { + id: 29, + title: "Terraza Nocturna de Ciudad", + category: "terraza", + img: new URL( + "../assets/imagens-default-room/terrace/terrace1.png", + import.meta.url, + ).href, + }, + { + id: 30, + title: "Terraza Contemporánea", + category: "terraza", + img: new URL( + "../assets/imagens-default-room/terrace/terrace2.png", + import.meta.url, + ).href, + }, + { + id: 31, + title: "Terraza de Rooftop Chic", + category: "terraza", + img: new URL( + "../assets/imagens-default-room/terrace/terrace3.png", + import.meta.url, + ).href, + }, + { + id: 32, + title: "Terraza de Diseño Iluminado", + category: "terraza", + img: new URL( + "../assets/imagens-default-room/terrace/terrace4.png", + import.meta.url, + ).href, + }, + { + id: 33, + title: "Terraza de Encanto Nocturno", + category: "terraza", + img: new URL( + "../assets/imagens-default-room/terrace/terrace5.png", + import.meta.url, + ).href, + }, +]; diff --git a/frontend/src/features/roomSetup/RoomSetup.tsx b/frontend/src/features/roomSetup/RoomSetup.tsx index 9344ce81d4b27d54658020adcf14ca179c6684f1..f637853360453d9cc2a700daf85a6bb0115e86d8 100644 --- a/frontend/src/features/roomSetup/RoomSetup.tsx +++ b/frontend/src/features/roomSetup/RoomSetup.tsx @@ -1,334 +1,318 @@ -import { useState } from "react"; -import { - X, - Camera, - Package, - Camera as CameraIcon, - UploadCloud, - Users, - ArrowRight, -} from "lucide-react"; -import { useNavigate } from "react-router-dom"; -import { categorias, habitaciones } from "../../data/roomSetupData"; -import { FilterButton, RoomCard } from "./RoomSetupComponents"; -import { useRoomSetup } from "./roomSetupHooks"; -import useAppStore from "../../store/useAppStore"; -import { useHistoryStore, type HistoryItem } from "../../store/useAppStore"; -import { useActiveSessions } from "../../hooks/useActiveSessions"; -import { API_BASE } from "../../api/client"; -import { - useLoadSessionHistory, - deleteSessionFromBackend, -} from "../../hooks/useSessionSync"; -import { useCallback } from "react"; - -export default function RoomSetup() { - useLoadSessionHistory(); - const [categoriaActiva, setCategoriaActiva] = useState("todos"); - const navigate = useNavigate(); - const segmentProgress = useAppStore((s) => s.segmentProgress); - const segmentFilename = useAppStore((s) => s.segmentFilename); - const storedPreviewImage = useAppStore((s) => s.previewImage); - const sessionHistory = useHistoryStore((s) => s.sessionHistory); - const removeFromHistory = useHistoryStore((s) => s.removeFromHistory); - const userId = useHistoryStore((s) => s.userId); - - const handleDeleteSession = useCallback( - (e: React.MouseEvent, filename: string) => { - e.stopPropagation(); - removeFromHistory(filename); - deleteSessionFromBackend(userId, filename); - }, - [removeFromHistory, userId], - ); - const { count: activeSessions } = useActiveSessions(); - const { - isDragging, - previewImage, - uploadMessage, - isUploading, - fileInputRef, - handleDragOver, - handleDragLeave, - handleDrop, - handleFileChange, - handleDemoRoomSelect, - triggerFileInput, - clearPreviewImage, - } = useRoomSetup(); - - const habitacionesFiltradas = - categoriaActiva === "todos" - ? habitaciones - : habitaciones.filter((h) => h.category === categoriaActiva); - - return ( -
-
- {isUploading && ( -
-

- Analizando imagen con IA... -

-
-
-
-

{uploadMessage}

-
- )} - - {/* Badge de sesiones activas */} - {activeSessions > 0 && ( -
-
- - - - {activeSessions} usuario{activeSessions !== 1 ? "s" : ""} activo - {activeSessions !== 1 ? "s" : ""} - -
-
- )} - - {/* SECCIÓN SUPERIOR: Sube tu foto */} -
- {/* Columna Izquierda: Textos y Botones */} -
-

- Ver los productos en su cuarto -

- -
    -
  • - - Sube una foto de tu habitación -
  • -
  • - - Prueba nuestros productos -
  • -
- -
- - - {segmentFilename && !isUploading && ( - - )} -
- {uploadMessage && ( -

{uploadMessage}

- )} -
- - {/* Columna Derecha: Dropzone de Imagen */} -
- {previewImage ? ( -
- Vista previa -
- -
-
- ) : ( - <> - -
-
- -
-

- {isDragging - ? "Suelta la imagen aquí" - : "Arrastra tu foto aquí"} -

-

- o haz clic para explorar en tu dispositivo -

-

- Formatos soportados: JPG, PNG -

-
- - )} -
-
- - {/* SECCIÓN HISTORIAL DE SESIÓN */} - {sessionHistory.length > 0 && ( -
-

- Tus espacios recientes -

-
- {sessionHistory.map((item: HistoryItem) => ( -
- navigate("/visualizer", { - state: { - previewImage: item.previewUrl, - filename: item.filename, - maskCount: item.maskCount, - }, - }) - } - onKeyDown={(e) => { - if (e.key === "Enter" || e.key === " ") { - navigate("/visualizer", { - state: { - previewImage: item.previewUrl, - filename: item.filename, - maskCount: item.maskCount, - }, - }); - } - }} - className={`flex-shrink-0 group relative rounded-2xl overflow-hidden border-2 transition-all duration-200 ${ - segmentFilename === item.filename - ? "border-[#0047AB] shadow-lg shadow-[#0047AB]/20" - : "border-[#dbe7ff] hover:border-[#0047AB]" - }`} - style={{ width: 160, height: 120 }} - > - Habitación previa - {/* Overlay con hora */} -
-

- {new Date(item.uploadedAt).toLocaleDateString([], { - day: "2-digit", - month: "short", - })}{" "} - {new Date(item.uploadedAt).toLocaleTimeString([], { - hour: "2-digit", - minute: "2-digit", - })} -

-
- {/* Badge "activa" o botón eliminar */} - {segmentFilename === item.filename ? ( -
- Activa -
- ) : ( - - )} - {/* Hover: continuar */} -
- - Continuar - -
-
- ))} -
-
- )} - - {/* SECCIÓN INFERIOR: Habitaciones de demostración */} -
-

- ¿No tienes una foto? Prueba nuestras habitaciones de demostración -

- - {/* Filtros */} -
- {categorias.map((cat) => ( - - ))} -
- - {/* Cuadrícula de Imágenes */} -
- {habitacionesFiltradas.map((hab) => ( - - ))} -
-
-
-
- ); -} +import { useState } from "react"; +import { + X, + Camera, + Package, + Camera as CameraIcon, + UploadCloud, + Users, + ArrowRight, +} from "lucide-react"; +import { useNavigate } from "react-router-dom"; +import { categorias, habitaciones } from "../../data/roomSetupData"; +import { FilterButton, RoomCard } from "./RoomSetupComponents"; +import { useRoomSetup } from "./roomSetupHooks"; +import useAppStore from "../../store/useAppStore"; +import { useHistoryStore, type HistoryItem } from "../../store/useAppStore"; +import { useActiveSessions } from "../../hooks/useActiveSessions"; +import { API_BASE } from "../../api/client"; +import { useLoadSessionHistory, deleteSessionFromBackend } from "../../hooks/useSessionSync"; +import { useCallback } from "react"; + +export default function RoomSetup() { + useLoadSessionHistory(); + const [categoriaActiva, setCategoriaActiva] = useState("todos"); + const navigate = useNavigate(); + const segmentProgress = useAppStore((s) => s.segmentProgress); + const segmentFilename = useAppStore((s) => s.segmentFilename); + const storedPreviewImage = useAppStore((s) => s.previewImage); + const sessionHistory = useHistoryStore((s) => s.sessionHistory); + const removeFromHistory = useHistoryStore((s) => s.removeFromHistory); + const userId = useHistoryStore((s) => s.userId); + + const handleDeleteSession = useCallback( + (e: React.MouseEvent, filename: string) => { + e.stopPropagation(); + removeFromHistory(filename); + deleteSessionFromBackend(userId, filename); + }, + [removeFromHistory, userId], + ); + const { count: activeSessions } = useActiveSessions(); + const { + isDragging, + previewImage, + uploadMessage, + isUploading, + fileInputRef, + handleDragOver, + handleDragLeave, + handleDrop, + handleFileChange, + handleDemoRoomSelect, + triggerFileInput, + clearPreviewImage, + } = useRoomSetup(); + + const habitacionesFiltradas = + categoriaActiva === "todos" + ? habitaciones + : habitaciones.filter((h) => h.category === categoriaActiva); + + return ( +
+
+ {isUploading && ( +
+

+ Analizando imagen con IA... +

+
+
+
+

{uploadMessage}

+
+ )} + + {/* Badge de sesiones activas */} + {activeSessions > 0 && ( +
+
+ + + + {activeSessions} usuario{activeSessions !== 1 ? "s" : ""} activo + {activeSessions !== 1 ? "s" : ""} + +
+
+ )} + + {/* SECCIÓN SUPERIOR: Sube tu foto */} +
+ {/* Columna Izquierda: Textos y Botones */} +
+

+ Ver los productos en su cuarto +

+ +
    +
  • + + Sube una foto de tu habitación +
  • +
  • + + Prueba nuestros productos +
  • +
+ +
+ + + {segmentFilename && !isUploading && ( + + )} +
+ {uploadMessage && ( +

{uploadMessage}

+ )} +
+ + {/* Columna Derecha: Dropzone de Imagen */} +
+ {previewImage ? ( +
+ Vista previa +
+ +
+
+ ) : ( + <> + +
+
+ +
+

+ {isDragging + ? "Suelta la imagen aquí" + : "Arrastra tu foto aquí"} +

+

+ o haz clic para explorar en tu dispositivo +

+

+ Formatos soportados: JPG, PNG +

+
+ + )} +
+
+ + {/* SECCIÓN HISTORIAL DE SESIÓN */} + {sessionHistory.length > 0 && ( +
+

+ Tus espacios recientes +

+
+ {sessionHistory.map((item: HistoryItem) => ( + + )} + {/* Hover: continuar */} +
+ + Continuar + +
+ + ))} +
+
+ )} + + {/* SECCIÓN INFERIOR: Habitaciones de demostración */} +
+

+ ¿No tienes una foto? Prueba nuestras habitaciones de demostración +

+ + {/* Filtros */} +
+ {categorias.map((cat) => ( + + ))} +
+ + {/* Cuadrícula de Imágenes */} +
+ {habitacionesFiltradas.map((hab) => ( + + ))} +
+
+
+
+ ); +} diff --git a/frontend/src/features/roomSetup/RoomSetupComponents.tsx b/frontend/src/features/roomSetup/RoomSetupComponents.tsx index 1f7f0feb0c6da121acbcae1cec120e7f53a1e5bd..90a6e81d69a8ca1895689ebc1c32538920d5bea0 100644 --- a/frontend/src/features/roomSetup/RoomSetupComponents.tsx +++ b/frontend/src/features/roomSetup/RoomSetupComponents.tsx @@ -1,62 +1,62 @@ -import { - type RoomCategory, - type RoomItem, - categorias, -} from "../../data/roomSetupData"; - -type FilterButtonProps = { - category: RoomCategory; - active: boolean; - onSelect: (id: string) => void; -}; - -export function FilterButton({ - category, - active, - onSelect, -}: FilterButtonProps) { - return ( - - ); -} - -type RoomCardProps = { - room: RoomItem; - onSelect: (url: string) => void; -}; - -export function RoomCard({ room, onSelect }: RoomCardProps) { - const categoryLabel = - categorias.find((cat) => cat.id === room.category)?.label ?? room.category; - - return ( - - ); -} +import { + type RoomCategory, + type RoomItem, + categorias, +} from "../../data/roomSetupData"; + +type FilterButtonProps = { + category: RoomCategory; + active: boolean; + onSelect: (id: string) => void; +}; + +export function FilterButton({ + category, + active, + onSelect, +}: FilterButtonProps) { + return ( + + ); +} + +type RoomCardProps = { + room: RoomItem; + onSelect: (url: string) => void; +}; + +export function RoomCard({ room, onSelect }: RoomCardProps) { + const categoryLabel = + categorias.find((cat) => cat.id === room.category)?.label ?? room.category; + + return ( + + ); +} diff --git a/frontend/src/features/roomSetup/roomSetup.types.ts b/frontend/src/features/roomSetup/roomSetup.types.ts index e8263125b3cecd0abbaa50e9f5138840a0f9db57..7a5b12df707d822799851e192ee6cbec02f71b3e 100644 --- a/frontend/src/features/roomSetup/roomSetup.types.ts +++ b/frontend/src/features/roomSetup/roomSetup.types.ts @@ -1,6 +1,6 @@ -// Tipos específicos de la feature roomSetup. - -export type RoomSetupState = { - previewImage: string | null; - uploadMessage: string | null; -}; +// Tipos específicos de la feature roomSetup. + +export type RoomSetupState = { + previewImage: string | null; + uploadMessage: string | null; +}; diff --git a/frontend/src/features/roomSetup/roomSetupHooks.ts b/frontend/src/features/roomSetup/roomSetupHooks.ts index f1a6bcea1f405d751cd2df07017b9489a614c549..a851d363d2997200b20da243b685025eb0cd69fb 100644 --- a/frontend/src/features/roomSetup/roomSetupHooks.ts +++ b/frontend/src/features/roomSetup/roomSetupHooks.ts @@ -7,8 +7,11 @@ import { type RefObject, } from "react"; import { useNavigate } from "react-router-dom"; -import useAppStore, { useHistoryStore } from "../../store/useAppStore"; -import { uploadRoomImage, buildApiUrl } from "../../api/client"; +import useAppStore from "../../store/useAppStore"; +import { useHistoryStore } from "../../store/useAppStore"; +import { useSegmentUpload } from "../../hooks/useSegmentUpload"; +import { API_BASE } from "../../api/client"; +import { saveSessionToBackend } from "../../hooks/useSessionSync"; export function useRoomSetup(): { isDragging: boolean; @@ -37,9 +40,7 @@ export function useRoomSetup(): { const addToHistory = useHistoryStore((state) => state.addToHistory); const userId = useHistoryStore((state) => state.userId); - const setUploadedFile = useAppStore((s) => s.setUploadedFile); - // applyTextureOpenAI is unused in this hook; call it from the visualizer where needed - const isUploading = false; + const { uploadAndSegment, isUploading } = useSegmentUpload(); const clearPreviewImage = useCallback(() => { setPreviewImage(null); @@ -52,30 +53,35 @@ export function useRoomSetup(): { // Blob URL used only for local preview while uploading; replaced with server URL after const objectUrl = URL.createObjectURL(file); setPreviewImage(objectUrl); - setUploadMessage("Imagen lista — selecciona un producto para aplicar"); - setUploadedFile(file); - - // Start uploading in background so backend has a stable URL for processing. - (async () => { - try { - const res = await uploadRoomImage(file); - if (res?.url) { - const serverUrl = buildApiUrl(res.url as string); - setPreviewImage(serverUrl); - setUploadMessage("Imagen subida al servidor"); - } - } catch (err) { - const msg = - err instanceof Error ? err.message : "Error al subir la imagen"; - setUploadMessage(msg); - } - })(); + setUploadMessage("Iniciando segmentación..."); try { - // Ahora el flujo es: usuario sube imagen → selecciona producto → backend /api/generate-image - // Navegamos al visualizador con la preview local y el usuario selecciona producto allí. + const { filename, maskCount } = await uploadAndSegment( + file, + (progress, message) => { + setSegmentProgress(progress); + setUploadMessage(message); + }, + ); + + setSegmentResult(filename, maskCount); + setUploadMessage(`Segmentación completa — ${maskCount} zonas detectadas`); + + // Server URL persists across page refreshes; blob URL does not + const serverImageUrl = `${API_BASE}/seg/image/${filename}`; + setPreviewImage(serverImageUrl); + + const historyItem = { + filename, + previewUrl: serverImageUrl, + maskCount, + uploadedAt: Date.now(), + }; + addToHistory(historyItem); + saveSessionToBackend(userId, historyItem); + navigate("/visualizer", { - state: { previewImage: objectUrl }, + state: { previewImage: serverImageUrl }, }); } catch (err) { const message = @@ -89,6 +95,7 @@ export function useRoomSetup(): { setUploadMessage, setSegmentResult, setSegmentProgress, + uploadAndSegment, addToHistory, userId, ], diff --git a/frontend/src/features/roomVisualizer/MaskLayer.tsx b/frontend/src/features/roomVisualizer/MaskLayer.tsx index 8e39e8ab8a3f61be4a2e2d75e5ed9e76b9240dbb..6027adf3d876c3bdf2a4391b196429e90634dfb7 100644 --- a/frontend/src/features/roomVisualizer/MaskLayer.tsx +++ b/frontend/src/features/roomVisualizer/MaskLayer.tsx @@ -1,45 +1,45 @@ -import React from "react"; - -interface MaskLayerProps { - maskUrl: string; - color: string; - onMouseEnter: (maskUrl: string) => void; - onClick: (maskUrl: string) => void; -} - -/** - * Componente para renderizar una única capa de máscara. - * Usa React.memo para evitar re-renderizados si las props no cambian. - */ -const MaskLayer = React.memo(function MaskLayer({ - maskUrl, - color, - onMouseEnter, - onClick, -}: MaskLayerProps) { - // Creamos los manejadores de eventos aquí para pasar la URL de la máscara. - // Como el componente está memoizado, estas funciones solo se recrean si las props cambian. - const handleMouseEnter = () => onMouseEnter(maskUrl); - const handleClick = () => onClick(maskUrl); - - return ( -
- ); -}); - -export default MaskLayer; +import React from "react"; + +interface MaskLayerProps { + maskUrl: string; + color: string; + onMouseEnter: (maskUrl: string) => void; + onClick: (maskUrl: string) => void; +} + +/** + * Componente para renderizar una única capa de máscara. + * Usa React.memo para evitar re-renderizados si las props no cambian. + */ +const MaskLayer = React.memo(function MaskLayer({ + maskUrl, + color, + onMouseEnter, + onClick, +}: MaskLayerProps) { + // Creamos los manejadores de eventos aquí para pasar la URL de la máscara. + // Como el componente está memoizado, estas funciones solo se recrean si las props cambian. + const handleMouseEnter = () => onMouseEnter(maskUrl); + const handleClick = () => onClick(maskUrl); + + return ( +
+ ); +}); + +export default MaskLayer; diff --git a/frontend/src/features/roomVisualizer/RoomPreviewPanel.tsx b/frontend/src/features/roomVisualizer/RoomPreviewPanel.tsx index a7274afc59a48c66ee166add6333d49648c0ae81..07231bdd9c8c8b5d55f7ddc059880954dadd7eac 100644 --- a/frontend/src/features/roomVisualizer/RoomPreviewPanel.tsx +++ b/frontend/src/features/roomVisualizer/RoomPreviewPanel.tsx @@ -1,338 +1,329 @@ -import { - type PointerEvent, - type SyntheticEvent, - type RefObject, -} from "react"; -import { - ArrowLeft, - Share2, - Download, - MapPin, - ShoppingCart, - RefreshCw, - RotateCcw, - Paintbrush, - Loader2, -} from "lucide-react"; -import type { Product } from "../../types"; -import type { SegmentMeta } from "../../hooks/useSegmentCanvas"; - -interface RoomPreviewPanelProps { - previewImage?: string | null; - offset: { x: number; y: number }; - zoom: number; - imageSize: { width: number; height: number }; - wrapperRef: RefObject; - canvasRef: RefObject; - selectedProduct: Product | null; - selectedMasks: Set; - hoveredMask: number; - segmentMeta: Map; - isApplying: boolean; - onBack: () => void; - onPointerDown: (event: PointerEvent) => void; - onPointerMove: (event: PointerEvent) => void; - onPointerUp: (event: PointerEvent) => void; - updateImageSize: (img: HTMLImageElement) => void; - onCanvasMouseMove: (e: React.MouseEvent) => void; - onCanvasMouseLeave: () => void; - onCanvasClick: (e: React.MouseEvent) => void; - onApplyTexture: () => void; - onReset: () => void; - onDownload: () => Promise; - onShare: () => Promise; - maskCount?: number; -} - - -export function RoomPreviewPanel({ - previewImage, - offset, - zoom, - imageSize, - wrapperRef, - canvasRef, - selectedProduct, - selectedMasks, - hoveredMask, - segmentMeta, - isApplying, - onBack, - onPointerDown, - onPointerMove, - onPointerUp, - updateImageSize, - onCanvasMouseMove, - onCanvasMouseLeave, - onCanvasClick, - onApplyTexture, - onReset, - onDownload, - onShare, - maskCount = 0, -}: RoomPreviewPanelProps) { - const canApply = (selectedMasks.size > 0 || maskCount === 0) && selectedProduct != null; - - - const getLabel = (index: number) => - segmentMeta.get(index)?.label ?? `Zona ${index}`; - - return ( -
-
- - {/* ── Mobile top bar ───────────────────────────────────────── */} - {/* pr-12 reserva espacio a la derecha para el botón .hr-close del padre */} -
- -
- - -
-
- - {/* ── Desktop top bar ──────────────────────────────────────── */} -
- - | - - - - Encuentra tu tienda - - {selectedProduct?.detailUrl ? ( - - Ir a la página del producto - - ) : ( - - )} -
- - {/* ── Área de imagen + canvas ──────────────────────────────── */} -
- {previewImage ? ( -
0 - ? { width: imageSize.width, height: imageSize.height } - : {}), - }} - > - Vista previa de la habitación e.preventDefault()} - onLoad={(event: SyntheticEvent) => - updateImageSize(event.currentTarget) - } - style={{ - display: "block", - width: imageSize.width > 0 ? "100%" : "auto", - height: imageSize.height > 0 ? "100%" : "auto", - maxWidth: imageSize.width > 0 ? "none" : "100%", - maxHeight: imageSize.height > 0 ? "none" : "100%", - objectFit: "contain", - }} - /> - -
- ) : ( -
- No hay vista previa disponible aún. -
- )} -
- - {/* ── Hint de selección ────────────────────────────────────── */} - {previewImage && selectedMasks.size === 0 && ( -
- {maskCount > 0 ? ( - hoveredMask > 0 - ? `${getLabel(hoveredMask)} — haz clic para seleccionar` - : "Haz clic sobre una zona de la imagen para seleccionarla" - ) : ( - "Selecciona un producto de la lista para visualizarlo con IA" - )} -
- )} - - - {/* ── Mobile bottom bar ────────────────────────────────────── */} -
- {selectedProduct && ( -
- {selectedProduct.name} -
-

{selectedProduct.brand}

-

{selectedProduct.name}

-
-
- )} - {!selectedProduct && selectedMasks.size > 0 && ( -

- {[...selectedMasks].map(getLabel).join(", ")} -

- )} - {!selectedProduct && selectedMasks.size === 0 &&
} - -
- {canApply && ( - - )} - -
-
- - {/* ── Desktop bottom bar ───────────────────────────────────── */} -
- {selectedProduct && ( -
- {selectedProduct.name} -
-

{selectedProduct.brand}

-

- {selectedProduct.name} -

-
-
- )} - - {selectedMasks.size > 0 && ( -

- {[...selectedMasks].map(getLabel).join(", ")} -

- )} - -
- - {canApply && ( - - )} - - - -
- -
-
- ); -} +import { + type PointerEvent, + type SyntheticEvent, + type RefObject, +} from "react"; +import { + ArrowLeft, + Share2, + Download, + MapPin, + ShoppingCart, + RefreshCw, + RotateCcw, + Paintbrush, + Loader2, +} from "lucide-react"; +import type { Product } from "../../types"; +import type { SegmentMeta } from "../../hooks/useSegmentCanvas"; + +interface RoomPreviewPanelProps { + previewImage?: string | null; + offset: { x: number; y: number }; + zoom: number; + imageSize: { width: number; height: number }; + wrapperRef: RefObject; + canvasRef: RefObject; + selectedProduct: Product | null; + selectedMasks: Set; + hoveredMask: number; + segmentMeta: Map; + isApplying: boolean; + onBack: () => void; + onPointerDown: (event: PointerEvent) => void; + onPointerMove: (event: PointerEvent) => void; + onPointerUp: (event: PointerEvent) => void; + updateImageSize: (img: HTMLImageElement) => void; + onCanvasMouseMove: (e: React.MouseEvent) => void; + onCanvasMouseLeave: () => void; + onCanvasClick: (e: React.MouseEvent) => void; + onApplyTexture: () => void; + onReset: () => void; + onDownload: () => Promise; + onShare: () => Promise; +} + +export function RoomPreviewPanel({ + previewImage, + offset, + zoom, + imageSize, + wrapperRef, + canvasRef, + selectedProduct, + selectedMasks, + hoveredMask, + segmentMeta, + isApplying, + onBack, + onPointerDown, + onPointerMove, + onPointerUp, + updateImageSize, + onCanvasMouseMove, + onCanvasMouseLeave, + onCanvasClick, + onApplyTexture, + onReset, + onDownload, + onShare, +}: RoomPreviewPanelProps) { + const canApply = selectedMasks.size > 0 && selectedProduct != null; + + const getLabel = (index: number) => + segmentMeta.get(index)?.label ?? `Zona ${index}`; + + return ( +
+
+ + {/* ── Mobile top bar ───────────────────────────────────────── */} + {/* pr-12 reserva espacio a la derecha para el botón .hr-close del padre */} +
+ +
+ + +
+
+ + {/* ── Desktop top bar ──────────────────────────────────────── */} +
+ + | + + + + Encuentra tu tienda + + {selectedProduct?.detailUrl ? ( + + Ir a la página del producto + + ) : ( + + )} +
+ + {/* ── Área de imagen + canvas ──────────────────────────────── */} +
+ {previewImage ? ( +
0 + ? { width: imageSize.width, height: imageSize.height } + : {}), + }} + > + Vista previa de la habitación e.preventDefault()} + onLoad={(event: SyntheticEvent) => + updateImageSize(event.currentTarget) + } + style={{ + display: "block", + width: imageSize.width > 0 ? "100%" : "auto", + height: imageSize.height > 0 ? "100%" : "auto", + maxWidth: imageSize.width > 0 ? "none" : "100%", + maxHeight: imageSize.height > 0 ? "none" : "100%", + objectFit: "contain", + }} + /> + +
+ ) : ( +
+ No hay vista previa disponible aún. +
+ )} +
+ + {/* ── Hint de selección ────────────────────────────────────── */} + {previewImage && selectedMasks.size === 0 && ( +
+ {hoveredMask > 0 + ? `${getLabel(hoveredMask)} — haz clic para seleccionar` + : "Haz clic sobre una zona de la imagen para seleccionarla"} +
+ )} + + {/* ── Mobile bottom bar ────────────────────────────────────── */} +
+ {selectedProduct && ( +
+ {selectedProduct.name} +
+

{selectedProduct.brand}

+

{selectedProduct.name}

+
+
+ )} + {!selectedProduct && selectedMasks.size > 0 && ( +

+ {[...selectedMasks].map(getLabel).join(", ")} +

+ )} + {!selectedProduct && selectedMasks.size === 0 &&
} + +
+ {canApply && ( + + )} + +
+
+ + {/* ── Desktop bottom bar ───────────────────────────────────── */} +
+ {selectedProduct && ( +
+ {selectedProduct.name} +
+

{selectedProduct.brand}

+

+ {selectedProduct.name} +

+
+
+ )} + + {selectedMasks.size > 0 && ( +

+ {[...selectedMasks].map(getLabel).join(", ")} +

+ )} + +
+ + {canApply && ( + + )} + + + +
+ +
+
+ ); +} diff --git a/frontend/src/features/roomVisualizer/RoomVisualizer.tsx b/frontend/src/features/roomVisualizer/RoomVisualizer.tsx index 71f1564a0ffe7ce042b4f15ed99868f6bc7e4a65..fa8f365fe8b33f3b1ac6c04521b1e5ded1795538 100644 --- a/frontend/src/features/roomVisualizer/RoomVisualizer.tsx +++ b/frontend/src/features/roomVisualizer/RoomVisualizer.tsx @@ -1,1000 +1,617 @@ -import { - useCallback, - useEffect, - useRef, - useState, - type PointerEvent, -} from "react"; -import { ChevronDown } from "lucide-react"; -import { createRoot } from "react-dom/client"; -import { useLocation, useNavigate } from "react-router-dom"; -import { LayoutGrid, Search, SlidersHorizontal, Menu, X } from "lucide-react"; -import Swal from "sweetalert2"; -import { - WhatsappShareButton, - WhatsappIcon, - TelegramShareButton, - TelegramIcon, - TwitterShareButton, - XIcon, - FacebookShareButton, - FacebookIcon, - EmailShareButton, - EmailIcon, -} from "react-share"; -import { ProductGroupCard, IndividualProductCard } from "./ProductCards"; -import { useRoomVisualizer } from "./roomVisualizerHooks"; -import { useCatalogProducts } from "./useCatalogProducts"; -import { RoomPreviewPanel } from "./RoomPreviewPanel"; -import useAppStore from "../../store/useAppStore"; -import { API_BASE } from "../../api/client"; -// No segmentation canvas: we remove mask-based flows and use defaults -import { useApplyTexture } from "../../hooks/useApplyTexture"; -import type { SegmentMeta } from "../../hooks/useSegmentCanvas"; - -type RoomVisualizerState = { - previewImage?: string; - filename?: string; - maskCount?: number; -}; - -// ── Hook para detectar mobile (< 1024px) ───────────────────────────────────── -function useIsMobile() { - const [isMobile, setIsMobile] = useState(() => window.innerWidth < 1024); - useEffect(() => { - const handler = () => setIsMobile(window.innerWidth < 1024); - window.addEventListener("resize", handler); - return () => window.removeEventListener("resize", handler); - }, []); - return isMobile; -} - -export default function RoomVisualizer() { - const location = useLocation(); - const navigate = useNavigate(); - const state = location.state as RoomVisualizerState | null; - const isMobile = useIsMobile(); - - const storedPreviewImage = useAppStore((store) => store.previewImage); - const segmentFilename = useAppStore((store) => store.segmentFilename); - const accumulatedFilename = useAppStore((store) => store.accumulatedFilename); - const setAccumulatedFilename = useAppStore( - (store) => store.setAccumulatedFilename, - ); - const setSegmentResult = useAppStore((store) => store.setSegmentResult); - const setPreviewImage = useAppStore((store) => store.setPreviewImage); - - // Restaurar segmentFilename y previewImage cuando se abre una sesión del historial - useEffect(() => { - if (state?.filename && state.filename !== segmentFilename) { - setSegmentResult(state.filename, state.maskCount ?? 0); - setAccumulatedFilename(null); // limpiar ediciones de sesión anterior - } - if (state?.previewImage) { - setPreviewImage(state.previewImage); - } - // Solo al montar — state no cambia tras la navegación - // eslint-disable-next-line react-hooks/exhaustive-deps - }, []); - - const [currentPreviewImage, setCurrentPreviewImage] = useState( - () => { - if (accumulatedFilename) - return `${API_BASE}/seg/image/${accumulatedFilename}`; - return state?.previewImage ?? storedPreviewImage ?? null; - }, - ); - - const [zoom, setZoom] = useState(1); - const [offset, setOffset] = useState({ x: 0, y: 0 }); - const [dragStart, setDragStart] = useState<{ x: number; y: number } | null>( - null, - ); - const [imageSize, setImageSize] = useState({ width: 0, height: 0 }); - const wrapperRef = useRef(null); - - const { products, categories, loading, error } = useCatalogProducts(); - - // null = sin interacción (primera categoría abierta por defecto) - // Set vacío = usuario cerró todo deliberadamente - const [openCategoryIds, setOpenCategoryIds] = useState | null>( - null, - ); - - const isCategoryOpen = useCallback( - (id: string) => { - if (openCategoryIds === null) { - return categories.length > 0 && id === categories[0].id; - } - return openCategoryIds.has(id); - }, - [openCategoryIds, categories], - ); - - const toggleCategory = useCallback( - (id: string) => { - setOpenCategoryIds((prev) => { - const base = - prev === null - ? categories.length > 0 - ? new Set([categories[0].id]) - : new Set() - : new Set(prev); - if (base.has(id)) base.delete(id); - else base.add(id); - return base; - }); - }, - [categories], - ); - - const { - viewMode, - showGrid, - showList, - openProductId, - handleSelectProduct, - selectedProduct, - isSearchOpen, - setIsSearchOpen, - searchQuery, - setSearchQuery, - closeSearch, - filteredProducts, - chunkArray, - } = useRoomVisualizer(products); - - useEffect(() => { - showList(); - }, [showList]); - - // Masks/segmentation removed: provide safe defaults/noops so panels keep working - const canvasRef = useRef(null); - const hoveredMask = -1; - const selectedMasks = new Set(); - const segmentMeta = new Map(); - const handleCanvasMouseMove = () => {}; - const handleCanvasMouseLeave = () => {}; - const handleCanvasClick = () => {}; - - const { - applyTexture, - applyTextureAI, - applyTextureOpenAI, - isApplying, - resetResult, - } = useApplyTexture(); - const uploadedFile = useAppStore((s) => s.uploadedFile); - - const applyTextureWith = useCallback( - async (texturePath: string) => { - if (isApplying) { - Swal.fire( - "Espera", - "Ya hay una operación en curso. Espera a que termine.", - "info", - ); - return; - } - // Si el usuario subió una imagen en esta sesión, preferimos usar el endpoint OpenAI - if (uploadedFile) { - try { - // If the image was already uploaded to server, prefer passing the server filename (avoid sending generated previews) - const serverUrl = state?.previewImage ?? storedPreviewImage ?? null; - let source: File | string = uploadedFile; - // If preview points to uploads path, extract filename and send it instead - if ( - typeof serverUrl === "string" && - serverUrl.includes("/uploads/") - ) { - // serverUrl may be e.g. "http://localhost:8000/uploads/" or "/uploads/" - const idx = serverUrl.lastIndexOf("/uploads/"); - const filename = serverUrl.substring(idx + "/uploads/".length); - source = filename; - } - const data = await applyTextureOpenAI(source, texturePath); - if (data?.url) { - setCurrentPreviewImage(data.url); - } - } catch (err) { - Swal.fire( - "Error", - err instanceof Error ? err.message : "Error al procesar", - "error", - ); - } - return; - } - // Si no hay imagen subida y no hay segmentFilename, no hay flujo sin máscaras disponible - if (!segmentFilename) { - Swal.fire( - "Atención", - "Sube primero una imagen para aplicar el producto.", - "info", - ); - return; - } - const baseFilename = accumulatedFilename ?? segmentFilename; - try { - // Si no hay máscaras seleccionadas (o no existen en el flujo simplificado), usamos IA - if (selectedMasks.size === 0) { - const data = await applyTextureAI( - baseFilename, - texturePath, - segmentFilename, - ); - - let resultData = data; - // Si es un job asíncrono, poll para esperar el resultado - if (data.job_id) { - const poll = async () => { - while (true) { - const res = await fetch(`${API_BASE}/seg/jobs/${data.job_id}`); - const job = await res.json(); - if (job.status === "done") return job.result; - if (job.status === "failed") - throw new Error(job.message || "AI failed"); - await new Promise((r) => setTimeout(r, 2000)); - } - }; - resultData = await poll(); - } - - if (resultData?.url) { - setCurrentPreviewImage( - `${API_BASE}${resultData.url}?t=${Date.now()}`, - ); - setAccumulatedFilename(resultData.filename); - } - return; - } - - // Flujo tradicional (si hubiera máscaras) - const data = await applyTexture( - baseFilename, - [...selectedMasks], - texturePath, - segmentFilename, - ); - if (data?.output_url) { - setCurrentPreviewImage( - `${API_BASE}${data.output_url}?t=${Date.now()}`, - ); - setAccumulatedFilename(data.output_filename); - } - } catch (err) { - Swal.fire( - "Error", - err instanceof Error ? err.message : "Error al procesar", - "error", - ); - } - }, - [ - applyTexture, - applyTextureAI, - segmentFilename, - selectedMasks, - accumulatedFilename, - setAccumulatedFilename, - ], - ); - - const handleApplyTexture = useCallback(async () => { - if (selectedProduct) await applyTextureWith(selectedProduct.ref); - }, [applyTextureWith, selectedProduct]); - - const handleProductSelect = useCallback( - async (id: string | number | null) => { - handleSelectProduct(id); - if (!id) return; - const product = products.find((p) => p.id === id); - if (!product) return; - // If user uploaded a file, use OpenAI flow; otherwise require existing segmentFilename - if (uploadedFile) { - await applyTextureWith(product.ref); - return; - } - if (!segmentFilename) { - Swal.fire( - "Atención", - "Sube primero una imagen para aplicar el producto.", - "info", - ); - return; - } - await applyTextureWith(product.ref); - }, - [handleSelectProduct, segmentFilename, products, applyTextureWith], - ); - - const handleReset = useCallback(() => { - const original = state?.previewImage ?? storedPreviewImage ?? null; - setCurrentPreviewImage(original); - setAccumulatedFilename(null); - resetResult(); - }, [state, storedPreviewImage, setAccumulatedFilename, resetResult]); - - const handleDownload = useCallback(async () => { - if (!currentPreviewImage) return; - const response = await fetch(currentPreviewImage); - const blob = await response.blob(); - const url = URL.createObjectURL(blob); - const a = document.createElement("a"); - a.href = url; - a.download = `hyper-reality-${Date.now()}.jpg`; - document.body.appendChild(a); - a.click(); - document.body.removeChild(a); - URL.revokeObjectURL(url); - }, [currentPreviewImage]); - - const handleShare = useCallback(async (): Promise => { - let shareUrl = window.location.href; - const outputFilename = accumulatedFilename; - if (outputFilename) { - try { - const res = await fetch(`${API_BASE}/api/share`, { - method: "POST", - headers: { "Content-Type": "application/json" }, - body: JSON.stringify({ - output_filename: outputFilename, - segment_filename: segmentFilename, - }), - }); - if (res.ok) { - const data = (await res.json()) as { share_id: string }; - shareUrl = `${window.location.origin}/app/share/${data.share_id}`; - } - } catch { - // fallback to current URL - } - } - - const title = "My design with Hyper Reality Visualizer"; - let reactRoot: ReturnType | null = null; - - await Swal.fire({ - title: "Compartir diseño", - html: ` -
-

Enlace de tu diseño:

-
- - -
-

Compartir en:

-
-
- `, - showConfirmButton: false, - showCloseButton: true, - width: 500, - didOpen: () => { - const copyBtn = document.getElementById("swal-copy-btn"); - copyBtn?.addEventListener("click", async () => { - await navigator.clipboard.writeText(shareUrl).catch(() => {}); - if (copyBtn) { - copyBtn.textContent = "¡Copiado!"; - copyBtn.style.background = "#16a34a"; - } - setTimeout(() => { - if (copyBtn) { - copyBtn.textContent = "Copiar"; - copyBtn.style.background = "#0047AB"; - } - }, 2000); - }); - const container = document.getElementById("swal-share-buttons"); - if (container) { - reactRoot = createRoot(container); - reactRoot.render( - <> - - - - - - - - - - - - - - - - , - ); - } - }, - willClose: () => { - reactRoot?.unmount(); - }, - }); - }, [segmentFilename, accumulatedFilename]); - - const clampOffset = useCallback( - (x: number, y: number, zoomValue: number) => { - const wrapper = wrapperRef.current; - if (!wrapper || imageSize.width === 0 || imageSize.height === 0) - return { x, y }; - const containerRect = wrapper.getBoundingClientRect(); - const scaledWidth = imageSize.width * zoomValue; - const scaledHeight = imageSize.height * zoomValue; - const maxX = Math.max(0, (scaledWidth - containerRect.width) / 2); - const maxY = Math.max(0, (scaledHeight - containerRect.height) / 2); - return { - x: Math.max(-maxX, Math.min(maxX, x)), - y: Math.max(-maxY, Math.min(maxY, y)), - }; - }, - [imageSize], - ); - - const updateImageSize = useCallback( - (img: HTMLImageElement) => { - const wrapper = wrapperRef.current; - if (!wrapper) return; - const containerRect = wrapper.getBoundingClientRect(); - const naturalRatio = img.naturalWidth / img.naturalHeight; - const containerRatio = containerRect.width / containerRect.height; - const width = - naturalRatio > containerRatio - ? containerRect.width - : containerRect.height * naturalRatio; - const height = - naturalRatio > containerRatio - ? containerRect.width / naturalRatio - : containerRect.height; - setImageSize({ width, height }); - setOffset((current) => clampOffset(current.x, current.y, zoom)); - }, - [clampOffset, zoom], - ); - - const handleWheel = useCallback( - (event: WheelEvent) => { - event.preventDefault(); - setZoom((currentZoom) => { - const next = Math.min( - 3, - Math.max(1, currentZoom - event.deltaY * 0.0015), - ); - setOffset((current) => clampOffset(current.x, current.y, next)); - return next; - }); - }, - [clampOffset], - ); - - useEffect(() => { - const el = wrapperRef.current; - if (!el) return; - el.addEventListener("wheel", handleWheel, { passive: false }); - return () => el.removeEventListener("wheel", handleWheel); - }, [handleWheel]); - - const handlePointerDown = useCallback( - (event: PointerEvent) => { - setDragStart({ x: event.clientX, y: event.clientY }); - }, - [], - ); - - const handlePointerMove = useCallback( - (event: PointerEvent) => { - if (!dragStart || zoom <= 1) return; - const dx = event.clientX - dragStart.x; - const dy = event.clientY - dragStart.y; - setOffset((current) => clampOffset(current.x + dx, current.y + dy, zoom)); - setDragStart({ x: event.clientX, y: event.clientY }); - }, - [clampOffset, dragStart, zoom], - ); - - const handlePointerUp = useCallback(() => setDragStart(null), []); - - // Props compartidos entre mobile y desktop para RoomPreviewPanel - const previewPanelProps = { - previewImage: currentPreviewImage, - offset, - zoom, - imageSize, - wrapperRef, - canvasRef, - selectedProduct, - selectedMasks, - hoveredMask, - segmentMeta, - isApplying, - onBack: () => navigate("/app"), - onPointerDown: handlePointerDown, - onPointerMove: handlePointerMove, - onPointerUp: handlePointerUp, - updateImageSize, - onCanvasMouseMove: handleCanvasMouseMove, - onCanvasMouseLeave: handleCanvasMouseLeave, - onCanvasClick: handleCanvasClick, - onApplyTexture: handleApplyTexture, - onReset: handleReset, - onDownload: handleDownload, - onShare: handleShare, - maskCount: state?.maskCount ?? 0, - }; - - // ── Mobile strip: thumbnails + búsqueda ────────────────────────────────── - const MobileProductStrip = ( -
- {isSearchOpen && ( -
-
- - setSearchQuery(e.target.value)} - style={{ - width: "100%", - paddingLeft: 34, - paddingRight: 32, - paddingTop: 8, - paddingBottom: 8, - borderRadius: 8, - border: "2px solid #0047AB", - outline: "none", - fontSize: 14, - color: "#333", - boxSizing: "border-box", - }} - /> - -
-
- )} - - {/* Thumbnails con scroll horizontal */} -
- {loading ? ( -
- Cargando... -
- ) : ( - filteredProducts.map((product) => ( - - )) - )} -
- - {/* Info del producto + íconos */} -
- {selectedProduct ? ( -
-

- {selectedProduct.brand} -

-

- {selectedProduct.name} -

-
- ) : ( -
- )} -
- - -
-
-
- ); - - // ── Desktop sidebar ─────────────────────────────────────────────────────── - const DesktopSidebar = ( -
-
-
- - {/* Barra de herramientas */} -
- {!isSearchOpen && ( - - )} - -
- - -
-
- - {isSearchOpen && ( -
-
- - setSearchQuery(e.target.value)} - className="w-full pl-11 pr-10 py-3 rounded-lg border-2 border-[#0047AB] bg-white focus:outline-none transition-all text-sm text-[#333333]" - /> - -
-
- )} -
- - {/* Lista de productos con acordeón por categoría */} -
- {loading ? ( -
- Cargando productos... -
- ) : error ? ( -
- {error} -
- ) : searchQuery ? ( - /* Búsqueda activa → lista plana de resultados */ -
- {filteredProducts.length === 0 ? ( -
- Sin resultados -
- ) : viewMode === "grid" ? ( -
- {chunkArray(filteredProducts, 3).map((group, i) => ( - - ))} -
- ) : ( -
- {filteredProducts.map((product) => ( - handleProductSelect(product.id)} - /> - ))} -
- )} -
- ) : ( - /* Sin búsqueda → acordeón por categoría */ -
- {categories.map((cat) => { - const isOpen = isCategoryOpen(cat.id); - return ( -
- - - {isOpen && ( -
- {viewMode === "grid" ? ( -
- {chunkArray(cat.products, 3).map((group, i) => ( - - ))} -
- ) : ( -
- {cat.products.map((product) => ( - handleProductSelect(product.id)} - /> - ))} -
- )} -
- )} -
- ); - })} -
- )} -
-
- ); - - return ( -
- {isApplying && ( -
-
-
-
- Generando imagen… Por favor espera -
-
- -
- )} - {isMobile ? ( - // ── Layout Mobile: imagen arriba, strip de thumbnails abajo ────────── -
-
- -
- {MobileProductStrip} -
- ) : ( - // ── Layout Desktop: sidebar izquierda + imagen derecha ─────────────── -
- {DesktopSidebar} -
- -
-
- )} -
- ); -} +import { + useCallback, + useEffect, + useRef, + useState, + type PointerEvent, +} from "react"; +import { ChevronDown } from "lucide-react"; +import { createRoot } from "react-dom/client"; +import { useLocation, useNavigate } from "react-router-dom"; +import { + LayoutGrid, + Search, + SlidersHorizontal, + Menu, + X, +} from "lucide-react"; +import Swal from "sweetalert2"; +import { + WhatsappShareButton, WhatsappIcon, + TelegramShareButton, TelegramIcon, + TwitterShareButton, XIcon, + FacebookShareButton, FacebookIcon, + EmailShareButton, EmailIcon, +} from "react-share"; +import { ProductGroupCard, IndividualProductCard } from "./ProductCards"; +import { useRoomVisualizer } from "./roomVisualizerHooks"; +import { useCatalogProducts } from "./useCatalogProducts"; +import { RoomPreviewPanel } from "./RoomPreviewPanel"; +import useAppStore from "../../store/useAppStore"; +import { useSegmentCanvas } from "../../hooks/useSegmentCanvas"; +import { useApplyTexture } from "../../hooks/useApplyTexture"; +import { API_BASE } from "../../api/client"; + +type RoomVisualizerState = { + previewImage?: string; + filename?: string; + maskCount?: number; +}; + +// ── Hook para detectar mobile (< 1024px) ───────────────────────────────────── +function useIsMobile() { + const [isMobile, setIsMobile] = useState(() => window.innerWidth < 1024); + useEffect(() => { + const handler = () => setIsMobile(window.innerWidth < 1024); + window.addEventListener("resize", handler); + return () => window.removeEventListener("resize", handler); + }, []); + return isMobile; +} + +export default function RoomVisualizer() { + const location = useLocation(); + const navigate = useNavigate(); + const state = location.state as RoomVisualizerState | null; + const isMobile = useIsMobile(); + + const storedPreviewImage = useAppStore((store) => store.previewImage); + const segmentFilename = useAppStore((store) => store.segmentFilename); + const accumulatedFilename = useAppStore((store) => store.accumulatedFilename); + const setAccumulatedFilename = useAppStore((store) => store.setAccumulatedFilename); + const setSegmentResult = useAppStore((store) => store.setSegmentResult); + const setPreviewImage = useAppStore((store) => store.setPreviewImage); + + // Restaurar segmentFilename y previewImage cuando se abre una sesión del historial + useEffect(() => { + if (state?.filename && state.filename !== segmentFilename) { + setSegmentResult(state.filename, state.maskCount ?? 0); + setAccumulatedFilename(null); // limpiar ediciones de sesión anterior + } + if (state?.previewImage) { + setPreviewImage(state.previewImage); + } + // Solo al montar — state no cambia tras la navegación + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []); + + const [currentPreviewImage, setCurrentPreviewImage] = useState(() => { + if (accumulatedFilename) return `${API_BASE}/seg/image/${accumulatedFilename}`; + return state?.previewImage ?? storedPreviewImage ?? null; + }); + + const [zoom, setZoom] = useState(1); + const [offset, setOffset] = useState({ x: 0, y: 0 }); + const [dragStart, setDragStart] = useState<{ x: number; y: number } | null>(null); + const [imageSize, setImageSize] = useState({ width: 0, height: 0 }); + const wrapperRef = useRef(null); + + const { products, categories, loading, error } = useCatalogProducts(); + + // null = sin interacción (primera categoría abierta por defecto) + // Set vacío = usuario cerró todo deliberadamente + const [openCategoryIds, setOpenCategoryIds] = useState | null>(null); + + const isCategoryOpen = useCallback( + (id: string) => { + if (openCategoryIds === null) { + return categories.length > 0 && id === categories[0].id; + } + return openCategoryIds.has(id); + }, + [openCategoryIds, categories], + ); + + const toggleCategory = useCallback((id: string) => { + setOpenCategoryIds((prev) => { + const base = + prev === null + ? categories.length > 0 + ? new Set([categories[0].id]) + : new Set() + : new Set(prev); + if (base.has(id)) base.delete(id); + else base.add(id); + return base; + }); + }, [categories]); + + const { + viewMode, showGrid, showList, + openProductId, handleSelectProduct, selectedProduct, + isSearchOpen, setIsSearchOpen, + searchQuery, setSearchQuery, closeSearch, + filteredProducts, chunkArray, + } = useRoomVisualizer(products); + + useEffect(() => { showList(); }, [showList]); + + + const { + canvasRef, + hoveredMask, + selectedMasks, + segmentMeta, + handleCanvasMouseMove, + handleCanvasMouseLeave, + handleCanvasClick, + clearSelection, + } = useSegmentCanvas(segmentFilename); + + const { applyTexture, isApplying, resetResult } = useApplyTexture(); + + const applyTextureWith = useCallback( + async (texturePath: string) => { + if (!segmentFilename || selectedMasks.size === 0) return; + const baseFilename = accumulatedFilename ?? segmentFilename; + try { + const data = await applyTexture(baseFilename, [...selectedMasks], texturePath, segmentFilename); + if (data?.output_url) { + setCurrentPreviewImage(`${API_BASE}${data.output_url}?t=${Date.now()}`); + setAccumulatedFilename(data.output_filename); + clearSelection(); + } + } catch { + // error ya guardado en el hook + } + }, + [applyTexture, segmentFilename, selectedMasks, clearSelection, accumulatedFilename, setAccumulatedFilename], + ); + + const handleApplyTexture = useCallback(async () => { + if (selectedProduct) await applyTextureWith(selectedProduct.ref); + }, [applyTextureWith, selectedProduct]); + + const handleProductSelect = useCallback( + async (id: string | number | null) => { + handleSelectProduct(id); + if (!id || selectedMasks.size === 0 || !segmentFilename) return; + const product = products.find((p) => p.id === id); + if (product) await applyTextureWith(product.ref); + }, + [handleSelectProduct, selectedMasks, segmentFilename, products, applyTextureWith], + ); + + const handleReset = useCallback(() => { + const original = state?.previewImage ?? storedPreviewImage ?? null; + setCurrentPreviewImage(original); + setAccumulatedFilename(null); + clearSelection(); + resetResult(); + }, [state, storedPreviewImage, setAccumulatedFilename, clearSelection, resetResult]); + + const handleDownload = useCallback(async () => { + if (!currentPreviewImage) return; + const response = await fetch(currentPreviewImage); + const blob = await response.blob(); + const url = URL.createObjectURL(blob); + const a = document.createElement("a"); + a.href = url; + a.download = `hyper-reality-${Date.now()}.jpg`; + document.body.appendChild(a); + a.click(); + document.body.removeChild(a); + URL.revokeObjectURL(url); + }, [currentPreviewImage]); + + const handleShare = useCallback(async (): Promise => { + let shareUrl = window.location.href; + const outputFilename = accumulatedFilename; + if (outputFilename) { + try { + const res = await fetch(`${API_BASE}/api/share`, { + method: "POST", + headers: { "Content-Type": "application/json" }, + body: JSON.stringify({ output_filename: outputFilename, segment_filename: segmentFilename }), + }); + if (res.ok) { + const data = (await res.json()) as { share_id: string }; + shareUrl = `${window.location.origin}/app/share/${data.share_id}`; + } + } catch { + // fallback to current URL + } + } + + const title = "My design with Hyper Reality Visualizer"; + let reactRoot: ReturnType | null = null; + + await Swal.fire({ + title: "Compartir diseño", + html: ` +
+

Enlace de tu diseño:

+
+ + +
+

Compartir en:

+
+
+ `, + showConfirmButton: false, + showCloseButton: true, + width: 500, + didOpen: () => { + const copyBtn = document.getElementById("swal-copy-btn"); + copyBtn?.addEventListener("click", async () => { + await navigator.clipboard.writeText(shareUrl).catch(() => {}); + if (copyBtn) { copyBtn.textContent = "¡Copiado!"; copyBtn.style.background = "#16a34a"; } + setTimeout(() => { + if (copyBtn) { copyBtn.textContent = "Copiar"; copyBtn.style.background = "#0047AB"; } + }, 2000); + }); + const container = document.getElementById("swal-share-buttons"); + if (container) { + reactRoot = createRoot(container); + reactRoot.render( + <> + + + + + + , + ); + } + }, + willClose: () => { reactRoot?.unmount(); }, + }); + }, [segmentFilename, accumulatedFilename]); + + const clampOffset = useCallback( + (x: number, y: number, zoomValue: number) => { + const wrapper = wrapperRef.current; + if (!wrapper || imageSize.width === 0 || imageSize.height === 0) return { x, y }; + const containerRect = wrapper.getBoundingClientRect(); + const scaledWidth = imageSize.width * zoomValue; + const scaledHeight = imageSize.height * zoomValue; + const maxX = Math.max(0, (scaledWidth - containerRect.width) / 2); + const maxY = Math.max(0, (scaledHeight - containerRect.height) / 2); + return { + x: Math.max(-maxX, Math.min(maxX, x)), + y: Math.max(-maxY, Math.min(maxY, y)), + }; + }, + [imageSize], + ); + + const updateImageSize = useCallback( + (img: HTMLImageElement) => { + const wrapper = wrapperRef.current; + if (!wrapper) return; + const containerRect = wrapper.getBoundingClientRect(); + const naturalRatio = img.naturalWidth / img.naturalHeight; + const containerRatio = containerRect.width / containerRect.height; + const width = naturalRatio > containerRatio ? containerRect.width : containerRect.height * naturalRatio; + const height = naturalRatio > containerRatio ? containerRect.width / naturalRatio : containerRect.height; + setImageSize({ width, height }); + setOffset((current) => clampOffset(current.x, current.y, zoom)); + }, + [clampOffset, zoom], + ); + + const handleWheel = useCallback( + (event: WheelEvent) => { + event.preventDefault(); + setZoom((currentZoom) => { + const next = Math.min(3, Math.max(1, currentZoom - event.deltaY * 0.0015)); + setOffset((current) => clampOffset(current.x, current.y, next)); + return next; + }); + }, + [clampOffset], + ); + + useEffect(() => { + const el = wrapperRef.current; + if (!el) return; + el.addEventListener("wheel", handleWheel, { passive: false }); + return () => el.removeEventListener("wheel", handleWheel); + }, [handleWheel]); + + const handlePointerDown = useCallback((event: PointerEvent) => { + setDragStart({ x: event.clientX, y: event.clientY }); + }, []); + + const handlePointerMove = useCallback( + (event: PointerEvent) => { + if (!dragStart || zoom <= 1) return; + const dx = event.clientX - dragStart.x; + const dy = event.clientY - dragStart.y; + setOffset((current) => clampOffset(current.x + dx, current.y + dy, zoom)); + setDragStart({ x: event.clientX, y: event.clientY }); + }, + [clampOffset, dragStart, zoom], + ); + + const handlePointerUp = useCallback(() => setDragStart(null), []); + + // Props compartidos entre mobile y desktop para RoomPreviewPanel + const previewPanelProps = { + previewImage: currentPreviewImage, + offset, + zoom, + imageSize, + wrapperRef, + canvasRef, + selectedProduct, + selectedMasks, + hoveredMask, + segmentMeta, + isApplying, + onBack: () => navigate("/app"), + onPointerDown: handlePointerDown, + onPointerMove: handlePointerMove, + onPointerUp: handlePointerUp, + updateImageSize, + onCanvasMouseMove: handleCanvasMouseMove, + onCanvasMouseLeave: handleCanvasMouseLeave, + onCanvasClick: handleCanvasClick, + onApplyTexture: handleApplyTexture, + onReset: handleReset, + onDownload: handleDownload, + onShare: handleShare, + }; + + // ── Mobile strip: thumbnails + búsqueda ────────────────────────────────── + const MobileProductStrip = ( +
+ {isSearchOpen && ( +
+
+ + setSearchQuery(e.target.value)} + style={{ + width: "100%", + paddingLeft: 34, + paddingRight: 32, + paddingTop: 8, + paddingBottom: 8, + borderRadius: 8, + border: "2px solid #0047AB", + outline: "none", + fontSize: 14, + color: "#333", + boxSizing: "border-box", + }} + /> + +
+
+ )} + + {/* Thumbnails con scroll horizontal */} +
+ {loading ? ( +
+ Cargando... +
+ ) : ( + filteredProducts.map((product) => ( + + )) + )} +
+ + {/* Info del producto + íconos */} +
+ {selectedProduct ? ( +
+

+ {selectedProduct.brand} +

+

+ {selectedProduct.name} +

+
+ ) : ( +
+ )} +
+ + +
+
+
+ ); + + // ── Desktop sidebar ─────────────────────────────────────────────────────── + const DesktopSidebar = ( +
+
+
+ + {/* Barra de herramientas */} +
+ {!isSearchOpen && ( + + )} + +
+ + +
+
+ + {isSearchOpen && ( +
+
+ + setSearchQuery(e.target.value)} + className="w-full pl-11 pr-10 py-3 rounded-lg border-2 border-[#0047AB] bg-white focus:outline-none transition-all text-sm text-[#333333]" + /> + +
+
+ )} +
+ + {/* Lista de productos con acordeón por categoría */} +
+ {loading ? ( +
Cargando productos...
+ ) : error ? ( +
{error}
+ ) : searchQuery ? ( + /* Búsqueda activa → lista plana de resultados */ +
+ {filteredProducts.length === 0 ? ( +
Sin resultados
+ ) : viewMode === "grid" ? ( +
+ {chunkArray(filteredProducts, 3).map((group, i) => ( + + ))} +
+ ) : ( +
+ {filteredProducts.map((product) => ( + handleProductSelect(product.id)} /> + ))} +
+ )} +
+ ) : ( + /* Sin búsqueda → acordeón por categoría */ +
+ {categories.map((cat) => { + const isOpen = isCategoryOpen(cat.id); + return ( +
+ + + {isOpen && ( +
+ {viewMode === "grid" ? ( +
+ {chunkArray(cat.products, 3).map((group, i) => ( + + ))} +
+ ) : ( +
+ {cat.products.map((product) => ( + handleProductSelect(product.id)} /> + ))} +
+ )} +
+ )} +
+ ); + })} +
+ )} +
+
+ ); + + return ( +
+ {isMobile ? ( + // ── Layout Mobile: imagen arriba, strip de thumbnails abajo ────────── +
+
+ +
+ {MobileProductStrip} +
+ ) : ( + // ── Layout Desktop: sidebar izquierda + imagen derecha ─────────────── +
+ {DesktopSidebar} +
+ +
+
+ )} +
+ ); +} diff --git a/frontend/src/features/roomVisualizer/roomVisualizer.types.ts b/frontend/src/features/roomVisualizer/roomVisualizer.types.ts index 2b414ec214b0ca28d60e05dff2b15235aaed8501..d1a78b2b0ce0e3840d0fb3c9f87c75b7a3310632 100644 --- a/frontend/src/features/roomVisualizer/roomVisualizer.types.ts +++ b/frontend/src/features/roomVisualizer/roomVisualizer.types.ts @@ -1,5 +1,5 @@ -// Tipos específicos de la feature roomVisualizer. - -export type ProductSelection = { - openProductId: string | number | null; -}; +// Tipos específicos de la feature roomVisualizer. + +export type ProductSelection = { + openProductId: string | number | null; +}; diff --git a/frontend/src/features/roomVisualizer/roomVisualizerHooks.ts b/frontend/src/features/roomVisualizer/roomVisualizerHooks.ts index 4990b710c535d7281d165db15c4d191df9a1c116..b633c9512e57d06680077708792e968899b0c41d 100644 --- a/frontend/src/features/roomVisualizer/roomVisualizerHooks.ts +++ b/frontend/src/features/roomVisualizer/roomVisualizerHooks.ts @@ -1,70 +1,70 @@ -import { useCallback, useMemo, useState } from "react"; -import useAppStore from "../../store/useAppStore"; -import type { Product } from "../../types"; - -export function useRoomVisualizer(products: Product[]) { - const viewMode = useAppStore((store) => store.viewMode); - const setViewMode = useAppStore((store) => store.setViewMode); - const openProductId = useAppStore((store) => store.openProductId); - const setOpenProductId = useAppStore((store) => store.setOpenProductId); - - const [isSearchOpen, setIsSearchOpen] = useState(false); - const [searchQuery, setSearchQuery] = useState(""); - - const filteredProducts = useMemo(() => { - const normalizedQuery = searchQuery.trim().toLowerCase(); - return products.filter((product) => { - return ( - normalizedQuery.length === 0 || - product.brand.toLowerCase().includes(normalizedQuery) || - product.name.toLowerCase().includes(normalizedQuery) || - product.ref.toLowerCase().includes(normalizedQuery) || - product.size.toLowerCase().includes(normalizedQuery) - ); - }); - }, [products, searchQuery]); - - const handleSelectProduct = useCallback( - (id: string | number | null) => { - setOpenProductId(openProductId === id ? null : id); - }, - [openProductId, setOpenProductId], - ); - - const closeSearch = useCallback(() => { - setIsSearchOpen(false); - setSearchQuery(""); - }, []); - - const showGrid = useCallback(() => setViewMode("grid"), [setViewMode]); - const showList = useCallback(() => setViewMode("list"), [setViewMode]); - - const chunkArray = useCallback((arr: T[], size: number): T[][] => { - const chunks: T[][] = []; - for (let i = 0; i < arr.length; i += size) { - chunks.push(arr.slice(i, i + size)); - } - return chunks; - }, []); - - const selectedProduct = useMemo( - () => products.find((product) => product.id === openProductId) ?? null, - [products, openProductId], - ); - - return { - viewMode, - showGrid, - showList, - openProductId, - handleSelectProduct, - selectedProduct, - isSearchOpen, - setIsSearchOpen, - searchQuery, - setSearchQuery, - closeSearch, - filteredProducts, - chunkArray, - }; -} +import { useCallback, useMemo, useState } from "react"; +import useAppStore from "../../store/useAppStore"; +import type { Product } from "../../types"; + +export function useRoomVisualizer(products: Product[]) { + const viewMode = useAppStore((store) => store.viewMode); + const setViewMode = useAppStore((store) => store.setViewMode); + const openProductId = useAppStore((store) => store.openProductId); + const setOpenProductId = useAppStore((store) => store.setOpenProductId); + + const [isSearchOpen, setIsSearchOpen] = useState(false); + const [searchQuery, setSearchQuery] = useState(""); + + const filteredProducts = useMemo(() => { + const normalizedQuery = searchQuery.trim().toLowerCase(); + return products.filter((product) => { + return ( + normalizedQuery.length === 0 || + product.brand.toLowerCase().includes(normalizedQuery) || + product.name.toLowerCase().includes(normalizedQuery) || + product.ref.toLowerCase().includes(normalizedQuery) || + product.size.toLowerCase().includes(normalizedQuery) + ); + }); + }, [products, searchQuery]); + + const handleSelectProduct = useCallback( + (id: string | number | null) => { + setOpenProductId(openProductId === id ? null : id); + }, + [openProductId, setOpenProductId], + ); + + const closeSearch = useCallback(() => { + setIsSearchOpen(false); + setSearchQuery(""); + }, []); + + const showGrid = useCallback(() => setViewMode("grid"), [setViewMode]); + const showList = useCallback(() => setViewMode("list"), [setViewMode]); + + const chunkArray = useCallback((arr: T[], size: number): T[][] => { + const chunks: T[][] = []; + for (let i = 0; i < arr.length; i += size) { + chunks.push(arr.slice(i, i + size)); + } + return chunks; + }, []); + + const selectedProduct = useMemo( + () => products.find((product) => product.id === openProductId) ?? null, + [products, openProductId], + ); + + return { + viewMode, + showGrid, + showList, + openProductId, + handleSelectProduct, + selectedProduct, + isSearchOpen, + setIsSearchOpen, + searchQuery, + setSearchQuery, + closeSearch, + filteredProducts, + chunkArray, + }; +} diff --git a/frontend/src/features/roomVisualizer/useCatalogProducts.ts b/frontend/src/features/roomVisualizer/useCatalogProducts.ts index 6a539ca74e1f5a448d15d8539078bd58184df50c..37dd7008e8bb9da7653168f2606e1d1e27bdfb60 100644 --- a/frontend/src/features/roomVisualizer/useCatalogProducts.ts +++ b/frontend/src/features/roomVisualizer/useCatalogProducts.ts @@ -1,97 +1,97 @@ -import { useEffect, useState } from "react"; -import type { Product } from "../../types"; - -const API_BASE = import.meta.env.VITE_API_URL ?? ""; - -interface CatalogProduct { - id: string; - nombre: string; - textura: string; - url_preview: string; - dimensiones: string[]; -} - -interface CatalogCategory { - id: string; - nombre: string; - tipo?: string; - descripcion: string; - especificaciones?: string[]; - url_detalle?: string; - productos: CatalogProduct[]; -} - -interface CatalogResponse { - categories: CatalogCategory[]; -} - -function mapToProduct(item: CatalogProduct, category: CatalogCategory): Product { - return { - id: item.id, - brand: category.nombre, - name: item.nombre, - ref: item.textura, - size: item.dimensiones.length > 0 ? item.dimensiones.join(" / ") : "—", - image: `${API_BASE}${item.url_preview}`, - description: category.especificaciones, - detailUrl: category.url_detalle, - tipo: (category.tipo as "suelos" | "paredes") ?? undefined, - categoria: category.id, - }; -} - -export interface ProductCategory { - id: string; - nombre: string; - tipo?: string; - descripcion: string; - especificaciones?: string[]; - products: Product[]; -} - -export function useCatalogProducts() { - const [products, setProducts] = useState([]); - const [categories, setCategories] = useState([]); - const [loading, setLoading] = useState(true); - const [error, setError] = useState(null); - - useEffect(() => { - let cancelled = false; - - async function fetchCatalog() { - try { - const res = await fetch(`${API_BASE}/api/catalog/textures`); - if (!res.ok) throw new Error(`Error ${res.status}`); - const data: CatalogResponse = await res.json(); - - const cats: ProductCategory[] = data.categories.map((category) => ({ - id: category.id, - nombre: category.nombre, - tipo: category.tipo, - descripcion: category.descripcion, - especificaciones: category.especificaciones, - products: category.productos.map((item) => mapToProduct(item, category)), - })); - - const flat = cats.flatMap((c) => c.products); - - if (!cancelled) { - setCategories(cats); - setProducts(flat); - setError(null); - } - } catch (err) { - if (!cancelled) { - setError(err instanceof Error ? err.message : "Error al cargar productos"); - } - } finally { - if (!cancelled) setLoading(false); - } - } - - fetchCatalog(); - return () => { cancelled = true; }; - }, []); - - return { products, categories, loading, error }; -} +import { useEffect, useState } from "react"; +import type { Product } from "../../types"; + +const API_BASE = import.meta.env.VITE_API_URL ?? ""; + +interface CatalogProduct { + id: string; + nombre: string; + textura: string; + url_preview: string; + dimensiones: string[]; +} + +interface CatalogCategory { + id: string; + nombre: string; + tipo?: string; + descripcion: string; + especificaciones?: string[]; + url_detalle?: string; + productos: CatalogProduct[]; +} + +interface CatalogResponse { + categories: CatalogCategory[]; +} + +function mapToProduct(item: CatalogProduct, category: CatalogCategory): Product { + return { + id: item.id, + brand: category.nombre, + name: item.nombre, + ref: item.textura, + size: item.dimensiones.length > 0 ? item.dimensiones.join(" / ") : "—", + image: `${API_BASE}${item.url_preview}`, + description: category.especificaciones, + detailUrl: category.url_detalle, + tipo: (category.tipo as "suelos" | "paredes") ?? undefined, + categoria: category.id, + }; +} + +export interface ProductCategory { + id: string; + nombre: string; + tipo?: string; + descripcion: string; + especificaciones?: string[]; + products: Product[]; +} + +export function useCatalogProducts() { + const [products, setProducts] = useState([]); + const [categories, setCategories] = useState([]); + const [loading, setLoading] = useState(true); + const [error, setError] = useState(null); + + useEffect(() => { + let cancelled = false; + + async function fetchCatalog() { + try { + const res = await fetch(`${API_BASE}/api/catalog/textures`); + if (!res.ok) throw new Error(`Error ${res.status}`); + const data: CatalogResponse = await res.json(); + + const cats: ProductCategory[] = data.categories.map((category) => ({ + id: category.id, + nombre: category.nombre, + tipo: category.tipo, + descripcion: category.descripcion, + especificaciones: category.especificaciones, + products: category.productos.map((item) => mapToProduct(item, category)), + })); + + const flat = cats.flatMap((c) => c.products); + + if (!cancelled) { + setCategories(cats); + setProducts(flat); + setError(null); + } + } catch (err) { + if (!cancelled) { + setError(err instanceof Error ? err.message : "Error al cargar productos"); + } + } finally { + if (!cancelled) setLoading(false); + } + } + + fetchCatalog(); + return () => { cancelled = true; }; + }, []); + + return { products, categories, loading, error }; +} diff --git a/frontend/src/features/roomVisualizer/useRoomVisualizer.ts b/frontend/src/features/roomVisualizer/useRoomVisualizer.ts index 41759507c45418dc6d9236d87c53470c0f112a82..ba2fb386191cfe80789dc9bb51f0e00f513917ab 100644 --- a/frontend/src/features/roomVisualizer/useRoomVisualizer.ts +++ b/frontend/src/features/roomVisualizer/useRoomVisualizer.ts @@ -1,36 +1,36 @@ -import { useState, useRef, useCallback } from "react"; - -export function useRoomVisualizer() { - const [hoveredMask, setHoveredMask] = useState(null); - const [selectedMasks, setSelectedMasks] = useState>(new Set()); - const containerRef = useRef(null); - - const handleMaskMouseEnter = useCallback((maskUrl: string) => { - setHoveredMask(maskUrl); - }, []); - - const handleMaskMouseLeave = useCallback(() => { - setHoveredMask(null); - }, []); - - const handleMaskClick = useCallback((maskUrl: string) => { - setSelectedMasks((prev) => { - const newSelected = new Set(prev); - if (newSelected.has(maskUrl)) { - newSelected.delete(maskUrl); - } else { - newSelected.add(maskUrl); - } - return newSelected; - }); - }, []); - - return { - containerRef, - hoveredMask, - selectedMasks, - handleMaskClick, - handleMaskMouseEnter, - handleMaskMouseLeave, - }; -} +import { useState, useRef, useCallback } from "react"; + +export function useRoomVisualizer() { + const [hoveredMask, setHoveredMask] = useState(null); + const [selectedMasks, setSelectedMasks] = useState>(new Set()); + const containerRef = useRef(null); + + const handleMaskMouseEnter = useCallback((maskUrl: string) => { + setHoveredMask(maskUrl); + }, []); + + const handleMaskMouseLeave = useCallback(() => { + setHoveredMask(null); + }, []); + + const handleMaskClick = useCallback((maskUrl: string) => { + setSelectedMasks((prev) => { + const newSelected = new Set(prev); + if (newSelected.has(maskUrl)) { + newSelected.delete(maskUrl); + } else { + newSelected.add(maskUrl); + } + return newSelected; + }); + }, []); + + return { + containerRef, + hoveredMask, + selectedMasks, + handleMaskClick, + handleMaskMouseEnter, + handleMaskMouseLeave, + }; +} diff --git a/frontend/src/features/routes/RouteList.tsx b/frontend/src/features/routes/RouteList.tsx index a397c232bbb73bb8f76d04d7038da343c90d0c4b..c2a4d8e5cbd0cf7be51541318c50507c9374cff5 100644 --- a/frontend/src/features/routes/RouteList.tsx +++ b/frontend/src/features/routes/RouteList.tsx @@ -1,20 +1,20 @@ -import type { RouteItem } from "../../types"; - -interface RouteListProps { - routes: RouteItem[]; -} - -export default function RouteList({ routes }: RouteListProps) { - return ( -
-

Rutas disponibles

-
    - {routes.map((route) => ( -
  • - {route.label}: {route.path} -
  • - ))} -
-
- ); -} +import type { RouteItem } from "../../types"; + +interface RouteListProps { + routes: RouteItem[]; +} + +export default function RouteList({ routes }: RouteListProps) { + return ( +
+

Rutas disponibles

+
    + {routes.map((route) => ( +
  • + {route.label}: {route.path} +
  • + ))} +
+
+ ); +} diff --git a/frontend/src/features/routes/RoutesPage.tsx b/frontend/src/features/routes/RoutesPage.tsx index f5e562af5b7367bf23533e6a27c2a9d789c1a859..7f78a357fea20a68e153caee662a3b123c965705 100644 --- a/frontend/src/features/routes/RoutesPage.tsx +++ b/frontend/src/features/routes/RoutesPage.tsx @@ -1,29 +1,29 @@ -import { Link } from "react-router-dom"; -import RouteList from "./RouteList"; -import type { RouteItem } from "../../types"; - -const AVAILABLE_ROUTES: RouteItem[] = [ - { label: "Room Setup", path: "/" }, - { label: "Viewer", path: "/viewer" }, - { label: "Rutas", path: "/routes" }, - { label: "Configuración", path: "/settings" }, - { label: "Home", path: "/" }, - { label: "Panel admin", path: "/admin" }, - { label: "Vista previa iframe", path: "/preview" }, - { label: "Generar token", path: "/api/token" }, - { label: "Obtener clientes", path: "/api/keys" }, - { label: "Generar API key", path: "/api/generate-key" }, - { label: "Sesiones activas", path: "/api/active-sessions" }, - { label: "Obtener config", path: "/config?token..." }, -]; - -export default function RoutesPage() { - return ( - <> - -

- Volver a la pantalla principal. -

- - ); -} +import { Link } from "react-router-dom"; +import RouteList from "./RouteList"; +import type { RouteItem } from "../../types"; + +const AVAILABLE_ROUTES: RouteItem[] = [ + { label: "Room Setup", path: "/" }, + { label: "Viewer", path: "/viewer" }, + { label: "Rutas", path: "/routes" }, + { label: "Configuración", path: "/settings" }, + { label: "Home", path: "/" }, + { label: "Panel admin", path: "/admin" }, + { label: "Vista previa iframe", path: "/preview" }, + { label: "Generar token", path: "/api/token" }, + { label: "Obtener clientes", path: "/api/keys" }, + { label: "Generar API key", path: "/api/generate-key" }, + { label: "Sesiones activas", path: "/api/active-sessions" }, + { label: "Obtener config", path: "/config?token..." }, +]; + +export default function RoutesPage() { + return ( + <> + +

+ Volver a la pantalla principal. +

+ + ); +} diff --git a/frontend/src/features/settings/SettingsPage.tsx b/frontend/src/features/settings/SettingsPage.tsx index 367f44403b206e5e94a6caa3f39cd90529b23b7d..db81d0330f616dddb324737a9245f3915b5fefa0 100644 --- a/frontend/src/features/settings/SettingsPage.tsx +++ b/frontend/src/features/settings/SettingsPage.tsx @@ -1,83 +1,83 @@ -import { useEffect, useState } from "react"; -import type { FormEvent } from "react"; -import { - loadSettings, - saveSettings, - DEFAULT_SETTINGS, - type AppSettings, -} from "../../utils/settings"; - -export default function SettingsPage() { - const [settings, setSettings] = useState(DEFAULT_SETTINGS); - const [status, setStatus] = useState(""); - - useEffect(() => { - setSettings(loadSettings()); - }, []); - - const handleChange = (field: keyof AppSettings, value: string | boolean) => { - setSettings((current) => ({ - ...current, - [field]: value, - })); - }; - - const handleSubmit = (event: FormEvent) => { - event.preventDefault(); - saveSettings(settings); - setStatus("Configuración guardada correctamente."); - window.setTimeout(() => setStatus(""), 3000); - }; - - return ( -
-

Configuración

-

Controla ajustes de la aplicación que se guardan en tu navegador.

- -
- - - handleChange("customApiBase", event.target.value) - } - placeholder="http://localhost:8000" - /> -
- -
- -
- -
- -
- - - - {status &&
{status}
} -
- ); -} +import { useEffect, useState } from "react"; +import type { FormEvent } from "react"; +import { + loadSettings, + saveSettings, + DEFAULT_SETTINGS, + type AppSettings, +} from "../../utils/settings"; + +export default function SettingsPage() { + const [settings, setSettings] = useState(DEFAULT_SETTINGS); + const [status, setStatus] = useState(""); + + useEffect(() => { + setSettings(loadSettings()); + }, []); + + const handleChange = (field: keyof AppSettings, value: string | boolean) => { + setSettings((current) => ({ + ...current, + [field]: value, + })); + }; + + const handleSubmit = (event: FormEvent) => { + event.preventDefault(); + saveSettings(settings); + setStatus("Configuración guardada correctamente."); + window.setTimeout(() => setStatus(""), 3000); + }; + + return ( +
+

Configuración

+

Controla ajustes de la aplicación que se guardan en tu navegador.

+ +
+ + + handleChange("customApiBase", event.target.value) + } + placeholder="http://localhost:8000" + /> +
+ +
+ +
+ +
+ +
+ + + + {status &&
{status}
} +
+ ); +} diff --git a/frontend/src/features/viewer/BridgePanel.tsx b/frontend/src/features/viewer/BridgePanel.tsx index 4c02f8f559926f8ff7836364bce5cae8ba39f091..c45201524775d8b27056f196f8b18b969ddf1c4e 100644 --- a/frontend/src/features/viewer/BridgePanel.tsx +++ b/frontend/src/features/viewer/BridgePanel.tsx @@ -1,18 +1,18 @@ -interface BridgePanelProps { - messages: string[]; -} - -export default function BridgePanel({ messages }: BridgePanelProps) { - if (messages.length === 0) return null; - - return ( -
-

Mensajes del padre

-
    - {messages.map((message, index) => ( -
  • {message}
  • - ))} -
-
- ); -} +interface BridgePanelProps { + messages: string[]; +} + +export default function BridgePanel({ messages }: BridgePanelProps) { + if (messages.length === 0) return null; + + return ( +
+

Mensajes del padre

+
    + {messages.map((message, index) => ( +
  • {message}
  • + ))} +
+
+ ); +} diff --git a/frontend/src/features/viewer/ClientPanel.tsx b/frontend/src/features/viewer/ClientPanel.tsx index 4dab822e3cdfec27d6b77aa223e7e262856899a6..5f3584e9694ab18b728e09f266df593bf3b1f033 100644 --- a/frontend/src/features/viewer/ClientPanel.tsx +++ b/frontend/src/features/viewer/ClientPanel.tsx @@ -1,18 +1,18 @@ -import type { ClientData } from "../../types"; - -interface ClientPanelProps { - cliente: ClientData; - onNotify: () => void; -} - -export default function ClientPanel({ cliente, onNotify }: ClientPanelProps) { - return ( -
-

Panel de Control

-

ID del cliente: {cliente.client_id}

- -
- ); -} +import type { ClientData } from "../../types"; + +interface ClientPanelProps { + cliente: ClientData; + onNotify: () => void; +} + +export default function ClientPanel({ cliente, onNotify }: ClientPanelProps) { + return ( +
+

Panel de Control

+

ID del cliente: {cliente.client_id}

+ +
+ ); +} diff --git a/frontend/src/features/viewer/Viewer.tsx b/frontend/src/features/viewer/Viewer.tsx index fa8bde8299c70a1d981cc9a9ce735fd148796a13..5c28dee7a4d8ea9a4e0b513202b7292caab8ef82 100644 --- a/frontend/src/features/viewer/Viewer.tsx +++ b/frontend/src/features/viewer/Viewer.tsx @@ -1,181 +1,181 @@ -import { useEffect, useState } from "react"; -import { Link } from "react-router-dom"; -import { startSession } from "../../api/client"; -import { useClientConfig } from "../../hooks/useClientConfig"; -import { - DEFAULT_SETTINGS, - loadSettings, - type AppSettings, -} from "../../utils/settings"; -import type { ClientData, RouteItem } from "../../types"; -import ClientPanel from "./ClientPanel"; -import BridgePanel from "./BridgePanel"; -import RouteList from "../routes/RouteList"; - -const AVAILABLE_ROUTES: RouteItem[] = [ - { label: "Home", path: "/" }, - { label: "Panel admin", path: "/admin" }, - { label: "Vista previa iframe", path: "/preview" }, - { label: "Generar token", path: "/api/token" }, - { label: "Obtener clientes", path: "/api/keys" }, - { label: "Generar API key", path: "/api/generate-key" }, - { label: "Sesiones activas", path: "/api/active-sessions" }, - { label: "Obtener config", path: "/config?token=..." }, -]; - -export default function Viewer() { - const [overrideCliente, setOverrideCliente] = useState( - null, - ); - const [bridgeMessages, setBridgeMessages] = useState([]); - const [settings, setSettings] = useState(DEFAULT_SETTINGS); - - const params = new URLSearchParams(window.location.search); - const token = params.get("token") ?? ""; - const clientKey = params.get("key") ?? ""; - const isDev = import.meta.env.DEV; - - useEffect(() => { - setSettings(loadSettings()); - }, []); - - const { data, error, isLoading } = useClientConfig( - token, - clientKey, - settings, - ); - - const queryCliente = data?.cliente ?? null; - const cliente = overrideCliente ?? queryCliente; - const showRouteList = settings.showRouteList && !token && !isDev; - - useEffect(() => { - if (!data) return; - - window.parent.postMessage( - { type: "app-loaded", clientId: data.cliente.client_id }, - "*", - ); - startSession(data.query, settings.customApiBase).catch(() => { - // Silenciar errores de sesión de inicio para no interrumpir la vista. - }); - }, [data, settings.customApiBase]); - - const displayError = - !isDev && !token && !clientKey - ? "No se encontró el token o key en la URL." - : error instanceof Error - ? error.message - : typeof error === "string" - ? error - : null; - - useEffect(() => { - const handleParentMessage = (event: MessageEvent) => { - if (!event.data || typeof event.data !== "object") return; - const data = event.data as { - type?: string; - command?: string; - payload?: { value?: string }; - }; - if (data.type !== "preview-command" || !data.command) return; - - setBridgeMessages((current) => [ - `Recibido comando: ${data.command}${data.payload?.value ? ` (${data.payload.value})` : ""}`, - ...current.slice(0, 9), - ]); - - if (data.command === "ping") { - window.parent.postMessage( - { type: "preview-response", status: "pong" }, - "*", - ); - } - - if (data.command === "status") { - window.parent.postMessage( - { - type: "preview-response", - status: "ready", - client: cliente?.client_id ?? "desconocido", - }, - "*", - ); - } - - if (data.command === "set-color" && data.payload?.value) { - document.body.style.backgroundColor = data.payload.value; - window.parent.postMessage( - { - type: "preview-response", - status: "color-cambiado", - color: data.payload.value, - }, - "*", - ); - } - - if (data.command === "set-name" && data.payload?.value) { - const newName = data.payload.value; - setOverrideCliente((current) => { - const base = current ?? queryCliente; - return base ? { ...base, nombre: newName } : current; - }); - window.parent.postMessage( - { - type: "preview-response", - status: "nombre-cambiado", - nombre: newName, - }, - "*", - ); - } - }; - - window.addEventListener("message", handleParentMessage); - return () => window.removeEventListener("message", handleParentMessage); - }, [cliente, queryCliente]); - - const enviarMensaje = () => { - if (!cliente) return; - window.parent.postMessage( - { - type: "saas-session-active", - nombreCliente: cliente.nombre, - }, - "*", - ); - }; - - return ( - <> - {isLoading ? ( -
Cargando cliente...
- ) : displayError ? ( -
{displayError}
- ) : cliente ? ( - <> - - - - ) : ( -
-

Ruta de cliente

-
- No se encontró información del cliente. -
-
- )} - - {showRouteList && ( - <> - -

- También puedes ver esta lista desde{" "} - la página de rutas. -

- - )} - - ); -} +import { useEffect, useState } from "react"; +import { Link } from "react-router-dom"; +import { startSession } from "../../api/client"; +import { useClientConfig } from "../../hooks/useClientConfig"; +import { + DEFAULT_SETTINGS, + loadSettings, + type AppSettings, +} from "../../utils/settings"; +import type { ClientData, RouteItem } from "../../types"; +import ClientPanel from "./ClientPanel"; +import BridgePanel from "./BridgePanel"; +import RouteList from "../routes/RouteList"; + +const AVAILABLE_ROUTES: RouteItem[] = [ + { label: "Home", path: "/" }, + { label: "Panel admin", path: "/admin" }, + { label: "Vista previa iframe", path: "/preview" }, + { label: "Generar token", path: "/api/token" }, + { label: "Obtener clientes", path: "/api/keys" }, + { label: "Generar API key", path: "/api/generate-key" }, + { label: "Sesiones activas", path: "/api/active-sessions" }, + { label: "Obtener config", path: "/config?token=..." }, +]; + +export default function Viewer() { + const [overrideCliente, setOverrideCliente] = useState( + null, + ); + const [bridgeMessages, setBridgeMessages] = useState([]); + const [settings, setSettings] = useState(DEFAULT_SETTINGS); + + const params = new URLSearchParams(window.location.search); + const token = params.get("token") ?? ""; + const clientKey = params.get("key") ?? ""; + const isDev = import.meta.env.DEV; + + useEffect(() => { + setSettings(loadSettings()); + }, []); + + const { data, error, isLoading } = useClientConfig( + token, + clientKey, + settings, + ); + + const queryCliente = data?.cliente ?? null; + const cliente = overrideCliente ?? queryCliente; + const showRouteList = settings.showRouteList && !token && !isDev; + + useEffect(() => { + if (!data) return; + + window.parent.postMessage( + { type: "app-loaded", clientId: data.cliente.client_id }, + "*", + ); + startSession(data.query, settings.customApiBase).catch(() => { + // Silenciar errores de sesión de inicio para no interrumpir la vista. + }); + }, [data, settings.customApiBase]); + + const displayError = + !isDev && !token && !clientKey + ? "No se encontró el token o key en la URL." + : error instanceof Error + ? error.message + : typeof error === "string" + ? error + : null; + + useEffect(() => { + const handleParentMessage = (event: MessageEvent) => { + if (!event.data || typeof event.data !== "object") return; + const data = event.data as { + type?: string; + command?: string; + payload?: { value?: string }; + }; + if (data.type !== "preview-command" || !data.command) return; + + setBridgeMessages((current) => [ + `Recibido comando: ${data.command}${data.payload?.value ? ` (${data.payload.value})` : ""}`, + ...current.slice(0, 9), + ]); + + if (data.command === "ping") { + window.parent.postMessage( + { type: "preview-response", status: "pong" }, + "*", + ); + } + + if (data.command === "status") { + window.parent.postMessage( + { + type: "preview-response", + status: "ready", + client: cliente?.client_id ?? "desconocido", + }, + "*", + ); + } + + if (data.command === "set-color" && data.payload?.value) { + document.body.style.backgroundColor = data.payload.value; + window.parent.postMessage( + { + type: "preview-response", + status: "color-cambiado", + color: data.payload.value, + }, + "*", + ); + } + + if (data.command === "set-name" && data.payload?.value) { + const newName = data.payload.value; + setOverrideCliente((current) => { + const base = current ?? queryCliente; + return base ? { ...base, nombre: newName } : current; + }); + window.parent.postMessage( + { + type: "preview-response", + status: "nombre-cambiado", + nombre: newName, + }, + "*", + ); + } + }; + + window.addEventListener("message", handleParentMessage); + return () => window.removeEventListener("message", handleParentMessage); + }, [cliente, queryCliente]); + + const enviarMensaje = () => { + if (!cliente) return; + window.parent.postMessage( + { + type: "saas-session-active", + nombreCliente: cliente.nombre, + }, + "*", + ); + }; + + return ( + <> + {isLoading ? ( +
Cargando cliente...
+ ) : displayError ? ( +
{displayError}
+ ) : cliente ? ( + <> + + + + ) : ( +
+

Ruta de cliente

+
+ No se encontró información del cliente. +
+
+ )} + + {showRouteList && ( + <> + +

+ También puedes ver esta lista desde{" "} + la página de rutas. +

+ + )} + + ); +} diff --git a/frontend/src/hooks/useApplyTexture.ts b/frontend/src/hooks/useApplyTexture.ts index d74c3f0d7db437ebcf67990923c54e7868026a5a..c2b5f3813bffe2655a3db0844c7dd21abe044749 100644 --- a/frontend/src/hooks/useApplyTexture.ts +++ b/frontend/src/hooks/useApplyTexture.ts @@ -1,197 +1,57 @@ -import { useCallback, useState } from "react"; -import { API_BASE } from "../api/client"; -import { useHistoryStore } from "../store/useAppStore"; - -interface ApplyTextureResult { - output_url: string; - output_filename: string; -} - -export function useApplyTexture() { - const [isApplying, setIsApplying] = useState(false); - const [resultUrl, setResultUrl] = useState(null); - const [error, setError] = useState(null); - - const applyTexture = useCallback( - async ( - filename: string, - maskIndices: number[], - textureName: string, - originalFilename?: string, - ) => { - setIsApplying(true); - setError(null); - try { - const res = await fetch(`${API_BASE}/seg/apply_texture`, { - method: "POST", - headers: { "Content-Type": "application/json" }, - body: JSON.stringify({ - filename, - mask_indices: maskIndices, - texture_name: textureName, - original_filename: originalFilename ?? filename, - direction_mode: "auto", - angle_degrees: 0, - }), - }); - - if (!res.ok) { - const text = await res.text(); - throw new Error(text || `Error ${res.status}`); - } - - const data: ApplyTextureResult = await res.json(); - setResultUrl(`${API_BASE}${data.output_url}`); - return data; - } catch (err) { - const message = - err instanceof Error ? err.message : "Error al aplicar textura"; - setError(message); - throw new Error(message); - } finally { - setIsApplying(false); - } - }, - [], - ); - - const applyTextureAI = useCallback( - async ( - filename: string, - textureName: string, - originalFilename?: string, - ) => { - setIsApplying(true); - setError(null); - try { - const res = await fetch(`${API_BASE}/seg/apply_texture_ai`, { - method: "POST", - headers: { "Content-Type": "application/json" }, - body: JSON.stringify({ - filename, - texture_name: textureName, - original_filename: originalFilename ?? filename, - prompt: "", // El backend generará uno por defecto basado en texture_name - }), - }); - - if (!res.ok) { - const text = await res.text(); - throw new Error(text || `Error ${res.status}`); - } - - const data = await res.json(); - - // Si es asíncrono, necesitamos esperar/poll. - // Pero por ahora asumiremos que devuelve el resultado o un job_id. - if (data.job_id) { - // Poll the job status until it's done or failed, then return result - const jobId = data.job_id as string; - const poll = async () => { - const start = Date.now(); - const timeoutMs = 3 * 60 * 1000; // 3 minutes max - while (Date.now() - start < timeoutMs) { - const res = await fetch(`${API_BASE}/seg/jobs/${jobId}`); - if (!res.ok) throw new Error(`Job status error ${res.status}`); - const job = await res.json(); - if (job.status === "done") return job.result; - if (job.status === "failed") - throw new Error(job.message || "AI job failed"); - await new Promise((r) => setTimeout(r, 2000)); - } - throw new Error("Timed out waiting for AI job"); - }; - - const result = await poll(); - if (result?.url) { - setResultUrl(`${API_BASE}${result.url}`); - } - return result; - } - - setResultUrl(`${API_BASE}${data.url}`); - return data; - } catch (err) { - const message = - err instanceof Error - ? err.message - : "Error al aplicar textura con IA"; - setError(message); - throw new Error(message); - } finally { - setIsApplying(false); - } - }, - [], - ); - - const applyTextureOpenAI = useCallback( - async ( - fileOrFilename: File | string, - textureName: string, - apiKey?: string | null, - ) => { - if (isApplying) throw new Error("Ya hay una operación en curso"); - setIsApplying(true); - setError(null); - try { - const form = new FormData(); - // Accept either a File object (client-side upload) or a server filename (string) - if (typeof fileOrFilename === "string") { - // server-side filename returned by uploadRoomImage, e.g. "/uploads/abcd.png" or full URL - const name = fileOrFilename.includes("/uploads/") - ? fileOrFilename.split("/uploads/").pop() || fileOrFilename - : fileOrFilename; - form.append("source_filename", name); - } else { - form.append("file", fileOrFilename); - } - form.append("texture", textureName); - const userId = - useHistoryStore.getState?.()?.userId ?? - useHistoryStore((s) => s.userId); - if (userId) form.append("user_id", userId); - if (apiKey) form.append("api_key", apiKey); - - const res = await fetch(`${API_BASE}/api/generate-image`, { - method: "POST", - body: form, - }); - - if (!res.ok) { - const text = await res.text(); - throw new Error(text || `Error ${res.status}`); - } - - const data = await res.json(); - if (!data.result_b64) throw new Error("No result returned from server"); - const dataUrl = `data:image/png;base64,${data.result_b64}`; - setResultUrl(dataUrl); - return { url: dataUrl, message: data.message }; - } catch (err) { - const message = - err instanceof Error ? err.message : "Error al generar imagen con IA"; - setError(message); - throw new Error(message); - } finally { - setIsApplying(false); - } - }, - [], - ); - - const resetResult = useCallback(() => { - setResultUrl(null); - setError(null); - }, []); - - return { - applyTexture, - applyTextureAI, - applyTextureOpenAI, - isApplying, - resultUrl, - error, - resetResult, - }; -} +import { useCallback, useState } from "react"; +import { API_BASE } from "../api/client"; + +interface ApplyTextureResult { + output_url: string; + output_filename: string; +} + +export function useApplyTexture() { + const [isApplying, setIsApplying] = useState(false); + const [resultUrl, setResultUrl] = useState(null); + const [error, setError] = useState(null); + + const applyTexture = useCallback( + async (filename: string, maskIndices: number[], textureName: string, originalFilename?: string) => { + setIsApplying(true); + setError(null); + try { + const res = await fetch(`${API_BASE}/seg/apply_texture`, { + method: "POST", + headers: { "Content-Type": "application/json" }, + body: JSON.stringify({ + filename, + mask_indices: maskIndices, + texture_name: textureName, + original_filename: originalFilename ?? filename, + direction_mode: "auto", + angle_degrees: 0, + }), + }); + + if (!res.ok) { + const text = await res.text(); + throw new Error(text || `Error ${res.status}`); + } + + const data: ApplyTextureResult = await res.json(); + setResultUrl(`${API_BASE}${data.output_url}`); + return data; + } catch (err) { + const message = err instanceof Error ? err.message : "Error al aplicar textura"; + setError(message); + throw new Error(message); + } finally { + setIsApplying(false); + } + }, + [], + ); + + const resetResult = useCallback(() => { + setResultUrl(null); + setError(null); + }, []); + + return { applyTexture, isApplying, resultUrl, error, resetResult }; +} diff --git a/frontend/src/hooks/useClientConfig.ts b/frontend/src/hooks/useClientConfig.ts index c366c18e840d9f6f426c4487b3165b15a6acfff0..ceec08d3d6ad29c91263178a2d921a9425ad7b13 100644 --- a/frontend/src/hooks/useClientConfig.ts +++ b/frontend/src/hooks/useClientConfig.ts @@ -1,28 +1,28 @@ -import { useQuery } from "@tanstack/react-query"; -import { fetchClientConfig } from "../api/client"; -import type { AppSettings } from "../utils/settings"; - -export function useClientConfig( - token: string, - clientKey: string, - settings: AppSettings, -) { - return useQuery({ - queryKey: [ - "client-config", - token, - clientKey, - settings.customApiBase, - settings.autoDevToken, - ], - queryFn: () => - fetchClientConfig( - token, - clientKey, - settings.customApiBase, - settings.autoDevToken, - ), - enabled: import.meta.env.DEV || Boolean(token || clientKey), - retry: false, - }); -} +import { useQuery } from "@tanstack/react-query"; +import { fetchClientConfig } from "../api/client"; +import type { AppSettings } from "../utils/settings"; + +export function useClientConfig( + token: string, + clientKey: string, + settings: AppSettings, +) { + return useQuery({ + queryKey: [ + "client-config", + token, + clientKey, + settings.customApiBase, + settings.autoDevToken, + ], + queryFn: () => + fetchClientConfig( + token, + clientKey, + settings.customApiBase, + settings.autoDevToken, + ), + enabled: import.meta.env.DEV || Boolean(token || clientKey), + retry: false, + }); +} diff --git a/frontend/src/hooks/useSegmentUpload.ts b/frontend/src/hooks/useSegmentUpload.ts index ffa4cc49cdd2b5c67eab36aaca2d818b2a984ac4..1077bb3941d83d287c2ddd6fc085d5e8be49bdce 100644 --- a/frontend/src/hooks/useSegmentUpload.ts +++ b/frontend/src/hooks/useSegmentUpload.ts @@ -1,81 +1,81 @@ -import { useCallback, useState } from "react"; -import { API_BASE } from "../api/client"; - -interface JobStatus { - status: "processing" | "done" | "failed" | "timeout"; - progress?: number; - stage?: string; - eta_seconds?: number; - filename?: string; - mask_count?: number; - message?: string; -} - -async function pollJob( - jobId: string, - onProgress: (progress: number, message: string) => void, - intervalMs = 2000, -): Promise<{ filename: string; mask_count: number }> { - while (true) { - const res = await fetch(`${API_BASE}/seg/jobs/${jobId}`); - if (!res.ok) throw new Error(`Error al consultar el job: ${res.status}`); - const job: JobStatus = await res.json(); - - if (job.status === "done" && job.filename && job.mask_count != null) { - return { filename: job.filename, mask_count: job.mask_count }; - } - if (job.status === "failed" || job.status === "timeout") { - throw new Error(job.message ?? "La segmentación falló"); - } - - onProgress(job.progress ?? 0, job.message ?? "Procesando..."); - await new Promise((r) => setTimeout(r, intervalMs)); - } -} - -export function useSegmentUpload() { - const [isUploading, setIsUploading] = useState(false); - const [error, setError] = useState(null); - - const uploadAndSegment = useCallback( - async ( - file: File, - onProgress: (progress: number, message: string) => void, - ): Promise<{ filename: string; maskCount: number }> => { - setIsUploading(true); - setError(null); - - try { - const form = new FormData(); - form.append("file", file); - - onProgress(2, "Subiendo imagen..."); - const res = await fetch(`${API_BASE}/seg/upload_async`, { - method: "POST", - body: form, - }); - - if (!res.ok) { - const text = await res.text(); - throw new Error(text || `Error al subir imagen: ${res.status}`); - } - - const { job_id } = await res.json(); - onProgress(10, "Imagen recibida. Iniciando segmentación..."); - - const result = await pollJob(job_id, onProgress); - return { filename: result.filename, maskCount: result.mask_count }; - } catch (err) { - const message = - err instanceof Error ? err.message : "Error en la segmentación"; - setError(message); - throw new Error(message); - } finally { - setIsUploading(false); - } - }, - [], - ); - - return { uploadAndSegment, isUploading, error }; -} +import { useCallback, useState } from "react"; +import { API_BASE } from "../api/client"; + +interface JobStatus { + status: "processing" | "done" | "failed" | "timeout"; + progress?: number; + stage?: string; + eta_seconds?: number; + filename?: string; + mask_count?: number; + message?: string; +} + +async function pollJob( + jobId: string, + onProgress: (progress: number, message: string) => void, + intervalMs = 2000, +): Promise<{ filename: string; mask_count: number }> { + while (true) { + const res = await fetch(`${API_BASE}/seg/jobs/${jobId}`); + if (!res.ok) throw new Error(`Error al consultar el job: ${res.status}`); + const job: JobStatus = await res.json(); + + if (job.status === "done" && job.filename && job.mask_count != null) { + return { filename: job.filename, mask_count: job.mask_count }; + } + if (job.status === "failed" || job.status === "timeout") { + throw new Error(job.message ?? "La segmentación falló"); + } + + onProgress(job.progress ?? 0, job.message ?? "Procesando..."); + await new Promise((r) => setTimeout(r, intervalMs)); + } +} + +export function useSegmentUpload() { + const [isUploading, setIsUploading] = useState(false); + const [error, setError] = useState(null); + + const uploadAndSegment = useCallback( + async ( + file: File, + onProgress: (progress: number, message: string) => void, + ): Promise<{ filename: string; maskCount: number }> => { + setIsUploading(true); + setError(null); + + try { + const form = new FormData(); + form.append("file", file); + + onProgress(2, "Subiendo imagen..."); + const res = await fetch(`${API_BASE}/seg/upload_async`, { + method: "POST", + body: form, + }); + + if (!res.ok) { + const text = await res.text(); + throw new Error(text || `Error al subir imagen: ${res.status}`); + } + + const { job_id } = await res.json(); + onProgress(10, "Imagen recibida. Iniciando segmentación..."); + + const result = await pollJob(job_id, onProgress); + return { filename: result.filename, maskCount: result.mask_count }; + } catch (err) { + const message = + err instanceof Error ? err.message : "Error en la segmentación"; + setError(message); + throw new Error(message); + } finally { + setIsUploading(false); + } + }, + [], + ); + + return { uploadAndSegment, isUploading, error }; +} diff --git a/frontend/src/hooks/useUploadImage.ts b/frontend/src/hooks/useUploadImage.ts index 90da3aec1a6871c02a6d9af0f78afb7518e139e7..b85b199c084e293c5f0620dccb40865f3ecb1428 100644 --- a/frontend/src/hooks/useUploadImage.ts +++ b/frontend/src/hooks/useUploadImage.ts @@ -1,33 +1,33 @@ -import { useCallback, useState } from "react"; -import { uploadRoomImage } from "../api/client"; - -export default function useUploadImage() { - const [isUploading, setIsUploading] = useState(false); - const [uploadError, setUploadError] = useState(null); - - const uploadImage = useCallback( - async (file: File, customApiBase?: string) => { - setIsUploading(true); - setUploadError(null); - - try { - return await uploadRoomImage(file, customApiBase); - } catch (error) { - const message = - error instanceof Error ? error.message : "Error subiendo la imagen"; - setUploadError(message); - throw new Error(message); - } finally { - setIsUploading(false); - } - }, - [], - ); - - return { - uploadImage, - isUploading, - uploadError, - setUploadError, - }; -} +import { useCallback, useState } from "react"; +import { uploadRoomImage } from "../api/client"; + +export default function useUploadImage() { + const [isUploading, setIsUploading] = useState(false); + const [uploadError, setUploadError] = useState(null); + + const uploadImage = useCallback( + async (file: File, customApiBase?: string) => { + setIsUploading(true); + setUploadError(null); + + try { + return await uploadRoomImage(file, customApiBase); + } catch (error) { + const message = + error instanceof Error ? error.message : "Error subiendo la imagen"; + setUploadError(message); + throw new Error(message); + } finally { + setIsUploading(false); + } + }, + [], + ); + + return { + uploadImage, + isUploading, + uploadError, + setUploadError, + }; +} diff --git a/frontend/src/index.css b/frontend/src/index.css index 4e0c267b2a173298120513ec41fa426cabf4e05c..a2dbf5649ef99f5c84c0eb47506fb764f9f21922 100644 --- a/frontend/src/index.css +++ b/frontend/src/index.css @@ -1,84 +1,84 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; - -:root { - --brand-blue: #0047ab; - --brand-black: #333333; - --brand-gray: #707070; - --brand-surface: #ffffff; - --brand-light: #f4f8ff; - --brand-border: #dbe7ff; - --brand-contrast: #25d366; - - font-family: - Inter, - ui-sans-serif, - system-ui, - -apple-system, - BlinkMacSystemFont, - "Segoe UI", - sans-serif; - font-size: 16px; - color: var(--brand-black); - background: var(--brand-light); -} - -*, -*::before, -*::after { - box-sizing: border-box; -} - -html { - height: 100%; - /* Prevents elastic overscroll bounce on iOS PWA */ - overscroll-behavior: none; -} - -body { - margin: 0; - height: 100%; - /* dvh = dynamic viewport height: adjusts when mobile browser chrome appears/disappears */ - min-height: 100dvh; - background: #f8fafc; - color: #111827; - overscroll-behavior: none; -} - -#root { - height: 100%; - min-height: 100dvh; - display: flex; - flex-direction: column; -} - -button, -input, -select, -textarea { - font: inherit; -} - -a { - color: inherit; - text-decoration: none; -} - -img { - max-width: 100%; - display: block; -} - -h1, -h2, -h3, -p { - margin: 0; -} - -ul { - margin: 0; - padding: 0; - list-style: none; -} +@tailwind base; +@tailwind components; +@tailwind utilities; + +:root { + --brand-blue: #0047ab; + --brand-black: #333333; + --brand-gray: #707070; + --brand-surface: #ffffff; + --brand-light: #f4f8ff; + --brand-border: #dbe7ff; + --brand-contrast: #25d366; + + font-family: + Inter, + ui-sans-serif, + system-ui, + -apple-system, + BlinkMacSystemFont, + "Segoe UI", + sans-serif; + font-size: 16px; + color: var(--brand-black); + background: var(--brand-light); +} + +*, +*::before, +*::after { + box-sizing: border-box; +} + +html { + height: 100%; + /* Prevents elastic overscroll bounce on iOS PWA */ + overscroll-behavior: none; +} + +body { + margin: 0; + height: 100%; + /* dvh = dynamic viewport height: adjusts when mobile browser chrome appears/disappears */ + min-height: 100dvh; + background: #f8fafc; + color: #111827; + overscroll-behavior: none; +} + +#root { + height: 100%; + min-height: 100dvh; + display: flex; + flex-direction: column; +} + +button, +input, +select, +textarea { + font: inherit; +} + +a { + color: inherit; + text-decoration: none; +} + +img { + max-width: 100%; + display: block; +} + +h1, +h2, +h3, +p { + margin: 0; +} + +ul { + margin: 0; + padding: 0; + list-style: none; +} diff --git a/frontend/src/main.tsx b/frontend/src/main.tsx index 32a20a6ed9360f0f44eabb085d5c77c70dedfa66..c9c2724fe9498588c58e9faa7627a77c6eef6fdd 100644 --- a/frontend/src/main.tsx +++ b/frontend/src/main.tsx @@ -1,20 +1,20 @@ -import { StrictMode } from "react"; -import { createRoot } from "react-dom/client"; -import { BrowserRouter } from "react-router-dom"; -import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; -import { ReactQueryDevtools } from "@tanstack/react-query-devtools"; -import "./index.css"; -import App from "./App.tsx"; - -const queryClient = new QueryClient(); - -createRoot(document.getElementById("root")!).render( - - - - - {import.meta.env.DEV && } - - - , -); +import { StrictMode } from "react"; +import { createRoot } from "react-dom/client"; +import { BrowserRouter } from "react-router-dom"; +import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; +import { ReactQueryDevtools } from "@tanstack/react-query-devtools"; +import "./index.css"; +import App from "./App.tsx"; + +const queryClient = new QueryClient(); + +createRoot(document.getElementById("root")!).render( + + + + + {import.meta.env.DEV && } + + + , +); diff --git a/frontend/src/store/useAppStore.ts b/frontend/src/store/useAppStore.ts index 1c8fd27395ee7011c28a5972c0d3fd68aeac0b76..406374bd20dfc66f7bd3285d53cf5b6043bd75cc 100644 --- a/frontend/src/store/useAppStore.ts +++ b/frontend/src/store/useAppStore.ts @@ -15,10 +15,9 @@ function getOrCreateUserId(): string { const key = "hr-user-id"; let id = localStorage.getItem(key); if (!id) { - id = - typeof crypto !== "undefined" && crypto.randomUUID - ? crypto.randomUUID() - : `u-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`; + id = typeof crypto !== "undefined" && crypto.randomUUID + ? crypto.randomUUID() + : `u-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`; localStorage.setItem(key, id); } return id; @@ -50,9 +49,7 @@ export const useHistoryStore = create()( setSessionHistory: (items) => set({ sessionHistory: items }), removeFromHistory: (filename) => set((state) => ({ - sessionHistory: state.sessionHistory.filter( - (h) => h.filename !== filename, - ), + sessionHistory: state.sessionHistory.filter((h) => h.filename !== filename), })), }), { @@ -66,7 +63,6 @@ export const useHistoryStore = create()( type AppStore = { previewImage: string | null; uploadMessage: string | null; - uploadedFile: File | null; openProductId: string | number | null; viewMode: ViewMode; segmentFilename: string | null; @@ -75,7 +71,6 @@ type AppStore = { accumulatedFilename: string | null; setPreviewImage: (previewImage: string | null) => void; setUploadMessage: (uploadMessage: string | null) => void; - setUploadedFile: (f: File | null) => void; setOpenProductId: (openProductId: string | number | null) => void; setViewMode: (viewMode: ViewMode) => void; setSegmentResult: (filename: string, maskCount: number) => void; @@ -89,7 +84,6 @@ const useAppStore = create()( (set) => ({ previewImage: null, uploadMessage: null, - uploadedFile: null, openProductId: null, viewMode: "list", segmentFilename: null, @@ -98,19 +92,16 @@ const useAppStore = create()( accumulatedFilename: null, setPreviewImage: (previewImage) => set({ previewImage }), setUploadMessage: (uploadMessage) => set({ uploadMessage }), - setUploadedFile: (uploadedFile) => set({ uploadedFile }), setOpenProductId: (openProductId) => set({ openProductId }), setViewMode: (viewMode) => set({ viewMode }), setSegmentResult: (segmentFilename, maskCount) => set({ segmentFilename, maskCount }), setSegmentProgress: (segmentProgress) => set({ segmentProgress }), - setAccumulatedFilename: (accumulatedFilename) => - set({ accumulatedFilename }), + setAccumulatedFilename: (accumulatedFilename) => set({ accumulatedFilename }), reset: () => set({ previewImage: null, uploadMessage: null, - uploadedFile: null, openProductId: null, viewMode: "list", segmentFilename: null, diff --git a/frontend/src/types.ts b/frontend/src/types.ts index f9dc218a6c6a4469f90cb8da79ddcdc8e575f4a2..6176e3cff964dc9f0f73f7009bb027f83f3d16d4 100644 --- a/frontend/src/types.ts +++ b/frontend/src/types.ts @@ -1,24 +1,24 @@ -export interface ClientData { - client_id: string; - nombre: string; - color_primario: string; - created_at?: string; -} - -export interface RouteItem { - label: string; - path: string; -} - -export interface Product { - id: number | string; - brand: string; - name: string; - ref: string; - size: string; - image: string; - description?: string[]; - detailUrl?: string; - tipo?: "suelos" | "paredes"; - categoria?: string; -} +export interface ClientData { + client_id: string; + nombre: string; + color_primario: string; + created_at?: string; +} + +export interface RouteItem { + label: string; + path: string; +} + +export interface Product { + id: number | string; + brand: string; + name: string; + ref: string; + size: string; + image: string; + description?: string[]; + detailUrl?: string; + tipo?: "suelos" | "paredes"; + categoria?: string; +} diff --git a/frontend/src/utils/settings.ts b/frontend/src/utils/settings.ts index c6264eb142a8dbe0e70e481b8b30892a2ca740d8..4b54cf32490485fdd13b8f2076d221849c956662 100644 --- a/frontend/src/utils/settings.ts +++ b/frontend/src/utils/settings.ts @@ -1,33 +1,33 @@ -export interface AppSettings { - showRouteList: boolean; - customApiBase: string; - autoDevToken: boolean; -} - -export const DEFAULT_SETTINGS: AppSettings = { - showRouteList: true, - customApiBase: "", - autoDevToken: true, -}; - -const STORAGE_KEY = "saas-app-settings"; - -export function loadSettings(): AppSettings { - if (typeof window === "undefined") return DEFAULT_SETTINGS; - try { - const raw = window.localStorage.getItem(STORAGE_KEY); - if (!raw) return DEFAULT_SETTINGS; - const parsed = JSON.parse(raw) as Partial; - return { - ...DEFAULT_SETTINGS, - ...parsed, - }; - } catch { - return DEFAULT_SETTINGS; - } -} - -export function saveSettings(settings: AppSettings) { - if (typeof window === "undefined") return; - window.localStorage.setItem(STORAGE_KEY, JSON.stringify(settings)); -} +export interface AppSettings { + showRouteList: boolean; + customApiBase: string; + autoDevToken: boolean; +} + +export const DEFAULT_SETTINGS: AppSettings = { + showRouteList: true, + customApiBase: "", + autoDevToken: true, +}; + +const STORAGE_KEY = "saas-app-settings"; + +export function loadSettings(): AppSettings { + if (typeof window === "undefined") return DEFAULT_SETTINGS; + try { + const raw = window.localStorage.getItem(STORAGE_KEY); + if (!raw) return DEFAULT_SETTINGS; + const parsed = JSON.parse(raw) as Partial; + return { + ...DEFAULT_SETTINGS, + ...parsed, + }; + } catch { + return DEFAULT_SETTINGS; + } +} + +export function saveSettings(settings: AppSettings) { + if (typeof window === "undefined") return; + window.localStorage.setItem(STORAGE_KEY, JSON.stringify(settings)); +} diff --git a/frontend/src/version.ts b/frontend/src/version.ts index b38cdb3c03f4a7577a3e6b69f154a413773de52c..6952112085768231747eae6c5a99c7cbbfc8b84f 100644 --- a/frontend/src/version.ts +++ b/frontend/src/version.ts @@ -1 +1 @@ -export const appVersion = "0.1.0-dev.20260512T032221"; +export const appVersion = "0.1.0-dev.20260507T183851"; diff --git a/frontend/tailwind.config.js b/frontend/tailwind.config.js index dd569bd22d3b37604289da90d901b179a93e8de3..3a400ba050139dd15b3c45e803138d37aa63bcd8 100644 --- a/frontend/tailwind.config.js +++ b/frontend/tailwind.config.js @@ -1,7 +1,7 @@ -export default { - content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"], - theme: { - extend: {}, - }, - plugins: [], -}; +export default { + content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"], + theme: { + extend: {}, + }, + plugins: [], +}; diff --git a/frontend/tempRoomSetup.tsx b/frontend/tempRoomSetup.tsx index 2584ae88e7c441bd48c69e45e16cc4c55591ea04..2784051afedb2c02e11a4c5f92df349d00b44e24 100644 --- a/frontend/tempRoomSetup.tsx +++ b/frontend/tempRoomSetup.tsx @@ -1,284 +1,284 @@ -import React, { useState, useRef } from "react"; -import { - X, - Camera, - Package, - Camera as CameraIcon, - Smartphone, - MousePointer2, - Check, - Play, - UploadCloud, -} from "lucide-react"; - -// --- DATOS DE PRUEBA --- -const categorias = [ - { id: "todos", label: "Todos", count: 32 }, - { id: "bano", label: "Baño", count: 5 }, - { id: "cocina", label: "Cocina", count: 10 }, - { id: "comedor", label: "Comedor", count: 5 }, - { id: "dormitorio", label: "Dormitorio", count: 4 }, - { id: "espacio_abierto", label: "Espacio abierto", count: 3 }, - { id: "sala", label: "Sala de estar", count: 9 }, - { id: "terraza", label: "Terraza", count: 6 }, -]; - -const habitaciones = [ - { - id: 1, - title: "Dining Room - Glossy", - category: "comedor", - img: "https://images.unsplash.com/photo-1617806118233-18e1c0945594?auto=format&fit=crop&w=600&q=80", - }, - { - id: 2, - title: "Dining Area", - category: "comedor", - img: "https://images.unsplash.com/photo-1604578762246-41134e37f9cc?auto=format&fit=crop&w=600&q=80", - }, - { - id: 3, - title: "Dining room", - category: "comedor", - img: "https://images.unsplash.com/photo-1593696140826-c58b021acf8b?auto=format&fit=crop&w=600&q=80", - }, - { - id: 4, - title: "Sala de estar", - category: "sala", - img: "https://images.unsplash.com/photo-1583847268964-b28ce8f30f15?auto=format&fit=crop&w=600&q=80", - }, - { - id: 5, - title: "Modern Kitchen", - category: "cocina", - img: "https://images.unsplash.com/photo-1556910103-1c02745a8720?auto=format&fit=crop&w=600&q=80", - }, - { - id: 6, - title: "Minimalist Bath", - category: "bano", - img: "https://images.unsplash.com/photo-1600566752355-35792bedcfea?auto=format&fit=crop&w=600&q=80", - }, - { - id: 7, - title: "Cozy Bedroom", - category: "dormitorio", - img: "https://images.unsplash.com/photo-1616594039964-ae9021a400a0?auto=format&fit=crop&w=600&q=80", - }, - { - id: 8, - title: "Open Concept", - category: "espacio_abierto", - img: "https://images.unsplash.com/photo-1600607686527-6fb886090705?auto=format&fit=crop&w=600&q=80", - }, -]; - -export default function App() { - const [categoriaActiva, setCategoriaActiva] = useState("todos"); - const [isDragging, setIsDragging] = useState(false); - const [previewImage, setPreviewImage] = useState(null); - const fileInputRef = useRef(null); - - // Filtrar habitaciones - const habitacionesFiltradas = - categoriaActiva === "todos" - ? habitaciones - : habitaciones.filter((h) => h.category === categoriaActiva); - - // Manejadores para Drag & Drop - const handleDragOver = (e: React.DragEvent) => { - e.preventDefault(); - setIsDragging(true); - }; - - const handleDragLeave = (e: React.DragEvent) => { - e.preventDefault(); - setIsDragging(false); - }; - - const handleDrop = (e: React.DragEvent) => { - e.preventDefault(); - setIsDragging(false); - const file = e.dataTransfer.files[0]; - handleFileSelection(file); - }; - - const handleFileChange = (e: React.ChangeEvent) => { - const file = e.target.files?.[0]; - if (file) handleFileSelection(file); - }; - - const handleFileSelection = (file: File) => { - if (file && file.type.startsWith("image/")) { - const reader = new FileReader(); - reader.onload = (event) => { - setPreviewImage(event.target?.result as string); - }; - reader.readAsDataURL(file); - } - }; - - const triggerFileInput = () => { - fileInputRef.current?.click(); - }; - - return ( -
- {/* Contenedor Principal */} -
- {/* Cabecera / Botón de cerrar */} -
- -
- - {/* SECCIÓN SUPERIOR: Sube tu foto */} -
- {/* Columna Izquierda: Textos y Botones */} -
-

- Ver los productos en su cuarto -

- -
    -
  • - - Sube una foto de tu habitación -
  • -
  • - - Prueba nuestros productos -
  • -
- -
- - - -
-
- - {/* Columna Derecha: Dropzone de Imagen */} -
- {previewImage ? ( -
- Vista previa -
- -
-
- ) : ( - <> - -
-
- -
-

- {isDragging - ? "Suelta la imagen aquí" - : "Arrastra tu foto aquí"} -

-

- o haz clic para explorar en tu dispositivo -

-

- Formatos soportados: JPG, PNG -

-
- - )} -
-
- - {/* SECCIÓN INFERIOR: Habitaciones de demostración */} -
-

- ¿No tienes una foto? Prueba nuestras habitaciones de demostración -

- - {/* Filtros */} -
- {categorias.map((cat) => ( - - ))} -
- - {/* Cuadrícula de Imágenes */} -
- {habitacionesFiltradas.map((hab) => ( -
-
- {hab.title} -
-
-

- {hab.title} -

-
- ))} -
-
-
-
- ); -} +import React, { useState, useRef } from "react"; +import { + X, + Camera, + Package, + Camera as CameraIcon, + Smartphone, + MousePointer2, + Check, + Play, + UploadCloud, +} from "lucide-react"; + +// --- DATOS DE PRUEBA --- +const categorias = [ + { id: "todos", label: "Todos", count: 32 }, + { id: "bano", label: "Baño", count: 5 }, + { id: "cocina", label: "Cocina", count: 10 }, + { id: "comedor", label: "Comedor", count: 5 }, + { id: "dormitorio", label: "Dormitorio", count: 4 }, + { id: "espacio_abierto", label: "Espacio abierto", count: 3 }, + { id: "sala", label: "Sala de estar", count: 9 }, + { id: "terraza", label: "Terraza", count: 6 }, +]; + +const habitaciones = [ + { + id: 1, + title: "Dining Room - Glossy", + category: "comedor", + img: "https://images.unsplash.com/photo-1617806118233-18e1c0945594?auto=format&fit=crop&w=600&q=80", + }, + { + id: 2, + title: "Dining Area", + category: "comedor", + img: "https://images.unsplash.com/photo-1604578762246-41134e37f9cc?auto=format&fit=crop&w=600&q=80", + }, + { + id: 3, + title: "Dining room", + category: "comedor", + img: "https://images.unsplash.com/photo-1593696140826-c58b021acf8b?auto=format&fit=crop&w=600&q=80", + }, + { + id: 4, + title: "Sala de estar", + category: "sala", + img: "https://images.unsplash.com/photo-1583847268964-b28ce8f30f15?auto=format&fit=crop&w=600&q=80", + }, + { + id: 5, + title: "Modern Kitchen", + category: "cocina", + img: "https://images.unsplash.com/photo-1556910103-1c02745a8720?auto=format&fit=crop&w=600&q=80", + }, + { + id: 6, + title: "Minimalist Bath", + category: "bano", + img: "https://images.unsplash.com/photo-1600566752355-35792bedcfea?auto=format&fit=crop&w=600&q=80", + }, + { + id: 7, + title: "Cozy Bedroom", + category: "dormitorio", + img: "https://images.unsplash.com/photo-1616594039964-ae9021a400a0?auto=format&fit=crop&w=600&q=80", + }, + { + id: 8, + title: "Open Concept", + category: "espacio_abierto", + img: "https://images.unsplash.com/photo-1600607686527-6fb886090705?auto=format&fit=crop&w=600&q=80", + }, +]; + +export default function App() { + const [categoriaActiva, setCategoriaActiva] = useState("todos"); + const [isDragging, setIsDragging] = useState(false); + const [previewImage, setPreviewImage] = useState(null); + const fileInputRef = useRef(null); + + // Filtrar habitaciones + const habitacionesFiltradas = + categoriaActiva === "todos" + ? habitaciones + : habitaciones.filter((h) => h.category === categoriaActiva); + + // Manejadores para Drag & Drop + const handleDragOver = (e: React.DragEvent) => { + e.preventDefault(); + setIsDragging(true); + }; + + const handleDragLeave = (e: React.DragEvent) => { + e.preventDefault(); + setIsDragging(false); + }; + + const handleDrop = (e: React.DragEvent) => { + e.preventDefault(); + setIsDragging(false); + const file = e.dataTransfer.files[0]; + handleFileSelection(file); + }; + + const handleFileChange = (e: React.ChangeEvent) => { + const file = e.target.files?.[0]; + if (file) handleFileSelection(file); + }; + + const handleFileSelection = (file: File) => { + if (file && file.type.startsWith("image/")) { + const reader = new FileReader(); + reader.onload = (event) => { + setPreviewImage(event.target?.result as string); + }; + reader.readAsDataURL(file); + } + }; + + const triggerFileInput = () => { + fileInputRef.current?.click(); + }; + + return ( +
+ {/* Contenedor Principal */} +
+ {/* Cabecera / Botón de cerrar */} +
+ +
+ + {/* SECCIÓN SUPERIOR: Sube tu foto */} +
+ {/* Columna Izquierda: Textos y Botones */} +
+

+ Ver los productos en su cuarto +

+ +
    +
  • + + Sube una foto de tu habitación +
  • +
  • + + Prueba nuestros productos +
  • +
+ +
+ + + +
+
+ + {/* Columna Derecha: Dropzone de Imagen */} +
+ {previewImage ? ( +
+ Vista previa +
+ +
+
+ ) : ( + <> + +
+
+ +
+

+ {isDragging + ? "Suelta la imagen aquí" + : "Arrastra tu foto aquí"} +

+

+ o haz clic para explorar en tu dispositivo +

+

+ Formatos soportados: JPG, PNG +

+
+ + )} +
+
+ + {/* SECCIÓN INFERIOR: Habitaciones de demostración */} +
+

+ ¿No tienes una foto? Prueba nuestras habitaciones de demostración +

+ + {/* Filtros */} +
+ {categorias.map((cat) => ( + + ))} +
+ + {/* Cuadrícula de Imágenes */} +
+ {habitacionesFiltradas.map((hab) => ( +
+
+ {hab.title} +
+
+

+ {hab.title} +

+
+ ))} +
+
+
+
+ ); +} diff --git a/frontend/tsconfig.app.json b/frontend/tsconfig.app.json index 5d560e388240dbdcea340d1adf54b9dc95f933d4..7f42e5f7cd2e79c7b5a25b753e56b1bcf94e1381 100644 --- a/frontend/tsconfig.app.json +++ b/frontend/tsconfig.app.json @@ -1,25 +1,25 @@ -{ - "compilerOptions": { - "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo", - "target": "es2023", - "lib": ["ES2023", "DOM"], - "module": "esnext", - "types": ["vite/client"], - "skipLibCheck": true, - - /* Bundler mode */ - "moduleResolution": "bundler", - "allowImportingTsExtensions": true, - "verbatimModuleSyntax": true, - "moduleDetection": "force", - "noEmit": true, - "jsx": "react-jsx", - - /* Linting */ - "noUnusedLocals": true, - "noUnusedParameters": true, - "erasableSyntaxOnly": true, - "noFallthroughCasesInSwitch": true - }, - "include": ["src"] -} +{ + "compilerOptions": { + "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo", + "target": "es2023", + "lib": ["ES2023", "DOM"], + "module": "esnext", + "types": ["vite/client"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "verbatimModuleSyntax": true, + "moduleDetection": "force", + "noEmit": true, + "jsx": "react-jsx", + + /* Linting */ + "noUnusedLocals": true, + "noUnusedParameters": true, + "erasableSyntaxOnly": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"] +} diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json index 38e8e3bf874144a573c37817f1e460b9e6dd8ada..1ffef600d959ec9e396d5a260bd3f5b927b2cef8 100644 --- a/frontend/tsconfig.json +++ b/frontend/tsconfig.json @@ -1,7 +1,7 @@ -{ - "files": [], - "references": [ - { "path": "./tsconfig.app.json" }, - { "path": "./tsconfig.node.json" } - ] -} +{ + "files": [], + "references": [ + { "path": "./tsconfig.app.json" }, + { "path": "./tsconfig.node.json" } + ] +} diff --git a/frontend/tsconfig.node.json b/frontend/tsconfig.node.json index 09fe7a71655904cabc441ada690d27b78c496861..d3c52ea64c6cd6bad118474410f5322f48e257a6 100644 --- a/frontend/tsconfig.node.json +++ b/frontend/tsconfig.node.json @@ -1,24 +1,24 @@ -{ - "compilerOptions": { - "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo", - "target": "es2023", - "lib": ["ES2023"], - "module": "esnext", - "types": ["node"], - "skipLibCheck": true, - - /* Bundler mode */ - "moduleResolution": "bundler", - "allowImportingTsExtensions": true, - "verbatimModuleSyntax": true, - "moduleDetection": "force", - "noEmit": true, - - /* Linting */ - "noUnusedLocals": true, - "noUnusedParameters": true, - "erasableSyntaxOnly": true, - "noFallthroughCasesInSwitch": true - }, - "include": ["vite.config.ts"] -} +{ + "compilerOptions": { + "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo", + "target": "es2023", + "lib": ["ES2023"], + "module": "esnext", + "types": ["node"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "verbatimModuleSyntax": true, + "moduleDetection": "force", + "noEmit": true, + + /* Linting */ + "noUnusedLocals": true, + "noUnusedParameters": true, + "erasableSyntaxOnly": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["vite.config.ts"] +} diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index c7f5bb15fbd62f66d2f4d82b1ce034f38d0d8d49..cd3f07eee86edf54d5e0568605591ec7704f9c07 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -1,30 +1,30 @@ -import { defineConfig, loadEnv } from "vite"; -import react from "@vitejs/plugin-react"; -import { readFileSync } from "fs"; -import { dirname, join } from "path"; -import { fileURLToPath } from "url"; - -// https://vite.dev/config/ -export default defineConfig(({ mode }) => { - const env = loadEnv(mode, process.cwd(), ""); - const pkgPath = join(dirname(fileURLToPath(import.meta.url)), "package.json"); - const pkg = JSON.parse(readFileSync(pkgPath, "utf8")); - const appVersion = env.VITE_APP_VERSION || pkg.version || "0.0.0"; - - return { - base: env.VITE_APP_BASE || "/", - define: { - "import.meta.env.VITE_APP_VERSION": JSON.stringify(appVersion), - }, - plugins: [react()], - server: { - proxy: { - "/api": "http://localhost:8000", - "/seg": "http://localhost:8000", - "/uploads": "http://localhost:8000", - "/preview": "http://localhost:8000", - "/widget.js": "http://localhost:8000", - }, - }, - }; -}); +import { defineConfig, loadEnv } from "vite"; +import react from "@vitejs/plugin-react"; +import { readFileSync } from "fs"; +import { dirname, join } from "path"; +import { fileURLToPath } from "url"; + +// https://vite.dev/config/ +export default defineConfig(({ mode }) => { + const env = loadEnv(mode, process.cwd(), ""); + const pkgPath = join(dirname(fileURLToPath(import.meta.url)), "package.json"); + const pkg = JSON.parse(readFileSync(pkgPath, "utf8")); + const appVersion = env.VITE_APP_VERSION || pkg.version || "0.0.0"; + + return { + base: env.VITE_APP_BASE || "/", + define: { + "import.meta.env.VITE_APP_VERSION": JSON.stringify(appVersion), + }, + plugins: [react()], + server: { + proxy: { + "/api": "http://localhost:8000", + "/seg": "http://localhost:8000", + "/uploads": "http://localhost:8000", + "/preview": "http://localhost:8000", + "/widget.js": "http://localhost:8000", + }, + }, + }; +});