diff --git "a/auto_diffusers.log" "b/auto_diffusers.log" --- "a/auto_diffusers.log" +++ "b/auto_diffusers.log" @@ -17220,3 +17220,1203 @@ IMPORTANT GUIDELINES: 2025-05-30 13:10:27,758 - httpcore.connection - DEBUG - close.complete 2025-05-30 13:10:28,324 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): huggingface.co:443 2025-05-30 13:10:28,548 - urllib3.connectionpool - DEBUG - https://huggingface.co:443 "HEAD /api/telemetry/gradio/launched HTTP/1.1" 200 0 +2025-05-30 13:35:20,468 - __main__ - INFO - Initializing GradioAutodiffusers +2025-05-30 13:35:20,468 - __main__ - DEBUG - API key found, length: 39 +2025-05-30 13:35:20,468 - auto_diffusers - INFO - Initializing AutoDiffusersGenerator +2025-05-30 13:35:20,468 - auto_diffusers - DEBUG - API key length: 39 +2025-05-30 13:35:20,468 - auto_diffusers - WARNING - Tool calling dependencies not available, running without tools +2025-05-30 13:35:20,468 - hardware_detector - INFO - Initializing HardwareDetector +2025-05-30 13:35:20,468 - hardware_detector - DEBUG - Starting system hardware detection +2025-05-30 13:35:20,468 - hardware_detector - DEBUG - Platform: Darwin, Architecture: arm64 +2025-05-30 13:35:20,468 - hardware_detector - DEBUG - CPU cores: 16, Python: 3.11.11 +2025-05-30 13:35:20,468 - hardware_detector - DEBUG - Attempting GPU detection via nvidia-smi +2025-05-30 13:35:20,472 - hardware_detector - DEBUG - nvidia-smi not found, no NVIDIA GPU detected +2025-05-30 13:35:20,472 - hardware_detector - DEBUG - Checking PyTorch availability +2025-05-30 13:35:20,941 - hardware_detector - INFO - PyTorch 2.7.0 detected +2025-05-30 13:35:20,941 - hardware_detector - DEBUG - CUDA available: False, MPS available: True +2025-05-30 13:35:20,941 - hardware_detector - INFO - Hardware detection completed successfully +2025-05-30 13:35:20,941 - hardware_detector - DEBUG - Detected specs: {'platform': 'Darwin', 'architecture': 'arm64', 'cpu_count': 16, 'python_version': '3.11.11', 'gpu_info': None, 'cuda_available': False, 'mps_available': True, 'torch_version': '2.7.0'} +2025-05-30 13:35:20,941 - auto_diffusers - INFO - Hardware detector initialized successfully +2025-05-30 13:35:20,941 - __main__ - INFO - AutoDiffusersGenerator initialized successfully +2025-05-30 13:35:20,941 - simple_memory_calculator - INFO - Initializing SimpleMemoryCalculator +2025-05-30 13:35:20,941 - simple_memory_calculator - DEBUG - HuggingFace API initialized +2025-05-30 13:35:20,941 - simple_memory_calculator - DEBUG - Known models in database: 4 +2025-05-30 13:35:20,941 - __main__ - INFO - SimpleMemoryCalculator initialized successfully +2025-05-30 13:35:20,941 - __main__ - DEBUG - Default model settings: gemini-2.5-flash-preview-05-20, temp=0.7 +2025-05-30 13:35:20,944 - asyncio - DEBUG - Using selector: KqueueSelector +2025-05-30 13:35:20,957 - httpcore.connection - DEBUG - connect_tcp.started host='api.gradio.app' port=443 local_address=None timeout=3 socket_options=None +2025-05-30 13:35:20,964 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): huggingface.co:443 +2025-05-30 13:35:21,047 - asyncio - DEBUG - Using selector: KqueueSelector +2025-05-30 13:35:21,079 - httpcore.connection - DEBUG - connect_tcp.started host='localhost' port=7860 local_address=None timeout=None socket_options=None +2025-05-30 13:35:21,080 - httpcore.connection - DEBUG - connect_tcp.complete return_value= +2025-05-30 13:35:21,080 - httpcore.http11 - DEBUG - send_request_headers.started request= +2025-05-30 13:35:21,080 - httpcore.http11 - DEBUG - send_request_headers.complete +2025-05-30 13:35:21,081 - httpcore.http11 - DEBUG - send_request_body.started request= +2025-05-30 13:35:21,081 - httpcore.http11 - DEBUG - send_request_body.complete +2025-05-30 13:35:21,081 - httpcore.http11 - DEBUG - receive_response_headers.started request= +2025-05-30 13:35:21,081 - httpcore.http11 - DEBUG - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'date', b'Fri, 30 May 2025 04:35:21 GMT'), (b'server', b'uvicorn'), (b'content-length', b'4'), (b'content-type', b'application/json')]) +2025-05-30 13:35:21,081 - httpx - INFO - HTTP Request: GET http://localhost:7860/gradio_api/startup-events "HTTP/1.1 200 OK" +2025-05-30 13:35:21,081 - httpcore.http11 - DEBUG - receive_response_body.started request= +2025-05-30 13:35:21,081 - httpcore.http11 - DEBUG - receive_response_body.complete +2025-05-30 13:35:21,081 - httpcore.http11 - DEBUG - response_closed.started +2025-05-30 13:35:21,081 - httpcore.http11 - DEBUG - response_closed.complete +2025-05-30 13:35:21,081 - httpcore.connection - DEBUG - close.started +2025-05-30 13:35:21,081 - httpcore.connection - DEBUG - close.complete +2025-05-30 13:35:21,082 - httpcore.connection - DEBUG - connect_tcp.started host='localhost' port=7860 local_address=None timeout=3 socket_options=None +2025-05-30 13:35:21,082 - httpcore.connection - DEBUG - connect_tcp.complete return_value= +2025-05-30 13:35:21,082 - httpcore.http11 - DEBUG - send_request_headers.started request= +2025-05-30 13:35:21,082 - httpcore.http11 - DEBUG - send_request_headers.complete +2025-05-30 13:35:21,082 - httpcore.http11 - DEBUG - send_request_body.started request= +2025-05-30 13:35:21,082 - httpcore.http11 - DEBUG - send_request_body.complete +2025-05-30 13:35:21,082 - httpcore.http11 - DEBUG - receive_response_headers.started request= +2025-05-30 13:35:21,089 - httpcore.http11 - DEBUG - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'date', b'Fri, 30 May 2025 04:35:21 GMT'), (b'server', b'uvicorn'), (b'content-length', b'108175'), (b'content-type', b'text/html; charset=utf-8')]) +2025-05-30 13:35:21,089 - httpx - INFO - HTTP Request: HEAD http://localhost:7860/ "HTTP/1.1 200 OK" +2025-05-30 13:35:21,090 - httpcore.http11 - DEBUG - receive_response_body.started request= +2025-05-30 13:35:21,090 - httpcore.http11 - DEBUG - receive_response_body.complete +2025-05-30 13:35:21,090 - httpcore.http11 - DEBUG - response_closed.started +2025-05-30 13:35:21,090 - httpcore.http11 - DEBUG - response_closed.complete +2025-05-30 13:35:21,090 - httpcore.connection - DEBUG - close.started +2025-05-30 13:35:21,090 - httpcore.connection - DEBUG - close.complete +2025-05-30 13:35:21,101 - httpcore.connection - DEBUG - connect_tcp.started host='api.gradio.app' port=443 local_address=None timeout=30 socket_options=None +2025-05-30 13:35:21,120 - httpcore.connection - DEBUG - connect_tcp.complete return_value= +2025-05-30 13:35:21,120 - httpcore.connection - DEBUG - start_tls.started ssl_context= server_hostname='api.gradio.app' timeout=3 +2025-05-30 13:35:21,229 - urllib3.connectionpool - DEBUG - https://huggingface.co:443 "HEAD /api/telemetry/gradio/initiated HTTP/1.1" 200 0 +2025-05-30 13:35:21,241 - httpcore.connection - DEBUG - connect_tcp.complete return_value= +2025-05-30 13:35:21,241 - httpcore.connection - DEBUG - start_tls.started ssl_context= server_hostname='api.gradio.app' timeout=30 +2025-05-30 13:35:21,392 - httpcore.connection - DEBUG - start_tls.complete return_value= +2025-05-30 13:35:21,393 - httpcore.http11 - DEBUG - send_request_headers.started request= +2025-05-30 13:35:21,393 - httpcore.http11 - DEBUG - send_request_headers.complete +2025-05-30 13:35:21,393 - httpcore.http11 - DEBUG - send_request_body.started request= +2025-05-30 13:35:21,393 - httpcore.http11 - DEBUG - send_request_body.complete +2025-05-30 13:35:21,393 - httpcore.http11 - DEBUG - receive_response_headers.started request= +2025-05-30 13:35:21,527 - httpcore.connection - DEBUG - start_tls.complete return_value= +2025-05-30 13:35:21,527 - httpcore.http11 - DEBUG - send_request_headers.started request= +2025-05-30 13:35:21,527 - httpcore.http11 - DEBUG - send_request_headers.complete +2025-05-30 13:35:21,527 - httpcore.http11 - DEBUG - send_request_body.started request= +2025-05-30 13:35:21,527 - httpcore.http11 - DEBUG - send_request_body.complete +2025-05-30 13:35:21,527 - httpcore.http11 - DEBUG - receive_response_headers.started request= +2025-05-30 13:35:21,529 - httpcore.http11 - DEBUG - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Date', b'Fri, 30 May 2025 04:35:21 GMT'), (b'Content-Type', b'application/json'), (b'Content-Length', b'21'), (b'Connection', b'keep-alive'), (b'Server', b'nginx/1.18.0'), (b'Access-Control-Allow-Origin', b'*')]) +2025-05-30 13:35:21,529 - httpx - INFO - HTTP Request: GET https://api.gradio.app/pkg-version "HTTP/1.1 200 OK" +2025-05-30 13:35:21,529 - httpcore.http11 - DEBUG - receive_response_body.started request= +2025-05-30 13:35:21,529 - httpcore.http11 - DEBUG - receive_response_body.complete +2025-05-30 13:35:21,529 - httpcore.http11 - DEBUG - response_closed.started +2025-05-30 13:35:21,529 - httpcore.http11 - DEBUG - response_closed.complete +2025-05-30 13:35:21,529 - httpcore.connection - DEBUG - close.started +2025-05-30 13:35:21,529 - httpcore.connection - DEBUG - close.complete +2025-05-30 13:35:21,672 - httpcore.http11 - DEBUG - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Date', b'Fri, 30 May 2025 04:35:21 GMT'), (b'Content-Type', b'text/html; charset=utf-8'), (b'Transfer-Encoding', b'chunked'), (b'Connection', b'keep-alive'), (b'Server', b'nginx/1.18.0'), (b'ContentType', b'application/json'), (b'Access-Control-Allow-Origin', b'*'), (b'Content-Encoding', b'gzip')]) +2025-05-30 13:35:21,672 - httpx - INFO - HTTP Request: GET https://api.gradio.app/v3/tunnel-request "HTTP/1.1 200 OK" +2025-05-30 13:35:21,672 - httpcore.http11 - DEBUG - receive_response_body.started request= +2025-05-30 13:35:21,673 - httpcore.http11 - DEBUG - receive_response_body.complete +2025-05-30 13:35:21,673 - httpcore.http11 - DEBUG - response_closed.started +2025-05-30 13:35:21,673 - httpcore.http11 - DEBUG - response_closed.complete +2025-05-30 13:35:21,673 - httpcore.connection - DEBUG - close.started +2025-05-30 13:35:21,673 - httpcore.connection - DEBUG - close.complete +2025-05-30 13:35:22,261 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): huggingface.co:443 +2025-05-30 13:35:22,493 - urllib3.connectionpool - DEBUG - https://huggingface.co:443 "HEAD /api/telemetry/gradio/launched HTTP/1.1" 200 0 +2025-05-30 13:35:26,502 - simple_memory_calculator - INFO - Getting memory requirements for model: black-forest-labs/FLUX.1-schnell +2025-05-30 13:35:26,502 - simple_memory_calculator - INFO - Using known memory data for black-forest-labs/FLUX.1-schnell +2025-05-30 13:35:26,503 - simple_memory_calculator - DEBUG - Known data: {'params_billions': 12.0, 'fp16_gb': 24.0, 'inference_fp16_gb': 36.0} +2025-05-30 13:35:26,503 - simple_memory_calculator - INFO - Generating memory recommendations for black-forest-labs/FLUX.1-schnell with 8.0GB VRAM +2025-05-30 13:35:26,503 - simple_memory_calculator - INFO - Getting memory requirements for model: black-forest-labs/FLUX.1-schnell +2025-05-30 13:35:26,503 - simple_memory_calculator - DEBUG - Using cached memory data for black-forest-labs/FLUX.1-schnell +2025-05-30 13:35:26,503 - simple_memory_calculator - DEBUG - Model memory: 24.0GB, Inference memory: 36.0GB +2025-05-30 13:35:26,503 - simple_memory_calculator - INFO - Getting memory requirements for model: black-forest-labs/FLUX.1-schnell +2025-05-30 13:35:26,503 - simple_memory_calculator - DEBUG - Using cached memory data for black-forest-labs/FLUX.1-schnell +2025-05-30 13:36:39,069 - __main__ - INFO - Initializing GradioAutodiffusers +2025-05-30 13:36:39,069 - __main__ - DEBUG - API key found, length: 39 +2025-05-30 13:36:39,069 - auto_diffusers - INFO - Initializing AutoDiffusersGenerator +2025-05-30 13:36:39,069 - auto_diffusers - DEBUG - API key length: 39 +2025-05-30 13:36:39,069 - auto_diffusers - WARNING - Tool calling dependencies not available, running without tools +2025-05-30 13:36:39,069 - hardware_detector - INFO - Initializing HardwareDetector +2025-05-30 13:36:39,069 - hardware_detector - DEBUG - Starting system hardware detection +2025-05-30 13:36:39,069 - hardware_detector - DEBUG - Platform: Darwin, Architecture: arm64 +2025-05-30 13:36:39,069 - hardware_detector - DEBUG - CPU cores: 16, Python: 3.11.11 +2025-05-30 13:36:39,069 - hardware_detector - DEBUG - Attempting GPU detection via nvidia-smi +2025-05-30 13:36:39,072 - hardware_detector - DEBUG - nvidia-smi not found, no NVIDIA GPU detected +2025-05-30 13:36:39,072 - hardware_detector - DEBUG - Checking PyTorch availability +2025-05-30 13:36:39,545 - hardware_detector - INFO - PyTorch 2.7.0 detected +2025-05-30 13:36:39,545 - hardware_detector - DEBUG - CUDA available: False, MPS available: True +2025-05-30 13:36:39,545 - hardware_detector - INFO - Hardware detection completed successfully +2025-05-30 13:36:39,545 - hardware_detector - DEBUG - Detected specs: {'platform': 'Darwin', 'architecture': 'arm64', 'cpu_count': 16, 'python_version': '3.11.11', 'gpu_info': None, 'cuda_available': False, 'mps_available': True, 'torch_version': '2.7.0'} +2025-05-30 13:36:39,545 - auto_diffusers - INFO - Hardware detector initialized successfully +2025-05-30 13:36:39,545 - __main__ - INFO - AutoDiffusersGenerator initialized successfully +2025-05-30 13:36:39,545 - simple_memory_calculator - INFO - Initializing SimpleMemoryCalculator +2025-05-30 13:36:39,545 - simple_memory_calculator - DEBUG - HuggingFace API initialized +2025-05-30 13:36:39,545 - simple_memory_calculator - DEBUG - Known models in database: 4 +2025-05-30 13:36:39,545 - __main__ - INFO - SimpleMemoryCalculator initialized successfully +2025-05-30 13:36:39,545 - __main__ - DEBUG - Default model settings: gemini-2.5-flash-preview-05-20, temp=0.7 +2025-05-30 13:36:39,548 - asyncio - DEBUG - Using selector: KqueueSelector +2025-05-30 13:36:39,561 - httpcore.connection - DEBUG - connect_tcp.started host='api.gradio.app' port=443 local_address=None timeout=3 socket_options=None +2025-05-30 13:36:39,568 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): huggingface.co:443 +2025-05-30 13:36:39,663 - asyncio - DEBUG - Using selector: KqueueSelector +2025-05-30 13:36:39,693 - httpcore.connection - DEBUG - connect_tcp.started host='localhost' port=7860 local_address=None timeout=None socket_options=None +2025-05-30 13:36:39,693 - httpcore.connection - DEBUG - connect_tcp.complete return_value= +2025-05-30 13:36:39,693 - httpcore.http11 - DEBUG - send_request_headers.started request= +2025-05-30 13:36:39,694 - httpcore.http11 - DEBUG - send_request_headers.complete +2025-05-30 13:36:39,694 - httpcore.http11 - DEBUG - send_request_body.started request= +2025-05-30 13:36:39,694 - httpcore.http11 - DEBUG - send_request_body.complete +2025-05-30 13:36:39,694 - httpcore.http11 - DEBUG - receive_response_headers.started request= +2025-05-30 13:36:39,694 - httpcore.http11 - DEBUG - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'date', b'Fri, 30 May 2025 04:36:39 GMT'), (b'server', b'uvicorn'), (b'content-length', b'4'), (b'content-type', b'application/json')]) +2025-05-30 13:36:39,695 - httpx - INFO - HTTP Request: GET http://localhost:7860/gradio_api/startup-events "HTTP/1.1 200 OK" +2025-05-30 13:36:39,695 - httpcore.http11 - DEBUG - receive_response_body.started request= +2025-05-30 13:36:39,695 - httpcore.http11 - DEBUG - receive_response_body.complete +2025-05-30 13:36:39,695 - httpcore.http11 - DEBUG - response_closed.started +2025-05-30 13:36:39,695 - httpcore.http11 - DEBUG - response_closed.complete +2025-05-30 13:36:39,695 - httpcore.connection - DEBUG - close.started +2025-05-30 13:36:39,695 - httpcore.connection - DEBUG - close.complete +2025-05-30 13:36:39,695 - httpcore.connection - DEBUG - connect_tcp.started host='localhost' port=7860 local_address=None timeout=3 socket_options=None +2025-05-30 13:36:39,696 - httpcore.connection - DEBUG - connect_tcp.complete return_value= +2025-05-30 13:36:39,696 - httpcore.http11 - DEBUG - send_request_headers.started request= +2025-05-30 13:36:39,696 - httpcore.http11 - DEBUG - send_request_headers.complete +2025-05-30 13:36:39,696 - httpcore.http11 - DEBUG - send_request_body.started request= +2025-05-30 13:36:39,696 - httpcore.http11 - DEBUG - send_request_body.complete +2025-05-30 13:36:39,696 - httpcore.http11 - DEBUG - receive_response_headers.started request= +2025-05-30 13:36:39,702 - httpcore.http11 - DEBUG - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'date', b'Fri, 30 May 2025 04:36:39 GMT'), (b'server', b'uvicorn'), (b'content-length', b'109390'), (b'content-type', b'text/html; charset=utf-8')]) +2025-05-30 13:36:39,702 - httpx - INFO - HTTP Request: HEAD http://localhost:7860/ "HTTP/1.1 200 OK" +2025-05-30 13:36:39,702 - httpcore.http11 - DEBUG - receive_response_body.started request= +2025-05-30 13:36:39,702 - httpcore.http11 - DEBUG - receive_response_body.complete +2025-05-30 13:36:39,703 - httpcore.http11 - DEBUG - response_closed.started +2025-05-30 13:36:39,703 - httpcore.http11 - DEBUG - response_closed.complete +2025-05-30 13:36:39,703 - httpcore.connection - DEBUG - close.started +2025-05-30 13:36:39,703 - httpcore.connection - DEBUG - close.complete +2025-05-30 13:36:39,714 - httpcore.connection - DEBUG - connect_tcp.started host='api.gradio.app' port=443 local_address=None timeout=30 socket_options=None +2025-05-30 13:36:39,763 - httpcore.connection - DEBUG - connect_tcp.complete return_value= +2025-05-30 13:36:39,763 - httpcore.connection - DEBUG - start_tls.started ssl_context= server_hostname='api.gradio.app' timeout=3 +2025-05-30 13:36:39,853 - httpcore.connection - DEBUG - connect_tcp.complete return_value= +2025-05-30 13:36:39,853 - httpcore.connection - DEBUG - start_tls.started ssl_context= server_hostname='api.gradio.app' timeout=30 +2025-05-30 13:36:39,907 - urllib3.connectionpool - DEBUG - https://huggingface.co:443 "HEAD /api/telemetry/gradio/initiated HTTP/1.1" 200 0 +2025-05-30 13:36:40,107 - httpcore.connection - DEBUG - start_tls.complete return_value= +2025-05-30 13:36:40,107 - httpcore.http11 - DEBUG - send_request_headers.started request= +2025-05-30 13:36:40,108 - httpcore.http11 - DEBUG - send_request_headers.complete +2025-05-30 13:36:40,108 - httpcore.http11 - DEBUG - send_request_body.started request= +2025-05-30 13:36:40,108 - httpcore.http11 - DEBUG - send_request_body.complete +2025-05-30 13:36:40,109 - httpcore.http11 - DEBUG - receive_response_headers.started request= +2025-05-30 13:36:40,128 - httpcore.connection - DEBUG - start_tls.complete return_value= +2025-05-30 13:36:40,128 - httpcore.http11 - DEBUG - send_request_headers.started request= +2025-05-30 13:36:40,128 - httpcore.http11 - DEBUG - send_request_headers.complete +2025-05-30 13:36:40,128 - httpcore.http11 - DEBUG - send_request_body.started request= +2025-05-30 13:36:40,128 - httpcore.http11 - DEBUG - send_request_body.complete +2025-05-30 13:36:40,128 - httpcore.http11 - DEBUG - receive_response_headers.started request= +2025-05-30 13:36:40,268 - httpcore.http11 - DEBUG - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Date', b'Fri, 30 May 2025 04:36:40 GMT'), (b'Content-Type', b'text/html; charset=utf-8'), (b'Transfer-Encoding', b'chunked'), (b'Connection', b'keep-alive'), (b'Server', b'nginx/1.18.0'), (b'ContentType', b'application/json'), (b'Access-Control-Allow-Origin', b'*'), (b'Content-Encoding', b'gzip')]) +2025-05-30 13:36:40,268 - httpx - INFO - HTTP Request: GET https://api.gradio.app/v3/tunnel-request "HTTP/1.1 200 OK" +2025-05-30 13:36:40,269 - httpcore.http11 - DEBUG - receive_response_body.started request= +2025-05-30 13:36:40,269 - httpcore.http11 - DEBUG - receive_response_body.complete +2025-05-30 13:36:40,269 - httpcore.http11 - DEBUG - response_closed.started +2025-05-30 13:36:40,270 - httpcore.http11 - DEBUG - response_closed.complete +2025-05-30 13:36:40,270 - httpcore.connection - DEBUG - close.started +2025-05-30 13:36:40,270 - httpcore.connection - DEBUG - close.complete +2025-05-30 13:36:40,279 - httpcore.http11 - DEBUG - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Date', b'Fri, 30 May 2025 04:36:40 GMT'), (b'Content-Type', b'application/json'), (b'Content-Length', b'21'), (b'Connection', b'keep-alive'), (b'Server', b'nginx/1.18.0'), (b'Access-Control-Allow-Origin', b'*')]) +2025-05-30 13:36:40,280 - httpx - INFO - HTTP Request: GET https://api.gradio.app/pkg-version "HTTP/1.1 200 OK" +2025-05-30 13:36:40,280 - httpcore.http11 - DEBUG - receive_response_body.started request= +2025-05-30 13:36:40,280 - httpcore.http11 - DEBUG - receive_response_body.complete +2025-05-30 13:36:40,280 - httpcore.http11 - DEBUG - response_closed.started +2025-05-30 13:36:40,280 - httpcore.http11 - DEBUG - response_closed.complete +2025-05-30 13:36:40,280 - httpcore.connection - DEBUG - close.started +2025-05-30 13:36:40,280 - httpcore.connection - DEBUG - close.complete +2025-05-30 13:36:40,866 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): huggingface.co:443 +2025-05-30 13:36:41,086 - urllib3.connectionpool - DEBUG - https://huggingface.co:443 "HEAD /api/telemetry/gradio/launched HTTP/1.1" 200 0 +2025-05-30 13:36:41,216 - simple_memory_calculator - INFO - Getting memory requirements for model: black-forest-labs/FLUX.1-schnell +2025-05-30 13:36:41,216 - simple_memory_calculator - INFO - Using known memory data for black-forest-labs/FLUX.1-schnell +2025-05-30 13:36:41,216 - simple_memory_calculator - DEBUG - Known data: {'params_billions': 12.0, 'fp16_gb': 24.0, 'inference_fp16_gb': 36.0} +2025-05-30 13:36:41,216 - simple_memory_calculator - INFO - Generating memory recommendations for black-forest-labs/FLUX.1-schnell with 8.0GB VRAM +2025-05-30 13:36:41,216 - simple_memory_calculator - INFO - Getting memory requirements for model: black-forest-labs/FLUX.1-schnell +2025-05-30 13:36:41,217 - simple_memory_calculator - DEBUG - Using cached memory data for black-forest-labs/FLUX.1-schnell +2025-05-30 13:36:41,217 - simple_memory_calculator - DEBUG - Model memory: 24.0GB, Inference memory: 36.0GB +2025-05-30 13:36:41,217 - simple_memory_calculator - INFO - Getting memory requirements for model: black-forest-labs/FLUX.1-schnell +2025-05-30 13:36:41,217 - simple_memory_calculator - DEBUG - Using cached memory data for black-forest-labs/FLUX.1-schnell +2025-05-30 13:38:21,760 - __main__ - INFO - Initializing GradioAutodiffusers +2025-05-30 13:38:21,760 - __main__ - DEBUG - API key found, length: 39 +2025-05-30 13:38:21,760 - auto_diffusers - INFO - Initializing AutoDiffusersGenerator +2025-05-30 13:38:21,760 - auto_diffusers - DEBUG - API key length: 39 +2025-05-30 13:38:21,760 - auto_diffusers - WARNING - Tool calling dependencies not available, running without tools +2025-05-30 13:38:21,760 - hardware_detector - INFO - Initializing HardwareDetector +2025-05-30 13:38:21,760 - hardware_detector - DEBUG - Starting system hardware detection +2025-05-30 13:38:21,760 - hardware_detector - DEBUG - Platform: Darwin, Architecture: arm64 +2025-05-30 13:38:21,760 - hardware_detector - DEBUG - CPU cores: 16, Python: 3.11.11 +2025-05-30 13:38:21,760 - hardware_detector - DEBUG - Attempting GPU detection via nvidia-smi +2025-05-30 13:38:21,764 - hardware_detector - DEBUG - nvidia-smi not found, no NVIDIA GPU detected +2025-05-30 13:38:21,764 - hardware_detector - DEBUG - Checking PyTorch availability +2025-05-30 13:38:22,234 - hardware_detector - INFO - PyTorch 2.7.0 detected +2025-05-30 13:38:22,234 - hardware_detector - DEBUG - CUDA available: False, MPS available: True +2025-05-30 13:38:22,234 - hardware_detector - INFO - Hardware detection completed successfully +2025-05-30 13:38:22,234 - hardware_detector - DEBUG - Detected specs: {'platform': 'Darwin', 'architecture': 'arm64', 'cpu_count': 16, 'python_version': '3.11.11', 'gpu_info': None, 'cuda_available': False, 'mps_available': True, 'torch_version': '2.7.0'} +2025-05-30 13:38:22,234 - auto_diffusers - INFO - Hardware detector initialized successfully +2025-05-30 13:38:22,234 - __main__ - INFO - AutoDiffusersGenerator initialized successfully +2025-05-30 13:38:22,234 - simple_memory_calculator - INFO - Initializing SimpleMemoryCalculator +2025-05-30 13:38:22,234 - simple_memory_calculator - DEBUG - HuggingFace API initialized +2025-05-30 13:38:22,234 - simple_memory_calculator - DEBUG - Known models in database: 4 +2025-05-30 13:38:22,234 - __main__ - INFO - SimpleMemoryCalculator initialized successfully +2025-05-30 13:38:22,234 - __main__ - DEBUG - Default model settings: gemini-2.5-flash-preview-05-20, temp=0.7 +2025-05-30 13:38:22,236 - asyncio - DEBUG - Using selector: KqueueSelector +2025-05-30 13:38:22,250 - httpcore.connection - DEBUG - connect_tcp.started host='api.gradio.app' port=443 local_address=None timeout=3 socket_options=None +2025-05-30 13:38:22,256 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): huggingface.co:443 +2025-05-30 13:38:22,335 - asyncio - DEBUG - Using selector: KqueueSelector +2025-05-30 13:38:22,369 - httpcore.connection - DEBUG - connect_tcp.started host='localhost' port=7860 local_address=None timeout=None socket_options=None +2025-05-30 13:38:22,370 - httpcore.connection - DEBUG - connect_tcp.complete return_value= +2025-05-30 13:38:22,370 - httpcore.http11 - DEBUG - send_request_headers.started request= +2025-05-30 13:38:22,370 - httpcore.http11 - DEBUG - send_request_headers.complete +2025-05-30 13:38:22,370 - httpcore.http11 - DEBUG - send_request_body.started request= +2025-05-30 13:38:22,370 - httpcore.http11 - DEBUG - send_request_body.complete +2025-05-30 13:38:22,371 - httpcore.http11 - DEBUG - receive_response_headers.started request= +2025-05-30 13:38:22,371 - httpcore.http11 - DEBUG - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'date', b'Fri, 30 May 2025 04:38:22 GMT'), (b'server', b'uvicorn'), (b'content-length', b'4'), (b'content-type', b'application/json')]) +2025-05-30 13:38:22,371 - httpx - INFO - HTTP Request: GET http://localhost:7860/gradio_api/startup-events "HTTP/1.1 200 OK" +2025-05-30 13:38:22,371 - httpcore.http11 - DEBUG - receive_response_body.started request= +2025-05-30 13:38:22,371 - httpcore.http11 - DEBUG - receive_response_body.complete +2025-05-30 13:38:22,371 - httpcore.http11 - DEBUG - response_closed.started +2025-05-30 13:38:22,371 - httpcore.http11 - DEBUG - response_closed.complete +2025-05-30 13:38:22,371 - httpcore.connection - DEBUG - close.started +2025-05-30 13:38:22,371 - httpcore.connection - DEBUG - close.complete +2025-05-30 13:38:22,372 - httpcore.connection - DEBUG - connect_tcp.started host='localhost' port=7860 local_address=None timeout=3 socket_options=None +2025-05-30 13:38:22,372 - httpcore.connection - DEBUG - connect_tcp.complete return_value= +2025-05-30 13:38:22,372 - httpcore.http11 - DEBUG - send_request_headers.started request= +2025-05-30 13:38:22,372 - httpcore.http11 - DEBUG - send_request_headers.complete +2025-05-30 13:38:22,372 - httpcore.http11 - DEBUG - send_request_body.started request= +2025-05-30 13:38:22,372 - httpcore.http11 - DEBUG - send_request_body.complete +2025-05-30 13:38:22,372 - httpcore.http11 - DEBUG - receive_response_headers.started request= +2025-05-30 13:38:22,379 - httpcore.http11 - DEBUG - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'date', b'Fri, 30 May 2025 04:38:22 GMT'), (b'server', b'uvicorn'), (b'content-length', b'109348'), (b'content-type', b'text/html; charset=utf-8')]) +2025-05-30 13:38:22,379 - httpx - INFO - HTTP Request: HEAD http://localhost:7860/ "HTTP/1.1 200 OK" +2025-05-30 13:38:22,379 - httpcore.http11 - DEBUG - receive_response_body.started request= +2025-05-30 13:38:22,379 - httpcore.http11 - DEBUG - receive_response_body.complete +2025-05-30 13:38:22,379 - httpcore.http11 - DEBUG - response_closed.started +2025-05-30 13:38:22,379 - httpcore.http11 - DEBUG - response_closed.complete +2025-05-30 13:38:22,379 - httpcore.connection - DEBUG - close.started +2025-05-30 13:38:22,379 - httpcore.connection - DEBUG - close.complete +2025-05-30 13:38:22,391 - httpcore.connection - DEBUG - connect_tcp.started host='api.gradio.app' port=443 local_address=None timeout=30 socket_options=None +2025-05-30 13:38:22,418 - httpcore.connection - DEBUG - connect_tcp.complete return_value= +2025-05-30 13:38:22,418 - httpcore.connection - DEBUG - start_tls.started ssl_context= server_hostname='api.gradio.app' timeout=3 +2025-05-30 13:38:22,525 - httpcore.connection - DEBUG - connect_tcp.complete return_value= +2025-05-30 13:38:22,525 - httpcore.connection - DEBUG - start_tls.started ssl_context= server_hostname='api.gradio.app' timeout=30 +2025-05-30 13:38:22,528 - urllib3.connectionpool - DEBUG - https://huggingface.co:443 "HEAD /api/telemetry/gradio/initiated HTTP/1.1" 200 0 +2025-05-30 13:38:22,700 - httpcore.connection - DEBUG - start_tls.complete return_value= +2025-05-30 13:38:22,700 - httpcore.http11 - DEBUG - send_request_headers.started request= +2025-05-30 13:38:22,700 - httpcore.http11 - DEBUG - send_request_headers.complete +2025-05-30 13:38:22,700 - httpcore.http11 - DEBUG - send_request_body.started request= +2025-05-30 13:38:22,701 - httpcore.http11 - DEBUG - send_request_body.complete +2025-05-30 13:38:22,701 - httpcore.http11 - DEBUG - receive_response_headers.started request= +2025-05-30 13:38:22,798 - httpcore.connection - DEBUG - start_tls.complete return_value= +2025-05-30 13:38:22,799 - httpcore.http11 - DEBUG - send_request_headers.started request= +2025-05-30 13:38:22,799 - httpcore.http11 - DEBUG - send_request_headers.complete +2025-05-30 13:38:22,799 - httpcore.http11 - DEBUG - send_request_body.started request= +2025-05-30 13:38:22,799 - httpcore.http11 - DEBUG - send_request_body.complete +2025-05-30 13:38:22,799 - httpcore.http11 - DEBUG - receive_response_headers.started request= +2025-05-30 13:38:22,887 - httpcore.http11 - DEBUG - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Date', b'Fri, 30 May 2025 04:38:22 GMT'), (b'Content-Type', b'application/json'), (b'Content-Length', b'21'), (b'Connection', b'keep-alive'), (b'Server', b'nginx/1.18.0'), (b'Access-Control-Allow-Origin', b'*')]) +2025-05-30 13:38:22,888 - httpx - INFO - HTTP Request: GET https://api.gradio.app/pkg-version "HTTP/1.1 200 OK" +2025-05-30 13:38:22,888 - httpcore.http11 - DEBUG - receive_response_body.started request= +2025-05-30 13:38:22,889 - httpcore.http11 - DEBUG - receive_response_body.complete +2025-05-30 13:38:22,889 - httpcore.http11 - DEBUG - response_closed.started +2025-05-30 13:38:22,889 - httpcore.http11 - DEBUG - response_closed.complete +2025-05-30 13:38:22,890 - httpcore.connection - DEBUG - close.started +2025-05-30 13:38:22,890 - httpcore.connection - DEBUG - close.complete +2025-05-30 13:38:22,937 - httpcore.http11 - DEBUG - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Date', b'Fri, 30 May 2025 04:38:22 GMT'), (b'Content-Type', b'text/html; charset=utf-8'), (b'Transfer-Encoding', b'chunked'), (b'Connection', b'keep-alive'), (b'Server', b'nginx/1.18.0'), (b'ContentType', b'application/json'), (b'Access-Control-Allow-Origin', b'*'), (b'Content-Encoding', b'gzip')]) +2025-05-30 13:38:22,938 - httpx - INFO - HTTP Request: GET https://api.gradio.app/v3/tunnel-request "HTTP/1.1 200 OK" +2025-05-30 13:38:22,938 - httpcore.http11 - DEBUG - receive_response_body.started request= +2025-05-30 13:38:22,939 - httpcore.http11 - DEBUG - receive_response_body.complete +2025-05-30 13:38:22,939 - httpcore.http11 - DEBUG - response_closed.started +2025-05-30 13:38:22,939 - httpcore.http11 - DEBUG - response_closed.complete +2025-05-30 13:38:22,939 - httpcore.connection - DEBUG - close.started +2025-05-30 13:38:22,940 - httpcore.connection - DEBUG - close.complete +2025-05-30 13:38:23,236 - simple_memory_calculator - INFO - Getting memory requirements for model: black-forest-labs/FLUX.1-schnell +2025-05-30 13:38:23,236 - simple_memory_calculator - INFO - Using known memory data for black-forest-labs/FLUX.1-schnell +2025-05-30 13:38:23,236 - simple_memory_calculator - DEBUG - Known data: {'params_billions': 12.0, 'fp16_gb': 24.0, 'inference_fp16_gb': 36.0} +2025-05-30 13:38:23,236 - simple_memory_calculator - INFO - Generating memory recommendations for black-forest-labs/FLUX.1-schnell with 8.0GB VRAM +2025-05-30 13:38:23,237 - simple_memory_calculator - INFO - Getting memory requirements for model: black-forest-labs/FLUX.1-schnell +2025-05-30 13:38:23,237 - simple_memory_calculator - DEBUG - Using cached memory data for black-forest-labs/FLUX.1-schnell +2025-05-30 13:38:23,237 - simple_memory_calculator - DEBUG - Model memory: 24.0GB, Inference memory: 36.0GB +2025-05-30 13:38:23,237 - simple_memory_calculator - INFO - Getting memory requirements for model: black-forest-labs/FLUX.1-schnell +2025-05-30 13:38:23,237 - simple_memory_calculator - DEBUG - Using cached memory data for black-forest-labs/FLUX.1-schnell +2025-05-30 13:38:23,534 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): huggingface.co:443 +2025-05-30 13:38:23,781 - urllib3.connectionpool - DEBUG - https://huggingface.co:443 "HEAD /api/telemetry/gradio/launched HTTP/1.1" 200 0 +2025-05-30 13:39:41,812 - __main__ - INFO - Initializing GradioAutodiffusers +2025-05-30 13:39:41,812 - __main__ - DEBUG - API key found, length: 39 +2025-05-30 13:39:41,812 - auto_diffusers - INFO - Initializing AutoDiffusersGenerator +2025-05-30 13:39:41,812 - auto_diffusers - DEBUG - API key length: 39 +2025-05-30 13:39:41,812 - auto_diffusers - WARNING - Tool calling dependencies not available, running without tools +2025-05-30 13:39:41,812 - hardware_detector - INFO - Initializing HardwareDetector +2025-05-30 13:39:41,812 - hardware_detector - DEBUG - Starting system hardware detection +2025-05-30 13:39:41,812 - hardware_detector - DEBUG - Platform: Darwin, Architecture: arm64 +2025-05-30 13:39:41,812 - hardware_detector - DEBUG - CPU cores: 16, Python: 3.11.11 +2025-05-30 13:39:41,812 - hardware_detector - DEBUG - Attempting GPU detection via nvidia-smi +2025-05-30 13:39:41,817 - hardware_detector - DEBUG - nvidia-smi not found, no NVIDIA GPU detected +2025-05-30 13:39:41,817 - hardware_detector - DEBUG - Checking PyTorch availability +2025-05-30 13:39:42,291 - hardware_detector - INFO - PyTorch 2.7.0 detected +2025-05-30 13:39:42,291 - hardware_detector - DEBUG - CUDA available: False, MPS available: True +2025-05-30 13:39:42,292 - hardware_detector - INFO - Hardware detection completed successfully +2025-05-30 13:39:42,292 - hardware_detector - DEBUG - Detected specs: {'platform': 'Darwin', 'architecture': 'arm64', 'cpu_count': 16, 'python_version': '3.11.11', 'gpu_info': None, 'cuda_available': False, 'mps_available': True, 'torch_version': '2.7.0'} +2025-05-30 13:39:42,292 - auto_diffusers - INFO - Hardware detector initialized successfully +2025-05-30 13:39:42,292 - __main__ - INFO - AutoDiffusersGenerator initialized successfully +2025-05-30 13:39:42,292 - simple_memory_calculator - INFO - Initializing SimpleMemoryCalculator +2025-05-30 13:39:42,292 - simple_memory_calculator - DEBUG - HuggingFace API initialized +2025-05-30 13:39:42,292 - simple_memory_calculator - DEBUG - Known models in database: 4 +2025-05-30 13:39:42,292 - __main__ - INFO - SimpleMemoryCalculator initialized successfully +2025-05-30 13:39:42,292 - __main__ - DEBUG - Default model settings: gemini-2.5-flash-preview-05-20, temp=0.7 +2025-05-30 13:39:42,294 - asyncio - DEBUG - Using selector: KqueueSelector +2025-05-30 13:39:42,307 - httpcore.connection - DEBUG - connect_tcp.started host='api.gradio.app' port=443 local_address=None timeout=3 socket_options=None +2025-05-30 13:39:42,315 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): huggingface.co:443 +2025-05-30 13:39:42,405 - asyncio - DEBUG - Using selector: KqueueSelector +2025-05-30 13:39:42,447 - httpcore.connection - DEBUG - connect_tcp.started host='localhost' port=7860 local_address=None timeout=None socket_options=None +2025-05-30 13:39:42,448 - httpcore.connection - DEBUG - connect_tcp.complete return_value= +2025-05-30 13:39:42,448 - httpcore.http11 - DEBUG - send_request_headers.started request= +2025-05-30 13:39:42,448 - httpcore.http11 - DEBUG - send_request_headers.complete +2025-05-30 13:39:42,449 - httpcore.http11 - DEBUG - send_request_body.started request= +2025-05-30 13:39:42,449 - httpcore.http11 - DEBUG - send_request_body.complete +2025-05-30 13:39:42,449 - httpcore.http11 - DEBUG - receive_response_headers.started request= +2025-05-30 13:39:42,449 - httpcore.http11 - DEBUG - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'date', b'Fri, 30 May 2025 04:39:42 GMT'), (b'server', b'uvicorn'), (b'content-length', b'4'), (b'content-type', b'application/json')]) +2025-05-30 13:39:42,449 - httpx - INFO - HTTP Request: GET http://localhost:7860/gradio_api/startup-events "HTTP/1.1 200 OK" +2025-05-30 13:39:42,449 - httpcore.http11 - DEBUG - receive_response_body.started request= +2025-05-30 13:39:42,449 - httpcore.http11 - DEBUG - receive_response_body.complete +2025-05-30 13:39:42,449 - httpcore.http11 - DEBUG - response_closed.started +2025-05-30 13:39:42,449 - httpcore.http11 - DEBUG - response_closed.complete +2025-05-30 13:39:42,449 - httpcore.connection - DEBUG - close.started +2025-05-30 13:39:42,449 - httpcore.connection - DEBUG - close.complete +2025-05-30 13:39:42,450 - httpcore.connection - DEBUG - connect_tcp.started host='localhost' port=7860 local_address=None timeout=3 socket_options=None +2025-05-30 13:39:42,450 - httpcore.connection - DEBUG - connect_tcp.complete return_value= +2025-05-30 13:39:42,451 - httpcore.http11 - DEBUG - send_request_headers.started request= +2025-05-30 13:39:42,451 - httpcore.http11 - DEBUG - send_request_headers.complete +2025-05-30 13:39:42,451 - httpcore.http11 - DEBUG - send_request_body.started request= +2025-05-30 13:39:42,451 - httpcore.http11 - DEBUG - send_request_body.complete +2025-05-30 13:39:42,451 - httpcore.http11 - DEBUG - receive_response_headers.started request= +2025-05-30 13:39:42,457 - httpcore.http11 - DEBUG - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'date', b'Fri, 30 May 2025 04:39:42 GMT'), (b'server', b'uvicorn'), (b'content-length', b'109673'), (b'content-type', b'text/html; charset=utf-8')]) +2025-05-30 13:39:42,458 - httpx - INFO - HTTP Request: HEAD http://localhost:7860/ "HTTP/1.1 200 OK" +2025-05-30 13:39:42,458 - httpcore.http11 - DEBUG - receive_response_body.started request= +2025-05-30 13:39:42,458 - httpcore.http11 - DEBUG - receive_response_body.complete +2025-05-30 13:39:42,458 - httpcore.http11 - DEBUG - response_closed.started +2025-05-30 13:39:42,458 - httpcore.http11 - DEBUG - response_closed.complete +2025-05-30 13:39:42,458 - httpcore.connection - DEBUG - close.started +2025-05-30 13:39:42,458 - httpcore.connection - DEBUG - close.complete +2025-05-30 13:39:42,470 - httpcore.connection - DEBUG - connect_tcp.started host='api.gradio.app' port=443 local_address=None timeout=30 socket_options=None +2025-05-30 13:39:42,577 - httpcore.connection - DEBUG - connect_tcp.complete return_value= +2025-05-30 13:39:42,577 - httpcore.connection - DEBUG - start_tls.started ssl_context= server_hostname='api.gradio.app' timeout=3 +2025-05-30 13:39:42,601 - urllib3.connectionpool - DEBUG - https://huggingface.co:443 "HEAD /api/telemetry/gradio/initiated HTTP/1.1" 200 0 +2025-05-30 13:39:42,627 - httpcore.connection - DEBUG - connect_tcp.complete return_value= +2025-05-30 13:39:42,627 - httpcore.connection - DEBUG - start_tls.started ssl_context= server_hostname='api.gradio.app' timeout=30 +2025-05-30 13:39:42,895 - httpcore.connection - DEBUG - start_tls.complete return_value= +2025-05-30 13:39:42,895 - httpcore.http11 - DEBUG - send_request_headers.started request= +2025-05-30 13:39:42,896 - httpcore.http11 - DEBUG - send_request_headers.complete +2025-05-30 13:39:42,896 - httpcore.http11 - DEBUG - send_request_body.started request= +2025-05-30 13:39:42,896 - httpcore.http11 - DEBUG - send_request_body.complete +2025-05-30 13:39:42,896 - httpcore.http11 - DEBUG - receive_response_headers.started request= +2025-05-30 13:39:42,947 - httpcore.connection - DEBUG - start_tls.complete return_value= +2025-05-30 13:39:42,947 - httpcore.http11 - DEBUG - send_request_headers.started request= +2025-05-30 13:39:42,947 - httpcore.http11 - DEBUG - send_request_headers.complete +2025-05-30 13:39:42,947 - httpcore.http11 - DEBUG - send_request_body.started request= +2025-05-30 13:39:42,947 - httpcore.http11 - DEBUG - send_request_body.complete +2025-05-30 13:39:42,947 - httpcore.http11 - DEBUG - receive_response_headers.started request= +2025-05-30 13:39:43,058 - httpcore.http11 - DEBUG - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Date', b'Fri, 30 May 2025 04:39:42 GMT'), (b'Content-Type', b'application/json'), (b'Content-Length', b'21'), (b'Connection', b'keep-alive'), (b'Server', b'nginx/1.18.0'), (b'Access-Control-Allow-Origin', b'*')]) +2025-05-30 13:39:43,058 - httpx - INFO - HTTP Request: GET https://api.gradio.app/pkg-version "HTTP/1.1 200 OK" +2025-05-30 13:39:43,059 - httpcore.http11 - DEBUG - receive_response_body.started request= +2025-05-30 13:39:43,059 - httpcore.http11 - DEBUG - receive_response_body.complete +2025-05-30 13:39:43,059 - httpcore.http11 - DEBUG - response_closed.started +2025-05-30 13:39:43,059 - httpcore.http11 - DEBUG - response_closed.complete +2025-05-30 13:39:43,059 - httpcore.connection - DEBUG - close.started +2025-05-30 13:39:43,060 - httpcore.connection - DEBUG - close.complete +2025-05-30 13:39:43,107 - httpcore.http11 - DEBUG - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Date', b'Fri, 30 May 2025 04:39:43 GMT'), (b'Content-Type', b'text/html; charset=utf-8'), (b'Transfer-Encoding', b'chunked'), (b'Connection', b'keep-alive'), (b'Server', b'nginx/1.18.0'), (b'ContentType', b'application/json'), (b'Access-Control-Allow-Origin', b'*'), (b'Content-Encoding', b'gzip')]) +2025-05-30 13:39:43,107 - httpx - INFO - HTTP Request: GET https://api.gradio.app/v3/tunnel-request "HTTP/1.1 200 OK" +2025-05-30 13:39:43,108 - httpcore.http11 - DEBUG - receive_response_body.started request= +2025-05-30 13:39:43,108 - httpcore.http11 - DEBUG - receive_response_body.complete +2025-05-30 13:39:43,109 - httpcore.http11 - DEBUG - response_closed.started +2025-05-30 13:39:43,109 - httpcore.http11 - DEBUG - response_closed.complete +2025-05-30 13:39:43,109 - httpcore.connection - DEBUG - close.started +2025-05-30 13:39:43,109 - httpcore.connection - DEBUG - close.complete +2025-05-30 13:39:43,815 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): huggingface.co:443 +2025-05-30 13:39:43,971 - simple_memory_calculator - INFO - Getting memory requirements for model: black-forest-labs/FLUX.1-schnell +2025-05-30 13:39:43,971 - simple_memory_calculator - INFO - Using known memory data for black-forest-labs/FLUX.1-schnell +2025-05-30 13:39:43,971 - simple_memory_calculator - DEBUG - Known data: {'params_billions': 12.0, 'fp16_gb': 24.0, 'inference_fp16_gb': 36.0} +2025-05-30 13:39:43,971 - simple_memory_calculator - INFO - Generating memory recommendations for black-forest-labs/FLUX.1-schnell with 8.0GB VRAM +2025-05-30 13:39:43,971 - simple_memory_calculator - INFO - Getting memory requirements for model: black-forest-labs/FLUX.1-schnell +2025-05-30 13:39:43,971 - simple_memory_calculator - DEBUG - Using cached memory data for black-forest-labs/FLUX.1-schnell +2025-05-30 13:39:43,972 - simple_memory_calculator - DEBUG - Model memory: 24.0GB, Inference memory: 36.0GB +2025-05-30 13:39:43,972 - simple_memory_calculator - INFO - Getting memory requirements for model: black-forest-labs/FLUX.1-schnell +2025-05-30 13:39:43,972 - simple_memory_calculator - DEBUG - Using cached memory data for black-forest-labs/FLUX.1-schnell +2025-05-30 13:39:44,023 - urllib3.connectionpool - DEBUG - https://huggingface.co:443 "HEAD /api/telemetry/gradio/launched HTTP/1.1" 200 0 +2025-05-30 13:44:55,206 - __main__ - INFO - Initializing GradioAutodiffusers +2025-05-30 13:44:55,206 - __main__ - DEBUG - API key found, length: 39 +2025-05-30 13:44:55,206 - auto_diffusers - INFO - Initializing AutoDiffusersGenerator +2025-05-30 13:44:55,206 - auto_diffusers - DEBUG - API key length: 39 +2025-05-30 13:44:55,206 - auto_diffusers - WARNING - Tool calling dependencies not available, running without tools +2025-05-30 13:44:55,206 - hardware_detector - INFO - Initializing HardwareDetector +2025-05-30 13:44:55,206 - hardware_detector - DEBUG - Starting system hardware detection +2025-05-30 13:44:55,206 - hardware_detector - DEBUG - Platform: Darwin, Architecture: arm64 +2025-05-30 13:44:55,206 - hardware_detector - DEBUG - CPU cores: 16, Python: 3.11.11 +2025-05-30 13:44:55,206 - hardware_detector - DEBUG - Attempting GPU detection via nvidia-smi +2025-05-30 13:44:55,209 - hardware_detector - DEBUG - nvidia-smi not found, no NVIDIA GPU detected +2025-05-30 13:44:55,210 - hardware_detector - DEBUG - Checking PyTorch availability +2025-05-30 13:44:55,716 - hardware_detector - INFO - PyTorch 2.7.0 detected +2025-05-30 13:44:55,716 - hardware_detector - DEBUG - CUDA available: False, MPS available: True +2025-05-30 13:44:55,716 - hardware_detector - INFO - Hardware detection completed successfully +2025-05-30 13:44:55,716 - hardware_detector - DEBUG - Detected specs: {'platform': 'Darwin', 'architecture': 'arm64', 'cpu_count': 16, 'python_version': '3.11.11', 'gpu_info': None, 'cuda_available': False, 'mps_available': True, 'torch_version': '2.7.0'} +2025-05-30 13:44:55,716 - auto_diffusers - INFO - Hardware detector initialized successfully +2025-05-30 13:44:55,716 - __main__ - INFO - AutoDiffusersGenerator initialized successfully +2025-05-30 13:44:55,716 - simple_memory_calculator - INFO - Initializing SimpleMemoryCalculator +2025-05-30 13:44:55,716 - simple_memory_calculator - DEBUG - HuggingFace API initialized +2025-05-30 13:44:55,716 - simple_memory_calculator - DEBUG - Known models in database: 4 +2025-05-30 13:44:55,716 - __main__ - INFO - SimpleMemoryCalculator initialized successfully +2025-05-30 13:44:55,716 - __main__ - DEBUG - Default model settings: gemini-2.5-flash-preview-05-20, temp=0.7 +2025-05-30 13:44:55,719 - asyncio - DEBUG - Using selector: KqueueSelector +2025-05-30 13:44:55,732 - httpcore.connection - DEBUG - connect_tcp.started host='api.gradio.app' port=443 local_address=None timeout=3 socket_options=None +2025-05-30 13:44:55,740 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): huggingface.co:443 +2025-05-30 13:44:55,827 - asyncio - DEBUG - Using selector: KqueueSelector +2025-05-30 13:44:55,858 - httpcore.connection - DEBUG - connect_tcp.started host='localhost' port=7860 local_address=None timeout=None socket_options=None +2025-05-30 13:44:55,858 - httpcore.connection - DEBUG - connect_tcp.complete return_value= +2025-05-30 13:44:55,859 - httpcore.http11 - DEBUG - send_request_headers.started request= +2025-05-30 13:44:55,859 - httpcore.http11 - DEBUG - send_request_headers.complete +2025-05-30 13:44:55,859 - httpcore.http11 - DEBUG - send_request_body.started request= +2025-05-30 13:44:55,859 - httpcore.http11 - DEBUG - send_request_body.complete +2025-05-30 13:44:55,859 - httpcore.http11 - DEBUG - receive_response_headers.started request= +2025-05-30 13:44:55,859 - httpcore.http11 - DEBUG - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'date', b'Fri, 30 May 2025 04:44:55 GMT'), (b'server', b'uvicorn'), (b'content-length', b'4'), (b'content-type', b'application/json')]) +2025-05-30 13:44:55,860 - httpx - INFO - HTTP Request: GET http://localhost:7860/gradio_api/startup-events "HTTP/1.1 200 OK" +2025-05-30 13:44:55,860 - httpcore.http11 - DEBUG - receive_response_body.started request= +2025-05-30 13:44:55,860 - httpcore.http11 - DEBUG - receive_response_body.complete +2025-05-30 13:44:55,860 - httpcore.http11 - DEBUG - response_closed.started +2025-05-30 13:44:55,860 - httpcore.http11 - DEBUG - response_closed.complete +2025-05-30 13:44:55,860 - httpcore.connection - DEBUG - close.started +2025-05-30 13:44:55,860 - httpcore.connection - DEBUG - close.complete +2025-05-30 13:44:55,860 - httpcore.connection - DEBUG - connect_tcp.started host='localhost' port=7860 local_address=None timeout=3 socket_options=None +2025-05-30 13:44:55,861 - httpcore.connection - DEBUG - connect_tcp.complete return_value= +2025-05-30 13:44:55,861 - httpcore.http11 - DEBUG - send_request_headers.started request= +2025-05-30 13:44:55,861 - httpcore.http11 - DEBUG - send_request_headers.complete +2025-05-30 13:44:55,861 - httpcore.http11 - DEBUG - send_request_body.started request= +2025-05-30 13:44:55,861 - httpcore.http11 - DEBUG - send_request_body.complete +2025-05-30 13:44:55,861 - httpcore.http11 - DEBUG - receive_response_headers.started request= +2025-05-30 13:44:55,877 - httpcore.http11 - DEBUG - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'date', b'Fri, 30 May 2025 04:44:55 GMT'), (b'server', b'uvicorn'), (b'content-length', b'109695'), (b'content-type', b'text/html; charset=utf-8')]) +2025-05-30 13:44:55,877 - httpx - INFO - HTTP Request: HEAD http://localhost:7860/ "HTTP/1.1 200 OK" +2025-05-30 13:44:55,877 - httpcore.http11 - DEBUG - receive_response_body.started request= +2025-05-30 13:44:55,877 - httpcore.http11 - DEBUG - receive_response_body.complete +2025-05-30 13:44:55,877 - httpcore.http11 - DEBUG - response_closed.started +2025-05-30 13:44:55,877 - httpcore.http11 - DEBUG - response_closed.complete +2025-05-30 13:44:55,877 - httpcore.connection - DEBUG - close.started +2025-05-30 13:44:55,877 - httpcore.connection - DEBUG - close.complete +2025-05-30 13:44:55,890 - httpcore.connection - DEBUG - connect_tcp.started host='api.gradio.app' port=443 local_address=None timeout=30 socket_options=None +2025-05-30 13:44:55,972 - httpcore.connection - DEBUG - connect_tcp.complete return_value= +2025-05-30 13:44:55,972 - httpcore.connection - DEBUG - start_tls.started ssl_context= server_hostname='api.gradio.app' timeout=3 +2025-05-30 13:44:56,041 - httpcore.connection - DEBUG - connect_tcp.complete return_value= +2025-05-30 13:44:56,041 - httpcore.connection - DEBUG - start_tls.started ssl_context= server_hostname='api.gradio.app' timeout=30 +2025-05-30 13:44:56,151 - urllib3.connectionpool - DEBUG - https://huggingface.co:443 "HEAD /api/telemetry/gradio/initiated HTTP/1.1" 200 0 +2025-05-30 13:44:56,269 - httpcore.connection - DEBUG - start_tls.complete return_value= +2025-05-30 13:44:56,270 - httpcore.http11 - DEBUG - send_request_headers.started request= +2025-05-30 13:44:56,270 - httpcore.http11 - DEBUG - send_request_headers.complete +2025-05-30 13:44:56,270 - httpcore.http11 - DEBUG - send_request_body.started request= +2025-05-30 13:44:56,270 - httpcore.http11 - DEBUG - send_request_body.complete +2025-05-30 13:44:56,270 - httpcore.http11 - DEBUG - receive_response_headers.started request= +2025-05-30 13:44:56,339 - httpcore.connection - DEBUG - start_tls.complete return_value= +2025-05-30 13:44:56,340 - httpcore.http11 - DEBUG - send_request_headers.started request= +2025-05-30 13:44:56,340 - httpcore.http11 - DEBUG - send_request_headers.complete +2025-05-30 13:44:56,340 - httpcore.http11 - DEBUG - send_request_body.started request= +2025-05-30 13:44:56,340 - httpcore.http11 - DEBUG - send_request_body.complete +2025-05-30 13:44:56,340 - httpcore.http11 - DEBUG - receive_response_headers.started request= +2025-05-30 13:44:56,407 - httpcore.http11 - DEBUG - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Date', b'Fri, 30 May 2025 04:44:56 GMT'), (b'Content-Type', b'application/json'), (b'Content-Length', b'21'), (b'Connection', b'keep-alive'), (b'Server', b'nginx/1.18.0'), (b'Access-Control-Allow-Origin', b'*')]) +2025-05-30 13:44:56,408 - httpx - INFO - HTTP Request: GET https://api.gradio.app/pkg-version "HTTP/1.1 200 OK" +2025-05-30 13:44:56,408 - httpcore.http11 - DEBUG - receive_response_body.started request= +2025-05-30 13:44:56,409 - httpcore.http11 - DEBUG - receive_response_body.complete +2025-05-30 13:44:56,409 - httpcore.http11 - DEBUG - response_closed.started +2025-05-30 13:44:56,409 - httpcore.http11 - DEBUG - response_closed.complete +2025-05-30 13:44:56,409 - httpcore.connection - DEBUG - close.started +2025-05-30 13:44:56,410 - httpcore.connection - DEBUG - close.complete +2025-05-30 13:44:56,494 - httpcore.http11 - DEBUG - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Date', b'Fri, 30 May 2025 04:44:56 GMT'), (b'Content-Type', b'text/html; charset=utf-8'), (b'Transfer-Encoding', b'chunked'), (b'Connection', b'keep-alive'), (b'Server', b'nginx/1.18.0'), (b'ContentType', b'application/json'), (b'Access-Control-Allow-Origin', b'*'), (b'Content-Encoding', b'gzip')]) +2025-05-30 13:44:56,495 - httpx - INFO - HTTP Request: GET https://api.gradio.app/v3/tunnel-request "HTTP/1.1 200 OK" +2025-05-30 13:44:56,495 - httpcore.http11 - DEBUG - receive_response_body.started request= +2025-05-30 13:44:56,496 - httpcore.http11 - DEBUG - receive_response_body.complete +2025-05-30 13:44:56,496 - httpcore.http11 - DEBUG - response_closed.started +2025-05-30 13:44:56,496 - httpcore.http11 - DEBUG - response_closed.complete +2025-05-30 13:44:56,496 - httpcore.connection - DEBUG - close.started +2025-05-30 13:44:56,497 - httpcore.connection - DEBUG - close.complete +2025-05-30 13:44:56,673 - simple_memory_calculator - INFO - Getting memory requirements for model: black-forest-labs/FLUX.1-schnell +2025-05-30 13:44:56,673 - simple_memory_calculator - INFO - Using known memory data for black-forest-labs/FLUX.1-schnell +2025-05-30 13:44:56,673 - simple_memory_calculator - DEBUG - Known data: {'params_billions': 12.0, 'fp16_gb': 24.0, 'inference_fp16_gb': 36.0} +2025-05-30 13:44:56,674 - simple_memory_calculator - INFO - Generating memory recommendations for black-forest-labs/FLUX.1-schnell with 8.0GB VRAM +2025-05-30 13:44:56,674 - simple_memory_calculator - INFO - Getting memory requirements for model: black-forest-labs/FLUX.1-schnell +2025-05-30 13:44:56,674 - simple_memory_calculator - DEBUG - Using cached memory data for black-forest-labs/FLUX.1-schnell +2025-05-30 13:44:56,674 - simple_memory_calculator - DEBUG - Model memory: 24.0GB, Inference memory: 36.0GB +2025-05-30 13:44:56,674 - simple_memory_calculator - INFO - Getting memory requirements for model: black-forest-labs/FLUX.1-schnell +2025-05-30 13:44:56,674 - simple_memory_calculator - DEBUG - Using cached memory data for black-forest-labs/FLUX.1-schnell +2025-05-30 13:44:57,143 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): huggingface.co:443 +2025-05-30 13:44:57,362 - urllib3.connectionpool - DEBUG - https://huggingface.co:443 "HEAD /api/telemetry/gradio/launched HTTP/1.1" 200 0 +2025-05-30 13:44:59,518 - simple_memory_calculator - INFO - Getting memory requirements for model: black-forest-labs/FLUX.1-schnell +2025-05-30 13:44:59,518 - simple_memory_calculator - DEBUG - Using cached memory data for black-forest-labs/FLUX.1-schnell +2025-05-30 13:44:59,518 - simple_memory_calculator - INFO - Generating memory recommendations for black-forest-labs/FLUX.1-schnell with 8.0GB VRAM +2025-05-30 13:44:59,518 - simple_memory_calculator - INFO - Getting memory requirements for model: black-forest-labs/FLUX.1-schnell +2025-05-30 13:44:59,518 - simple_memory_calculator - DEBUG - Using cached memory data for black-forest-labs/FLUX.1-schnell +2025-05-30 13:44:59,519 - simple_memory_calculator - DEBUG - Model memory: 24.0GB, Inference memory: 36.0GB +2025-05-30 13:44:59,519 - simple_memory_calculator - INFO - Getting memory requirements for model: black-forest-labs/FLUX.1-schnell +2025-05-30 13:44:59,519 - simple_memory_calculator - DEBUG - Using cached memory data for black-forest-labs/FLUX.1-schnell +2025-05-30 13:45:01,606 - simple_memory_calculator - INFO - Getting memory requirements for model: black-forest-labs/FLUX.1-schnell +2025-05-30 13:45:01,606 - simple_memory_calculator - DEBUG - Using cached memory data for black-forest-labs/FLUX.1-schnell +2025-05-30 13:45:01,606 - simple_memory_calculator - INFO - Generating memory recommendations for black-forest-labs/FLUX.1-schnell with 8.0GB VRAM +2025-05-30 13:45:01,606 - simple_memory_calculator - INFO - Getting memory requirements for model: black-forest-labs/FLUX.1-schnell +2025-05-30 13:45:01,606 - simple_memory_calculator - DEBUG - Using cached memory data for black-forest-labs/FLUX.1-schnell +2025-05-30 13:45:01,606 - simple_memory_calculator - DEBUG - Model memory: 24.0GB, Inference memory: 36.0GB +2025-05-30 13:45:01,606 - simple_memory_calculator - INFO - Getting memory requirements for model: black-forest-labs/FLUX.1-schnell +2025-05-30 13:45:01,607 - simple_memory_calculator - DEBUG - Using cached memory data for black-forest-labs/FLUX.1-schnell +2025-05-30 13:45:56,869 - __main__ - INFO - Initializing GradioAutodiffusers +2025-05-30 13:45:56,869 - __main__ - DEBUG - API key found, length: 39 +2025-05-30 13:45:56,869 - auto_diffusers - INFO - Initializing AutoDiffusersGenerator +2025-05-30 13:45:56,869 - auto_diffusers - DEBUG - API key length: 39 +2025-05-30 13:45:56,869 - auto_diffusers - WARNING - Tool calling dependencies not available, running without tools +2025-05-30 13:45:56,869 - hardware_detector - INFO - Initializing HardwareDetector +2025-05-30 13:45:56,869 - hardware_detector - DEBUG - Starting system hardware detection +2025-05-30 13:45:56,869 - hardware_detector - DEBUG - Platform: Darwin, Architecture: arm64 +2025-05-30 13:45:56,869 - hardware_detector - DEBUG - CPU cores: 16, Python: 3.11.11 +2025-05-30 13:45:56,869 - hardware_detector - DEBUG - Attempting GPU detection via nvidia-smi +2025-05-30 13:45:56,874 - hardware_detector - DEBUG - nvidia-smi not found, no NVIDIA GPU detected +2025-05-30 13:45:56,878 - hardware_detector - DEBUG - Checking PyTorch availability +2025-05-30 13:45:57,334 - hardware_detector - INFO - PyTorch 2.7.0 detected +2025-05-30 13:45:57,334 - hardware_detector - DEBUG - CUDA available: False, MPS available: True +2025-05-30 13:45:57,334 - hardware_detector - INFO - Hardware detection completed successfully +2025-05-30 13:45:57,334 - hardware_detector - DEBUG - Detected specs: {'platform': 'Darwin', 'architecture': 'arm64', 'cpu_count': 16, 'python_version': '3.11.11', 'gpu_info': None, 'cuda_available': False, 'mps_available': True, 'torch_version': '2.7.0'} +2025-05-30 13:45:57,334 - auto_diffusers - INFO - Hardware detector initialized successfully +2025-05-30 13:45:57,334 - __main__ - INFO - AutoDiffusersGenerator initialized successfully +2025-05-30 13:45:57,334 - simple_memory_calculator - INFO - Initializing SimpleMemoryCalculator +2025-05-30 13:45:57,334 - simple_memory_calculator - DEBUG - HuggingFace API initialized +2025-05-30 13:45:57,335 - simple_memory_calculator - DEBUG - Known models in database: 4 +2025-05-30 13:45:57,335 - __main__ - INFO - SimpleMemoryCalculator initialized successfully +2025-05-30 13:45:57,335 - __main__ - DEBUG - Default model settings: gemini-2.5-flash-preview-05-20, temp=0.7 +2025-05-30 13:45:57,337 - asyncio - DEBUG - Using selector: KqueueSelector +2025-05-30 13:45:57,350 - httpcore.connection - DEBUG - connect_tcp.started host='api.gradio.app' port=443 local_address=None timeout=3 socket_options=None +2025-05-30 13:45:57,357 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): huggingface.co:443 +2025-05-30 13:45:57,438 - asyncio - DEBUG - Using selector: KqueueSelector +2025-05-30 13:45:57,471 - httpcore.connection - DEBUG - connect_tcp.started host='localhost' port=7860 local_address=None timeout=None socket_options=None +2025-05-30 13:45:57,471 - httpcore.connection - DEBUG - connect_tcp.complete return_value= +2025-05-30 13:45:57,471 - httpcore.http11 - DEBUG - send_request_headers.started request= +2025-05-30 13:45:57,471 - httpcore.http11 - DEBUG - send_request_headers.complete +2025-05-30 13:45:57,472 - httpcore.http11 - DEBUG - send_request_body.started request= +2025-05-30 13:45:57,472 - httpcore.http11 - DEBUG - send_request_body.complete +2025-05-30 13:45:57,472 - httpcore.http11 - DEBUG - receive_response_headers.started request= +2025-05-30 13:45:57,472 - httpcore.http11 - DEBUG - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'date', b'Fri, 30 May 2025 04:45:57 GMT'), (b'server', b'uvicorn'), (b'content-length', b'4'), (b'content-type', b'application/json')]) +2025-05-30 13:45:57,472 - httpx - INFO - HTTP Request: GET http://localhost:7860/gradio_api/startup-events "HTTP/1.1 200 OK" +2025-05-30 13:45:57,472 - httpcore.http11 - DEBUG - receive_response_body.started request= +2025-05-30 13:45:57,472 - httpcore.http11 - DEBUG - receive_response_body.complete +2025-05-30 13:45:57,472 - httpcore.http11 - DEBUG - response_closed.started +2025-05-30 13:45:57,472 - httpcore.http11 - DEBUG - response_closed.complete +2025-05-30 13:45:57,472 - httpcore.connection - DEBUG - close.started +2025-05-30 13:45:57,472 - httpcore.connection - DEBUG - close.complete +2025-05-30 13:45:57,473 - httpcore.connection - DEBUG - connect_tcp.started host='localhost' port=7860 local_address=None timeout=3 socket_options=None +2025-05-30 13:45:57,473 - httpcore.connection - DEBUG - connect_tcp.complete return_value= +2025-05-30 13:45:57,473 - httpcore.http11 - DEBUG - send_request_headers.started request= +2025-05-30 13:45:57,473 - httpcore.http11 - DEBUG - send_request_headers.complete +2025-05-30 13:45:57,473 - httpcore.http11 - DEBUG - send_request_body.started request= +2025-05-30 13:45:57,473 - httpcore.http11 - DEBUG - send_request_body.complete +2025-05-30 13:45:57,473 - httpcore.http11 - DEBUG - receive_response_headers.started request= +2025-05-30 13:45:57,480 - httpcore.http11 - DEBUG - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'date', b'Fri, 30 May 2025 04:45:57 GMT'), (b'server', b'uvicorn'), (b'content-length', b'109702'), (b'content-type', b'text/html; charset=utf-8')]) +2025-05-30 13:45:57,480 - httpx - INFO - HTTP Request: HEAD http://localhost:7860/ "HTTP/1.1 200 OK" +2025-05-30 13:45:57,480 - httpcore.http11 - DEBUG - receive_response_body.started request= +2025-05-30 13:45:57,480 - httpcore.http11 - DEBUG - receive_response_body.complete +2025-05-30 13:45:57,480 - httpcore.http11 - DEBUG - response_closed.started +2025-05-30 13:45:57,480 - httpcore.http11 - DEBUG - response_closed.complete +2025-05-30 13:45:57,480 - httpcore.connection - DEBUG - close.started +2025-05-30 13:45:57,480 - httpcore.connection - DEBUG - close.complete +2025-05-30 13:45:57,492 - httpcore.connection - DEBUG - connect_tcp.started host='api.gradio.app' port=443 local_address=None timeout=30 socket_options=None +2025-05-30 13:45:57,508 - httpcore.connection - DEBUG - connect_tcp.complete return_value= +2025-05-30 13:45:57,508 - httpcore.connection - DEBUG - start_tls.started ssl_context= server_hostname='api.gradio.app' timeout=3 +2025-05-30 13:45:57,627 - httpcore.connection - DEBUG - connect_tcp.complete return_value= +2025-05-30 13:45:57,627 - urllib3.connectionpool - DEBUG - https://huggingface.co:443 "HEAD /api/telemetry/gradio/initiated HTTP/1.1" 200 0 +2025-05-30 13:45:57,628 - httpcore.connection - DEBUG - start_tls.started ssl_context= server_hostname='api.gradio.app' timeout=30 +2025-05-30 13:45:57,809 - httpcore.connection - DEBUG - start_tls.complete return_value= +2025-05-30 13:45:57,809 - httpcore.http11 - DEBUG - send_request_headers.started request= +2025-05-30 13:45:57,811 - httpcore.http11 - DEBUG - send_request_headers.complete +2025-05-30 13:45:57,811 - httpcore.http11 - DEBUG - send_request_body.started request= +2025-05-30 13:45:57,811 - httpcore.http11 - DEBUG - send_request_body.complete +2025-05-30 13:45:57,811 - httpcore.http11 - DEBUG - receive_response_headers.started request= +2025-05-30 13:45:57,899 - httpcore.connection - DEBUG - start_tls.complete return_value= +2025-05-30 13:45:57,899 - httpcore.http11 - DEBUG - send_request_headers.started request= +2025-05-30 13:45:57,900 - httpcore.http11 - DEBUG - send_request_headers.complete +2025-05-30 13:45:57,900 - httpcore.http11 - DEBUG - send_request_body.started request= +2025-05-30 13:45:57,900 - httpcore.http11 - DEBUG - send_request_body.complete +2025-05-30 13:45:57,900 - httpcore.http11 - DEBUG - receive_response_headers.started request= +2025-05-30 13:45:57,960 - httpcore.http11 - DEBUG - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Date', b'Fri, 30 May 2025 04:45:57 GMT'), (b'Content-Type', b'application/json'), (b'Content-Length', b'21'), (b'Connection', b'keep-alive'), (b'Server', b'nginx/1.18.0'), (b'Access-Control-Allow-Origin', b'*')]) +2025-05-30 13:45:57,961 - httpx - INFO - HTTP Request: GET https://api.gradio.app/pkg-version "HTTP/1.1 200 OK" +2025-05-30 13:45:57,961 - httpcore.http11 - DEBUG - receive_response_body.started request= +2025-05-30 13:45:57,961 - httpcore.http11 - DEBUG - receive_response_body.complete +2025-05-30 13:45:57,961 - httpcore.http11 - DEBUG - response_closed.started +2025-05-30 13:45:57,961 - httpcore.http11 - DEBUG - response_closed.complete +2025-05-30 13:45:57,961 - httpcore.connection - DEBUG - close.started +2025-05-30 13:45:57,961 - httpcore.connection - DEBUG - close.complete +2025-05-30 13:45:58,039 - httpcore.http11 - DEBUG - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Date', b'Fri, 30 May 2025 04:45:57 GMT'), (b'Content-Type', b'text/html; charset=utf-8'), (b'Transfer-Encoding', b'chunked'), (b'Connection', b'keep-alive'), (b'Server', b'nginx/1.18.0'), (b'ContentType', b'application/json'), (b'Access-Control-Allow-Origin', b'*'), (b'Content-Encoding', b'gzip')]) +2025-05-30 13:45:58,040 - httpx - INFO - HTTP Request: GET https://api.gradio.app/v3/tunnel-request "HTTP/1.1 200 OK" +2025-05-30 13:45:58,040 - httpcore.http11 - DEBUG - receive_response_body.started request= +2025-05-30 13:45:58,041 - httpcore.http11 - DEBUG - receive_response_body.complete +2025-05-30 13:45:58,041 - httpcore.http11 - DEBUG - response_closed.started +2025-05-30 13:45:58,041 - httpcore.http11 - DEBUG - response_closed.complete +2025-05-30 13:45:58,041 - httpcore.connection - DEBUG - close.started +2025-05-30 13:45:58,041 - httpcore.connection - DEBUG - close.complete +2025-05-30 13:45:58,234 - simple_memory_calculator - INFO - Getting memory requirements for model: black-forest-labs/FLUX.1-schnell +2025-05-30 13:45:58,234 - simple_memory_calculator - INFO - Using known memory data for black-forest-labs/FLUX.1-schnell +2025-05-30 13:45:58,234 - simple_memory_calculator - DEBUG - Known data: {'params_billions': 12.0, 'fp16_gb': 24.0, 'inference_fp16_gb': 36.0} +2025-05-30 13:45:58,234 - simple_memory_calculator - INFO - Generating memory recommendations for black-forest-labs/FLUX.1-schnell with 8.0GB VRAM +2025-05-30 13:45:58,234 - simple_memory_calculator - INFO - Getting memory requirements for model: black-forest-labs/FLUX.1-schnell +2025-05-30 13:45:58,234 - simple_memory_calculator - DEBUG - Using cached memory data for black-forest-labs/FLUX.1-schnell +2025-05-30 13:45:58,234 - simple_memory_calculator - DEBUG - Model memory: 24.0GB, Inference memory: 36.0GB +2025-05-30 13:45:58,234 - simple_memory_calculator - INFO - Getting memory requirements for model: black-forest-labs/FLUX.1-schnell +2025-05-30 13:45:58,234 - simple_memory_calculator - DEBUG - Using cached memory data for black-forest-labs/FLUX.1-schnell +2025-05-30 13:45:58,620 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): huggingface.co:443 +2025-05-30 13:45:58,836 - urllib3.connectionpool - DEBUG - https://huggingface.co:443 "HEAD /api/telemetry/gradio/launched HTTP/1.1" 200 0 +2025-05-30 13:47:21,071 - __main__ - INFO - Initializing GradioAutodiffusers +2025-05-30 13:47:21,071 - __main__ - DEBUG - API key found, length: 39 +2025-05-30 13:47:21,071 - auto_diffusers - INFO - Initializing AutoDiffusersGenerator +2025-05-30 13:47:21,071 - auto_diffusers - DEBUG - API key length: 39 +2025-05-30 13:47:21,071 - auto_diffusers - WARNING - Tool calling dependencies not available, running without tools +2025-05-30 13:47:21,071 - hardware_detector - INFO - Initializing HardwareDetector +2025-05-30 13:47:21,071 - hardware_detector - DEBUG - Starting system hardware detection +2025-05-30 13:47:21,071 - hardware_detector - DEBUG - Platform: Darwin, Architecture: arm64 +2025-05-30 13:47:21,071 - hardware_detector - DEBUG - CPU cores: 16, Python: 3.11.11 +2025-05-30 13:47:21,071 - hardware_detector - DEBUG - Attempting GPU detection via nvidia-smi +2025-05-30 13:47:21,075 - hardware_detector - DEBUG - nvidia-smi not found, no NVIDIA GPU detected +2025-05-30 13:47:21,075 - hardware_detector - DEBUG - Checking PyTorch availability +2025-05-30 13:47:21,534 - hardware_detector - INFO - PyTorch 2.7.0 detected +2025-05-30 13:47:21,534 - hardware_detector - DEBUG - CUDA available: False, MPS available: True +2025-05-30 13:47:21,534 - hardware_detector - INFO - Hardware detection completed successfully +2025-05-30 13:47:21,534 - hardware_detector - DEBUG - Detected specs: {'platform': 'Darwin', 'architecture': 'arm64', 'cpu_count': 16, 'python_version': '3.11.11', 'gpu_info': None, 'cuda_available': False, 'mps_available': True, 'torch_version': '2.7.0'} +2025-05-30 13:47:21,534 - auto_diffusers - INFO - Hardware detector initialized successfully +2025-05-30 13:47:21,534 - __main__ - INFO - AutoDiffusersGenerator initialized successfully +2025-05-30 13:47:21,534 - simple_memory_calculator - INFO - Initializing SimpleMemoryCalculator +2025-05-30 13:47:21,534 - simple_memory_calculator - DEBUG - HuggingFace API initialized +2025-05-30 13:47:21,534 - simple_memory_calculator - DEBUG - Known models in database: 4 +2025-05-30 13:47:21,534 - __main__ - INFO - SimpleMemoryCalculator initialized successfully +2025-05-30 13:47:21,534 - __main__ - DEBUG - Default model settings: gemini-2.5-flash-preview-05-20, temp=0.7 +2025-05-30 13:47:21,536 - asyncio - DEBUG - Using selector: KqueueSelector +2025-05-30 13:47:21,549 - httpcore.connection - DEBUG - connect_tcp.started host='api.gradio.app' port=443 local_address=None timeout=3 socket_options=None +2025-05-30 13:47:21,557 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): huggingface.co:443 +2025-05-30 13:47:21,648 - asyncio - DEBUG - Using selector: KqueueSelector +2025-05-30 13:47:21,681 - httpcore.connection - DEBUG - connect_tcp.started host='localhost' port=7860 local_address=None timeout=None socket_options=None +2025-05-30 13:47:21,682 - httpcore.connection - DEBUG - connect_tcp.complete return_value= +2025-05-30 13:47:21,682 - httpcore.http11 - DEBUG - send_request_headers.started request= +2025-05-30 13:47:21,682 - httpcore.http11 - DEBUG - send_request_headers.complete +2025-05-30 13:47:21,682 - httpcore.http11 - DEBUG - send_request_body.started request= +2025-05-30 13:47:21,682 - httpcore.http11 - DEBUG - send_request_body.complete +2025-05-30 13:47:21,682 - httpcore.http11 - DEBUG - receive_response_headers.started request= +2025-05-30 13:47:21,683 - httpcore.http11 - DEBUG - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'date', b'Fri, 30 May 2025 04:47:21 GMT'), (b'server', b'uvicorn'), (b'content-length', b'4'), (b'content-type', b'application/json')]) +2025-05-30 13:47:21,683 - httpx - INFO - HTTP Request: GET http://localhost:7860/gradio_api/startup-events "HTTP/1.1 200 OK" +2025-05-30 13:47:21,683 - httpcore.http11 - DEBUG - receive_response_body.started request= +2025-05-30 13:47:21,683 - httpcore.http11 - DEBUG - receive_response_body.complete +2025-05-30 13:47:21,683 - httpcore.http11 - DEBUG - response_closed.started +2025-05-30 13:47:21,683 - httpcore.http11 - DEBUG - response_closed.complete +2025-05-30 13:47:21,683 - httpcore.connection - DEBUG - close.started +2025-05-30 13:47:21,683 - httpcore.connection - DEBUG - close.complete +2025-05-30 13:47:21,683 - httpcore.connection - DEBUG - connect_tcp.started host='localhost' port=7860 local_address=None timeout=3 socket_options=None +2025-05-30 13:47:21,684 - httpcore.connection - DEBUG - connect_tcp.complete return_value= +2025-05-30 13:47:21,684 - httpcore.http11 - DEBUG - send_request_headers.started request= +2025-05-30 13:47:21,684 - httpcore.http11 - DEBUG - send_request_headers.complete +2025-05-30 13:47:21,684 - httpcore.http11 - DEBUG - send_request_body.started request= +2025-05-30 13:47:21,684 - httpcore.http11 - DEBUG - send_request_body.complete +2025-05-30 13:47:21,685 - httpcore.http11 - DEBUG - receive_response_headers.started request= +2025-05-30 13:47:21,691 - httpcore.http11 - DEBUG - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'date', b'Fri, 30 May 2025 04:47:21 GMT'), (b'server', b'uvicorn'), (b'content-length', b'109853'), (b'content-type', b'text/html; charset=utf-8')]) +2025-05-30 13:47:21,691 - httpx - INFO - HTTP Request: HEAD http://localhost:7860/ "HTTP/1.1 200 OK" +2025-05-30 13:47:21,691 - httpcore.http11 - DEBUG - receive_response_body.started request= +2025-05-30 13:47:21,691 - httpcore.http11 - DEBUG - receive_response_body.complete +2025-05-30 13:47:21,691 - httpcore.http11 - DEBUG - response_closed.started +2025-05-30 13:47:21,691 - httpcore.http11 - DEBUG - response_closed.complete +2025-05-30 13:47:21,691 - httpcore.connection - DEBUG - close.started +2025-05-30 13:47:21,691 - httpcore.connection - DEBUG - close.complete +2025-05-30 13:47:21,703 - httpcore.connection - DEBUG - connect_tcp.started host='api.gradio.app' port=443 local_address=None timeout=30 socket_options=None +2025-05-30 13:47:21,806 - httpcore.connection - DEBUG - connect_tcp.complete return_value= +2025-05-30 13:47:21,807 - httpcore.connection - DEBUG - start_tls.started ssl_context= server_hostname='api.gradio.app' timeout=3 +2025-05-30 13:47:21,839 - httpcore.connection - DEBUG - connect_tcp.complete return_value= +2025-05-30 13:47:21,839 - httpcore.connection - DEBUG - start_tls.started ssl_context= server_hostname='api.gradio.app' timeout=30 +2025-05-30 13:47:21,847 - urllib3.connectionpool - DEBUG - https://huggingface.co:443 "HEAD /api/telemetry/gradio/initiated HTTP/1.1" 200 0 +2025-05-30 13:47:22,099 - httpcore.connection - DEBUG - start_tls.complete return_value= +2025-05-30 13:47:22,100 - httpcore.http11 - DEBUG - send_request_headers.started request= +2025-05-30 13:47:22,100 - httpcore.http11 - DEBUG - send_request_headers.complete +2025-05-30 13:47:22,100 - httpcore.http11 - DEBUG - send_request_body.started request= +2025-05-30 13:47:22,100 - httpcore.http11 - DEBUG - send_request_body.complete +2025-05-30 13:47:22,100 - httpcore.http11 - DEBUG - receive_response_headers.started request= +2025-05-30 13:47:22,111 - httpcore.connection - DEBUG - start_tls.complete return_value= +2025-05-30 13:47:22,112 - httpcore.http11 - DEBUG - send_request_headers.started request= +2025-05-30 13:47:22,112 - httpcore.http11 - DEBUG - send_request_headers.complete +2025-05-30 13:47:22,112 - httpcore.http11 - DEBUG - send_request_body.started request= +2025-05-30 13:47:22,112 - httpcore.http11 - DEBUG - send_request_body.complete +2025-05-30 13:47:22,112 - httpcore.http11 - DEBUG - receive_response_headers.started request= +2025-05-30 13:47:22,249 - httpcore.http11 - DEBUG - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Date', b'Fri, 30 May 2025 04:47:22 GMT'), (b'Content-Type', b'application/json'), (b'Content-Length', b'21'), (b'Connection', b'keep-alive'), (b'Server', b'nginx/1.18.0'), (b'Access-Control-Allow-Origin', b'*')]) +2025-05-30 13:47:22,250 - httpx - INFO - HTTP Request: GET https://api.gradio.app/pkg-version "HTTP/1.1 200 OK" +2025-05-30 13:47:22,250 - httpcore.http11 - DEBUG - receive_response_body.started request= +2025-05-30 13:47:22,250 - httpcore.http11 - DEBUG - receive_response_body.complete +2025-05-30 13:47:22,251 - httpcore.http11 - DEBUG - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Date', b'Fri, 30 May 2025 04:47:22 GMT'), (b'Content-Type', b'text/html; charset=utf-8'), (b'Transfer-Encoding', b'chunked'), (b'Connection', b'keep-alive'), (b'Server', b'nginx/1.18.0'), (b'ContentType', b'application/json'), (b'Access-Control-Allow-Origin', b'*'), (b'Content-Encoding', b'gzip')]) +2025-05-30 13:47:22,251 - httpcore.http11 - DEBUG - response_closed.started +2025-05-30 13:47:22,251 - httpx - INFO - HTTP Request: GET https://api.gradio.app/v3/tunnel-request "HTTP/1.1 200 OK" +2025-05-30 13:47:22,251 - httpcore.http11 - DEBUG - response_closed.complete +2025-05-30 13:47:22,252 - httpcore.http11 - DEBUG - receive_response_body.started request= +2025-05-30 13:47:22,252 - httpcore.connection - DEBUG - close.started +2025-05-30 13:47:22,252 - httpcore.http11 - DEBUG - receive_response_body.complete +2025-05-30 13:47:22,252 - httpcore.connection - DEBUG - close.complete +2025-05-30 13:47:22,253 - httpcore.http11 - DEBUG - response_closed.started +2025-05-30 13:47:22,253 - httpcore.http11 - DEBUG - response_closed.complete +2025-05-30 13:47:22,253 - httpcore.connection - DEBUG - close.started +2025-05-30 13:47:22,253 - httpcore.connection - DEBUG - close.complete +2025-05-30 13:47:22,861 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): huggingface.co:443 +2025-05-30 13:47:23,077 - urllib3.connectionpool - DEBUG - https://huggingface.co:443 "HEAD /api/telemetry/gradio/launched HTTP/1.1" 200 0 +2025-05-30 13:47:23,099 - simple_memory_calculator - INFO - Getting memory requirements for model: black-forest-labs/FLUX.1-schnell +2025-05-30 13:47:23,100 - simple_memory_calculator - INFO - Using known memory data for black-forest-labs/FLUX.1-schnell +2025-05-30 13:47:23,100 - simple_memory_calculator - DEBUG - Known data: {'params_billions': 12.0, 'fp16_gb': 24.0, 'inference_fp16_gb': 36.0} +2025-05-30 13:47:23,100 - simple_memory_calculator - INFO - Generating memory recommendations for black-forest-labs/FLUX.1-schnell with 8.0GB VRAM +2025-05-30 13:47:23,100 - simple_memory_calculator - INFO - Getting memory requirements for model: black-forest-labs/FLUX.1-schnell +2025-05-30 13:47:23,100 - simple_memory_calculator - DEBUG - Using cached memory data for black-forest-labs/FLUX.1-schnell +2025-05-30 13:47:23,100 - simple_memory_calculator - DEBUG - Model memory: 24.0GB, Inference memory: 36.0GB +2025-05-30 13:47:23,100 - simple_memory_calculator - INFO - Getting memory requirements for model: black-forest-labs/FLUX.1-schnell +2025-05-30 13:47:23,100 - simple_memory_calculator - DEBUG - Using cached memory data for black-forest-labs/FLUX.1-schnell +2025-05-30 13:48:19,454 - __main__ - INFO - Initializing GradioAutodiffusers +2025-05-30 13:48:19,454 - __main__ - DEBUG - API key found, length: 39 +2025-05-30 13:48:19,454 - auto_diffusers - INFO - Initializing AutoDiffusersGenerator +2025-05-30 13:48:19,454 - auto_diffusers - DEBUG - API key length: 39 +2025-05-30 13:48:19,454 - auto_diffusers - WARNING - Tool calling dependencies not available, running without tools +2025-05-30 13:48:19,454 - hardware_detector - INFO - Initializing HardwareDetector +2025-05-30 13:48:19,454 - hardware_detector - DEBUG - Starting system hardware detection +2025-05-30 13:48:19,454 - hardware_detector - DEBUG - Platform: Darwin, Architecture: arm64 +2025-05-30 13:48:19,454 - hardware_detector - DEBUG - CPU cores: 16, Python: 3.11.11 +2025-05-30 13:48:19,454 - hardware_detector - DEBUG - Attempting GPU detection via nvidia-smi +2025-05-30 13:48:19,457 - hardware_detector - DEBUG - nvidia-smi not found, no NVIDIA GPU detected +2025-05-30 13:48:19,457 - hardware_detector - DEBUG - Checking PyTorch availability +2025-05-30 13:48:19,918 - hardware_detector - INFO - PyTorch 2.7.0 detected +2025-05-30 13:48:19,918 - hardware_detector - DEBUG - CUDA available: False, MPS available: True +2025-05-30 13:48:19,918 - hardware_detector - INFO - Hardware detection completed successfully +2025-05-30 13:48:19,918 - hardware_detector - DEBUG - Detected specs: {'platform': 'Darwin', 'architecture': 'arm64', 'cpu_count': 16, 'python_version': '3.11.11', 'gpu_info': None, 'cuda_available': False, 'mps_available': True, 'torch_version': '2.7.0'} +2025-05-30 13:48:19,918 - auto_diffusers - INFO - Hardware detector initialized successfully +2025-05-30 13:48:19,918 - __main__ - INFO - AutoDiffusersGenerator initialized successfully +2025-05-30 13:48:19,918 - simple_memory_calculator - INFO - Initializing SimpleMemoryCalculator +2025-05-30 13:48:19,918 - simple_memory_calculator - DEBUG - HuggingFace API initialized +2025-05-30 13:48:19,918 - simple_memory_calculator - DEBUG - Known models in database: 4 +2025-05-30 13:48:19,918 - __main__ - INFO - SimpleMemoryCalculator initialized successfully +2025-05-30 13:48:19,918 - __main__ - DEBUG - Default model settings: gemini-2.5-flash-preview-05-20, temp=0.7 +2025-05-30 13:48:19,921 - asyncio - DEBUG - Using selector: KqueueSelector +2025-05-30 13:48:19,934 - httpcore.connection - DEBUG - connect_tcp.started host='api.gradio.app' port=443 local_address=None timeout=3 socket_options=None +2025-05-30 13:48:19,942 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): huggingface.co:443 +2025-05-30 13:48:20,025 - asyncio - DEBUG - Using selector: KqueueSelector +2025-05-30 13:48:20,056 - httpcore.connection - DEBUG - connect_tcp.started host='localhost' port=7860 local_address=None timeout=None socket_options=None +2025-05-30 13:48:20,057 - httpcore.connection - DEBUG - connect_tcp.complete return_value= +2025-05-30 13:48:20,057 - httpcore.http11 - DEBUG - send_request_headers.started request= +2025-05-30 13:48:20,057 - httpcore.http11 - DEBUG - send_request_headers.complete +2025-05-30 13:48:20,057 - httpcore.http11 - DEBUG - send_request_body.started request= +2025-05-30 13:48:20,057 - httpcore.http11 - DEBUG - send_request_body.complete +2025-05-30 13:48:20,058 - httpcore.http11 - DEBUG - receive_response_headers.started request= +2025-05-30 13:48:20,058 - httpcore.http11 - DEBUG - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'date', b'Fri, 30 May 2025 04:48:20 GMT'), (b'server', b'uvicorn'), (b'content-length', b'4'), (b'content-type', b'application/json')]) +2025-05-30 13:48:20,058 - httpx - INFO - HTTP Request: GET http://localhost:7860/gradio_api/startup-events "HTTP/1.1 200 OK" +2025-05-30 13:48:20,058 - httpcore.http11 - DEBUG - receive_response_body.started request= +2025-05-30 13:48:20,058 - httpcore.http11 - DEBUG - receive_response_body.complete +2025-05-30 13:48:20,058 - httpcore.http11 - DEBUG - response_closed.started +2025-05-30 13:48:20,058 - httpcore.http11 - DEBUG - response_closed.complete +2025-05-30 13:48:20,058 - httpcore.connection - DEBUG - close.started +2025-05-30 13:48:20,058 - httpcore.connection - DEBUG - close.complete +2025-05-30 13:48:20,059 - httpcore.connection - DEBUG - connect_tcp.started host='localhost' port=7860 local_address=None timeout=3 socket_options=None +2025-05-30 13:48:20,059 - httpcore.connection - DEBUG - connect_tcp.complete return_value= +2025-05-30 13:48:20,059 - httpcore.http11 - DEBUG - send_request_headers.started request= +2025-05-30 13:48:20,059 - httpcore.http11 - DEBUG - send_request_headers.complete +2025-05-30 13:48:20,059 - httpcore.http11 - DEBUG - send_request_body.started request= +2025-05-30 13:48:20,059 - httpcore.http11 - DEBUG - send_request_body.complete +2025-05-30 13:48:20,059 - httpcore.http11 - DEBUG - receive_response_headers.started request= +2025-05-30 13:48:20,065 - httpcore.http11 - DEBUG - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'date', b'Fri, 30 May 2025 04:48:20 GMT'), (b'server', b'uvicorn'), (b'content-length', b'109835'), (b'content-type', b'text/html; charset=utf-8')]) +2025-05-30 13:48:20,066 - httpx - INFO - HTTP Request: HEAD http://localhost:7860/ "HTTP/1.1 200 OK" +2025-05-30 13:48:20,066 - httpcore.http11 - DEBUG - receive_response_body.started request= +2025-05-30 13:48:20,066 - httpcore.http11 - DEBUG - receive_response_body.complete +2025-05-30 13:48:20,066 - httpcore.http11 - DEBUG - response_closed.started +2025-05-30 13:48:20,066 - httpcore.http11 - DEBUG - response_closed.complete +2025-05-30 13:48:20,066 - httpcore.connection - DEBUG - close.started +2025-05-30 13:48:20,066 - httpcore.connection - DEBUG - close.complete +2025-05-30 13:48:20,077 - httpcore.connection - DEBUG - connect_tcp.started host='api.gradio.app' port=443 local_address=None timeout=30 socket_options=None +2025-05-30 13:48:20,081 - httpcore.connection - DEBUG - connect_tcp.complete return_value= +2025-05-30 13:48:20,081 - httpcore.connection - DEBUG - start_tls.started ssl_context= server_hostname='api.gradio.app' timeout=3 +2025-05-30 13:48:20,201 - urllib3.connectionpool - DEBUG - https://huggingface.co:443 "HEAD /api/telemetry/gradio/initiated HTTP/1.1" 200 0 +2025-05-30 13:48:20,234 - httpcore.connection - DEBUG - connect_tcp.complete return_value= +2025-05-30 13:48:20,234 - httpcore.connection - DEBUG - start_tls.started ssl_context= server_hostname='api.gradio.app' timeout=30 +2025-05-30 13:48:20,357 - httpcore.connection - DEBUG - start_tls.complete return_value= +2025-05-30 13:48:20,357 - httpcore.http11 - DEBUG - send_request_headers.started request= +2025-05-30 13:48:20,358 - httpcore.http11 - DEBUG - send_request_headers.complete +2025-05-30 13:48:20,358 - httpcore.http11 - DEBUG - send_request_body.started request= +2025-05-30 13:48:20,358 - httpcore.http11 - DEBUG - send_request_body.complete +2025-05-30 13:48:20,359 - httpcore.http11 - DEBUG - receive_response_headers.started request= +2025-05-30 13:48:20,496 - httpcore.http11 - DEBUG - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Date', b'Fri, 30 May 2025 04:48:20 GMT'), (b'Content-Type', b'application/json'), (b'Content-Length', b'21'), (b'Connection', b'keep-alive'), (b'Server', b'nginx/1.18.0'), (b'Access-Control-Allow-Origin', b'*')]) +2025-05-30 13:48:20,497 - httpx - INFO - HTTP Request: GET https://api.gradio.app/pkg-version "HTTP/1.1 200 OK" +2025-05-30 13:48:20,497 - httpcore.http11 - DEBUG - receive_response_body.started request= +2025-05-30 13:48:20,497 - httpcore.http11 - DEBUG - receive_response_body.complete +2025-05-30 13:48:20,497 - httpcore.http11 - DEBUG - response_closed.started +2025-05-30 13:48:20,497 - httpcore.http11 - DEBUG - response_closed.complete +2025-05-30 13:48:20,497 - httpcore.connection - DEBUG - close.started +2025-05-30 13:48:20,498 - httpcore.connection - DEBUG - close.complete +2025-05-30 13:48:20,552 - httpcore.connection - DEBUG - start_tls.complete return_value= +2025-05-30 13:48:20,552 - httpcore.http11 - DEBUG - send_request_headers.started request= +2025-05-30 13:48:20,552 - httpcore.http11 - DEBUG - send_request_headers.complete +2025-05-30 13:48:20,553 - httpcore.http11 - DEBUG - send_request_body.started request= +2025-05-30 13:48:20,553 - httpcore.http11 - DEBUG - send_request_body.complete +2025-05-30 13:48:20,553 - httpcore.http11 - DEBUG - receive_response_headers.started request= +2025-05-30 13:48:20,665 - simple_memory_calculator - INFO - Getting memory requirements for model: black-forest-labs/FLUX.1-schnell +2025-05-30 13:48:20,665 - simple_memory_calculator - INFO - Using known memory data for black-forest-labs/FLUX.1-schnell +2025-05-30 13:48:20,665 - simple_memory_calculator - DEBUG - Known data: {'params_billions': 12.0, 'fp16_gb': 24.0, 'inference_fp16_gb': 36.0} +2025-05-30 13:48:20,665 - simple_memory_calculator - INFO - Generating memory recommendations for black-forest-labs/FLUX.1-schnell with 8.0GB VRAM +2025-05-30 13:48:20,665 - simple_memory_calculator - INFO - Getting memory requirements for model: black-forest-labs/FLUX.1-schnell +2025-05-30 13:48:20,665 - simple_memory_calculator - DEBUG - Using cached memory data for black-forest-labs/FLUX.1-schnell +2025-05-30 13:48:20,665 - simple_memory_calculator - DEBUG - Model memory: 24.0GB, Inference memory: 36.0GB +2025-05-30 13:48:20,665 - simple_memory_calculator - INFO - Getting memory requirements for model: black-forest-labs/FLUX.1-schnell +2025-05-30 13:48:20,665 - simple_memory_calculator - DEBUG - Using cached memory data for black-forest-labs/FLUX.1-schnell +2025-05-30 13:48:20,736 - httpcore.http11 - DEBUG - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Date', b'Fri, 30 May 2025 04:48:20 GMT'), (b'Content-Type', b'text/html; charset=utf-8'), (b'Transfer-Encoding', b'chunked'), (b'Connection', b'keep-alive'), (b'Server', b'nginx/1.18.0'), (b'ContentType', b'application/json'), (b'Access-Control-Allow-Origin', b'*'), (b'Content-Encoding', b'gzip')]) +2025-05-30 13:48:20,736 - httpx - INFO - HTTP Request: GET https://api.gradio.app/v3/tunnel-request "HTTP/1.1 200 OK" +2025-05-30 13:48:20,737 - httpcore.http11 - DEBUG - receive_response_body.started request= +2025-05-30 13:48:20,737 - httpcore.http11 - DEBUG - receive_response_body.complete +2025-05-30 13:48:20,737 - httpcore.http11 - DEBUG - response_closed.started +2025-05-30 13:48:20,737 - httpcore.http11 - DEBUG - response_closed.complete +2025-05-30 13:48:20,737 - httpcore.connection - DEBUG - close.started +2025-05-30 13:48:20,737 - httpcore.connection - DEBUG - close.complete +2025-05-30 13:48:21,392 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): huggingface.co:443 +2025-05-30 13:48:21,613 - urllib3.connectionpool - DEBUG - https://huggingface.co:443 "HEAD /api/telemetry/gradio/launched HTTP/1.1" 200 0 +2025-05-30 13:50:31,681 - __main__ - INFO - Initializing GradioAutodiffusers +2025-05-30 13:50:31,681 - __main__ - DEBUG - API key found, length: 39 +2025-05-30 13:50:31,681 - auto_diffusers - INFO - Initializing AutoDiffusersGenerator +2025-05-30 13:50:31,681 - auto_diffusers - DEBUG - API key length: 39 +2025-05-30 13:50:31,681 - auto_diffusers - WARNING - Tool calling dependencies not available, running without tools +2025-05-30 13:50:31,681 - hardware_detector - INFO - Initializing HardwareDetector +2025-05-30 13:50:31,681 - hardware_detector - DEBUG - Starting system hardware detection +2025-05-30 13:50:31,681 - hardware_detector - DEBUG - Platform: Darwin, Architecture: arm64 +2025-05-30 13:50:31,681 - hardware_detector - DEBUG - CPU cores: 16, Python: 3.11.11 +2025-05-30 13:50:31,681 - hardware_detector - DEBUG - Attempting GPU detection via nvidia-smi +2025-05-30 13:50:31,685 - hardware_detector - DEBUG - nvidia-smi not found, no NVIDIA GPU detected +2025-05-30 13:50:31,685 - hardware_detector - DEBUG - Checking PyTorch availability +2025-05-30 13:50:32,182 - hardware_detector - INFO - PyTorch 2.7.0 detected +2025-05-30 13:50:32,182 - hardware_detector - DEBUG - CUDA available: False, MPS available: True +2025-05-30 13:50:32,182 - hardware_detector - INFO - Hardware detection completed successfully +2025-05-30 13:50:32,182 - hardware_detector - DEBUG - Detected specs: {'platform': 'Darwin', 'architecture': 'arm64', 'cpu_count': 16, 'python_version': '3.11.11', 'gpu_info': None, 'cuda_available': False, 'mps_available': True, 'torch_version': '2.7.0'} +2025-05-30 13:50:32,182 - auto_diffusers - INFO - Hardware detector initialized successfully +2025-05-30 13:50:32,182 - __main__ - INFO - AutoDiffusersGenerator initialized successfully +2025-05-30 13:50:32,182 - simple_memory_calculator - INFO - Initializing SimpleMemoryCalculator +2025-05-30 13:50:32,182 - simple_memory_calculator - DEBUG - HuggingFace API initialized +2025-05-30 13:50:32,182 - simple_memory_calculator - DEBUG - Known models in database: 4 +2025-05-30 13:50:32,182 - __main__ - INFO - SimpleMemoryCalculator initialized successfully +2025-05-30 13:50:32,182 - __main__ - DEBUG - Default model settings: gemini-2.5-flash-preview-05-20, temp=0.7 +2025-05-30 13:50:32,184 - asyncio - DEBUG - Using selector: KqueueSelector +2025-05-30 13:50:32,204 - httpcore.connection - DEBUG - connect_tcp.started host='api.gradio.app' port=443 local_address=None timeout=3 socket_options=None +2025-05-30 13:50:32,205 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): huggingface.co:443 +2025-05-30 13:50:32,292 - asyncio - DEBUG - Using selector: KqueueSelector +2025-05-30 13:50:32,324 - httpcore.connection - DEBUG - connect_tcp.started host='localhost' port=7860 local_address=None timeout=None socket_options=None +2025-05-30 13:50:32,325 - httpcore.connection - DEBUG - connect_tcp.complete return_value= +2025-05-30 13:50:32,325 - httpcore.http11 - DEBUG - send_request_headers.started request= +2025-05-30 13:50:32,325 - httpcore.http11 - DEBUG - send_request_headers.complete +2025-05-30 13:50:32,325 - httpcore.http11 - DEBUG - send_request_body.started request= +2025-05-30 13:50:32,325 - httpcore.http11 - DEBUG - send_request_body.complete +2025-05-30 13:50:32,325 - httpcore.http11 - DEBUG - receive_response_headers.started request= +2025-05-30 13:50:32,325 - httpcore.http11 - DEBUG - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'date', b'Fri, 30 May 2025 04:50:32 GMT'), (b'server', b'uvicorn'), (b'content-length', b'4'), (b'content-type', b'application/json')]) +2025-05-30 13:50:32,326 - httpx - INFO - HTTP Request: GET http://localhost:7860/gradio_api/startup-events "HTTP/1.1 200 OK" +2025-05-30 13:50:32,326 - httpcore.http11 - DEBUG - receive_response_body.started request= +2025-05-30 13:50:32,326 - httpcore.http11 - DEBUG - receive_response_body.complete +2025-05-30 13:50:32,326 - httpcore.http11 - DEBUG - response_closed.started +2025-05-30 13:50:32,326 - httpcore.http11 - DEBUG - response_closed.complete +2025-05-30 13:50:32,326 - httpcore.connection - DEBUG - close.started +2025-05-30 13:50:32,326 - httpcore.connection - DEBUG - close.complete +2025-05-30 13:50:32,327 - httpcore.connection - DEBUG - connect_tcp.started host='localhost' port=7860 local_address=None timeout=3 socket_options=None +2025-05-30 13:50:32,327 - httpcore.connection - DEBUG - connect_tcp.complete return_value= +2025-05-30 13:50:32,327 - httpcore.http11 - DEBUG - send_request_headers.started request= +2025-05-30 13:50:32,327 - httpcore.http11 - DEBUG - send_request_headers.complete +2025-05-30 13:50:32,327 - httpcore.http11 - DEBUG - send_request_body.started request= +2025-05-30 13:50:32,327 - httpcore.http11 - DEBUG - send_request_body.complete +2025-05-30 13:50:32,328 - httpcore.http11 - DEBUG - receive_response_headers.started request= +2025-05-30 13:50:32,334 - httpcore.http11 - DEBUG - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'date', b'Fri, 30 May 2025 04:50:32 GMT'), (b'server', b'uvicorn'), (b'content-length', b'109813'), (b'content-type', b'text/html; charset=utf-8')]) +2025-05-30 13:50:32,334 - httpx - INFO - HTTP Request: HEAD http://localhost:7860/ "HTTP/1.1 200 OK" +2025-05-30 13:50:32,334 - httpcore.http11 - DEBUG - receive_response_body.started request= +2025-05-30 13:50:32,334 - httpcore.http11 - DEBUG - receive_response_body.complete +2025-05-30 13:50:32,334 - httpcore.http11 - DEBUG - response_closed.started +2025-05-30 13:50:32,334 - httpcore.http11 - DEBUG - response_closed.complete +2025-05-30 13:50:32,334 - httpcore.connection - DEBUG - close.started +2025-05-30 13:50:32,334 - httpcore.connection - DEBUG - close.complete +2025-05-30 13:50:32,346 - httpcore.connection - DEBUG - connect_tcp.started host='api.gradio.app' port=443 local_address=None timeout=30 socket_options=None +2025-05-30 13:50:32,367 - httpcore.connection - DEBUG - connect_tcp.complete return_value= +2025-05-30 13:50:32,367 - httpcore.connection - DEBUG - start_tls.started ssl_context= server_hostname='api.gradio.app' timeout=3 +2025-05-30 13:50:32,488 - urllib3.connectionpool - DEBUG - https://huggingface.co:443 "HEAD /api/telemetry/gradio/initiated HTTP/1.1" 200 0 +2025-05-30 13:50:32,489 - httpcore.connection - DEBUG - connect_tcp.complete return_value= +2025-05-30 13:50:32,489 - httpcore.connection - DEBUG - start_tls.started ssl_context= server_hostname='api.gradio.app' timeout=30 +2025-05-30 13:50:32,652 - httpcore.connection - DEBUG - start_tls.complete return_value= +2025-05-30 13:50:32,653 - httpcore.http11 - DEBUG - send_request_headers.started request= +2025-05-30 13:50:32,653 - httpcore.http11 - DEBUG - send_request_headers.complete +2025-05-30 13:50:32,653 - httpcore.http11 - DEBUG - send_request_body.started request= +2025-05-30 13:50:32,653 - httpcore.http11 - DEBUG - send_request_body.complete +2025-05-30 13:50:32,653 - httpcore.http11 - DEBUG - receive_response_headers.started request= +2025-05-30 13:50:32,780 - httpcore.connection - DEBUG - start_tls.complete return_value= +2025-05-30 13:50:32,780 - httpcore.http11 - DEBUG - send_request_headers.started request= +2025-05-30 13:50:32,780 - httpcore.http11 - DEBUG - send_request_headers.complete +2025-05-30 13:50:32,780 - httpcore.http11 - DEBUG - send_request_body.started request= +2025-05-30 13:50:32,780 - httpcore.http11 - DEBUG - send_request_body.complete +2025-05-30 13:50:32,780 - httpcore.http11 - DEBUG - receive_response_headers.started request= +2025-05-30 13:50:32,796 - httpcore.http11 - DEBUG - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Date', b'Fri, 30 May 2025 04:50:32 GMT'), (b'Content-Type', b'application/json'), (b'Content-Length', b'21'), (b'Connection', b'keep-alive'), (b'Server', b'nginx/1.18.0'), (b'Access-Control-Allow-Origin', b'*')]) +2025-05-30 13:50:32,796 - httpx - INFO - HTTP Request: GET https://api.gradio.app/pkg-version "HTTP/1.1 200 OK" +2025-05-30 13:50:32,796 - httpcore.http11 - DEBUG - receive_response_body.started request= +2025-05-30 13:50:32,796 - httpcore.http11 - DEBUG - receive_response_body.complete +2025-05-30 13:50:32,796 - httpcore.http11 - DEBUG - response_closed.started +2025-05-30 13:50:32,796 - httpcore.http11 - DEBUG - response_closed.complete +2025-05-30 13:50:32,796 - httpcore.connection - DEBUG - close.started +2025-05-30 13:50:32,796 - httpcore.connection - DEBUG - close.complete +2025-05-30 13:50:32,929 - httpcore.http11 - DEBUG - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Date', b'Fri, 30 May 2025 04:50:32 GMT'), (b'Content-Type', b'text/html; charset=utf-8'), (b'Transfer-Encoding', b'chunked'), (b'Connection', b'keep-alive'), (b'Server', b'nginx/1.18.0'), (b'ContentType', b'application/json'), (b'Access-Control-Allow-Origin', b'*'), (b'Content-Encoding', b'gzip')]) +2025-05-30 13:50:32,930 - httpx - INFO - HTTP Request: GET https://api.gradio.app/v3/tunnel-request "HTTP/1.1 200 OK" +2025-05-30 13:50:32,930 - httpcore.http11 - DEBUG - receive_response_body.started request= +2025-05-30 13:50:32,930 - httpcore.http11 - DEBUG - receive_response_body.complete +2025-05-30 13:50:32,930 - httpcore.http11 - DEBUG - response_closed.started +2025-05-30 13:50:32,930 - httpcore.http11 - DEBUG - response_closed.complete +2025-05-30 13:50:32,931 - httpcore.connection - DEBUG - close.started +2025-05-30 13:50:32,931 - httpcore.connection - DEBUG - close.complete +2025-05-30 13:50:33,501 - simple_memory_calculator - INFO - Getting memory requirements for model: black-forest-labs/FLUX.1-schnell +2025-05-30 13:50:33,501 - simple_memory_calculator - INFO - Using known memory data for black-forest-labs/FLUX.1-schnell +2025-05-30 13:50:33,501 - simple_memory_calculator - DEBUG - Known data: {'params_billions': 12.0, 'fp16_gb': 24.0, 'inference_fp16_gb': 36.0} +2025-05-30 13:50:33,501 - simple_memory_calculator - INFO - Generating memory recommendations for black-forest-labs/FLUX.1-schnell with 8.0GB VRAM +2025-05-30 13:50:33,501 - simple_memory_calculator - INFO - Getting memory requirements for model: black-forest-labs/FLUX.1-schnell +2025-05-30 13:50:33,501 - simple_memory_calculator - DEBUG - Using cached memory data for black-forest-labs/FLUX.1-schnell +2025-05-30 13:50:33,501 - simple_memory_calculator - DEBUG - Model memory: 24.0GB, Inference memory: 36.0GB +2025-05-30 13:50:33,501 - simple_memory_calculator - INFO - Getting memory requirements for model: black-forest-labs/FLUX.1-schnell +2025-05-30 13:50:33,501 - simple_memory_calculator - DEBUG - Using cached memory data for black-forest-labs/FLUX.1-schnell +2025-05-30 13:50:33,596 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): huggingface.co:443 +2025-05-30 13:50:33,813 - urllib3.connectionpool - DEBUG - https://huggingface.co:443 "HEAD /api/telemetry/gradio/launched HTTP/1.1" 200 0 +2025-05-30 13:50:37,564 - simple_memory_calculator - INFO - Getting memory requirements for model: black-forest-labs/FLUX.1-schnell +2025-05-30 13:50:37,564 - simple_memory_calculator - DEBUG - Using cached memory data for black-forest-labs/FLUX.1-schnell +2025-05-30 13:50:37,564 - simple_memory_calculator - INFO - Generating memory recommendations for black-forest-labs/FLUX.1-schnell with 8.0GB VRAM +2025-05-30 13:50:37,564 - simple_memory_calculator - INFO - Getting memory requirements for model: black-forest-labs/FLUX.1-schnell +2025-05-30 13:50:37,565 - simple_memory_calculator - DEBUG - Using cached memory data for black-forest-labs/FLUX.1-schnell +2025-05-30 13:50:37,565 - simple_memory_calculator - DEBUG - Model memory: 24.0GB, Inference memory: 36.0GB +2025-05-30 13:50:37,565 - simple_memory_calculator - INFO - Getting memory requirements for model: black-forest-labs/FLUX.1-schnell +2025-05-30 13:50:37,565 - simple_memory_calculator - DEBUG - Using cached memory data for black-forest-labs/FLUX.1-schnell +2025-05-30 13:50:37,565 - auto_diffusers - INFO - Starting code generation for model: black-forest-labs/FLUX.1-schnell +2025-05-30 13:50:37,565 - auto_diffusers - DEBUG - Parameters: prompt='A cat holding a sign that says hello world...', size=(768, 1360), steps=4 +2025-05-30 13:50:37,565 - auto_diffusers - DEBUG - Manual specs: True, Memory analysis provided: True +2025-05-30 13:50:37,565 - auto_diffusers - INFO - Using manual hardware specifications +2025-05-30 13:50:37,566 - auto_diffusers - DEBUG - Manual specs: {'platform': 'Linux', 'architecture': 'manual_input', 'cpu_count': 8, 'python_version': '3.11', 'cuda_available': False, 'mps_available': False, 'torch_version': '2.0+', 'manual_input': True, 'ram_gb': 16, 'user_dtype': None, 'gpu_info': [{'name': 'Custom GPU', 'memory_mb': 8192}]} +2025-05-30 13:50:37,566 - auto_diffusers - DEBUG - GPU detected with 8.0 GB VRAM +2025-05-30 13:50:37,566 - auto_diffusers - INFO - Selected optimization profile: balanced +2025-05-30 13:50:37,566 - auto_diffusers - DEBUG - Creating generation prompt for Gemini API +2025-05-30 13:50:37,566 - auto_diffusers - DEBUG - Prompt length: 7598 characters +2025-05-30 13:50:37,566 - auto_diffusers - INFO - ================================================================================ +2025-05-30 13:50:37,566 - auto_diffusers - INFO - PROMPT SENT TO GEMINI API: +2025-05-30 13:50:37,566 - auto_diffusers - INFO - ================================================================================ +2025-05-30 13:50:37,566 - auto_diffusers - INFO - +You are an expert in optimizing diffusers library code for different hardware configurations. + +NOTE: This system includes curated optimization knowledge from HuggingFace documentation. + +TASK: Generate optimized Python code for running a diffusion model with the following specifications: +- Model: black-forest-labs/FLUX.1-schnell +- Prompt: "A cat holding a sign that says hello world" +- Image size: 768x1360 +- Inference steps: 4 + +HARDWARE SPECIFICATIONS: +- Platform: Linux (manual_input) +- CPU Cores: 8 +- CUDA Available: False +- MPS Available: False +- Optimization Profile: balanced +- GPU: Custom GPU (8.0 GB VRAM) + +MEMORY ANALYSIS: +- Model Memory Requirements: 36.0 GB (FP16 inference) +- Model Weights Size: 24.0 GB (FP16) +- Memory Recommendation: 🔄 Requires sequential CPU offloading +- Recommended Precision: float16 +- Attention Slicing Recommended: True +- VAE Slicing Recommended: True + +OPTIMIZATION KNOWLEDGE BASE: + +# DIFFUSERS OPTIMIZATION TECHNIQUES + +## Memory Optimization Techniques + +### 1. Model CPU Offloading +Use `enable_model_cpu_offload()` to move models between GPU and CPU automatically: +```python +pipe.enable_model_cpu_offload() +``` +- Saves significant VRAM by keeping only active models on GPU +- Automatic management, no manual intervention needed +- Compatible with all pipelines + +### 2. Sequential CPU Offloading +Use `enable_sequential_cpu_offload()` for more aggressive memory saving: +```python +pipe.enable_sequential_cpu_offload() +``` +- More memory efficient than model offloading +- Moves models to CPU after each forward pass +- Best for very limited VRAM scenarios + +### 3. Attention Slicing +Use `enable_attention_slicing()` to reduce memory during attention computation: +```python +pipe.enable_attention_slicing() +# or specify slice size +pipe.enable_attention_slicing("max") # maximum slicing +pipe.enable_attention_slicing(1) # slice_size = 1 +``` +- Trades compute time for memory +- Most effective for high-resolution images +- Can be combined with other techniques + +### 4. VAE Slicing +Use `enable_vae_slicing()` for large batch processing: +```python +pipe.enable_vae_slicing() +``` +- Decodes images one at a time instead of all at once +- Essential for batch sizes > 4 +- Minimal performance impact on single images + +### 5. VAE Tiling +Use `enable_vae_tiling()` for high-resolution image generation: +```python +pipe.enable_vae_tiling() +``` +- Enables 4K+ image generation on 8GB VRAM +- Splits images into overlapping tiles +- Automatically disabled for 512x512 or smaller images + +### 6. Memory Efficient Attention (xFormers) +Use `enable_xformers_memory_efficient_attention()` if xFormers is installed: +```python +pipe.enable_xformers_memory_efficient_attention() +``` +- Significantly reduces memory usage and improves speed +- Requires xformers library installation +- Compatible with most models + +## Performance Optimization Techniques + +### 1. Half Precision (FP16/BF16) +Use lower precision for better memory and speed: +```python +# FP16 (widely supported) +pipe = DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16) + +# BF16 (better numerical stability, newer hardware) +pipe = DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.bfloat16) +``` +- FP16: Halves memory usage, widely supported +- BF16: Better numerical stability, requires newer GPUs +- Essential for most optimization scenarios + +### 2. Torch Compile (PyTorch 2.0+) +Use `torch.compile()` for significant speed improvements: +```python +pipe.unet = torch.compile(pipe.unet, mode="reduce-overhead", fullgraph=True) +# For some models, compile VAE too: +pipe.vae.decode = torch.compile(pipe.vae.decode, mode="reduce-overhead", fullgraph=True) +``` +- 5-50% speed improvement +- Requires PyTorch 2.0+ +- First run is slower due to compilation + +### 3. Fast Schedulers +Use faster schedulers for fewer steps: +```python +from diffusers import LMSDiscreteScheduler, UniPCMultistepScheduler + +# LMS Scheduler (good quality, fast) +pipe.scheduler = LMSDiscreteScheduler.from_config(pipe.scheduler.config) + +# UniPC Scheduler (fastest) +pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config) +``` + +## Hardware-Specific Optimizations + +### NVIDIA GPU Optimizations +```python +# Enable Tensor Cores +torch.backends.cudnn.benchmark = True + +# Optimal data type for NVIDIA +torch_dtype = torch.float16 # or torch.bfloat16 for RTX 30/40 series +``` + +### Apple Silicon (MPS) Optimizations +```python +# Use MPS device +device = "mps" if torch.backends.mps.is_available() else "cpu" +pipe = pipe.to(device) + +# Recommended dtype for Apple Silicon +torch_dtype = torch.bfloat16 # Better than float16 on Apple Silicon + +# Attention slicing often helps on MPS +pipe.enable_attention_slicing() +``` + +### CPU Optimizations +```python +# Use float32 for CPU +torch_dtype = torch.float32 + +# Enable optimized attention +pipe.enable_attention_slicing() +``` + +## Model-Specific Guidelines + +### FLUX Models +- Do NOT use guidance_scale parameter (not needed for FLUX) +- Use 4-8 inference steps maximum +- BF16 dtype recommended +- Enable attention slicing for memory optimization + +### Stable Diffusion XL +- Enable attention slicing for high resolutions +- Use refiner model sparingly to save memory +- Consider VAE tiling for >1024px images + +### Stable Diffusion 1.5/2.1 +- Very memory efficient base models +- Can often run without optimizations on 8GB+ VRAM +- Enable VAE slicing for batch processing + +## Memory Usage Estimation +- FLUX.1: ~24GB for full precision, ~12GB for FP16 +- SDXL: ~7GB for FP16, ~14GB for FP32 +- SD 1.5: ~2GB for FP16, ~4GB for FP32 + +## Optimization Combinations by VRAM + +### 24GB+ VRAM (High-end) +```python +pipe = DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.bfloat16) +pipe = pipe.to("cuda") +pipe.unet = torch.compile(pipe.unet, mode="reduce-overhead", fullgraph=True) +``` + +### 12-24GB VRAM (Mid-range) +```python +pipe = DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16) +pipe = pipe.to("cuda") +pipe.enable_model_cpu_offload() +pipe.enable_xformers_memory_efficient_attention() +``` + +### 8-12GB VRAM (Entry-level) +```python +pipe = DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16) +pipe.enable_sequential_cpu_offload() +pipe.enable_attention_slicing() +pipe.enable_vae_slicing() +pipe.enable_xformers_memory_efficient_attention() +``` + +### <8GB VRAM (Low-end) +```python +pipe = DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16) +pipe.enable_sequential_cpu_offload() +pipe.enable_attention_slicing("max") +pipe.enable_vae_slicing() +pipe.enable_vae_tiling() +``` + + +IMPORTANT: For FLUX.1-schnell models, do NOT include guidance_scale parameter as it's not needed. + +Using the OPTIMIZATION KNOWLEDGE BASE above, generate Python code that: + +1. **Selects the best optimization techniques** for the specific hardware profile +2. **Applies appropriate memory optimizations** based on available VRAM +3. **Uses optimal data types** for the target hardware: + - User specified dtype (if provided): Use exactly as specified + - Apple Silicon (MPS): prefer torch.bfloat16 + - NVIDIA GPUs: prefer torch.float16 or torch.bfloat16 + - CPU only: use torch.float32 +4. **Implements hardware-specific optimizations** (CUDA, MPS, CPU) +5. **Follows model-specific guidelines** (e.g., FLUX guidance_scale handling) + +IMPORTANT GUIDELINES: +- Reference the OPTIMIZATION KNOWLEDGE BASE to select appropriate techniques +- Include all necessary imports +- Add brief comments explaining optimization choices +- Generate compact, production-ready code +- Inline values where possible for concise code +- Generate ONLY the Python code, no explanations before or after the code block + +2025-05-30 13:50:37,567 - auto_diffusers - INFO - ================================================================================ +2025-05-30 13:50:37,567 - auto_diffusers - INFO - Sending request to Gemini API +2025-05-30 13:50:52,223 - auto_diffusers - INFO - Successfully received response from Gemini API (no tools used) +2025-05-30 13:50:52,224 - auto_diffusers - DEBUG - Response length: 3046 characters