-
Notifications
You must be signed in to change notification settings - Fork 27.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: AttributeError: module 'tensorflow' has no attribute 'Tensor' - after recent update #6212
Comments
I have the exact same problem... I thaught the reason for it were the extensions that I installed but if you have the same problem... |
Hi @Nicoolodion , at the beginning I got an error with the Dynamic Prompts extension and I thought the problem was with that, in fact I submitted a bug report to the developer, but then I discovered that I couldn't generate any images, so I deactivated all the extenstions but the Image Gallery, and I realized that the issue was not of Dynamic Prompts but of SD Web UI itself. Let see if the developers will be able to find the source of this problem. I need to have all the extensions activated to properly translate the Web UI, the Scripts and the Extensions. |
Same problem here. Everything worked fine before updating. Disabling most extentions did seem to fix it though. So maybe its not a WebUI problem and more of a compatibility issue. |
Hmmm, now things seem to get even worst. I re-activated all the Extensions and restarted Gradio, but soon after restart Gradio is hanging when the Web UI is loaded and the models list refreshed. Then the webserver restarts but the UI in unresponsive. Traceback (most recent call last): Hopefully, these problems will be soon resolved. We must be patient. |
same exact issue with dynamic prompts due to gradio issue and i suspect some tensor or pytorch tomfoolery. got img2img to finally work but it shits the bed on most samplers so i just gave up. did a clean install prior to all the gradio issues and still nothing, same errors with flood of txt in the cell. on top of that the new karras scheduling apparently killed all my seeds i was working on the last two weeks and everything looks entirely different from when i went to bed the other night. i dont even know where to begin to get that work back because everything was done on SDE and the other M karras samplers aside from a few runs on DDIM, but if the seeds are rekt theyre rekt. fug. i know this shit is all WIP and not ready for prime time etc, but damn, losing all that work is a nut punch. |
Same issue here, the tensor related, commit 251ecee . |
I know that these kind of problems might be a little frustrating, but that's the nature of the development process, we've to be patient. One thing that can be done is to revert the latest updates to a previous version of the repository using Git, but I would prefer to wait for @AUTOMATIC1111 to look into this issue and find a solution, so to keep the program up to date. Hopefully it will be fixed soon and we can continue to enjoy using SD Web UI. |
|
Noticed now that even with dreambooth disabled that many other extensions often put out the same warning... |
Same here. Disabled both dreambooth and dynamic prompts and still no go. While loading, I get RuntimeError: Failed to import transformers.pipelines because of the following error (look up to see its traceback): module 'tensorflow' has no attribute 'data' And while trying to generate I get the on OP mentioned: 'tensorflow' has no attribute 'data' |
yeah i disabled everything, another clean install without migrating settings files (csv, json, webui.sh, etc) but still get the same tensors issues spit out when i try to generate. just from my limited experience, since like freakin august lol, but gradio comes off comped af and this seems relevant maybe: https://github.com/huggingface/safetensors also how exactly can i revert back to an earlier version through git, never done it before? i edited some of the requirements.txt to push gradio back to 3.9 then 3.13 |
im getting the same issue as well, even the interrogate in img2img doesnt work |
Just used git pull again and now it works again! Looks like the new "update" fixed it. I have to test it out with dreambooth enabled next! |
I have my bat file set to do a git pull every time I load the UI but I am still getting the same error. Tried with and without extensions enabled to no avail. I cannot generate images at all. I could yesterday afternoon. |
This is frustrating. I was able to get the SD Web UI working again and re-activated almost all the Extestions, apart from a few that are giving me hard times, with the backend restarting in a loop, or hanging up. The initial source of the problem was Dreambooth and the arguments that were inside the webui-user.bat. Other Extension with problems are Config-Preset, Scripts-Random, Dreambooth, Prompt Gallery, Hypernetwork Monkey Patch, Dynamic Prompts (possibly fixed, I have to check it) but these might be corrected by their respective developers in the next days. |
just git pulled today and its still not working :( |
Ok thats weird... Dreambooth is also working for me now. |
Decided to test the extensions I use individually, in order to compile a small list of what is working and what is not. This list is by no means complete or comprehensive. Fell free to add to the (small) pile. Some extensions which won't stop web-ui from generating images:
|
Interesting, thank you @MrMondragon |
Very strange, I have two installations, one for 1.5 and one for 2.1. The 1.5 is broken, but not the 2.1. Both have updated... And can't understand the difference (excepted models used of course).... |
Decided to give it a go and try to generate something with dreambooth on and V2.1 models. Still the same error reported above |
Hi again. Went on to check the dreambooth github issue for the same problem and found a solution that got me back up and running: Delete de VEnv folder and restart SD, so that it forces a re-install of everything. dephtmap2mask is running again and I can generate images with dreambooth on. Dynamic Prompts is still a dealbreaker, though |
ive been using dynamic prompting as a script instead of an extension bc im too lazy to swap over. Would that cause a problem? or only the extension? |
happy to report deleting the venv worked for me thank you!!! |
Confirming that deleting venv worked for me as well. Thanks! |
So, these issues are possibly due to some (which ones?) outdated or corrupted dependency libraries? I would like to know which are these libraries and perhaps uninstall and re-install them instead of wiping out the entire venv. I tend to optimize things due to my low bandwidth Internet connection. The same principle I follow when I symlink a checkpoint instead of re-downloading or copying it into another AI application (I have several of them installed and working on my notebook). Obviously, without knowing what's wrong exactly, rebuilding the venv is the last resource and step to do. Thank you for reposrting that this solution fixed this issue. |
@Harvester62, if I were to guess, I'd say Torch and TorchVision booth good candidates. |
Thank you @MrMondragon , but at the end I decided that a clean re-installation of the venv would have been a good idea, considering the latest big changes, and it worked very well. Now it's time to re-activate all extensions and keep on the translation work and clean-up of the it_IT.json localization file. In case of any other strange things happening, I will report them here. Relatively to this bug report, I would like to know if anybody else had "fixed" the problem with a complete reinstall of the venv, or with the uninstall/re-install of the two above mentioned libraries (Torch and TorchVision), it they were the source of the problem. Let me know, thank you. |
Didn't know it was still possible to use it without the extension. Guess not... But then again, it would be awesome if you could test and report. I, for one, would rollback to script only as well |
For me I didn't even have to reinstall anything at all... I just had to do a git pull and everything was fine again. Even with all the extensions enabled |
Thank you @Nicoolodion for the feedback and glad to know that you got your SD Web UI working again. Unfortunately, a git pull doesn't fix any dependency library in the venv, only align your local installation with the online SD Web UI repository, which doesn't include any dependency library. Possibly my venv needed a fresh installation (it was months old). |
@Harvester62 Somehow my SD was working yesterday after the git pull, but today when I wanted to use it again (i changed nothing) it the error was back... reinstalled venv and that worked! |
Had the same issue, and resolved it by re-cloning git to a new folder. |
I have been dealing with this isue for a week but for me worked downgrading tensorflow from 2.11 to 2.10 |
I found that there might be two things that can help sometimes to resolve these issues: one is to rebuild the venv from scratch, which in my case fixed several issues, and the other, perhaps to be done before rebuilding venv, is to delete the config.json file. If the source of the problem is an Extension, than removing it (moving away from the \extensions folder) might bring back SDWUI to a working state. The last time I had such problems I moved away all the scripts and extensions and, given that the SDWUI was working, I brought back them one at a time checking in the console and restarting the program every time. Time consuming for sure, but I didn't have other options. |
It's worth mentioning that TensorFlow dropped support for native Windows GPU after tensorflow-gpu 2.10.1. They now expect Windows GPU users to run Tensorflow 2.11+ via WSL: https://www.tensorflow.org/install/pip#system_requirements It's also worth mentioning that the WebUI without any additional extensions does not require Tensorflow to run. In fact, on my system uninstalling Tensorflow & Keras makes my SD inference speeds 6-10% Faster, so it seems more harmful than good unless you have something installed which actually requires it to run without any fallback. |
Don't know how it happened but I had a similar issue after upgrading from an extremely old version. Worked the first day then the next it didn't. Disabling dynamic prompts and dreambooth, then recreating the venv (delete the folder, run webui-user.bat) worked for me. |
hi, had same issue, no f***** idea what I do , I did deleted the Venv folder. But for those who don't want delete or want to try another approach you can try this : C:\root folder\stable-diffusion-webui\venv\Scripts\python.exe -m pip install --upgrade pip Hope it fix something |
This happened to me today, I think it was working yesterday, and I just installed "unprompted" and it's borked. |
Hi @Doris1337 , the command you referenced should only update the pip program, which is not a dependency but only the program to manage dependencies. You can still use an outdated pip version, in fact the messages related in the console are only warnings. Did the update of pip solved your issues? Hi @EmmaWebGH , did the reinstallation of venv went fine and brought back SD Web UI to work? I have now definitely excluded "Unprompted" from the installed extensions on my local installation, as well as a few others (ABG_extension, DiffusionDefender, sd_auto_fix) which is a pity but I cannot risk to break my SDWUI. Just for your information, guys and gals. As of today, and after the above mentioned venv restore, the current version of SDWUI (Commit hash: 0cc0ee1) seems to be stable and working with all my installed Extensions and Scripts, which doesn't trigger any error messages at startup in the console; it doesn't mean that all the Scripts and Extension are not possibly affected by some problems - I don't run them all, I only translate their UI - simply they don't prevent SDWUI to work. The only "fix" I had to apply recently to SDWUI to restore the capability to check for updates of the installed Extenstions is the one referenced here: #8118 If you want to know which Scripts and Extensions do I have installed, here follow a couple of screenshots: and this is my SDWUI console after startup: If you are interested to see what version of an Extension vs. SDWUI version is working, you can have a look at this link: https://github.com/ClashSAN/sd-webui-extension-records I hope you might find these information useful in some way. Cheers! |
@Harvester62 Yes reinstalling the venv was completely painless. Everything immediately worked. |
Thank you @EmmaWebGH for your feedback. Glad to hear that everything get back to a working state. Having two installations is probably the best option until those issues will be fixed. |
Eventually I ended up reinstalling back Automatic111, I tried with Chatgpt to understand the problem... but easiest solution is reinstalling, I commented that because I thought it might help somebody. Just sharing my brainstorm, hehehe |
Thank you. |
After several weeks no longer experiencing this problem, especially after I reinstalled the venv, and noticing that even other users fixed it with a venv re-installation, I am therefore closing this bug report. If someone will be facing that same problem he/she should be able to retrieve this bug report and related comments doing a research within the bug reports. Thank you all for attending this discussion. Cheers! |
re installed venv.But does not work. |
Is there an existing issue for this?
What happened?
After recently updates of the SD Web UI via Git Pull, I am no longer able to generate an image, getting an error related to Tensor (see below). This also seems to prevent the upload of Dynamic Prompts extension.
Steps to reproduce the problem
Nothing special, simply added a prompt and then clicked on the Generate button.
What should have happened?
To properly generate an image.
Commit where the problem happens
fd4461d
What platforms do you use to access UI ?
Windows
What browsers do you use to access the UI ?
Mozilla Firefox
Command Line Arguments
Additional information, context and logs
The following is the Traceback error displayed after clicking the Generate button (as a safety measure I deactivated all extensions but the Image Gallery).
The text was updated successfully, but these errors were encountered: