mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-07-27 00:06:37 +00:00
Add warning to catch torch import mistakes. (#8852)
This commit is contained in:
parent
1205afc708
commit
1fd306824d
3
main.py
3
main.py
@ -127,6 +127,9 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
import cuda_malloc
|
import cuda_malloc
|
||||||
|
|
||||||
|
if 'torch' in sys.modules:
|
||||||
|
logging.warning("WARNING: Potential Error in code: Torch already imported, torch should never be imported before this point.")
|
||||||
|
|
||||||
import comfy.utils
|
import comfy.utils
|
||||||
|
|
||||||
import execution
|
import execution
|
||||||
|
Loading…
x
Reference in New Issue
Block a user