ImportError during Stable Diffusion Web UI on Azure ML Compute Instances deployment

Hi,

some time ago I have successfully deployed Stable Diffusion with AUTOMATIC1111 UI using instance within MLWorkspace at Azure by following tutorial by Vlad Iliescu: https://vladiliescu.net/stable-diffusion-web-ui-on-azure-ml/

Recently I have tried to redeploy it and failed due to:
ImportError: cannot import name 'get_innermost_proxy_mode' from 'torch.fx.experimental.proxy_tensor' (/anaconda/envs/a1111-sdwebui/lib/python3.10/site-packages/torch/fx/experimental/proxy_tensor.py)

I tried to fix it using different versions of dependencies but failed again.

Any ideas?

The function exists in the current code base as seen here and was added 10 months ago in this PR.
I can also call it in torch==2.1.0:

torch.fx.experimental.proxy_tensor.get_innermost_proxy_mode
Out[15]: <function torch.fx.experimental.proxy_tensor.get_innermost_proxy_mode()>

Thank you for your response.

That’s interesting as I have also tried with torch==2.1.0 as well as older implementations from: Previous PyTorch Versions | PyTorch.

hi Maks, were you able to figure this out? I am facing the same problem. Tried to upgrade torch to 2.1.0 and that did not help.

all right :slight_smile: I figured it out. If you use Vlad Iliescu how-to on how to setup this up, I’ve updated the line to:

conda install pytorch=2.0.1 torchvision=0.15.2 torchaudio=2.0.2 chardet pytorch-cuda=11.8 -c pytorch -c nvidia -y

as of 10/12/2023 it works :slight_smile:

1 Like