KnoBuddy / VisualDiffusion

A GUI for text2img diffusion, as a visual alternative to CLI and Jupyter Notebooks.
MIT License
28 stars 3 forks source link

Error : unexpected keyword argument 'text' #3

Closed Acephalia closed 2 years ago

Acephalia commented 2 years ago

Hello I'm getting the following error with a fresh install. Any help would be greatly appreciated. Thank you.

GUI settings loaded
Exception in thread Thread-1:
Traceback (most recent call last):
  File "\anaconda3\envs\env_pytorch\lib\threading.py", line 916, in _bootstrap_inner
    self.run()
  File "\anaconda3\envs\env_pytorch\lib\threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "visualdiffusion\prdgui.py", line 233, in do_run
    p = subprocess.Popen(shlex.split('python prd.py -s '+gui_settings+' '+extra_args_text.get()), stdout=subprocess.PIPE, text=True)
TypeError: __init__() got an unexpected keyword argument 'text'
KnoBuddy commented 2 years ago

Without being able to get to my desktop it appears that you have the word "text" inside of the extra args text field?

I could be completely wrong and the error could be elsewhere but would you confirm that the text field is empty, or if the error appears while trying to open the GUI, delete the gui_settings.json.

Acephalia commented 2 years ago

Thank you for the prompt follow up really appreciate the help. I've looked everywhere in the gui but there is nowhere I can see the word 'text' anywhere.

Error only appears when I try to Run. Saving settings works fine.

Tried deleting the settings file but still the same issue.

KnoBuddy commented 2 years ago

I'll look at the code and see if I can reproduce it.

Could you post your gui_settings.json and a screenshot of the GUI?

KnoBuddy commented 2 years ago

Update your version of python. The parameter text was added in 3.7. So update to Python 3.7 or later and your issue should be solved.

KnoBuddy commented 2 years ago

Thank you for the prompt follow up really appreciate the help. I've looked everywhere in the gui but there is nowhere I can see the word 'text' anywhere.

Error only appears when I try to Run. Saving settings works fine.

Tried deleting the settings file but still the same issue.

Can you confirm that your issue is fixed so I can close this? Thanks in advance.

Acephalia commented 2 years ago

I checked the version and it was on 3.7 but I did update to 3.9 and then ran into a whole bunch of other errors that I was trying to work through and finally gave up for the day.

I’m going to run a fresh install today and give it another go. If you don’t mind leaving it open for a little bit longer I’d appreciate it. Thank you.

On Tue, 16 Aug 2022 at 07:58, KnoBuddy @.***> wrote:

Thank you for the prompt follow up really appreciate the help. I've looked everywhere in the gui but there is nowhere I can see the word 'text' anywhere.

Error only appears when I try to Run. Saving settings works fine.

Tried deleting the settings file but still the same issue.

Can you confirm that your issue is fixed so I can close this? Thanks in advance.

— Reply to this email directly, view it on GitHub https://github.com/KnoBuddy/VisualDiffusion/issues/3#issuecomment-1215902881, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHNGYR36UCQJITDKFCOPB4LVZK4RNANCNFSM56O75BVQ . You are receiving this because you authored the thread.Message ID: @.***>

-- Dimitri Zaik http://dimitrizaik.com/

Some people feel the rain, others just get wet.

Insomnia Inc http://insomniainc.com

Earth

KnoBuddy commented 2 years ago

Yes absolutely. I'd be happy to help if you run into any other issues.

Acephalia commented 2 years ago

So I re-installed everything from scratch.

Ran into the following errors on install.

: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
torchvision 0.13.1 requires torch==1.12.1, but you have torch 1.10.2+cu113 which is incompatible.
Successfully installed torch-1.10.2+cu113

pip install 'Pillow>=9.1.0'
ERROR: Invalid requirement: "'Pillow"

I figured the torch error wasn't going to be an missues and managed to install Pillow 9.2.0 and proceeded with that. Got the numpy error on first run but fixed that with a force reinstall and continued. Everything loaded and ran for the first time without any more errors.

Took awhile as per the guide for the initial run to complete but hallelujah it WORKS!

Thank you so very much for your patience and being such and awesome human! I might just bother you one more time to ask if you have any recommendations for upscaling the images?

P.s : I should mention that I used the https://github.com/kostarion/guided-diffusion instead as someone on Reddit told me the following while I was troubleshooting another install of DD. I have no idea if it had any impact this time around but it works so I thought I should let you know.

_Ok, here is the real fix. The original code for the guided-diffusion package is from Katherine Crowson, but was forked to implement the symmetry feature. You should download kostarion/guided-diffusion from github rather than crowsonkb/guided-diffusion. In file gaussian_diffusion.py there is a new definition of function ddim_sample_loopprogressive starting in line 838. The last two named parameters (lines 854/855) are the ones that caused the problem in your original code.

lowfuel commented 2 years ago

The only difference with that version of guided diffusion is that it has been modified to support a different method of symmetry. it shouldn't hurt anything to use it, but there's no real difference from prog rock's perspective.

Acephalia commented 2 years ago

Yep that does make sense and I didn’t think it would have had an impact. I’m just glad everything is working. Just need to figure out some decent upscaling. Looking forward to playing around with it all.

Thanks again!

On Tue, 16 Aug 2022 at 22:36, lowfuel @.***> wrote:

The only difference with that version of guided diffusion is that it has been modified to support a different method of symmetry. it shouldn't hurt anything to use it, but there's no real difference from prog rock's perspective.

— Reply to this email directly, view it on GitHub https://github.com/KnoBuddy/VisualDiffusion/issues/3#issuecomment-1216578032, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHNGYRZ54NKPCHML2XCKV7DVZODOHANCNFSM56O75BVQ . You are receiving this because you authored the thread.Message ID: @.***>

-- Dimitri Zaik http://dimitrizaik.com/

Some people feel the rain, others just get wet.

Insomnia Inc http://insomniainc.com

Earth

KnoBuddy commented 2 years ago

For upscaling I recommend ESRGAN, PRD has a way to do it locally but I recommend using the Collab notebook: https://colab.research.google.com/drive/1k2Zod6kSHEvraybHl50Lys0LerhyTMCo?usp=sharing

You can scale the image from 2-4x it's original size fairly easily on a Collab GPU, there are some trouble shooting steps if the image is too large and uses too much memory you can to tile the upscale but other than that the images come out crisp and clear.

Acephalia commented 2 years ago

Thank you. Annoyingly I am getting another error when entering a clip guidance scale via the GUI. Should I open a fresh thread?

KnoBuddy commented 2 years ago

Nah it's fine you can post it here, but just a heads up I'm almost finished with a complete rewrite and it should be out in the next couple days. It's significantly more complex on the code side and I anticipate there to be quite a few overlooked errors once I update.

KnoBuddy commented 2 years ago

The GUI has been completely rewritten, features have been added, and it's overall just all around different and new. Please let me know what you think, and if you have any other issues to report.

Acephalia commented 2 years ago

My bad with the previous message. Please ignore. Just running some tests now. Will report back. Thank you for your great work!

KnoBuddy commented 2 years ago

Closing this as completed. Please reopen or create a new issue if you run into any further issues.

Acephalia commented 1 year ago

In that case I might as well wait and give the new version a go. If I can help test, it will be the least I can do. Just shout my way when you’ve released it. Cheers!

On Thu, 18 Aug 2022 at 22:40, KnoBuddy @.***> wrote:

Nah it's fine you can post it here, but just a heads up I'm almost finished with a complete rewrite and it should be out in the next couple days. It's significantly more complex on the code side and I anticipate there to be quite a few overlooked errors once I update.

— Reply to this email directly, view it on GitHub https://github.com/KnoBuddy/VisualDiffusion/issues/3#issuecomment-1219443357, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHNGYR5GRNVKXMBGPTC7LITVZYVJ7ANCNFSM56O75BVQ . You are receiving this because you authored the thread.Message ID: @.***>

-- Dimitri Zaik http://dimitrizaik.com/

Some people feel the rain, others just get wet.

Insomnia Inc http://insomniainc.com

Earth

KnoBuddy commented 1 year ago

That new version has been out for some time. There is also a new MakeGUDPics.py that has sliders for prompt weights.

Let me know if you run into issues.