diff --git a/py/lora_manager.py b/py/lora_manager.py index 1cb2f712..dc54d8f4 100644 --- a/py/lora_manager.py +++ b/py/lora_manager.py @@ -30,8 +30,8 @@ class LoraManager: """Initialize and register all routes using the new refactored architecture""" app = PromptServer.instance.app - # Configure aiohttp logger to be less verbose - logging.getLogger("asyncio").setLevel(logging.WARNING) + # Configure aiohttp access logger to be less verbose + logging.getLogger('aiohttp.access').setLevel(logging.WARNING) added_targets = set() # Track already added target paths @@ -140,6 +140,9 @@ class LoraManager: async def _initialize_services(cls): """Initialize all services using the ServiceRegistry""" try: + # Ensure aiohttp access logger is configured with reduced verbosity + logging.getLogger('aiohttp.access').setLevel(logging.WARNING) + # Initialize CivitaiClient first to ensure it's ready for other services await ServiceRegistry.get_civitai_client() diff --git a/standalone.py b/standalone.py index 6c7af9ab..2ad50ade 100644 --- a/standalone.py +++ b/standalone.py @@ -103,6 +103,9 @@ logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s') logger = logging.getLogger("lora-manager-standalone") +# Configure aiohttp access logger to be less verbose +logging.getLogger('aiohttp.access').setLevel(logging.WARNING) + # Now we can import the global config from our local modules from py.config import config @@ -121,7 +124,7 @@ class StandaloneServer: async def _configure_access_logger(self, app): """Configure access logger to reduce verbosity""" - logging.getLogger("asyncio").setLevel(logging.WARNING) + logging.getLogger('aiohttp.access').setLevel(logging.WARNING) # If using aiohttp>=3.8.0, configure access logger through app directly if hasattr(app, 'access_logger'): @@ -216,6 +219,9 @@ class StandaloneLoraManager(LoraManager): # Store app in a global-like location for compatibility sys.modules['server'].PromptServer.instance = server_instance + # Configure aiohttp access logger to be less verbose + logging.getLogger('aiohttp.access').setLevel(logging.WARNING) + added_targets = set() # Track already added target paths # Add static routes for each lora root @@ -365,8 +371,8 @@ async def main(): # Set log level logging.getLogger().setLevel(getattr(logging, args.log_level)) - # Explicitly configure asyncio logger regardless of selected log level - logging.getLogger("asyncio").setLevel(logging.WARNING) + # Explicitly configure aiohttp access logger regardless of selected log level + logging.getLogger('aiohttp.access').setLevel(logging.WARNING) # Create the server instance server = StandaloneServer() diff --git a/static/js/utils/VirtualScroller.js b/static/js/utils/VirtualScroller.js index 0d614211..bbdc73b6 100644 --- a/static/js/utils/VirtualScroller.js +++ b/static/js/utils/VirtualScroller.js @@ -164,6 +164,23 @@ export class VirtualScroller { // Calculate the left offset to center the grid within the content area this.leftOffset = Math.max(0, (availableContentWidth - actualGridWidth) / 2); + + // Log layout info + console.log('Virtual Scroll Layout:', { + containerWidth, + availableContentWidth, + actualGridWidth, + columnsCount: this.columnsCount, + itemWidth: this.itemWidth, + itemHeight: this.itemHeight, + leftOffset: this.leftOffset, + paddingLeft, + paddingRight, + displayDensity, + maxColumns, + baseCardWidth, + rowGap: this.rowGap + }); // Update grid element max-width to match available width this.gridElement.style.maxWidth = `${actualGridWidth}px`;