Add warning to catch torch import mistakes. (#8852)
This commit is contained in:
parent
1205afc708
commit
1fd306824d
1 changed files with 3 additions and 0 deletions
3
main.py
3
main.py
|
|
@ -127,6 +127,9 @@ if __name__ == "__main__":
|
|||
|
||||
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 execution
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue