taming-transformers
taming-transformers copied to clipboard
No module named 'main'
trafficstars
After setup when running streamlit run scripts/sample_conditional.py from the root directory.
I get the following error:
Traceback (most recent call last):
File ".../opt/anaconda3/lib/python3.8/site-packages/streamlit/script_runner.py", line 354, in _run_script
exec(code, module.__dict__)
File ".../Documents/GitHub/taming-transformers/scripts/sample_conditional.py", line 8, in <module>
from main import instantiate_from_config, DataModuleFromConfig
ModuleNotFoundError: No module named 'main'
I get the same problem. If anyone has any insight, that'd be wonderful, thanks!
Adding extra import code below before from main import instantiate_from_config works for me:
import sys
sys.path.append("./")
from main import instantiate_from_config
@sunshineatnoon in which file?
in sample_conditional.py :)
Install the package with pip install -e .