[PR #1578] [MERGED] restart action: support running as Python module #1961

Closed
opened 2026-10-28 21:05:52 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Comfy-Org/ComfyUI-Manager/pull/1578
Author: @bigcat88
Created: 2/25/2025
Status: ✅ Merged
Merged: 2/25/2025
Merged by: @ltdrdata

Base: main ← Head: restart-action/support-py-module


📝 Commits (1)

  • ee47f25 restart action: support running as Python module

📊 Changes

1 file changed (+3 additions, -0 deletions)

View changed files

📝 glob/manager_server.py (+3 -0)

📄 Description

This little PR simply adds a check if the main python executable file has the name __main__.py - then the restart is performed via python -m MODULE_NAME ..., and not directly via the full path to "main.py", which leads to a relative imports error, since python modules always do relative imports within themselves.

This will allow us to use ComfyUI-Manager in future versions of Visionatrix, our project is launched by the line:

python -m visionatrix

With these changes, the restart works successfully, and these changes are not tied specifically to our project, but are universal, and may be useful to someone else in the future.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Comfy-Org/ComfyUI-Manager/pull/1578 **Author:** [@bigcat88](https://github.com/bigcat88) **Created:** 2/25/2025 **Status:** ✅ Merged **Merged:** 2/25/2025 **Merged by:** [@ltdrdata](https://github.com/ltdrdata) **Base:** `main` ← **Head:** `restart-action/support-py-module` --- ### 📝 Commits (1) - [`ee47f25`](https://github.com/Comfy-Org/ComfyUI-Manager/commit/ee47f25225633bbfdf892b3e8b1d4ef892c07475) restart action: support running as Python module ### 📊 Changes **1 file changed** (+3 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `glob/manager_server.py` (+3 -0) </details> ### 📄 Description This little PR simply adds a check if the main python executable file has the name `__main__.py` - then the restart is performed via `python -m MODULE_NAME ...`, and not directly via the full path to "__main__.py", which leads to a `relative imports` error, since python modules always do relative imports within themselves. This will allow us to use ComfyUI-Manager in future versions of Visionatrix, our project is launched by the line: `python -m visionatrix` With these changes, the restart works successfully, and these changes are not tied specifically to our project, but are universal, and may be useful to someone else in the future. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-28 21:05:52 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/ComfyUI-Manager#1961
No description provided.