Skip to content
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

code is breaking after new update #11

Open
a-lakh opened this issue Aug 11, 2023 · 5 comments
Open

code is breaking after new update #11

a-lakh opened this issue Aug 11, 2023 · 5 comments

Comments

@a-lakh
Copy link

a-lakh commented Aug 11, 2023

Traceback (most recent call last): File "sample.py", line 146, in <module> main(args, param) File "sample.py", line 66, in main plain_img = model.produce_attn_maps([base_text_prompt], [negative_text], File "/Users/stark/work/rich-text-to-image/models/region_diffusion.py", line 207, in produce_attn_maps noise_pred = self.unet( File "/Users/stark/miniconda3/envs/myenv/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl return forward_call(*args, **kwargs) File "/Users/stark/work/rich-text-to-image/models/unet_2d_condition.py", line 908, in forward sample, res_samples = downsample_block( File "/Users/stark/miniconda3/envs/myenv/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl return forward_call(*args, **kwargs) File "/Users/stark/work/rich-text-to-image/models/unet_2d_blocks.py", line 999, in forward hidden_states = attn( File "/Users/stark/miniconda3/envs/myenv/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl return forward_call(*args, **kwargs) File "/Users/stark/work/rich-text-to-image/models/transformer_2d.py", line 291, in forward hidden_states = block( File "/Users/stark/miniconda3/envs/myenv/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl return forward_call(*args, **kwargs) File "/Users/stark/work/rich-text-to-image/models/attention.py", line 155, in forward attn_output, _ = self.attn1( File "/Users/stark/miniconda3/envs/myenv/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1538, in _call_impl result = forward_call(*args, **kwargs) File "/Users/stark/work/rich-text-to-image/models/attention_processor.py", line 330, in forward return self.processor( TypeError: __call__() got an unexpected keyword argument 'real_attn_probs'

@songweige
Copy link
Owner

Are you trying to use a different Attention Processor other than the default one? Currently, the implementation of token reweighting only supports the normal attention computation.

Also, may I know the command you used to run?

@huangswmt
Copy link

i got the same error,when I first git this project.

@songweige
Copy link
Owner

Thank you for trying it out! Could you please provide more information so that I can reproduce the error? For example, could you please provide the results of conda list?

@wwj1013
Copy link

wwj1013 commented Oct 9, 2023

My environment is torch=2.0.1+cu118, and the rest of the installation packages are the same as the requirements in your configuration file. Then, the relevant model SDv1.5 of the hugging face is downloaded locally (I'm not sure if it will make a difference), and the command to run is python gradio_app.py

@songweige
Copy link
Owner

There was an issue when using PyTorch with version >= 2.0.0. I have made an update to fix it. Please let me know if the issue is still there! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants