[X] I have searched the existing issues and checked the recent builds/commits
What happened?
The error NameError: free variable 'maybe_fs_cached_name' referenced before assignment in enclosing scope always pops up if “Cache the compiled models on disk for faster model load in subsequent launches” setting is disabled.
Is there an existing issue for this?
What happened?
The error
NameError: free variable 'maybe_fs_cached_name' referenced before assignment in enclosing scope
always pops up if “Cache the compiled models on disk for faster model load in subsequent launches” setting is disabled.And if you look at function
openvino_fx()
inopenvino_accelerate.py
, this makes perfect sense. The variablemaybe_fs_cached_name
is set only in the branch entered ifOPENVINO_TORCH_MODEL_CACHING
environment variable is present. Yet it is being used unconditionally in the_call()
function outside that branch: https://github.com/openvinotoolkit/stable-diffusion-webui/blob/b01f18c94d122ce21f5c7b6ac2f8afa0ff900eca/scripts/openvino_accelerate.py#L211-L212Steps to reproduce the problem
What should have happened?
The image should be generated without error.