Skip to content

Conversation

@CodersAcademy006
Copy link

@CodersAcademy006 CodersAcademy006 commented Oct 18, 2025

Fixes #88

This PR introduces two key improvements to scripts/run_multimodal.py to enhance its robustness and fix a critical execution bug in non-interactive environments.

1. Fix Execution Hang in Docker

  • The Change: Removes the image.show() call from the image loading loop.
  • The Reason: This call assumes a GUI is available and causes the script to hang indefinitely when run inside a Docker container. This change allows the script to execute correctly as intended.

2. Refactor for Robust Weight Loading

  • The Change: Replaces the manual torch.load and model.load_state_dict call with the recommended model.load_weights() helper method.
  • The Reason: This makes the script more flexible and aligns with the library's best practices. The load_weights method is designed to handle both single-file and sharded checkpoints automatically, improving maintainability.

Overall, these changes make the script more reliable and easier to use in its primary documented environments.

@CodersAcademy006 CodersAcademy006 changed the title Fix: Remove image.show() to prevent script hanging Oct 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant