상태 JSON 파일의 요청 통계 및 가동 시간을 업데이트하고, API 엔드포인트에 모델 성능 통계 조회 기능을 추가하였습니다. 대시보드에서 모델 처리 시간 통계를 표시하도록 개선하였으며, 로그 파일에 서버 시작 및 종료 관련 메시지를 기록하였습니다.

This commit is contained in:
AGX 2025-08-29 21:54:08 +09:00
parent 6aafc4892d
commit 3271c2427e
10 changed files with 599 additions and 172 deletions

View File

@ -25,10 +25,12 @@ from ..utils.image_utils import (
import base64
import io
from ..monitoring.dashboard import monitoring_data
from .stats import router as stats_router
logger = logging.getLogger(__name__)
router = APIRouter()
router.include_router(stats_router, prefix="/api/v1", tags=["Stats"])
def encode_image_to_format(image, format: ImageFormat = ImageFormat.png, quality: int = 95):

30
app/api/stats.py Normal file
View File

@ -0,0 +1,30 @@
"""
성능 통계 API 엔드포인트
"""
from fastapi import APIRouter, status
from fastapi.responses import JSONResponse
from ..core.stats_manager import stats_manager
router = APIRouter()
@router.get("/stats",
summary="Get Performance Stats",
description="서버 시작 이후의 모델별 처리 시간 통계를 반환합니다.")
async def get_stats():
"""
성능 통계를 반환합니다.
"""
stats = stats_manager.get_stats()
return JSONResponse(content=stats)
@router.post("/stats/reset",
summary="Reset Performance Stats",
description="수집된 모든 성능 통계 데이터를 초기화합니다.")
async def reset_stats():
"""
성능 통계를 초기화합니다.
"""
stats_manager.reset()
return JSONResponse(content={"message": "Performance stats reset successfully"},
status_code=status.HTTP_200_OK)

71
app/core/stats_manager.py Normal file
View File

@ -0,0 +1,71 @@
"""
성능 통계 관리자
모델별 처리 시간 통계를 수집하고 계산합니다.
"""
import time
from threading import Lock
class StatsManager:
def __init__(self):
self.data = {}
self.lock = Lock()
self.model_keys = ['simple_lama', 'migan', 'rembg']
self._initialize_data()
def _initialize_data(self):
"""데이터 구조를 초기화합니다."""
for model in self.model_keys + ['total']:
self.data[model] = {
'count': 0,
'total_time': 0.0,
'min_time': float('inf'),
'max_time': 0.0,
}
def record_time(self, model_name: str, duration: float):
"""처리 시간을 기록합니다."""
with self.lock:
# 개별 모델 통계 업데이트
if model_name in self.data:
stats = self.data[model_name]
stats['count'] += 1
stats['total_time'] += duration
stats['min_time'] = min(stats['min_time'], duration)
stats['max_time'] = max(stats['max_time'], duration)
# 전체 통계 업데이트
total_stats = self.data['total']
total_stats['count'] += 1
total_stats['total_time'] += duration
total_stats['min_time'] = min(total_stats['min_time'], duration)
total_stats['max_time'] = max(total_stats['max_time'], duration)
def get_stats(self) -> dict:
"""현재까지의 통계를 계산하여 반환합니다."""
with self.lock:
stats_summary = {}
for model, stats in self.data.items():
if stats['count'] > 0:
avg_time = stats['total_time'] / stats['count']
min_time = stats['min_time'] if stats['min_time'] != float('inf') else 0
else:
avg_time = 0
min_time = 0
stats_summary[model] = {
'count': stats['count'],
'avg_time': f"{avg_time:.3f}",
'min_time': f"{min_time:.3f}",
'max_time': f"{stats['max_time']:.3f}",
'total_time': f"{stats['total_time']:.3f}",
}
return stats_summary
def reset(self):
"""모든 통계를 초기화합니다."""
with self.lock:
self._initialize_data()
# 전역 통계 관리자 인스턴스
stats_manager = StatsManager()

View File

@ -14,6 +14,7 @@ import numpy as np
from ..utils.gpu_monitor import gpu_monitor
from ..core.config import settings
from ..core.stats_manager import stats_manager
logger = logging.getLogger(__name__)
@ -335,20 +336,22 @@ class WorkerManager:
model_name = kwargs.get('model_name', 'simple-lama')
# 모델명에 따라 세션 타입 결정
if model_name == 'simple-lama':
model_type = ModelType.SIMPLE_LAMA
elif model_name == 'migan':
if model_name == 'migan':
model_type = ModelType.MIGAN
else:
model_type = ModelType.SIMPLE_LAMA # 기본값
# 세션 풀에서 모델 세션 가져와서 처리
async with session_pool.get_session(model_type) as session:
start_time = time.time()
# session.model 에서 실제 모델 객체의 메서드를 호출해야 함
result = await session.model.inpaint(
image=kwargs['image'],
mask=kwargs['mask']
)
duration = time.time() - start_time
stats_manager.record_time(model_name, duration)
logger.info(f"'{model_name}' inpainting processed in {duration:.3f}s")
return result
@ -361,14 +364,20 @@ class WorkerManager:
try:
from ..core.session_pool import session_pool, ModelType
model_name = kwargs.get('model_name', 'birefnet-general-lite') # 기본 모델명 변경
# 세션 풀에서 REMBG 모델 세션 가져와서 처리
async with session_pool.get_session(ModelType.REMBG) as session:
start_time = time.time()
# session.model 에서 실제 모델 객체의 메서드를 호출해야 함
result = await session.model.remove_background(
image=kwargs['image'],
model_name=kwargs.get('model_name', 'u2net')
model_name=model_name
)
duration = time.time() - start_time
stats_manager.record_time('rembg', duration)
logger.info(f"'rembg ({model_name})' processed in {duration:.3f}s")
return result
except Exception as e:

View File

@ -17,6 +17,7 @@ from fastapi.responses import HTMLResponse
import uvicorn
from fastapi import APIRouter, Request
import websockets.exceptions
import requests
from ..core.worker_manager import worker_manager
from ..core.session_pool import session_pool
@ -209,6 +210,20 @@ class MonitoringData:
logger.info("API 통계가 비어있어 기본값 사용")
api_stats = self._get_api_statistics()
# 모델별 성능 통계 직접 조회
model_performance_stats = {}
try:
logger.info("모델 성능 통계 조회 시작")
# 메인 서버의 stats 엔드포인트 호출
response = requests.get(f"http://{settings.HOST}:{settings.PORT}/api/v1/stats", timeout=2)
if response.status_code == 200:
model_performance_stats = response.json()
logger.info("모델 성능 통계 조회 완료")
else:
logger.warning(f"모델 성능 통계 조회 실패: 상태 코드 {response.status_code}")
except requests.RequestException as e:
logger.error(f"모델 성능 통계 조회 중 예외 발생: {e}")
# 알림 및 경고 (안전하게 가져오기)
alerts = []
try:
@ -230,6 +245,7 @@ class MonitoringData:
"sessions": session_status,
"jetson": jetson_info,
"api_stats": api_stats,
"model_performance_stats": model_performance_stats,
"alerts": alerts
}
@ -258,6 +274,7 @@ class MonitoringData:
"sessions": self._get_default_session_status(),
"jetson": {},
"api_stats": self._get_api_statistics(),
"model_performance_stats": {},
"alerts": [],
"error": str(e)
}
@ -926,6 +943,29 @@ HTML_TEMPLATE = """
</div>
</div>
<!-- 모델 처리 시간 통계 -->
<div class="card">
<h3> 모델 처리 시간 통계 ()</h3>
<table id="model-perf-table" style="width: 100%; border-collapse: collapse; margin-top: 15px;">
<thead>
<tr style="text-align: left; background: #f8f9fa;">
<th style="padding: 10px; border-bottom: 2px solid #ddd;">모델</th>
<th style="padding: 10px; border-bottom: 2px solid #ddd;">처리 횟수</th>
<th style="padding: 10px; border-bottom: 2px solid #ddd;">평균 시간</th>
<th style="padding: 10px; border-bottom: 2px solid #ddd;">최소 시간</th>
<th style="padding: 10px; border-bottom: 2px solid #ddd;">최대 시간</th>
<th style="padding: 10px; border-bottom: 2px solid #ddd;"> 시간</th>
</tr>
</thead>
<tbody>
<!-- JS로 채워질 내용 -->
</tbody>
</table>
<div style="margin-top: 10px; text-align: right;">
<button onclick="resetPerformanceStats()" style="padding: 5px 15px; background: #ffc107; color: #212529; border: none; border-radius: 3px; cursor: pointer;">통계 초기화</button>
</div>
</div>
<!-- 차트 -->
<div class="chart-container">
<h3>📈 실시간 성능 차트</h3>
@ -1221,6 +1261,9 @@ HTML_TEMPLATE = """
// 엔드포인트 성능 분석 업데이트
updateEndpointPerformance(data.api_stats?.endpoint_stats || {});
// 모델 처리 시간 통계 업데이트
updateModelPerformance(data.model_performance_stats || {});
// 알림 업데이트
updateAlerts(data.alerts || []);
@ -1323,6 +1366,50 @@ HTML_TEMPLATE = """
gpuChart.update();
}
function updateModelPerformance(stats) {
const tableBody = document.querySelector('#model-perf-table tbody');
tableBody.innerHTML = ''; // 기존 내용 삭제
if (Object.keys(stats).length === 0) {
tableBody.innerHTML = '<tr><td colspan="6" style="text-align: center; padding: 20px; color: #666;">데이터 수집 중...</td></tr>';
return;
}
for (const model in stats) {
if (stats.hasOwnProperty(model)) {
const modelStats = stats[model];
const row = `
<tr>
<td style="padding: 10px; border-bottom: 1px solid #eee;"><strong>${model}</strong></td>
<td style="padding: 10px; border-bottom: 1px solid #eee;">${modelStats.count}</td>
<td style="padding: 10px; border-bottom: 1px solid #eee;">${modelStats.avg_time}</td>
<td style="padding: 10px; border-bottom: 1px solid #eee;">${modelStats.min_time}</td>
<td style="padding: 10px; border-bottom: 1px solid #eee;">${modelStats.max_time}</td>
<td style="padding: 10px; border-bottom: 1px solid #eee;">${modelStats.total_time}</td>
</tr>
`;
tableBody.innerHTML += row;
}
}
}
function resetPerformanceStats() {
if (!confirm('정말로 모든 모델 처리 시간 통계를 초기화하시겠습니까?')) {
return;
}
fetch('/api/v1/stats/reset', { method: 'POST' })
.then(response => {
if (response.ok) {
console.log('Performance stats reset successfully.');
// 즉시 UI 업데이트를 위해 객체 전달
updateModelPerformance({});
} else {
console.error('Failed to reset performance stats.');
}
})
.catch(error => console.error('Error resetting performance stats:', error));
}
// 로그 새로고침 함수
function refreshLogs() {
fetch('/api/logs?lines=50')

View File

@ -3309,3 +3309,127 @@ TypeError: log() got multiple values for argument 'level'
2025-08-29 21:37:03,465 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
2025-08-29 21:37:09,535 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
2025-08-29 21:37:36,545 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
2025-08-29 21:37:40,902 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
2025-08-29 21:37:48,013 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
2025-08-29 21:37:52,015 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
2025-08-29 21:37:56,678 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
2025-08-29 21:38:01,129 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
2025-08-29 21:38:04,158 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
2025-08-29 21:38:09,653 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
2025-08-29 21:38:14,140 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
2025-08-29 21:38:18,439 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
2025-08-29 21:38:26,053 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
2025-08-29 21:38:31,089 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
2025-08-29 21:38:49,920 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
2025-08-29 21:38:54,855 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
2025-08-29 21:39:00,846 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
2025-08-29 21:39:05,021 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
2025-08-29 21:39:10,981 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
2025-08-29 21:39:38,604 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
2025-08-29 21:39:44,295 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
2025-08-29 21:39:53,330 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
2025-08-29 21:39:59,444 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
2025-08-29 21:40:05,668 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
2025-08-29 21:40:11,333 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
2025-08-29 21:40:17,330 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
2025-08-29 21:40:24,111 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
2025-08-29 21:40:50,529 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
2025-08-29 21:41:33,153 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
2025-08-29 21:41:49,435 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
2025-08-29 21:41:55,197 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
2025-08-29 21:42:02,282 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
2025-08-29 21:42:06,682 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
2025-08-29 21:42:16,872 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
2025-08-29 21:42:24,729 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
2025-08-29 21:42:30,811 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
2025-08-29 21:42:38,251 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
2025-08-29 21:42:42,739 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
2025-08-29 21:42:48,806 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
2025-08-29 21:42:54,878 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
2025-08-29 21:43:00,562 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
2025-08-29 21:43:09,655 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
2025-08-29 21:43:14,226 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
2025-08-29 21:43:18,611 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
2025-08-29 21:44:39,360 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
2025-08-29 21:45:15,544 - uvicorn.error - INFO - Shutting down
2025-08-29 21:45:15,649 - uvicorn.error - INFO - Waiting for application shutdown.
2025-08-29 21:45:15,651 - main - INFO - 🛑 인페인팅 서버 종료 중...
2025-08-29 21:45:15,652 - app.core.worker_manager - INFO - Stopping worker manager...
2025-08-29 21:45:15,654 - app.core.worker_manager - INFO - Worker manager stopped
2025-08-29 21:45:15,654 - main - INFO - ✅ 워커 매니저 중지 완료
2025-08-29 21:45:15,655 - main - INFO - 👋 인페인팅 서버 종료 완료
2025-08-29 21:45:15,656 - uvicorn.error - INFO - Application shutdown complete.
2025-08-29 21:45:15,658 - uvicorn.error - INFO - Finished server process [35210]
2025-08-29 21:53:26,096 - uvicorn.error - INFO - Started server process [40245]
2025-08-29 21:53:26,097 - uvicorn.error - INFO - Waiting for application startup.
2025-08-29 21:53:26,098 - main - INFO - 🚀 인페인팅 서버 시작 중...
2025-08-29 21:53:26,098 - main - INFO - ✅ 공유 객체를 app.state에 저장 완료
2025-08-29 21:53:26,099 - main - INFO - 🔄 상태 저장 백그라운드 작업 생성 중...
2025-08-29 21:53:26,099 - main - INFO - ✅ 상태 저장 백그라운드 작업 생성 완료
2025-08-29 21:53:26,099 - main - INFO - 🚀 세션 풀 초기화 (CUDA 자동 감지)
2025-08-29 21:53:26,100 - app.core.session_pool - INFO - Initializing session pools...
2025-08-29 21:53:26,100 - app.core.session_pool - INFO - Initializing 4 sessions for simple_lama
2025-08-29 21:53:29,519 - app.models.simple_lama - INFO - Loading Simple LAMA model...
2025-08-29 21:53:34,217 - app.models.simple_lama - INFO - 실제 SimpleLama 모델 로딩 완료
2025-08-29 21:53:34,218 - app.models.simple_lama - INFO - Simple LAMA model loaded successfully
2025-08-29 21:53:34,219 - app.core.session_pool - INFO - Simple LAMA 모델 세션 로드 완료
2025-08-29 21:53:34,220 - app.core.session_pool - INFO - Created session simple_lama_0
2025-08-29 21:53:34,220 - app.models.simple_lama - INFO - Loading Simple LAMA model...
2025-08-29 21:53:36,020 - app.models.simple_lama - INFO - 실제 SimpleLama 모델 로딩 완료
2025-08-29 21:53:36,020 - app.models.simple_lama - INFO - Simple LAMA model loaded successfully
2025-08-29 21:53:36,021 - app.core.session_pool - INFO - Simple LAMA 모델 세션 로드 완료
2025-08-29 21:53:36,021 - app.core.session_pool - INFO - Created session simple_lama_1
2025-08-29 21:53:36,021 - app.models.simple_lama - INFO - Loading Simple LAMA model...
2025-08-29 21:53:37,734 - app.models.simple_lama - INFO - 실제 SimpleLama 모델 로딩 완료
2025-08-29 21:53:37,734 - app.models.simple_lama - INFO - Simple LAMA model loaded successfully
2025-08-29 21:53:37,735 - app.core.session_pool - INFO - Simple LAMA 모델 세션 로드 완료
2025-08-29 21:53:37,735 - app.core.session_pool - INFO - Created session simple_lama_2
2025-08-29 21:53:37,735 - app.models.simple_lama - INFO - Loading Simple LAMA model...
2025-08-29 21:53:39,422 - app.models.simple_lama - INFO - 실제 SimpleLama 모델 로딩 완료
2025-08-29 21:53:39,423 - app.models.simple_lama - INFO - Simple LAMA model loaded successfully
2025-08-29 21:53:39,423 - app.core.session_pool - INFO - Simple LAMA 모델 세션 로드 완료
2025-08-29 21:53:39,423 - app.core.session_pool - INFO - Created session simple_lama_3
2025-08-29 21:53:39,424 - app.core.session_pool - INFO - Initializing 4 sessions for migan
2025-08-29 21:53:39,489 - app.models.migan - INFO - Loading MIGAN ONNX model...
2025-08-29 21:53:39,490 - app.models.migan - INFO - MIGAN ONNX 런타임 세션 생성 시도...
2025-08-29 21:53:39,490 - app.models.migan - INFO - MIGAN ONNX providers 설정: ['CUDAExecutionProvider', 'CPUExecutionProvider']
2025-08-29 21:53:42,386 - app.models.migan - INFO - MIGAN ONNX 세션 생성 완료. Providers: ['CUDAExecutionProvider', 'CPUExecutionProvider']
2025-08-29 21:53:42,387 - app.models.migan - INFO - MIGAN ONNX model loaded successfully
2025-08-29 21:53:42,387 - app.core.session_pool - INFO - MIGAN 모델 세션 로드 완료
2025-08-29 21:53:42,388 - app.core.session_pool - INFO - Created session migan_0
2025-08-29 21:53:42,388 - app.models.migan - INFO - Loading MIGAN ONNX model...
2025-08-29 21:53:42,389 - app.models.migan - INFO - MIGAN ONNX 런타임 세션 생성 시도...
2025-08-29 21:53:42,389 - app.models.migan - INFO - MIGAN ONNX providers 설정: ['CUDAExecutionProvider', 'CPUExecutionProvider']
2025-08-29 21:53:43,692 - app.models.migan - INFO - MIGAN ONNX 세션 생성 완료. Providers: ['CUDAExecutionProvider', 'CPUExecutionProvider']
2025-08-29 21:53:43,692 - app.models.migan - INFO - MIGAN ONNX model loaded successfully
2025-08-29 21:53:43,693 - app.core.session_pool - INFO - MIGAN 모델 세션 로드 완료
2025-08-29 21:53:43,693 - app.core.session_pool - INFO - Created session migan_1
2025-08-29 21:53:43,694 - app.models.migan - INFO - Loading MIGAN ONNX model...
2025-08-29 21:53:43,694 - app.models.migan - INFO - MIGAN ONNX 런타임 세션 생성 시도...
2025-08-29 21:53:43,694 - app.models.migan - INFO - MIGAN ONNX providers 설정: ['CUDAExecutionProvider', 'CPUExecutionProvider']
2025-08-29 21:53:44,951 - app.models.migan - INFO - MIGAN ONNX 세션 생성 완료. Providers: ['CUDAExecutionProvider', 'CPUExecutionProvider']
2025-08-29 21:53:44,952 - app.models.migan - INFO - MIGAN ONNX model loaded successfully
2025-08-29 21:53:44,952 - app.core.session_pool - INFO - MIGAN 모델 세션 로드 완료
2025-08-29 21:53:44,953 - app.core.session_pool - INFO - Created session migan_2
2025-08-29 21:53:44,953 - app.models.migan - INFO - Loading MIGAN ONNX model...
2025-08-29 21:53:44,953 - app.models.migan - INFO - MIGAN ONNX 런타임 세션 생성 시도...
2025-08-29 21:53:44,954 - app.models.migan - INFO - MIGAN ONNX providers 설정: ['CUDAExecutionProvider', 'CPUExecutionProvider']
2025-08-29 21:53:46,213 - app.models.migan - INFO - MIGAN ONNX 세션 생성 완료. Providers: ['CUDAExecutionProvider', 'CPUExecutionProvider']
2025-08-29 21:53:46,214 - app.models.migan - INFO - MIGAN ONNX model loaded successfully
2025-08-29 21:53:46,214 - app.core.session_pool - INFO - MIGAN 모델 세션 로드 완료
2025-08-29 21:53:46,214 - app.core.session_pool - INFO - Created session migan_3
2025-08-29 21:53:46,215 - app.core.session_pool - INFO - Initializing 3 sessions for rembg
2025-08-29 21:53:46,216 - app.models.rembg_model - INFO - Loading REMBG model (birefnet-general-lite)...
2025-08-29 21:53:48,257 - app.models.rembg_model - INFO - rembg 모듈 임포트 성공 (세션 생성은 지연 로딩)
2025-08-29 21:53:48,258 - app.models.rembg_model - INFO - 🔧 rembg 새 세션 생성 필요: birefnet-general-lite_cuda_True
2025-08-29 21:53:48,259 - app.models.rembg_model - WARNING - rembg.sessions import 실패, 기본 방식 사용
2025-08-29 21:53:48,259 - app.models.rembg_model - INFO - rembg 세션 생성 providers: ['CUDAExecutionProvider', 'CPUExecutionProvider']
2025-08-29 21:54:01,774 - app.models.rembg_model - INFO - ✅ rembg 'birefnet-general-lite' GPU 가속로 동작 (providers: ['CUDAExecutionProvider', 'CPUExecutionProvider'])
2025-08-29 21:54:01,775 - app.models.rembg_model - INFO - REMBG model (birefnet-general-lite) loaded successfully
2025-08-29 21:54:01,775 - app.core.session_pool - INFO - REMBG 모델 세션 로드 완료
2025-08-29 21:54:01,776 - app.core.session_pool - INFO - Created session rembg_0
2025-08-29 21:54:01,776 - app.models.rembg_model - INFO - Loading REMBG model (birefnet-general-lite)...
2025-08-29 21:54:01,777 - app.models.rembg_model - INFO - rembg 모듈 임포트 성공 (세션 생성은 지연 로딩)
2025-08-29 21:54:01,777 - app.models.rembg_model - INFO - 🔧 rembg 새 세션 생성 필요: birefnet-general-lite_cuda_True
2025-08-29 21:54:01,778 - app.models.rembg_model - WARNING - rembg.sessions import 실패, 기본 방식 사용
2025-08-29 21:54:01,778 - app.models.rembg_model - INFO - rembg 세션 생성 providers: ['CUDAExecutionProvider', 'CPUExecutionProvider']

View File

@ -1,151 +1,79 @@
INFO: Started server process [35210]
2025-08-29 21:32:06,424 - uvicorn.error - INFO - Started server process [35210]
INFO: Started server process [40245]
2025-08-29 21:53:26,096 - uvicorn.error - INFO - Started server process [40245]
INFO: Waiting for application startup.
2025-08-29 21:32:06,424 - uvicorn.error - INFO - Waiting for application startup.
2025-08-29 21:32:06,425 - main - INFO - 🚀 인페인팅 서버 시작 중...
2025-08-29 21:32:06,426 - main - INFO - ✅ 공유 객체를 app.state에 저장 완료
2025-08-29 21:32:06,426 - main - INFO - 🔄 상태 저장 백그라운드 작업 생성 중...
2025-08-29 21:32:06,426 - main - INFO - ✅ 상태 저장 백그라운드 작업 생성 완료
2025-08-29 21:32:06,427 - main - INFO - 🚀 세션 풀 초기화 (CUDA 자동 감지)
2025-08-29 21:32:06,427 - app.core.session_pool - INFO - Initializing session pools...
2025-08-29 21:32:06,427 - app.core.session_pool - INFO - Initializing 4 sessions for simple_lama
2025-08-29 21:32:09,609 - app.models.simple_lama - INFO - Loading Simple LAMA model...
2025-08-29 21:32:13,763 - app.models.simple_lama - INFO - 실제 SimpleLama 모델 로딩 완료
2025-08-29 21:32:13,764 - app.models.simple_lama - INFO - Simple LAMA model loaded successfully
2025-08-29 21:32:13,765 - app.core.session_pool - INFO - Simple LAMA 모델 세션 로드 완료
2025-08-29 21:32:13,766 - app.core.session_pool - INFO - Created session simple_lama_0
2025-08-29 21:32:13,766 - app.models.simple_lama - INFO - Loading Simple LAMA model...
2025-08-29 21:32:15,606 - app.models.simple_lama - INFO - 실제 SimpleLama 모델 로딩 완료
2025-08-29 21:32:15,606 - app.models.simple_lama - INFO - Simple LAMA model loaded successfully
2025-08-29 21:32:15,607 - app.core.session_pool - INFO - Simple LAMA 모델 세션 로드 완료
2025-08-29 21:32:15,607 - app.core.session_pool - INFO - Created session simple_lama_1
2025-08-29 21:32:15,608 - app.models.simple_lama - INFO - Loading Simple LAMA model...
2025-08-29 21:32:17,289 - app.models.simple_lama - INFO - 실제 SimpleLama 모델 로딩 완료
2025-08-29 21:32:17,290 - app.models.simple_lama - INFO - Simple LAMA model loaded successfully
2025-08-29 21:32:17,290 - app.core.session_pool - INFO - Simple LAMA 모델 세션 로드 완료
2025-08-29 21:32:17,291 - app.core.session_pool - INFO - Created session simple_lama_2
2025-08-29 21:32:17,291 - app.models.simple_lama - INFO - Loading Simple LAMA model...
2025-08-29 21:32:18,958 - app.models.simple_lama - INFO - 실제 SimpleLama 모델 로딩 완료
2025-08-29 21:32:18,959 - app.models.simple_lama - INFO - Simple LAMA model loaded successfully
2025-08-29 21:32:18,959 - app.core.session_pool - INFO - Simple LAMA 모델 세션 로드 완료
2025-08-29 21:32:18,960 - app.core.session_pool - INFO - Created session simple_lama_3
2025-08-29 21:32:18,960 - app.core.session_pool - INFO - Initializing 4 sessions for migan
2025-08-29 21:32:19,025 - app.models.migan - INFO - Loading MIGAN ONNX model...
2025-08-29 21:32:19,026 - app.models.migan - INFO - MIGAN ONNX 런타임 세션 생성 시도...
2025-08-29 21:32:19,026 - app.models.migan - INFO - MIGAN ONNX providers 설정: ['CUDAExecutionProvider', 'CPUExecutionProvider']
2025-08-29 21:32:20.460420837 [W:onnxruntime:, transformer_memcpy.cc:74 ApplyImpl] 17 Memcpy nodes are added to the graph main_graph for CUDAExecutionProvider. It might have negative impact on performance (including unable to run CUDA graph). Set session_options.log_severity_level=1 to see the detail logs before this message.
2025-08-29 21:32:21,873 - app.models.migan - INFO - MIGAN ONNX 세션 생성 완료. Providers: ['CUDAExecutionProvider', 'CPUExecutionProvider']
2025-08-29 21:32:21,874 - app.models.migan - INFO - MIGAN ONNX model loaded successfully
2025-08-29 21:32:21,874 - app.core.session_pool - INFO - MIGAN 모델 세션 로드 완료
2025-08-29 21:32:21,874 - app.core.session_pool - INFO - Created session migan_0
2025-08-29 21:32:21,875 - app.models.migan - INFO - Loading MIGAN ONNX model...
2025-08-29 21:32:21,875 - app.models.migan - INFO - MIGAN ONNX 런타임 세션 생성 시도...
2025-08-29 21:32:21,876 - app.models.migan - INFO - MIGAN ONNX providers 설정: ['CUDAExecutionProvider', 'CPUExecutionProvider']
2025-08-29 21:32:22.968792052 [W:onnxruntime:, transformer_memcpy.cc:74 ApplyImpl] 17 Memcpy nodes are added to the graph main_graph for CUDAExecutionProvider. It might have negative impact on performance (including unable to run CUDA graph). Set session_options.log_severity_level=1 to see the detail logs before this message.
2025-08-29 21:32:23,134 - app.models.migan - INFO - MIGAN ONNX 세션 생성 완료. Providers: ['CUDAExecutionProvider', 'CPUExecutionProvider']
2025-08-29 21:32:23,135 - app.models.migan - INFO - MIGAN ONNX model loaded successfully
2025-08-29 21:32:23,135 - app.core.session_pool - INFO - MIGAN 모델 세션 로드 완료
2025-08-29 21:32:23,136 - app.core.session_pool - INFO - Created session migan_1
2025-08-29 21:32:23,136 - app.models.migan - INFO - Loading MIGAN ONNX model...
2025-08-29 21:32:23,137 - app.models.migan - INFO - MIGAN ONNX 런타임 세션 생성 시도...
2025-08-29 21:32:23,137 - app.models.migan - INFO - MIGAN ONNX providers 설정: ['CUDAExecutionProvider', 'CPUExecutionProvider']
2025-08-29 21:32:24.203228802 [W:onnxruntime:, transformer_memcpy.cc:74 ApplyImpl] 17 Memcpy nodes are added to the graph main_graph for CUDAExecutionProvider. It might have negative impact on performance (including unable to run CUDA graph). Set session_options.log_severity_level=1 to see the detail logs before this message.
2025-08-29 21:32:24,367 - app.models.migan - INFO - MIGAN ONNX 세션 생성 완료. Providers: ['CUDAExecutionProvider', 'CPUExecutionProvider']
2025-08-29 21:32:24,368 - app.models.migan - INFO - MIGAN ONNX model loaded successfully
2025-08-29 21:32:24,368 - app.core.session_pool - INFO - MIGAN 모델 세션 로드 완료
2025-08-29 21:32:24,369 - app.core.session_pool - INFO - Created session migan_2
2025-08-29 21:32:24,369 - app.models.migan - INFO - Loading MIGAN ONNX model...
2025-08-29 21:32:24,370 - app.models.migan - INFO - MIGAN ONNX 런타임 세션 생성 시도...
2025-08-29 21:32:24,370 - app.models.migan - INFO - MIGAN ONNX providers 설정: ['CUDAExecutionProvider', 'CPUExecutionProvider']
2025-08-29 21:32:25.439378113 [W:onnxruntime:, transformer_memcpy.cc:74 ApplyImpl] 17 Memcpy nodes are added to the graph main_graph for CUDAExecutionProvider. It might have negative impact on performance (including unable to run CUDA graph). Set session_options.log_severity_level=1 to see the detail logs before this message.
2025-08-29 21:32:25,605 - app.models.migan - INFO - MIGAN ONNX 세션 생성 완료. Providers: ['CUDAExecutionProvider', 'CPUExecutionProvider']
2025-08-29 21:32:25,606 - app.models.migan - INFO - MIGAN ONNX model loaded successfully
2025-08-29 21:32:25,607 - app.core.session_pool - INFO - MIGAN 모델 세션 로드 완료
2025-08-29 21:32:25,607 - app.core.session_pool - INFO - Created session migan_3
2025-08-29 21:32:25,608 - app.core.session_pool - INFO - Initializing 3 sessions for rembg
2025-08-29 21:32:25,610 - app.models.rembg_model - INFO - Loading REMBG model (birefnet-general-lite)...
2025-08-29 21:32:27,663 - app.models.rembg_model - INFO - rembg 모듈 임포트 성공 (세션 생성은 지연 로딩)
2025-08-29 21:32:27,664 - app.models.rembg_model - INFO - 🔧 rembg 새 세션 생성 필요: birefnet-general-lite_cuda_True
2025-08-29 21:32:27,664 - app.models.rembg_model - WARNING - rembg.sessions import 실패, 기본 방식 사용
2025-08-29 21:32:27,665 - app.models.rembg_model - INFO - rembg 세션 생성 providers: ['CUDAExecutionProvider', 'CPUExecutionProvider']
2025-08-29 21:32:40,606 - app.models.rembg_model - INFO - ✅ rembg 'birefnet-general-lite' GPU 가속로 동작 (providers: ['CUDAExecutionProvider', 'CPUExecutionProvider'])
2025-08-29 21:32:40,606 - app.models.rembg_model - INFO - REMBG model (birefnet-general-lite) loaded successfully
2025-08-29 21:32:40,607 - app.core.session_pool - INFO - REMBG 모델 세션 로드 완료
2025-08-29 21:32:40,607 - app.core.session_pool - INFO - Created session rembg_0
2025-08-29 21:32:40,608 - app.models.rembg_model - INFO - Loading REMBG model (birefnet-general-lite)...
2025-08-29 21:32:40,608 - app.models.rembg_model - INFO - rembg 모듈 임포트 성공 (세션 생성은 지연 로딩)
2025-08-29 21:32:40,608 - app.models.rembg_model - INFO - 🔧 rembg 새 세션 생성 필요: birefnet-general-lite_cuda_True
2025-08-29 21:32:40,609 - app.models.rembg_model - WARNING - rembg.sessions import 실패, 기본 방식 사용
2025-08-29 21:32:40,609 - app.models.rembg_model - INFO - rembg 세션 생성 providers: ['CUDAExecutionProvider', 'CPUExecutionProvider']
2025-08-29 21:32:53,362 - app.models.rembg_model - INFO - ✅ rembg 'birefnet-general-lite' GPU 가속로 동작 (providers: ['CUDAExecutionProvider', 'CPUExecutionProvider'])
2025-08-29 21:32:53,363 - app.models.rembg_model - INFO - REMBG model (birefnet-general-lite) loaded successfully
2025-08-29 21:32:53,364 - app.core.session_pool - INFO - REMBG 모델 세션 로드 완료
2025-08-29 21:32:53,364 - app.core.session_pool - INFO - Created session rembg_1
2025-08-29 21:32:53,365 - app.models.rembg_model - INFO - Loading REMBG model (birefnet-general-lite)...
2025-08-29 21:32:53,365 - app.models.rembg_model - INFO - rembg 모듈 임포트 성공 (세션 생성은 지연 로딩)
2025-08-29 21:32:53,366 - app.models.rembg_model - INFO - 🔧 rembg 새 세션 생성 필요: birefnet-general-lite_cuda_True
2025-08-29 21:32:53,366 - app.models.rembg_model - WARNING - rembg.sessions import 실패, 기본 방식 사용
2025-08-29 21:32:53,367 - app.models.rembg_model - INFO - rembg 세션 생성 providers: ['CUDAExecutionProvider', 'CPUExecutionProvider']
2025-08-29 21:33:05,746 - app.models.rembg_model - INFO - ✅ rembg 'birefnet-general-lite' GPU 가속로 동작 (providers: ['CUDAExecutionProvider', 'CPUExecutionProvider'])
2025-08-29 21:33:05,747 - app.models.rembg_model - INFO - REMBG model (birefnet-general-lite) loaded successfully
2025-08-29 21:33:05,747 - app.core.session_pool - INFO - REMBG 모델 세션 로드 완료
2025-08-29 21:33:05,748 - app.core.session_pool - INFO - Created session rembg_2
2025-08-29 21:33:05,748 - app.core.session_pool - INFO - Session pools initialized successfully
2025-08-29 21:33:05,749 - main - INFO - ✅ 세션 풀 초기화 완료
2025-08-29 21:33:05,749 - app.core.worker_manager - INFO - Starting worker manager...
2025-08-29 21:33:05,750 - app.core.worker_manager - INFO - Worker manager started with 4 workers
2025-08-29 21:33:05,750 - main - INFO - ✅ 워커 매니저 시작 완료
2025-08-29 21:33:05,750 - main - INFO - 🎉 인페인팅 서버 시작 완료!
2025-08-29 21:33:05,751 - main - INFO - 🔄 상태 저장 백그라운드 작업 시작됨
INFO: Application startup complete.
2025-08-29 21:33:05,753 - uvicorn.error - INFO - Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:8008 (Press CTRL+C to quit)
2025-08-29 21:33:05,754 - uvicorn.error - INFO - Uvicorn running on http://0.0.0.0:8008 (Press CTRL+C to quit)
INFO: 127.0.0.1:37912 - "GET /api/v1/health HTTP/1.1" 404 Not Found
INFO: 127.0.0.1:37916 - "GET /api/v1/health HTTP/1.1" 404 Not Found
INFO: 192.168.0.119:54788 - "GET /health HTTP/1.1" 200 OK
INFO: 192.168.0.119:54910 - "GET /api/v1/model HTTP/1.1" 200 OK
2025-08-29 21:34:22,942 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
INFO: 192.168.0.119:54911 - "POST /api/v1/inpaint HTTP/1.1" 200 OK
INFO: 192.168.0.119:54959 - "GET /api/v1/model HTTP/1.1" 200 OK
2025-08-29 21:34:33,468 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
INFO: 192.168.0.119:54960 - "POST /api/v1/inpaint HTTP/1.1" 200 OK
INFO: 192.168.0.119:55054 - "GET /api/v1/model HTTP/1.1" 200 OK
2025-08-29 21:34:54,879 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
INFO: 192.168.0.119:55055 - "POST /api/v1/inpaint HTTP/1.1" 200 OK
INFO: 192.168.0.119:55078 - "GET /api/v1/model HTTP/1.1" 200 OK
2025-08-29 21:35:00,881 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
INFO: 192.168.0.119:55091 - "POST /api/v1/inpaint HTTP/1.1" 200 OK
INFO: 192.168.0.119:55106 - "GET /api/v1/model HTTP/1.1" 200 OK
2025-08-29 21:35:06,470 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
INFO: 192.168.0.119:55107 - "POST /api/v1/inpaint HTTP/1.1" 200 OK
INFO: 192.168.0.119:55137 - "GET /api/v1/model HTTP/1.1" 200 OK
2025-08-29 21:35:15,091 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
INFO: 192.168.0.119:55138 - "POST /api/v1/inpaint HTTP/1.1" 200 OK
INFO: 192.168.0.119:55172 - "GET /api/v1/model HTTP/1.1" 200 OK
2025-08-29 21:35:24,091 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
INFO: 192.168.0.119:55173 - "POST /api/v1/inpaint HTTP/1.1" 200 OK
INFO: 192.168.0.119:55212 - "GET /api/v1/model HTTP/1.1" 200 OK
2025-08-29 21:35:34,140 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
INFO: 192.168.0.119:55213 - "POST /api/v1/inpaint HTTP/1.1" 200 OK
INFO: 192.168.0.119:55228 - "GET /api/v1/model HTTP/1.1" 200 OK
2025-08-29 21:35:39,477 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
INFO: 192.168.0.119:55229 - "POST /api/v1/inpaint HTTP/1.1" 200 OK
INFO: 192.168.0.119:55262 - "GET /api/v1/model HTTP/1.1" 200 OK
2025-08-29 21:35:45,252 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
INFO: 192.168.0.119:55263 - "POST /api/v1/inpaint HTTP/1.1" 200 OK
INFO: 192.168.0.119:55478 - "GET /api/v1/model HTTP/1.1" 200 OK
2025-08-29 21:36:44,752 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
INFO: 192.168.0.119:55479 - "POST /api/v1/inpaint HTTP/1.1" 200 OK
INFO: 192.168.0.119:55521 - "GET /api/v1/model HTTP/1.1" 200 OK
2025-08-29 21:36:56,862 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
INFO: 192.168.0.119:55526 - "POST /api/v1/inpaint HTTP/1.1" 200 OK
INFO: 192.168.0.119:55551 - "GET /api/v1/model HTTP/1.1" 200 OK
2025-08-29 21:37:03,465 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
INFO: 192.168.0.119:55553 - "POST /api/v1/inpaint HTTP/1.1" 200 OK
INFO: 192.168.0.119:55575 - "GET /api/v1/model HTTP/1.1" 200 OK
2025-08-29 21:37:09,535 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
INFO: 192.168.0.119:55576 - "POST /api/v1/inpaint HTTP/1.1" 200 OK
INFO: 192.168.0.119:55653 - "GET /api/v1/model HTTP/1.1" 200 OK
2025-08-29 21:37:36,545 - app.models.simple_lama - INFO - 실제 SimpleLama 모델로 인페인팅 수행
INFO: 192.168.0.119:55654 - "POST /api/v1/inpaint HTTP/1.1" 200 OK
2025-08-29 21:53:26,097 - uvicorn.error - INFO - Waiting for application startup.
2025-08-29 21:53:26,098 - main - INFO - 🚀 인페인팅 서버 시작 중...
2025-08-29 21:53:26,098 - main - INFO - ✅ 공유 객체를 app.state에 저장 완료
2025-08-29 21:53:26,099 - main - INFO - 🔄 상태 저장 백그라운드 작업 생성 중...
2025-08-29 21:53:26,099 - main - INFO - ✅ 상태 저장 백그라운드 작업 생성 완료
2025-08-29 21:53:26,099 - main - INFO - 🚀 세션 풀 초기화 (CUDA 자동 감지)
2025-08-29 21:53:26,100 - app.core.session_pool - INFO - Initializing session pools...
2025-08-29 21:53:26,100 - app.core.session_pool - INFO - Initializing 4 sessions for simple_lama
2025-08-29 21:53:29,519 - app.models.simple_lama - INFO - Loading Simple LAMA model...
2025-08-29 21:53:34,217 - app.models.simple_lama - INFO - 실제 SimpleLama 모델 로딩 완료
2025-08-29 21:53:34,218 - app.models.simple_lama - INFO - Simple LAMA model loaded successfully
2025-08-29 21:53:34,219 - app.core.session_pool - INFO - Simple LAMA 모델 세션 로드 완료
2025-08-29 21:53:34,220 - app.core.session_pool - INFO - Created session simple_lama_0
2025-08-29 21:53:34,220 - app.models.simple_lama - INFO - Loading Simple LAMA model...
2025-08-29 21:53:36,020 - app.models.simple_lama - INFO - 실제 SimpleLama 모델 로딩 완료
2025-08-29 21:53:36,020 - app.models.simple_lama - INFO - Simple LAMA model loaded successfully
2025-08-29 21:53:36,021 - app.core.session_pool - INFO - Simple LAMA 모델 세션 로드 완료
2025-08-29 21:53:36,021 - app.core.session_pool - INFO - Created session simple_lama_1
2025-08-29 21:53:36,021 - app.models.simple_lama - INFO - Loading Simple LAMA model...
2025-08-29 21:53:37,734 - app.models.simple_lama - INFO - 실제 SimpleLama 모델 로딩 완료
2025-08-29 21:53:37,734 - app.models.simple_lama - INFO - Simple LAMA model loaded successfully
2025-08-29 21:53:37,735 - app.core.session_pool - INFO - Simple LAMA 모델 세션 로드 완료
2025-08-29 21:53:37,735 - app.core.session_pool - INFO - Created session simple_lama_2
2025-08-29 21:53:37,735 - app.models.simple_lama - INFO - Loading Simple LAMA model...
2025-08-29 21:53:39,422 - app.models.simple_lama - INFO - 실제 SimpleLama 모델 로딩 완료
2025-08-29 21:53:39,423 - app.models.simple_lama - INFO - Simple LAMA model loaded successfully
2025-08-29 21:53:39,423 - app.core.session_pool - INFO - Simple LAMA 모델 세션 로드 완료
2025-08-29 21:53:39,423 - app.core.session_pool - INFO - Created session simple_lama_3
2025-08-29 21:53:39,424 - app.core.session_pool - INFO - Initializing 4 sessions for migan
2025-08-29 21:53:39,489 - app.models.migan - INFO - Loading MIGAN ONNX model...
2025-08-29 21:53:39,490 - app.models.migan - INFO - MIGAN ONNX 런타임 세션 생성 시도...
2025-08-29 21:53:39,490 - app.models.migan - INFO - MIGAN ONNX providers 설정: ['CUDAExecutionProvider', 'CPUExecutionProvider']
2025-08-29 21:53:40.974756858 [W:onnxruntime:, transformer_memcpy.cc:74 ApplyImpl] 17 Memcpy nodes are added to the graph main_graph for CUDAExecutionProvider. It might have negative impact on performance (including unable to run CUDA graph). Set session_options.log_severity_level=1 to see the detail logs before this message.
2025-08-29 21:53:42,386 - app.models.migan - INFO - MIGAN ONNX 세션 생성 완료. Providers: ['CUDAExecutionProvider', 'CPUExecutionProvider']
2025-08-29 21:53:42,387 - app.models.migan - INFO - MIGAN ONNX model loaded successfully
2025-08-29 21:53:42,387 - app.core.session_pool - INFO - MIGAN 모델 세션 로드 완료
2025-08-29 21:53:42,388 - app.core.session_pool - INFO - Created session migan_0
2025-08-29 21:53:42,388 - app.models.migan - INFO - Loading MIGAN ONNX model...
2025-08-29 21:53:42,389 - app.models.migan - INFO - MIGAN ONNX 런타임 세션 생성 시도...
2025-08-29 21:53:42,389 - app.models.migan - INFO - MIGAN ONNX providers 설정: ['CUDAExecutionProvider', 'CPUExecutionProvider']
2025-08-29 21:53:43.519053126 [W:onnxruntime:, transformer_memcpy.cc:74 ApplyImpl] 17 Memcpy nodes are added to the graph main_graph for CUDAExecutionProvider. It might have negative impact on performance (including unable to run CUDA graph). Set session_options.log_severity_level=1 to see the detail logs before this message.
2025-08-29 21:53:43,692 - app.models.migan - INFO - MIGAN ONNX 세션 생성 완료. Providers: ['CUDAExecutionProvider', 'CPUExecutionProvider']
2025-08-29 21:53:43,692 - app.models.migan - INFO - MIGAN ONNX model loaded successfully
2025-08-29 21:53:43,693 - app.core.session_pool - INFO - MIGAN 모델 세션 로드 완료
2025-08-29 21:53:43,693 - app.core.session_pool - INFO - Created session migan_1
2025-08-29 21:53:43,694 - app.models.migan - INFO - Loading MIGAN ONNX model...
2025-08-29 21:53:43,694 - app.models.migan - INFO - MIGAN ONNX 런타임 세션 생성 시도...
2025-08-29 21:53:43,694 - app.models.migan - INFO - MIGAN ONNX providers 설정: ['CUDAExecutionProvider', 'CPUExecutionProvider']
2025-08-29 21:53:44.783381168 [W:onnxruntime:, transformer_memcpy.cc:74 ApplyImpl] 17 Memcpy nodes are added to the graph main_graph for CUDAExecutionProvider. It might have negative impact on performance (including unable to run CUDA graph). Set session_options.log_severity_level=1 to see the detail logs before this message.
2025-08-29 21:53:44,951 - app.models.migan - INFO - MIGAN ONNX 세션 생성 완료. Providers: ['CUDAExecutionProvider', 'CPUExecutionProvider']
2025-08-29 21:53:44,952 - app.models.migan - INFO - MIGAN ONNX model loaded successfully
2025-08-29 21:53:44,952 - app.core.session_pool - INFO - MIGAN 모델 세션 로드 완료
2025-08-29 21:53:44,953 - app.core.session_pool - INFO - Created session migan_2
2025-08-29 21:53:44,953 - app.models.migan - INFO - Loading MIGAN ONNX model...
2025-08-29 21:53:44,953 - app.models.migan - INFO - MIGAN ONNX 런타임 세션 생성 시도...
2025-08-29 21:53:44,954 - app.models.migan - INFO - MIGAN ONNX providers 설정: ['CUDAExecutionProvider', 'CPUExecutionProvider']
2025-08-29 21:53:46.042067051 [W:onnxruntime:, transformer_memcpy.cc:74 ApplyImpl] 17 Memcpy nodes are added to the graph main_graph for CUDAExecutionProvider. It might have negative impact on performance (including unable to run CUDA graph). Set session_options.log_severity_level=1 to see the detail logs before this message.
2025-08-29 21:53:46,213 - app.models.migan - INFO - MIGAN ONNX 세션 생성 완료. Providers: ['CUDAExecutionProvider', 'CPUExecutionProvider']
2025-08-29 21:53:46,214 - app.models.migan - INFO - MIGAN ONNX model loaded successfully
2025-08-29 21:53:46,214 - app.core.session_pool - INFO - MIGAN 모델 세션 로드 완료
2025-08-29 21:53:46,214 - app.core.session_pool - INFO - Created session migan_3
2025-08-29 21:53:46,215 - app.core.session_pool - INFO - Initializing 3 sessions for rembg
2025-08-29 21:53:46,216 - app.models.rembg_model - INFO - Loading REMBG model (birefnet-general-lite)...
2025-08-29 21:53:48,257 - app.models.rembg_model - INFO - rembg 모듈 임포트 성공 (세션 생성은 지연 로딩)
2025-08-29 21:53:48,258 - app.models.rembg_model - INFO - 🔧 rembg 새 세션 생성 필요: birefnet-general-lite_cuda_True
2025-08-29 21:53:48,259 - app.models.rembg_model - WARNING - rembg.sessions import 실패, 기본 방식 사용
2025-08-29 21:53:48,259 - app.models.rembg_model - INFO - rembg 세션 생성 providers: ['CUDAExecutionProvider', 'CPUExecutionProvider']
2025-08-29 21:54:01,774 - app.models.rembg_model - INFO - ✅ rembg 'birefnet-general-lite' GPU 가속로 동작 (providers: ['CUDAExecutionProvider', 'CPUExecutionProvider'])
2025-08-29 21:54:01,775 - app.models.rembg_model - INFO - REMBG model (birefnet-general-lite) loaded successfully
2025-08-29 21:54:01,775 - app.core.session_pool - INFO - REMBG 모델 세션 로드 완료
2025-08-29 21:54:01,776 - app.core.session_pool - INFO - Created session rembg_0
2025-08-29 21:54:01,776 - app.models.rembg_model - INFO - Loading REMBG model (birefnet-general-lite)...
2025-08-29 21:54:01,777 - app.models.rembg_model - INFO - rembg 모듈 임포트 성공 (세션 생성은 지연 로딩)
2025-08-29 21:54:01,777 - app.models.rembg_model - INFO - 🔧 rembg 새 세션 생성 필요: birefnet-general-lite_cuda_True
2025-08-29 21:54:01,778 - app.models.rembg_model - WARNING - rembg.sessions import 실패, 기본 방식 사용
2025-08-29 21:54:01,778 - app.models.rembg_model - INFO - rembg 세션 생성 providers: ['CUDAExecutionProvider', 'CPUExecutionProvider']

View File

@ -1 +1 @@
35210
40245

View File

@ -111,3 +111,179 @@ INFO: 192.168.0.119:54722 - "GET /api/model-usage-stats HTTP/1.1" 200 OK
INFO: ('192.168.0.119', 55354) - "WebSocket /ws" [accepted]
INFO: 192.168.0.119:54643 - "GET /api/system-alerts HTTP/1.1" 200 OK
INFO: 127.0.0.1:48218 - "GET /api/performance-stats HTTP/1.1" 200 OK
INFO: 127.0.0.1:48234 - "GET /api/system-alerts HTTP/1.1" 200 OK
INFO: 127.0.0.1:42822 - "GET /api/model-usage-stats HTTP/1.1" 200 OK
INFO: 192.168.0.119:54644 - "GET /api/system-alerts HTTP/1.1" 200 OK
INFO: 127.0.0.1:48206 - "GET /api/system-alerts HTTP/1.1" 200 OK
INFO: 127.0.0.1:42808 - "GET /api/model-usage-stats HTTP/1.1" 200 OK
INFO: connection closed
INFO: connection closed
INFO: 192.168.0.119:55051 - "GET /api/logs?lines=50 HTTP/1.1" 200 OK
INFO: 192.168.0.119:55129 - "GET /api/system-alerts HTTP/1.1" 200 OK
INFO: 192.168.0.119:54900 - "GET /api/model-usage-stats HTTP/1.1" 200 OK
INFO: 192.168.0.119:54722 - "GET /api/system-alerts HTTP/1.1" 200 OK
INFO: 127.0.0.1:42344 - "GET /api/system-alerts HTTP/1.1" 200 OK
INFO: 192.168.0.119:54643 - "GET /api/logs?lines=50 HTTP/1.1" 200 OK
INFO: 127.0.0.1:48218 - "GET /api/system-alerts HTTP/1.1" 200 OK
INFO: 127.0.0.1:48234 - "GET /api/model-usage-stats HTTP/1.1" 200 OK
INFO: 127.0.0.1:42822 - "GET /api/system-alerts HTTP/1.1" 200 OK
INFO: 192.168.0.119:54644 - "GET /api/performance-stats HTTP/1.1" 200 OK
INFO: 127.0.0.1:48206 - "GET /api/model-usage-stats HTTP/1.1" 200 OK
INFO: 127.0.0.1:42808 - "GET /api/logs?lines=50 HTTP/1.1" 200 OK
INFO: ('127.0.0.1', 46292) - "WebSocket /ws" [accepted]
INFO: ('192.168.0.119', 55550) - "WebSocket /ws" [accepted]
INFO: 192.168.0.119:55051 - "GET /api/model-usage-stats HTTP/1.1" 200 OK
INFO: 192.168.0.119:55129 - "GET /api/system-alerts HTTP/1.1" 200 OK
INFO: 192.168.0.119:54900 - "GET /api/system-alerts HTTP/1.1" 200 OK
INFO: 192.168.0.119:54722 - "GET /api/performance-stats HTTP/1.1" 200 OK
INFO: 127.0.0.1:42344 - "GET /api/performance-stats HTTP/1.1" 200 OK
INFO: connection closed
INFO: connection closed
INFO: 192.168.0.119:54643 - "GET /api/model-usage-stats HTTP/1.1" 200 OK
INFO: 127.0.0.1:48218 - "GET /api/system-alerts HTTP/1.1" 200 OK
INFO: 127.0.0.1:48234 - "GET /api/system-alerts HTTP/1.1" 200 OK
INFO: 127.0.0.1:42822 - "GET /api/model-usage-stats HTTP/1.1" 200 OK
INFO: 192.168.0.119:54644 - "GET /api/system-alerts HTTP/1.1" 200 OK
INFO: 127.0.0.1:48206 - "GET /api/performance-stats HTTP/1.1" 200 OK
INFO: 127.0.0.1:42808 - "GET /api/system-alerts HTTP/1.1" 200 OK
INFO: 192.168.0.119:55051 - "GET /api/model-usage-stats HTTP/1.1" 200 OK
INFO: 192.168.0.119:54900 - "GET /api/system-alerts HTTP/1.1" 200 OK
INFO: 192.168.0.119:54722 - "GET /api/system-alerts HTTP/1.1" 200 OK
INFO: 127.0.0.1:42344 - "GET /api/logs?lines=50 HTTP/1.1" 200 OK
브로드캐스트 오류: list.remove(x): x not in list
INFO: 127.0.0.1:48218 - "GET /api/model-usage-stats HTTP/1.1" 200 OK
INFO: 127.0.0.1:48234 - "GET /api/system-alerts HTTP/1.1" 200 OK
INFO: 127.0.0.1:42822 - "GET /api/system-alerts HTTP/1.1" 200 OK
INFO: 192.168.0.119:54644 - "GET /api/model-usage-stats HTTP/1.1" 200 OK
INFO: 127.0.0.1:48206 - "GET /api/model-usage-stats HTTP/1.1" 200 OK
INFO: 127.0.0.1:42808 - "GET /api/system-alerts HTTP/1.1" 200 OK
INFO: connection closed
INFO: 192.168.0.119:55051 - "GET /api/logs?lines=50 HTTP/1.1" 200 OK
INFO: 192.168.0.119:54900 - "GET /api/performance-stats HTTP/1.1" 200 OK
INFO: 192.168.0.119:54722 - "GET /api/model-usage-stats HTTP/1.1" 200 OK
INFO: 127.0.0.1:42344 - "GET /api/logs?lines=50 HTTP/1.1" 200 OK
INFO: 192.168.0.119:55953 - "GET /api/logs?lines=50 HTTP/1.1" 200 OK
INFO: 192.168.0.119:55982 - "GET /api/system-alerts HTTP/1.1" 200 OK
INFO: 127.0.0.1:48218 - "GET /api/performance-stats HTTP/1.1" 200 OK
INFO: 192.168.0.119:54644 - "GET /api/system-alerts HTTP/1.1" 200 OK
INFO: 127.0.0.1:48206 - "GET /api/model-usage-stats HTTP/1.1" 200 OK
INFO: 127.0.0.1:42822 - "GET /api/performance-stats HTTP/1.1" 200 OK
INFO: 127.0.0.1:48234 - "GET /api/system-alerts HTTP/1.1" 200 OK
INFO: 192.168.0.119:55051 - "GET /api/logs?lines=50 HTTP/1.1" 200 OK
INFO: 192.168.0.119:54900 - "GET /api/system-alerts HTTP/1.1" 200 OK
INFO: 192.168.0.119:54722 - "GET /api/model-usage-stats HTTP/1.1" 200 OK
INFO: 192.168.0.119:55953 - "GET /api/system-alerts HTTP/1.1" 200 OK
INFO: 192.168.0.119:55982 - "GET /api/performance-stats HTTP/1.1" 200 OK
INFO: 192.168.0.119:54644 - "GET /api/model-usage-stats HTTP/1.1" 200 OK
INFO: 127.0.0.1:48234 - "GET /api/logs?lines=50 HTTP/1.1" 200 OK
INFO: connection closed
INFO: ('192.168.0.119', 56067) - "WebSocket /ws" [accepted]
INFO: ('127.0.0.1', 51226) - "WebSocket /ws" [accepted]
INFO: 192.168.0.119:55051 - "GET /api/system-alerts HTTP/1.1" 200 OK
INFO: 192.168.0.119:54900 - "GET /api/system-alerts HTTP/1.1" 200 OK
INFO: 192.168.0.119:54722 - "GET /api/system-alerts HTTP/1.1" 200 OK
INFO: connection open
INFO: connection open
INFO: 192.168.0.119:55953 - "GET /api/model-usage-stats HTTP/1.1" 200 OK
INFO: 192.168.0.119:55982 - "GET /api/system-alerts HTTP/1.1" 200 OK
INFO: 192.168.0.119:54644 - "GET /api/model-usage-stats HTTP/1.1" 200 OK
INFO: 127.0.0.1:48234 - "GET /api/logs?lines=50 HTTP/1.1" 200 OK
INFO: 192.168.0.119:55051 - "GET /api/performance-stats HTTP/1.1" 200 OK
INFO: 192.168.0.119:54900 - "GET /api/logs?lines=50 HTTP/1.1" 200 OK
INFO: 192.168.0.119:54722 - "GET /api/model-usage-stats HTTP/1.1" 200 OK
INFO: 192.168.0.119:55953 - "GET /api/system-alerts HTTP/1.1" 200 OK
INFO: 192.168.0.119:55982 - "GET /api/system-alerts HTTP/1.1" 200 OK
INFO: 192.168.0.119:54644 - "GET /api/model-usage-stats HTTP/1.1" 200 OK
INFO: ('127.0.0.1', 58442) - "WebSocket /ws" [accepted]
INFO: 127.0.0.1:48234 - "GET /api/performance-stats HTTP/1.1" 200 OK
INFO: 192.168.0.119:55051 - "GET /api/logs?lines=50 HTTP/1.1" 200 OK
INFO: 192.168.0.119:54900 - "GET /api/performance-stats HTTP/1.1" 200 OK
INFO: 192.168.0.119:54722 - "GET /api/logs?lines=50 HTTP/1.1" 200 OK
INFO: connection open
INFO: 127.0.0.1:58444 - "GET /api/performance-stats HTTP/1.1" 200 OK
INFO: 127.0.0.1:58452 - "GET /api/model-usage-stats HTTP/1.1" 200 OK
INFO: 127.0.0.1:58454 - "GET /api/system-alerts HTTP/1.1" 200 OK
INFO: 127.0.0.1:58464 - "GET /api/system-alerts HTTP/1.1" 200 OK
INFO: 127.0.0.1:53170 - "GET /api/logs?lines=50 HTTP/1.1" 200 OK
INFO: 192.168.0.119:55953 - "GET /api/model-usage-stats HTTP/1.1" 200 OK
INFO: 192.168.0.119:55982 - "GET /api/performance-stats HTTP/1.1" 200 OK
INFO: 192.168.0.119:54644 - "GET /api/system-alerts HTTP/1.1" 200 OK
INFO: 127.0.0.1:48234 - "GET /api/model-usage-stats HTTP/1.1" 200 OK
INFO: 127.0.0.1:58452 - "GET /api/system-alerts HTTP/1.1" 200 OK
INFO: 127.0.0.1:58444 - "GET /api/system-alerts HTTP/1.1" 200 OK
INFO: 127.0.0.1:58454 - "GET /api/logs?lines=50 HTTP/1.1" 200 OK
INFO: 127.0.0.1:58464 - "GET /api/model-usage-stats HTTP/1.1" 200 OK
INFO: 127.0.0.1:53170 - "GET /api/system-alerts HTTP/1.1" 200 OK
INFO: 192.168.0.119:54644 - "GET /api/system-alerts HTTP/1.1" 200 OK
INFO: 192.168.0.119:55982 - "GET /api/model-usage-stats HTTP/1.1" 200 OK
INFO: 192.168.0.119:55953 - "GET /api/logs?lines=50 HTTP/1.1" 200 OK
INFO: 192.168.0.119:54722 - "GET /api/performance-stats HTTP/1.1" 200 OK
INFO: 127.0.0.1:48234 - "GET /api/performance-stats HTTP/1.1" 200 OK
INFO: 127.0.0.1:58452 - "GET /api/model-usage-stats HTTP/1.1" 200 OK
INFO: 127.0.0.1:58444 - "GET /api/system-alerts HTTP/1.1" 200 OK
INFO: 127.0.0.1:58454 - "GET /api/model-usage-stats HTTP/1.1" 200 OK
INFO: 127.0.0.1:58464 - "GET /api/system-alerts HTTP/1.1" 200 OK
INFO: 127.0.0.1:53170 - "GET /api/system-alerts HTTP/1.1" 200 OK
INFO: ('127.0.0.1', 33454) - "WebSocket /ws" [accepted]
INFO: 127.0.0.1:48234 - "GET /api/logs?lines=50 HTTP/1.1" 200 OK
INFO: 127.0.0.1:58452 - "GET /api/performance-stats HTTP/1.1" 200 OK
INFO: 127.0.0.1:58444 - "GET /api/model-usage-stats HTTP/1.1" 200 OK
INFO: 127.0.0.1:58454 - "GET /api/system-alerts HTTP/1.1" 200 OK
INFO: 127.0.0.1:58464 - "GET /api/system-alerts HTTP/1.1" 200 OK
INFO: 127.0.0.1:53170 - "GET /api/model-usage-stats HTTP/1.1" 200 OK
INFO: connection open
INFO: 127.0.0.1:48234 - "GET /api/system-alerts HTTP/1.1" 200 OK
INFO: 127.0.0.1:58452 - "GET /api/logs?lines=50 HTTP/1.1" 200 OK
INFO: 127.0.0.1:58444 - "GET /api/performance-stats HTTP/1.1" 200 OK
INFO: 127.0.0.1:58454 - "GET /api/model-usage-stats HTTP/1.1" 200 OK
INFO: 127.0.0.1:58464 - "GET /api/system-alerts HTTP/1.1" 200 OK
INFO: 192.168.0.119:57058 - "GET /api/performance-stats HTTP/1.1" 200 OK
INFO: 192.168.0.119:57059 - "GET /api/logs?lines=50 HTTP/1.1" 200 OK
INFO: 192.168.0.119:57060 - "GET /api/model-usage-stats HTTP/1.1" 200 OK
INFO: 192.168.0.119:57061 - "GET /api/system-alerts HTTP/1.1" 200 OK
INFO: 127.0.0.1:48234 - "GET /api/performance-stats HTTP/1.1" 200 OK
INFO: 127.0.0.1:58444 - "GET /api/model-usage-stats HTTP/1.1" 200 OK
INFO: 127.0.0.1:58454 - "GET /api/system-alerts HTTP/1.1" 200 OK
INFO: 127.0.0.1:58464 - "GET /api/logs?lines=50 HTTP/1.1" 200 OK
INFO: 192.168.0.119:57058 - "GET /api/performance-stats HTTP/1.1" 200 OK
INFO: 192.168.0.119:57059 - "GET /api/model-usage-stats HTTP/1.1" 200 OK
INFO: 192.168.0.119:57060 - "GET /api/system-alerts HTTP/1.1" 200 OK
INFO: connection closed
INFO: ('192.168.0.119', 57106) - "WebSocket /ws" [accepted]
INFO: ('127.0.0.1', 40410) - "WebSocket /ws" [accepted]
INFO: ('127.0.0.1', 40412) - "WebSocket /ws" [accepted]
INFO: connection closed
INFO: connection open
INFO: connection open
INFO: connection open
브로드캐스트 오류: list.remove(x): x not in list
INFO: 192.168.0.119:57060 - "GET /api/system-alerts HTTP/1.1" 200 OK
INFO: 192.168.0.119:57059 - "GET /api/model-usage-stats HTTP/1.1" 200 OK
INFO: 192.168.0.119:57058 - "GET /api/performance-stats HTTP/1.1" 200 OK
INFO: 192.168.0.119:57290 - "GET /api/logs?lines=50 HTTP/1.1" 200 OK
INFO: connection closed
INFO: ('127.0.0.1', 50684) - "WebSocket /ws" [accepted]
INFO: ('127.0.0.1', 50686) - "WebSocket /ws" [accepted]
INFO: connection open
INFO: connection open
INFO: 127.0.0.1:34148 - "GET /api/performance-stats HTTP/1.1" 200 OK
INFO: 127.0.0.1:34156 - "GET /api/system-alerts HTTP/1.1" 200 OK
INFO: 127.0.0.1:34166 - "GET /api/logs?lines=50 HTTP/1.1" 200 OK
INFO: 127.0.0.1:34170 - "GET /api/model-usage-stats HTTP/1.1" 200 OK
INFO: 127.0.0.1:55924 - "GET / HTTP/1.1" 200 OK
INFO: Shutting down
INFO: ('127.0.0.1', 34134) - "WebSocket /ws" [accepted]
INFO: connection closed
INFO: 192.168.0.119:57578 - "GET /api/logs?lines=50 HTTP/1.1" 200 OK
INFO: 127.0.0.1:59496 - "GET /api/model-usage-stats HTTP/1.1" 200 OK
INFO: Waiting for connections to close. (CTRL+C to force quit)
브로드캐스트 오류: list.remove(x): x not in list
INFO: connection closed
INFO: connection closed
INFO: connection closed
INFO: connection closed
INFO: connection closed
INFO: connection closed
INFO: Waiting for application shutdown.
INFO: Application shutdown complete.
INFO: Finished server process [35583]

View File

@ -58,15 +58,15 @@
}
},
"api_stats": {
"total_requests": 33,
"successful_requests": 31,
"total_requests": 117,
"successful_requests": 115,
"failed_requests": 2,
"success_rate": 93.93939393939394,
"success_rate": 98.29059829059828,
"endpoint_usage": {
"GET /api/v1/health": 2,
"GET /health": 1,
"GET /api/v1/model": 15,
"POST /api/v1/inpaint": 15
"GET /api/v1/model": 57,
"POST /api/v1/inpaint": 57
},
"endpoint_stats": {
"GET /api/v1/health": {
@ -84,28 +84,28 @@
"current_concurrent": 0
},
"GET /api/v1/model": {
"count": 15,
"avg_time": 0.004577922821044922,
"min_time": 0.0023491382598876953,
"max_time": 0.007782697677612305,
"count": 57,
"avg_time": 0.003822560895953262,
"min_time": 0.001638650894165039,
"max_time": 0.00843501091003418,
"current_concurrent": 0
},
"POST /api/v1/inpaint": {
"count": 15,
"avg_time": 3.1524601936340333,
"min_time": 1.2617759704589844,
"count": 57,
"avg_time": 2.1760184974001167,
"min_time": 1.0825891494750977,
"max_time": 14.294722318649292,
"current_concurrent": 0
}
},
"average_response_time": 1.4353302897829,
"average_response_time": 1.0620621208451753,
"min_response_time": 0.000980377197265625,
"max_response_time": 14.294722318649292,
"current_concurrent": 0,
"max_concurrent": 1,
"requests_per_second": 0.09882737898988586,
"uptime": 333.9155640602112,
"requests_per_second": 0.14829152861107922,
"uptime": 788.9864046573639,
"recent_errors": []
},
"timestamp": 1756471060.3279347
"timestamp": 1756471515.3988512
}