diffusers icon indicating copy to clipboard operation
diffusers copied to clipboard

ValueError: The deprecation tuple ('tensor_format' ...

Open WASasquatch opened this issue 3 years ago • 9 comments

Describe the bug

I am getting the following error

ValueError: The deprecation tuple ('tensor_format', '0.5.0', "If you're running your code in PyTorch, you can safely remove this argument.") should be removed since diffusers' version 0.5.0.dev0 is >= 0.5.0

When running diffusers

What does this even mean? And why wasn't there a deprecation period warning of its usage before it's arbitrarily (on users end) removed? It's breaking my whole system, and 'tesnfor_format' isn't even named in my code or the stacktrace.

Reproduction

Not sure where to start, don't know what "tensor_format" is, it's not named in the code anywhere, or in the stack trace within diffusers repo.

Logs

No response

System Info

  • diffusers version: 0.5.0.dev0
  • Platform: Linux-5.10.133+-x86_64-with-Ubuntu-18.04-bionic
  • Python version: 3.7.14
  • PyTorch version (GPU?): 1.12.1+cu113 (True)
  • Huggingface_hub version: 0.10.0
  • Transformers version: 4.22.2
  • Using GPU in script?: Yes
  • Using distributed or parallel set-up in script?: Not sure what colab is doing

WASasquatch avatar Oct 06 '22 18:10 WASasquatch

Hello! I believe you must be running the main branch of the repo, is that correct? We just released version 0.4.0, which should work fine. main just became 0.5.0.dev0, hence the deprecation error.

You can install it using pip for now:

pip uninstall diffusers
pip install diffusers

Nevertheless, we'll review these deprecations to try to make main work. Would you mind sharing a link to the Colab you are using, if possible?

pcuenca avatar Oct 06 '22 18:10 pcuenca

I double-checked to make sure it wasn't something I've done on the dev branch, but yes, the error is present in public branch (which hasn't received any updates to cause any issues).

https://colab.research.google.com/github/WASasquatch/easydiffusion/blob/main/Stability_AI_Easy_Diffusion.ipynb#scrollTo=Ucr5_i21xSjv

I was suspicious it was something I did, as I had added concepts support to dev branch, which uses the training version of transformers (at least that's what the notebook for concepts uses so I did the same to avoid any errors I'd wrack my head over that came from it).

PS forgive the code base. Still just piling on the features I want from diffusers and letting it mature before I write up an API wrapper for all my bits and bobs.

WASasquatch avatar Oct 06 '22 18:10 WASasquatch

Also, is the pip version upgraded with negative prompts and such or will all those patches need to be re-implemented? Maybe I should just roll back to a commit?

WASasquatch avatar Oct 06 '22 18:10 WASasquatch

The released version does have negative prompts and everything else that was in main as of 5 hours ago, so it should work.

Could you please try to install it to verify?

(And actually, main should still be 0.4.1.dev0, so it should work. We'll investigate what might have gone wrong).

pcuenca avatar Oct 06 '22 18:10 pcuenca

Oh really? I was installing via

dev (for concepts) !pip3 install -qq diffusers["training"] transformers ftfy (for some reason diffusers["training"] doesn't work with subprocess command. :(

main (public) subprocess.run(['pip', '-q', 'install', '-U', 'git+https://github.com/huggingface/diffusers.git'], stdout=subprocess.PIPE).stdout.decode('utf-8')

but both seem to be checking out 0.5.0 as main has same issue.

WASasquatch avatar Oct 06 '22 18:10 WASasquatch

The main branch is now back to 0.4.1.dev0 without the deprecations, sorry for the errors!

anton-l avatar Oct 06 '22 19:10 anton-l

The main branch is now back to 0.4.1.dev0 without the deprecations, sorry for the errors!

Awesome, I just noticed, though I'm getting a strange error where the StableDiffusionPipeline is telling me it requires the transformers library. But it's installed, and verified with pip freeze and importing... o.O

Nevermind, I think it was just python weirdness from installing new version of diffusers. Resolved with a full disconnect of VM.

WASasquatch avatar Oct 06 '22 19:10 WASasquatch

I am still wondering, though what is 'tensor_format', where is this error coming from? How can I "safely" remove it, if it's not actually being referenced anywhere? It's not a named method in my script, nor in the stacktrace causing the error, so still unsure what this was even about.

WASasquatch avatar Oct 07 '22 16:10 WASasquatch

Essentially, we're just removing the set_format function since it was a no-op.

patrickvonplaten avatar Oct 07 '22 16:10 patrickvonplaten

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

github-actions[bot] avatar Nov 06 '22 15:11 github-actions[bot]