diff --git a/.gitignore b/.gitignore index 3b9f2fa..fb47bbc 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,6 @@ Scripts/ pyvenv.cfg include/ share/ -pyvenv \ No newline at end of file +pyvenv +build/ +dist/ \ No newline at end of file diff --git a/Edit_PartTimer_log.log b/Edit_PartTimer_log.log new file mode 100644 index 0000000..ee0e635 --- /dev/null +++ b/Edit_PartTimer_log.log @@ -0,0 +1,839 @@ +[2025-11-21 16:06:06,497] [MainThread] [DEBUG] [image_processor3.py:__init__:57] tracemalloc 메모리 추적 시작 +[2025-11-21 16:06:06,504] [MainThread] [DEBUG] [gpu_utils.py:_setup_directml_environment:55] ✅ DirectML 환경 준비 완료 (Windows DirectX 12 기반) +[2025-11-21 16:06:06,504] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:79] === 🚀 DirectML GPU 상태 초기화 시작 🚀 === +[2025-11-21 16:06:06,504] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:80] 🎯 사용자 GPU 가속 요청: False +[2025-11-21 16:06:06,505] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:81] 💻 현재 운영체제: Windows +[2025-11-21 16:06:06,505] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:84] GPU 가속이 비활성화됨 (toggle_states['use_cuda'] = False) +[2025-11-21 16:06:06,505] [MainThread] [INFO] [gpu_utils.py:_set_safe_cpu_mode:157] 🔒 안전한 CPU 모드로 모든 GPU 설정 강제 비활성화 +[2025-11-21 16:06:06,505] [MainThread] [DEBUG] [image_processor3.py:__init__:79] 🔧 ImageProcessor3 GPU 상태 요약: +[2025-11-21 16:06:06,505] [MainThread] [DEBUG] [image_processor3.py:__init__:80] - CUDA 사용 가능: False +[2025-11-21 16:06:06,505] [MainThread] [DEBUG] [image_processor3.py:__init__:81] - toggle_states['use_cuda']: False +[2025-11-21 16:06:06,505] [MainThread] [DEBUG] [image_processor3.py:__init__:82] - GPU 하드웨어 정보: {} +[2025-11-21 16:06:06,505] [MainThread] [DEBUG] [image_processor3.py:__init__:84] ImageProcessor3 Init toggle_states: {'font_type': 'CustomFont', 'image_font_path': 'D:\\py\\img_worker\\modules\\fonts\\GmarketSansTTFMedium.ttf', 'ocr': True, 'force_cpu_ocr': True, 'use_cuda': False, 'inpaint_model': 'cv', 'TEMP_IMAGE_DIR': 'D:\\py\\img_worker\\modules\\test', 'output_image_format': 'jpg', 'watermark_toggle': False, 'store_ocr_data_to_db': False, 'ocr_engine': 'onnx'} +[2025-11-21 16:06:06,505] [MainThread] [DEBUG] [image_processor3.py:__init__:87] is_member_valid: True +[2025-11-21 16:06:06,506] [MainThread] [DEBUG] [image_processor3.py:__init__:144] debug_images 디렉토리 이미 존재: D:\py\img_worker\debug_images +[2025-11-21 16:06:06,506] [MainThread] [DEBUG] [image_processor3.py:__init__:152] self.font_path: D:\py\img_worker\modules\fonts\GmarketSansTTFMedium.ttf +[2025-11-21 16:06:06,506] [MainThread] [DEBUG] [image_processor3.py:__init__:154] toggle_states font_path: D:\py\img_worker\modules\fonts\GmarketSansTTFMedium.ttf +[2025-11-21 16:06:06,506] [MainThread] [DEBUG] [image_processor3.py:__init__:156] self.TEMP_IMAGE_DIR: D:\py\img_worker\modules\test +[2025-11-21 16:06:06,506] [MainThread] [DEBUG] [image_processor3.py:__init__:158] self.debugging_save_Dir: D:\py\img_worker\debug_images +[2025-11-21 16:06:06,506] [MainThread] [DEBUG] [image_processor3.py:__init__:160] self.unwanted_texts: [] +[2025-11-21 16:06:06,506] [MainThread] [DEBUG] [image_processor3.py:__init__:162] self.inpaint_method: migan +[2025-11-21 16:06:06,506] [MainThread] [DEBUG] [image_processor3.py:__init__:168] Image.MAX_IMAGE_PIXELS set to 20000000 +[2025-11-21 16:06:06,507] [MainThread] [DEBUG] [onnx_ocr_wrapper.py:_determine_model_type:447] ONNX 모델 타입 설정값: 자동 선택, GPU 정보: {} +[2025-11-21 16:06:06,507] [MainThread] [INFO] [onnx_ocr_wrapper.py:_determine_model_type:453] 자동 선택 모드: GPU 추천 모델 simp 사용 +[2025-11-21 16:06:06,507] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:324] ONNX OCR 모델 타입 결정: simp (GPU: False) +[2025-11-21 16:06:06,507] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:333] ONNX OCR 모듈 CPU 모드로 설정 +[2025-11-21 16:06:06,507] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:356] 🚀 ONNX TextSystem 초기화 시작 (CPU 모드) +[2025-11-21 16:06:06,508] [MainThread] [DEBUG] [onnx_ocr_wrapper.py:_initialize_onnx_system:539] 🚀 ONNX TextSystem 초기화 시작 (CPU 모드) +[2025-11-21 16:06:13,592] [MainThread] [ERROR] [onnx_ocr_wrapper.py:_initialize_onnx_system:747] ❌ ONNX TextSystem 초기화 실패: ONNX 모델 파일을 찾을 수 없습니다. 확인 경로: D:\py\img_worker\onnx_ocr_module\models +Traceback (most recent call last): + File "D:\py\img_worker\modules\onnx_ocr_module\src\onnx_ocr_wrapper.py", line 728, in _initialize_onnx_system + args = Args(self.onnx_module_dir, self.use_gpu, self.gpu_manager, self.model_type) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "D:\py\img_worker\modules\onnx_ocr_module\src\onnx_ocr_wrapper.py", line 578, in __init__ + raise FileNotFoundError(f"ONNX 모델 파일을 찾을 수 없습니다. 확인 경로: {models_dir}") +FileNotFoundError: ONNX 모델 파일을 찾을 수 없습니다. 확인 경로: D:\py\img_worker\onnx_ocr_module\models + +[2025-11-21 16:06:13,592] [MainThread] [WARNING] [onnx_ocr_wrapper.py:__init__:377] ONNX 초기화 1차 시도 실패: ONNX 모델 파일을 찾을 수 없습니다. 확인 경로: D:\py\img_worker\onnx_ocr_module\models +[2025-11-21 16:06:13,592] [MainThread] [ERROR] [onnx_ocr_wrapper.py:__init__:435] ❌ ONNX TextSystem 모든 초기화 시도 실패: 원본 설정 예외: ONNX 모델 파일을 찾을 수 없습니다. 확인 경로: D:\py\img_worker\onnx_ocr_module\models +[2025-11-21 16:06:13,595] [MainThread] [ERROR] [image_processor3.py:__init__:177] ❌ ONNX OCR 모듈 초기화 실패: ONNX TextSystem 모든 초기화 시도 실패: 원본 설정 예외: ONNX 모델 파일을 찾을 수 없습니다. 확인 경로: D:\py\img_worker\onnx_ocr_module\models +Traceback (most recent call last): + File "D:\py\img_worker\modules\image_processor3.py", line 174, in __init__ + self.ocr_module = Onnx_OCRModule(logger=self.logger, base_dir=self.base_dir, gpu_manager=self.gpu_manager, toggle_states=self.toggle_states) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "D:\py\img_worker\modules\onnx_ocr_module\src\onnx_ocr_wrapper.py", line 437, in __init__ + raise Exception(final_error) +Exception: ONNX TextSystem 모든 초기화 시도 실패: 원본 설정 예외: ONNX 모델 파일을 찾을 수 없습니다. 확인 경로: D:\py\img_worker\onnx_ocr_module\models + +[2025-11-21 16:06:13,595] [MainThread] [INFO] [mask_module_for_paddle.py:__init__:12] 마스크 모듈 초기화 완료 +[2025-11-21 16:06:13,595] [MainThread] [DEBUG] [image_processor3.py:__init__:216] MaskModule 초기화 성공 +[2025-11-21 16:06:13,595] [MainThread] [INFO] [text_rendering_module.py:__init__:21] 텍스트 렌더링 모듈 초기화 완료 +[2025-11-21 16:06:13,596] [MainThread] [INFO] [text_rendering_module.py:__init__:22] 기본 폰트: D:\py\img_worker\modules\fonts\GmarketSansTTFMedium.ttf +[2025-11-21 16:06:13,596] [MainThread] [DEBUG] [image_processor3.py:__init__:222] TextRenderingModule 초기화 성공 +[2025-11-21 16:06:13,597] [MainThread] [DEBUG] [postImageManager.py:font_load:40] 폰트 로드 성공: D:\py\img_worker\modules\fonts\GmarketSansTTFMedium.ttf +[2025-11-21 16:06:13,597] [MainThread] [DEBUG] [image_processor3.py:__init__:228] PostImageManager 초기화 성공 +[2025-11-21 16:06:13,597] [MainThread] [DEBUG] [request_inpaint.py:__init__:43] Request_AI_Server GPU 상태: CUDA 사용 가능=False +[2025-11-21 16:06:13,597] [MainThread] [DEBUG] [image_processor3.py:__init__:251] Request_AI_Server 초기화 성공 +[2025-11-21 16:06:13,598] [MainThread] [DEBUG] [image_processor3.py:__init__:258] GoogleTranslate 초기화 성공 +[2025-11-21 16:06:13,681] [MainThread] [DEBUG] [image_processor3.py:__init__:291] MIGAN 초기화 건너뜀: inpaint_method=request, local_inpaint_method=migan, migan_onnx_path=False +[2025-11-21 16:06:13,681] [MainThread] [INFO] [create_font_preview.py:main:107] 프리뷰 생성 시작: GmarketSansTTFMedium.ttf +[2025-11-21 16:06:13,682] [MainThread] [INFO] [create_font_preview.py:main:108] 저장 경로: D:\py\img_worker\modules\test +[2025-11-21 16:06:13,682] [MainThread] [DEBUG] [image_processor3.py:process_single_image:583] 이미지 번역시작 +[2025-11-21 16:06:13,682] [MainThread] [DEBUG] [image_processor3.py:process_single_image:585] toggle_states: {'font_type': 'CustomFont', 'image_font_path': 'D:\\py\\img_worker\\modules\\fonts\\GmarketSansTTFMedium.ttf', 'ocr': True, 'force_cpu_ocr': True, 'use_cuda': False, 'inpaint_model': 'cv', 'TEMP_IMAGE_DIR': 'D:\\py\\img_worker\\modules\\test', 'output_image_format': 'jpg', 'watermark_toggle': False, 'store_ocr_data_to_db': False, 'ocr_engine': 'onnx'} +[2025-11-21 16:06:13,859] [MainThread] [DEBUG] [image_processor3.py:process_single_image:603] 이미지 1 처리 시작: D:\py\img_worker\modules\fonts\ori.jpg - OCR+인페인팅 모드 +[2025-11-21 16:06:13,859] [MainThread] [DEBUG] [image_processor3.py:download_image:1191] 로컬 파일 경로 감지, 다운로드 생략: D:\py\img_worker\modules\fonts\ori.jpg +[2025-11-21 16:06:13,859] [MainThread] [DEBUG] [image_processor3.py:process_single_image:626] 옵션 이미지는 스케일 처리 건너뛰기: preview_GmarketSansTTFMedium +[2025-11-21 16:06:13,859] [MainThread] [DEBUG] [image_processor3.py:process_single_image:636] 이미지 1 로컬 저장위치(옵션 이미지 원본 유지): D:\py\img_worker\modules\fonts\ori.jpg +[2025-11-21 16:06:13,864] [MainThread] [WARNING] [image_processor3.py:safe_detect:1789] ⚠️ ONNX OCR 모듈이 초기화되지 않았습니다. 재초기화를 시도합니다. +[2025-11-21 16:06:13,864] [MainThread] [DEBUG] [image_processor3.py:reset_ocr_module:494] 🔄 OCR 모듈 재초기화 시작 +[2025-11-21 16:06:13,865] [MainThread] [DEBUG] [image_processor3.py:reset_ocr_module:499] 기존 OCR 모듈 참조 해제 완료 +[2025-11-21 16:06:13,930] [MainThread] [DEBUG] [image_processor3.py:reset_ocr_module:519] GC 실행 1: 10개 객체 정리 +[2025-11-21 16:06:14,059] [MainThread] [DEBUG] [onnx_ocr_wrapper.py:_determine_model_type:447] ONNX 모델 타입 설정값: 자동 선택, GPU 정보: {} +[2025-11-21 16:06:14,059] [MainThread] [INFO] [onnx_ocr_wrapper.py:_determine_model_type:453] 자동 선택 모드: GPU 추천 모델 simp 사용 +[2025-11-21 16:06:14,059] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:324] ONNX OCR 모델 타입 결정: simp (GPU: False) +[2025-11-21 16:06:14,059] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:333] ONNX OCR 모듈 CPU 모드로 설정 +[2025-11-21 16:06:14,059] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:356] 🚀 ONNX TextSystem 초기화 시작 (CPU 모드) +[2025-11-21 16:06:14,059] [MainThread] [DEBUG] [onnx_ocr_wrapper.py:_initialize_onnx_system:539] 🚀 ONNX TextSystem 초기화 시작 (CPU 모드) +[2025-11-21 16:06:14,061] [MainThread] [ERROR] [onnx_ocr_wrapper.py:_initialize_onnx_system:747] ❌ ONNX TextSystem 초기화 실패: ONNX 모델 파일을 찾을 수 없습니다. 확인 경로: D:\py\img_worker\onnx_ocr_module\models +Traceback (most recent call last): + File "D:\py\img_worker\modules\onnx_ocr_module\src\onnx_ocr_wrapper.py", line 728, in _initialize_onnx_system + args = Args(self.onnx_module_dir, self.use_gpu, self.gpu_manager, self.model_type) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "D:\py\img_worker\modules\onnx_ocr_module\src\onnx_ocr_wrapper.py", line 578, in __init__ + raise FileNotFoundError(f"ONNX 모델 파일을 찾을 수 없습니다. 확인 경로: {models_dir}") +FileNotFoundError: ONNX 모델 파일을 찾을 수 없습니다. 확인 경로: D:\py\img_worker\onnx_ocr_module\models + +[2025-11-21 16:06:14,061] [MainThread] [WARNING] [onnx_ocr_wrapper.py:__init__:377] ONNX 초기화 1차 시도 실패: ONNX 모델 파일을 찾을 수 없습니다. 확인 경로: D:\py\img_worker\onnx_ocr_module\models +[2025-11-21 16:06:14,061] [MainThread] [ERROR] [onnx_ocr_wrapper.py:__init__:435] ❌ ONNX TextSystem 모든 초기화 시도 실패: 원본 설정 예외: ONNX 모델 파일을 찾을 수 없습니다. 확인 경로: D:\py\img_worker\onnx_ocr_module\models +[2025-11-21 16:06:14,064] [MainThread] [ERROR] [image_processor3.py:reset_ocr_module:534] ❌ ONNX OCR 모듈 재초기화 중 오류: ONNX TextSystem 모든 초기화 시도 실패: 원본 설정 예외: ONNX 모델 파일을 찾을 수 없습니다. 확인 경로: D:\py\img_worker\onnx_ocr_module\models +Traceback (most recent call last): + File "D:\py\img_worker\modules\image_processor3.py", line 524, in reset_ocr_module + self.ocr_module = OCRModule( + ^^^^^^^^^^ + File "D:\py\img_worker\modules\onnx_ocr_module\src\onnx_ocr_wrapper.py", line 437, in __init__ + raise Exception(final_error) +Exception: ONNX TextSystem 모든 초기화 시도 실패: 원본 설정 예외: ONNX 모델 파일을 찾을 수 없습니다. 확인 경로: D:\py\img_worker\onnx_ocr_module\models + +[2025-11-21 16:06:14,064] [MainThread] [ERROR] [image_processor3.py:safe_detect:1795] ❌ ONNX OCR 모듈 재초기화 실패, 빈 결과 반환 +[2025-11-21 16:06:14,069] [MainThread] [INFO] [image_processor3.py:process_single_image:652] 메모리 변화 [OCR 처리]: 24179.4MB -> 24208.4MB (+29.0MB, +0.1%) - 이미지 1 +[2025-11-21 16:06:14,069] [MainThread] [DEBUG] [image_processor3.py:process_single_image:657] ocr_results: [] +[2025-11-21 16:06:14,094] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1105] 필터링 결과: 0/0개 (신뢰도 + & 중국어) +[2025-11-21 16:06:14,094] [MainThread] [DEBUG] [image_processor3.py:process_single_image:669] filter_ocr_results: [] +[2025-11-21 16:06:14,094] [MainThread] [WARNING] [image_processor3.py:process_single_image:674] ⚠️ OCR 모듈이 초기화되지 않아 원본 이미지 반환 +[2025-11-21 16:06:14,160] [MainThread] [DEBUG] [image_processor3.py:process_single_image:880] ⏱ 이미지 파이프라인 총 478.3ms | download=0.0ms | ocr=205.3ms +[2025-11-21 16:06:14,161] [MainThread] [ERROR] [create_font_preview.py:main:126] 프리뷰 생성 실패: {'status': 'original', 'path': 'D:\\py\\img_worker\\modules\\fonts\\ori.jpg', 'message': 'OCR 모듈 초기화 실패', 'inpaint_method': None, 'inpaint_device': None} +[2025-11-21 16:06:14,161] [MainThread] [DEBUG] [image_processor3.py:cleanup:443] OCR 모듈 정리 완료 +[2025-11-21 16:06:14,161] [MainThread] [DEBUG] [image_processor3.py:cleanup:451] 마스크 모듈 정리 완료 +[2025-11-21 16:06:14,228] [MainThread] [DEBUG] [image_processor3.py:cleanup:486] 임시 폴더 삭제됨: D:\py\img_worker\modules\test +[2025-11-21 16:06:14,291] [MainThread] [DEBUG] [image_processor3.py:cleanup:486] 임시 폴더 삭제됨: D:\py\img_worker\modules\test +[2025-11-21 16:06:14,292] [MainThread] [DEBUG] [image_processor3.py:__del__:434] 이미지 프로세서 소멸 +[2025-11-21 16:06:39,887] [MainThread] [DEBUG] [image_processor3.py:__init__:57] tracemalloc 메모리 추적 시작 +[2025-11-21 16:06:39,894] [MainThread] [DEBUG] [gpu_utils.py:_setup_directml_environment:55] ✅ DirectML 환경 준비 완료 (Windows DirectX 12 기반) +[2025-11-21 16:06:39,894] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:79] === 🚀 DirectML GPU 상태 초기화 시작 🚀 === +[2025-11-21 16:06:39,894] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:80] 🎯 사용자 GPU 가속 요청: False +[2025-11-21 16:06:39,894] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:81] 💻 현재 운영체제: Windows +[2025-11-21 16:06:39,894] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:84] GPU 가속이 비활성화됨 (toggle_states['use_cuda'] = False) +[2025-11-21 16:06:39,894] [MainThread] [INFO] [gpu_utils.py:_set_safe_cpu_mode:157] 🔒 안전한 CPU 모드로 모든 GPU 설정 강제 비활성화 +[2025-11-21 16:06:39,894] [MainThread] [DEBUG] [image_processor3.py:__init__:79] 🔧 ImageProcessor3 GPU 상태 요약: +[2025-11-21 16:06:39,894] [MainThread] [DEBUG] [image_processor3.py:__init__:80] - CUDA 사용 가능: False +[2025-11-21 16:06:39,895] [MainThread] [DEBUG] [image_processor3.py:__init__:81] - toggle_states['use_cuda']: False +[2025-11-21 16:06:39,895] [MainThread] [DEBUG] [image_processor3.py:__init__:82] - GPU 하드웨어 정보: {} +[2025-11-21 16:06:39,895] [MainThread] [DEBUG] [image_processor3.py:__init__:84] ImageProcessor3 Init toggle_states: {'font_type': 'CustomFont', 'image_font_path': 'D:\\py\\img_worker\\modules\\fonts\\GmarketSansTTFMedium.ttf', 'ocr': True, 'force_cpu_ocr': True, 'use_cuda': False, 'inpaint_model': 'cv', 'TEMP_IMAGE_DIR': 'D:\\py\\img_worker\\modules\\test', 'output_image_format': 'jpg', 'watermark_toggle': False, 'store_ocr_data_to_db': False, 'ocr_engine': 'onnx'} +[2025-11-21 16:06:39,895] [MainThread] [DEBUG] [image_processor3.py:__init__:87] is_member_valid: True +[2025-11-21 16:06:39,895] [MainThread] [DEBUG] [image_processor3.py:__init__:144] debug_images 디렉토리 이미 존재: D:\py\img_worker\modules\debug_images +[2025-11-21 16:06:39,895] [MainThread] [DEBUG] [image_processor3.py:__init__:152] self.font_path: D:\py\img_worker\modules\fonts\HakgyoansimDunggeunmisoTTFB.ttf +[2025-11-21 16:06:39,896] [MainThread] [DEBUG] [image_processor3.py:__init__:154] toggle_states font_path: D:\py\img_worker\modules\fonts\HakgyoansimDunggeunmisoTTFB.ttf +[2025-11-21 16:06:39,896] [MainThread] [DEBUG] [image_processor3.py:__init__:156] self.TEMP_IMAGE_DIR: D:\py\img_worker\modules\test +[2025-11-21 16:06:39,896] [MainThread] [DEBUG] [image_processor3.py:__init__:158] self.debugging_save_Dir: D:\py\img_worker\modules\debug_images +[2025-11-21 16:06:39,896] [MainThread] [DEBUG] [image_processor3.py:__init__:160] self.unwanted_texts: [] +[2025-11-21 16:06:39,896] [MainThread] [DEBUG] [image_processor3.py:__init__:162] self.inpaint_method: migan +[2025-11-21 16:06:39,896] [MainThread] [DEBUG] [image_processor3.py:__init__:168] Image.MAX_IMAGE_PIXELS set to 20000000 +[2025-11-21 16:06:39,896] [MainThread] [DEBUG] [onnx_ocr_wrapper.py:_determine_model_type:447] ONNX 모델 타입 설정값: 자동 선택, GPU 정보: {} +[2025-11-21 16:06:39,896] [MainThread] [INFO] [onnx_ocr_wrapper.py:_determine_model_type:453] 자동 선택 모드: GPU 추천 모델 simp 사용 +[2025-11-21 16:06:39,897] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:324] ONNX OCR 모델 타입 결정: simp (GPU: False) +[2025-11-21 16:06:39,897] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:333] ONNX OCR 모듈 CPU 모드로 설정 +[2025-11-21 16:06:39,897] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:356] 🚀 ONNX TextSystem 초기화 시작 (CPU 모드) +[2025-11-21 16:06:39,897] [MainThread] [DEBUG] [onnx_ocr_wrapper.py:_initialize_onnx_system:539] 🚀 ONNX TextSystem 초기화 시작 (CPU 모드) +[2025-11-21 16:06:45,837] [MainThread] [DEBUG] [onnx_ocr_wrapper.py:_ensure_utf8_encoding:487] 문자 사전 파일 UTF-8 확인 완료: D:\py\img_worker\modules\onnx_ocr_module\dict\ppocr_keys_v1.txt +[2025-11-21 16:06:45,945] [MainThread] [INFO] [onnx_ocr_wrapper.py:_initialize_onnx_system:743] ✅ ONNX TextSystem 초기화 완료 (CPU + SIMP (호환성) 모델) +[2025-11-21 16:06:45,946] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:363] ✅ ONNX TextSystem 초기화 완료 (CPU + SIMP 모델) +[2025-11-21 16:06:45,946] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:364] ✅ ONNX OCR 모듈 초기화 성공 (CPU 모드) +[2025-11-21 16:06:45,946] [MainThread] [INFO] [image_processor3.py:__init__:175] ✅ ONNX OCR 모듈 초기화 성공 +[2025-11-21 16:06:45,946] [MainThread] [INFO] [mask_module_for_paddle.py:__init__:12] 마스크 모듈 초기화 완료 +[2025-11-21 16:06:45,947] [MainThread] [DEBUG] [image_processor3.py:__init__:216] MaskModule 초기화 성공 +[2025-11-21 16:06:45,947] [MainThread] [INFO] [text_rendering_module.py:__init__:21] 텍스트 렌더링 모듈 초기화 완료 +[2025-11-21 16:06:45,947] [MainThread] [INFO] [text_rendering_module.py:__init__:22] 기본 폰트: D:\py\img_worker\modules\fonts\HakgyoansimDunggeunmisoTTFB.ttf +[2025-11-21 16:06:45,947] [MainThread] [DEBUG] [image_processor3.py:__init__:222] TextRenderingModule 초기화 성공 +[2025-11-21 16:06:45,948] [MainThread] [DEBUG] [postImageManager.py:font_load:40] 폰트 로드 성공: D:\py\img_worker\modules\fonts\HakgyoansimDunggeunmisoTTFB.ttf +[2025-11-21 16:06:45,948] [MainThread] [DEBUG] [image_processor3.py:__init__:228] PostImageManager 초기화 성공 +[2025-11-21 16:06:45,948] [MainThread] [DEBUG] [request_inpaint.py:__init__:43] Request_AI_Server GPU 상태: CUDA 사용 가능=False +[2025-11-21 16:06:45,948] [MainThread] [DEBUG] [image_processor3.py:__init__:251] Request_AI_Server 초기화 성공 +[2025-11-21 16:06:45,949] [MainThread] [DEBUG] [image_processor3.py:__init__:258] GoogleTranslate 초기화 성공 +[2025-11-21 16:06:45,950] [MainThread] [DEBUG] [image_processor3.py:__init__:291] MIGAN 초기화 건너뜀: inpaint_method=request, local_inpaint_method=migan, migan_onnx_path=False +[2025-11-21 16:06:45,950] [MainThread] [INFO] [create_font_preview.py:main:107] 프리뷰 생성 시작: GmarketSansTTFMedium.ttf +[2025-11-21 16:06:45,950] [MainThread] [INFO] [create_font_preview.py:main:108] 저장 경로: D:\py\img_worker\modules\test +[2025-11-21 16:06:45,950] [MainThread] [DEBUG] [image_processor3.py:process_single_image:583] 이미지 번역시작 +[2025-11-21 16:06:45,950] [MainThread] [DEBUG] [image_processor3.py:process_single_image:585] toggle_states: {'font_type': 'CustomFont', 'image_font_path': 'D:\\py\\img_worker\\modules\\fonts\\HakgyoansimDunggeunmisoTTFB.ttf', 'ocr': True, 'force_cpu_ocr': True, 'use_cuda': False, 'inpaint_model': 'cv', 'TEMP_IMAGE_DIR': 'D:\\py\\img_worker\\modules\\test', 'output_image_format': 'jpg', 'watermark_toggle': False, 'store_ocr_data_to_db': False, 'ocr_engine': 'onnx'} +[2025-11-21 16:06:46,348] [MainThread] [DEBUG] [image_processor3.py:process_single_image:603] 이미지 1 처리 시작: D:\py\img_worker\modules\fonts\ori.jpg - OCR+인페인팅 모드 +[2025-11-21 16:06:46,349] [MainThread] [DEBUG] [image_processor3.py:download_image:1191] 로컬 파일 경로 감지, 다운로드 생략: D:\py\img_worker\modules\fonts\ori.jpg +[2025-11-21 16:06:46,349] [MainThread] [DEBUG] [image_processor3.py:process_single_image:626] 옵션 이미지는 스케일 처리 건너뛰기: preview_GmarketSansTTFMedium +[2025-11-21 16:06:46,349] [MainThread] [DEBUG] [image_processor3.py:process_single_image:636] 이미지 1 로컬 저장위치(옵션 이미지 원본 유지): D:\py\img_worker\modules\fonts\ori.jpg +[2025-11-21 16:06:46,360] [MainThread] [INFO] [onnx_ocr_wrapper.py:detect_text:838] 🔍 ONNX OCR 감지 방식: polygon +[2025-11-21 16:06:46,545] [MainThread] [INFO] [onnx_ocr_wrapper.py:detect_text:906] ⚡ ONNX OCR 추론 완료: 183.6ms +[2025-11-21 16:06:46,545] [MainThread] [INFO] [onnx_ocr_wrapper.py:detect_text:907] 📊 세부 시간 - 감지: 98.3ms, 인식: 76.4ms, 분류: 4.0ms +[2025-11-21 16:06:46,553] [MainThread] [INFO] [image_processor3.py:process_single_image:652] 메모리 변화 [OCR 처리]: 23699.2MB -> 23840.5MB (+141.3MB, +0.6%) - 이미지 1 +[2025-11-21 16:06:46,556] [MainThread] [DEBUG] [image_processor3.py:process_single_image:657] ocr_results: [{'text': '现代极简风格', 'confidence': 0.9946680068969727, 'polygon': [[222.0, 70.0], [552.0, 70.0], [552.0, 118.0], [222.0, 118.0]], 'bbox': (222, 70, 331, 49), 'method': 'polygon'}, {'text': '更易搭配各种使用场景', 'confidence': 0.9957253336906433, 'polygon': [[152.0, 141.0], [622.0, 141.0], [622.0, 180.0], [152.0, 180.0]], 'bbox': (152, 141, 471, 40), 'method': 'polygon'}, {'text': '半圆两端设计', 'confidence': 0.9974236488342285, 'polygon': [[88.0, 289.0], [463.0, 289.0], [463.0, 345.0], [88.0, 345.0]], 'bbox': (88, 289, 376, 57), 'method': 'polygon'}, {'text': '承载各种欢乐', 'confidence': 0.9939405918121338, 'polygon': [[87.0, 369.0], [462.0, 369.0], [462.0, 425.0], [87.0, 425.0]], 'bbox': (87, 369, 376, 57), 'method': 'polygon'}] +[2025-11-21 16:06:46,579] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1101] [필터링] 포함 (신뢰도 99.5%): '现代极简风格' +[2025-11-21 16:06:46,579] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1101] [필터링] 포함 (신뢰도 99.6%): '更易搭配各种使用场景' +[2025-11-21 16:06:46,580] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1101] [필터링] 포함 (신뢰도 99.7%): '半圆两端设计' +[2025-11-21 16:06:46,580] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1101] [필터링] 포함 (신뢰도 99.4%): '承载各种欢乐' +[2025-11-21 16:06:46,580] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1105] 필터링 결과: 4/4개 (신뢰도 + & 중국어) +[2025-11-21 16:06:46,582] [MainThread] [DEBUG] [image_processor3.py:process_single_image:669] filter_ocr_results: [{'text': '现代极简风格', 'confidence': 0.9946680068969727, 'polygon': [[222.0, 70.0], [552.0, 70.0], [552.0, 118.0], [222.0, 118.0]], 'bbox': (222, 70, 331, 49), 'method': 'polygon'}, {'text': '更易搭配各种使用场景', 'confidence': 0.9957253336906433, 'polygon': [[152.0, 141.0], [622.0, 141.0], [622.0, 180.0], [152.0, 180.0]], 'bbox': (152, 141, 471, 40), 'method': 'polygon'}, {'text': '半圆两端设计', 'confidence': 0.9974236488342285, 'polygon': [[88.0, 289.0], [463.0, 289.0], [463.0, 345.0], [88.0, 345.0]], 'bbox': (88, 289, 376, 57), 'method': 'polygon'}, {'text': '承载各种欢乐', 'confidence': 0.9939405918121338, 'polygon': [[87.0, 369.0], [462.0, 369.0], [462.0, 425.0], [87.0, 425.0]], 'bbox': (87, 369, 376, 57), 'method': 'polygon'}] +[2025-11-21 16:06:46,582] [MainThread] [INFO] [onnx_ocr_wrapper.py:filter_chinese_text:1192] 중국어 텍스트 4개 필터링 완료 +[2025-11-21 16:06:46,582] [MainThread] [INFO] [onnx_ocr_wrapper.py:filter_korean_text:1213] 한글 텍스트 0개 필터링 완료 +[2025-11-21 16:06:46,600] [MainThread] [DEBUG] [image_processor3.py:process_single_image:727] translated_texts: ['现代极简风格', '更易搭配各种使用场景', '半圆两端设计', '承载各种欢乐'] +[2025-11-21 16:06:46,600] [MainThread] [DEBUG] [image_processor3.py:process_single_image:728] 마스크 생성 완료 +[2025-11-21 16:06:46,600] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1312] [치환 처리 1] 원본 텍스트: '现代极简风格' +[2025-11-21 16:06:46,600] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1316] [치환 처리 1] 분리된 단어: ['现代极简风格'] +[2025-11-21 16:06:46,605] [MainThread] [ERROR] [image_processor3.py:process_single_image:836] 이미지 1 처리 중 오류: 'list' object has no attribute 'items' +Traceback (most recent call last): + File "D:\py\img_worker\modules\image_processor3.py", line 732, in process_single_image + filtered_translated_texts = self.process_translated_texts(translated_texts, local_image_path, index) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "D:\py\img_worker\modules\image_processor3.py", line 1325, in process_translated_texts + for origin, replace in self.unwanted_texts.items(): + ^^^^^^^^^^^^^^^^^^^^^^^^^ +AttributeError: 'list' object has no attribute 'items' + +[2025-11-21 16:06:46,655] [MainThread] [DEBUG] [image_processor3.py:process_single_image:880] ⏱ 이미지 파이프라인 총 704.5ms | download=0.0ms | ocr=200.0ms | translate=16.7ms | mask=16.7ms +[2025-11-21 16:06:46,656] [MainThread] [ERROR] [create_font_preview.py:main:126] 프리뷰 생성 실패: {'status': 'failed', 'path': 'D:\\py\\img_worker\\modules\\fonts\\ori.jpg', 'error': "'list' object has no attribute 'items'", 'inpaint_method': None, 'inpaint_device': None} +[2025-11-21 16:06:46,666] [MainThread] [DEBUG] [image_processor3.py:cleanup:443] OCR 모듈 정리 완료 +[2025-11-21 16:06:46,666] [MainThread] [DEBUG] [image_processor3.py:cleanup:451] 마스크 모듈 정리 완료 +[2025-11-21 16:06:46,718] [MainThread] [DEBUG] [image_processor3.py:cleanup:486] 임시 폴더 삭제됨: D:\py\img_worker\modules\test +[2025-11-21 16:06:46,756] [MainThread] [DEBUG] [image_processor3.py:cleanup:486] 임시 폴더 삭제됨: D:\py\img_worker\modules\test +[2025-11-21 16:06:46,756] [MainThread] [DEBUG] [image_processor3.py:__del__:434] 이미지 프로세서 소멸 +[2025-11-21 16:08:12,401] [MainThread] [DEBUG] [image_processor3.py:__init__:57] tracemalloc 메모리 추적 시작 +[2025-11-21 16:08:12,408] [MainThread] [DEBUG] [gpu_utils.py:_setup_directml_environment:55] ✅ DirectML 환경 준비 완료 (Windows DirectX 12 기반) +[2025-11-21 16:08:12,408] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:79] === 🚀 DirectML GPU 상태 초기화 시작 🚀 === +[2025-11-21 16:08:12,408] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:80] 🎯 사용자 GPU 가속 요청: False +[2025-11-21 16:08:12,408] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:81] 💻 현재 운영체제: Windows +[2025-11-21 16:08:12,409] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:84] GPU 가속이 비활성화됨 (toggle_states['use_cuda'] = False) +[2025-11-21 16:08:12,409] [MainThread] [INFO] [gpu_utils.py:_set_safe_cpu_mode:157] 🔒 안전한 CPU 모드로 모든 GPU 설정 강제 비활성화 +[2025-11-21 16:08:12,409] [MainThread] [DEBUG] [image_processor3.py:__init__:79] 🔧 ImageProcessor3 GPU 상태 요약: +[2025-11-21 16:08:12,409] [MainThread] [DEBUG] [image_processor3.py:__init__:80] - CUDA 사용 가능: False +[2025-11-21 16:08:12,409] [MainThread] [DEBUG] [image_processor3.py:__init__:81] - toggle_states['use_cuda']: False +[2025-11-21 16:08:12,409] [MainThread] [DEBUG] [image_processor3.py:__init__:82] - GPU 하드웨어 정보: {} +[2025-11-21 16:08:12,409] [MainThread] [DEBUG] [image_processor3.py:__init__:84] ImageProcessor3 Init toggle_states: {'font_type': 'CustomFont', 'image_font_path': 'D:\\py\\img_worker\\modules\\fonts\\GmarketSansTTFMedium.ttf', 'ocr': True, 'force_cpu_ocr': True, 'use_cuda': False, 'inpaint_model': 'cv', 'TEMP_IMAGE_DIR': 'D:\\py\\img_worker\\modules\\test', 'output_image_format': 'jpg', 'watermark_toggle': False, 'store_ocr_data_to_db': False, 'ocr_engine': 'onnx'} +[2025-11-21 16:08:12,409] [MainThread] [DEBUG] [image_processor3.py:__init__:87] is_member_valid: True +[2025-11-21 16:08:12,410] [MainThread] [DEBUG] [image_processor3.py:__init__:144] debug_images 디렉토리 이미 존재: D:\py\img_worker\modules\debug_images +[2025-11-21 16:08:12,410] [MainThread] [DEBUG] [image_processor3.py:__init__:152] self.font_path: D:\py\img_worker\modules\fonts\HakgyoansimDunggeunmisoTTFB.ttf +[2025-11-21 16:08:12,410] [MainThread] [DEBUG] [image_processor3.py:__init__:154] toggle_states font_path: D:\py\img_worker\modules\fonts\HakgyoansimDunggeunmisoTTFB.ttf +[2025-11-21 16:08:12,410] [MainThread] [DEBUG] [image_processor3.py:__init__:156] self.TEMP_IMAGE_DIR: D:\py\img_worker\modules\test +[2025-11-21 16:08:12,410] [MainThread] [DEBUG] [image_processor3.py:__init__:158] self.debugging_save_Dir: D:\py\img_worker\modules\debug_images +[2025-11-21 16:08:12,410] [MainThread] [DEBUG] [image_processor3.py:__init__:160] self.unwanted_texts: [] +[2025-11-21 16:08:12,410] [MainThread] [DEBUG] [image_processor3.py:__init__:162] self.inpaint_method: migan +[2025-11-21 16:08:12,410] [MainThread] [DEBUG] [image_processor3.py:__init__:168] Image.MAX_IMAGE_PIXELS set to 20000000 +[2025-11-21 16:08:12,411] [MainThread] [DEBUG] [onnx_ocr_wrapper.py:_determine_model_type:447] ONNX 모델 타입 설정값: 자동 선택, GPU 정보: {} +[2025-11-21 16:08:12,411] [MainThread] [INFO] [onnx_ocr_wrapper.py:_determine_model_type:453] 자동 선택 모드: GPU 추천 모델 simp 사용 +[2025-11-21 16:08:12,411] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:324] ONNX OCR 모델 타입 결정: simp (GPU: False) +[2025-11-21 16:08:12,411] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:333] ONNX OCR 모듈 CPU 모드로 설정 +[2025-11-21 16:08:12,411] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:356] 🚀 ONNX TextSystem 초기화 시작 (CPU 모드) +[2025-11-21 16:08:12,411] [MainThread] [DEBUG] [onnx_ocr_wrapper.py:_initialize_onnx_system:539] 🚀 ONNX TextSystem 초기화 시작 (CPU 모드) +[2025-11-21 16:08:18,150] [MainThread] [DEBUG] [onnx_ocr_wrapper.py:_ensure_utf8_encoding:487] 문자 사전 파일 UTF-8 확인 완료: D:\py\img_worker\modules\onnx_ocr_module\dict\ppocr_keys_v1.txt +[2025-11-21 16:08:18,233] [MainThread] [INFO] [onnx_ocr_wrapper.py:_initialize_onnx_system:743] ✅ ONNX TextSystem 초기화 완료 (CPU + SIMP (호환성) 모델) +[2025-11-21 16:08:18,233] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:363] ✅ ONNX TextSystem 초기화 완료 (CPU + SIMP 모델) +[2025-11-21 16:08:18,234] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:364] ✅ ONNX OCR 모듈 초기화 성공 (CPU 모드) +[2025-11-21 16:08:18,234] [MainThread] [INFO] [image_processor3.py:__init__:175] ✅ ONNX OCR 모듈 초기화 성공 +[2025-11-21 16:08:18,234] [MainThread] [INFO] [mask_module_for_paddle.py:__init__:12] 마스크 모듈 초기화 완료 +[2025-11-21 16:08:18,234] [MainThread] [DEBUG] [image_processor3.py:__init__:216] MaskModule 초기화 성공 +[2025-11-21 16:08:18,235] [MainThread] [INFO] [text_rendering_module.py:__init__:21] 텍스트 렌더링 모듈 초기화 완료 +[2025-11-21 16:08:18,235] [MainThread] [INFO] [text_rendering_module.py:__init__:22] 기본 폰트: D:\py\img_worker\modules\fonts\HakgyoansimDunggeunmisoTTFB.ttf +[2025-11-21 16:08:18,235] [MainThread] [DEBUG] [image_processor3.py:__init__:222] TextRenderingModule 초기화 성공 +[2025-11-21 16:08:18,235] [MainThread] [DEBUG] [postImageManager.py:font_load:40] 폰트 로드 성공: D:\py\img_worker\modules\fonts\HakgyoansimDunggeunmisoTTFB.ttf +[2025-11-21 16:08:18,235] [MainThread] [DEBUG] [image_processor3.py:__init__:228] PostImageManager 초기화 성공 +[2025-11-21 16:08:18,235] [MainThread] [DEBUG] [request_inpaint.py:__init__:43] Request_AI_Server GPU 상태: CUDA 사용 가능=False +[2025-11-21 16:08:18,236] [MainThread] [DEBUG] [image_processor3.py:__init__:251] Request_AI_Server 초기화 성공 +[2025-11-21 16:08:18,236] [MainThread] [DEBUG] [image_processor3.py:__init__:258] GoogleTranslate 초기화 성공 +[2025-11-21 16:08:18,237] [MainThread] [DEBUG] [image_processor3.py:__init__:291] MIGAN 초기화 건너뜀: inpaint_method=request, local_inpaint_method=migan, migan_onnx_path=False +[2025-11-21 16:08:18,237] [MainThread] [INFO] [create_font_preview.py:main:81] 프리뷰 생성 시작: GmarketSansTTFMedium.ttf +[2025-11-21 16:08:18,237] [MainThread] [INFO] [create_font_preview.py:main:82] 저장 경로: D:\py\img_worker\modules\test +[2025-11-21 16:08:18,237] [MainThread] [DEBUG] [image_processor3.py:process_single_image:583] 이미지 번역시작 +[2025-11-21 16:08:18,237] [MainThread] [DEBUG] [image_processor3.py:process_single_image:585] toggle_states: {'font_type': 'CustomFont', 'image_font_path': 'D:\\py\\img_worker\\modules\\fonts\\HakgyoansimDunggeunmisoTTFB.ttf', 'ocr': True, 'force_cpu_ocr': True, 'use_cuda': False, 'inpaint_model': 'cv', 'TEMP_IMAGE_DIR': 'D:\\py\\img_worker\\modules\\test', 'output_image_format': 'jpg', 'watermark_toggle': False, 'store_ocr_data_to_db': False, 'ocr_engine': 'onnx'} +[2025-11-21 16:08:18,691] [MainThread] [DEBUG] [image_processor3.py:process_single_image:603] 이미지 1 처리 시작: D:\py\img_worker\modules\fonts\ori.jpg - OCR+인페인팅 모드 +[2025-11-21 16:08:18,691] [MainThread] [DEBUG] [image_processor3.py:download_image:1191] 로컬 파일 경로 감지, 다운로드 생략: D:\py\img_worker\modules\fonts\ori.jpg +[2025-11-21 16:08:18,691] [MainThread] [DEBUG] [image_processor3.py:process_single_image:626] 옵션 이미지는 스케일 처리 건너뛰기: preview_GmarketSansTTFMedium +[2025-11-21 16:08:18,691] [MainThread] [DEBUG] [image_processor3.py:process_single_image:636] 이미지 1 로컬 저장위치(옵션 이미지 원본 유지): D:\py\img_worker\modules\fonts\ori.jpg +[2025-11-21 16:08:18,699] [MainThread] [INFO] [onnx_ocr_wrapper.py:detect_text:838] 🔍 ONNX OCR 감지 방식: polygon +[2025-11-21 16:08:18,870] [MainThread] [INFO] [onnx_ocr_wrapper.py:detect_text:906] ⚡ ONNX OCR 추론 완료: 170.5ms +[2025-11-21 16:08:18,870] [MainThread] [INFO] [onnx_ocr_wrapper.py:detect_text:907] 📊 세부 시간 - 감지: 90.0ms, 인식: 72.5ms, 분류: 3.0ms +[2025-11-21 16:08:18,878] [MainThread] [INFO] [image_processor3.py:process_single_image:652] 메모리 변화 [OCR 처리]: 24234.4MB -> 24398.8MB (+164.3MB, +0.7%) - 이미지 1 +[2025-11-21 16:08:18,881] [MainThread] [DEBUG] [image_processor3.py:process_single_image:657] ocr_results: [{'text': '现代极简风格', 'confidence': 0.9946680068969727, 'polygon': [[222.0, 70.0], [552.0, 70.0], [552.0, 118.0], [222.0, 118.0]], 'bbox': (222, 70, 331, 49), 'method': 'polygon'}, {'text': '更易搭配各种使用场景', 'confidence': 0.9957253336906433, 'polygon': [[152.0, 141.0], [622.0, 141.0], [622.0, 180.0], [152.0, 180.0]], 'bbox': (152, 141, 471, 40), 'method': 'polygon'}, {'text': '半圆两端设计', 'confidence': 0.9974236488342285, 'polygon': [[88.0, 289.0], [463.0, 289.0], [463.0, 345.0], [88.0, 345.0]], 'bbox': (88, 289, 376, 57), 'method': 'polygon'}, {'text': '承载各种欢乐', 'confidence': 0.9939405918121338, 'polygon': [[87.0, 369.0], [462.0, 369.0], [462.0, 425.0], [87.0, 425.0]], 'bbox': (87, 369, 376, 57), 'method': 'polygon'}] +[2025-11-21 16:08:18,904] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1101] [필터링] 포함 (신뢰도 99.5%): '现代极简风格' +[2025-11-21 16:08:18,904] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1101] [필터링] 포함 (신뢰도 99.6%): '更易搭配各种使用场景' +[2025-11-21 16:08:18,904] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1101] [필터링] 포함 (신뢰도 99.7%): '半圆两端设计' +[2025-11-21 16:08:18,904] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1101] [필터링] 포함 (신뢰도 99.4%): '承载各种欢乐' +[2025-11-21 16:08:18,904] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1105] 필터링 결과: 4/4개 (신뢰도 + & 중국어) +[2025-11-21 16:08:18,906] [MainThread] [DEBUG] [image_processor3.py:process_single_image:669] filter_ocr_results: [{'text': '现代极简风格', 'confidence': 0.9946680068969727, 'polygon': [[222.0, 70.0], [552.0, 70.0], [552.0, 118.0], [222.0, 118.0]], 'bbox': (222, 70, 331, 49), 'method': 'polygon'}, {'text': '更易搭配各种使用场景', 'confidence': 0.9957253336906433, 'polygon': [[152.0, 141.0], [622.0, 141.0], [622.0, 180.0], [152.0, 180.0]], 'bbox': (152, 141, 471, 40), 'method': 'polygon'}, {'text': '半圆两端设计', 'confidence': 0.9974236488342285, 'polygon': [[88.0, 289.0], [463.0, 289.0], [463.0, 345.0], [88.0, 345.0]], 'bbox': (88, 289, 376, 57), 'method': 'polygon'}, {'text': '承载各种欢乐', 'confidence': 0.9939405918121338, 'polygon': [[87.0, 369.0], [462.0, 369.0], [462.0, 425.0], [87.0, 425.0]], 'bbox': (87, 369, 376, 57), 'method': 'polygon'}] +[2025-11-21 16:08:18,907] [MainThread] [INFO] [onnx_ocr_wrapper.py:filter_chinese_text:1192] 중국어 텍스트 4개 필터링 완료 +[2025-11-21 16:08:18,907] [MainThread] [INFO] [onnx_ocr_wrapper.py:filter_korean_text:1213] 한글 텍스트 0개 필터링 완료 +[2025-11-21 16:08:20,406] [MainThread] [DEBUG] [image_processor3.py:process_single_image:727] translated_texts: ['모던한 미니멀 스타일', '다양한 사용 시나리오에 더 쉽게 일치', '반원형 끝 디자인', '온갖 기쁨을 안고'] +[2025-11-21 16:08:20,407] [MainThread] [DEBUG] [image_processor3.py:process_single_image:728] 마스크 생성 완료 +[2025-11-21 16:08:20,407] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1312] [치환 처리 1] 원본 텍스트: '모던한 미니멀 스타일' +[2025-11-21 16:08:20,407] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1316] [치환 처리 1] 분리된 단어: ['모던한', '미니멀', '스타일'] +[2025-11-21 16:08:20,411] [MainThread] [ERROR] [image_processor3.py:process_single_image:836] 이미지 1 처리 중 오류: 'list' object has no attribute 'items' +Traceback (most recent call last): + File "D:\py\img_worker\modules\image_processor3.py", line 732, in process_single_image + filtered_translated_texts = self.process_translated_texts(translated_texts, local_image_path, index) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "D:\py\img_worker\modules\image_processor3.py", line 1325, in process_translated_texts + for origin, replace in self.unwanted_texts.items(): + ^^^^^^^^^^^^^^^^^^^^^^^^^ +AttributeError: 'list' object has no attribute 'items' + +[2025-11-21 16:08:20,477] [MainThread] [DEBUG] [image_processor3.py:process_single_image:880] ⏱ 이미지 파이프라인 총 2239.3ms | download=0.0ms | ocr=183.5ms | translate=1498.5ms | mask=1498.5ms +[2025-11-21 16:08:20,477] [MainThread] [ERROR] [create_font_preview.py:main:101] 프리뷰 생성 실패: {'status': 'failed', 'path': 'D:\\py\\img_worker\\modules\\fonts\\ori.jpg', 'error': "'list' object has no attribute 'items'", 'inpaint_method': None, 'inpaint_device': None} +[2025-11-21 16:08:20,488] [MainThread] [DEBUG] [image_processor3.py:cleanup:443] OCR 모듈 정리 완료 +[2025-11-21 16:08:20,488] [MainThread] [DEBUG] [image_processor3.py:cleanup:451] 마스크 모듈 정리 완료 +[2025-11-21 16:08:20,553] [MainThread] [DEBUG] [image_processor3.py:cleanup:486] 임시 폴더 삭제됨: D:\py\img_worker\modules\test +[2025-11-21 16:08:20,613] [MainThread] [DEBUG] [image_processor3.py:cleanup:486] 임시 폴더 삭제됨: D:\py\img_worker\modules\test +[2025-11-21 16:08:20,613] [MainThread] [DEBUG] [image_processor3.py:__del__:434] 이미지 프로세서 소멸 +[2025-11-21 16:08:38,275] [MainThread] [DEBUG] [image_processor3.py:__init__:57] tracemalloc 메모리 추적 시작 +[2025-11-21 16:08:38,281] [MainThread] [DEBUG] [gpu_utils.py:_setup_directml_environment:55] ✅ DirectML 환경 준비 완료 (Windows DirectX 12 기반) +[2025-11-21 16:08:38,281] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:79] === 🚀 DirectML GPU 상태 초기화 시작 🚀 === +[2025-11-21 16:08:38,282] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:80] 🎯 사용자 GPU 가속 요청: False +[2025-11-21 16:08:38,282] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:81] 💻 현재 운영체제: Windows +[2025-11-21 16:08:38,282] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:84] GPU 가속이 비활성화됨 (toggle_states['use_cuda'] = False) +[2025-11-21 16:08:38,282] [MainThread] [INFO] [gpu_utils.py:_set_safe_cpu_mode:157] 🔒 안전한 CPU 모드로 모든 GPU 설정 강제 비활성화 +[2025-11-21 16:08:38,282] [MainThread] [DEBUG] [image_processor3.py:__init__:79] 🔧 ImageProcessor3 GPU 상태 요약: +[2025-11-21 16:08:38,282] [MainThread] [DEBUG] [image_processor3.py:__init__:80] - CUDA 사용 가능: False +[2025-11-21 16:08:38,282] [MainThread] [DEBUG] [image_processor3.py:__init__:81] - toggle_states['use_cuda']: False +[2025-11-21 16:08:38,283] [MainThread] [DEBUG] [image_processor3.py:__init__:82] - GPU 하드웨어 정보: {} +[2025-11-21 16:08:38,283] [MainThread] [DEBUG] [image_processor3.py:__init__:84] ImageProcessor3 Init toggle_states: {'font_type': 'CustomFont', 'image_font_path': 'D:\\py\\img_worker\\modules\\fonts\\GmarketSansTTFMedium.ttf', 'ocr': True, 'force_cpu_ocr': True, 'use_cuda': False, 'inpaint_model': 'cv', 'TEMP_IMAGE_DIR': 'D:\\py\\img_worker\\modules\\test', 'output_image_format': 'jpg', 'watermark_toggle': False, 'store_ocr_data_to_db': False, 'ocr_engine': 'onnx'} +[2025-11-21 16:08:38,283] [MainThread] [DEBUG] [image_processor3.py:__init__:87] is_member_valid: True +[2025-11-21 16:08:38,283] [MainThread] [DEBUG] [image_processor3.py:__init__:144] debug_images 디렉토리 이미 존재: D:\py\img_worker\modules\debug_images +[2025-11-21 16:08:38,283] [MainThread] [DEBUG] [image_processor3.py:__init__:152] self.font_path: D:\py\img_worker\modules\fonts\HakgyoansimDunggeunmisoTTFB.ttf +[2025-11-21 16:08:38,283] [MainThread] [DEBUG] [image_processor3.py:__init__:154] toggle_states font_path: D:\py\img_worker\modules\fonts\HakgyoansimDunggeunmisoTTFB.ttf +[2025-11-21 16:08:38,283] [MainThread] [DEBUG] [image_processor3.py:__init__:156] self.TEMP_IMAGE_DIR: D:\py\img_worker\modules\test +[2025-11-21 16:08:38,283] [MainThread] [DEBUG] [image_processor3.py:__init__:158] self.debugging_save_Dir: D:\py\img_worker\modules\debug_images +[2025-11-21 16:08:38,284] [MainThread] [DEBUG] [image_processor3.py:__init__:160] self.unwanted_texts: {} +[2025-11-21 16:08:38,284] [MainThread] [DEBUG] [image_processor3.py:__init__:162] self.inpaint_method: migan +[2025-11-21 16:08:38,284] [MainThread] [DEBUG] [image_processor3.py:__init__:168] Image.MAX_IMAGE_PIXELS set to 20000000 +[2025-11-21 16:08:38,284] [MainThread] [DEBUG] [onnx_ocr_wrapper.py:_determine_model_type:447] ONNX 모델 타입 설정값: 자동 선택, GPU 정보: {} +[2025-11-21 16:08:38,284] [MainThread] [INFO] [onnx_ocr_wrapper.py:_determine_model_type:453] 자동 선택 모드: GPU 추천 모델 simp 사용 +[2025-11-21 16:08:38,284] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:324] ONNX OCR 모델 타입 결정: simp (GPU: False) +[2025-11-21 16:08:38,284] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:333] ONNX OCR 모듈 CPU 모드로 설정 +[2025-11-21 16:08:38,285] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:356] 🚀 ONNX TextSystem 초기화 시작 (CPU 모드) +[2025-11-21 16:08:38,285] [MainThread] [DEBUG] [onnx_ocr_wrapper.py:_initialize_onnx_system:539] 🚀 ONNX TextSystem 초기화 시작 (CPU 모드) +[2025-11-21 16:08:44,128] [MainThread] [DEBUG] [onnx_ocr_wrapper.py:_ensure_utf8_encoding:487] 문자 사전 파일 UTF-8 확인 완료: D:\py\img_worker\modules\onnx_ocr_module\dict\ppocr_keys_v1.txt +[2025-11-21 16:08:44,211] [MainThread] [INFO] [onnx_ocr_wrapper.py:_initialize_onnx_system:743] ✅ ONNX TextSystem 초기화 완료 (CPU + SIMP (호환성) 모델) +[2025-11-21 16:08:44,211] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:363] ✅ ONNX TextSystem 초기화 완료 (CPU + SIMP 모델) +[2025-11-21 16:08:44,211] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:364] ✅ ONNX OCR 모듈 초기화 성공 (CPU 모드) +[2025-11-21 16:08:44,212] [MainThread] [INFO] [image_processor3.py:__init__:175] ✅ ONNX OCR 모듈 초기화 성공 +[2025-11-21 16:08:44,212] [MainThread] [INFO] [mask_module_for_paddle.py:__init__:12] 마스크 모듈 초기화 완료 +[2025-11-21 16:08:44,212] [MainThread] [DEBUG] [image_processor3.py:__init__:216] MaskModule 초기화 성공 +[2025-11-21 16:08:44,212] [MainThread] [INFO] [text_rendering_module.py:__init__:21] 텍스트 렌더링 모듈 초기화 완료 +[2025-11-21 16:08:44,212] [MainThread] [INFO] [text_rendering_module.py:__init__:22] 기본 폰트: D:\py\img_worker\modules\fonts\HakgyoansimDunggeunmisoTTFB.ttf +[2025-11-21 16:08:44,212] [MainThread] [DEBUG] [image_processor3.py:__init__:222] TextRenderingModule 초기화 성공 +[2025-11-21 16:08:44,213] [MainThread] [DEBUG] [postImageManager.py:font_load:40] 폰트 로드 성공: D:\py\img_worker\modules\fonts\HakgyoansimDunggeunmisoTTFB.ttf +[2025-11-21 16:08:44,213] [MainThread] [DEBUG] [image_processor3.py:__init__:228] PostImageManager 초기화 성공 +[2025-11-21 16:08:44,213] [MainThread] [DEBUG] [request_inpaint.py:__init__:43] Request_AI_Server GPU 상태: CUDA 사용 가능=False +[2025-11-21 16:08:44,214] [MainThread] [DEBUG] [image_processor3.py:__init__:251] Request_AI_Server 초기화 성공 +[2025-11-21 16:08:44,214] [MainThread] [DEBUG] [image_processor3.py:__init__:258] GoogleTranslate 초기화 성공 +[2025-11-21 16:08:44,215] [MainThread] [DEBUG] [image_processor3.py:__init__:291] MIGAN 초기화 건너뜀: inpaint_method=request, local_inpaint_method=migan, migan_onnx_path=False +[2025-11-21 16:08:44,215] [MainThread] [INFO] [create_font_preview.py:main:81] 프리뷰 생성 시작: GmarketSansTTFMedium.ttf +[2025-11-21 16:08:44,215] [MainThread] [INFO] [create_font_preview.py:main:82] 저장 경로: D:\py\img_worker\modules\test +[2025-11-21 16:08:44,215] [MainThread] [DEBUG] [image_processor3.py:process_single_image:583] 이미지 번역시작 +[2025-11-21 16:08:44,215] [MainThread] [DEBUG] [image_processor3.py:process_single_image:585] toggle_states: {'font_type': 'CustomFont', 'image_font_path': 'D:\\py\\img_worker\\modules\\fonts\\HakgyoansimDunggeunmisoTTFB.ttf', 'ocr': True, 'force_cpu_ocr': True, 'use_cuda': False, 'inpaint_model': 'cv', 'TEMP_IMAGE_DIR': 'D:\\py\\img_worker\\modules\\test', 'output_image_format': 'jpg', 'watermark_toggle': False, 'store_ocr_data_to_db': False, 'ocr_engine': 'onnx'} +[2025-11-21 16:08:44,617] [MainThread] [DEBUG] [image_processor3.py:process_single_image:603] 이미지 1 처리 시작: D:\py\img_worker\modules\fonts\ori.jpg - OCR+인페인팅 모드 +[2025-11-21 16:08:44,617] [MainThread] [DEBUG] [image_processor3.py:download_image:1191] 로컬 파일 경로 감지, 다운로드 생략: D:\py\img_worker\modules\fonts\ori.jpg +[2025-11-21 16:08:44,617] [MainThread] [DEBUG] [image_processor3.py:process_single_image:626] 옵션 이미지는 스케일 처리 건너뛰기: preview_GmarketSansTTFMedium +[2025-11-21 16:08:44,617] [MainThread] [DEBUG] [image_processor3.py:process_single_image:636] 이미지 1 로컬 저장위치(옵션 이미지 원본 유지): D:\py\img_worker\modules\fonts\ori.jpg +[2025-11-21 16:08:44,626] [MainThread] [INFO] [onnx_ocr_wrapper.py:detect_text:838] 🔍 ONNX OCR 감지 방식: polygon +[2025-11-21 16:08:44,796] [MainThread] [INFO] [onnx_ocr_wrapper.py:detect_text:906] ⚡ ONNX OCR 추론 완료: 170.1ms +[2025-11-21 16:08:44,796] [MainThread] [INFO] [onnx_ocr_wrapper.py:detect_text:907] 📊 세부 시간 - 감지: 91.0ms, 인식: 69.1ms, 분류: 3.0ms +[2025-11-21 16:08:44,804] [MainThread] [INFO] [image_processor3.py:process_single_image:652] 메모리 변화 [OCR 처리]: 24348.8MB -> 24506.2MB (+157.4MB, +0.6%) - 이미지 1 +[2025-11-21 16:08:44,807] [MainThread] [DEBUG] [image_processor3.py:process_single_image:657] ocr_results: [{'text': '现代极简风格', 'confidence': 0.9946680068969727, 'polygon': [[222.0, 70.0], [552.0, 70.0], [552.0, 118.0], [222.0, 118.0]], 'bbox': (222, 70, 331, 49), 'method': 'polygon'}, {'text': '更易搭配各种使用场景', 'confidence': 0.9957253336906433, 'polygon': [[152.0, 141.0], [622.0, 141.0], [622.0, 180.0], [152.0, 180.0]], 'bbox': (152, 141, 471, 40), 'method': 'polygon'}, {'text': '半圆两端设计', 'confidence': 0.9974236488342285, 'polygon': [[88.0, 289.0], [463.0, 289.0], [463.0, 345.0], [88.0, 345.0]], 'bbox': (88, 289, 376, 57), 'method': 'polygon'}, {'text': '承载各种欢乐', 'confidence': 0.9939405918121338, 'polygon': [[87.0, 369.0], [462.0, 369.0], [462.0, 425.0], [87.0, 425.0]], 'bbox': (87, 369, 376, 57), 'method': 'polygon'}] +[2025-11-21 16:08:44,830] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1101] [필터링] 포함 (신뢰도 99.5%): '现代极简风格' +[2025-11-21 16:08:44,831] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1101] [필터링] 포함 (신뢰도 99.6%): '更易搭配各种使用场景' +[2025-11-21 16:08:44,831] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1101] [필터링] 포함 (신뢰도 99.7%): '半圆两端设计' +[2025-11-21 16:08:44,831] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1101] [필터링] 포함 (신뢰도 99.4%): '承载各种欢乐' +[2025-11-21 16:08:44,831] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1105] 필터링 결과: 4/4개 (신뢰도 + & 중국어) +[2025-11-21 16:08:44,833] [MainThread] [DEBUG] [image_processor3.py:process_single_image:669] filter_ocr_results: [{'text': '现代极简风格', 'confidence': 0.9946680068969727, 'polygon': [[222.0, 70.0], [552.0, 70.0], [552.0, 118.0], [222.0, 118.0]], 'bbox': (222, 70, 331, 49), 'method': 'polygon'}, {'text': '更易搭配各种使用场景', 'confidence': 0.9957253336906433, 'polygon': [[152.0, 141.0], [622.0, 141.0], [622.0, 180.0], [152.0, 180.0]], 'bbox': (152, 141, 471, 40), 'method': 'polygon'}, {'text': '半圆两端设计', 'confidence': 0.9974236488342285, 'polygon': [[88.0, 289.0], [463.0, 289.0], [463.0, 345.0], [88.0, 345.0]], 'bbox': (88, 289, 376, 57), 'method': 'polygon'}, {'text': '承载各种欢乐', 'confidence': 0.9939405918121338, 'polygon': [[87.0, 369.0], [462.0, 369.0], [462.0, 425.0], [87.0, 425.0]], 'bbox': (87, 369, 376, 57), 'method': 'polygon'}] +[2025-11-21 16:08:44,833] [MainThread] [INFO] [onnx_ocr_wrapper.py:filter_chinese_text:1192] 중국어 텍스트 4개 필터링 완료 +[2025-11-21 16:08:44,833] [MainThread] [INFO] [onnx_ocr_wrapper.py:filter_korean_text:1213] 한글 텍스트 0개 필터링 완료 +[2025-11-21 16:08:45,288] [MainThread] [DEBUG] [image_processor3.py:process_single_image:727] translated_texts: ['모던한 미니멀 스타일', '다양한 사용 시나리오에 더 쉽게 일치', '반원형 끝 디자인', '온갖 기쁨을 안고'] +[2025-11-21 16:08:45,288] [MainThread] [DEBUG] [image_processor3.py:process_single_image:728] 마스크 생성 완료 +[2025-11-21 16:08:45,288] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1312] [치환 처리 1] 원본 텍스트: '모던한 미니멀 스타일' +[2025-11-21 16:08:45,288] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1316] [치환 처리 1] 분리된 단어: ['모던한', '미니멀', '스타일'] +[2025-11-21 16:08:45,289] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1357] [치환 처리 1] 변경 없음: '모던한 미니멀 스타일' +[2025-11-21 16:08:45,289] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1312] [치환 처리 2] 원본 텍스트: '다양한 사용 시나리오에 더 쉽게 일치' +[2025-11-21 16:08:45,289] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1316] [치환 처리 2] 분리된 단어: ['다양한', '사용', '시나리오에', '더', '쉽게', '일치'] +[2025-11-21 16:08:45,289] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1357] [치환 처리 2] 변경 없음: '다양한 사용 시나리오에 더 쉽게 일치' +[2025-11-21 16:08:45,289] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1312] [치환 처리 3] 원본 텍스트: '반원형 끝 디자인' +[2025-11-21 16:08:45,289] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1316] [치환 처리 3] 분리된 단어: ['반원형', '끝', '디자인'] +[2025-11-21 16:08:45,289] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1357] [치환 처리 3] 변경 없음: '반원형 끝 디자인' +[2025-11-21 16:08:45,290] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1312] [치환 처리 4] 원본 텍스트: '온갖 기쁨을 안고' +[2025-11-21 16:08:45,290] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1316] [치환 처리 4] 분리된 단어: ['온갖', '기쁨을', '안고'] +[2025-11-21 16:08:45,290] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1357] [치환 처리 4] 변경 없음: '온갖 기쁨을 안고' +[2025-11-21 16:08:45,290] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1359] 전체 치환 결과: 4개 텍스트 처리 완료 +[2025-11-21 16:08:45,290] [MainThread] [DEBUG] [image_processor3.py:process_single_image:737] 이미지 1 치환됨 +[2025-11-21 16:08:45,290] [MainThread] [INFO] [image_processor3.py:process_single_image:753] [inpaint_model 강제] cv → inpaint_method=cv +[2025-11-21 16:08:45,290] [MainThread] [DEBUG] [image_processor3.py:process_single_image:787] ocr_count: 4 +[2025-11-21 16:08:45,291] [MainThread] [DEBUG] [image_processor3.py:process_single_image:788] is_member_valid: True +[2025-11-21 16:08:45,295] [MainThread] [DEBUG] [image_processor3.py:_try_migan_inpaint:1039] MIGAN 모듈이 초기화되지 않아 건너뜀 +[2025-11-21 16:08:45,298] [MainThread] [DEBUG] [image_processor3.py:execute_inpaint_with_fallback:966] 메모리 변화 [인페인팅]: 24493.0MB -> 24493.0MB (+0.0MB, +0.0%) - 방법: migan +[2025-11-21 16:08:45,298] [MainThread] [DEBUG] [image_processor3.py:process_single_image:799] 인페인팅 완료 +[2025-11-21 16:08:45,298] [MainThread] [WARNING] [image_processor3.py:process_single_image:810] 인페인팅 실패, 원본 이미지 사용 +[2025-11-21 16:08:45,359] [MainThread] [DEBUG] [image_processor3.py:process_single_image:821] 텍스트 렌더링 완료 +[2025-11-21 16:08:45,359] [MainThread] [DEBUG] [image_processor3.py:postProcess_and_save_image:1144] watermark_text: 이미지 저작권 보유 +[2025-11-21 16:08:45,360] [MainThread] [DEBUG] [image_processor3.py:postProcess_and_save_image:1145] is_watermark_enabled: True +[2025-11-21 16:08:45,369] [MainThread] [INFO] [postImageManager.py:save_image_to_path:101] 이미지 저장 완료 : D:\py\img_worker\modules\test\translated_preview_GmarketSansTTFMedium_img_1.jpg +[2025-11-21 16:08:45,369] [MainThread] [DEBUG] [image_processor3.py:process_single_image:827] 이미지 1 번역 완료: D:\py\img_worker\modules\test\translated_preview_GmarketSansTTFMedium_img_1.jpg +[2025-11-21 16:08:45,433] [MainThread] [DEBUG] [image_processor3.py:process_single_image:880] ⏱ 이미지 파이프라인 총 1216.3ms | download=0.0ms | ocr=183.1ms | translate=454.9ms | mask=454.9ms | inpaint=7.0ms | render=56.7ms | save=9.7ms +[2025-11-21 16:08:45,433] [MainThread] [INFO] [create_font_preview.py:main:98] 프리뷰 생성 성공: D:\py\img_worker\modules\test\translated_preview_GmarketSansTTFMedium_img_1.jpg +[2025-11-21 16:08:45,443] [MainThread] [DEBUG] [image_processor3.py:cleanup:443] OCR 모듈 정리 완료 +[2025-11-21 16:08:45,443] [MainThread] [DEBUG] [image_processor3.py:cleanup:451] 마스크 모듈 정리 완료 +[2025-11-21 16:08:45,509] [MainThread] [DEBUG] [image_processor3.py:cleanup:486] 임시 폴더 삭제됨: D:\py\img_worker\modules\test +[2025-11-21 16:08:45,563] [MainThread] [DEBUG] [image_processor3.py:cleanup:486] 임시 폴더 삭제됨: D:\py\img_worker\modules\test +[2025-11-21 16:08:45,563] [MainThread] [DEBUG] [image_processor3.py:__del__:434] 이미지 프로세서 소멸 +[2025-11-21 16:14:30,071] [MainThread] [DEBUG] [image_processor3.py:__init__:57] tracemalloc 메모리 추적 시작 +[2025-11-21 16:14:30,076] [MainThread] [DEBUG] [gpu_utils.py:_setup_directml_environment:55] ✅ DirectML 환경 준비 완료 (Windows DirectX 12 기반) +[2025-11-21 16:14:30,077] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:79] === 🚀 DirectML GPU 상태 초기화 시작 🚀 === +[2025-11-21 16:14:30,077] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:80] 🎯 사용자 GPU 가속 요청: False +[2025-11-21 16:14:30,077] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:81] 💻 현재 운영체제: Windows +[2025-11-21 16:14:30,077] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:84] GPU 가속이 비활성화됨 (toggle_states['use_cuda'] = False) +[2025-11-21 16:14:30,077] [MainThread] [INFO] [gpu_utils.py:_set_safe_cpu_mode:157] 🔒 안전한 CPU 모드로 모든 GPU 설정 강제 비활성화 +[2025-11-21 16:14:30,077] [MainThread] [DEBUG] [image_processor3.py:__init__:79] 🔧 ImageProcessor3 GPU 상태 요약: +[2025-11-21 16:14:30,077] [MainThread] [DEBUG] [image_processor3.py:__init__:80] - CUDA 사용 가능: False +[2025-11-21 16:14:30,077] [MainThread] [DEBUG] [image_processor3.py:__init__:81] - toggle_states['use_cuda']: False +[2025-11-21 16:14:30,078] [MainThread] [DEBUG] [image_processor3.py:__init__:82] - GPU 하드웨어 정보: {} +[2025-11-21 16:14:30,078] [MainThread] [DEBUG] [image_processor3.py:__init__:84] ImageProcessor3 Init toggle_states: {'font_type': 'CustomFont', 'image_font_path': 'D:\\py\\img_worker\\modules\\fonts\\GmarketSansTTFMedium.ttf', 'ocr': True, 'force_cpu_ocr': True, 'use_cuda': False, 'inpaint_model': 'migan', 'local_inpaint_method': 'migan', 'migan_onnx_path': 'D:\\py\\img_worker\\modules\\migan_onnx\\migan_pipeline_v2.onnx', 'migan_use_accel': False, 'migan_provider_override': 'cpu', 'detail_IMGTrans_type': 'CPU', 'optionIMGTrans_type': 'CPU', 'thumb_trans_type': 'CPU', 'TEMP_IMAGE_DIR': 'D:\\py\\img_worker\\modules\\test', 'output_image_format': 'jpg', 'watermark_toggle': False, 'store_ocr_data_to_db': False, 'ocr_engine': 'onnx'} +[2025-11-21 16:14:30,078] [MainThread] [DEBUG] [image_processor3.py:__init__:87] is_member_valid: True +[2025-11-21 16:14:30,078] [MainThread] [DEBUG] [image_processor3.py:__init__:144] debug_images 디렉토리 이미 존재: D:\py\img_worker\modules\debug_images +[2025-11-21 16:14:30,078] [MainThread] [DEBUG] [image_processor3.py:__init__:152] self.font_path: D:\py\img_worker\modules\fonts\HakgyoansimDunggeunmisoTTFB.ttf +[2025-11-21 16:14:30,078] [MainThread] [DEBUG] [image_processor3.py:__init__:154] toggle_states font_path: D:\py\img_worker\modules\fonts\HakgyoansimDunggeunmisoTTFB.ttf +[2025-11-21 16:14:30,078] [MainThread] [DEBUG] [image_processor3.py:__init__:156] self.TEMP_IMAGE_DIR: D:\py\img_worker\modules\test +[2025-11-21 16:14:30,078] [MainThread] [DEBUG] [image_processor3.py:__init__:158] self.debugging_save_Dir: D:\py\img_worker\modules\debug_images +[2025-11-21 16:14:30,079] [MainThread] [DEBUG] [image_processor3.py:__init__:160] self.unwanted_texts: {} +[2025-11-21 16:14:30,079] [MainThread] [DEBUG] [image_processor3.py:__init__:162] self.inpaint_method: migan +[2025-11-21 16:14:30,079] [MainThread] [DEBUG] [image_processor3.py:__init__:168] Image.MAX_IMAGE_PIXELS set to 20000000 +[2025-11-21 16:14:30,079] [MainThread] [DEBUG] [onnx_ocr_wrapper.py:_determine_model_type:447] ONNX 모델 타입 설정값: 자동 선택, GPU 정보: {} +[2025-11-21 16:14:30,079] [MainThread] [INFO] [onnx_ocr_wrapper.py:_determine_model_type:453] 자동 선택 모드: GPU 추천 모델 simp 사용 +[2025-11-21 16:14:30,079] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:324] ONNX OCR 모델 타입 결정: simp (GPU: False) +[2025-11-21 16:14:30,079] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:333] ONNX OCR 모듈 CPU 모드로 설정 +[2025-11-21 16:14:30,080] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:356] 🚀 ONNX TextSystem 초기화 시작 (CPU 모드) +[2025-11-21 16:14:30,080] [MainThread] [DEBUG] [onnx_ocr_wrapper.py:_initialize_onnx_system:539] 🚀 ONNX TextSystem 초기화 시작 (CPU 모드) +[2025-11-21 16:14:36,039] [MainThread] [DEBUG] [onnx_ocr_wrapper.py:_ensure_utf8_encoding:487] 문자 사전 파일 UTF-8 확인 완료: D:\py\img_worker\modules\onnx_ocr_module\dict\ppocr_keys_v1.txt +[2025-11-21 16:14:36,122] [MainThread] [INFO] [onnx_ocr_wrapper.py:_initialize_onnx_system:743] ✅ ONNX TextSystem 초기화 완료 (CPU + SIMP (호환성) 모델) +[2025-11-21 16:14:36,122] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:363] ✅ ONNX TextSystem 초기화 완료 (CPU + SIMP 모델) +[2025-11-21 16:14:36,122] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:364] ✅ ONNX OCR 모듈 초기화 성공 (CPU 모드) +[2025-11-21 16:14:36,123] [MainThread] [INFO] [image_processor3.py:__init__:175] ✅ ONNX OCR 모듈 초기화 성공 +[2025-11-21 16:14:36,123] [MainThread] [INFO] [mask_module_for_paddle.py:__init__:12] 마스크 모듈 초기화 완료 +[2025-11-21 16:14:36,123] [MainThread] [DEBUG] [image_processor3.py:__init__:216] MaskModule 초기화 성공 +[2025-11-21 16:14:36,123] [MainThread] [INFO] [text_rendering_module.py:__init__:21] 텍스트 렌더링 모듈 초기화 완료 +[2025-11-21 16:14:36,123] [MainThread] [INFO] [text_rendering_module.py:__init__:22] 기본 폰트: D:\py\img_worker\modules\fonts\HakgyoansimDunggeunmisoTTFB.ttf +[2025-11-21 16:14:36,123] [MainThread] [DEBUG] [image_processor3.py:__init__:222] TextRenderingModule 초기화 성공 +[2025-11-21 16:14:36,124] [MainThread] [DEBUG] [postImageManager.py:font_load:40] 폰트 로드 성공: D:\py\img_worker\modules\fonts\HakgyoansimDunggeunmisoTTFB.ttf +[2025-11-21 16:14:36,124] [MainThread] [DEBUG] [image_processor3.py:__init__:228] PostImageManager 초기화 성공 +[2025-11-21 16:14:36,124] [MainThread] [DEBUG] [request_inpaint.py:__init__:43] Request_AI_Server GPU 상태: CUDA 사용 가능=False +[2025-11-21 16:14:36,124] [MainThread] [DEBUG] [image_processor3.py:__init__:251] Request_AI_Server 초기화 성공 +[2025-11-21 16:14:36,124] [MainThread] [DEBUG] [image_processor3.py:__init__:258] GoogleTranslate 초기화 성공 +[2025-11-21 16:14:36,125] [MainThread] [DEBUG] [image_processor3.py:__init__:284] MIGAN CUDA 사용 불가 - CPU 모드로 설정 +[2025-11-21 16:14:36,126] [MainThread] [DEBUG] [image_processor3.py:__init__:286] [MIGAN] GPU 관리자 전달: GPUManager, can_use_cuda: False +[2025-11-21 16:14:36,126] [MainThread] [DEBUG] [migan_module.py:_get_or_create_session:166] [MIGAN] GPU 관리자 사용 가능: False +[2025-11-21 16:14:36,126] [MainThread] [DEBUG] [migan_module.py:_get_or_create_session:186] [MIGAN] CPU 전용 모드 +[2025-11-21 16:14:36,126] [MainThread] [DEBUG] [migan_module.py:_get_or_create_session:188] [MIGAN] 최종 providers: [('CPUExecutionProvider', {})] +[2025-11-21 16:14:36,126] [MainThread] [DEBUG] [migan_module.py:_get_or_create_session:204] [MIGAN] CPU 전용 시도: [('CPUExecutionProvider', {})] +[2025-11-21 16:14:36,212] [MainThread] [INFO] [migan_module.py:_get_or_create_session:207] [MIGAN] CPU 전용 성공! 실제 providers: ['CPUExecutionProvider'] +[2025-11-21 16:14:36,212] [MainThread] [DEBUG] [migan_module.py:__init__:115] [MIGAN] 입력 0: image, 형태: ['batch_size', 3, 'height', 'width'], 타입: tensor(uint8) +[2025-11-21 16:14:36,213] [MainThread] [DEBUG] [migan_module.py:__init__:115] [MIGAN] 입력 1: mask, 형태: ['batch_size', 1, 'height', 'width'], 타입: tensor(uint8) +[2025-11-21 16:14:36,213] [MainThread] [DEBUG] [migan_module.py:__init__:117] [MIGAN] 출력 0: result, 형태: ['ScatterNDresult_dim_0', 3, 'ScatterNDresult_dim_2', 'ScatterNDresult_dim_3'], 타입: tensor(uint8) +[2025-11-21 16:14:36,213] [MainThread] [DEBUG] [migan_module.py:__init__:119] [MIGAN] 세션 준비 완료. providers=['CPUExecutionProvider'] +[2025-11-21 16:14:36,213] [MainThread] [DEBUG] [migan_module.py:build_migan_from_toggle:348] [MIGAN] GPU 관리자 연결 완료: GPUManager +[2025-11-21 16:14:36,213] [MainThread] [DEBUG] [migan_module.py:build_migan_from_toggle:355] [MIGAN] 파이프라인 gpu_manager 속성: True, 값: +[2025-11-21 16:14:36,213] [MainThread] [DEBUG] [image_processor3.py:__init__:288] [MIGAN] 초기화 완료: gpu_manager 속성=True, 값= +[2025-11-21 16:14:36,213] [MainThread] [INFO] [create_font_preview.py:main:98] 프리뷰 생성 시작: GmarketSansTTFMedium.ttf +[2025-11-21 16:14:36,214] [MainThread] [INFO] [create_font_preview.py:main:99] 저장 경로: D:\py\img_worker\modules\test +[2025-11-21 16:14:36,214] [MainThread] [DEBUG] [image_processor3.py:process_single_image:583] 이미지 번역시작 +[2025-11-21 16:14:36,214] [MainThread] [DEBUG] [image_processor3.py:process_single_image:585] toggle_states: {'font_type': 'CustomFont', 'image_font_path': 'D:\\py\\img_worker\\modules\\fonts\\HakgyoansimDunggeunmisoTTFB.ttf', 'ocr': True, 'force_cpu_ocr': True, 'use_cuda': False, 'inpaint_model': 'migan', 'local_inpaint_method': 'migan', 'migan_onnx_path': 'D:\\py\\img_worker\\modules\\migan_onnx\\migan_pipeline_v2.onnx', 'migan_use_accel': False, 'migan_provider_override': 'cpu', 'detail_IMGTrans_type': 'CPU', 'optionIMGTrans_type': 'CPU', 'thumb_trans_type': 'CPU', 'TEMP_IMAGE_DIR': 'D:\\py\\img_worker\\modules\\test', 'output_image_format': 'jpg', 'watermark_toggle': False, 'store_ocr_data_to_db': False, 'ocr_engine': 'onnx'} +[2025-11-21 16:14:36,685] [MainThread] [DEBUG] [image_processor3.py:process_single_image:603] 이미지 1 처리 시작: D:\py\img_worker\modules\fonts\ori.jpg - OCR+인페인팅 모드 +[2025-11-21 16:14:36,685] [MainThread] [DEBUG] [image_processor3.py:download_image:1191] 로컬 파일 경로 감지, 다운로드 생략: D:\py\img_worker\modules\fonts\ori.jpg +[2025-11-21 16:14:36,685] [MainThread] [DEBUG] [image_processor3.py:process_single_image:626] 옵션 이미지는 스케일 처리 건너뛰기: preview_GmarketSansTTFMedium +[2025-11-21 16:14:36,685] [MainThread] [DEBUG] [image_processor3.py:process_single_image:636] 이미지 1 로컬 저장위치(옵션 이미지 원본 유지): D:\py\img_worker\modules\fonts\ori.jpg +[2025-11-21 16:14:36,694] [MainThread] [INFO] [onnx_ocr_wrapper.py:detect_text:838] 🔍 ONNX OCR 감지 방식: polygon +[2025-11-21 16:14:36,863] [MainThread] [INFO] [onnx_ocr_wrapper.py:detect_text:906] ⚡ ONNX OCR 추론 완료: 168.9ms +[2025-11-21 16:14:36,864] [MainThread] [INFO] [onnx_ocr_wrapper.py:detect_text:907] 📊 세부 시간 - 감지: 94.0ms, 인식: 69.0ms, 분류: 3.0ms +[2025-11-21 16:14:36,871] [MainThread] [INFO] [image_processor3.py:process_single_image:652] 메모리 변화 [OCR 처리]: 24549.9MB -> 24676.9MB (+127.1MB, +0.5%) - 이미지 1 +[2025-11-21 16:14:36,874] [MainThread] [DEBUG] [image_processor3.py:process_single_image:657] ocr_results: [{'text': '现代极简风格', 'confidence': 0.9946680068969727, 'polygon': [[222.0, 70.0], [552.0, 70.0], [552.0, 118.0], [222.0, 118.0]], 'bbox': (222, 70, 331, 49), 'method': 'polygon'}, {'text': '更易搭配各种使用场景', 'confidence': 0.9957253336906433, 'polygon': [[152.0, 141.0], [622.0, 141.0], [622.0, 180.0], [152.0, 180.0]], 'bbox': (152, 141, 471, 40), 'method': 'polygon'}, {'text': '半圆两端设计', 'confidence': 0.9974236488342285, 'polygon': [[88.0, 289.0], [463.0, 289.0], [463.0, 345.0], [88.0, 345.0]], 'bbox': (88, 289, 376, 57), 'method': 'polygon'}, {'text': '承载各种欢乐', 'confidence': 0.9939405918121338, 'polygon': [[87.0, 369.0], [462.0, 369.0], [462.0, 425.0], [87.0, 425.0]], 'bbox': (87, 369, 376, 57), 'method': 'polygon'}] +[2025-11-21 16:14:36,898] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1101] [필터링] 포함 (신뢰도 99.5%): '现代极简风格' +[2025-11-21 16:14:36,898] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1101] [필터링] 포함 (신뢰도 99.6%): '更易搭配各种使用场景' +[2025-11-21 16:14:36,898] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1101] [필터링] 포함 (신뢰도 99.7%): '半圆两端设计' +[2025-11-21 16:14:36,898] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1101] [필터링] 포함 (신뢰도 99.4%): '承载各种欢乐' +[2025-11-21 16:14:36,899] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1105] 필터링 결과: 4/4개 (신뢰도 + & 중국어) +[2025-11-21 16:14:36,901] [MainThread] [DEBUG] [image_processor3.py:process_single_image:669] filter_ocr_results: [{'text': '现代极简风格', 'confidence': 0.9946680068969727, 'polygon': [[222.0, 70.0], [552.0, 70.0], [552.0, 118.0], [222.0, 118.0]], 'bbox': (222, 70, 331, 49), 'method': 'polygon'}, {'text': '更易搭配各种使用场景', 'confidence': 0.9957253336906433, 'polygon': [[152.0, 141.0], [622.0, 141.0], [622.0, 180.0], [152.0, 180.0]], 'bbox': (152, 141, 471, 40), 'method': 'polygon'}, {'text': '半圆两端设计', 'confidence': 0.9974236488342285, 'polygon': [[88.0, 289.0], [463.0, 289.0], [463.0, 345.0], [88.0, 345.0]], 'bbox': (88, 289, 376, 57), 'method': 'polygon'}, {'text': '承载各种欢乐', 'confidence': 0.9939405918121338, 'polygon': [[87.0, 369.0], [462.0, 369.0], [462.0, 425.0], [87.0, 425.0]], 'bbox': (87, 369, 376, 57), 'method': 'polygon'}] +[2025-11-21 16:14:36,901] [MainThread] [INFO] [onnx_ocr_wrapper.py:filter_chinese_text:1192] 중국어 텍스트 4개 필터링 완료 +[2025-11-21 16:14:36,901] [MainThread] [INFO] [onnx_ocr_wrapper.py:filter_korean_text:1213] 한글 텍스트 0개 필터링 완료 +[2025-11-21 16:14:38,782] [MainThread] [DEBUG] [image_processor3.py:process_single_image:727] translated_texts: ['모던한 미니멀 스타일', '다양한 사용 시나리오에 더 쉽게 일치', '반원형 끝 디자인', '온갖 기쁨을 안고'] +[2025-11-21 16:14:38,783] [MainThread] [DEBUG] [image_processor3.py:process_single_image:728] 마스크 생성 완료 +[2025-11-21 16:14:38,783] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1312] [치환 처리 1] 원본 텍스트: '모던한 미니멀 스타일' +[2025-11-21 16:14:38,783] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1316] [치환 처리 1] 분리된 단어: ['모던한', '미니멀', '스타일'] +[2025-11-21 16:14:38,783] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1357] [치환 처리 1] 변경 없음: '모던한 미니멀 스타일' +[2025-11-21 16:14:38,783] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1312] [치환 처리 2] 원본 텍스트: '다양한 사용 시나리오에 더 쉽게 일치' +[2025-11-21 16:14:38,783] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1316] [치환 처리 2] 분리된 단어: ['다양한', '사용', '시나리오에', '더', '쉽게', '일치'] +[2025-11-21 16:14:38,783] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1357] [치환 처리 2] 변경 없음: '다양한 사용 시나리오에 더 쉽게 일치' +[2025-11-21 16:14:38,784] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1312] [치환 처리 3] 원본 텍스트: '반원형 끝 디자인' +[2025-11-21 16:14:38,784] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1316] [치환 처리 3] 분리된 단어: ['반원형', '끝', '디자인'] +[2025-11-21 16:14:38,784] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1357] [치환 처리 3] 변경 없음: '반원형 끝 디자인' +[2025-11-21 16:14:38,784] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1312] [치환 처리 4] 원본 텍스트: '온갖 기쁨을 안고' +[2025-11-21 16:14:38,784] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1316] [치환 처리 4] 분리된 단어: ['온갖', '기쁨을', '안고'] +[2025-11-21 16:14:38,784] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1357] [치환 처리 4] 변경 없음: '온갖 기쁨을 안고' +[2025-11-21 16:14:38,784] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1359] 전체 치환 결과: 4개 텍스트 처리 완료 +[2025-11-21 16:14:38,784] [MainThread] [DEBUG] [image_processor3.py:process_single_image:737] 이미지 1 치환됨 +[2025-11-21 16:14:38,785] [MainThread] [INFO] [image_processor3.py:process_single_image:753] [inpaint_model 강제] migan → inpaint_method=migan +[2025-11-21 16:14:38,785] [MainThread] [DEBUG] [image_processor3.py:process_single_image:787] ocr_count: 4 +[2025-11-21 16:14:38,785] [MainThread] [DEBUG] [image_processor3.py:process_single_image:788] is_member_valid: True +[2025-11-21 16:14:38,789] [MainThread] [DEBUG] [image_processor3.py:_try_migan_inpaint:1042] MIGAN 인페인팅 시도 +[2025-11-21 16:14:38,793] [MainThread] [DEBUG] [migan_module.py:inpaint:276] [MIGAN] 입력 형태 - 이미지: (1, 3, 1200, 816), 마스크: (1, 1, 1200, 816) +[2025-11-21 16:14:39,127] [MainThread] [DEBUG] [migan_module.py:inpaint:289] [MIGAN] 출력 형태: (1200, 816, 3), dtype: uint8 +[2025-11-21 16:14:39,127] [MainThread] [DEBUG] [migan_module.py:inpaint:297] [MIGAN] 추론 완료: 334.01 ms +[2025-11-21 16:14:39,132] [MainThread] [DEBUG] [image_processor3.py:_try_migan_inpaint:1045] MIGAN 인페인팅 성공 +[2025-11-21 16:14:39,137] [MainThread] [INFO] [image_processor3.py:execute_inpaint_with_fallback:966] 메모리 변화 [인페인팅]: 24692.0MB -> 25135.3MB (+443.3MB, +1.8%) - 방법: migan +[2025-11-21 16:14:39,138] [MainThread] [DEBUG] [image_processor3.py:process_single_image:799] 인페인팅 완료 +[2025-11-21 16:14:39,184] [MainThread] [DEBUG] [image_processor3.py:process_single_image:821] 텍스트 렌더링 완료 +[2025-11-21 16:14:39,184] [MainThread] [DEBUG] [image_processor3.py:postProcess_and_save_image:1144] watermark_text: 이미지 저작권 보유 +[2025-11-21 16:14:39,184] [MainThread] [DEBUG] [image_processor3.py:postProcess_and_save_image:1145] is_watermark_enabled: True +[2025-11-21 16:14:39,192] [MainThread] [INFO] [postImageManager.py:save_image_to_path:101] 이미지 저장 완료 : D:\py\img_worker\modules\test\translated_preview_GmarketSansTTFMedium_img_1.jpg +[2025-11-21 16:14:39,192] [MainThread] [DEBUG] [image_processor3.py:process_single_image:827] 이미지 1 번역 완료: D:\py\img_worker\modules\test\translated_preview_GmarketSansTTFMedium_img_1.jpg +[2025-11-21 16:14:39,256] [MainThread] [DEBUG] [image_processor3.py:process_single_image:880] ⏱ 이미지 파이프라인 총 3041.3ms | download=0.0ms | ocr=181.9ms | translate=1880.9ms | mask=1880.9ms | inpaint=352.9ms(migan/CPU) | render=45.1ms | save=7.7ms +[2025-11-21 16:14:39,256] [MainThread] [INFO] [create_font_preview.py:main:115] 프리뷰 생성 성공: D:\py\img_worker\modules\test\translated_preview_GmarketSansTTFMedium_img_1.jpg +[2025-11-21 16:14:39,266] [MainThread] [DEBUG] [image_processor3.py:cleanup:443] OCR 모듈 정리 완료 +[2025-11-21 16:14:39,266] [MainThread] [DEBUG] [image_processor3.py:cleanup:451] 마스크 모듈 정리 완료 +[2025-11-21 16:14:39,325] [MainThread] [DEBUG] [image_processor3.py:cleanup:486] 임시 폴더 삭제됨: D:\py\img_worker\modules\test +[2025-11-21 16:14:39,381] [MainThread] [DEBUG] [image_processor3.py:cleanup:486] 임시 폴더 삭제됨: D:\py\img_worker\modules\test +[2025-11-21 16:14:39,381] [MainThread] [DEBUG] [image_processor3.py:__del__:434] 이미지 프로세서 소멸 +[2025-11-22 13:13:31,857] [MainThread] [DEBUG] [image_processor3.py:__init__:57] tracemalloc 메모리 추적 시작 +[2025-11-22 13:13:31,863] [MainThread] [DEBUG] [gpu_utils.py:_setup_directml_environment:55] ✅ DirectML 환경 준비 완료 (Windows DirectX 12 기반) +[2025-11-22 13:13:31,864] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:79] === 🚀 DirectML GPU 상태 초기화 시작 🚀 === +[2025-11-22 13:13:31,864] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:80] 🎯 사용자 GPU 가속 요청: False +[2025-11-22 13:13:31,864] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:81] 💻 현재 운영체제: Windows +[2025-11-22 13:13:31,864] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:84] GPU 가속이 비활성화됨 (toggle_states['use_cuda'] = False) +[2025-11-22 13:13:31,864] [MainThread] [INFO] [gpu_utils.py:_set_safe_cpu_mode:157] 🔒 안전한 CPU 모드로 모든 GPU 설정 강제 비활성화 +[2025-11-22 13:13:31,865] [MainThread] [DEBUG] [image_processor3.py:__init__:79] 🔧 ImageProcessor3 GPU 상태 요약: +[2025-11-22 13:13:31,865] [MainThread] [DEBUG] [image_processor3.py:__init__:80] - CUDA 사용 가능: False +[2025-11-22 13:13:31,865] [MainThread] [DEBUG] [image_processor3.py:__init__:81] - toggle_states['use_cuda']: False +[2025-11-22 13:13:31,865] [MainThread] [DEBUG] [image_processor3.py:__init__:82] - GPU 하드웨어 정보: {} +[2025-11-22 13:13:31,865] [MainThread] [DEBUG] [image_processor3.py:__init__:84] ImageProcessor3 Init toggle_states: {'font_type': '폰트8', 'image_font_path': 'D:\\py\\img_worker\\modules\\fonts\\Pretendard-Regular.ttf', 'ocr': True, 'force_cpu_ocr': True, 'use_cuda': False, 'inpaint_model': 'migan', 'local_inpaint_method': 'migan', 'migan_onnx_path': 'D:\\py\\img_worker\\modules\\migan_onnx\\migan_pipeline_v2.onnx', 'migan_use_accel': False, 'migan_provider_override': 'cpu', 'detail_IMGTrans_type': 'CPU', 'optionIMGTrans_type': 'CPU', 'thumb_trans_type': 'CPU', 'TEMP_IMAGE_DIR': 'D:\\py\\img_worker\\modules\\test', 'output_image_format': 'jpg', 'watermark_toggle': False, 'store_ocr_data_to_db': False, 'ocr_engine': 'onnx'} +[2025-11-22 13:13:31,865] [MainThread] [DEBUG] [image_processor3.py:__init__:87] is_member_valid: True +[2025-11-22 13:13:31,865] [MainThread] [DEBUG] [image_processor3.py:__init__:95] 폰트 경로 설정됨: D:\py\img_worker\modules\fonts\Pretendard-Regular.ttf (타입: 폰트8) +[2025-11-22 13:13:31,865] [MainThread] [DEBUG] [image_processor3.py:__init__:110] debug_images 디렉토리 이미 존재: D:\py\img_worker\modules\debug_images +[2025-11-22 13:13:31,866] [MainThread] [DEBUG] [image_processor3.py:__init__:118] self.font_path: D:\py\img_worker\modules\fonts\Pretendard-Regular.ttf +[2025-11-22 13:13:31,866] [MainThread] [DEBUG] [image_processor3.py:__init__:120] toggle_states font_path: D:\py\img_worker\modules\fonts\Pretendard-Regular.ttf +[2025-11-22 13:13:31,866] [MainThread] [DEBUG] [image_processor3.py:__init__:122] self.TEMP_IMAGE_DIR: D:\py\img_worker\modules\test +[2025-11-22 13:13:31,866] [MainThread] [DEBUG] [image_processor3.py:__init__:124] self.debugging_save_Dir: D:\py\img_worker\modules\debug_images +[2025-11-22 13:13:31,866] [MainThread] [DEBUG] [image_processor3.py:__init__:126] self.unwanted_texts: {} +[2025-11-22 13:13:31,866] [MainThread] [DEBUG] [image_processor3.py:__init__:128] self.inpaint_method: migan +[2025-11-22 13:13:31,866] [MainThread] [DEBUG] [image_processor3.py:__init__:134] Image.MAX_IMAGE_PIXELS set to 20000000 +[2025-11-22 13:13:31,867] [MainThread] [DEBUG] [onnx_ocr_wrapper.py:_determine_model_type:447] ONNX 모델 타입 설정값: 자동 선택, GPU 정보: {} +[2025-11-22 13:13:31,867] [MainThread] [INFO] [onnx_ocr_wrapper.py:_determine_model_type:453] 자동 선택 모드: GPU 추천 모델 simp 사용 +[2025-11-22 13:13:31,867] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:324] ONNX OCR 모델 타입 결정: simp (GPU: False) +[2025-11-22 13:13:31,867] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:333] ONNX OCR 모듈 CPU 모드로 설정 +[2025-11-22 13:13:31,867] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:356] 🚀 ONNX TextSystem 초기화 시작 (CPU 모드) +[2025-11-22 13:13:31,867] [MainThread] [DEBUG] [onnx_ocr_wrapper.py:_initialize_onnx_system:539] 🚀 ONNX TextSystem 초기화 시작 (CPU 모드) +[2025-11-22 13:13:39,131] [MainThread] [DEBUG] [onnx_ocr_wrapper.py:_ensure_utf8_encoding:487] 문자 사전 파일 UTF-8 확인 완료: D:\py\img_worker\modules\onnx_ocr_module\dict\ppocr_keys_v1.txt +[2025-11-22 13:13:39,238] [MainThread] [INFO] [onnx_ocr_wrapper.py:_initialize_onnx_system:743] ✅ ONNX TextSystem 초기화 완료 (CPU + SIMP (호환성) 모델) +[2025-11-22 13:13:39,238] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:363] ✅ ONNX TextSystem 초기화 완료 (CPU + SIMP 모델) +[2025-11-22 13:13:39,238] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:364] ✅ ONNX OCR 모듈 초기화 성공 (CPU 모드) +[2025-11-22 13:13:39,239] [MainThread] [INFO] [image_processor3.py:__init__:141] ✅ ONNX OCR 모듈 초기화 성공 +[2025-11-22 13:13:39,239] [MainThread] [INFO] [mask_module_for_paddle.py:__init__:12] 마스크 모듈 초기화 완료 +[2025-11-22 13:13:39,239] [MainThread] [DEBUG] [image_processor3.py:__init__:182] MaskModule 초기화 성공 +[2025-11-22 13:13:39,239] [MainThread] [INFO] [text_rendering_module.py:__init__:21] 텍스트 렌더링 모듈 초기화 완료 +[2025-11-22 13:13:39,239] [MainThread] [INFO] [text_rendering_module.py:__init__:22] 기본 폰트: D:\py\img_worker\modules\fonts\Pretendard-Regular.ttf +[2025-11-22 13:13:39,239] [MainThread] [DEBUG] [image_processor3.py:__init__:188] TextRenderingModule 초기화 성공 +[2025-11-22 13:13:39,241] [MainThread] [DEBUG] [postImageManager.py:font_load:40] 폰트 로드 성공: D:\py\img_worker\modules\fonts\Pretendard-Regular.ttf +[2025-11-22 13:13:39,241] [MainThread] [DEBUG] [image_processor3.py:__init__:194] PostImageManager 초기화 성공 +[2025-11-22 13:13:39,241] [MainThread] [DEBUG] [request_inpaint.py:__init__:43] Request_AI_Server GPU 상태: CUDA 사용 가능=False +[2025-11-22 13:13:39,242] [MainThread] [DEBUG] [image_processor3.py:__init__:217] Request_AI_Server 초기화 성공 +[2025-11-22 13:13:39,242] [MainThread] [DEBUG] [image_processor3.py:__init__:224] GoogleTranslate 초기화 성공 +[2025-11-22 13:13:39,243] [MainThread] [DEBUG] [image_processor3.py:__init__:250] MIGAN CUDA 사용 불가 - CPU 모드로 설정 +[2025-11-22 13:13:39,243] [MainThread] [DEBUG] [image_processor3.py:__init__:252] [MIGAN] GPU 관리자 전달: GPUManager, can_use_cuda: False +[2025-11-22 13:13:39,243] [MainThread] [DEBUG] [migan_module.py:_get_or_create_session:166] [MIGAN] GPU 관리자 사용 가능: False +[2025-11-22 13:13:39,243] [MainThread] [DEBUG] [migan_module.py:_get_or_create_session:186] [MIGAN] CPU 전용 모드 +[2025-11-22 13:13:39,243] [MainThread] [DEBUG] [migan_module.py:_get_or_create_session:188] [MIGAN] 최종 providers: [('CPUExecutionProvider', {})] +[2025-11-22 13:13:39,244] [MainThread] [DEBUG] [migan_module.py:_get_or_create_session:204] [MIGAN] CPU 전용 시도: [('CPUExecutionProvider', {})] +[2025-11-22 13:13:39,330] [MainThread] [INFO] [migan_module.py:_get_or_create_session:207] [MIGAN] CPU 전용 성공! 실제 providers: ['CPUExecutionProvider'] +[2025-11-22 13:13:39,331] [MainThread] [DEBUG] [migan_module.py:__init__:115] [MIGAN] 입력 0: image, 형태: ['batch_size', 3, 'height', 'width'], 타입: tensor(uint8) +[2025-11-22 13:13:39,331] [MainThread] [DEBUG] [migan_module.py:__init__:115] [MIGAN] 입력 1: mask, 형태: ['batch_size', 1, 'height', 'width'], 타입: tensor(uint8) +[2025-11-22 13:13:39,331] [MainThread] [DEBUG] [migan_module.py:__init__:117] [MIGAN] 출력 0: result, 형태: ['ScatterNDresult_dim_0', 3, 'ScatterNDresult_dim_2', 'ScatterNDresult_dim_3'], 타입: tensor(uint8) +[2025-11-22 13:13:39,331] [MainThread] [DEBUG] [migan_module.py:__init__:119] [MIGAN] 세션 준비 완료. providers=['CPUExecutionProvider'] +[2025-11-22 13:13:39,331] [MainThread] [DEBUG] [migan_module.py:build_migan_from_toggle:348] [MIGAN] GPU 관리자 연결 완료: GPUManager +[2025-11-22 13:13:39,332] [MainThread] [DEBUG] [migan_module.py:build_migan_from_toggle:355] [MIGAN] 파이프라인 gpu_manager 속성: True, 값: +[2025-11-22 13:13:39,332] [MainThread] [DEBUG] [image_processor3.py:__init__:254] [MIGAN] 초기화 완료: gpu_manager 속성=True, 값= +[2025-11-22 13:13:39,332] [MainThread] [INFO] [create_font_preview.py:main:98] 프리뷰 생성 시작: Pretendard-Regular.ttf +[2025-11-22 13:13:39,332] [MainThread] [INFO] [create_font_preview.py:main:99] 저장 경로: D:\py\img_worker\modules\test +[2025-11-22 13:13:39,332] [MainThread] [DEBUG] [image_processor3.py:process_single_image:564] 이미지 번역시작 +[2025-11-22 13:13:39,332] [MainThread] [DEBUG] [image_processor3.py:process_single_image:566] toggle_states: {'font_type': '폰트8', 'image_font_path': 'D:\\py\\img_worker\\modules\\fonts\\Pretendard-Regular.ttf', 'ocr': True, 'force_cpu_ocr': True, 'use_cuda': False, 'inpaint_model': 'migan', 'local_inpaint_method': 'migan', 'migan_onnx_path': 'D:\\py\\img_worker\\modules\\migan_onnx\\migan_pipeline_v2.onnx', 'migan_use_accel': False, 'migan_provider_override': 'cpu', 'detail_IMGTrans_type': 'CPU', 'optionIMGTrans_type': 'CPU', 'thumb_trans_type': 'CPU', 'TEMP_IMAGE_DIR': 'D:\\py\\img_worker\\modules\\test', 'output_image_format': 'jpg', 'watermark_toggle': False, 'store_ocr_data_to_db': False, 'ocr_engine': 'onnx'} +[2025-11-22 13:13:39,741] [MainThread] [DEBUG] [image_processor3.py:process_single_image:584] 이미지 1 처리 시작: D:\py\img_worker\modules\fonts\ori.jpg - OCR+인페인팅 모드 +[2025-11-22 13:13:39,741] [MainThread] [DEBUG] [image_processor3.py:download_image:1172] 로컬 파일 경로 감지, 다운로드 생략: D:\py\img_worker\modules\fonts\ori.jpg +[2025-11-22 13:13:39,741] [MainThread] [DEBUG] [image_processor3.py:process_single_image:607] 옵션 이미지는 스케일 처리 건너뛰기: preview_Pretendard-Regular +[2025-11-22 13:13:39,741] [MainThread] [DEBUG] [image_processor3.py:process_single_image:617] 이미지 1 로컬 저장위치(옵션 이미지 원본 유지): D:\py\img_worker\modules\fonts\ori.jpg +[2025-11-22 13:13:39,753] [MainThread] [INFO] [onnx_ocr_wrapper.py:detect_text:838] 🔍 ONNX OCR 감지 방식: polygon +[2025-11-22 13:13:39,939] [MainThread] [INFO] [onnx_ocr_wrapper.py:detect_text:906] ⚡ ONNX OCR 추론 완료: 185.4ms +[2025-11-22 13:13:39,939] [MainThread] [INFO] [onnx_ocr_wrapper.py:detect_text:907] 📊 세부 시간 - 감지: 103.8ms, 인식: 73.0ms, 분류: 5.0ms +[2025-11-22 13:13:39,951] [MainThread] [INFO] [image_processor3.py:process_single_image:633] 메모리 변화 [OCR 처리]: 26947.2MB -> 27088.3MB (+141.1MB, +0.5%) - 이미지 1 +[2025-11-22 13:13:39,957] [MainThread] [DEBUG] [image_processor3.py:process_single_image:638] ocr_results: [{'text': '现代极简风格', 'confidence': 0.9946680068969727, 'polygon': [[222.0, 70.0], [552.0, 70.0], [552.0, 118.0], [222.0, 118.0]], 'bbox': (222, 70, 331, 49), 'method': 'polygon'}, {'text': '更易搭配各种使用场景', 'confidence': 0.9957253336906433, 'polygon': [[152.0, 141.0], [622.0, 141.0], [622.0, 180.0], [152.0, 180.0]], 'bbox': (152, 141, 471, 40), 'method': 'polygon'}, {'text': '半圆两端设计', 'confidence': 0.9974236488342285, 'polygon': [[88.0, 289.0], [463.0, 289.0], [463.0, 345.0], [88.0, 345.0]], 'bbox': (88, 289, 376, 57), 'method': 'polygon'}, {'text': '承载各种欢乐', 'confidence': 0.9939405918121338, 'polygon': [[87.0, 369.0], [462.0, 369.0], [462.0, 425.0], [87.0, 425.0]], 'bbox': (87, 369, 376, 57), 'method': 'polygon'}] +[2025-11-22 13:13:39,981] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1082] [필터링] 포함 (신뢰도 99.5%): '现代极简风格' +[2025-11-22 13:13:39,981] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1082] [필터링] 포함 (신뢰도 99.6%): '更易搭配各种使用场景' +[2025-11-22 13:13:39,981] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1082] [필터링] 포함 (신뢰도 99.7%): '半圆两端设计' +[2025-11-22 13:13:39,982] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1082] [필터링] 포함 (신뢰도 99.4%): '承载各种欢乐' +[2025-11-22 13:13:39,982] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1086] 필터링 결과: 4/4개 (신뢰도 + & 중국어) +[2025-11-22 13:13:39,984] [MainThread] [DEBUG] [image_processor3.py:process_single_image:650] filter_ocr_results: [{'text': '现代极简风格', 'confidence': 0.9946680068969727, 'polygon': [[222.0, 70.0], [552.0, 70.0], [552.0, 118.0], [222.0, 118.0]], 'bbox': (222, 70, 331, 49), 'method': 'polygon'}, {'text': '更易搭配各种使用场景', 'confidence': 0.9957253336906433, 'polygon': [[152.0, 141.0], [622.0, 141.0], [622.0, 180.0], [152.0, 180.0]], 'bbox': (152, 141, 471, 40), 'method': 'polygon'}, {'text': '半圆两端设计', 'confidence': 0.9974236488342285, 'polygon': [[88.0, 289.0], [463.0, 289.0], [463.0, 345.0], [88.0, 345.0]], 'bbox': (88, 289, 376, 57), 'method': 'polygon'}, {'text': '承载各种欢乐', 'confidence': 0.9939405918121338, 'polygon': [[87.0, 369.0], [462.0, 369.0], [462.0, 425.0], [87.0, 425.0]], 'bbox': (87, 369, 376, 57), 'method': 'polygon'}] +[2025-11-22 13:13:39,984] [MainThread] [INFO] [onnx_ocr_wrapper.py:filter_chinese_text:1192] 중국어 텍스트 4개 필터링 완료 +[2025-11-22 13:13:39,984] [MainThread] [INFO] [onnx_ocr_wrapper.py:filter_korean_text:1213] 한글 텍스트 0개 필터링 완료 +[2025-11-22 13:13:40,363] [MainThread] [DEBUG] [image_processor3.py:process_single_image:708] translated_texts: ['모던한 미니멀 스타일', '다양한 사용 시나리오에 더 쉽게 일치', '반원형 끝 디자인', '온갖 기쁨을 안고'] +[2025-11-22 13:13:40,363] [MainThread] [DEBUG] [image_processor3.py:process_single_image:709] 마스크 생성 완료 +[2025-11-22 13:13:40,363] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1293] [치환 처리 1] 원본 텍스트: '모던한 미니멀 스타일' +[2025-11-22 13:13:40,363] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1297] [치환 처리 1] 분리된 단어: ['모던한', '미니멀', '스타일'] +[2025-11-22 13:13:40,364] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1338] [치환 처리 1] 변경 없음: '모던한 미니멀 스타일' +[2025-11-22 13:13:40,364] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1293] [치환 처리 2] 원본 텍스트: '다양한 사용 시나리오에 더 쉽게 일치' +[2025-11-22 13:13:40,364] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1297] [치환 처리 2] 분리된 단어: ['다양한', '사용', '시나리오에', '더', '쉽게', '일치'] +[2025-11-22 13:13:40,364] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1338] [치환 처리 2] 변경 없음: '다양한 사용 시나리오에 더 쉽게 일치' +[2025-11-22 13:13:40,364] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1293] [치환 처리 3] 원본 텍스트: '반원형 끝 디자인' +[2025-11-22 13:13:40,364] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1297] [치환 처리 3] 분리된 단어: ['반원형', '끝', '디자인'] +[2025-11-22 13:13:40,364] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1338] [치환 처리 3] 변경 없음: '반원형 끝 디자인' +[2025-11-22 13:13:40,365] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1293] [치환 처리 4] 원본 텍스트: '온갖 기쁨을 안고' +[2025-11-22 13:13:40,365] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1297] [치환 처리 4] 분리된 단어: ['온갖', '기쁨을', '안고'] +[2025-11-22 13:13:40,365] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1338] [치환 처리 4] 변경 없음: '온갖 기쁨을 안고' +[2025-11-22 13:13:40,365] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1340] 전체 치환 결과: 4개 텍스트 처리 완료 +[2025-11-22 13:13:40,365] [MainThread] [DEBUG] [image_processor3.py:process_single_image:718] 이미지 1 치환됨 +[2025-11-22 13:13:40,365] [MainThread] [INFO] [image_processor3.py:process_single_image:734] [inpaint_model 강제] migan → inpaint_method=migan +[2025-11-22 13:13:40,365] [MainThread] [DEBUG] [image_processor3.py:process_single_image:768] ocr_count: 4 +[2025-11-22 13:13:40,366] [MainThread] [DEBUG] [image_processor3.py:process_single_image:769] is_member_valid: True +[2025-11-22 13:13:40,370] [MainThread] [DEBUG] [image_processor3.py:_try_migan_inpaint:1023] MIGAN 인페인팅 시도 +[2025-11-22 13:13:40,376] [MainThread] [DEBUG] [migan_module.py:inpaint:276] [MIGAN] 입력 형태 - 이미지: (1, 3, 1200, 816), 마스크: (1, 1, 1200, 816) +[2025-11-22 13:13:40,713] [MainThread] [DEBUG] [migan_module.py:inpaint:289] [MIGAN] 출력 형태: (1200, 816, 3), dtype: uint8 +[2025-11-22 13:13:40,713] [MainThread] [DEBUG] [migan_module.py:inpaint:297] [MIGAN] 추론 완료: 336.61 ms +[2025-11-22 13:13:40,717] [MainThread] [DEBUG] [image_processor3.py:_try_migan_inpaint:1026] MIGAN 인페인팅 성공 +[2025-11-22 13:13:40,722] [MainThread] [INFO] [image_processor3.py:execute_inpaint_with_fallback:947] 메모리 변화 [인페인팅]: 27100.7MB -> 27527.8MB (+427.1MB, +1.6%) - 방법: migan +[2025-11-22 13:13:40,723] [MainThread] [DEBUG] [image_processor3.py:process_single_image:780] 인페인팅 완료 +[2025-11-22 13:13:40,786] [MainThread] [DEBUG] [image_processor3.py:process_single_image:802] 텍스트 렌더링 완료 +[2025-11-22 13:13:40,787] [MainThread] [DEBUG] [image_processor3.py:postProcess_and_save_image:1125] watermark_text: 이미지 저작권 보유 +[2025-11-22 13:13:40,787] [MainThread] [DEBUG] [image_processor3.py:postProcess_and_save_image:1126] is_watermark_enabled: True +[2025-11-22 13:13:40,796] [MainThread] [INFO] [postImageManager.py:save_image_to_path:101] 이미지 저장 완료 : D:\py\img_worker\modules\test\translated_preview_Pretendard-Regular_img_1.jpg +[2025-11-22 13:13:40,796] [MainThread] [DEBUG] [image_processor3.py:process_single_image:808] 이미지 1 번역 완료: D:\py\img_worker\modules\test\translated_preview_Pretendard-Regular_img_1.jpg +[2025-11-22 13:13:40,855] [MainThread] [DEBUG] [image_processor3.py:process_single_image:861] ⏱ 이미지 파이프라인 총 1522.2ms | download=0.0ms | ocr=203.4ms | translate=378.8ms | mask=378.8ms | inpaint=356.6ms(migan/CPU) | render=63.0ms | save=9.0ms +[2025-11-22 13:13:40,856] [MainThread] [INFO] [create_font_preview.py:main:115] 프리뷰 생성 성공: D:\py\img_worker\modules\test\translated_preview_Pretendard-Regular_img_1.jpg +[2025-11-22 13:13:40,866] [MainThread] [DEBUG] [image_processor3.py:cleanup:424] OCR 모듈 정리 완료 +[2025-11-22 13:13:40,867] [MainThread] [DEBUG] [image_processor3.py:cleanup:432] 마스크 모듈 정리 완료 +[2025-11-22 13:13:40,927] [MainThread] [DEBUG] [image_processor3.py:cleanup:467] 임시 폴더 삭제됨: D:\py\img_worker\modules\test +[2025-11-22 13:13:40,975] [MainThread] [DEBUG] [image_processor3.py:cleanup:467] 임시 폴더 삭제됨: D:\py\img_worker\modules\test +[2025-11-22 13:13:40,976] [MainThread] [DEBUG] [image_processor3.py:__del__:415] 이미지 프로세서 소멸 +[2025-11-22 13:15:42,699] [MainThread] [DEBUG] [image_processor3.py:__init__:57] tracemalloc 메모리 추적 시작 +[2025-11-22 13:15:42,706] [MainThread] [DEBUG] [gpu_utils.py:_setup_directml_environment:55] ✅ DirectML 환경 준비 완료 (Windows DirectX 12 기반) +[2025-11-22 13:15:42,706] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:79] === 🚀 DirectML GPU 상태 초기화 시작 🚀 === +[2025-11-22 13:15:42,706] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:80] 🎯 사용자 GPU 가속 요청: False +[2025-11-22 13:15:42,706] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:81] 💻 현재 운영체제: Windows +[2025-11-22 13:15:42,706] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:84] GPU 가속이 비활성화됨 (toggle_states['use_cuda'] = False) +[2025-11-22 13:15:42,707] [MainThread] [INFO] [gpu_utils.py:_set_safe_cpu_mode:157] 🔒 안전한 CPU 모드로 모든 GPU 설정 강제 비활성화 +[2025-11-22 13:15:42,707] [MainThread] [DEBUG] [image_processor3.py:__init__:79] 🔧 ImageProcessor3 GPU 상태 요약: +[2025-11-22 13:15:42,707] [MainThread] [DEBUG] [image_processor3.py:__init__:80] - CUDA 사용 가능: False +[2025-11-22 13:15:42,707] [MainThread] [DEBUG] [image_processor3.py:__init__:81] - toggle_states['use_cuda']: False +[2025-11-22 13:15:42,707] [MainThread] [DEBUG] [image_processor3.py:__init__:82] - GPU 하드웨어 정보: {} +[2025-11-22 13:15:42,707] [MainThread] [DEBUG] [image_processor3.py:__init__:84] ImageProcessor3 Init toggle_states: {'font_type': '폰트8', 'image_font_path': 'D:\\py\\img_worker\\modules\\fonts\\Pretendard-Regular.ttf', 'ocr': True, 'force_cpu_ocr': True, 'use_cuda': False, 'inpaint_model': 'migan', 'local_inpaint_method': 'migan', 'migan_onnx_path': 'D:\\py\\img_worker\\modules\\migan_onnx\\migan_pipeline_v2.onnx', 'migan_use_accel': False, 'migan_provider_override': 'cpu', 'detail_IMGTrans_type': 'CPU', 'optionIMGTrans_type': 'CPU', 'thumb_trans_type': 'CPU', 'TEMP_IMAGE_DIR': 'D:\\py\\img_worker\\modules\\test', 'output_image_format': 'jpg', 'watermark_toggle': False, 'store_ocr_data_to_db': False, 'ocr_engine': 'onnx'} +[2025-11-22 13:15:42,707] [MainThread] [DEBUG] [image_processor3.py:__init__:87] is_member_valid: True +[2025-11-22 13:15:42,708] [MainThread] [DEBUG] [image_processor3.py:__init__:109] debug_images 디렉토리 이미 존재: D:\py\img_worker\modules\debug_images +[2025-11-22 13:15:42,708] [MainThread] [DEBUG] [image_processor3.py:__init__:117] self.font_path: D:\py\img_worker\modules\fonts\Pretendard-Regular.ttf +[2025-11-22 13:15:42,708] [MainThread] [DEBUG] [image_processor3.py:__init__:119] toggle_states font_path: D:\py\img_worker\modules\fonts\Pretendard-Regular.ttf +[2025-11-22 13:15:42,708] [MainThread] [DEBUG] [image_processor3.py:__init__:121] self.TEMP_IMAGE_DIR: D:\py\img_worker\modules\test +[2025-11-22 13:15:42,708] [MainThread] [DEBUG] [image_processor3.py:__init__:123] self.debugging_save_Dir: D:\py\img_worker\modules\debug_images +[2025-11-22 13:15:42,708] [MainThread] [DEBUG] [image_processor3.py:__init__:125] self.unwanted_texts: {} +[2025-11-22 13:15:42,708] [MainThread] [DEBUG] [image_processor3.py:__init__:127] self.inpaint_method: migan +[2025-11-22 13:15:42,708] [MainThread] [DEBUG] [image_processor3.py:__init__:133] Image.MAX_IMAGE_PIXELS set to 20000000 +[2025-11-22 13:15:42,709] [MainThread] [DEBUG] [onnx_ocr_wrapper.py:_determine_model_type:447] ONNX 모델 타입 설정값: 자동 선택, GPU 정보: {} +[2025-11-22 13:15:42,709] [MainThread] [INFO] [onnx_ocr_wrapper.py:_determine_model_type:453] 자동 선택 모드: GPU 추천 모델 simp 사용 +[2025-11-22 13:15:42,709] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:324] ONNX OCR 모델 타입 결정: simp (GPU: False) +[2025-11-22 13:15:42,709] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:333] ONNX OCR 모듈 CPU 모드로 설정 +[2025-11-22 13:15:42,709] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:356] 🚀 ONNX TextSystem 초기화 시작 (CPU 모드) +[2025-11-22 13:15:42,709] [MainThread] [DEBUG] [onnx_ocr_wrapper.py:_initialize_onnx_system:539] 🚀 ONNX TextSystem 초기화 시작 (CPU 모드) +[2025-11-22 13:15:48,476] [MainThread] [DEBUG] [onnx_ocr_wrapper.py:_ensure_utf8_encoding:487] 문자 사전 파일 UTF-8 확인 완료: D:\py\img_worker\modules\onnx_ocr_module\dict\ppocr_keys_v1.txt +[2025-11-22 13:15:48,561] [MainThread] [INFO] [onnx_ocr_wrapper.py:_initialize_onnx_system:743] ✅ ONNX TextSystem 초기화 완료 (CPU + SIMP (호환성) 모델) +[2025-11-22 13:15:48,561] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:363] ✅ ONNX TextSystem 초기화 완료 (CPU + SIMP 모델) +[2025-11-22 13:15:48,561] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:364] ✅ ONNX OCR 모듈 초기화 성공 (CPU 모드) +[2025-11-22 13:15:48,562] [MainThread] [INFO] [image_processor3.py:__init__:140] ✅ ONNX OCR 모듈 초기화 성공 +[2025-11-22 13:15:48,562] [MainThread] [INFO] [mask_module_for_paddle.py:__init__:12] 마스크 모듈 초기화 완료 +[2025-11-22 13:15:48,562] [MainThread] [DEBUG] [image_processor3.py:__init__:181] MaskModule 초기화 성공 +[2025-11-22 13:15:48,562] [MainThread] [INFO] [text_rendering_module.py:__init__:21] 텍스트 렌더링 모듈 초기화 완료 +[2025-11-22 13:15:48,562] [MainThread] [INFO] [text_rendering_module.py:__init__:22] 기본 폰트: D:\py\img_worker\modules\fonts\Pretendard-Regular.ttf +[2025-11-22 13:15:48,562] [MainThread] [DEBUG] [image_processor3.py:__init__:187] TextRenderingModule 초기화 성공 +[2025-11-22 13:15:48,563] [MainThread] [DEBUG] [postImageManager.py:font_load:40] 폰트 로드 성공: D:\py\img_worker\modules\fonts\Pretendard-Regular.ttf +[2025-11-22 13:15:48,563] [MainThread] [DEBUG] [image_processor3.py:__init__:193] PostImageManager 초기화 성공 +[2025-11-22 13:15:48,563] [MainThread] [DEBUG] [request_inpaint.py:__init__:43] Request_AI_Server GPU 상태: CUDA 사용 가능=False +[2025-11-22 13:15:48,563] [MainThread] [DEBUG] [image_processor3.py:__init__:216] Request_AI_Server 초기화 성공 +[2025-11-22 13:15:48,563] [MainThread] [DEBUG] [image_processor3.py:__init__:223] GoogleTranslate 초기화 성공 +[2025-11-22 13:15:48,564] [MainThread] [DEBUG] [image_processor3.py:__init__:249] MIGAN CUDA 사용 불가 - CPU 모드로 설정 +[2025-11-22 13:15:48,564] [MainThread] [DEBUG] [image_processor3.py:__init__:251] [MIGAN] GPU 관리자 전달: GPUManager, can_use_cuda: False +[2025-11-22 13:15:48,565] [MainThread] [DEBUG] [migan_module.py:_get_or_create_session:166] [MIGAN] GPU 관리자 사용 가능: False +[2025-11-22 13:15:48,565] [MainThread] [DEBUG] [migan_module.py:_get_or_create_session:186] [MIGAN] CPU 전용 모드 +[2025-11-22 13:15:48,565] [MainThread] [DEBUG] [migan_module.py:_get_or_create_session:188] [MIGAN] 최종 providers: [('CPUExecutionProvider', {})] +[2025-11-22 13:15:48,565] [MainThread] [DEBUG] [migan_module.py:_get_or_create_session:204] [MIGAN] CPU 전용 시도: [('CPUExecutionProvider', {})] +[2025-11-22 13:15:48,643] [MainThread] [INFO] [migan_module.py:_get_or_create_session:207] [MIGAN] CPU 전용 성공! 실제 providers: ['CPUExecutionProvider'] +[2025-11-22 13:15:48,643] [MainThread] [DEBUG] [migan_module.py:__init__:115] [MIGAN] 입력 0: image, 형태: ['batch_size', 3, 'height', 'width'], 타입: tensor(uint8) +[2025-11-22 13:15:48,643] [MainThread] [DEBUG] [migan_module.py:__init__:115] [MIGAN] 입력 1: mask, 형태: ['batch_size', 1, 'height', 'width'], 타입: tensor(uint8) +[2025-11-22 13:15:48,643] [MainThread] [DEBUG] [migan_module.py:__init__:117] [MIGAN] 출력 0: result, 형태: ['ScatterNDresult_dim_0', 3, 'ScatterNDresult_dim_2', 'ScatterNDresult_dim_3'], 타입: tensor(uint8) +[2025-11-22 13:15:48,644] [MainThread] [DEBUG] [migan_module.py:__init__:119] [MIGAN] 세션 준비 완료. providers=['CPUExecutionProvider'] +[2025-11-22 13:15:48,644] [MainThread] [DEBUG] [migan_module.py:build_migan_from_toggle:348] [MIGAN] GPU 관리자 연결 완료: GPUManager +[2025-11-22 13:15:48,644] [MainThread] [DEBUG] [migan_module.py:build_migan_from_toggle:355] [MIGAN] 파이프라인 gpu_manager 속성: True, 값: +[2025-11-22 13:15:48,644] [MainThread] [DEBUG] [image_processor3.py:__init__:253] [MIGAN] 초기화 완료: gpu_manager 속성=True, 값= +[2025-11-22 13:15:48,644] [MainThread] [INFO] [create_font_preview.py:main:98] 프리뷰 생성 시작: Pretendard-Regular.ttf +[2025-11-22 13:15:48,644] [MainThread] [INFO] [create_font_preview.py:main:99] 저장 경로: D:\py\img_worker\modules\test +[2025-11-22 13:15:48,644] [MainThread] [DEBUG] [image_processor3.py:process_single_image:556] 이미지 번역시작 +[2025-11-22 13:15:48,645] [MainThread] [DEBUG] [image_processor3.py:process_single_image:558] toggle_states: {'font_type': '폰트8', 'image_font_path': 'D:\\py\\img_worker\\modules\\fonts\\Pretendard-Regular.ttf', 'ocr': True, 'force_cpu_ocr': True, 'use_cuda': False, 'inpaint_model': 'migan', 'local_inpaint_method': 'migan', 'migan_onnx_path': 'D:\\py\\img_worker\\modules\\migan_onnx\\migan_pipeline_v2.onnx', 'migan_use_accel': False, 'migan_provider_override': 'cpu', 'detail_IMGTrans_type': 'CPU', 'optionIMGTrans_type': 'CPU', 'thumb_trans_type': 'CPU', 'TEMP_IMAGE_DIR': 'D:\\py\\img_worker\\modules\\test', 'output_image_format': 'jpg', 'watermark_toggle': False, 'store_ocr_data_to_db': False, 'ocr_engine': 'onnx'} +[2025-11-22 13:15:48,877] [MainThread] [DEBUG] [image_processor3.py:process_single_image:576] 이미지 1 처리 시작: D:\py\img_worker\modules\fonts\ori.jpg - OCR+인페인팅 모드 +[2025-11-22 13:15:48,877] [MainThread] [DEBUG] [image_processor3.py:download_image:1164] 로컬 파일 경로 감지, 다운로드 생략: D:\py\img_worker\modules\fonts\ori.jpg +[2025-11-22 13:15:48,877] [MainThread] [DEBUG] [image_processor3.py:process_single_image:599] 옵션 이미지는 스케일 처리 건너뛰기: preview_Pretendard-Regular +[2025-11-22 13:15:48,877] [MainThread] [DEBUG] [image_processor3.py:process_single_image:609] 이미지 1 로컬 저장위치(옵션 이미지 원본 유지): D:\py\img_worker\modules\fonts\ori.jpg +[2025-11-22 13:15:48,886] [MainThread] [INFO] [onnx_ocr_wrapper.py:detect_text:838] 🔍 ONNX OCR 감지 방식: polygon +[2025-11-22 13:15:49,053] [MainThread] [INFO] [onnx_ocr_wrapper.py:detect_text:906] ⚡ ONNX OCR 추론 완료: 167.0ms +[2025-11-22 13:15:49,054] [MainThread] [INFO] [onnx_ocr_wrapper.py:detect_text:907] 📊 세부 시간 - 감지: 91.0ms, 인식: 69.0ms, 분류: 4.0ms +[2025-11-22 13:15:49,062] [MainThread] [INFO] [image_processor3.py:process_single_image:625] 메모리 변화 [OCR 처리]: 26716.9MB -> 26859.4MB (+142.5MB, +0.5%) - 이미지 1 +[2025-11-22 13:15:49,064] [MainThread] [DEBUG] [image_processor3.py:process_single_image:630] ocr_results: [{'text': '现代极简风格', 'confidence': 0.9946680068969727, 'polygon': [[222.0, 70.0], [552.0, 70.0], [552.0, 118.0], [222.0, 118.0]], 'bbox': (222, 70, 331, 49), 'method': 'polygon'}, {'text': '更易搭配各种使用场景', 'confidence': 0.9957253336906433, 'polygon': [[152.0, 141.0], [622.0, 141.0], [622.0, 180.0], [152.0, 180.0]], 'bbox': (152, 141, 471, 40), 'method': 'polygon'}, {'text': '半圆两端设计', 'confidence': 0.9974236488342285, 'polygon': [[88.0, 289.0], [463.0, 289.0], [463.0, 345.0], [88.0, 345.0]], 'bbox': (88, 289, 376, 57), 'method': 'polygon'}, {'text': '承载各种欢乐', 'confidence': 0.9939405918121338, 'polygon': [[87.0, 369.0], [462.0, 369.0], [462.0, 425.0], [87.0, 425.0]], 'bbox': (87, 369, 376, 57), 'method': 'polygon'}] +[2025-11-22 13:15:49,087] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1074] [필터링] 포함 (신뢰도 99.5%): '现代极简风格' +[2025-11-22 13:15:49,087] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1074] [필터링] 포함 (신뢰도 99.6%): '更易搭配各种使用场景' +[2025-11-22 13:15:49,087] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1074] [필터링] 포함 (신뢰도 99.7%): '半圆两端设计' +[2025-11-22 13:15:49,087] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1074] [필터링] 포함 (신뢰도 99.4%): '承载各种欢乐' +[2025-11-22 13:15:49,087] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1078] 필터링 결과: 4/4개 (신뢰도 + & 중국어) +[2025-11-22 13:15:49,090] [MainThread] [DEBUG] [image_processor3.py:process_single_image:642] filter_ocr_results: [{'text': '现代极简风格', 'confidence': 0.9946680068969727, 'polygon': [[222.0, 70.0], [552.0, 70.0], [552.0, 118.0], [222.0, 118.0]], 'bbox': (222, 70, 331, 49), 'method': 'polygon'}, {'text': '更易搭配各种使用场景', 'confidence': 0.9957253336906433, 'polygon': [[152.0, 141.0], [622.0, 141.0], [622.0, 180.0], [152.0, 180.0]], 'bbox': (152, 141, 471, 40), 'method': 'polygon'}, {'text': '半圆两端设计', 'confidence': 0.9974236488342285, 'polygon': [[88.0, 289.0], [463.0, 289.0], [463.0, 345.0], [88.0, 345.0]], 'bbox': (88, 289, 376, 57), 'method': 'polygon'}, {'text': '承载各种欢乐', 'confidence': 0.9939405918121338, 'polygon': [[87.0, 369.0], [462.0, 369.0], [462.0, 425.0], [87.0, 425.0]], 'bbox': (87, 369, 376, 57), 'method': 'polygon'}] +[2025-11-22 13:15:49,090] [MainThread] [INFO] [onnx_ocr_wrapper.py:filter_chinese_text:1192] 중국어 텍스트 4개 필터링 완료 +[2025-11-22 13:15:49,090] [MainThread] [INFO] [onnx_ocr_wrapper.py:filter_korean_text:1213] 한글 텍스트 0개 필터링 완료 +[2025-11-22 13:15:49,399] [MainThread] [DEBUG] [image_processor3.py:process_single_image:700] translated_texts: ['모던한 미니멀 스타일', '다양한 사용 시나리오에 더 쉽게 일치', '반원형 끝 디자인', '온갖 기쁨을 안고'] +[2025-11-22 13:15:49,399] [MainThread] [DEBUG] [image_processor3.py:process_single_image:701] 마스크 생성 완료 +[2025-11-22 13:15:49,399] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1285] [치환 처리 1] 원본 텍스트: '모던한 미니멀 스타일' +[2025-11-22 13:15:49,399] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1289] [치환 처리 1] 분리된 단어: ['모던한', '미니멀', '스타일'] +[2025-11-22 13:15:49,400] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1330] [치환 처리 1] 변경 없음: '모던한 미니멀 스타일' +[2025-11-22 13:15:49,400] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1285] [치환 처리 2] 원본 텍스트: '다양한 사용 시나리오에 더 쉽게 일치' +[2025-11-22 13:15:49,400] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1289] [치환 처리 2] 분리된 단어: ['다양한', '사용', '시나리오에', '더', '쉽게', '일치'] +[2025-11-22 13:15:49,400] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1330] [치환 처리 2] 변경 없음: '다양한 사용 시나리오에 더 쉽게 일치' +[2025-11-22 13:15:49,400] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1285] [치환 처리 3] 원본 텍스트: '반원형 끝 디자인' +[2025-11-22 13:15:49,400] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1289] [치환 처리 3] 분리된 단어: ['반원형', '끝', '디자인'] +[2025-11-22 13:15:49,400] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1330] [치환 처리 3] 변경 없음: '반원형 끝 디자인' +[2025-11-22 13:15:49,400] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1285] [치환 처리 4] 원본 텍스트: '온갖 기쁨을 안고' +[2025-11-22 13:15:49,400] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1289] [치환 처리 4] 분리된 단어: ['온갖', '기쁨을', '안고'] +[2025-11-22 13:15:49,401] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1330] [치환 처리 4] 변경 없음: '온갖 기쁨을 안고' +[2025-11-22 13:15:49,401] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1332] 전체 치환 결과: 4개 텍스트 처리 완료 +[2025-11-22 13:15:49,401] [MainThread] [DEBUG] [image_processor3.py:process_single_image:710] 이미지 1 치환됨 +[2025-11-22 13:15:49,401] [MainThread] [INFO] [image_processor3.py:process_single_image:726] [inpaint_model 강제] migan → inpaint_method=migan +[2025-11-22 13:15:49,401] [MainThread] [DEBUG] [image_processor3.py:process_single_image:760] ocr_count: 4 +[2025-11-22 13:15:49,401] [MainThread] [DEBUG] [image_processor3.py:process_single_image:761] is_member_valid: True +[2025-11-22 13:15:49,406] [MainThread] [DEBUG] [image_processor3.py:_try_migan_inpaint:1015] MIGAN 인페인팅 시도 +[2025-11-22 13:15:49,411] [MainThread] [DEBUG] [migan_module.py:inpaint:276] [MIGAN] 입력 형태 - 이미지: (1, 3, 1200, 816), 마스크: (1, 1, 1200, 816) +[2025-11-22 13:15:49,745] [MainThread] [DEBUG] [migan_module.py:inpaint:289] [MIGAN] 출력 형태: (1200, 816, 3), dtype: uint8 +[2025-11-22 13:15:49,746] [MainThread] [DEBUG] [migan_module.py:inpaint:297] [MIGAN] 추론 완료: 335.00 ms +[2025-11-22 13:15:49,751] [MainThread] [DEBUG] [image_processor3.py:_try_migan_inpaint:1018] MIGAN 인페인팅 성공 +[2025-11-22 13:15:49,759] [MainThread] [INFO] [image_processor3.py:execute_inpaint_with_fallback:939] 메모리 변화 [인페인팅]: 26861.3MB -> 27259.7MB (+398.4MB, +1.5%) - 방법: migan +[2025-11-22 13:15:49,760] [MainThread] [DEBUG] [image_processor3.py:process_single_image:772] 인페인팅 완료 +[2025-11-22 13:15:49,821] [MainThread] [DEBUG] [image_processor3.py:process_single_image:794] 텍스트 렌더링 완료 +[2025-11-22 13:15:49,821] [MainThread] [DEBUG] [image_processor3.py:postProcess_and_save_image:1117] watermark_text: 이미지 저작권 보유 +[2025-11-22 13:15:49,821] [MainThread] [DEBUG] [image_processor3.py:postProcess_and_save_image:1118] is_watermark_enabled: True +[2025-11-22 13:15:49,829] [MainThread] [INFO] [postImageManager.py:save_image_to_path:101] 이미지 저장 완료 : D:\py\img_worker\modules\test\translated_preview_Pretendard-Regular_img_1.jpg +[2025-11-22 13:15:49,829] [MainThread] [DEBUG] [image_processor3.py:process_single_image:800] 이미지 1 번역 완료: D:\py\img_worker\modules\test\translated_preview_Pretendard-Regular_img_1.jpg +[2025-11-22 13:15:49,885] [MainThread] [DEBUG] [image_processor3.py:process_single_image:853] ⏱ 이미지 파이프라인 총 1240.4ms | download=0.0ms | ocr=180.0ms | translate=308.9ms | mask=308.9ms | inpaint=359.0ms(migan/CPU) | render=61.0ms | save=8.0ms +[2025-11-22 13:15:49,886] [MainThread] [INFO] [create_font_preview.py:main:115] 프리뷰 생성 성공: D:\py\img_worker\modules\test\translated_preview_Pretendard-Regular_img_1.jpg +[2025-11-22 13:15:49,896] [MainThread] [DEBUG] [image_processor3.py:cleanup:416] OCR 모듈 정리 완료 +[2025-11-22 13:15:49,896] [MainThread] [DEBUG] [image_processor3.py:cleanup:424] 마스크 모듈 정리 완료 +[2025-11-22 13:15:49,946] [MainThread] [DEBUG] [image_processor3.py:cleanup:459] 임시 폴더 삭제됨: D:\py\img_worker\modules\test +[2025-11-22 13:15:49,996] [MainThread] [DEBUG] [image_processor3.py:cleanup:459] 임시 폴더 삭제됨: D:\py\img_worker\modules\test +[2025-11-22 13:15:49,997] [MainThread] [DEBUG] [image_processor3.py:__del__:407] 이미지 프로세서 소멸 +[2025-11-22 13:28:10,774] [MainThread] [DEBUG] [image_processor3.py:__init__:57] tracemalloc 메모리 추적 시작 +[2025-11-22 13:28:10,780] [MainThread] [DEBUG] [gpu_utils.py:_setup_directml_environment:55] ✅ DirectML 환경 준비 완료 (Windows DirectX 12 기반) +[2025-11-22 13:28:10,780] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:79] === 🚀 DirectML GPU 상태 초기화 시작 🚀 === +[2025-11-22 13:28:10,781] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:80] 🎯 사용자 GPU 가속 요청: False +[2025-11-22 13:28:10,781] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:81] 💻 현재 운영체제: Windows +[2025-11-22 13:28:10,781] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:84] GPU 가속이 비활성화됨 (toggle_states['use_cuda'] = False) +[2025-11-22 13:28:10,781] [MainThread] [INFO] [gpu_utils.py:_set_safe_cpu_mode:157] 🔒 안전한 CPU 모드로 모든 GPU 설정 강제 비활성화 +[2025-11-22 13:28:10,781] [MainThread] [DEBUG] [image_processor3.py:__init__:79] 🔧 ImageProcessor3 GPU 상태 요약: +[2025-11-22 13:28:10,781] [MainThread] [DEBUG] [image_processor3.py:__init__:80] - CUDA 사용 가능: False +[2025-11-22 13:28:10,781] [MainThread] [DEBUG] [image_processor3.py:__init__:81] - toggle_states['use_cuda']: False +[2025-11-22 13:28:10,781] [MainThread] [DEBUG] [image_processor3.py:__init__:82] - GPU 하드웨어 정보: {} +[2025-11-22 13:28:10,782] [MainThread] [DEBUG] [image_processor3.py:__init__:84] ImageProcessor3 Init toggle_states: {'font_type': '폰트8', 'image_font_path': 'D:\\py\\img_worker\\modules\\fonts\\Pretendard-Regular.ttf', 'ocr': True, 'force_cpu_ocr': True, 'use_cuda': False, 'inpaint_model': 'migan', 'local_inpaint_method': 'migan', 'migan_onnx_path': 'D:\\py\\img_worker\\modules\\migan_onnx\\migan_pipeline_v2.onnx', 'migan_use_accel': False, 'migan_provider_override': 'cpu', 'detail_IMGTrans_type': 'CPU', 'optionIMGTrans_type': 'CPU', 'thumb_trans_type': 'CPU', 'TEMP_IMAGE_DIR': 'D:\\py\\img_worker\\modules\\test', 'output_image_format': 'jpg', 'watermark_toggle': False, 'store_ocr_data_to_db': False, 'ocr_engine': 'onnx'} +[2025-11-22 13:28:10,782] [MainThread] [DEBUG] [image_processor3.py:__init__:87] is_member_valid: True +[2025-11-22 13:28:10,782] [MainThread] [DEBUG] [image_processor3.py:__init__:109] debug_images 디렉토리 이미 존재: D:\py\img_worker\modules\debug_images +[2025-11-22 13:28:10,782] [MainThread] [DEBUG] [image_processor3.py:__init__:117] self.font_path: D:\py\img_worker\modules\fonts\Pretendard-Regular.ttf +[2025-11-22 13:28:10,782] [MainThread] [DEBUG] [image_processor3.py:__init__:119] toggle_states font_path: D:\py\img_worker\modules\fonts\Pretendard-Regular.ttf +[2025-11-22 13:28:10,782] [MainThread] [DEBUG] [image_processor3.py:__init__:121] self.TEMP_IMAGE_DIR: D:\py\img_worker\modules\test +[2025-11-22 13:28:10,782] [MainThread] [DEBUG] [image_processor3.py:__init__:123] self.debugging_save_Dir: D:\py\img_worker\modules\debug_images +[2025-11-22 13:28:10,782] [MainThread] [DEBUG] [image_processor3.py:__init__:125] self.unwanted_texts: {} +[2025-11-22 13:28:10,783] [MainThread] [DEBUG] [image_processor3.py:__init__:127] self.inpaint_method: migan +[2025-11-22 13:28:10,783] [MainThread] [DEBUG] [image_processor3.py:__init__:133] Image.MAX_IMAGE_PIXELS set to 20000000 +[2025-11-22 13:28:10,783] [MainThread] [DEBUG] [onnx_ocr_wrapper.py:_determine_model_type:447] ONNX 모델 타입 설정값: 자동 선택, GPU 정보: {} +[2025-11-22 13:28:10,783] [MainThread] [INFO] [onnx_ocr_wrapper.py:_determine_model_type:453] 자동 선택 모드: GPU 추천 모델 simp 사용 +[2025-11-22 13:28:10,783] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:324] ONNX OCR 모델 타입 결정: simp (GPU: False) +[2025-11-22 13:28:10,783] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:333] ONNX OCR 모듈 CPU 모드로 설정 +[2025-11-22 13:28:10,784] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:356] 🚀 ONNX TextSystem 초기화 시작 (CPU 모드) +[2025-11-22 13:28:10,784] [MainThread] [DEBUG] [onnx_ocr_wrapper.py:_initialize_onnx_system:539] 🚀 ONNX TextSystem 초기화 시작 (CPU 모드) +[2025-11-22 13:28:16,491] [MainThread] [DEBUG] [onnx_ocr_wrapper.py:_ensure_utf8_encoding:487] 문자 사전 파일 UTF-8 확인 완료: D:\py\img_worker\modules\onnx_ocr_module\dict\ppocr_keys_v1.txt +[2025-11-22 13:28:16,573] [MainThread] [INFO] [onnx_ocr_wrapper.py:_initialize_onnx_system:743] ✅ ONNX TextSystem 초기화 완료 (CPU + SIMP (호환성) 모델) +[2025-11-22 13:28:16,573] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:363] ✅ ONNX TextSystem 초기화 완료 (CPU + SIMP 모델) +[2025-11-22 13:28:16,573] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:364] ✅ ONNX OCR 모듈 초기화 성공 (CPU 모드) +[2025-11-22 13:28:16,574] [MainThread] [INFO] [image_processor3.py:__init__:140] ✅ ONNX OCR 모듈 초기화 성공 +[2025-11-22 13:28:16,574] [MainThread] [INFO] [mask_module_for_paddle.py:__init__:12] 마스크 모듈 초기화 완료 +[2025-11-22 13:28:16,574] [MainThread] [DEBUG] [image_processor3.py:__init__:181] MaskModule 초기화 성공 +[2025-11-22 13:28:16,574] [MainThread] [INFO] [text_rendering_module.py:__init__:21] 텍스트 렌더링 모듈 초기화 완료 +[2025-11-22 13:28:16,574] [MainThread] [INFO] [text_rendering_module.py:__init__:22] 기본 폰트: D:\py\img_worker\modules\fonts\Pretendard-Regular.ttf +[2025-11-22 13:28:16,574] [MainThread] [DEBUG] [image_processor3.py:__init__:187] TextRenderingModule 초기화 성공 +[2025-11-22 13:28:16,575] [MainThread] [DEBUG] [postImageManager.py:font_load:40] 폰트 로드 성공: D:\py\img_worker\modules\fonts\Pretendard-Regular.ttf +[2025-11-22 13:28:16,575] [MainThread] [DEBUG] [image_processor3.py:__init__:193] PostImageManager 초기화 성공 +[2025-11-22 13:28:16,575] [MainThread] [DEBUG] [request_inpaint.py:__init__:43] Request_AI_Server GPU 상태: CUDA 사용 가능=False +[2025-11-22 13:28:16,575] [MainThread] [DEBUG] [image_processor3.py:__init__:216] Request_AI_Server 초기화 성공 +[2025-11-22 13:28:16,575] [MainThread] [DEBUG] [image_processor3.py:__init__:223] GoogleTranslate 초기화 성공 +[2025-11-22 13:28:16,576] [MainThread] [DEBUG] [image_processor3.py:__init__:249] MIGAN CUDA 사용 불가 - CPU 모드로 설정 +[2025-11-22 13:28:16,577] [MainThread] [DEBUG] [image_processor3.py:__init__:251] [MIGAN] GPU 관리자 전달: GPUManager, can_use_cuda: False +[2025-11-22 13:28:16,577] [MainThread] [DEBUG] [migan_module.py:_get_or_create_session:166] [MIGAN] GPU 관리자 사용 가능: False +[2025-11-22 13:28:16,577] [MainThread] [DEBUG] [migan_module.py:_get_or_create_session:186] [MIGAN] CPU 전용 모드 +[2025-11-22 13:28:16,577] [MainThread] [DEBUG] [migan_module.py:_get_or_create_session:188] [MIGAN] 최종 providers: [('CPUExecutionProvider', {})] +[2025-11-22 13:28:16,577] [MainThread] [DEBUG] [migan_module.py:_get_or_create_session:204] [MIGAN] CPU 전용 시도: [('CPUExecutionProvider', {})] +[2025-11-22 13:28:16,653] [MainThread] [INFO] [migan_module.py:_get_or_create_session:207] [MIGAN] CPU 전용 성공! 실제 providers: ['CPUExecutionProvider'] +[2025-11-22 13:28:16,654] [MainThread] [DEBUG] [migan_module.py:__init__:115] [MIGAN] 입력 0: image, 형태: ['batch_size', 3, 'height', 'width'], 타입: tensor(uint8) +[2025-11-22 13:28:16,654] [MainThread] [DEBUG] [migan_module.py:__init__:115] [MIGAN] 입력 1: mask, 형태: ['batch_size', 1, 'height', 'width'], 타입: tensor(uint8) +[2025-11-22 13:28:16,654] [MainThread] [DEBUG] [migan_module.py:__init__:117] [MIGAN] 출력 0: result, 형태: ['ScatterNDresult_dim_0', 3, 'ScatterNDresult_dim_2', 'ScatterNDresult_dim_3'], 타입: tensor(uint8) +[2025-11-22 13:28:16,654] [MainThread] [DEBUG] [migan_module.py:__init__:119] [MIGAN] 세션 준비 완료. providers=['CPUExecutionProvider'] +[2025-11-22 13:28:16,654] [MainThread] [DEBUG] [migan_module.py:build_migan_from_toggle:348] [MIGAN] GPU 관리자 연결 완료: GPUManager +[2025-11-22 13:28:16,654] [MainThread] [DEBUG] [migan_module.py:build_migan_from_toggle:355] [MIGAN] 파이프라인 gpu_manager 속성: True, 값: +[2025-11-22 13:28:16,655] [MainThread] [DEBUG] [image_processor3.py:__init__:253] [MIGAN] 초기화 완료: gpu_manager 속성=True, 값= +[2025-11-22 13:28:16,655] [MainThread] [INFO] [create_font_preview.py:main:98] 프리뷰 생성 시작: Pretendard-Regular.ttf +[2025-11-22 13:28:16,655] [MainThread] [INFO] [create_font_preview.py:main:99] 저장 경로: D:\py\img_worker\modules\test +[2025-11-22 13:28:16,655] [MainThread] [DEBUG] [image_processor3.py:process_single_image:570] 이미지 번역시작 +[2025-11-22 13:28:16,655] [MainThread] [DEBUG] [image_processor3.py:process_single_image:572] toggle_states: {'font_type': '폰트8', 'image_font_path': 'D:\\py\\img_worker\\modules\\fonts\\Pretendard-Regular.ttf', 'ocr': True, 'force_cpu_ocr': True, 'use_cuda': False, 'inpaint_model': 'migan', 'local_inpaint_method': 'migan', 'migan_onnx_path': 'D:\\py\\img_worker\\modules\\migan_onnx\\migan_pipeline_v2.onnx', 'migan_use_accel': False, 'migan_provider_override': 'cpu', 'detail_IMGTrans_type': 'CPU', 'optionIMGTrans_type': 'CPU', 'thumb_trans_type': 'CPU', 'TEMP_IMAGE_DIR': 'D:\\py\\img_worker\\modules\\test', 'output_image_format': 'jpg', 'watermark_toggle': False, 'store_ocr_data_to_db': False, 'ocr_engine': 'onnx'} +[2025-11-22 13:28:17,019] [MainThread] [DEBUG] [image_processor3.py:process_single_image:590] 이미지 1 처리 시작: D:\py\img_worker\modules\fonts\ori.jpg - OCR+인페인팅 모드 +[2025-11-22 13:28:17,019] [MainThread] [DEBUG] [image_processor3.py:download_image:1178] 로컬 파일 경로 감지, 다운로드 생략: D:\py\img_worker\modules\fonts\ori.jpg +[2025-11-22 13:28:17,019] [MainThread] [DEBUG] [image_processor3.py:process_single_image:613] 옵션 이미지는 스케일 처리 건너뛰기: preview_Pretendard-Regular +[2025-11-22 13:28:17,020] [MainThread] [DEBUG] [image_processor3.py:process_single_image:623] 이미지 1 로컬 저장위치(옵션 이미지 원본 유지): D:\py\img_worker\modules\fonts\ori.jpg +[2025-11-22 13:28:17,028] [MainThread] [INFO] [onnx_ocr_wrapper.py:detect_text:838] 🔍 ONNX OCR 감지 방식: polygon +[2025-11-22 13:28:17,254] [MainThread] [INFO] [onnx_ocr_wrapper.py:detect_text:906] ⚡ ONNX OCR 추론 완료: 225.0ms +[2025-11-22 13:28:17,254] [MainThread] [INFO] [onnx_ocr_wrapper.py:detect_text:907] 📊 세부 시간 - 감지: 112.0ms, 인식: 105.0ms, 분류: 4.0ms +[2025-11-22 13:28:17,264] [MainThread] [INFO] [image_processor3.py:process_single_image:639] 메모리 변화 [OCR 처리]: 28105.3MB -> 28323.2MB (+217.9MB, +0.8%) - 이미지 1 +[2025-11-22 13:28:17,266] [MainThread] [DEBUG] [image_processor3.py:process_single_image:644] ocr_results: [{'text': '现代极简风格', 'confidence': 0.9946680068969727, 'polygon': [[222.0, 70.0], [552.0, 70.0], [552.0, 118.0], [222.0, 118.0]], 'bbox': (222, 70, 331, 49), 'method': 'polygon'}, {'text': '更易搭配各种使用场景', 'confidence': 0.9957253336906433, 'polygon': [[152.0, 141.0], [622.0, 141.0], [622.0, 180.0], [152.0, 180.0]], 'bbox': (152, 141, 471, 40), 'method': 'polygon'}, {'text': '半圆两端设计', 'confidence': 0.9974236488342285, 'polygon': [[88.0, 289.0], [463.0, 289.0], [463.0, 345.0], [88.0, 345.0]], 'bbox': (88, 289, 376, 57), 'method': 'polygon'}, {'text': '承载各种欢乐', 'confidence': 0.9939405918121338, 'polygon': [[87.0, 369.0], [462.0, 369.0], [462.0, 425.0], [87.0, 425.0]], 'bbox': (87, 369, 376, 57), 'method': 'polygon'}] +[2025-11-22 13:28:17,290] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1088] [필터링] 포함 (신뢰도 99.5%): '现代极简风格' +[2025-11-22 13:28:17,291] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1088] [필터링] 포함 (신뢰도 99.6%): '更易搭配各种使用场景' +[2025-11-22 13:28:17,291] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1088] [필터링] 포함 (신뢰도 99.7%): '半圆两端设计' +[2025-11-22 13:28:17,291] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1088] [필터링] 포함 (신뢰도 99.4%): '承载各种欢乐' +[2025-11-22 13:28:17,291] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1092] 필터링 결과: 4/4개 (신뢰도 + & 중국어) +[2025-11-22 13:28:17,293] [MainThread] [DEBUG] [image_processor3.py:process_single_image:656] filter_ocr_results: [{'text': '现代极简风格', 'confidence': 0.9946680068969727, 'polygon': [[222.0, 70.0], [552.0, 70.0], [552.0, 118.0], [222.0, 118.0]], 'bbox': (222, 70, 331, 49), 'method': 'polygon'}, {'text': '更易搭配各种使用场景', 'confidence': 0.9957253336906433, 'polygon': [[152.0, 141.0], [622.0, 141.0], [622.0, 180.0], [152.0, 180.0]], 'bbox': (152, 141, 471, 40), 'method': 'polygon'}, {'text': '半圆两端设计', 'confidence': 0.9974236488342285, 'polygon': [[88.0, 289.0], [463.0, 289.0], [463.0, 345.0], [88.0, 345.0]], 'bbox': (88, 289, 376, 57), 'method': 'polygon'}, {'text': '承载各种欢乐', 'confidence': 0.9939405918121338, 'polygon': [[87.0, 369.0], [462.0, 369.0], [462.0, 425.0], [87.0, 425.0]], 'bbox': (87, 369, 376, 57), 'method': 'polygon'}] +[2025-11-22 13:28:17,294] [MainThread] [INFO] [onnx_ocr_wrapper.py:filter_chinese_text:1192] 중국어 텍스트 4개 필터링 완료 +[2025-11-22 13:28:17,294] [MainThread] [INFO] [onnx_ocr_wrapper.py:filter_korean_text:1213] 한글 텍스트 0개 필터링 완료 +[2025-11-22 13:28:17,616] [MainThread] [DEBUG] [image_processor3.py:process_single_image:714] translated_texts: ['모던한 미니멀 스타일', '다양한 사용 시나리오에 더 쉽게 일치', '반원형 끝 디자인', '온갖 기쁨을 안고'] +[2025-11-22 13:28:17,616] [MainThread] [DEBUG] [image_processor3.py:process_single_image:715] 마스크 생성 완료 +[2025-11-22 13:28:17,616] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1299] [치환 처리 1] 원본 텍스트: '모던한 미니멀 스타일' +[2025-11-22 13:28:17,616] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1303] [치환 처리 1] 분리된 단어: ['모던한', '미니멀', '스타일'] +[2025-11-22 13:28:17,616] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1344] [치환 처리 1] 변경 없음: '모던한 미니멀 스타일' +[2025-11-22 13:28:17,617] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1299] [치환 처리 2] 원본 텍스트: '다양한 사용 시나리오에 더 쉽게 일치' +[2025-11-22 13:28:17,617] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1303] [치환 처리 2] 분리된 단어: ['다양한', '사용', '시나리오에', '더', '쉽게', '일치'] +[2025-11-22 13:28:17,617] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1344] [치환 처리 2] 변경 없음: '다양한 사용 시나리오에 더 쉽게 일치' +[2025-11-22 13:28:17,617] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1299] [치환 처리 3] 원본 텍스트: '반원형 끝 디자인' +[2025-11-22 13:28:17,617] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1303] [치환 처리 3] 분리된 단어: ['반원형', '끝', '디자인'] +[2025-11-22 13:28:17,617] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1344] [치환 처리 3] 변경 없음: '반원형 끝 디자인' +[2025-11-22 13:28:17,617] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1299] [치환 처리 4] 원본 텍스트: '온갖 기쁨을 안고' +[2025-11-22 13:28:17,617] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1303] [치환 처리 4] 분리된 단어: ['온갖', '기쁨을', '안고'] +[2025-11-22 13:28:17,618] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1344] [치환 처리 4] 변경 없음: '온갖 기쁨을 안고' +[2025-11-22 13:28:17,618] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1346] 전체 치환 결과: 4개 텍스트 처리 완료 +[2025-11-22 13:28:17,618] [MainThread] [DEBUG] [image_processor3.py:process_single_image:724] 이미지 1 치환됨 +[2025-11-22 13:28:17,618] [MainThread] [INFO] [image_processor3.py:process_single_image:740] [inpaint_model 강제] migan → inpaint_method=migan +[2025-11-22 13:28:17,618] [MainThread] [DEBUG] [image_processor3.py:process_single_image:774] ocr_count: 4 +[2025-11-22 13:28:17,618] [MainThread] [DEBUG] [image_processor3.py:process_single_image:775] is_member_valid: True +[2025-11-22 13:28:17,623] [MainThread] [DEBUG] [image_processor3.py:_try_migan_inpaint:1029] MIGAN 인페인팅 시도 +[2025-11-22 13:28:17,628] [MainThread] [DEBUG] [migan_module.py:inpaint:276] [MIGAN] 입력 형태 - 이미지: (1, 3, 1200, 816), 마스크: (1, 1, 1200, 816) +[2025-11-22 13:28:17,953] [MainThread] [DEBUG] [migan_module.py:inpaint:289] [MIGAN] 출력 형태: (1200, 816, 3), dtype: uint8 +[2025-11-22 13:28:17,953] [MainThread] [DEBUG] [migan_module.py:inpaint:297] [MIGAN] 추론 완료: 325.00 ms +[2025-11-22 13:28:17,958] [MainThread] [DEBUG] [image_processor3.py:_try_migan_inpaint:1032] MIGAN 인페인팅 성공 +[2025-11-22 13:28:17,963] [MainThread] [INFO] [image_processor3.py:execute_inpaint_with_fallback:953] 메모리 변화 [인페인팅]: 28358.1MB -> 28711.8MB (+353.7MB, +1.2%) - 방법: migan +[2025-11-22 13:28:17,963] [MainThread] [DEBUG] [image_processor3.py:process_single_image:786] 인페인팅 완료 +[2025-11-22 13:28:18,024] [MainThread] [DEBUG] [image_processor3.py:process_single_image:808] 텍스트 렌더링 완료 +[2025-11-22 13:28:18,024] [MainThread] [DEBUG] [image_processor3.py:postProcess_and_save_image:1131] watermark_text: 이미지 저작권 보유 +[2025-11-22 13:28:18,024] [MainThread] [DEBUG] [image_processor3.py:postProcess_and_save_image:1132] is_watermark_enabled: True +[2025-11-22 13:28:18,032] [MainThread] [INFO] [postImageManager.py:save_image_to_path:101] 이미지 저장 완료 : D:\py\img_worker\modules\test\translated_preview_Pretendard-Regular_img_1.jpg +[2025-11-22 13:28:18,032] [MainThread] [DEBUG] [image_processor3.py:process_single_image:814] 이미지 1 번역 완료: D:\py\img_worker\modules\test\translated_preview_Pretendard-Regular_img_1.jpg +[2025-11-22 13:28:18,093] [MainThread] [DEBUG] [image_processor3.py:process_single_image:867] ⏱ 이미지 파이프라인 총 1436.5ms | download=0.0ms | ocr=238.0ms | translate=321.2ms | mask=321.2ms | inpaint=345.0ms(migan/CPU) | render=61.0ms | save=8.0ms +[2025-11-22 13:28:18,093] [MainThread] [INFO] [create_font_preview.py:main:115] 프리뷰 생성 성공: D:\py\img_worker\modules\test\translated_preview_Pretendard-Regular_img_1.jpg +[2025-11-22 13:28:18,103] [MainThread] [DEBUG] [image_processor3.py:cleanup:430] OCR 모듈 정리 완료 +[2025-11-22 13:28:18,103] [MainThread] [DEBUG] [image_processor3.py:cleanup:438] 마스크 모듈 정리 완료 +[2025-11-22 13:28:18,158] [MainThread] [DEBUG] [image_processor3.py:cleanup:473] 임시 폴더 삭제됨: D:\py\img_worker\modules\test +[2025-11-22 13:28:18,210] [MainThread] [DEBUG] [image_processor3.py:cleanup:473] 임시 폴더 삭제됨: D:\py\img_worker\modules\test +[2025-11-22 13:28:18,211] [MainThread] [DEBUG] [image_processor3.py:__del__:421] 이미지 프로세서 소멸 diff --git a/build/exe.win-amd64-3.11/.env b/build/exe.win-amd64-3.11/.env deleted file mode 100644 index 862e8b5..0000000 --- a/build/exe.win-amd64-3.11/.env +++ /dev/null @@ -1,23 +0,0 @@ -# 큐 대기 한도(가득 차면 429) -IMGWK_MAX_PENDING=400 - -IMGWK_WORKER_READY_TIMEOUT_SEC = 120 # 워커 작시 READY 타임아웃 - -# 워커 롤링 임계치 -IMGWK_ROLL_MAX_RSS_MB=3600 -IMGWK_ROLL_MAX_JOBS=500 -IMGWK_ROLL_MAX_UPTIME_SEC=3600 - -# 잡 타임아웃(초) -IMGWK_JOB_TIMEOUT_SEC=600 - -# 테스트: 2건마다 워커 재시작 (1=활성화) -IMGWK_TEST_ROLL_EVERY_2=0 - -IMGWK_OCR_PROVIDER=auto # auto|dml|cpu -IMGWK_MIGAN_PROVIDER=auto # auto|dml|cpu -IMGWK_REMBG_PROVIDER=auto # auto|dml|cpu - -IMGWK_NO_TRAY = 0 # IMGWK_NO_TRAY=1 설정 시 트레이 비활성화 - -IMGWK_CLEAN_OLDER_THAN_SEC = 600 # 5분이 지난 파일만 정리하기 diff --git a/build/exe.win-amd64-3.11/ImgWorker.exe b/build/exe.win-amd64-3.11/ImgWorker.exe deleted file mode 100644 index f6e64e5..0000000 Binary files a/build/exe.win-amd64-3.11/ImgWorker.exe and /dev/null differ diff --git a/build/exe.win-amd64-3.11/ImgWorker.zip b/build/exe.win-amd64-3.11/ImgWorker.zip deleted file mode 100644 index 813e6c4..0000000 Binary files a/build/exe.win-amd64-3.11/ImgWorker.zip and /dev/null differ diff --git a/build/exe.win-amd64-3.11/ImgWorkerTray.exe b/build/exe.win-amd64-3.11/ImgWorkerTray.exe deleted file mode 100644 index 8cabc26..0000000 Binary files a/build/exe.win-amd64-3.11/ImgWorkerTray.exe and /dev/null differ diff --git a/build/exe.win-amd64-3.11/concrt140.dll b/build/exe.win-amd64-3.11/concrt140.dll deleted file mode 100644 index ec4000d..0000000 Binary files a/build/exe.win-amd64-3.11/concrt140.dll and /dev/null differ diff --git a/build/exe.win-amd64-3.11/frozen_application_license.txt b/build/exe.win-amd64-3.11/frozen_application_license.txt deleted file mode 100644 index 0a8ea37..0000000 --- a/build/exe.win-amd64-3.11/frozen_application_license.txt +++ /dev/null @@ -1,63 +0,0 @@ -## Why this file is included - -This program has been frozen with cx_Freeze. The freezing process -resulted in certain components from the cx_Freeze software being included -in the frozen application, in particular bootstrap code for launching -the frozen python script. The cx_Freeze software is subject to the -license set out below. - -# Licensing - -- Copyright © 2020-2025, Marcelo Duarte. -- Copyright © 2007-2019, Anthony Tuininga. -- Copyright © 2001-2006, Computronix (Canada) Ltd., Edmonton, Alberta, - Canada. -- All rights reserved. - -NOTE: This license is derived from the Python Software Foundation -License which can be found at - - -## License for cx_Freeze - -1. This LICENSE AGREEMENT is between the copyright holders and the - Individual or Organization ("Licensee") accessing and otherwise - using cx_Freeze software in source or binary form and its associated - documentation. -2. Subject to the terms and conditions of this License Agreement, the - copyright holders hereby grant Licensee a nonexclusive, - royalty-free, world-wide license to reproduce, analyze, test, - perform and/or display publicly, prepare derivative works, - distribute, and otherwise use cx_Freeze alone or in any derivative - version, provided, however, that this License Agreement and this - notice of copyright are retained in cx_Freeze alone or in any - derivative version prepared by Licensee. -3. In the event Licensee prepares a derivative work that is based on or - incorporates cx_Freeze or any part thereof, and wants to make the - derivative work available to others as provided herein, then - Licensee hereby agrees to include in any such work a brief summary - of the changes made to cx_Freeze. -4. The copyright holders are making cx_Freeze available to Licensee on - an "AS IS" basis. THE COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR - WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT - LIMITATION, THE COPYRIGHT HOLDERS MAKE NO AND DISCLAIM ANY - REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY - PARTICULAR PURPOSE OR THAT THE USE OF CX_FREEZE WILL NOT INFRINGE - ANY THIRD PARTY RIGHTS. -5. THE COPYRIGHT HOLDERS SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER - USERS OF CX_FREEZE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL - DAMAGES OR LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE - USING CX_FREEZE, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE - POSSIBILITY THEREOF. -6. This License Agreement will automatically terminate upon a material - breach of its terms and conditions. -7. Nothing in this License Agreement shall be deemed to create any - relationship of agency, partnership, or joint venture between the - copyright holders and Licensee. This License Agreement does not - grant permission to use copyright holder's trademarks or trade name - in a trademark sense to endorse or promote products or services of - Licensee, or any third party. -8. By copying, installing or otherwise using cx_Freeze, Licensee agrees - to be bound by the terms and conditions of this License Agreement. - -Computronix® is a registered trademark of Computronix (Canada) Ltd. diff --git a/build/exe.win-amd64-3.11/msvcp140.dll b/build/exe.win-amd64-3.11/msvcp140.dll deleted file mode 100644 index bea9c37..0000000 Binary files a/build/exe.win-amd64-3.11/msvcp140.dll and /dev/null differ diff --git a/build/exe.win-amd64-3.11/msvcp140_1.dll b/build/exe.win-amd64-3.11/msvcp140_1.dll deleted file mode 100644 index e1913ef..0000000 Binary files a/build/exe.win-amd64-3.11/msvcp140_1.dll and /dev/null differ diff --git a/build/exe.win-amd64-3.11/msvcp140_2.dll b/build/exe.win-amd64-3.11/msvcp140_2.dll deleted file mode 100644 index de91706..0000000 Binary files a/build/exe.win-amd64-3.11/msvcp140_2.dll and /dev/null differ diff --git a/build/exe.win-amd64-3.11/msvcp140_atomic_wait.dll b/build/exe.win-amd64-3.11/msvcp140_atomic_wait.dll deleted file mode 100644 index 077981c..0000000 Binary files a/build/exe.win-amd64-3.11/msvcp140_atomic_wait.dll and /dev/null differ diff --git a/build/exe.win-amd64-3.11/msvcp140_codecvt_ids.dll b/build/exe.win-amd64-3.11/msvcp140_codecvt_ids.dll deleted file mode 100644 index 6492087..0000000 Binary files a/build/exe.win-amd64-3.11/msvcp140_codecvt_ids.dll and /dev/null differ diff --git a/build/exe.win-amd64-3.11/python3.dll b/build/exe.win-amd64-3.11/python3.dll deleted file mode 100644 index 4697e72..0000000 Binary files a/build/exe.win-amd64-3.11/python3.dll and /dev/null differ diff --git a/build/exe.win-amd64-3.11/python311.dll b/build/exe.win-amd64-3.11/python311.dll deleted file mode 100644 index 701d943..0000000 Binary files a/build/exe.win-amd64-3.11/python311.dll and /dev/null differ diff --git a/build/exe.win-amd64-3.11/vcamp140.dll b/build/exe.win-amd64-3.11/vcamp140.dll deleted file mode 100644 index 6cbca35..0000000 Binary files a/build/exe.win-amd64-3.11/vcamp140.dll and /dev/null differ diff --git a/build/exe.win-amd64-3.11/vccorlib140.dll b/build/exe.win-amd64-3.11/vccorlib140.dll deleted file mode 100644 index 9f72ffc..0000000 Binary files a/build/exe.win-amd64-3.11/vccorlib140.dll and /dev/null differ diff --git a/build/exe.win-amd64-3.11/vcomp140.dll b/build/exe.win-amd64-3.11/vcomp140.dll deleted file mode 100644 index dc2d193..0000000 Binary files a/build/exe.win-amd64-3.11/vcomp140.dll and /dev/null differ diff --git a/build/exe.win-amd64-3.11/vcruntime140.dll b/build/exe.win-amd64-3.11/vcruntime140.dll deleted file mode 100644 index 5786e93..0000000 Binary files a/build/exe.win-amd64-3.11/vcruntime140.dll and /dev/null differ diff --git a/build/exe.win-amd64-3.11/vcruntime140_1.dll b/build/exe.win-amd64-3.11/vcruntime140_1.dll deleted file mode 100644 index 0b660f9..0000000 Binary files a/build/exe.win-amd64-3.11/vcruntime140_1.dll and /dev/null differ diff --git a/build/exe.win-amd64-3.11/vcruntime140_threads.dll b/build/exe.win-amd64-3.11/vcruntime140_threads.dll deleted file mode 100644 index 36323c1..0000000 Binary files a/build/exe.win-amd64-3.11/vcruntime140_threads.dll and /dev/null differ diff --git a/main.py b/main.py index 7e77da1..618c522 100644 --- a/main.py +++ b/main.py @@ -969,6 +969,42 @@ class WorkerManager: time.sleep(0.05) return False + def update_toggle_states(self, updates: Dict[str, Any], timeout: float = 10.0) -> bool: + # 로컬 상태 업데이트 + self._toggle_states.update(updates) + # 경로 보정 (TEMP_IMAGE_DIR 등) + self._toggle_states = self._merge_toggle_overrides(None) + + job_id = str(uuid.uuid4()) + with self._jobs_lock: + now = time.time() + self._jobs[job_id] = JobInfo( + job_id=job_id, + status="queued", + created_at=now, + updated_at=now, + kind="update_toggle_states", + request=updates, + gen=self._generation, + timeout_at=now + 15, + ) + + # 워커에게 전체 토글 상태 전송 + task = { + "id": job_id, + "cmd": "update_toggle_states", + "kwargs": {"_toggle_states": self._toggle_states} + } + self._enqueue_or_buffer(task) + + end = time.time() + timeout + while time.time() < end: + info = self.get_job(job_id) + if info and info.status in ("done", "error"): + return bool((info.result or {}).get("ok", False)) and info.status == "done" + time.sleep(0.05) + return False + # -------------------------- 롤링 로직 -------------------------- def _memory_monitor(self): # 주기적으로 RSS/업타임 확인 @@ -1280,6 +1316,20 @@ def get_job(job_id: str): return json.loads(info.json()) +class UpdateToggleRequest(BaseModel): + updates: Dict[str, Any] = Field(..., description="업데이트할 토글 상태 딕셔너리") + + +@app.post("/v1/toggle/update") +def update_toggle(req: UpdateToggleRequest): + if _worker is None or not _worker.is_ready: + raise HTTPException(status_code=503, detail="Worker not ready") + ok = _worker.update_toggle_states(req.updates) + if not ok: + raise HTTPException(status_code=500, detail="update toggle failed") + return {"ok": True} + + class ReinitOCRRequest(BaseModel): provider: Optional[str] = Field(None, description="ocr provider override: auto|dml|cpu") diff --git a/modules/__pycache__/image_processor3.cpython-311.pyc b/modules/__pycache__/image_processor3.cpython-311.pyc index 664bfda..04d6798 100644 Binary files a/modules/__pycache__/image_processor3.cpython-311.pyc and b/modules/__pycache__/image_processor3.cpython-311.pyc differ diff --git a/modules/__pycache__/image_worker.cpython-311.pyc b/modules/__pycache__/image_worker.cpython-311.pyc index e080ff4..08fd39a 100644 Binary files a/modules/__pycache__/image_worker.cpython-311.pyc and b/modules/__pycache__/image_worker.cpython-311.pyc differ diff --git a/modules/__pycache__/request_inpaint.cpython-311.pyc b/modules/__pycache__/request_inpaint.cpython-311.pyc index fbda949..09be0fa 100644 Binary files a/modules/__pycache__/request_inpaint.cpython-311.pyc and b/modules/__pycache__/request_inpaint.cpython-311.pyc differ diff --git a/modules/fonts/GmarketSansTTFMedium.ttf b/modules/fonts/GmarketSansTTFMedium.ttf new file mode 100644 index 0000000..2ac3b7f Binary files /dev/null and b/modules/fonts/GmarketSansTTFMedium.ttf differ diff --git a/modules/fonts/Paperlogy-5Medium.ttf b/modules/fonts/Paperlogy-5Medium.ttf new file mode 100644 index 0000000..d4a30e1 Binary files /dev/null and b/modules/fonts/Paperlogy-5Medium.ttf differ diff --git a/modules/fonts/Pretendard-Regular.ttf b/modules/fonts/Pretendard-Regular.ttf new file mode 100644 index 0000000..01147e9 Binary files /dev/null and b/modules/fonts/Pretendard-Regular.ttf differ diff --git a/modules/fonts/fonts_map.json b/modules/fonts/fonts_map.json new file mode 100644 index 0000000..54c2929 --- /dev/null +++ b/modules/fonts/fonts_map.json @@ -0,0 +1,10 @@ +{ + "폰트1": "HakgyoansimDunggeunmisoTTFB.ttf", + "폰트2": "NanumBarunGothic.ttf", + "폰트3": "NanumSquareRoundR.ttf", + "폰트4": "gamtanload.ttf", + "폰트5": "Cafe24Ohsquare-v2.0.ttf", + "폰트6": "GmarketSansTTFMedium.ttf", + "폰트7": "Paperlogy-5Medium.ttf", + "폰트8": "Pretendard-Regular.ttf" +} diff --git a/modules/fonts/ori.jpg b/modules/fonts/ori.jpg new file mode 100644 index 0000000..d810fab Binary files /dev/null and b/modules/fonts/ori.jpg differ diff --git a/modules/image_processor3.py b/modules/image_processor3.py index 0ee9f19..719ee95 100644 --- a/modules/image_processor3.py +++ b/modules/image_processor3.py @@ -90,44 +90,9 @@ class ImageProcessor3: self.inpaint_method = 'migan' - # 폰트 선택: toggle_states['font_type'] 기반으로 modules/fonts 내 파일 매핑 - fonts_dir = os.path.join(self.base_dir, "fonts") - font_map = { - "폰트1": "HakgyoansimDunggeunmisoTTFB.ttf", - "폰트2": "NanumBarunGothic.ttf", - "폰트3": "NanumSquareRoundR.ttf", - "폰트4": "gamtanload.ttf", - "폰트5": "Cafe24Ohsquare-v2.0.ttf", - } - font_type = self.toggle_states.get("font_type", "폰트1") - if isinstance(font_type, str) and font_type.strip(): - font_key = font_type.strip() - else: - font_key = "폰트1" # 기본값 - - chosen_file = font_map.get(font_key, font_map["폰트1"]) if font_map else None - candidate_paths = [] - if chosen_file: - candidate_paths.append(os.path.join(fonts_dir, chosen_file)) - # 추가 폴백 경로들 - candidate_paths.extend([ - self.toggle_states.get('image_font_path', ""), - os.path.join(self.base_dir, "HakgyoansimDunggeunmisoTTFB.ttf"), - "C:/Windows/Fonts/malgun.ttf", - "C:/Windows/Fonts/gulim.ttc", - ]) - - resolved_font_path = None - for p in candidate_paths: - try: - if p and os.path.exists(p): - resolved_font_path = p - break - except Exception: - continue - - # 최종 폰트 경로 확정 - self.font_path = resolved_font_path or self.toggle_states.get('image_font_path', os.path.join(self.base_dir, "HakgyoansimDunggeunmisoTTFB.ttf")) + # 폰트 경로 결정 + self.font_path = self._resolve_font_path(self.toggle_states.get("font_type", "폰트1")) + # PostImageManager 등 하위 모듈과 공유 try: self.toggle_states['image_font_path'] = self.font_path @@ -301,6 +266,61 @@ class ImageProcessor3: self.logger.log(f"ImageProcessor3 초기화 중 치명적 오류 발생: {e}", level=logging.ERROR, exc_info=True) # 치명적 오류 발생 시에도 기본 속성들이 None으로라도 설정되도록 보장 + def _resolve_font_path(self, font_type): + """font_type("폰트1" 등)에 해당하는 실제 폰트 파일 경로를 반환""" + import json + fonts_dir = os.path.join(self.base_dir, "fonts") + map_file = os.path.join(fonts_dir, "fonts_map.json") + + # 기본 매핑 테이블 (파일 로드 실패 시 사용) + default_map = { + "폰트1": "HakgyoansimDunggeunmisoTTFB.ttf", + "폰트2": "NanumBarunGothic.ttf", + "폰트3": "NanumSquareRoundR.ttf", + "폰트4": "gamtanload.ttf", + "폰트5": "Cafe24Ohsquare-v2.0.ttf", + "폰트6": "GmarketSansTTFMedium.ttf", + "폰트7": "Paperlogy-5Medium.ttf", + "폰트8": "Pretendard-Regular.ttf", + } + + font_map = default_map + + # fonts_map.json 로드 시도 + try: + if os.path.exists(map_file): + with open(map_file, "r", encoding="utf-8") as f: + font_map = json.load(f) + except Exception as e: + self.logger.log(f"폰트 매핑 파일 로드 실패 ({map_file}): {e}, 기본값 사용", level=logging.WARNING) + + # 1. font_type에 매핑된 파일 찾기 + font_key = str(font_type).strip() + # 매핑에 없으면 기본값(폰트1) 사용 + font_filename = font_map.get(font_key, font_map.get("폰트1", default_map["폰트1"])) + + # 2. 실제 경로 구성 + candidate_path = os.path.join(fonts_dir, font_filename) + if os.path.exists(candidate_path): + return candidate_path + + # 3. 파일이 없으면 기본 폰트(폰트1)로 폴백 + default_filename = font_map.get("폰트1", default_map["폰트1"]) + default_path = os.path.join(fonts_dir, default_filename) + if os.path.exists(default_path): + return default_path + + # 4. 정말 아무것도 없으면 시스템 폰트 등 최후의 수단 (혹은 예외) + fallback_candidates = [ + "C:/Windows/Fonts/malgun.ttf", + "C:/Windows/Fonts/gulim.ttc" + ] + for p in fallback_candidates: + if os.path.exists(p): + return p + + return default_path # 경로가 없어도 일단 리턴 + def _create_fallback_post_image_manager(self): """PostImageManager 초기화 실패 시 사용할 fallback 객체 생성""" @@ -350,6 +370,36 @@ class ImageProcessor3: def update_toggle_states(self, toggle_states): self.toggle_states = toggle_states + + # 1. 멤버십 및 권한 정보 업데이트 + self.is_member_valid = self.toggle_states.get('membership_level', 'basic') == 'vip' or self.authenticated_by_admin + + # 2. 인페인팅 설정 업데이트 + self.inpaint_method = self.toggle_states.get("inpaint_method", "migan") + self.use_local_rembg = self.toggle_states.get("use_local_rembg", False) + self.local_model_name = self.toggle_states.get("local_model_name", 'birefnet-general-lite') + + # 3. 폰트 경로 및 렌더링 모듈 업데이트 + try: + new_font_path = self._resolve_font_path(self.toggle_states.get("font_type", "폰트1")) + + # 폰트가 변경되었다면 렌더링 모듈 재생성 + if new_font_path and new_font_path != self.font_path: + self.font_path = new_font_path + # toggle_states에도 반영 + self.toggle_states['image_font_path'] = self.font_path + + if hasattr(self, 'text_rendering_module'): + try: + from modules.text_rendering_module import TextRenderingModuleOptimized + self.text_rendering_module = TextRenderingModuleOptimized(logger=self.logger, font_path=self.font_path) + self.logger.log(f"폰트 변경으로 텍스트 렌더링 모듈 재생성: {self.font_path}", level=logging.INFO) + except Exception as tr_err: + self.logger.log(f"텍스트 렌더링 모듈 재생성 실패: {tr_err}", level=logging.ERROR) + + except Exception as e: + self.logger.log(f"폰트 정보 업데이트 중 오류: {e}", level=logging.WARNING) + if self.postImageManager is not None: try: self.postImageManager.update_toggle_states(self.toggle_states) @@ -358,6 +408,8 @@ class ImageProcessor3: self.logger.log(f"PostImageManager toggle_states 업데이트 중 오류: {e}", level=logging.ERROR, exc_info=True) else: self.logger.log("PostImageManager가 None이므로 toggle_states 업데이트를 건너뜁니다.", level=logging.WARNING) + + self.logger.log(f"[UpdateToggle] 완료: member={self.is_member_valid}, inpaint={self.inpaint_method}, font={os.path.basename(self.font_path)}", level=logging.DEBUG) def update_unwanted_texts(self, texts): self.unwanted_texts = texts @@ -516,6 +568,8 @@ class ImageProcessor3: # self.logger.log(f"unwanted_texts: {self.unwanted_texts}", level=logging.DEBUG) self.logger.log(f"이미지 번역시작", level=logging.DEBUG) + + self.logger.log(f"toggle_states: {self.toggle_states}", level=logging.DEBUG) try: # 0. 이미지 URL 유효성 체크 (http/https & 이미지 확장자) if not original_image_url or not isinstance(original_image_url, str): @@ -845,13 +899,15 @@ class ImageProcessor3: def execute_inpaint_with_fallback(self, local_image_path: str, masks, ocr_count: int): """ - 인페인팅 실행 – MIGAN으로 통일. 실패 시 None 반환. - + 인페인팅 실행 - toggle_states['inpaint_method'] 설정에 따라 분기. + 'external_request'인 경우 VIP 체크 후 외부 서버 시도, 실패 시 MIGAN 폴백. + 그 외의 경우(또는 폴백 시) MIGAN 사용. + Args: local_image_path: 이미지 파일 경로 masks: 마스크 데이터 ocr_count: OCR 결과 개수 - + Returns: 인페인팅된 이미지 또는 None """ @@ -859,9 +915,35 @@ class ImageProcessor3: inpaint_before_mem = psutil.virtual_memory() inpaint_before_mb = inpaint_before_mem.used / 1024 / 1024 - # MIGAN 고정 - self.inpaint_method = 'migan' - inpainted_image = self._try_migan_inpaint(local_image_path, masks) + inpainted_image = None + + # 1. 사용자 설정 확인 + preferred_method = self.toggle_states.get("inpaint_method", "migan") + server_url = self.toggle_states.get("request_inpainting_server_url", "") + + # 2. External Request 모드일 때 처리 + if preferred_method == "external_request": + if self.is_member_valid: + if server_url and str(server_url).strip().startswith("http"): + # 외부 서버 시도 + self.inpaint_method = 'external_request' + inpainted_image = self._try_external_inpaint(local_image_path, masks, str(server_url).strip()) + + if inpainted_image is not None: + self._last_inpaint_used = "external_request" + self._last_inpaint_device = "SERVER" + else: + self.logger.log("외부 서버 인페인팅 실패 -> 로컬 MIGAN으로 폴백", level=logging.WARNING) + else: + self.logger.log("외부 서버 URL이 유효하지 않음 -> 로컬 MIGAN으로 폴백", level=logging.WARNING) + else: + self.logger.log("VIP 회원이 아님 -> 로컬 MIGAN으로 폴백", level=logging.WARNING) + + # 3. 로컬 MIGAN 인페인팅 (기본값, 또는 외부 요청 실패/조건 미충족 시) + if inpainted_image is None: + self.inpaint_method = 'migan' + inpainted_image = self._try_migan_inpaint(local_image_path, masks) + # _try_migan_inpaint 내부에서 _last_inpaint_used 설정함 # 메모리 추적: 인페인팅 완료 후 inpaint_after_mem = psutil.virtual_memory() @@ -910,6 +992,33 @@ class ImageProcessor3: + def check_external_server_availability(self): + """외부 인페인팅 서버 유효성 체크""" + try: + server_url = self.toggle_states.get("request_inpainting_server_url", "") + if not server_url or not str(server_url).strip().startswith("http"): + return False + + if self.request_ai_server: + return self.request_ai_server.is_server_alive(str(server_url).strip()) + return False + except Exception: + return False + + def _try_external_inpaint(self, local_image_path: str, masks, server_url: str): + """외부 서버 인페인팅 시도""" + try: + if self.request_ai_server is None: + return None + + self.logger.log(f"외부 인페인팅 시도: {server_url}", level=logging.DEBUG) + # 모델명은 필요하면 토글에서 가져올 수 있음, 현재는 기본값 + result = self.request_ai_server.request_external_inpaint(local_image_path, masks, server_url) + return result + except Exception as e: + self.logger.log(f"외부 인페인팅 중 오류: {e}", level=logging.WARNING, exc_info=True) + return None + def _try_migan_inpaint(self, local_image_path: str, masks): """MIGAN GPU 인페인팅 시도""" try: diff --git a/modules/image_worker.py b/modules/image_worker.py index e23876e..14483ba 100644 --- a/modules/image_worker.py +++ b/modules/image_worker.py @@ -420,6 +420,9 @@ def worker_main( elif cmd == "__PING__": # 하트비트 응답 data = "__PONG__" + elif cmd == "update_toggle_states": + # 토글 업데이트는 위쪽 공통 로직에서 이미 수행됨 + data = {"ok": True} else: raise ValueError(f"unknown cmd: {cmd}") diff --git a/modules/request_inpaint.py b/modules/request_inpaint.py index de8dfa0..18b0a64 100644 --- a/modules/request_inpaint.py +++ b/modules/request_inpaint.py @@ -83,6 +83,118 @@ class Request_AI_Server: return None + def request_external_inpaint(self, image: np.ndarray, mask: np.ndarray, server_url: str, invert_mask: bool = False, model_name: str = "simple-lama") -> np.ndarray: + """외부 IOPaint 서버를 이용한 인페인팅 요청 (VIP용) + + Args: + image: 이미지 데이터 (BGR np.ndarray) 또는 파일 경로 + mask: 마스크 데이터 (0/255 uint8) + server_url: 외부 서버 URL (예: http://123.123.123.123:54321) + invert_mask: 마스크 반전 여부 + model_name: 사용할 모델명 + + Returns: + 인페인트된 이미지 (BGR np.ndarray) 또는 None + """ + try: + # URL 정리 + base_url = server_url.rstrip('/') + api_url = f"{base_url}/api/v1/inpaint" + + # 서버 상태 먼저 확인 + if not self.is_server_alive(base_url): + self.logger.log(f"외부 인페인팅 서버({base_url})가 응답하지 않습니다.", level=logging.WARNING) + return None + + image_data = None + # image가 경로(str)라면 파일을 읽어서 np.ndarray로 변환 + if isinstance(image, str) and os.path.isfile(image): + image_data = cv2.imread(image) + elif isinstance(image, np.ndarray): + image_data = image + + if image_data is None: + self.logger.log(f"이미지 데이터를 읽을 수 없습니다: {type(image)}", level=logging.ERROR) + return None + + # ---- 마스크 정규화 (서버 호환성) --------------------------------- + # - 1채널 uint8, 0/255 이진 이미지 보장 + try: + mask_norm = mask + if mask_norm is None: + self.logger.log("마스크가 None입니다", level=logging.ERROR) + return None + + if mask_norm.ndim == 3: + mask_norm = cv2.cvtColor(mask_norm, cv2.COLOR_BGR2GRAY) + + if mask_norm.dtype != np.uint8: + mask_norm = mask_norm.astype(np.uint8) + + # 임계값 0 초과 → 255 (blurred mask 대응) + _, mask_norm = cv2.threshold(mask_norm, 0, 255, cv2.THRESH_BINARY) + + # 이미지 크기와 다르면 안전하게 리사이즈 + if mask_norm.shape[:2] != image_data.shape[:2]: + self.logger.log( + f"마스크 크기 보정: mask={mask_norm.shape} → image={image_data.shape[:2]}", + level=logging.WARNING, + ) + mask_norm = cv2.resize(mask_norm, (image_data.shape[1], image_data.shape[0]), interpolation=cv2.INTER_NEAREST) + + # 필요 시 반전 (서버 마스크 규약 차이 대응) + if invert_mask: + try: + mask_norm = cv2.bitwise_not(mask_norm) + self.logger.log("invert_mask=True → 마스크 반전 적용", level=logging.DEBUG) + except Exception as inv_err: + self.logger.log(f"마스크 반전 실패: {inv_err}", level=logging.WARNING) + + except Exception as norm_err: + self.logger.log(f"마스크 정규화 실패: {norm_err}", level=logging.ERROR) + return None + + # 이미지를 base64로 인코딩 + _, img_encoded = cv2.imencode('.png', image_data) + _, mask_encoded = cv2.imencode('.png', mask_norm) + img_b64 = base64.b64encode(img_encoded).decode('utf-8') + mask_b64 = base64.b64encode(mask_encoded).decode('utf-8') + + payload = { + "image": img_b64, + "mask": mask_b64, + "model_name": model_name + } + + # 요청 파라미터 명시: 이 서버는 Accept 에 따라 응답이 달라질 수 있으므로 쿼리로 고정 + params = { + "response_format": "binary", + "image_format": "png", + } + + self.logger.log(f"외부 인페인팅 서버 요청: {api_url}, model={model_name}", level=logging.DEBUG) + response = requests.post(api_url, params=params, json=payload, timeout=(5, 45)) + + if response.status_code != 200: + self.logger.log(f"외부 인페인팅 서버 에러: {response.status_code} {response.text}", level=logging.WARNING) + return None + + # 응답이 바이너리 PNG 이미지이므로 바로 디코딩 + nparr = np.frombuffer(response.content, np.uint8) + result = cv2.imdecode(nparr, cv2.IMREAD_COLOR) + + if result is not None: + self.logger.log("외부 인페인팅 성공", level=logging.DEBUG) + + return result + + except (requests.exceptions.Timeout, requests.exceptions.ConnectionError, requests.exceptions.RequestException) as e: + self.logger.log(f"외부 인페인팅 서버 요청 실패: {e}", level=logging.WARNING) + return None + except Exception as e: + self.logger.log(f"외부 인페인팅 실행 중 에러: {e}", level=logging.ERROR, exc_info=True) + return None + def request_inpaint(self, image: np.ndarray, mask: np.ndarray, invert_mask: bool = False, inpaint_model: str = "migan") -> np.ndarray: """로컬 MIGAN으로 인페인팅 수행. diff --git a/modules/test/6.jpg b/modules/test/6.jpg new file mode 100644 index 0000000..712197f Binary files /dev/null and b/modules/test/6.jpg differ diff --git a/modules/test/Edit_PartTimer_log.log b/modules/test/Edit_PartTimer_log.log new file mode 100644 index 0000000..81d0f99 --- /dev/null +++ b/modules/test/Edit_PartTimer_log.log @@ -0,0 +1,805 @@ +[2025-11-22 11:50:22,682] [MainThread] [DEBUG] [image_processor3.py:__init__:57] tracemalloc 메모리 추적 시작 +[2025-11-22 11:50:22,688] [MainThread] [DEBUG] [gpu_utils.py:_setup_directml_environment:55] ✅ DirectML 환경 준비 완료 (Windows DirectX 12 기반) +[2025-11-22 11:50:22,688] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:79] === 🚀 DirectML GPU 상태 초기화 시작 🚀 === +[2025-11-22 11:50:22,688] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:80] 🎯 사용자 GPU 가속 요청: False +[2025-11-22 11:50:22,689] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:81] 💻 현재 운영체제: Windows +[2025-11-22 11:50:22,689] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:84] GPU 가속이 비활성화됨 (toggle_states['use_cuda'] = False) +[2025-11-22 11:50:22,689] [MainThread] [INFO] [gpu_utils.py:_set_safe_cpu_mode:157] 🔒 안전한 CPU 모드로 모든 GPU 설정 강제 비활성화 +[2025-11-22 11:50:22,689] [MainThread] [DEBUG] [image_processor3.py:__init__:79] 🔧 ImageProcessor3 GPU 상태 요약: +[2025-11-22 11:50:22,689] [MainThread] [DEBUG] [image_processor3.py:__init__:80] - CUDA 사용 가능: False +[2025-11-22 11:50:22,690] [MainThread] [DEBUG] [image_processor3.py:__init__:81] - toggle_states['use_cuda']: False +[2025-11-22 11:50:22,690] [MainThread] [DEBUG] [image_processor3.py:__init__:82] - GPU 하드웨어 정보: {} +[2025-11-22 11:50:22,690] [MainThread] [DEBUG] [image_processor3.py:__init__:84] ImageProcessor3 Init toggle_states: {'font_type': '폰트3', 'image_font_path': 'D:\\py\\img_worker\\modules\\fonts\\GmarketSansTTFMedium.ttf', 'ocr': True, 'force_cpu_ocr': True, 'use_cuda': False, 'inpaint_model': 'migan', 'local_inpaint_method': 'migan', 'migan_onnx_path': 'D:\\py\\img_worker\\modules\\migan_onnx\\migan_pipeline_v2.onnx', 'migan_use_accel': False, 'migan_provider_override': 'cpu', 'detail_IMGTrans_type': 'CPU', 'optionIMGTrans_type': 'CPU', 'thumb_trans_type': 'CPU', 'TEMP_IMAGE_DIR': 'D:\\py\\img_worker\\modules\\test', 'output_image_format': 'jpg', 'watermark_toggle': False, 'store_ocr_data_to_db': False, 'ocr_engine': 'onnx'} +[2025-11-22 11:50:22,690] [MainThread] [DEBUG] [image_processor3.py:__init__:87] is_member_valid: True +[2025-11-22 11:50:22,691] [MainThread] [DEBUG] [image_processor3.py:__init__:144] debug_images 디렉토리 이미 존재: D:\py\img_worker\modules\debug_images +[2025-11-22 11:50:22,691] [MainThread] [DEBUG] [image_processor3.py:__init__:152] self.font_path: D:\py\img_worker\modules\fonts\NanumSquareRoundR.ttf +[2025-11-22 11:50:22,691] [MainThread] [DEBUG] [image_processor3.py:__init__:154] toggle_states font_path: D:\py\img_worker\modules\fonts\NanumSquareRoundR.ttf +[2025-11-22 11:50:22,691] [MainThread] [DEBUG] [image_processor3.py:__init__:156] self.TEMP_IMAGE_DIR: D:\py\img_worker\modules\test +[2025-11-22 11:50:22,691] [MainThread] [DEBUG] [image_processor3.py:__init__:158] self.debugging_save_Dir: D:\py\img_worker\modules\debug_images +[2025-11-22 11:50:22,691] [MainThread] [DEBUG] [image_processor3.py:__init__:160] self.unwanted_texts: {} +[2025-11-22 11:50:22,692] [MainThread] [DEBUG] [image_processor3.py:__init__:162] self.inpaint_method: migan +[2025-11-22 11:50:22,692] [MainThread] [DEBUG] [image_processor3.py:__init__:168] Image.MAX_IMAGE_PIXELS set to 20000000 +[2025-11-22 11:50:22,692] [MainThread] [DEBUG] [onnx_ocr_wrapper.py:_determine_model_type:447] ONNX 모델 타입 설정값: 자동 선택, GPU 정보: {} +[2025-11-22 11:50:22,692] [MainThread] [INFO] [onnx_ocr_wrapper.py:_determine_model_type:453] 자동 선택 모드: GPU 추천 모델 simp 사용 +[2025-11-22 11:50:22,693] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:324] ONNX OCR 모델 타입 결정: simp (GPU: False) +[2025-11-22 11:50:22,693] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:333] ONNX OCR 모듈 CPU 모드로 설정 +[2025-11-22 11:50:22,693] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:356] 🚀 ONNX TextSystem 초기화 시작 (CPU 모드) +[2025-11-22 11:50:22,693] [MainThread] [DEBUG] [onnx_ocr_wrapper.py:_initialize_onnx_system:539] 🚀 ONNX TextSystem 초기화 시작 (CPU 모드) +[2025-11-22 11:50:24,770] [MainThread] [DEBUG] [onnx_ocr_wrapper.py:_ensure_utf8_encoding:487] 문자 사전 파일 UTF-8 확인 완료: D:\py\img_worker\modules\onnx_ocr_module\dict\ppocr_keys_v1.txt +[2025-11-22 11:50:24,879] [MainThread] [INFO] [onnx_ocr_wrapper.py:_initialize_onnx_system:743] ✅ ONNX TextSystem 초기화 완료 (CPU + SIMP (호환성) 모델) +[2025-11-22 11:50:24,879] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:363] ✅ ONNX TextSystem 초기화 완료 (CPU + SIMP 모델) +[2025-11-22 11:50:24,879] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:364] ✅ ONNX OCR 모듈 초기화 성공 (CPU 모드) +[2025-11-22 11:50:24,880] [MainThread] [INFO] [image_processor3.py:__init__:175] ✅ ONNX OCR 모듈 초기화 성공 +[2025-11-22 11:50:24,880] [MainThread] [INFO] [mask_module_for_paddle.py:__init__:12] 마스크 모듈 초기화 완료 +[2025-11-22 11:50:24,880] [MainThread] [DEBUG] [image_processor3.py:__init__:216] MaskModule 초기화 성공 +[2025-11-22 11:50:24,880] [MainThread] [INFO] [text_rendering_module.py:__init__:21] 텍스트 렌더링 모듈 초기화 완료 +[2025-11-22 11:50:24,881] [MainThread] [INFO] [text_rendering_module.py:__init__:22] 기본 폰트: D:\py\img_worker\modules\fonts\NanumSquareRoundR.ttf +[2025-11-22 11:50:24,881] [MainThread] [DEBUG] [image_processor3.py:__init__:222] TextRenderingModule 초기화 성공 +[2025-11-22 11:50:24,883] [MainThread] [DEBUG] [postImageManager.py:font_load:40] 폰트 로드 성공: D:\py\img_worker\modules\fonts\NanumSquareRoundR.ttf +[2025-11-22 11:50:24,883] [MainThread] [DEBUG] [image_processor3.py:__init__:228] PostImageManager 초기화 성공 +[2025-11-22 11:50:24,883] [MainThread] [DEBUG] [request_inpaint.py:__init__:43] Request_AI_Server GPU 상태: CUDA 사용 가능=False +[2025-11-22 11:50:24,884] [MainThread] [DEBUG] [image_processor3.py:__init__:251] Request_AI_Server 초기화 성공 +[2025-11-22 11:50:24,884] [MainThread] [DEBUG] [image_processor3.py:__init__:258] GoogleTranslate 초기화 성공 +[2025-11-22 11:50:24,885] [MainThread] [DEBUG] [image_processor3.py:__init__:284] MIGAN CUDA 사용 불가 - CPU 모드로 설정 +[2025-11-22 11:50:24,885] [MainThread] [DEBUG] [image_processor3.py:__init__:286] [MIGAN] GPU 관리자 전달: GPUManager, can_use_cuda: False +[2025-11-22 11:50:24,886] [MainThread] [DEBUG] [migan_module.py:_get_or_create_session:166] [MIGAN] GPU 관리자 사용 가능: False +[2025-11-22 11:50:24,886] [MainThread] [DEBUG] [migan_module.py:_get_or_create_session:186] [MIGAN] CPU 전용 모드 +[2025-11-22 11:50:24,886] [MainThread] [DEBUG] [migan_module.py:_get_or_create_session:188] [MIGAN] 최종 providers: [('CPUExecutionProvider', {})] +[2025-11-22 11:50:24,886] [MainThread] [DEBUG] [migan_module.py:_get_or_create_session:204] [MIGAN] CPU 전용 시도: [('CPUExecutionProvider', {})] +[2025-11-22 11:50:24,970] [MainThread] [INFO] [migan_module.py:_get_or_create_session:207] [MIGAN] CPU 전용 성공! 실제 providers: ['CPUExecutionProvider'] +[2025-11-22 11:50:24,971] [MainThread] [DEBUG] [migan_module.py:__init__:115] [MIGAN] 입력 0: image, 형태: ['batch_size', 3, 'height', 'width'], 타입: tensor(uint8) +[2025-11-22 11:50:24,971] [MainThread] [DEBUG] [migan_module.py:__init__:115] [MIGAN] 입력 1: mask, 형태: ['batch_size', 1, 'height', 'width'], 타입: tensor(uint8) +[2025-11-22 11:50:24,971] [MainThread] [DEBUG] [migan_module.py:__init__:117] [MIGAN] 출력 0: result, 형태: ['ScatterNDresult_dim_0', 3, 'ScatterNDresult_dim_2', 'ScatterNDresult_dim_3'], 타입: tensor(uint8) +[2025-11-22 11:50:24,971] [MainThread] [DEBUG] [migan_module.py:__init__:119] [MIGAN] 세션 준비 완료. providers=['CPUExecutionProvider'] +[2025-11-22 11:50:24,972] [MainThread] [DEBUG] [migan_module.py:build_migan_from_toggle:348] [MIGAN] GPU 관리자 연결 완료: GPUManager +[2025-11-22 11:50:24,972] [MainThread] [DEBUG] [migan_module.py:build_migan_from_toggle:355] [MIGAN] 파이프라인 gpu_manager 속성: True, 값: +[2025-11-22 11:50:24,972] [MainThread] [DEBUG] [image_processor3.py:__init__:288] [MIGAN] 초기화 완료: gpu_manager 속성=True, 값= +[2025-11-22 11:50:24,972] [MainThread] [INFO] [create_font_preview.py:main:98] 프리뷰 생성 시작: GmarketSansTTFMedium.ttf +[2025-11-22 11:50:24,972] [MainThread] [INFO] [create_font_preview.py:main:99] 저장 경로: D:\py\img_worker\modules\test +[2025-11-22 11:50:24,973] [MainThread] [DEBUG] [image_processor3.py:process_single_image:583] 이미지 번역시작 +[2025-11-22 11:50:24,973] [MainThread] [DEBUG] [image_processor3.py:process_single_image:585] toggle_states: {'font_type': '폰트3', 'image_font_path': 'D:\\py\\img_worker\\modules\\fonts\\NanumSquareRoundR.ttf', 'ocr': True, 'force_cpu_ocr': True, 'use_cuda': False, 'inpaint_model': 'migan', 'local_inpaint_method': 'migan', 'migan_onnx_path': 'D:\\py\\img_worker\\modules\\migan_onnx\\migan_pipeline_v2.onnx', 'migan_use_accel': False, 'migan_provider_override': 'cpu', 'detail_IMGTrans_type': 'CPU', 'optionIMGTrans_type': 'CPU', 'thumb_trans_type': 'CPU', 'TEMP_IMAGE_DIR': 'D:\\py\\img_worker\\modules\\test', 'output_image_format': 'jpg', 'watermark_toggle': False, 'store_ocr_data_to_db': False, 'ocr_engine': 'onnx'} +[2025-11-22 11:50:25,385] [MainThread] [DEBUG] [image_processor3.py:process_single_image:603] 이미지 1 처리 시작: D:\py\img_worker\modules\fonts\ori.jpg - OCR+인페인팅 모드 +[2025-11-22 11:50:25,385] [MainThread] [DEBUG] [image_processor3.py:download_image:1191] 로컬 파일 경로 감지, 다운로드 생략: D:\py\img_worker\modules\fonts\ori.jpg +[2025-11-22 11:50:25,386] [MainThread] [DEBUG] [image_processor3.py:process_single_image:626] 옵션 이미지는 스케일 처리 건너뛰기: preview_GmarketSansTTFMedium +[2025-11-22 11:50:25,386] [MainThread] [DEBUG] [image_processor3.py:process_single_image:636] 이미지 1 로컬 저장위치(옵션 이미지 원본 유지): D:\py\img_worker\modules\fonts\ori.jpg +[2025-11-22 11:50:25,399] [MainThread] [INFO] [onnx_ocr_wrapper.py:detect_text:838] 🔍 ONNX OCR 감지 방식: polygon +[2025-11-22 11:50:25,582] [MainThread] [INFO] [onnx_ocr_wrapper.py:detect_text:906] ⚡ ONNX OCR 추론 완료: 181.9ms +[2025-11-22 11:50:25,582] [MainThread] [INFO] [onnx_ocr_wrapper.py:detect_text:907] 📊 세부 시간 - 감지: 99.0ms, 인식: 71.9ms, 분류: 4.0ms +[2025-11-22 11:50:25,596] [MainThread] [INFO] [image_processor3.py:process_single_image:652] 메모리 변화 [OCR 처리]: 24210.9MB -> 24389.5MB (+178.5MB, +0.7%) - 이미지 1 +[2025-11-22 11:50:25,599] [MainThread] [DEBUG] [image_processor3.py:process_single_image:657] ocr_results: [{'text': '现代极简风格', 'confidence': 0.9946680068969727, 'polygon': [[222.0, 70.0], [552.0, 70.0], [552.0, 118.0], [222.0, 118.0]], 'bbox': (222, 70, 331, 49), 'method': 'polygon'}, {'text': '更易搭配各种使用场景', 'confidence': 0.9957253336906433, 'polygon': [[152.0, 141.0], [622.0, 141.0], [622.0, 180.0], [152.0, 180.0]], 'bbox': (152, 141, 471, 40), 'method': 'polygon'}, {'text': '半圆两端设计', 'confidence': 0.9974236488342285, 'polygon': [[88.0, 289.0], [463.0, 289.0], [463.0, 345.0], [88.0, 345.0]], 'bbox': (88, 289, 376, 57), 'method': 'polygon'}, {'text': '承载各种欢乐', 'confidence': 0.9939405918121338, 'polygon': [[87.0, 369.0], [462.0, 369.0], [462.0, 425.0], [87.0, 425.0]], 'bbox': (87, 369, 376, 57), 'method': 'polygon'}] +[2025-11-22 11:50:25,622] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1101] [필터링] 포함 (신뢰도 99.5%): '现代极简风格' +[2025-11-22 11:50:25,622] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1101] [필터링] 포함 (신뢰도 99.6%): '更易搭配各种使用场景' +[2025-11-22 11:50:25,622] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1101] [필터링] 포함 (신뢰도 99.7%): '半圆两端设计' +[2025-11-22 11:50:25,623] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1101] [필터링] 포함 (신뢰도 99.4%): '承载各种欢乐' +[2025-11-22 11:50:25,623] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1105] 필터링 결과: 4/4개 (신뢰도 + & 중국어) +[2025-11-22 11:50:25,625] [MainThread] [DEBUG] [image_processor3.py:process_single_image:669] filter_ocr_results: [{'text': '现代极简风格', 'confidence': 0.9946680068969727, 'polygon': [[222.0, 70.0], [552.0, 70.0], [552.0, 118.0], [222.0, 118.0]], 'bbox': (222, 70, 331, 49), 'method': 'polygon'}, {'text': '更易搭配各种使用场景', 'confidence': 0.9957253336906433, 'polygon': [[152.0, 141.0], [622.0, 141.0], [622.0, 180.0], [152.0, 180.0]], 'bbox': (152, 141, 471, 40), 'method': 'polygon'}, {'text': '半圆两端设计', 'confidence': 0.9974236488342285, 'polygon': [[88.0, 289.0], [463.0, 289.0], [463.0, 345.0], [88.0, 345.0]], 'bbox': (88, 289, 376, 57), 'method': 'polygon'}, {'text': '承载各种欢乐', 'confidence': 0.9939405918121338, 'polygon': [[87.0, 369.0], [462.0, 369.0], [462.0, 425.0], [87.0, 425.0]], 'bbox': (87, 369, 376, 57), 'method': 'polygon'}] +[2025-11-22 11:50:25,626] [MainThread] [INFO] [onnx_ocr_wrapper.py:filter_chinese_text:1192] 중국어 텍스트 4개 필터링 완료 +[2025-11-22 11:50:25,626] [MainThread] [INFO] [onnx_ocr_wrapper.py:filter_korean_text:1213] 한글 텍스트 0개 필터링 완료 +[2025-11-22 11:50:28,347] [MainThread] [DEBUG] [image_processor3.py:process_single_image:727] translated_texts: ['모던한 미니멀 스타일', '다양한 사용 시나리오에 더 쉽게 일치', '반원형 끝 디자인', '온갖 기쁨을 안고'] +[2025-11-22 11:50:28,348] [MainThread] [DEBUG] [image_processor3.py:process_single_image:728] 마스크 생성 완료 +[2025-11-22 11:50:28,348] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1312] [치환 처리 1] 원본 텍스트: '모던한 미니멀 스타일' +[2025-11-22 11:50:28,348] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1316] [치환 처리 1] 분리된 단어: ['모던한', '미니멀', '스타일'] +[2025-11-22 11:50:28,348] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1357] [치환 처리 1] 변경 없음: '모던한 미니멀 스타일' +[2025-11-22 11:50:28,349] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1312] [치환 처리 2] 원본 텍스트: '다양한 사용 시나리오에 더 쉽게 일치' +[2025-11-22 11:50:28,349] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1316] [치환 처리 2] 분리된 단어: ['다양한', '사용', '시나리오에', '더', '쉽게', '일치'] +[2025-11-22 11:50:28,349] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1357] [치환 처리 2] 변경 없음: '다양한 사용 시나리오에 더 쉽게 일치' +[2025-11-22 11:50:28,349] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1312] [치환 처리 3] 원본 텍스트: '반원형 끝 디자인' +[2025-11-22 11:50:28,349] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1316] [치환 처리 3] 분리된 단어: ['반원형', '끝', '디자인'] +[2025-11-22 11:50:28,350] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1357] [치환 처리 3] 변경 없음: '반원형 끝 디자인' +[2025-11-22 11:50:28,350] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1312] [치환 처리 4] 원본 텍스트: '온갖 기쁨을 안고' +[2025-11-22 11:50:28,350] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1316] [치환 처리 4] 분리된 단어: ['온갖', '기쁨을', '안고'] +[2025-11-22 11:50:28,350] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1357] [치환 처리 4] 변경 없음: '온갖 기쁨을 안고' +[2025-11-22 11:50:28,350] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1359] 전체 치환 결과: 4개 텍스트 처리 완료 +[2025-11-22 11:50:28,351] [MainThread] [DEBUG] [image_processor3.py:process_single_image:737] 이미지 1 치환됨 +[2025-11-22 11:50:28,351] [MainThread] [INFO] [image_processor3.py:process_single_image:753] [inpaint_model 강제] migan → inpaint_method=migan +[2025-11-22 11:50:28,351] [MainThread] [DEBUG] [image_processor3.py:process_single_image:787] ocr_count: 4 +[2025-11-22 11:50:28,351] [MainThread] [DEBUG] [image_processor3.py:process_single_image:788] is_member_valid: True +[2025-11-22 11:50:28,356] [MainThread] [DEBUG] [image_processor3.py:_try_migan_inpaint:1042] MIGAN 인페인팅 시도 +[2025-11-22 11:50:28,360] [MainThread] [DEBUG] [migan_module.py:inpaint:276] [MIGAN] 입력 형태 - 이미지: (1, 3, 1200, 816), 마스크: (1, 1, 1200, 816) +[2025-11-22 11:50:28,677] [MainThread] [DEBUG] [migan_module.py:inpaint:289] [MIGAN] 출력 형태: (1200, 816, 3), dtype: uint8 +[2025-11-22 11:50:28,678] [MainThread] [DEBUG] [migan_module.py:inpaint:297] [MIGAN] 추론 완료: 318.01 ms +[2025-11-22 11:50:28,681] [MainThread] [DEBUG] [image_processor3.py:_try_migan_inpaint:1045] MIGAN 인페인팅 성공 +[2025-11-22 11:50:28,687] [MainThread] [INFO] [image_processor3.py:execute_inpaint_with_fallback:966] 메모리 변화 [인페인팅]: 24499.5MB -> 24855.0MB (+355.5MB, +1.5%) - 방법: migan +[2025-11-22 11:50:28,687] [MainThread] [DEBUG] [image_processor3.py:process_single_image:799] 인페인팅 완료 +[2025-11-22 11:50:28,719] [MainThread] [DEBUG] [image_processor3.py:process_single_image:821] 텍스트 렌더링 완료 +[2025-11-22 11:50:28,719] [MainThread] [DEBUG] [image_processor3.py:postProcess_and_save_image:1144] watermark_text: 이미지 저작권 보유 +[2025-11-22 11:50:28,719] [MainThread] [DEBUG] [image_processor3.py:postProcess_and_save_image:1145] is_watermark_enabled: True +[2025-11-22 11:50:28,723] [MainThread] [INFO] [postImageManager.py:save_image_to_path:101] 이미지 저장 완료 : D:\py\img_worker\modules\test\translated_preview_GmarketSansTTFMedium_img_1.jpg +[2025-11-22 11:50:28,723] [MainThread] [DEBUG] [image_processor3.py:process_single_image:827] 이미지 1 번역 완료: D:\py\img_worker\modules\test\translated_preview_GmarketSansTTFMedium_img_1.jpg +[2025-11-22 11:50:28,751] [MainThread] [DEBUG] [image_processor3.py:process_single_image:880] ⏱ 이미지 파이프라인 총 3776.9ms | download=1.0ms | ocr=205.7ms | translate=2721.1ms | mask=2721.1ms | inpaint=334.8ms(migan/CPU) | render=32.0ms | save=4.0ms +[2025-11-22 11:50:28,752] [MainThread] [INFO] [create_font_preview.py:main:115] 프리뷰 생성 성공: D:\py\img_worker\modules\test\translated_preview_GmarketSansTTFMedium_img_1.jpg +[2025-11-22 11:50:28,762] [MainThread] [DEBUG] [image_processor3.py:cleanup:443] OCR 모듈 정리 완료 +[2025-11-22 11:50:28,763] [MainThread] [DEBUG] [image_processor3.py:cleanup:451] 마스크 모듈 정리 완료 +[2025-11-22 11:50:28,786] [MainThread] [DEBUG] [image_processor3.py:cleanup:486] 임시 폴더 삭제됨: D:\py\img_worker\modules\test +[2025-11-22 11:50:28,807] [MainThread] [DEBUG] [image_processor3.py:cleanup:486] 임시 폴더 삭제됨: D:\py\img_worker\modules\test +[2025-11-22 11:50:28,808] [MainThread] [DEBUG] [image_processor3.py:__del__:434] 이미지 프로세서 소멸 +[2025-11-22 11:50:41,062] [MainThread] [DEBUG] [image_processor3.py:__init__:57] tracemalloc 메모리 추적 시작 +[2025-11-22 11:50:41,068] [MainThread] [DEBUG] [gpu_utils.py:_setup_directml_environment:55] ✅ DirectML 환경 준비 완료 (Windows DirectX 12 기반) +[2025-11-22 11:50:41,068] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:79] === 🚀 DirectML GPU 상태 초기화 시작 🚀 === +[2025-11-22 11:50:41,068] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:80] 🎯 사용자 GPU 가속 요청: False +[2025-11-22 11:50:41,069] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:81] 💻 현재 운영체제: Windows +[2025-11-22 11:50:41,069] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:84] GPU 가속이 비활성화됨 (toggle_states['use_cuda'] = False) +[2025-11-22 11:50:41,069] [MainThread] [INFO] [gpu_utils.py:_set_safe_cpu_mode:157] 🔒 안전한 CPU 모드로 모든 GPU 설정 강제 비활성화 +[2025-11-22 11:50:41,069] [MainThread] [DEBUG] [image_processor3.py:__init__:79] 🔧 ImageProcessor3 GPU 상태 요약: +[2025-11-22 11:50:41,069] [MainThread] [DEBUG] [image_processor3.py:__init__:80] - CUDA 사용 가능: False +[2025-11-22 11:50:41,070] [MainThread] [DEBUG] [image_processor3.py:__init__:81] - toggle_states['use_cuda']: False +[2025-11-22 11:50:41,070] [MainThread] [DEBUG] [image_processor3.py:__init__:82] - GPU 하드웨어 정보: {} +[2025-11-22 11:50:41,070] [MainThread] [DEBUG] [image_processor3.py:__init__:84] ImageProcessor3 Init toggle_states: {'font_type': '폰트1', 'image_font_path': 'D:\\py\\img_worker\\modules\\fonts\\GmarketSansTTFMedium.ttf', 'ocr': True, 'force_cpu_ocr': True, 'use_cuda': False, 'inpaint_model': 'migan', 'local_inpaint_method': 'migan', 'migan_onnx_path': 'D:\\py\\img_worker\\modules\\migan_onnx\\migan_pipeline_v2.onnx', 'migan_use_accel': False, 'migan_provider_override': 'cpu', 'detail_IMGTrans_type': 'CPU', 'optionIMGTrans_type': 'CPU', 'thumb_trans_type': 'CPU', 'TEMP_IMAGE_DIR': 'D:\\py\\img_worker\\modules\\test', 'output_image_format': 'jpg', 'watermark_toggle': False, 'store_ocr_data_to_db': False, 'ocr_engine': 'onnx'} +[2025-11-22 11:50:41,070] [MainThread] [DEBUG] [image_processor3.py:__init__:87] is_member_valid: True +[2025-11-22 11:50:41,071] [MainThread] [DEBUG] [image_processor3.py:__init__:144] debug_images 디렉토리 이미 존재: D:\py\img_worker\modules\debug_images +[2025-11-22 11:50:41,071] [MainThread] [DEBUG] [image_processor3.py:__init__:152] self.font_path: D:\py\img_worker\modules\fonts\HakgyoansimDunggeunmisoTTFB.ttf +[2025-11-22 11:50:41,071] [MainThread] [DEBUG] [image_processor3.py:__init__:154] toggle_states font_path: D:\py\img_worker\modules\fonts\HakgyoansimDunggeunmisoTTFB.ttf +[2025-11-22 11:50:41,071] [MainThread] [DEBUG] [image_processor3.py:__init__:156] self.TEMP_IMAGE_DIR: D:\py\img_worker\modules\test +[2025-11-22 11:50:41,072] [MainThread] [DEBUG] [image_processor3.py:__init__:158] self.debugging_save_Dir: D:\py\img_worker\modules\debug_images +[2025-11-22 11:50:41,072] [MainThread] [DEBUG] [image_processor3.py:__init__:160] self.unwanted_texts: {} +[2025-11-22 11:50:41,072] [MainThread] [DEBUG] [image_processor3.py:__init__:162] self.inpaint_method: migan +[2025-11-22 11:50:41,072] [MainThread] [DEBUG] [image_processor3.py:__init__:168] Image.MAX_IMAGE_PIXELS set to 20000000 +[2025-11-22 11:50:41,073] [MainThread] [DEBUG] [onnx_ocr_wrapper.py:_determine_model_type:447] ONNX 모델 타입 설정값: 자동 선택, GPU 정보: {} +[2025-11-22 11:50:41,073] [MainThread] [INFO] [onnx_ocr_wrapper.py:_determine_model_type:453] 자동 선택 모드: GPU 추천 모델 simp 사용 +[2025-11-22 11:50:41,073] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:324] ONNX OCR 모델 타입 결정: simp (GPU: False) +[2025-11-22 11:50:41,073] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:333] ONNX OCR 모듈 CPU 모드로 설정 +[2025-11-22 11:50:41,074] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:356] 🚀 ONNX TextSystem 초기화 시작 (CPU 모드) +[2025-11-22 11:50:41,074] [MainThread] [DEBUG] [onnx_ocr_wrapper.py:_initialize_onnx_system:539] 🚀 ONNX TextSystem 초기화 시작 (CPU 모드) +[2025-11-22 11:50:42,860] [MainThread] [DEBUG] [onnx_ocr_wrapper.py:_ensure_utf8_encoding:487] 문자 사전 파일 UTF-8 확인 완료: D:\py\img_worker\modules\onnx_ocr_module\dict\ppocr_keys_v1.txt +[2025-11-22 11:50:42,946] [MainThread] [INFO] [onnx_ocr_wrapper.py:_initialize_onnx_system:743] ✅ ONNX TextSystem 초기화 완료 (CPU + SIMP (호환성) 모델) +[2025-11-22 11:50:42,947] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:363] ✅ ONNX TextSystem 초기화 완료 (CPU + SIMP 모델) +[2025-11-22 11:50:42,947] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:364] ✅ ONNX OCR 모듈 초기화 성공 (CPU 모드) +[2025-11-22 11:50:42,947] [MainThread] [INFO] [image_processor3.py:__init__:175] ✅ ONNX OCR 모듈 초기화 성공 +[2025-11-22 11:50:42,948] [MainThread] [INFO] [mask_module_for_paddle.py:__init__:12] 마스크 모듈 초기화 완료 +[2025-11-22 11:50:42,948] [MainThread] [DEBUG] [image_processor3.py:__init__:216] MaskModule 초기화 성공 +[2025-11-22 11:50:42,948] [MainThread] [INFO] [text_rendering_module.py:__init__:21] 텍스트 렌더링 모듈 초기화 완료 +[2025-11-22 11:50:42,948] [MainThread] [INFO] [text_rendering_module.py:__init__:22] 기본 폰트: D:\py\img_worker\modules\fonts\HakgyoansimDunggeunmisoTTFB.ttf +[2025-11-22 11:50:42,948] [MainThread] [DEBUG] [image_processor3.py:__init__:222] TextRenderingModule 초기화 성공 +[2025-11-22 11:50:42,950] [MainThread] [DEBUG] [postImageManager.py:font_load:40] 폰트 로드 성공: D:\py\img_worker\modules\fonts\HakgyoansimDunggeunmisoTTFB.ttf +[2025-11-22 11:50:42,950] [MainThread] [DEBUG] [image_processor3.py:__init__:228] PostImageManager 초기화 성공 +[2025-11-22 11:50:42,950] [MainThread] [DEBUG] [request_inpaint.py:__init__:43] Request_AI_Server GPU 상태: CUDA 사용 가능=False +[2025-11-22 11:50:42,951] [MainThread] [DEBUG] [image_processor3.py:__init__:251] Request_AI_Server 초기화 성공 +[2025-11-22 11:50:42,951] [MainThread] [DEBUG] [image_processor3.py:__init__:258] GoogleTranslate 초기화 성공 +[2025-11-22 11:50:42,952] [MainThread] [DEBUG] [image_processor3.py:__init__:284] MIGAN CUDA 사용 불가 - CPU 모드로 설정 +[2025-11-22 11:50:42,952] [MainThread] [DEBUG] [image_processor3.py:__init__:286] [MIGAN] GPU 관리자 전달: GPUManager, can_use_cuda: False +[2025-11-22 11:50:42,953] [MainThread] [DEBUG] [migan_module.py:_get_or_create_session:166] [MIGAN] GPU 관리자 사용 가능: False +[2025-11-22 11:50:42,953] [MainThread] [DEBUG] [migan_module.py:_get_or_create_session:186] [MIGAN] CPU 전용 모드 +[2025-11-22 11:50:42,953] [MainThread] [DEBUG] [migan_module.py:_get_or_create_session:188] [MIGAN] 최종 providers: [('CPUExecutionProvider', {})] +[2025-11-22 11:50:42,953] [MainThread] [DEBUG] [migan_module.py:_get_or_create_session:204] [MIGAN] CPU 전용 시도: [('CPUExecutionProvider', {})] +[2025-11-22 11:50:43,032] [MainThread] [INFO] [migan_module.py:_get_or_create_session:207] [MIGAN] CPU 전용 성공! 실제 providers: ['CPUExecutionProvider'] +[2025-11-22 11:50:43,033] [MainThread] [DEBUG] [migan_module.py:__init__:115] [MIGAN] 입력 0: image, 형태: ['batch_size', 3, 'height', 'width'], 타입: tensor(uint8) +[2025-11-22 11:50:43,033] [MainThread] [DEBUG] [migan_module.py:__init__:115] [MIGAN] 입력 1: mask, 형태: ['batch_size', 1, 'height', 'width'], 타입: tensor(uint8) +[2025-11-22 11:50:43,033] [MainThread] [DEBUG] [migan_module.py:__init__:117] [MIGAN] 출력 0: result, 형태: ['ScatterNDresult_dim_0', 3, 'ScatterNDresult_dim_2', 'ScatterNDresult_dim_3'], 타입: tensor(uint8) +[2025-11-22 11:50:43,034] [MainThread] [DEBUG] [migan_module.py:__init__:119] [MIGAN] 세션 준비 완료. providers=['CPUExecutionProvider'] +[2025-11-22 11:50:43,034] [MainThread] [DEBUG] [migan_module.py:build_migan_from_toggle:348] [MIGAN] GPU 관리자 연결 완료: GPUManager +[2025-11-22 11:50:43,034] [MainThread] [DEBUG] [migan_module.py:build_migan_from_toggle:355] [MIGAN] 파이프라인 gpu_manager 속성: True, 값: +[2025-11-22 11:50:43,034] [MainThread] [DEBUG] [image_processor3.py:__init__:288] [MIGAN] 초기화 완료: gpu_manager 속성=True, 값= +[2025-11-22 11:50:43,035] [MainThread] [INFO] [create_font_preview.py:main:98] 프리뷰 생성 시작: GmarketSansTTFMedium.ttf +[2025-11-22 11:50:43,035] [MainThread] [INFO] [create_font_preview.py:main:99] 저장 경로: D:\py\img_worker\modules\test +[2025-11-22 11:50:43,035] [MainThread] [DEBUG] [image_processor3.py:process_single_image:583] 이미지 번역시작 +[2025-11-22 11:50:43,035] [MainThread] [DEBUG] [image_processor3.py:process_single_image:585] toggle_states: {'font_type': '폰트1', 'image_font_path': 'D:\\py\\img_worker\\modules\\fonts\\HakgyoansimDunggeunmisoTTFB.ttf', 'ocr': True, 'force_cpu_ocr': True, 'use_cuda': False, 'inpaint_model': 'migan', 'local_inpaint_method': 'migan', 'migan_onnx_path': 'D:\\py\\img_worker\\modules\\migan_onnx\\migan_pipeline_v2.onnx', 'migan_use_accel': False, 'migan_provider_override': 'cpu', 'detail_IMGTrans_type': 'CPU', 'optionIMGTrans_type': 'CPU', 'thumb_trans_type': 'CPU', 'TEMP_IMAGE_DIR': 'D:\\py\\img_worker\\modules\\test', 'output_image_format': 'jpg', 'watermark_toggle': False, 'store_ocr_data_to_db': False, 'ocr_engine': 'onnx'} +[2025-11-22 11:50:43,233] [MainThread] [DEBUG] [image_processor3.py:process_single_image:603] 이미지 1 처리 시작: D:\py\img_worker\modules\fonts\ori.jpg - OCR+인페인팅 모드 +[2025-11-22 11:50:43,233] [MainThread] [DEBUG] [image_processor3.py:download_image:1191] 로컬 파일 경로 감지, 다운로드 생략: D:\py\img_worker\modules\fonts\ori.jpg +[2025-11-22 11:50:43,233] [MainThread] [DEBUG] [image_processor3.py:process_single_image:626] 옵션 이미지는 스케일 처리 건너뛰기: preview_GmarketSansTTFMedium +[2025-11-22 11:50:43,234] [MainThread] [DEBUG] [image_processor3.py:process_single_image:636] 이미지 1 로컬 저장위치(옵션 이미지 원본 유지): D:\py\img_worker\modules\fonts\ori.jpg +[2025-11-22 11:50:43,240] [MainThread] [INFO] [onnx_ocr_wrapper.py:detect_text:838] 🔍 ONNX OCR 감지 방식: polygon +[2025-11-22 11:50:43,407] [MainThread] [INFO] [onnx_ocr_wrapper.py:detect_text:906] ⚡ ONNX OCR 추론 완료: 165.0ms +[2025-11-22 11:50:43,407] [MainThread] [INFO] [onnx_ocr_wrapper.py:detect_text:907] 📊 세부 시간 - 감지: 89.0ms, 인식: 68.0ms, 분류: 3.0ms +[2025-11-22 11:50:43,417] [MainThread] [INFO] [image_processor3.py:process_single_image:652] 메모리 변화 [OCR 처리]: 24533.6MB -> 24665.8MB (+132.3MB, +0.5%) - 이미지 1 +[2025-11-22 11:50:43,419] [MainThread] [DEBUG] [image_processor3.py:process_single_image:657] ocr_results: [{'text': '现代极简风格', 'confidence': 0.9946680068969727, 'polygon': [[222.0, 70.0], [552.0, 70.0], [552.0, 118.0], [222.0, 118.0]], 'bbox': (222, 70, 331, 49), 'method': 'polygon'}, {'text': '更易搭配各种使用场景', 'confidence': 0.9957253336906433, 'polygon': [[152.0, 141.0], [622.0, 141.0], [622.0, 180.0], [152.0, 180.0]], 'bbox': (152, 141, 471, 40), 'method': 'polygon'}, {'text': '半圆两端设计', 'confidence': 0.9974236488342285, 'polygon': [[88.0, 289.0], [463.0, 289.0], [463.0, 345.0], [88.0, 345.0]], 'bbox': (88, 289, 376, 57), 'method': 'polygon'}, {'text': '承载各种欢乐', 'confidence': 0.9939405918121338, 'polygon': [[87.0, 369.0], [462.0, 369.0], [462.0, 425.0], [87.0, 425.0]], 'bbox': (87, 369, 376, 57), 'method': 'polygon'}] +[2025-11-22 11:50:43,443] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1101] [필터링] 포함 (신뢰도 99.5%): '现代极简风格' +[2025-11-22 11:50:43,443] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1101] [필터링] 포함 (신뢰도 99.6%): '更易搭配各种使用场景' +[2025-11-22 11:50:43,443] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1101] [필터링] 포함 (신뢰도 99.7%): '半圆两端设计' +[2025-11-22 11:50:43,443] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1101] [필터링] 포함 (신뢰도 99.4%): '承载各种欢乐' +[2025-11-22 11:50:43,444] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1105] 필터링 결과: 4/4개 (신뢰도 + & 중국어) +[2025-11-22 11:50:43,446] [MainThread] [DEBUG] [image_processor3.py:process_single_image:669] filter_ocr_results: [{'text': '现代极简风格', 'confidence': 0.9946680068969727, 'polygon': [[222.0, 70.0], [552.0, 70.0], [552.0, 118.0], [222.0, 118.0]], 'bbox': (222, 70, 331, 49), 'method': 'polygon'}, {'text': '更易搭配各种使用场景', 'confidence': 0.9957253336906433, 'polygon': [[152.0, 141.0], [622.0, 141.0], [622.0, 180.0], [152.0, 180.0]], 'bbox': (152, 141, 471, 40), 'method': 'polygon'}, {'text': '半圆两端设计', 'confidence': 0.9974236488342285, 'polygon': [[88.0, 289.0], [463.0, 289.0], [463.0, 345.0], [88.0, 345.0]], 'bbox': (88, 289, 376, 57), 'method': 'polygon'}, {'text': '承载各种欢乐', 'confidence': 0.9939405918121338, 'polygon': [[87.0, 369.0], [462.0, 369.0], [462.0, 425.0], [87.0, 425.0]], 'bbox': (87, 369, 376, 57), 'method': 'polygon'}] +[2025-11-22 11:50:43,446] [MainThread] [INFO] [onnx_ocr_wrapper.py:filter_chinese_text:1192] 중국어 텍스트 4개 필터링 완료 +[2025-11-22 11:50:43,447] [MainThread] [INFO] [onnx_ocr_wrapper.py:filter_korean_text:1213] 한글 텍스트 0개 필터링 완료 +[2025-11-22 11:50:43,952] [MainThread] [DEBUG] [image_processor3.py:process_single_image:727] translated_texts: ['모던한 미니멀 스타일', '다양한 사용 시나리오에 더 쉽게 일치', '반원형 끝 디자인', '온갖 기쁨을 안고'] +[2025-11-22 11:50:43,952] [MainThread] [DEBUG] [image_processor3.py:process_single_image:728] 마스크 생성 완료 +[2025-11-22 11:50:43,953] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1312] [치환 처리 1] 원본 텍스트: '모던한 미니멀 스타일' +[2025-11-22 11:50:43,953] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1316] [치환 처리 1] 분리된 단어: ['모던한', '미니멀', '스타일'] +[2025-11-22 11:50:43,953] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1357] [치환 처리 1] 변경 없음: '모던한 미니멀 스타일' +[2025-11-22 11:50:43,953] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1312] [치환 처리 2] 원본 텍스트: '다양한 사용 시나리오에 더 쉽게 일치' +[2025-11-22 11:50:43,953] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1316] [치환 처리 2] 분리된 단어: ['다양한', '사용', '시나리오에', '더', '쉽게', '일치'] +[2025-11-22 11:50:43,954] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1357] [치환 처리 2] 변경 없음: '다양한 사용 시나리오에 더 쉽게 일치' +[2025-11-22 11:50:43,954] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1312] [치환 처리 3] 원본 텍스트: '반원형 끝 디자인' +[2025-11-22 11:50:43,954] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1316] [치환 처리 3] 분리된 단어: ['반원형', '끝', '디자인'] +[2025-11-22 11:50:43,954] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1357] [치환 처리 3] 변경 없음: '반원형 끝 디자인' +[2025-11-22 11:50:43,954] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1312] [치환 처리 4] 원본 텍스트: '온갖 기쁨을 안고' +[2025-11-22 11:50:43,955] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1316] [치환 처리 4] 분리된 단어: ['온갖', '기쁨을', '안고'] +[2025-11-22 11:50:43,955] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1357] [치환 처리 4] 변경 없음: '온갖 기쁨을 안고' +[2025-11-22 11:50:43,955] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1359] 전체 치환 결과: 4개 텍스트 처리 완료 +[2025-11-22 11:50:43,955] [MainThread] [DEBUG] [image_processor3.py:process_single_image:737] 이미지 1 치환됨 +[2025-11-22 11:50:43,956] [MainThread] [INFO] [image_processor3.py:process_single_image:753] [inpaint_model 강제] migan → inpaint_method=migan +[2025-11-22 11:50:43,956] [MainThread] [DEBUG] [image_processor3.py:process_single_image:787] ocr_count: 4 +[2025-11-22 11:50:43,956] [MainThread] [DEBUG] [image_processor3.py:process_single_image:788] is_member_valid: True +[2025-11-22 11:50:43,960] [MainThread] [DEBUG] [image_processor3.py:_try_migan_inpaint:1042] MIGAN 인페인팅 시도 +[2025-11-22 11:50:43,963] [MainThread] [DEBUG] [migan_module.py:inpaint:276] [MIGAN] 입력 형태 - 이미지: (1, 3, 1200, 816), 마스크: (1, 1, 1200, 816) +[2025-11-22 11:50:44,278] [MainThread] [DEBUG] [migan_module.py:inpaint:289] [MIGAN] 출력 형태: (1200, 816, 3), dtype: uint8 +[2025-11-22 11:50:44,278] [MainThread] [DEBUG] [migan_module.py:inpaint:297] [MIGAN] 추론 완료: 315.00 ms +[2025-11-22 11:50:44,282] [MainThread] [DEBUG] [image_processor3.py:_try_migan_inpaint:1045] MIGAN 인페인팅 성공 +[2025-11-22 11:50:44,286] [MainThread] [INFO] [image_processor3.py:execute_inpaint_with_fallback:966] 메모리 변화 [인페인팅]: 24685.8MB -> 25035.6MB (+349.9MB, +1.4%) - 방법: migan +[2025-11-22 11:50:44,287] [MainThread] [DEBUG] [image_processor3.py:process_single_image:799] 인페인팅 완료 +[2025-11-22 11:50:44,339] [MainThread] [DEBUG] [image_processor3.py:process_single_image:821] 텍스트 렌더링 완료 +[2025-11-22 11:50:44,339] [MainThread] [DEBUG] [image_processor3.py:postProcess_and_save_image:1144] watermark_text: 이미지 저작권 보유 +[2025-11-22 11:50:44,339] [MainThread] [DEBUG] [image_processor3.py:postProcess_and_save_image:1145] is_watermark_enabled: True +[2025-11-22 11:50:44,341] [MainThread] [INFO] [postImageManager.py:save_image_to_path:101] 이미지 저장 완료 : D:\py\img_worker\modules\test\translated_preview_GmarketSansTTFMedium_img_1.jpg +[2025-11-22 11:50:44,342] [MainThread] [DEBUG] [image_processor3.py:process_single_image:827] 이미지 1 번역 완료: D:\py\img_worker\modules\test\translated_preview_GmarketSansTTFMedium_img_1.jpg +[2025-11-22 11:50:44,367] [MainThread] [DEBUG] [image_processor3.py:process_single_image:880] ⏱ 이미지 파이프라인 총 1331.6ms | download=0.0ms | ocr=178.0ms | translate=505.3ms | mask=505.3ms | inpaint=331.0ms(migan/CPU) | render=52.0ms | save=3.0ms +[2025-11-22 11:50:44,368] [MainThread] [INFO] [create_font_preview.py:main:115] 프리뷰 생성 성공: D:\py\img_worker\modules\test\translated_preview_GmarketSansTTFMedium_img_1.jpg +[2025-11-22 11:50:44,378] [MainThread] [DEBUG] [image_processor3.py:cleanup:443] OCR 모듈 정리 완료 +[2025-11-22 11:50:44,378] [MainThread] [DEBUG] [image_processor3.py:cleanup:451] 마스크 모듈 정리 완료 +[2025-11-22 11:50:44,400] [MainThread] [DEBUG] [image_processor3.py:cleanup:486] 임시 폴더 삭제됨: D:\py\img_worker\modules\test +[2025-11-22 11:50:44,415] [MainThread] [DEBUG] [image_processor3.py:cleanup:486] 임시 폴더 삭제됨: D:\py\img_worker\modules\test +[2025-11-22 11:50:44,415] [MainThread] [DEBUG] [image_processor3.py:__del__:434] 이미지 프로세서 소멸 +[2025-11-22 11:50:56,865] [MainThread] [DEBUG] [image_processor3.py:__init__:57] tracemalloc 메모리 추적 시작 +[2025-11-22 11:50:56,871] [MainThread] [DEBUG] [gpu_utils.py:_setup_directml_environment:55] ✅ DirectML 환경 준비 완료 (Windows DirectX 12 기반) +[2025-11-22 11:50:56,872] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:79] === 🚀 DirectML GPU 상태 초기화 시작 🚀 === +[2025-11-22 11:50:56,872] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:80] 🎯 사용자 GPU 가속 요청: False +[2025-11-22 11:50:56,872] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:81] 💻 현재 운영체제: Windows +[2025-11-22 11:50:56,872] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:84] GPU 가속이 비활성화됨 (toggle_states['use_cuda'] = False) +[2025-11-22 11:50:56,873] [MainThread] [INFO] [gpu_utils.py:_set_safe_cpu_mode:157] 🔒 안전한 CPU 모드로 모든 GPU 설정 강제 비활성화 +[2025-11-22 11:50:56,873] [MainThread] [DEBUG] [image_processor3.py:__init__:79] 🔧 ImageProcessor3 GPU 상태 요약: +[2025-11-22 11:50:56,873] [MainThread] [DEBUG] [image_processor3.py:__init__:80] - CUDA 사용 가능: False +[2025-11-22 11:50:56,873] [MainThread] [DEBUG] [image_processor3.py:__init__:81] - toggle_states['use_cuda']: False +[2025-11-22 11:50:56,873] [MainThread] [DEBUG] [image_processor3.py:__init__:82] - GPU 하드웨어 정보: {} +[2025-11-22 11:50:56,873] [MainThread] [DEBUG] [image_processor3.py:__init__:84] ImageProcessor3 Init toggle_states: {'font_type': '폰트6', 'image_font_path': 'D:\\py\\img_worker\\modules\\fonts\\GmarketSansTTFMedium.ttf', 'ocr': True, 'force_cpu_ocr': True, 'use_cuda': False, 'inpaint_model': 'migan', 'local_inpaint_method': 'migan', 'migan_onnx_path': 'D:\\py\\img_worker\\modules\\migan_onnx\\migan_pipeline_v2.onnx', 'migan_use_accel': False, 'migan_provider_override': 'cpu', 'detail_IMGTrans_type': 'CPU', 'optionIMGTrans_type': 'CPU', 'thumb_trans_type': 'CPU', 'TEMP_IMAGE_DIR': 'D:\\py\\img_worker\\modules\\test', 'output_image_format': 'jpg', 'watermark_toggle': False, 'store_ocr_data_to_db': False, 'ocr_engine': 'onnx'} +[2025-11-22 11:50:56,874] [MainThread] [DEBUG] [image_processor3.py:__init__:87] is_member_valid: True +[2025-11-22 11:50:56,874] [MainThread] [DEBUG] [image_processor3.py:__init__:144] debug_images 디렉토리 이미 존재: D:\py\img_worker\modules\debug_images +[2025-11-22 11:50:56,874] [MainThread] [DEBUG] [image_processor3.py:__init__:152] self.font_path: D:\py\img_worker\modules\fonts\HakgyoansimDunggeunmisoTTFB.ttf +[2025-11-22 11:50:56,874] [MainThread] [DEBUG] [image_processor3.py:__init__:154] toggle_states font_path: D:\py\img_worker\modules\fonts\HakgyoansimDunggeunmisoTTFB.ttf +[2025-11-22 11:50:56,875] [MainThread] [DEBUG] [image_processor3.py:__init__:156] self.TEMP_IMAGE_DIR: D:\py\img_worker\modules\test +[2025-11-22 11:50:56,875] [MainThread] [DEBUG] [image_processor3.py:__init__:158] self.debugging_save_Dir: D:\py\img_worker\modules\debug_images +[2025-11-22 11:50:56,875] [MainThread] [DEBUG] [image_processor3.py:__init__:160] self.unwanted_texts: {} +[2025-11-22 11:50:56,875] [MainThread] [DEBUG] [image_processor3.py:__init__:162] self.inpaint_method: migan +[2025-11-22 11:50:56,875] [MainThread] [DEBUG] [image_processor3.py:__init__:168] Image.MAX_IMAGE_PIXELS set to 20000000 +[2025-11-22 11:50:56,876] [MainThread] [DEBUG] [onnx_ocr_wrapper.py:_determine_model_type:447] ONNX 모델 타입 설정값: 자동 선택, GPU 정보: {} +[2025-11-22 11:50:56,876] [MainThread] [INFO] [onnx_ocr_wrapper.py:_determine_model_type:453] 자동 선택 모드: GPU 추천 모델 simp 사용 +[2025-11-22 11:50:56,876] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:324] ONNX OCR 모델 타입 결정: simp (GPU: False) +[2025-11-22 11:50:56,876] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:333] ONNX OCR 모듈 CPU 모드로 설정 +[2025-11-22 11:50:56,876] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:356] 🚀 ONNX TextSystem 초기화 시작 (CPU 모드) +[2025-11-22 11:50:56,877] [MainThread] [DEBUG] [onnx_ocr_wrapper.py:_initialize_onnx_system:539] 🚀 ONNX TextSystem 초기화 시작 (CPU 모드) +[2025-11-22 11:50:58,680] [MainThread] [DEBUG] [onnx_ocr_wrapper.py:_ensure_utf8_encoding:487] 문자 사전 파일 UTF-8 확인 완료: D:\py\img_worker\modules\onnx_ocr_module\dict\ppocr_keys_v1.txt +[2025-11-22 11:50:58,764] [MainThread] [INFO] [onnx_ocr_wrapper.py:_initialize_onnx_system:743] ✅ ONNX TextSystem 초기화 완료 (CPU + SIMP (호환성) 모델) +[2025-11-22 11:50:58,764] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:363] ✅ ONNX TextSystem 초기화 완료 (CPU + SIMP 모델) +[2025-11-22 11:50:58,765] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:364] ✅ ONNX OCR 모듈 초기화 성공 (CPU 모드) +[2025-11-22 11:50:58,765] [MainThread] [INFO] [image_processor3.py:__init__:175] ✅ ONNX OCR 모듈 초기화 성공 +[2025-11-22 11:50:58,766] [MainThread] [INFO] [mask_module_for_paddle.py:__init__:12] 마스크 모듈 초기화 완료 +[2025-11-22 11:50:58,766] [MainThread] [DEBUG] [image_processor3.py:__init__:216] MaskModule 초기화 성공 +[2025-11-22 11:50:58,766] [MainThread] [INFO] [text_rendering_module.py:__init__:21] 텍스트 렌더링 모듈 초기화 완료 +[2025-11-22 11:50:58,766] [MainThread] [INFO] [text_rendering_module.py:__init__:22] 기본 폰트: D:\py\img_worker\modules\fonts\HakgyoansimDunggeunmisoTTFB.ttf +[2025-11-22 11:50:58,766] [MainThread] [DEBUG] [image_processor3.py:__init__:222] TextRenderingModule 초기화 성공 +[2025-11-22 11:50:58,767] [MainThread] [DEBUG] [postImageManager.py:font_load:40] 폰트 로드 성공: D:\py\img_worker\modules\fonts\HakgyoansimDunggeunmisoTTFB.ttf +[2025-11-22 11:50:58,767] [MainThread] [DEBUG] [image_processor3.py:__init__:228] PostImageManager 초기화 성공 +[2025-11-22 11:50:58,767] [MainThread] [DEBUG] [request_inpaint.py:__init__:43] Request_AI_Server GPU 상태: CUDA 사용 가능=False +[2025-11-22 11:50:58,767] [MainThread] [DEBUG] [image_processor3.py:__init__:251] Request_AI_Server 초기화 성공 +[2025-11-22 11:50:58,768] [MainThread] [DEBUG] [image_processor3.py:__init__:258] GoogleTranslate 초기화 성공 +[2025-11-22 11:50:58,769] [MainThread] [DEBUG] [image_processor3.py:__init__:284] MIGAN CUDA 사용 불가 - CPU 모드로 설정 +[2025-11-22 11:50:58,769] [MainThread] [DEBUG] [image_processor3.py:__init__:286] [MIGAN] GPU 관리자 전달: GPUManager, can_use_cuda: False +[2025-11-22 11:50:58,769] [MainThread] [DEBUG] [migan_module.py:_get_or_create_session:166] [MIGAN] GPU 관리자 사용 가능: False +[2025-11-22 11:50:58,770] [MainThread] [DEBUG] [migan_module.py:_get_or_create_session:186] [MIGAN] CPU 전용 모드 +[2025-11-22 11:50:58,770] [MainThread] [DEBUG] [migan_module.py:_get_or_create_session:188] [MIGAN] 최종 providers: [('CPUExecutionProvider', {})] +[2025-11-22 11:50:58,770] [MainThread] [DEBUG] [migan_module.py:_get_or_create_session:204] [MIGAN] CPU 전용 시도: [('CPUExecutionProvider', {})] +[2025-11-22 11:50:58,851] [MainThread] [INFO] [migan_module.py:_get_or_create_session:207] [MIGAN] CPU 전용 성공! 실제 providers: ['CPUExecutionProvider'] +[2025-11-22 11:50:58,851] [MainThread] [DEBUG] [migan_module.py:__init__:115] [MIGAN] 입력 0: image, 형태: ['batch_size', 3, 'height', 'width'], 타입: tensor(uint8) +[2025-11-22 11:50:58,852] [MainThread] [DEBUG] [migan_module.py:__init__:115] [MIGAN] 입력 1: mask, 형태: ['batch_size', 1, 'height', 'width'], 타입: tensor(uint8) +[2025-11-22 11:50:58,852] [MainThread] [DEBUG] [migan_module.py:__init__:117] [MIGAN] 출력 0: result, 형태: ['ScatterNDresult_dim_0', 3, 'ScatterNDresult_dim_2', 'ScatterNDresult_dim_3'], 타입: tensor(uint8) +[2025-11-22 11:50:58,852] [MainThread] [DEBUG] [migan_module.py:__init__:119] [MIGAN] 세션 준비 완료. providers=['CPUExecutionProvider'] +[2025-11-22 11:50:58,852] [MainThread] [DEBUG] [migan_module.py:build_migan_from_toggle:348] [MIGAN] GPU 관리자 연결 완료: GPUManager +[2025-11-22 11:50:58,853] [MainThread] [DEBUG] [migan_module.py:build_migan_from_toggle:355] [MIGAN] 파이프라인 gpu_manager 속성: True, 값: +[2025-11-22 11:50:58,853] [MainThread] [DEBUG] [image_processor3.py:__init__:288] [MIGAN] 초기화 완료: gpu_manager 속성=True, 값= +[2025-11-22 11:50:58,853] [MainThread] [INFO] [create_font_preview.py:main:98] 프리뷰 생성 시작: GmarketSansTTFMedium.ttf +[2025-11-22 11:50:58,853] [MainThread] [INFO] [create_font_preview.py:main:99] 저장 경로: D:\py\img_worker\modules\test +[2025-11-22 11:50:58,853] [MainThread] [DEBUG] [image_processor3.py:process_single_image:583] 이미지 번역시작 +[2025-11-22 11:50:58,854] [MainThread] [DEBUG] [image_processor3.py:process_single_image:585] toggle_states: {'font_type': '폰트6', 'image_font_path': 'D:\\py\\img_worker\\modules\\fonts\\HakgyoansimDunggeunmisoTTFB.ttf', 'ocr': True, 'force_cpu_ocr': True, 'use_cuda': False, 'inpaint_model': 'migan', 'local_inpaint_method': 'migan', 'migan_onnx_path': 'D:\\py\\img_worker\\modules\\migan_onnx\\migan_pipeline_v2.onnx', 'migan_use_accel': False, 'migan_provider_override': 'cpu', 'detail_IMGTrans_type': 'CPU', 'optionIMGTrans_type': 'CPU', 'thumb_trans_type': 'CPU', 'TEMP_IMAGE_DIR': 'D:\\py\\img_worker\\modules\\test', 'output_image_format': 'jpg', 'watermark_toggle': False, 'store_ocr_data_to_db': False, 'ocr_engine': 'onnx'} +[2025-11-22 11:50:59,131] [MainThread] [DEBUG] [image_processor3.py:process_single_image:603] 이미지 1 처리 시작: D:\py\img_worker\modules\fonts\ori.jpg - OCR+인페인팅 모드 +[2025-11-22 11:50:59,131] [MainThread] [DEBUG] [image_processor3.py:download_image:1191] 로컬 파일 경로 감지, 다운로드 생략: D:\py\img_worker\modules\fonts\ori.jpg +[2025-11-22 11:50:59,131] [MainThread] [DEBUG] [image_processor3.py:process_single_image:626] 옵션 이미지는 스케일 처리 건너뛰기: preview_GmarketSansTTFMedium +[2025-11-22 11:50:59,132] [MainThread] [DEBUG] [image_processor3.py:process_single_image:636] 이미지 1 로컬 저장위치(옵션 이미지 원본 유지): D:\py\img_worker\modules\fonts\ori.jpg +[2025-11-22 11:50:59,138] [MainThread] [INFO] [onnx_ocr_wrapper.py:detect_text:838] 🔍 ONNX OCR 감지 방식: polygon +[2025-11-22 11:50:59,307] [MainThread] [INFO] [onnx_ocr_wrapper.py:detect_text:906] ⚡ ONNX OCR 추론 완료: 168.0ms +[2025-11-22 11:50:59,308] [MainThread] [INFO] [onnx_ocr_wrapper.py:detect_text:907] 📊 세부 시간 - 감지: 94.0ms, 인식: 66.0ms, 분류: 3.0ms +[2025-11-22 11:50:59,317] [MainThread] [INFO] [image_processor3.py:process_single_image:652] 메모리 변화 [OCR 처리]: 24568.0MB -> 24701.0MB (+133.0MB, +0.5%) - 이미지 1 +[2025-11-22 11:50:59,319] [MainThread] [DEBUG] [image_processor3.py:process_single_image:657] ocr_results: [{'text': '现代极简风格', 'confidence': 0.9946680068969727, 'polygon': [[222.0, 70.0], [552.0, 70.0], [552.0, 118.0], [222.0, 118.0]], 'bbox': (222, 70, 331, 49), 'method': 'polygon'}, {'text': '更易搭配各种使用场景', 'confidence': 0.9957253336906433, 'polygon': [[152.0, 141.0], [622.0, 141.0], [622.0, 180.0], [152.0, 180.0]], 'bbox': (152, 141, 471, 40), 'method': 'polygon'}, {'text': '半圆两端设计', 'confidence': 0.9974236488342285, 'polygon': [[88.0, 289.0], [463.0, 289.0], [463.0, 345.0], [88.0, 345.0]], 'bbox': (88, 289, 376, 57), 'method': 'polygon'}, {'text': '承载各种欢乐', 'confidence': 0.9939405918121338, 'polygon': [[87.0, 369.0], [462.0, 369.0], [462.0, 425.0], [87.0, 425.0]], 'bbox': (87, 369, 376, 57), 'method': 'polygon'}] +[2025-11-22 11:50:59,342] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1101] [필터링] 포함 (신뢰도 99.5%): '现代极简风格' +[2025-11-22 11:50:59,343] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1101] [필터링] 포함 (신뢰도 99.6%): '更易搭配各种使用场景' +[2025-11-22 11:50:59,343] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1101] [필터링] 포함 (신뢰도 99.7%): '半圆两端设计' +[2025-11-22 11:50:59,343] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1101] [필터링] 포함 (신뢰도 99.4%): '承载各种欢乐' +[2025-11-22 11:50:59,343] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1105] 필터링 결과: 4/4개 (신뢰도 + & 중국어) +[2025-11-22 11:50:59,346] [MainThread] [DEBUG] [image_processor3.py:process_single_image:669] filter_ocr_results: [{'text': '现代极简风格', 'confidence': 0.9946680068969727, 'polygon': [[222.0, 70.0], [552.0, 70.0], [552.0, 118.0], [222.0, 118.0]], 'bbox': (222, 70, 331, 49), 'method': 'polygon'}, {'text': '更易搭配各种使用场景', 'confidence': 0.9957253336906433, 'polygon': [[152.0, 141.0], [622.0, 141.0], [622.0, 180.0], [152.0, 180.0]], 'bbox': (152, 141, 471, 40), 'method': 'polygon'}, {'text': '半圆两端设计', 'confidence': 0.9974236488342285, 'polygon': [[88.0, 289.0], [463.0, 289.0], [463.0, 345.0], [88.0, 345.0]], 'bbox': (88, 289, 376, 57), 'method': 'polygon'}, {'text': '承载各种欢乐', 'confidence': 0.9939405918121338, 'polygon': [[87.0, 369.0], [462.0, 369.0], [462.0, 425.0], [87.0, 425.0]], 'bbox': (87, 369, 376, 57), 'method': 'polygon'}] +[2025-11-22 11:50:59,346] [MainThread] [INFO] [onnx_ocr_wrapper.py:filter_chinese_text:1192] 중국어 텍스트 4개 필터링 완료 +[2025-11-22 11:50:59,346] [MainThread] [INFO] [onnx_ocr_wrapper.py:filter_korean_text:1213] 한글 텍스트 0개 필터링 완료 +[2025-11-22 11:50:59,865] [MainThread] [DEBUG] [image_processor3.py:process_single_image:727] translated_texts: ['모던한 미니멀 스타일', '다양한 사용 시나리오에 더 쉽게 일치', '반원형 끝 디자인', '온갖 기쁨을 안고'] +[2025-11-22 11:50:59,865] [MainThread] [DEBUG] [image_processor3.py:process_single_image:728] 마스크 생성 완료 +[2025-11-22 11:50:59,865] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1312] [치환 처리 1] 원본 텍스트: '모던한 미니멀 스타일' +[2025-11-22 11:50:59,865] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1316] [치환 처리 1] 분리된 단어: ['모던한', '미니멀', '스타일'] +[2025-11-22 11:50:59,865] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1357] [치환 처리 1] 변경 없음: '모던한 미니멀 스타일' +[2025-11-22 11:50:59,866] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1312] [치환 처리 2] 원본 텍스트: '다양한 사용 시나리오에 더 쉽게 일치' +[2025-11-22 11:50:59,866] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1316] [치환 처리 2] 분리된 단어: ['다양한', '사용', '시나리오에', '더', '쉽게', '일치'] +[2025-11-22 11:50:59,866] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1357] [치환 처리 2] 변경 없음: '다양한 사용 시나리오에 더 쉽게 일치' +[2025-11-22 11:50:59,866] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1312] [치환 처리 3] 원본 텍스트: '반원형 끝 디자인' +[2025-11-22 11:50:59,866] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1316] [치환 처리 3] 분리된 단어: ['반원형', '끝', '디자인'] +[2025-11-22 11:50:59,867] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1357] [치환 처리 3] 변경 없음: '반원형 끝 디자인' +[2025-11-22 11:50:59,867] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1312] [치환 처리 4] 원본 텍스트: '온갖 기쁨을 안고' +[2025-11-22 11:50:59,867] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1316] [치환 처리 4] 분리된 단어: ['온갖', '기쁨을', '안고'] +[2025-11-22 11:50:59,867] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1357] [치환 처리 4] 변경 없음: '온갖 기쁨을 안고' +[2025-11-22 11:50:59,867] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1359] 전체 치환 결과: 4개 텍스트 처리 완료 +[2025-11-22 11:50:59,867] [MainThread] [DEBUG] [image_processor3.py:process_single_image:737] 이미지 1 치환됨 +[2025-11-22 11:50:59,868] [MainThread] [INFO] [image_processor3.py:process_single_image:753] [inpaint_model 강제] migan → inpaint_method=migan +[2025-11-22 11:50:59,868] [MainThread] [DEBUG] [image_processor3.py:process_single_image:787] ocr_count: 4 +[2025-11-22 11:50:59,868] [MainThread] [DEBUG] [image_processor3.py:process_single_image:788] is_member_valid: True +[2025-11-22 11:50:59,873] [MainThread] [DEBUG] [image_processor3.py:_try_migan_inpaint:1042] MIGAN 인페인팅 시도 +[2025-11-22 11:50:59,876] [MainThread] [DEBUG] [migan_module.py:inpaint:276] [MIGAN] 입력 형태 - 이미지: (1, 3, 1200, 816), 마스크: (1, 1, 1200, 816) +[2025-11-22 11:51:00,189] [MainThread] [DEBUG] [migan_module.py:inpaint:289] [MIGAN] 출력 형태: (1200, 816, 3), dtype: uint8 +[2025-11-22 11:51:00,189] [MainThread] [DEBUG] [migan_module.py:inpaint:297] [MIGAN] 추론 완료: 313.00 ms +[2025-11-22 11:51:00,194] [MainThread] [DEBUG] [image_processor3.py:_try_migan_inpaint:1045] MIGAN 인페인팅 성공 +[2025-11-22 11:51:00,199] [MainThread] [INFO] [image_processor3.py:execute_inpaint_with_fallback:966] 메모리 변화 [인페인팅]: 24710.4MB -> 25041.9MB (+331.5MB, +1.3%) - 방법: migan +[2025-11-22 11:51:00,200] [MainThread] [DEBUG] [image_processor3.py:process_single_image:799] 인페인팅 완료 +[2025-11-22 11:51:00,242] [MainThread] [DEBUG] [image_processor3.py:process_single_image:821] 텍스트 렌더링 완료 +[2025-11-22 11:51:00,242] [MainThread] [DEBUG] [image_processor3.py:postProcess_and_save_image:1144] watermark_text: 이미지 저작권 보유 +[2025-11-22 11:51:00,243] [MainThread] [DEBUG] [image_processor3.py:postProcess_and_save_image:1145] is_watermark_enabled: True +[2025-11-22 11:51:00,245] [MainThread] [INFO] [postImageManager.py:save_image_to_path:101] 이미지 저장 완료 : D:\py\img_worker\modules\test\translated_preview_GmarketSansTTFMedium_img_1.jpg +[2025-11-22 11:51:00,245] [MainThread] [DEBUG] [image_processor3.py:process_single_image:827] 이미지 1 번역 완료: D:\py\img_worker\modules\test\translated_preview_GmarketSansTTFMedium_img_1.jpg +[2025-11-22 11:51:00,273] [MainThread] [DEBUG] [image_processor3.py:process_single_image:880] ⏱ 이미지 파이프라인 총 1419.1ms | download=0.0ms | ocr=180.0ms | translate=516.9ms | mask=516.9ms | inpaint=332.0ms(migan/CPU) | render=42.0ms | save=3.0ms +[2025-11-22 11:51:00,274] [MainThread] [INFO] [create_font_preview.py:main:115] 프리뷰 생성 성공: D:\py\img_worker\modules\test\translated_preview_GmarketSansTTFMedium_img_1.jpg +[2025-11-22 11:51:00,285] [MainThread] [DEBUG] [image_processor3.py:cleanup:443] OCR 모듈 정리 완료 +[2025-11-22 11:51:00,285] [MainThread] [DEBUG] [image_processor3.py:cleanup:451] 마스크 모듈 정리 완료 +[2025-11-22 11:51:00,315] [MainThread] [DEBUG] [image_processor3.py:cleanup:486] 임시 폴더 삭제됨: D:\py\img_worker\modules\test +[2025-11-22 11:51:00,338] [MainThread] [DEBUG] [image_processor3.py:cleanup:486] 임시 폴더 삭제됨: D:\py\img_worker\modules\test +[2025-11-22 11:51:00,338] [MainThread] [DEBUG] [image_processor3.py:__del__:434] 이미지 프로세서 소멸 +[2025-11-22 11:51:14,944] [MainThread] [DEBUG] [image_processor3.py:__init__:57] tracemalloc 메모리 추적 시작 +[2025-11-22 11:51:14,950] [MainThread] [DEBUG] [gpu_utils.py:_setup_directml_environment:55] ✅ DirectML 환경 준비 완료 (Windows DirectX 12 기반) +[2025-11-22 11:51:14,950] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:79] === 🚀 DirectML GPU 상태 초기화 시작 🚀 === +[2025-11-22 11:51:14,951] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:80] 🎯 사용자 GPU 가속 요청: False +[2025-11-22 11:51:14,951] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:81] 💻 현재 운영체제: Windows +[2025-11-22 11:51:14,951] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:84] GPU 가속이 비활성화됨 (toggle_states['use_cuda'] = False) +[2025-11-22 11:51:14,951] [MainThread] [INFO] [gpu_utils.py:_set_safe_cpu_mode:157] 🔒 안전한 CPU 모드로 모든 GPU 설정 강제 비활성화 +[2025-11-22 11:51:14,951] [MainThread] [DEBUG] [image_processor3.py:__init__:79] 🔧 ImageProcessor3 GPU 상태 요약: +[2025-11-22 11:51:14,952] [MainThread] [DEBUG] [image_processor3.py:__init__:80] - CUDA 사용 가능: False +[2025-11-22 11:51:14,952] [MainThread] [DEBUG] [image_processor3.py:__init__:81] - toggle_states['use_cuda']: False +[2025-11-22 11:51:14,952] [MainThread] [DEBUG] [image_processor3.py:__init__:82] - GPU 하드웨어 정보: {} +[2025-11-22 11:51:14,952] [MainThread] [DEBUG] [image_processor3.py:__init__:84] ImageProcessor3 Init toggle_states: {'font_type': '폰트5', 'image_font_path': 'D:\\py\\img_worker\\modules\\fonts\\GmarketSansTTFMedium.ttf', 'ocr': True, 'force_cpu_ocr': True, 'use_cuda': False, 'inpaint_model': 'migan', 'local_inpaint_method': 'migan', 'migan_onnx_path': 'D:\\py\\img_worker\\modules\\migan_onnx\\migan_pipeline_v2.onnx', 'migan_use_accel': False, 'migan_provider_override': 'cpu', 'detail_IMGTrans_type': 'CPU', 'optionIMGTrans_type': 'CPU', 'thumb_trans_type': 'CPU', 'TEMP_IMAGE_DIR': 'D:\\py\\img_worker\\modules\\test', 'output_image_format': 'jpg', 'watermark_toggle': False, 'store_ocr_data_to_db': False, 'ocr_engine': 'onnx'} +[2025-11-22 11:51:14,952] [MainThread] [DEBUG] [image_processor3.py:__init__:87] is_member_valid: True +[2025-11-22 11:51:14,953] [MainThread] [DEBUG] [image_processor3.py:__init__:144] debug_images 디렉토리 이미 존재: D:\py\img_worker\modules\debug_images +[2025-11-22 11:51:14,953] [MainThread] [DEBUG] [image_processor3.py:__init__:152] self.font_path: D:\py\img_worker\modules\fonts\Cafe24Ohsquare-v2.0.ttf +[2025-11-22 11:51:14,953] [MainThread] [DEBUG] [image_processor3.py:__init__:154] toggle_states font_path: D:\py\img_worker\modules\fonts\Cafe24Ohsquare-v2.0.ttf +[2025-11-22 11:51:14,953] [MainThread] [DEBUG] [image_processor3.py:__init__:156] self.TEMP_IMAGE_DIR: D:\py\img_worker\modules\test +[2025-11-22 11:51:14,953] [MainThread] [DEBUG] [image_processor3.py:__init__:158] self.debugging_save_Dir: D:\py\img_worker\modules\debug_images +[2025-11-22 11:51:14,953] [MainThread] [DEBUG] [image_processor3.py:__init__:160] self.unwanted_texts: {} +[2025-11-22 11:51:14,954] [MainThread] [DEBUG] [image_processor3.py:__init__:162] self.inpaint_method: migan +[2025-11-22 11:51:14,954] [MainThread] [DEBUG] [image_processor3.py:__init__:168] Image.MAX_IMAGE_PIXELS set to 20000000 +[2025-11-22 11:51:14,954] [MainThread] [DEBUG] [onnx_ocr_wrapper.py:_determine_model_type:447] ONNX 모델 타입 설정값: 자동 선택, GPU 정보: {} +[2025-11-22 11:51:14,954] [MainThread] [INFO] [onnx_ocr_wrapper.py:_determine_model_type:453] 자동 선택 모드: GPU 추천 모델 simp 사용 +[2025-11-22 11:51:14,954] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:324] ONNX OCR 모델 타입 결정: simp (GPU: False) +[2025-11-22 11:51:14,955] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:333] ONNX OCR 모듈 CPU 모드로 설정 +[2025-11-22 11:51:14,955] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:356] 🚀 ONNX TextSystem 초기화 시작 (CPU 모드) +[2025-11-22 11:51:14,955] [MainThread] [DEBUG] [onnx_ocr_wrapper.py:_initialize_onnx_system:539] 🚀 ONNX TextSystem 초기화 시작 (CPU 모드) +[2025-11-22 11:51:16,755] [MainThread] [DEBUG] [onnx_ocr_wrapper.py:_ensure_utf8_encoding:487] 문자 사전 파일 UTF-8 확인 완료: D:\py\img_worker\modules\onnx_ocr_module\dict\ppocr_keys_v1.txt +[2025-11-22 11:51:16,840] [MainThread] [INFO] [onnx_ocr_wrapper.py:_initialize_onnx_system:743] ✅ ONNX TextSystem 초기화 완료 (CPU + SIMP (호환성) 모델) +[2025-11-22 11:51:16,840] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:363] ✅ ONNX TextSystem 초기화 완료 (CPU + SIMP 모델) +[2025-11-22 11:51:16,840] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:364] ✅ ONNX OCR 모듈 초기화 성공 (CPU 모드) +[2025-11-22 11:51:16,841] [MainThread] [INFO] [image_processor3.py:__init__:175] ✅ ONNX OCR 모듈 초기화 성공 +[2025-11-22 11:51:16,841] [MainThread] [INFO] [mask_module_for_paddle.py:__init__:12] 마스크 모듈 초기화 완료 +[2025-11-22 11:51:16,841] [MainThread] [DEBUG] [image_processor3.py:__init__:216] MaskModule 초기화 성공 +[2025-11-22 11:51:16,841] [MainThread] [INFO] [text_rendering_module.py:__init__:21] 텍스트 렌더링 모듈 초기화 완료 +[2025-11-22 11:51:16,842] [MainThread] [INFO] [text_rendering_module.py:__init__:22] 기본 폰트: D:\py\img_worker\modules\fonts\Cafe24Ohsquare-v2.0.ttf +[2025-11-22 11:51:16,842] [MainThread] [DEBUG] [image_processor3.py:__init__:222] TextRenderingModule 초기화 성공 +[2025-11-22 11:51:16,843] [MainThread] [DEBUG] [postImageManager.py:font_load:40] 폰트 로드 성공: D:\py\img_worker\modules\fonts\Cafe24Ohsquare-v2.0.ttf +[2025-11-22 11:51:16,843] [MainThread] [DEBUG] [image_processor3.py:__init__:228] PostImageManager 초기화 성공 +[2025-11-22 11:51:16,844] [MainThread] [DEBUG] [request_inpaint.py:__init__:43] Request_AI_Server GPU 상태: CUDA 사용 가능=False +[2025-11-22 11:51:16,844] [MainThread] [DEBUG] [image_processor3.py:__init__:251] Request_AI_Server 초기화 성공 +[2025-11-22 11:51:16,844] [MainThread] [DEBUG] [image_processor3.py:__init__:258] GoogleTranslate 초기화 성공 +[2025-11-22 11:51:16,845] [MainThread] [DEBUG] [image_processor3.py:__init__:284] MIGAN CUDA 사용 불가 - CPU 모드로 설정 +[2025-11-22 11:51:16,845] [MainThread] [DEBUG] [image_processor3.py:__init__:286] [MIGAN] GPU 관리자 전달: GPUManager, can_use_cuda: False +[2025-11-22 11:51:16,846] [MainThread] [DEBUG] [migan_module.py:_get_or_create_session:166] [MIGAN] GPU 관리자 사용 가능: False +[2025-11-22 11:51:16,846] [MainThread] [DEBUG] [migan_module.py:_get_or_create_session:186] [MIGAN] CPU 전용 모드 +[2025-11-22 11:51:16,846] [MainThread] [DEBUG] [migan_module.py:_get_or_create_session:188] [MIGAN] 최종 providers: [('CPUExecutionProvider', {})] +[2025-11-22 11:51:16,846] [MainThread] [DEBUG] [migan_module.py:_get_or_create_session:204] [MIGAN] CPU 전용 시도: [('CPUExecutionProvider', {})] +[2025-11-22 11:51:16,926] [MainThread] [INFO] [migan_module.py:_get_or_create_session:207] [MIGAN] CPU 전용 성공! 실제 providers: ['CPUExecutionProvider'] +[2025-11-22 11:51:16,926] [MainThread] [DEBUG] [migan_module.py:__init__:115] [MIGAN] 입력 0: image, 형태: ['batch_size', 3, 'height', 'width'], 타입: tensor(uint8) +[2025-11-22 11:51:16,926] [MainThread] [DEBUG] [migan_module.py:__init__:115] [MIGAN] 입력 1: mask, 형태: ['batch_size', 1, 'height', 'width'], 타입: tensor(uint8) +[2025-11-22 11:51:16,927] [MainThread] [DEBUG] [migan_module.py:__init__:117] [MIGAN] 출력 0: result, 형태: ['ScatterNDresult_dim_0', 3, 'ScatterNDresult_dim_2', 'ScatterNDresult_dim_3'], 타입: tensor(uint8) +[2025-11-22 11:51:16,927] [MainThread] [DEBUG] [migan_module.py:__init__:119] [MIGAN] 세션 준비 완료. providers=['CPUExecutionProvider'] +[2025-11-22 11:51:16,927] [MainThread] [DEBUG] [migan_module.py:build_migan_from_toggle:348] [MIGAN] GPU 관리자 연결 완료: GPUManager +[2025-11-22 11:51:16,927] [MainThread] [DEBUG] [migan_module.py:build_migan_from_toggle:355] [MIGAN] 파이프라인 gpu_manager 속성: True, 값: +[2025-11-22 11:51:16,928] [MainThread] [DEBUG] [image_processor3.py:__init__:288] [MIGAN] 초기화 완료: gpu_manager 속성=True, 값= +[2025-11-22 11:51:16,928] [MainThread] [INFO] [create_font_preview.py:main:98] 프리뷰 생성 시작: GmarketSansTTFMedium.ttf +[2025-11-22 11:51:16,928] [MainThread] [INFO] [create_font_preview.py:main:99] 저장 경로: D:\py\img_worker\modules\test +[2025-11-22 11:51:16,928] [MainThread] [DEBUG] [image_processor3.py:process_single_image:583] 이미지 번역시작 +[2025-11-22 11:51:16,929] [MainThread] [DEBUG] [image_processor3.py:process_single_image:585] toggle_states: {'font_type': '폰트5', 'image_font_path': 'D:\\py\\img_worker\\modules\\fonts\\Cafe24Ohsquare-v2.0.ttf', 'ocr': True, 'force_cpu_ocr': True, 'use_cuda': False, 'inpaint_model': 'migan', 'local_inpaint_method': 'migan', 'migan_onnx_path': 'D:\\py\\img_worker\\modules\\migan_onnx\\migan_pipeline_v2.onnx', 'migan_use_accel': False, 'migan_provider_override': 'cpu', 'detail_IMGTrans_type': 'CPU', 'optionIMGTrans_type': 'CPU', 'thumb_trans_type': 'CPU', 'TEMP_IMAGE_DIR': 'D:\\py\\img_worker\\modules\\test', 'output_image_format': 'jpg', 'watermark_toggle': False, 'store_ocr_data_to_db': False, 'ocr_engine': 'onnx'} +[2025-11-22 11:51:17,427] [MainThread] [DEBUG] [image_processor3.py:process_single_image:603] 이미지 1 처리 시작: D:\py\img_worker\modules\fonts\ori.jpg - OCR+인페인팅 모드 +[2025-11-22 11:51:17,427] [MainThread] [DEBUG] [image_processor3.py:download_image:1191] 로컬 파일 경로 감지, 다운로드 생략: D:\py\img_worker\modules\fonts\ori.jpg +[2025-11-22 11:51:17,427] [MainThread] [DEBUG] [image_processor3.py:process_single_image:626] 옵션 이미지는 스케일 처리 건너뛰기: preview_GmarketSansTTFMedium +[2025-11-22 11:51:17,428] [MainThread] [DEBUG] [image_processor3.py:process_single_image:636] 이미지 1 로컬 저장위치(옵션 이미지 원본 유지): D:\py\img_worker\modules\fonts\ori.jpg +[2025-11-22 11:51:17,434] [MainThread] [INFO] [onnx_ocr_wrapper.py:detect_text:838] 🔍 ONNX OCR 감지 방식: polygon +[2025-11-22 11:51:17,605] [MainThread] [INFO] [onnx_ocr_wrapper.py:detect_text:906] ⚡ ONNX OCR 추론 완료: 170.0ms +[2025-11-22 11:51:17,606] [MainThread] [INFO] [onnx_ocr_wrapper.py:detect_text:907] 📊 세부 시간 - 감지: 88.0ms, 인식: 74.0ms, 분류: 4.0ms +[2025-11-22 11:51:17,615] [MainThread] [INFO] [image_processor3.py:process_single_image:652] 메모리 변화 [OCR 처리]: 24774.9MB -> 24899.3MB (+124.5MB, +0.5%) - 이미지 1 +[2025-11-22 11:51:17,618] [MainThread] [DEBUG] [image_processor3.py:process_single_image:657] ocr_results: [{'text': '现代极简风格', 'confidence': 0.9946680068969727, 'polygon': [[222.0, 70.0], [552.0, 70.0], [552.0, 118.0], [222.0, 118.0]], 'bbox': (222, 70, 331, 49), 'method': 'polygon'}, {'text': '更易搭配各种使用场景', 'confidence': 0.9957253336906433, 'polygon': [[152.0, 141.0], [622.0, 141.0], [622.0, 180.0], [152.0, 180.0]], 'bbox': (152, 141, 471, 40), 'method': 'polygon'}, {'text': '半圆两端设计', 'confidence': 0.9974236488342285, 'polygon': [[88.0, 289.0], [463.0, 289.0], [463.0, 345.0], [88.0, 345.0]], 'bbox': (88, 289, 376, 57), 'method': 'polygon'}, {'text': '承载各种欢乐', 'confidence': 0.9939405918121338, 'polygon': [[87.0, 369.0], [462.0, 369.0], [462.0, 425.0], [87.0, 425.0]], 'bbox': (87, 369, 376, 57), 'method': 'polygon'}] +[2025-11-22 11:51:17,642] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1101] [필터링] 포함 (신뢰도 99.5%): '现代极简风格' +[2025-11-22 11:51:17,642] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1101] [필터링] 포함 (신뢰도 99.6%): '更易搭配各种使用场景' +[2025-11-22 11:51:17,643] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1101] [필터링] 포함 (신뢰도 99.7%): '半圆两端设计' +[2025-11-22 11:51:17,643] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1101] [필터링] 포함 (신뢰도 99.4%): '承载各种欢乐' +[2025-11-22 11:51:17,643] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1105] 필터링 결과: 4/4개 (신뢰도 + & 중국어) +[2025-11-22 11:51:17,646] [MainThread] [DEBUG] [image_processor3.py:process_single_image:669] filter_ocr_results: [{'text': '现代极简风格', 'confidence': 0.9946680068969727, 'polygon': [[222.0, 70.0], [552.0, 70.0], [552.0, 118.0], [222.0, 118.0]], 'bbox': (222, 70, 331, 49), 'method': 'polygon'}, {'text': '更易搭配各种使用场景', 'confidence': 0.9957253336906433, 'polygon': [[152.0, 141.0], [622.0, 141.0], [622.0, 180.0], [152.0, 180.0]], 'bbox': (152, 141, 471, 40), 'method': 'polygon'}, {'text': '半圆两端设计', 'confidence': 0.9974236488342285, 'polygon': [[88.0, 289.0], [463.0, 289.0], [463.0, 345.0], [88.0, 345.0]], 'bbox': (88, 289, 376, 57), 'method': 'polygon'}, {'text': '承载各种欢乐', 'confidence': 0.9939405918121338, 'polygon': [[87.0, 369.0], [462.0, 369.0], [462.0, 425.0], [87.0, 425.0]], 'bbox': (87, 369, 376, 57), 'method': 'polygon'}] +[2025-11-22 11:51:17,646] [MainThread] [INFO] [onnx_ocr_wrapper.py:filter_chinese_text:1192] 중국어 텍스트 4개 필터링 완료 +[2025-11-22 11:51:17,646] [MainThread] [INFO] [onnx_ocr_wrapper.py:filter_korean_text:1213] 한글 텍스트 0개 필터링 완료 +[2025-11-22 11:51:18,123] [MainThread] [DEBUG] [image_processor3.py:process_single_image:727] translated_texts: ['모던한 미니멀 스타일', '다양한 사용 시나리오에 더 쉽게 일치', '반원형 끝 디자인', '온갖 기쁨을 안고'] +[2025-11-22 11:51:18,124] [MainThread] [DEBUG] [image_processor3.py:process_single_image:728] 마스크 생성 완료 +[2025-11-22 11:51:18,124] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1312] [치환 처리 1] 원본 텍스트: '모던한 미니멀 스타일' +[2025-11-22 11:51:18,124] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1316] [치환 처리 1] 분리된 단어: ['모던한', '미니멀', '스타일'] +[2025-11-22 11:51:18,124] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1357] [치환 처리 1] 변경 없음: '모던한 미니멀 스타일' +[2025-11-22 11:51:18,125] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1312] [치환 처리 2] 원본 텍스트: '다양한 사용 시나리오에 더 쉽게 일치' +[2025-11-22 11:51:18,125] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1316] [치환 처리 2] 분리된 단어: ['다양한', '사용', '시나리오에', '더', '쉽게', '일치'] +[2025-11-22 11:51:18,125] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1357] [치환 처리 2] 변경 없음: '다양한 사용 시나리오에 더 쉽게 일치' +[2025-11-22 11:51:18,125] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1312] [치환 처리 3] 원본 텍스트: '반원형 끝 디자인' +[2025-11-22 11:51:18,125] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1316] [치환 처리 3] 분리된 단어: ['반원형', '끝', '디자인'] +[2025-11-22 11:51:18,126] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1357] [치환 처리 3] 변경 없음: '반원형 끝 디자인' +[2025-11-22 11:51:18,126] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1312] [치환 처리 4] 원본 텍스트: '온갖 기쁨을 안고' +[2025-11-22 11:51:18,126] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1316] [치환 처리 4] 분리된 단어: ['온갖', '기쁨을', '안고'] +[2025-11-22 11:51:18,126] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1357] [치환 처리 4] 변경 없음: '온갖 기쁨을 안고' +[2025-11-22 11:51:18,126] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1359] 전체 치환 결과: 4개 텍스트 처리 완료 +[2025-11-22 11:51:18,126] [MainThread] [DEBUG] [image_processor3.py:process_single_image:737] 이미지 1 치환됨 +[2025-11-22 11:51:18,127] [MainThread] [INFO] [image_processor3.py:process_single_image:753] [inpaint_model 강제] migan → inpaint_method=migan +[2025-11-22 11:51:18,127] [MainThread] [DEBUG] [image_processor3.py:process_single_image:787] ocr_count: 4 +[2025-11-22 11:51:18,127] [MainThread] [DEBUG] [image_processor3.py:process_single_image:788] is_member_valid: True +[2025-11-22 11:51:18,132] [MainThread] [DEBUG] [image_processor3.py:_try_migan_inpaint:1042] MIGAN 인페인팅 시도 +[2025-11-22 11:51:18,135] [MainThread] [DEBUG] [migan_module.py:inpaint:276] [MIGAN] 입력 형태 - 이미지: (1, 3, 1200, 816), 마스크: (1, 1, 1200, 816) +[2025-11-22 11:51:18,452] [MainThread] [DEBUG] [migan_module.py:inpaint:289] [MIGAN] 출력 형태: (1200, 816, 3), dtype: uint8 +[2025-11-22 11:51:18,453] [MainThread] [DEBUG] [migan_module.py:inpaint:297] [MIGAN] 추론 완료: 318.00 ms +[2025-11-22 11:51:18,458] [MainThread] [DEBUG] [image_processor3.py:_try_migan_inpaint:1045] MIGAN 인페인팅 성공 +[2025-11-22 11:51:18,462] [MainThread] [INFO] [image_processor3.py:execute_inpaint_with_fallback:966] 메모리 변화 [인페인팅]: 24903.6MB -> 25269.9MB (+366.3MB, +1.5%) - 방법: migan +[2025-11-22 11:51:18,463] [MainThread] [DEBUG] [image_processor3.py:process_single_image:799] 인페인팅 완료 +[2025-11-22 11:51:18,500] [MainThread] [DEBUG] [image_processor3.py:process_single_image:821] 텍스트 렌더링 완료 +[2025-11-22 11:51:18,501] [MainThread] [DEBUG] [image_processor3.py:postProcess_and_save_image:1144] watermark_text: 이미지 저작권 보유 +[2025-11-22 11:51:18,501] [MainThread] [DEBUG] [image_processor3.py:postProcess_and_save_image:1145] is_watermark_enabled: True +[2025-11-22 11:51:18,503] [MainThread] [INFO] [postImageManager.py:save_image_to_path:101] 이미지 저장 완료 : D:\py\img_worker\modules\test\translated_preview_GmarketSansTTFMedium_img_1.jpg +[2025-11-22 11:51:18,503] [MainThread] [DEBUG] [image_processor3.py:process_single_image:827] 이미지 1 번역 완료: D:\py\img_worker\modules\test\translated_preview_GmarketSansTTFMedium_img_1.jpg +[2025-11-22 11:51:18,534] [MainThread] [DEBUG] [image_processor3.py:process_single_image:880] ⏱ 이미지 파이프라인 총 1604.7ms | download=0.0ms | ocr=182.0ms | translate=476.9ms | mask=476.9ms | inpaint=336.0ms(migan/CPU) | render=37.0ms | save=2.0ms +[2025-11-22 11:51:18,534] [MainThread] [INFO] [create_font_preview.py:main:115] 프리뷰 생성 성공: D:\py\img_worker\modules\test\translated_preview_GmarketSansTTFMedium_img_1.jpg +[2025-11-22 11:51:18,544] [MainThread] [DEBUG] [image_processor3.py:cleanup:443] OCR 모듈 정리 완료 +[2025-11-22 11:51:18,546] [MainThread] [DEBUG] [image_processor3.py:cleanup:451] 마스크 모듈 정리 완료 +[2025-11-22 11:51:18,573] [MainThread] [DEBUG] [image_processor3.py:cleanup:486] 임시 폴더 삭제됨: D:\py\img_worker\modules\test +[2025-11-22 11:51:18,592] [MainThread] [DEBUG] [image_processor3.py:cleanup:486] 임시 폴더 삭제됨: D:\py\img_worker\modules\test +[2025-11-22 11:51:18,592] [MainThread] [DEBUG] [image_processor3.py:__del__:434] 이미지 프로세서 소멸 +[2025-11-22 11:51:53,071] [MainThread] [DEBUG] [image_processor3.py:__init__:57] tracemalloc 메모리 추적 시작 +[2025-11-22 11:51:53,077] [MainThread] [DEBUG] [gpu_utils.py:_setup_directml_environment:55] ✅ DirectML 환경 준비 완료 (Windows DirectX 12 기반) +[2025-11-22 11:51:53,077] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:79] === 🚀 DirectML GPU 상태 초기화 시작 🚀 === +[2025-11-22 11:51:53,078] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:80] 🎯 사용자 GPU 가속 요청: False +[2025-11-22 11:51:53,078] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:81] 💻 현재 운영체제: Windows +[2025-11-22 11:51:53,078] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:84] GPU 가속이 비활성화됨 (toggle_states['use_cuda'] = False) +[2025-11-22 11:51:53,078] [MainThread] [INFO] [gpu_utils.py:_set_safe_cpu_mode:157] 🔒 안전한 CPU 모드로 모든 GPU 설정 강제 비활성화 +[2025-11-22 11:51:53,078] [MainThread] [DEBUG] [image_processor3.py:__init__:79] 🔧 ImageProcessor3 GPU 상태 요약: +[2025-11-22 11:51:53,079] [MainThread] [DEBUG] [image_processor3.py:__init__:80] - CUDA 사용 가능: False +[2025-11-22 11:51:53,079] [MainThread] [DEBUG] [image_processor3.py:__init__:81] - toggle_states['use_cuda']: False +[2025-11-22 11:51:53,079] [MainThread] [DEBUG] [image_processor3.py:__init__:82] - GPU 하드웨어 정보: {} +[2025-11-22 11:51:53,079] [MainThread] [DEBUG] [image_processor3.py:__init__:84] ImageProcessor3 Init toggle_states: {'font_type': '폰트6', 'image_font_path': 'D:\\py\\img_worker\\modules\\fonts\\GmarketSansTTFMedium.ttf', 'ocr': True, 'force_cpu_ocr': True, 'use_cuda': False, 'inpaint_model': 'migan', 'local_inpaint_method': 'migan', 'migan_onnx_path': 'D:\\py\\img_worker\\modules\\migan_onnx\\migan_pipeline_v2.onnx', 'migan_use_accel': False, 'migan_provider_override': 'cpu', 'detail_IMGTrans_type': 'CPU', 'optionIMGTrans_type': 'CPU', 'thumb_trans_type': 'CPU', 'TEMP_IMAGE_DIR': 'D:\\py\\img_worker\\modules\\test', 'output_image_format': 'jpg', 'watermark_toggle': False, 'store_ocr_data_to_db': False, 'ocr_engine': 'onnx'} +[2025-11-22 11:51:53,079] [MainThread] [DEBUG] [image_processor3.py:__init__:87] is_member_valid: True +[2025-11-22 11:51:53,080] [MainThread] [DEBUG] [image_processor3.py:__init__:145] debug_images 디렉토리 이미 존재: D:\py\img_worker\modules\debug_images +[2025-11-22 11:51:53,080] [MainThread] [DEBUG] [image_processor3.py:__init__:153] self.font_path: D:\py\img_worker\modules\fonts\GmarketSansTTFMedium.ttf +[2025-11-22 11:51:53,080] [MainThread] [DEBUG] [image_processor3.py:__init__:155] toggle_states font_path: D:\py\img_worker\modules\fonts\GmarketSansTTFMedium.ttf +[2025-11-22 11:51:53,080] [MainThread] [DEBUG] [image_processor3.py:__init__:157] self.TEMP_IMAGE_DIR: D:\py\img_worker\modules\test +[2025-11-22 11:51:53,080] [MainThread] [DEBUG] [image_processor3.py:__init__:159] self.debugging_save_Dir: D:\py\img_worker\modules\debug_images +[2025-11-22 11:51:53,080] [MainThread] [DEBUG] [image_processor3.py:__init__:161] self.unwanted_texts: {} +[2025-11-22 11:51:53,081] [MainThread] [DEBUG] [image_processor3.py:__init__:163] self.inpaint_method: migan +[2025-11-22 11:51:53,081] [MainThread] [DEBUG] [image_processor3.py:__init__:169] Image.MAX_IMAGE_PIXELS set to 20000000 +[2025-11-22 11:51:53,081] [MainThread] [DEBUG] [onnx_ocr_wrapper.py:_determine_model_type:447] ONNX 모델 타입 설정값: 자동 선택, GPU 정보: {} +[2025-11-22 11:51:53,081] [MainThread] [INFO] [onnx_ocr_wrapper.py:_determine_model_type:453] 자동 선택 모드: GPU 추천 모델 simp 사용 +[2025-11-22 11:51:53,081] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:324] ONNX OCR 모델 타입 결정: simp (GPU: False) +[2025-11-22 11:51:53,082] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:333] ONNX OCR 모듈 CPU 모드로 설정 +[2025-11-22 11:51:53,082] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:356] 🚀 ONNX TextSystem 초기화 시작 (CPU 모드) +[2025-11-22 11:51:53,082] [MainThread] [DEBUG] [onnx_ocr_wrapper.py:_initialize_onnx_system:539] 🚀 ONNX TextSystem 초기화 시작 (CPU 모드) +[2025-11-22 11:51:54,856] [MainThread] [DEBUG] [onnx_ocr_wrapper.py:_ensure_utf8_encoding:487] 문자 사전 파일 UTF-8 확인 완료: D:\py\img_worker\modules\onnx_ocr_module\dict\ppocr_keys_v1.txt +[2025-11-22 11:51:54,939] [MainThread] [INFO] [onnx_ocr_wrapper.py:_initialize_onnx_system:743] ✅ ONNX TextSystem 초기화 완료 (CPU + SIMP (호환성) 모델) +[2025-11-22 11:51:54,939] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:363] ✅ ONNX TextSystem 초기화 완료 (CPU + SIMP 모델) +[2025-11-22 11:51:54,940] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:364] ✅ ONNX OCR 모듈 초기화 성공 (CPU 모드) +[2025-11-22 11:51:54,940] [MainThread] [INFO] [image_processor3.py:__init__:176] ✅ ONNX OCR 모듈 초기화 성공 +[2025-11-22 11:51:54,940] [MainThread] [INFO] [mask_module_for_paddle.py:__init__:12] 마스크 모듈 초기화 완료 +[2025-11-22 11:51:54,941] [MainThread] [DEBUG] [image_processor3.py:__init__:217] MaskModule 초기화 성공 +[2025-11-22 11:51:54,941] [MainThread] [INFO] [text_rendering_module.py:__init__:21] 텍스트 렌더링 모듈 초기화 완료 +[2025-11-22 11:51:54,941] [MainThread] [INFO] [text_rendering_module.py:__init__:22] 기본 폰트: D:\py\img_worker\modules\fonts\GmarketSansTTFMedium.ttf +[2025-11-22 11:51:54,941] [MainThread] [DEBUG] [image_processor3.py:__init__:223] TextRenderingModule 초기화 성공 +[2025-11-22 11:51:54,942] [MainThread] [DEBUG] [postImageManager.py:font_load:40] 폰트 로드 성공: D:\py\img_worker\modules\fonts\GmarketSansTTFMedium.ttf +[2025-11-22 11:51:54,943] [MainThread] [DEBUG] [image_processor3.py:__init__:229] PostImageManager 초기화 성공 +[2025-11-22 11:51:54,943] [MainThread] [DEBUG] [request_inpaint.py:__init__:43] Request_AI_Server GPU 상태: CUDA 사용 가능=False +[2025-11-22 11:51:54,943] [MainThread] [DEBUG] [image_processor3.py:__init__:252] Request_AI_Server 초기화 성공 +[2025-11-22 11:51:54,943] [MainThread] [DEBUG] [image_processor3.py:__init__:259] GoogleTranslate 초기화 성공 +[2025-11-22 11:51:54,944] [MainThread] [DEBUG] [image_processor3.py:__init__:285] MIGAN CUDA 사용 불가 - CPU 모드로 설정 +[2025-11-22 11:51:54,945] [MainThread] [DEBUG] [image_processor3.py:__init__:287] [MIGAN] GPU 관리자 전달: GPUManager, can_use_cuda: False +[2025-11-22 11:51:54,945] [MainThread] [DEBUG] [migan_module.py:_get_or_create_session:166] [MIGAN] GPU 관리자 사용 가능: False +[2025-11-22 11:51:54,945] [MainThread] [DEBUG] [migan_module.py:_get_or_create_session:186] [MIGAN] CPU 전용 모드 +[2025-11-22 11:51:54,946] [MainThread] [DEBUG] [migan_module.py:_get_or_create_session:188] [MIGAN] 최종 providers: [('CPUExecutionProvider', {})] +[2025-11-22 11:51:54,946] [MainThread] [DEBUG] [migan_module.py:_get_or_create_session:204] [MIGAN] CPU 전용 시도: [('CPUExecutionProvider', {})] +[2025-11-22 11:51:55,023] [MainThread] [INFO] [migan_module.py:_get_or_create_session:207] [MIGAN] CPU 전용 성공! 실제 providers: ['CPUExecutionProvider'] +[2025-11-22 11:51:55,024] [MainThread] [DEBUG] [migan_module.py:__init__:115] [MIGAN] 입력 0: image, 형태: ['batch_size', 3, 'height', 'width'], 타입: tensor(uint8) +[2025-11-22 11:51:55,024] [MainThread] [DEBUG] [migan_module.py:__init__:115] [MIGAN] 입력 1: mask, 형태: ['batch_size', 1, 'height', 'width'], 타입: tensor(uint8) +[2025-11-22 11:51:55,025] [MainThread] [DEBUG] [migan_module.py:__init__:117] [MIGAN] 출력 0: result, 형태: ['ScatterNDresult_dim_0', 3, 'ScatterNDresult_dim_2', 'ScatterNDresult_dim_3'], 타입: tensor(uint8) +[2025-11-22 11:51:55,025] [MainThread] [DEBUG] [migan_module.py:__init__:119] [MIGAN] 세션 준비 완료. providers=['CPUExecutionProvider'] +[2025-11-22 11:51:55,025] [MainThread] [DEBUG] [migan_module.py:build_migan_from_toggle:348] [MIGAN] GPU 관리자 연결 완료: GPUManager +[2025-11-22 11:51:55,025] [MainThread] [DEBUG] [migan_module.py:build_migan_from_toggle:355] [MIGAN] 파이프라인 gpu_manager 속성: True, 값: +[2025-11-22 11:51:55,025] [MainThread] [DEBUG] [image_processor3.py:__init__:289] [MIGAN] 초기화 완료: gpu_manager 속성=True, 값= +[2025-11-22 11:51:55,026] [MainThread] [INFO] [create_font_preview.py:main:98] 프리뷰 생성 시작: GmarketSansTTFMedium.ttf +[2025-11-22 11:51:55,026] [MainThread] [INFO] [create_font_preview.py:main:99] 저장 경로: D:\py\img_worker\modules\test +[2025-11-22 11:51:55,026] [MainThread] [DEBUG] [image_processor3.py:process_single_image:584] 이미지 번역시작 +[2025-11-22 11:51:55,026] [MainThread] [DEBUG] [image_processor3.py:process_single_image:586] toggle_states: {'font_type': '폰트6', 'image_font_path': 'D:\\py\\img_worker\\modules\\fonts\\GmarketSansTTFMedium.ttf', 'ocr': True, 'force_cpu_ocr': True, 'use_cuda': False, 'inpaint_model': 'migan', 'local_inpaint_method': 'migan', 'migan_onnx_path': 'D:\\py\\img_worker\\modules\\migan_onnx\\migan_pipeline_v2.onnx', 'migan_use_accel': False, 'migan_provider_override': 'cpu', 'detail_IMGTrans_type': 'CPU', 'optionIMGTrans_type': 'CPU', 'thumb_trans_type': 'CPU', 'TEMP_IMAGE_DIR': 'D:\\py\\img_worker\\modules\\test', 'output_image_format': 'jpg', 'watermark_toggle': False, 'store_ocr_data_to_db': False, 'ocr_engine': 'onnx'} +[2025-11-22 11:51:55,447] [MainThread] [DEBUG] [image_processor3.py:process_single_image:604] 이미지 1 처리 시작: D:\py\img_worker\modules\fonts\ori.jpg - OCR+인페인팅 모드 +[2025-11-22 11:51:55,447] [MainThread] [DEBUG] [image_processor3.py:download_image:1192] 로컬 파일 경로 감지, 다운로드 생략: D:\py\img_worker\modules\fonts\ori.jpg +[2025-11-22 11:51:55,447] [MainThread] [DEBUG] [image_processor3.py:process_single_image:627] 옵션 이미지는 스케일 처리 건너뛰기: preview_GmarketSansTTFMedium +[2025-11-22 11:51:55,448] [MainThread] [DEBUG] [image_processor3.py:process_single_image:637] 이미지 1 로컬 저장위치(옵션 이미지 원본 유지): D:\py\img_worker\modules\fonts\ori.jpg +[2025-11-22 11:51:55,454] [MainThread] [INFO] [onnx_ocr_wrapper.py:detect_text:838] 🔍 ONNX OCR 감지 방식: polygon +[2025-11-22 11:51:55,619] [MainThread] [INFO] [onnx_ocr_wrapper.py:detect_text:906] ⚡ ONNX OCR 추론 완료: 164.0ms +[2025-11-22 11:51:55,620] [MainThread] [INFO] [onnx_ocr_wrapper.py:detect_text:907] 📊 세부 시간 - 감지: 90.0ms, 인식: 67.0ms, 분류: 3.0ms +[2025-11-22 11:51:55,629] [MainThread] [INFO] [image_processor3.py:process_single_image:653] 메모리 변화 [OCR 처리]: 23863.6MB -> 23987.4MB (+123.8MB, +0.5%) - 이미지 1 +[2025-11-22 11:51:55,631] [MainThread] [DEBUG] [image_processor3.py:process_single_image:658] ocr_results: [{'text': '现代极简风格', 'confidence': 0.9946680068969727, 'polygon': [[222.0, 70.0], [552.0, 70.0], [552.0, 118.0], [222.0, 118.0]], 'bbox': (222, 70, 331, 49), 'method': 'polygon'}, {'text': '更易搭配各种使用场景', 'confidence': 0.9957253336906433, 'polygon': [[152.0, 141.0], [622.0, 141.0], [622.0, 180.0], [152.0, 180.0]], 'bbox': (152, 141, 471, 40), 'method': 'polygon'}, {'text': '半圆两端设计', 'confidence': 0.9974236488342285, 'polygon': [[88.0, 289.0], [463.0, 289.0], [463.0, 345.0], [88.0, 345.0]], 'bbox': (88, 289, 376, 57), 'method': 'polygon'}, {'text': '承载各种欢乐', 'confidence': 0.9939405918121338, 'polygon': [[87.0, 369.0], [462.0, 369.0], [462.0, 425.0], [87.0, 425.0]], 'bbox': (87, 369, 376, 57), 'method': 'polygon'}] +[2025-11-22 11:51:55,654] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1102] [필터링] 포함 (신뢰도 99.5%): '现代极简风格' +[2025-11-22 11:51:55,655] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1102] [필터링] 포함 (신뢰도 99.6%): '更易搭配各种使用场景' +[2025-11-22 11:51:55,655] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1102] [필터링] 포함 (신뢰도 99.7%): '半圆两端设计' +[2025-11-22 11:51:55,655] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1102] [필터링] 포함 (신뢰도 99.4%): '承载各种欢乐' +[2025-11-22 11:51:55,656] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1106] 필터링 결과: 4/4개 (신뢰도 + & 중국어) +[2025-11-22 11:51:55,658] [MainThread] [DEBUG] [image_processor3.py:process_single_image:670] filter_ocr_results: [{'text': '现代极简风格', 'confidence': 0.9946680068969727, 'polygon': [[222.0, 70.0], [552.0, 70.0], [552.0, 118.0], [222.0, 118.0]], 'bbox': (222, 70, 331, 49), 'method': 'polygon'}, {'text': '更易搭配各种使用场景', 'confidence': 0.9957253336906433, 'polygon': [[152.0, 141.0], [622.0, 141.0], [622.0, 180.0], [152.0, 180.0]], 'bbox': (152, 141, 471, 40), 'method': 'polygon'}, {'text': '半圆两端设计', 'confidence': 0.9974236488342285, 'polygon': [[88.0, 289.0], [463.0, 289.0], [463.0, 345.0], [88.0, 345.0]], 'bbox': (88, 289, 376, 57), 'method': 'polygon'}, {'text': '承载各种欢乐', 'confidence': 0.9939405918121338, 'polygon': [[87.0, 369.0], [462.0, 369.0], [462.0, 425.0], [87.0, 425.0]], 'bbox': (87, 369, 376, 57), 'method': 'polygon'}] +[2025-11-22 11:51:55,658] [MainThread] [INFO] [onnx_ocr_wrapper.py:filter_chinese_text:1192] 중국어 텍스트 4개 필터링 완료 +[2025-11-22 11:51:55,658] [MainThread] [INFO] [onnx_ocr_wrapper.py:filter_korean_text:1213] 한글 텍스트 0개 필터링 완료 +[2025-11-22 11:51:56,121] [MainThread] [DEBUG] [image_processor3.py:process_single_image:728] translated_texts: ['모던한 미니멀 스타일', '다양한 사용 시나리오에 더 쉽게 일치', '반원형 끝 디자인', '온갖 기쁨을 안고'] +[2025-11-22 11:51:56,121] [MainThread] [DEBUG] [image_processor3.py:process_single_image:729] 마스크 생성 완료 +[2025-11-22 11:51:56,121] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1313] [치환 처리 1] 원본 텍스트: '모던한 미니멀 스타일' +[2025-11-22 11:51:56,121] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1317] [치환 처리 1] 분리된 단어: ['모던한', '미니멀', '스타일'] +[2025-11-22 11:51:56,122] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1358] [치환 처리 1] 변경 없음: '모던한 미니멀 스타일' +[2025-11-22 11:51:56,122] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1313] [치환 처리 2] 원본 텍스트: '다양한 사용 시나리오에 더 쉽게 일치' +[2025-11-22 11:51:56,122] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1317] [치환 처리 2] 분리된 단어: ['다양한', '사용', '시나리오에', '더', '쉽게', '일치'] +[2025-11-22 11:51:56,122] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1358] [치환 처리 2] 변경 없음: '다양한 사용 시나리오에 더 쉽게 일치' +[2025-11-22 11:51:56,122] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1313] [치환 처리 3] 원본 텍스트: '반원형 끝 디자인' +[2025-11-22 11:51:56,123] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1317] [치환 처리 3] 분리된 단어: ['반원형', '끝', '디자인'] +[2025-11-22 11:51:56,123] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1358] [치환 처리 3] 변경 없음: '반원형 끝 디자인' +[2025-11-22 11:51:56,123] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1313] [치환 처리 4] 원본 텍스트: '온갖 기쁨을 안고' +[2025-11-22 11:51:56,123] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1317] [치환 처리 4] 분리된 단어: ['온갖', '기쁨을', '안고'] +[2025-11-22 11:51:56,123] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1358] [치환 처리 4] 변경 없음: '온갖 기쁨을 안고' +[2025-11-22 11:51:56,123] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1360] 전체 치환 결과: 4개 텍스트 처리 완료 +[2025-11-22 11:51:56,124] [MainThread] [DEBUG] [image_processor3.py:process_single_image:738] 이미지 1 치환됨 +[2025-11-22 11:51:56,124] [MainThread] [INFO] [image_processor3.py:process_single_image:754] [inpaint_model 강제] migan → inpaint_method=migan +[2025-11-22 11:51:56,124] [MainThread] [DEBUG] [image_processor3.py:process_single_image:788] ocr_count: 4 +[2025-11-22 11:51:56,124] [MainThread] [DEBUG] [image_processor3.py:process_single_image:789] is_member_valid: True +[2025-11-22 11:51:56,128] [MainThread] [DEBUG] [image_processor3.py:_try_migan_inpaint:1043] MIGAN 인페인팅 시도 +[2025-11-22 11:51:56,131] [MainThread] [DEBUG] [migan_module.py:inpaint:276] [MIGAN] 입력 형태 - 이미지: (1, 3, 1200, 816), 마스크: (1, 1, 1200, 816) +[2025-11-22 11:51:56,492] [MainThread] [DEBUG] [migan_module.py:inpaint:289] [MIGAN] 출력 형태: (1200, 816, 3), dtype: uint8 +[2025-11-22 11:51:56,493] [MainThread] [DEBUG] [migan_module.py:inpaint:297] [MIGAN] 추론 완료: 362.00 ms +[2025-11-22 11:51:56,498] [MainThread] [DEBUG] [image_processor3.py:_try_migan_inpaint:1046] MIGAN 인페인팅 성공 +[2025-11-22 11:51:56,504] [MainThread] [INFO] [image_processor3.py:execute_inpaint_with_fallback:967] 메모리 변화 [인페인팅]: 24007.3MB -> 24351.5MB (+344.2MB, +1.4%) - 방법: migan +[2025-11-22 11:51:56,504] [MainThread] [DEBUG] [image_processor3.py:process_single_image:800] 인페인팅 완료 +[2025-11-22 11:51:56,531] [MainThread] [DEBUG] [image_processor3.py:process_single_image:822] 텍스트 렌더링 완료 +[2025-11-22 11:51:56,532] [MainThread] [DEBUG] [image_processor3.py:postProcess_and_save_image:1145] watermark_text: 이미지 저작권 보유 +[2025-11-22 11:51:56,532] [MainThread] [DEBUG] [image_processor3.py:postProcess_and_save_image:1146] is_watermark_enabled: True +[2025-11-22 11:51:56,534] [MainThread] [INFO] [postImageManager.py:save_image_to_path:101] 이미지 저장 완료 : D:\py\img_worker\modules\test\translated_preview_GmarketSansTTFMedium_img_1.jpg +[2025-11-22 11:51:56,534] [MainThread] [DEBUG] [image_processor3.py:process_single_image:828] 이미지 1 번역 완료: D:\py\img_worker\modules\test\translated_preview_GmarketSansTTFMedium_img_1.jpg +[2025-11-22 11:51:56,564] [MainThread] [DEBUG] [image_processor3.py:process_single_image:881] ⏱ 이미지 파이프라인 총 1536.5ms | download=0.0ms | ocr=177.0ms | translate=460.6ms | mask=460.6ms | inpaint=380.0ms(migan/CPU) | render=27.0ms | save=2.0ms +[2025-11-22 11:51:56,565] [MainThread] [INFO] [create_font_preview.py:main:115] 프리뷰 생성 성공: D:\py\img_worker\modules\test\translated_preview_GmarketSansTTFMedium_img_1.jpg +[2025-11-22 11:51:56,576] [MainThread] [DEBUG] [image_processor3.py:cleanup:444] OCR 모듈 정리 완료 +[2025-11-22 11:51:56,576] [MainThread] [DEBUG] [image_processor3.py:cleanup:452] 마스크 모듈 정리 완료 +[2025-11-22 11:51:56,600] [MainThread] [DEBUG] [image_processor3.py:cleanup:487] 임시 폴더 삭제됨: D:\py\img_worker\modules\test +[2025-11-22 11:51:56,623] [MainThread] [DEBUG] [image_processor3.py:cleanup:487] 임시 폴더 삭제됨: D:\py\img_worker\modules\test +[2025-11-22 11:51:56,623] [MainThread] [DEBUG] [image_processor3.py:__del__:435] 이미지 프로세서 소멸 +[2025-11-22 12:12:44,950] [MainThread] [DEBUG] [image_processor3.py:__init__:57] tracemalloc 메모리 추적 시작 +[2025-11-22 12:12:44,957] [MainThread] [DEBUG] [gpu_utils.py:_setup_directml_environment:55] ✅ DirectML 환경 준비 완료 (Windows DirectX 12 기반) +[2025-11-22 12:12:44,957] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:79] === 🚀 DirectML GPU 상태 초기화 시작 🚀 === +[2025-11-22 12:12:44,957] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:80] 🎯 사용자 GPU 가속 요청: False +[2025-11-22 12:12:44,957] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:81] 💻 현재 운영체제: Windows +[2025-11-22 12:12:44,958] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:84] GPU 가속이 비활성화됨 (toggle_states['use_cuda'] = False) +[2025-11-22 12:12:44,958] [MainThread] [INFO] [gpu_utils.py:_set_safe_cpu_mode:157] 🔒 안전한 CPU 모드로 모든 GPU 설정 강제 비활성화 +[2025-11-22 12:12:44,958] [MainThread] [DEBUG] [image_processor3.py:__init__:79] 🔧 ImageProcessor3 GPU 상태 요약: +[2025-11-22 12:12:44,958] [MainThread] [DEBUG] [image_processor3.py:__init__:80] - CUDA 사용 가능: False +[2025-11-22 12:12:44,958] [MainThread] [DEBUG] [image_processor3.py:__init__:81] - toggle_states['use_cuda']: False +[2025-11-22 12:12:44,959] [MainThread] [DEBUG] [image_processor3.py:__init__:82] - GPU 하드웨어 정보: {} +[2025-11-22 12:12:44,959] [MainThread] [DEBUG] [image_processor3.py:__init__:84] ImageProcessor3 Init toggle_states: {'font_type': '폰트7', 'image_font_path': 'D:\\py\\img_worker\\modules\\fonts\\Paperlogy-5Medium.ttf', 'ocr': True, 'force_cpu_ocr': True, 'use_cuda': False, 'inpaint_model': 'migan', 'local_inpaint_method': 'migan', 'migan_onnx_path': 'D:\\py\\img_worker\\modules\\migan_onnx\\migan_pipeline_v2.onnx', 'migan_use_accel': False, 'migan_provider_override': 'cpu', 'detail_IMGTrans_type': 'CPU', 'optionIMGTrans_type': 'CPU', 'thumb_trans_type': 'CPU', 'TEMP_IMAGE_DIR': 'D:\\py\\img_worker\\modules\\test', 'output_image_format': 'jpg', 'watermark_toggle': False, 'store_ocr_data_to_db': False, 'ocr_engine': 'onnx'} +[2025-11-22 12:12:44,959] [MainThread] [DEBUG] [image_processor3.py:__init__:87] is_member_valid: True +[2025-11-22 12:12:44,959] [MainThread] [DEBUG] [image_processor3.py:__init__:147] debug_images 디렉토리 이미 존재: D:\py\img_worker\modules\debug_images +[2025-11-22 12:12:44,960] [MainThread] [DEBUG] [image_processor3.py:__init__:155] self.font_path: D:\py\img_worker\modules\fonts\Paperlogy-5Medium.ttf +[2025-11-22 12:12:44,960] [MainThread] [DEBUG] [image_processor3.py:__init__:157] toggle_states font_path: D:\py\img_worker\modules\fonts\Paperlogy-5Medium.ttf +[2025-11-22 12:12:44,960] [MainThread] [DEBUG] [image_processor3.py:__init__:159] self.TEMP_IMAGE_DIR: D:\py\img_worker\modules\test +[2025-11-22 12:12:44,960] [MainThread] [DEBUG] [image_processor3.py:__init__:161] self.debugging_save_Dir: D:\py\img_worker\modules\debug_images +[2025-11-22 12:12:44,960] [MainThread] [DEBUG] [image_processor3.py:__init__:163] self.unwanted_texts: {} +[2025-11-22 12:12:44,960] [MainThread] [DEBUG] [image_processor3.py:__init__:165] self.inpaint_method: migan +[2025-11-22 12:12:44,961] [MainThread] [DEBUG] [image_processor3.py:__init__:171] Image.MAX_IMAGE_PIXELS set to 20000000 +[2025-11-22 12:12:44,961] [MainThread] [DEBUG] [onnx_ocr_wrapper.py:_determine_model_type:447] ONNX 모델 타입 설정값: 자동 선택, GPU 정보: {} +[2025-11-22 12:12:44,961] [MainThread] [INFO] [onnx_ocr_wrapper.py:_determine_model_type:453] 자동 선택 모드: GPU 추천 모델 simp 사용 +[2025-11-22 12:12:44,962] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:324] ONNX OCR 모델 타입 결정: simp (GPU: False) +[2025-11-22 12:12:44,962] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:333] ONNX OCR 모듈 CPU 모드로 설정 +[2025-11-22 12:12:44,962] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:356] 🚀 ONNX TextSystem 초기화 시작 (CPU 모드) +[2025-11-22 12:12:44,962] [MainThread] [DEBUG] [onnx_ocr_wrapper.py:_initialize_onnx_system:539] 🚀 ONNX TextSystem 초기화 시작 (CPU 모드) +[2025-11-22 12:12:46,882] [MainThread] [DEBUG] [onnx_ocr_wrapper.py:_ensure_utf8_encoding:487] 문자 사전 파일 UTF-8 확인 완료: D:\py\img_worker\modules\onnx_ocr_module\dict\ppocr_keys_v1.txt +[2025-11-22 12:12:46,968] [MainThread] [INFO] [onnx_ocr_wrapper.py:_initialize_onnx_system:743] ✅ ONNX TextSystem 초기화 완료 (CPU + SIMP (호환성) 모델) +[2025-11-22 12:12:46,969] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:363] ✅ ONNX TextSystem 초기화 완료 (CPU + SIMP 모델) +[2025-11-22 12:12:46,969] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:364] ✅ ONNX OCR 모듈 초기화 성공 (CPU 모드) +[2025-11-22 12:12:46,969] [MainThread] [INFO] [image_processor3.py:__init__:178] ✅ ONNX OCR 모듈 초기화 성공 +[2025-11-22 12:12:46,970] [MainThread] [INFO] [mask_module_for_paddle.py:__init__:12] 마스크 모듈 초기화 완료 +[2025-11-22 12:12:46,970] [MainThread] [DEBUG] [image_processor3.py:__init__:219] MaskModule 초기화 성공 +[2025-11-22 12:12:46,970] [MainThread] [INFO] [text_rendering_module.py:__init__:21] 텍스트 렌더링 모듈 초기화 완료 +[2025-11-22 12:12:46,970] [MainThread] [INFO] [text_rendering_module.py:__init__:22] 기본 폰트: D:\py\img_worker\modules\fonts\Paperlogy-5Medium.ttf +[2025-11-22 12:12:46,971] [MainThread] [DEBUG] [image_processor3.py:__init__:225] TextRenderingModule 초기화 성공 +[2025-11-22 12:12:46,971] [MainThread] [DEBUG] [postImageManager.py:font_load:40] 폰트 로드 성공: D:\py\img_worker\modules\fonts\Paperlogy-5Medium.ttf +[2025-11-22 12:12:46,971] [MainThread] [DEBUG] [image_processor3.py:__init__:231] PostImageManager 초기화 성공 +[2025-11-22 12:12:46,971] [MainThread] [DEBUG] [request_inpaint.py:__init__:43] Request_AI_Server GPU 상태: CUDA 사용 가능=False +[2025-11-22 12:12:46,972] [MainThread] [DEBUG] [image_processor3.py:__init__:254] Request_AI_Server 초기화 성공 +[2025-11-22 12:12:46,972] [MainThread] [DEBUG] [image_processor3.py:__init__:261] GoogleTranslate 초기화 성공 +[2025-11-22 12:12:46,973] [MainThread] [DEBUG] [image_processor3.py:__init__:287] MIGAN CUDA 사용 불가 - CPU 모드로 설정 +[2025-11-22 12:12:46,973] [MainThread] [DEBUG] [image_processor3.py:__init__:289] [MIGAN] GPU 관리자 전달: GPUManager, can_use_cuda: False +[2025-11-22 12:12:46,974] [MainThread] [DEBUG] [migan_module.py:_get_or_create_session:166] [MIGAN] GPU 관리자 사용 가능: False +[2025-11-22 12:12:46,974] [MainThread] [DEBUG] [migan_module.py:_get_or_create_session:186] [MIGAN] CPU 전용 모드 +[2025-11-22 12:12:46,974] [MainThread] [DEBUG] [migan_module.py:_get_or_create_session:188] [MIGAN] 최종 providers: [('CPUExecutionProvider', {})] +[2025-11-22 12:12:46,974] [MainThread] [DEBUG] [migan_module.py:_get_or_create_session:204] [MIGAN] CPU 전용 시도: [('CPUExecutionProvider', {})] +[2025-11-22 12:12:47,057] [MainThread] [INFO] [migan_module.py:_get_or_create_session:207] [MIGAN] CPU 전용 성공! 실제 providers: ['CPUExecutionProvider'] +[2025-11-22 12:12:47,057] [MainThread] [DEBUG] [migan_module.py:__init__:115] [MIGAN] 입력 0: image, 형태: ['batch_size', 3, 'height', 'width'], 타입: tensor(uint8) +[2025-11-22 12:12:47,058] [MainThread] [DEBUG] [migan_module.py:__init__:115] [MIGAN] 입력 1: mask, 형태: ['batch_size', 1, 'height', 'width'], 타입: tensor(uint8) +[2025-11-22 12:12:47,058] [MainThread] [DEBUG] [migan_module.py:__init__:117] [MIGAN] 출력 0: result, 형태: ['ScatterNDresult_dim_0', 3, 'ScatterNDresult_dim_2', 'ScatterNDresult_dim_3'], 타입: tensor(uint8) +[2025-11-22 12:12:47,058] [MainThread] [DEBUG] [migan_module.py:__init__:119] [MIGAN] 세션 준비 완료. providers=['CPUExecutionProvider'] +[2025-11-22 12:12:47,059] [MainThread] [DEBUG] [migan_module.py:build_migan_from_toggle:348] [MIGAN] GPU 관리자 연결 완료: GPUManager +[2025-11-22 12:12:47,059] [MainThread] [DEBUG] [migan_module.py:build_migan_from_toggle:355] [MIGAN] 파이프라인 gpu_manager 속성: True, 값: +[2025-11-22 12:12:47,059] [MainThread] [DEBUG] [image_processor3.py:__init__:291] [MIGAN] 초기화 완료: gpu_manager 속성=True, 값= +[2025-11-22 12:12:47,059] [MainThread] [INFO] [create_font_preview.py:main:98] 프리뷰 생성 시작: Paperlogy-5Medium.ttf +[2025-11-22 12:12:47,060] [MainThread] [INFO] [create_font_preview.py:main:99] 저장 경로: D:\py\img_worker\modules\test +[2025-11-22 12:12:47,060] [MainThread] [DEBUG] [image_processor3.py:process_single_image:586] 이미지 번역시작 +[2025-11-22 12:12:47,060] [MainThread] [DEBUG] [image_processor3.py:process_single_image:588] toggle_states: {'font_type': '폰트7', 'image_font_path': 'D:\\py\\img_worker\\modules\\fonts\\Paperlogy-5Medium.ttf', 'ocr': True, 'force_cpu_ocr': True, 'use_cuda': False, 'inpaint_model': 'migan', 'local_inpaint_method': 'migan', 'migan_onnx_path': 'D:\\py\\img_worker\\modules\\migan_onnx\\migan_pipeline_v2.onnx', 'migan_use_accel': False, 'migan_provider_override': 'cpu', 'detail_IMGTrans_type': 'CPU', 'optionIMGTrans_type': 'CPU', 'thumb_trans_type': 'CPU', 'TEMP_IMAGE_DIR': 'D:\\py\\img_worker\\modules\\test', 'output_image_format': 'jpg', 'watermark_toggle': False, 'store_ocr_data_to_db': False, 'ocr_engine': 'onnx'} +[2025-11-22 12:12:47,426] [MainThread] [DEBUG] [image_processor3.py:process_single_image:606] 이미지 1 처리 시작: D:\py\img_worker\modules\fonts\ori.jpg - OCR+인페인팅 모드 +[2025-11-22 12:12:47,426] [MainThread] [DEBUG] [image_processor3.py:download_image:1194] 로컬 파일 경로 감지, 다운로드 생략: D:\py\img_worker\modules\fonts\ori.jpg +[2025-11-22 12:12:47,427] [MainThread] [DEBUG] [image_processor3.py:process_single_image:629] 옵션 이미지는 스케일 처리 건너뛰기: preview_Paperlogy-5Medium +[2025-11-22 12:12:47,427] [MainThread] [DEBUG] [image_processor3.py:process_single_image:639] 이미지 1 로컬 저장위치(옵션 이미지 원본 유지): D:\py\img_worker\modules\fonts\ori.jpg +[2025-11-22 12:12:47,435] [MainThread] [INFO] [onnx_ocr_wrapper.py:detect_text:838] 🔍 ONNX OCR 감지 방식: polygon +[2025-11-22 12:12:47,601] [MainThread] [INFO] [onnx_ocr_wrapper.py:detect_text:906] ⚡ ONNX OCR 추론 완료: 165.0ms +[2025-11-22 12:12:47,602] [MainThread] [INFO] [onnx_ocr_wrapper.py:detect_text:907] 📊 세부 시간 - 감지: 89.0ms, 인식: 68.0ms, 분류: 3.0ms +[2025-11-22 12:12:47,611] [MainThread] [INFO] [image_processor3.py:process_single_image:655] 메모리 변화 [OCR 처리]: 24678.9MB -> 24807.8MB (+128.9MB, +0.5%) - 이미지 1 +[2025-11-22 12:12:47,613] [MainThread] [DEBUG] [image_processor3.py:process_single_image:660] ocr_results: [{'text': '现代极简风格', 'confidence': 0.9946680068969727, 'polygon': [[222.0, 70.0], [552.0, 70.0], [552.0, 118.0], [222.0, 118.0]], 'bbox': (222, 70, 331, 49), 'method': 'polygon'}, {'text': '更易搭配各种使用场景', 'confidence': 0.9957253336906433, 'polygon': [[152.0, 141.0], [622.0, 141.0], [622.0, 180.0], [152.0, 180.0]], 'bbox': (152, 141, 471, 40), 'method': 'polygon'}, {'text': '半圆两端设计', 'confidence': 0.9974236488342285, 'polygon': [[88.0, 289.0], [463.0, 289.0], [463.0, 345.0], [88.0, 345.0]], 'bbox': (88, 289, 376, 57), 'method': 'polygon'}, {'text': '承载各种欢乐', 'confidence': 0.9939405918121338, 'polygon': [[87.0, 369.0], [462.0, 369.0], [462.0, 425.0], [87.0, 425.0]], 'bbox': (87, 369, 376, 57), 'method': 'polygon'}] +[2025-11-22 12:12:47,638] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1104] [필터링] 포함 (신뢰도 99.5%): '现代极简风格' +[2025-11-22 12:12:47,638] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1104] [필터링] 포함 (신뢰도 99.6%): '更易搭配各种使用场景' +[2025-11-22 12:12:47,638] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1104] [필터링] 포함 (신뢰도 99.7%): '半圆两端设计' +[2025-11-22 12:12:47,638] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1104] [필터링] 포함 (신뢰도 99.4%): '承载各种欢乐' +[2025-11-22 12:12:47,639] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1108] 필터링 결과: 4/4개 (신뢰도 + & 중국어) +[2025-11-22 12:12:47,641] [MainThread] [DEBUG] [image_processor3.py:process_single_image:672] filter_ocr_results: [{'text': '现代极简风格', 'confidence': 0.9946680068969727, 'polygon': [[222.0, 70.0], [552.0, 70.0], [552.0, 118.0], [222.0, 118.0]], 'bbox': (222, 70, 331, 49), 'method': 'polygon'}, {'text': '更易搭配各种使用场景', 'confidence': 0.9957253336906433, 'polygon': [[152.0, 141.0], [622.0, 141.0], [622.0, 180.0], [152.0, 180.0]], 'bbox': (152, 141, 471, 40), 'method': 'polygon'}, {'text': '半圆两端设计', 'confidence': 0.9974236488342285, 'polygon': [[88.0, 289.0], [463.0, 289.0], [463.0, 345.0], [88.0, 345.0]], 'bbox': (88, 289, 376, 57), 'method': 'polygon'}, {'text': '承载各种欢乐', 'confidence': 0.9939405918121338, 'polygon': [[87.0, 369.0], [462.0, 369.0], [462.0, 425.0], [87.0, 425.0]], 'bbox': (87, 369, 376, 57), 'method': 'polygon'}] +[2025-11-22 12:12:47,641] [MainThread] [INFO] [onnx_ocr_wrapper.py:filter_chinese_text:1192] 중국어 텍스트 4개 필터링 완료 +[2025-11-22 12:12:47,641] [MainThread] [INFO] [onnx_ocr_wrapper.py:filter_korean_text:1213] 한글 텍스트 0개 필터링 완료 +[2025-11-22 12:12:48,051] [MainThread] [DEBUG] [image_processor3.py:process_single_image:730] translated_texts: ['모던한 미니멀 스타일', '다양한 사용 시나리오에 더 쉽게 일치', '반원형 끝 디자인', '온갖 기쁨을 안고'] +[2025-11-22 12:12:48,051] [MainThread] [DEBUG] [image_processor3.py:process_single_image:731] 마스크 생성 완료 +[2025-11-22 12:12:48,051] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1315] [치환 처리 1] 원본 텍스트: '모던한 미니멀 스타일' +[2025-11-22 12:12:48,052] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1319] [치환 처리 1] 분리된 단어: ['모던한', '미니멀', '스타일'] +[2025-11-22 12:12:48,052] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1360] [치환 처리 1] 변경 없음: '모던한 미니멀 스타일' +[2025-11-22 12:12:48,052] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1315] [치환 처리 2] 원본 텍스트: '다양한 사용 시나리오에 더 쉽게 일치' +[2025-11-22 12:12:48,052] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1319] [치환 처리 2] 분리된 단어: ['다양한', '사용', '시나리오에', '더', '쉽게', '일치'] +[2025-11-22 12:12:48,052] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1360] [치환 처리 2] 변경 없음: '다양한 사용 시나리오에 더 쉽게 일치' +[2025-11-22 12:12:48,053] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1315] [치환 처리 3] 원본 텍스트: '반원형 끝 디자인' +[2025-11-22 12:12:48,053] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1319] [치환 처리 3] 분리된 단어: ['반원형', '끝', '디자인'] +[2025-11-22 12:12:48,053] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1360] [치환 처리 3] 변경 없음: '반원형 끝 디자인' +[2025-11-22 12:12:48,053] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1315] [치환 처리 4] 원본 텍스트: '온갖 기쁨을 안고' +[2025-11-22 12:12:48,053] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1319] [치환 처리 4] 분리된 단어: ['온갖', '기쁨을', '안고'] +[2025-11-22 12:12:48,054] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1360] [치환 처리 4] 변경 없음: '온갖 기쁨을 안고' +[2025-11-22 12:12:48,054] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1362] 전체 치환 결과: 4개 텍스트 처리 완료 +[2025-11-22 12:12:48,054] [MainThread] [DEBUG] [image_processor3.py:process_single_image:740] 이미지 1 치환됨 +[2025-11-22 12:12:48,054] [MainThread] [INFO] [image_processor3.py:process_single_image:756] [inpaint_model 강제] migan → inpaint_method=migan +[2025-11-22 12:12:48,055] [MainThread] [DEBUG] [image_processor3.py:process_single_image:790] ocr_count: 4 +[2025-11-22 12:12:48,055] [MainThread] [DEBUG] [image_processor3.py:process_single_image:791] is_member_valid: True +[2025-11-22 12:12:48,059] [MainThread] [DEBUG] [image_processor3.py:_try_migan_inpaint:1045] MIGAN 인페인팅 시도 +[2025-11-22 12:12:48,062] [MainThread] [DEBUG] [migan_module.py:inpaint:276] [MIGAN] 입력 형태 - 이미지: (1, 3, 1200, 816), 마스크: (1, 1, 1200, 816) +[2025-11-22 12:12:48,396] [MainThread] [DEBUG] [migan_module.py:inpaint:289] [MIGAN] 출력 형태: (1200, 816, 3), dtype: uint8 +[2025-11-22 12:12:48,396] [MainThread] [DEBUG] [migan_module.py:inpaint:297] [MIGAN] 추론 완료: 334.00 ms +[2025-11-22 12:12:48,401] [MainThread] [DEBUG] [image_processor3.py:_try_migan_inpaint:1048] MIGAN 인페인팅 성공 +[2025-11-22 12:12:48,406] [MainThread] [INFO] [image_processor3.py:execute_inpaint_with_fallback:969] 메모리 변화 [인페인팅]: 24834.0MB -> 25181.8MB (+347.8MB, +1.4%) - 방법: migan +[2025-11-22 12:12:48,407] [MainThread] [DEBUG] [image_processor3.py:process_single_image:802] 인페인팅 완료 +[2025-11-22 12:12:48,443] [MainThread] [DEBUG] [image_processor3.py:process_single_image:824] 텍스트 렌더링 완료 +[2025-11-22 12:12:48,443] [MainThread] [DEBUG] [image_processor3.py:postProcess_and_save_image:1147] watermark_text: 이미지 저작권 보유 +[2025-11-22 12:12:48,444] [MainThread] [DEBUG] [image_processor3.py:postProcess_and_save_image:1148] is_watermark_enabled: True +[2025-11-22 12:12:48,446] [MainThread] [INFO] [postImageManager.py:save_image_to_path:101] 이미지 저장 완료 : D:\py\img_worker\modules\test\translated_preview_Paperlogy-5Medium_img_1.jpg +[2025-11-22 12:12:48,446] [MainThread] [DEBUG] [image_processor3.py:process_single_image:830] 이미지 1 번역 완료: D:\py\img_worker\modules\test\translated_preview_Paperlogy-5Medium_img_1.jpg +[2025-11-22 12:12:48,472] [MainThread] [DEBUG] [image_processor3.py:process_single_image:883] ⏱ 이미지 파이프라인 총 1410.5ms | download=1.0ms | ocr=179.0ms | translate=408.2ms | mask=408.2ms | inpaint=352.0ms(migan/CPU) | render=36.0ms | save=3.0ms +[2025-11-22 12:12:48,473] [MainThread] [INFO] [create_font_preview.py:main:115] 프리뷰 생성 성공: D:\py\img_worker\modules\test\translated_preview_Paperlogy-5Medium_img_1.jpg +[2025-11-22 12:12:48,484] [MainThread] [DEBUG] [image_processor3.py:cleanup:446] OCR 모듈 정리 완료 +[2025-11-22 12:12:48,484] [MainThread] [DEBUG] [image_processor3.py:cleanup:454] 마스크 모듈 정리 완료 +[2025-11-22 12:12:48,506] [MainThread] [DEBUG] [image_processor3.py:cleanup:489] 임시 폴더 삭제됨: D:\py\img_worker\modules\test +[2025-11-22 12:12:48,529] [MainThread] [DEBUG] [image_processor3.py:cleanup:489] 임시 폴더 삭제됨: D:\py\img_worker\modules\test +[2025-11-22 12:12:48,529] [MainThread] [DEBUG] [image_processor3.py:__del__:437] 이미지 프로세서 소멸 +[2025-11-22 12:13:12,222] [MainThread] [DEBUG] [image_processor3.py:__init__:57] tracemalloc 메모리 추적 시작 +[2025-11-22 12:13:12,229] [MainThread] [DEBUG] [gpu_utils.py:_setup_directml_environment:55] ✅ DirectML 환경 준비 완료 (Windows DirectX 12 기반) +[2025-11-22 12:13:12,229] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:79] === 🚀 DirectML GPU 상태 초기화 시작 🚀 === +[2025-11-22 12:13:12,229] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:80] 🎯 사용자 GPU 가속 요청: False +[2025-11-22 12:13:12,229] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:81] 💻 현재 운영체제: Windows +[2025-11-22 12:13:12,230] [MainThread] [DEBUG] [gpu_utils.py:initialize_gpu_state:84] GPU 가속이 비활성화됨 (toggle_states['use_cuda'] = False) +[2025-11-22 12:13:12,230] [MainThread] [INFO] [gpu_utils.py:_set_safe_cpu_mode:157] 🔒 안전한 CPU 모드로 모든 GPU 설정 강제 비활성화 +[2025-11-22 12:13:12,230] [MainThread] [DEBUG] [image_processor3.py:__init__:79] 🔧 ImageProcessor3 GPU 상태 요약: +[2025-11-22 12:13:12,230] [MainThread] [DEBUG] [image_processor3.py:__init__:80] - CUDA 사용 가능: False +[2025-11-22 12:13:12,230] [MainThread] [DEBUG] [image_processor3.py:__init__:81] - toggle_states['use_cuda']: False +[2025-11-22 12:13:12,230] [MainThread] [DEBUG] [image_processor3.py:__init__:82] - GPU 하드웨어 정보: {} +[2025-11-22 12:13:12,231] [MainThread] [DEBUG] [image_processor3.py:__init__:84] ImageProcessor3 Init toggle_states: {'font_type': '폰트8', 'image_font_path': 'D:\\py\\img_worker\\modules\\fonts\\Pretendard-Regular.ttf', 'ocr': True, 'force_cpu_ocr': True, 'use_cuda': False, 'inpaint_model': 'migan', 'local_inpaint_method': 'migan', 'migan_onnx_path': 'D:\\py\\img_worker\\modules\\migan_onnx\\migan_pipeline_v2.onnx', 'migan_use_accel': False, 'migan_provider_override': 'cpu', 'detail_IMGTrans_type': 'CPU', 'optionIMGTrans_type': 'CPU', 'thumb_trans_type': 'CPU', 'TEMP_IMAGE_DIR': 'D:\\py\\img_worker\\modules\\test', 'output_image_format': 'jpg', 'watermark_toggle': False, 'store_ocr_data_to_db': False, 'ocr_engine': 'onnx'} +[2025-11-22 12:13:12,231] [MainThread] [DEBUG] [image_processor3.py:__init__:87] is_member_valid: True +[2025-11-22 12:13:12,231] [MainThread] [DEBUG] [image_processor3.py:__init__:147] debug_images 디렉토리 이미 존재: D:\py\img_worker\modules\debug_images +[2025-11-22 12:13:12,232] [MainThread] [DEBUG] [image_processor3.py:__init__:155] self.font_path: D:\py\img_worker\modules\fonts\Pretendard-Regular.ttf +[2025-11-22 12:13:12,232] [MainThread] [DEBUG] [image_processor3.py:__init__:157] toggle_states font_path: D:\py\img_worker\modules\fonts\Pretendard-Regular.ttf +[2025-11-22 12:13:12,232] [MainThread] [DEBUG] [image_processor3.py:__init__:159] self.TEMP_IMAGE_DIR: D:\py\img_worker\modules\test +[2025-11-22 12:13:12,232] [MainThread] [DEBUG] [image_processor3.py:__init__:161] self.debugging_save_Dir: D:\py\img_worker\modules\debug_images +[2025-11-22 12:13:12,232] [MainThread] [DEBUG] [image_processor3.py:__init__:163] self.unwanted_texts: {} +[2025-11-22 12:13:12,232] [MainThread] [DEBUG] [image_processor3.py:__init__:165] self.inpaint_method: migan +[2025-11-22 12:13:12,232] [MainThread] [DEBUG] [image_processor3.py:__init__:171] Image.MAX_IMAGE_PIXELS set to 20000000 +[2025-11-22 12:13:12,233] [MainThread] [DEBUG] [onnx_ocr_wrapper.py:_determine_model_type:447] ONNX 모델 타입 설정값: 자동 선택, GPU 정보: {} +[2025-11-22 12:13:12,233] [MainThread] [INFO] [onnx_ocr_wrapper.py:_determine_model_type:453] 자동 선택 모드: GPU 추천 모델 simp 사용 +[2025-11-22 12:13:12,233] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:324] ONNX OCR 모델 타입 결정: simp (GPU: False) +[2025-11-22 12:13:12,233] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:333] ONNX OCR 모듈 CPU 모드로 설정 +[2025-11-22 12:13:12,234] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:356] 🚀 ONNX TextSystem 초기화 시작 (CPU 모드) +[2025-11-22 12:13:12,234] [MainThread] [DEBUG] [onnx_ocr_wrapper.py:_initialize_onnx_system:539] 🚀 ONNX TextSystem 초기화 시작 (CPU 모드) +[2025-11-22 12:13:13,995] [MainThread] [DEBUG] [onnx_ocr_wrapper.py:_ensure_utf8_encoding:487] 문자 사전 파일 UTF-8 확인 완료: D:\py\img_worker\modules\onnx_ocr_module\dict\ppocr_keys_v1.txt +[2025-11-22 12:13:14,079] [MainThread] [INFO] [onnx_ocr_wrapper.py:_initialize_onnx_system:743] ✅ ONNX TextSystem 초기화 완료 (CPU + SIMP (호환성) 모델) +[2025-11-22 12:13:14,080] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:363] ✅ ONNX TextSystem 초기화 완료 (CPU + SIMP 모델) +[2025-11-22 12:13:14,080] [MainThread] [INFO] [onnx_ocr_wrapper.py:__init__:364] ✅ ONNX OCR 모듈 초기화 성공 (CPU 모드) +[2025-11-22 12:13:14,081] [MainThread] [INFO] [image_processor3.py:__init__:178] ✅ ONNX OCR 모듈 초기화 성공 +[2025-11-22 12:13:14,081] [MainThread] [INFO] [mask_module_for_paddle.py:__init__:12] 마스크 모듈 초기화 완료 +[2025-11-22 12:13:14,081] [MainThread] [DEBUG] [image_processor3.py:__init__:219] MaskModule 초기화 성공 +[2025-11-22 12:13:14,081] [MainThread] [INFO] [text_rendering_module.py:__init__:21] 텍스트 렌더링 모듈 초기화 완료 +[2025-11-22 12:13:14,081] [MainThread] [INFO] [text_rendering_module.py:__init__:22] 기본 폰트: D:\py\img_worker\modules\fonts\Pretendard-Regular.ttf +[2025-11-22 12:13:14,082] [MainThread] [DEBUG] [image_processor3.py:__init__:225] TextRenderingModule 초기화 성공 +[2025-11-22 12:13:14,082] [MainThread] [DEBUG] [postImageManager.py:font_load:40] 폰트 로드 성공: D:\py\img_worker\modules\fonts\Pretendard-Regular.ttf +[2025-11-22 12:13:14,082] [MainThread] [DEBUG] [image_processor3.py:__init__:231] PostImageManager 초기화 성공 +[2025-11-22 12:13:14,082] [MainThread] [DEBUG] [request_inpaint.py:__init__:43] Request_AI_Server GPU 상태: CUDA 사용 가능=False +[2025-11-22 12:13:14,083] [MainThread] [DEBUG] [image_processor3.py:__init__:254] Request_AI_Server 초기화 성공 +[2025-11-22 12:13:14,083] [MainThread] [DEBUG] [image_processor3.py:__init__:261] GoogleTranslate 초기화 성공 +[2025-11-22 12:13:14,084] [MainThread] [DEBUG] [image_processor3.py:__init__:287] MIGAN CUDA 사용 불가 - CPU 모드로 설정 +[2025-11-22 12:13:14,084] [MainThread] [DEBUG] [image_processor3.py:__init__:289] [MIGAN] GPU 관리자 전달: GPUManager, can_use_cuda: False +[2025-11-22 12:13:14,085] [MainThread] [DEBUG] [migan_module.py:_get_or_create_session:166] [MIGAN] GPU 관리자 사용 가능: False +[2025-11-22 12:13:14,085] [MainThread] [DEBUG] [migan_module.py:_get_or_create_session:186] [MIGAN] CPU 전용 모드 +[2025-11-22 12:13:14,085] [MainThread] [DEBUG] [migan_module.py:_get_or_create_session:188] [MIGAN] 최종 providers: [('CPUExecutionProvider', {})] +[2025-11-22 12:13:14,086] [MainThread] [DEBUG] [migan_module.py:_get_or_create_session:204] [MIGAN] CPU 전용 시도: [('CPUExecutionProvider', {})] +[2025-11-22 12:13:14,165] [MainThread] [INFO] [migan_module.py:_get_or_create_session:207] [MIGAN] CPU 전용 성공! 실제 providers: ['CPUExecutionProvider'] +[2025-11-22 12:13:14,165] [MainThread] [DEBUG] [migan_module.py:__init__:115] [MIGAN] 입력 0: image, 형태: ['batch_size', 3, 'height', 'width'], 타입: tensor(uint8) +[2025-11-22 12:13:14,165] [MainThread] [DEBUG] [migan_module.py:__init__:115] [MIGAN] 입력 1: mask, 형태: ['batch_size', 1, 'height', 'width'], 타입: tensor(uint8) +[2025-11-22 12:13:14,166] [MainThread] [DEBUG] [migan_module.py:__init__:117] [MIGAN] 출력 0: result, 형태: ['ScatterNDresult_dim_0', 3, 'ScatterNDresult_dim_2', 'ScatterNDresult_dim_3'], 타입: tensor(uint8) +[2025-11-22 12:13:14,166] [MainThread] [DEBUG] [migan_module.py:__init__:119] [MIGAN] 세션 준비 완료. providers=['CPUExecutionProvider'] +[2025-11-22 12:13:14,166] [MainThread] [DEBUG] [migan_module.py:build_migan_from_toggle:348] [MIGAN] GPU 관리자 연결 완료: GPUManager +[2025-11-22 12:13:14,166] [MainThread] [DEBUG] [migan_module.py:build_migan_from_toggle:355] [MIGAN] 파이프라인 gpu_manager 속성: True, 값: +[2025-11-22 12:13:14,166] [MainThread] [DEBUG] [image_processor3.py:__init__:291] [MIGAN] 초기화 완료: gpu_manager 속성=True, 값= +[2025-11-22 12:13:14,167] [MainThread] [INFO] [create_font_preview.py:main:98] 프리뷰 생성 시작: Pretendard-Regular.ttf +[2025-11-22 12:13:14,167] [MainThread] [INFO] [create_font_preview.py:main:99] 저장 경로: D:\py\img_worker\modules\test +[2025-11-22 12:13:14,167] [MainThread] [DEBUG] [image_processor3.py:process_single_image:586] 이미지 번역시작 +[2025-11-22 12:13:14,167] [MainThread] [DEBUG] [image_processor3.py:process_single_image:588] toggle_states: {'font_type': '폰트8', 'image_font_path': 'D:\\py\\img_worker\\modules\\fonts\\Pretendard-Regular.ttf', 'ocr': True, 'force_cpu_ocr': True, 'use_cuda': False, 'inpaint_model': 'migan', 'local_inpaint_method': 'migan', 'migan_onnx_path': 'D:\\py\\img_worker\\modules\\migan_onnx\\migan_pipeline_v2.onnx', 'migan_use_accel': False, 'migan_provider_override': 'cpu', 'detail_IMGTrans_type': 'CPU', 'optionIMGTrans_type': 'CPU', 'thumb_trans_type': 'CPU', 'TEMP_IMAGE_DIR': 'D:\\py\\img_worker\\modules\\test', 'output_image_format': 'jpg', 'watermark_toggle': False, 'store_ocr_data_to_db': False, 'ocr_engine': 'onnx'} +[2025-11-22 12:13:14,411] [MainThread] [DEBUG] [image_processor3.py:process_single_image:606] 이미지 1 처리 시작: D:\py\img_worker\modules\fonts\ori.jpg - OCR+인페인팅 모드 +[2025-11-22 12:13:14,411] [MainThread] [DEBUG] [image_processor3.py:download_image:1194] 로컬 파일 경로 감지, 다운로드 생략: D:\py\img_worker\modules\fonts\ori.jpg +[2025-11-22 12:13:14,412] [MainThread] [DEBUG] [image_processor3.py:process_single_image:629] 옵션 이미지는 스케일 처리 건너뛰기: preview_Pretendard-Regular +[2025-11-22 12:13:14,412] [MainThread] [DEBUG] [image_processor3.py:process_single_image:639] 이미지 1 로컬 저장위치(옵션 이미지 원본 유지): D:\py\img_worker\modules\fonts\ori.jpg +[2025-11-22 12:13:14,419] [MainThread] [INFO] [onnx_ocr_wrapper.py:detect_text:838] 🔍 ONNX OCR 감지 방식: polygon +[2025-11-22 12:13:14,583] [MainThread] [INFO] [onnx_ocr_wrapper.py:detect_text:906] ⚡ ONNX OCR 추론 완료: 163.0ms +[2025-11-22 12:13:14,583] [MainThread] [INFO] [onnx_ocr_wrapper.py:detect_text:907] 📊 세부 시간 - 감지: 89.0ms, 인식: 65.0ms, 분류: 4.0ms +[2025-11-22 12:13:14,592] [MainThread] [INFO] [image_processor3.py:process_single_image:655] 메모리 변화 [OCR 처리]: 25200.5MB -> 25338.9MB (+138.3MB, +0.5%) - 이미지 1 +[2025-11-22 12:13:14,595] [MainThread] [DEBUG] [image_processor3.py:process_single_image:660] ocr_results: [{'text': '现代极简风格', 'confidence': 0.9946680068969727, 'polygon': [[222.0, 70.0], [552.0, 70.0], [552.0, 118.0], [222.0, 118.0]], 'bbox': (222, 70, 331, 49), 'method': 'polygon'}, {'text': '更易搭配各种使用场景', 'confidence': 0.9957253336906433, 'polygon': [[152.0, 141.0], [622.0, 141.0], [622.0, 180.0], [152.0, 180.0]], 'bbox': (152, 141, 471, 40), 'method': 'polygon'}, {'text': '半圆两端设计', 'confidence': 0.9974236488342285, 'polygon': [[88.0, 289.0], [463.0, 289.0], [463.0, 345.0], [88.0, 345.0]], 'bbox': (88, 289, 376, 57), 'method': 'polygon'}, {'text': '承载各种欢乐', 'confidence': 0.9939405918121338, 'polygon': [[87.0, 369.0], [462.0, 369.0], [462.0, 425.0], [87.0, 425.0]], 'bbox': (87, 369, 376, 57), 'method': 'polygon'}] +[2025-11-22 12:13:14,618] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1104] [필터링] 포함 (신뢰도 99.5%): '现代极简风格' +[2025-11-22 12:13:14,618] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1104] [필터링] 포함 (신뢰도 99.6%): '更易搭配各种使用场景' +[2025-11-22 12:13:14,618] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1104] [필터링] 포함 (신뢰도 99.7%): '半圆两端设计' +[2025-11-22 12:13:14,619] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1104] [필터링] 포함 (신뢰도 99.4%): '承载各种欢乐' +[2025-11-22 12:13:14,619] [MainThread] [DEBUG] [image_processor3.py:filter_ocr_results:1108] 필터링 결과: 4/4개 (신뢰도 + & 중국어) +[2025-11-22 12:13:14,621] [MainThread] [DEBUG] [image_processor3.py:process_single_image:672] filter_ocr_results: [{'text': '现代极简风格', 'confidence': 0.9946680068969727, 'polygon': [[222.0, 70.0], [552.0, 70.0], [552.0, 118.0], [222.0, 118.0]], 'bbox': (222, 70, 331, 49), 'method': 'polygon'}, {'text': '更易搭配各种使用场景', 'confidence': 0.9957253336906433, 'polygon': [[152.0, 141.0], [622.0, 141.0], [622.0, 180.0], [152.0, 180.0]], 'bbox': (152, 141, 471, 40), 'method': 'polygon'}, {'text': '半圆两端设计', 'confidence': 0.9974236488342285, 'polygon': [[88.0, 289.0], [463.0, 289.0], [463.0, 345.0], [88.0, 345.0]], 'bbox': (88, 289, 376, 57), 'method': 'polygon'}, {'text': '承载各种欢乐', 'confidence': 0.9939405918121338, 'polygon': [[87.0, 369.0], [462.0, 369.0], [462.0, 425.0], [87.0, 425.0]], 'bbox': (87, 369, 376, 57), 'method': 'polygon'}] +[2025-11-22 12:13:14,622] [MainThread] [INFO] [onnx_ocr_wrapper.py:filter_chinese_text:1192] 중국어 텍스트 4개 필터링 완료 +[2025-11-22 12:13:14,622] [MainThread] [INFO] [onnx_ocr_wrapper.py:filter_korean_text:1213] 한글 텍스트 0개 필터링 완료 +[2025-11-22 12:13:15,070] [MainThread] [DEBUG] [image_processor3.py:process_single_image:730] translated_texts: ['모던한 미니멀 스타일', '다양한 사용 시나리오에 더 쉽게 일치', '반원형 끝 디자인', '온갖 기쁨을 안고'] +[2025-11-22 12:13:15,070] [MainThread] [DEBUG] [image_processor3.py:process_single_image:731] 마스크 생성 완료 +[2025-11-22 12:13:15,071] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1315] [치환 처리 1] 원본 텍스트: '모던한 미니멀 스타일' +[2025-11-22 12:13:15,071] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1319] [치환 처리 1] 분리된 단어: ['모던한', '미니멀', '스타일'] +[2025-11-22 12:13:15,071] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1360] [치환 처리 1] 변경 없음: '모던한 미니멀 스타일' +[2025-11-22 12:13:15,071] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1315] [치환 처리 2] 원본 텍스트: '다양한 사용 시나리오에 더 쉽게 일치' +[2025-11-22 12:13:15,072] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1319] [치환 처리 2] 분리된 단어: ['다양한', '사용', '시나리오에', '더', '쉽게', '일치'] +[2025-11-22 12:13:15,072] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1360] [치환 처리 2] 변경 없음: '다양한 사용 시나리오에 더 쉽게 일치' +[2025-11-22 12:13:15,072] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1315] [치환 처리 3] 원본 텍스트: '반원형 끝 디자인' +[2025-11-22 12:13:15,072] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1319] [치환 처리 3] 분리된 단어: ['반원형', '끝', '디자인'] +[2025-11-22 12:13:15,073] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1360] [치환 처리 3] 변경 없음: '반원형 끝 디자인' +[2025-11-22 12:13:15,073] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1315] [치환 처리 4] 원본 텍스트: '온갖 기쁨을 안고' +[2025-11-22 12:13:15,073] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1319] [치환 처리 4] 분리된 단어: ['온갖', '기쁨을', '안고'] +[2025-11-22 12:13:15,073] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1360] [치환 처리 4] 변경 없음: '온갖 기쁨을 안고' +[2025-11-22 12:13:15,073] [MainThread] [DEBUG] [image_processor3.py:process_translated_texts:1362] 전체 치환 결과: 4개 텍스트 처리 완료 +[2025-11-22 12:13:15,074] [MainThread] [DEBUG] [image_processor3.py:process_single_image:740] 이미지 1 치환됨 +[2025-11-22 12:13:15,074] [MainThread] [INFO] [image_processor3.py:process_single_image:756] [inpaint_model 강제] migan → inpaint_method=migan +[2025-11-22 12:13:15,074] [MainThread] [DEBUG] [image_processor3.py:process_single_image:790] ocr_count: 4 +[2025-11-22 12:13:15,074] [MainThread] [DEBUG] [image_processor3.py:process_single_image:791] is_member_valid: True +[2025-11-22 12:13:15,079] [MainThread] [DEBUG] [image_processor3.py:_try_migan_inpaint:1045] MIGAN 인페인팅 시도 +[2025-11-22 12:13:15,082] [MainThread] [DEBUG] [migan_module.py:inpaint:276] [MIGAN] 입력 형태 - 이미지: (1, 3, 1200, 816), 마스크: (1, 1, 1200, 816) +[2025-11-22 12:13:15,409] [MainThread] [DEBUG] [migan_module.py:inpaint:289] [MIGAN] 출력 형태: (1200, 816, 3), dtype: uint8 +[2025-11-22 12:13:15,410] [MainThread] [DEBUG] [migan_module.py:inpaint:297] [MIGAN] 추론 완료: 328.00 ms +[2025-11-22 12:13:15,414] [MainThread] [DEBUG] [image_processor3.py:_try_migan_inpaint:1048] MIGAN 인페인팅 성공 +[2025-11-22 12:13:15,420] [MainThread] [INFO] [image_processor3.py:execute_inpaint_with_fallback:969] 메모리 변화 [인페인팅]: 25345.1MB -> 25690.4MB (+345.2MB, +1.4%) - 방법: migan +[2025-11-22 12:13:15,420] [MainThread] [DEBUG] [image_processor3.py:process_single_image:802] 인페인팅 완료 +[2025-11-22 12:13:15,499] [MainThread] [DEBUG] [image_processor3.py:process_single_image:824] 텍스트 렌더링 완료 +[2025-11-22 12:13:15,499] [MainThread] [DEBUG] [image_processor3.py:postProcess_and_save_image:1147] watermark_text: 이미지 저작권 보유 +[2025-11-22 12:13:15,499] [MainThread] [DEBUG] [image_processor3.py:postProcess_and_save_image:1148] is_watermark_enabled: True +[2025-11-22 12:13:15,502] [MainThread] [INFO] [postImageManager.py:save_image_to_path:101] 이미지 저장 완료 : D:\py\img_worker\modules\test\translated_preview_Pretendard-Regular_img_1.jpg +[2025-11-22 12:13:15,502] [MainThread] [DEBUG] [image_processor3.py:process_single_image:830] 이미지 1 번역 완료: D:\py\img_worker\modules\test\translated_preview_Pretendard-Regular_img_1.jpg +[2025-11-22 12:13:15,530] [MainThread] [DEBUG] [image_processor3.py:process_single_image:883] ⏱ 이미지 파이프라인 총 1362.8ms | download=0.0ms | ocr=176.0ms | translate=448.3ms | mask=448.3ms | inpaint=345.0ms(migan/CPU) | render=78.0ms | save=3.0ms +[2025-11-22 12:13:15,531] [MainThread] [INFO] [create_font_preview.py:main:115] 프리뷰 생성 성공: D:\py\img_worker\modules\test\translated_preview_Pretendard-Regular_img_1.jpg +[2025-11-22 12:13:15,542] [MainThread] [DEBUG] [image_processor3.py:cleanup:446] OCR 모듈 정리 완료 +[2025-11-22 12:13:15,542] [MainThread] [DEBUG] [image_processor3.py:cleanup:454] 마스크 모듈 정리 완료 +[2025-11-22 12:13:15,564] [MainThread] [DEBUG] [image_processor3.py:cleanup:489] 임시 폴더 삭제됨: D:\py\img_worker\modules\test +[2025-11-22 12:13:15,587] [MainThread] [DEBUG] [image_processor3.py:cleanup:489] 임시 폴더 삭제됨: D:\py\img_worker\modules\test +[2025-11-22 12:13:15,588] [MainThread] [DEBUG] [image_processor3.py:__del__:437] 이미지 프로세서 소멸 diff --git a/modules/test/create_font_preview.py b/modules/test/create_font_preview.py new file mode 100644 index 0000000..3a4e752 --- /dev/null +++ b/modules/test/create_font_preview.py @@ -0,0 +1,127 @@ +import sys +import os +import logging +import asyncio + +# 루트 디렉토리 설정 (img_worker/) +current_dir = os.path.dirname(os.path.abspath(__file__)) +# modules/test/.. -> modules/.. -> img_worker/ +root_dir = os.path.abspath(os.path.join(current_dir, "../../")) +sys.path.append(root_dir) + +from modules.image_processor3 import ImageProcessor3 +from loggerModule import Logger + +# 더미 클래스 정의 +class MockPage: + pass + +class MockTranslator: + async def translate(self, text, source_lang, target_lang): + # ImageProcessor3 내부적으로 GoogleTranslate를 사용하므로 이 메서드는 거의 호출되지 않음 + # 하지만 호출될 경우를 대비해 구현 + return text + +async def main(): + # 1. 로거 초기화 + logger = Logger() + + # 2. 경로 설정 + # base_dir는 modules 폴더여야 리소스(onnx_ocr_module, fonts 등)를 찾을 수 있음 + base_dir = os.path.join(root_dir, "modules") + + font_file_name = "Pretendard-Regular.ttf" + font_path = os.path.join(base_dir, "fonts", font_file_name) + original_image_path = os.path.join(base_dir, "fonts", "ori.jpg") + + # 결과 저장 경로: modules/test + preview_output_dir = os.path.join(base_dir, "test") + if not os.path.exists(preview_output_dir): + os.makedirs(preview_output_dir, exist_ok=True) + + if not os.path.exists(font_path): + logger.log(f"폰트 파일이 없습니다: {font_path}", level=logging.ERROR) + return + + if not os.path.exists(original_image_path): + logger.log(f"원본 이미지가 없습니다: {original_image_path}", level=logging.ERROR) + return + + # 3. Toggle States 설정 (서버 환경과 최대한 동일하게 구성) + # modules/image_processor3.py의 MIGAN 초기화 조건: + # migan_onnx_path 존재 AND (inpaint_method == "migan" OR local_inpaint_method == "migan") + + migan_onnx_path = os.path.join(base_dir, "migan_onnx", "migan_pipeline_v2.onnx") + + toggle_states = { + "font_type": "폰트8", + "image_font_path": font_path, + "ocr": True, + "force_cpu_ocr": True, # CPU 사용 + "use_cuda": False, + + # 인페인팅 설정 (MIGAN 사용) + "inpaint_model": "migan", + "local_inpaint_method": "migan", + "migan_onnx_path": migan_onnx_path, + "migan_use_accel": False, # CPU 모드 + "migan_provider_override": "cpu", # CPU 명시 + + # 인페인팅 상세 설정 + "detail_IMGTrans_type": "GPU", # MIGAN 모듈 내부에서 GPU/CPU 판단 (여기서는 이름만 GPU일 수 있음) + "optionIMGTrans_type": "GPU", + "thumb_trans_type": "GPU", + + "TEMP_IMAGE_DIR": preview_output_dir, + "output_image_format": "jpg", + "watermark_toggle": False, + "store_ocr_data_to_db": False, + "ocr_engine": "onnx", + } + + # 4. ImageProcessor3 초기화 + try: + processor = ImageProcessor3( + logger=logger, + page=MockPage(), + toggle_states=toggle_states, + unwanted_words={}, # 딕셔너리로 전달해야 함 + authenticated_by_admin=True, + base_dir=base_dir, + papago_translator=MockTranslator() + ) + except Exception as e: + logger.log(f"프로세서 초기화 실패: {e}", level=logging.ERROR) + return + + # 5. 이미지 처리 (프리뷰 생성) + logger.log(f"프리뷰 생성 시작: {font_file_name}", level=logging.INFO) + logger.log(f"저장 경로: {preview_output_dir}", level=logging.INFO) + + try: + # process_single_image 사용 + # 파일명 프리픽스로 폰트 이름 사용 + file_prefix = f"preview_{os.path.splitext(font_file_name)[0]}" + + # process_single_image는 내부적으로 GoogleTranslate를 사용하여 실제 번역을 수행함 + result = await processor.process_single_image( + original_image_url=original_image_path, + index=0, + delay=0, + file_prefix=file_prefix + ) + + if result['status'] == 'translated': + logger.log(f"프리뷰 생성 성공: {result['path']}", level=logging.INFO) + print(f"Preview created at: {result['path']}") + else: + logger.log(f"프리뷰 생성 실패: {result}", level=logging.ERROR) + + except Exception as e: + logger.log(f"처리 중 오류 발생: {e}", level=logging.ERROR) + finally: + if processor: + processor.cleanup() + +if __name__ == "__main__": + asyncio.run(main()) diff --git a/modules/test/translated_preview_Paperlogy-5Medium_img_1.jpg b/modules/test/translated_preview_Paperlogy-5Medium_img_1.jpg new file mode 100644 index 0000000..39f85f7 Binary files /dev/null and b/modules/test/translated_preview_Paperlogy-5Medium_img_1.jpg differ diff --git a/modules/test/translated_preview_Pretendard-Regular_img_1.jpg b/modules/test/translated_preview_Pretendard-Regular_img_1.jpg new file mode 100644 index 0000000..53efc5d Binary files /dev/null and b/modules/test/translated_preview_Pretendard-Regular_img_1.jpg differ