Skip to content
代码片段 群组 项目
  • Max Audron's avatar
    14c0884f
    use python importlib to load and execute extension modules · 14c0884f
    Max Audron 创作于
    previously module attributes like __file__ where not set correctly,
    leading to scripts getting the directory of the stable-diffusion repo
    location instead of their own script.
    
    This causes problem when loading user data from an external location
    using the --data-dir flag, as extensions would look for their own code
    in the stable-diffusion repo location instead of the data dir location.
    
    Using pythons importlib functions sets the modules specs correctly and
    executes them. But this will break extensions if they build paths based
    on the previously incorrect __file__ attribute.
    14c0884f
    历史
    use python importlib to load and execute extension modules
    Max Audron 创作于
    previously module attributes like __file__ where not set correctly,
    leading to scripts getting the directory of the stable-diffusion repo
    location instead of their own script.
    
    This causes problem when loading user data from an external location
    using the --data-dir flag, as extensions would look for their own code
    in the stable-diffusion repo location instead of the data dir location.
    
    Using pythons importlib functions sets the modules specs correctly and
    executes them. But this will break extensions if they build paths based
    on the previously incorrect __file__ attribute.