mirror of
https://github.com/lllyasviel/stable-diffusion-webui-forge.git
synced 2026-01-26 19:09:45 +00:00
revise space
This commit is contained in:
@@ -129,7 +129,11 @@ class ForgeSpace:
|
||||
return self.refresh_gradio()
|
||||
|
||||
def gradio_worker(self):
|
||||
import spaces
|
||||
spaces.unload_module()
|
||||
|
||||
memory_management.unload_all_models()
|
||||
sys.path.insert(0, self.root_path)
|
||||
sys.path.insert(0, self.hf_path)
|
||||
file_path = os.path.join(self.root_path, 'forge_app.py')
|
||||
module_name = 'forge_space_' + str(uuid.uuid4()).replace('-', '_')
|
||||
@@ -161,6 +165,7 @@ class ForgeSpace:
|
||||
del sys.modules[module_name]
|
||||
|
||||
sys.path.remove(self.hf_path)
|
||||
sys.path.remove(self.root_path)
|
||||
return
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user