-
Notifications
You must be signed in to change notification settings - Fork 54
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
Getting attribute error trying to use with Stable Diffusion #18
Comments
Same issue for me and the issue persist on a fresh install of Automatic1111 too |
Thank both of you so much for the issues! Let's resolve it together 😀 |
Of course !
|
It seems that you are experiencing the same problem as this issue. You could try the possible solution described below:
We're sorry that since the user who raised the issue above did not provide feedback on whether the solution we had suggestted worked, we have not yet updated the repository with the corresponding improvements. If any of you can confirm the validity of the solution, we'd appreciate it! |
Thanks for the support to get started :) I made the modification of the script but the problem remains the same with exactly the same error. I can only consider a bad installation since the script doesn't seem to find the files it needs. However my ImageReward folder is located in the same folder as stable-diffusion. Could the fact that the whole thing is installed on disk I: instead of C: be the cause? |
Sorry for my earlier lapse in judgment, your errors are not the same. I have experimented with Windows 10 and reproduced your error. If you started SD Web UI with the To resolve this error, you need to make sure that "image-reward" is installed in venv Python environment. To do this, try:
|
Not bad ! There is better. I had to change the script back to default. Well, now the generation is done correctly but when it is finished, a new error has appeared.
|
This seems a little weird. I'm sorry that I failed to reproduce it in my own environment. To resolve this error, could you kindly provide the image generation settings when you encountered this error? For example, a screenshot of the entire SD Web UI interface would help. In addition, you might want to try the following modification in the Replace the existing code: img.info["parameters"] += f"\n ImageReward Score: {score:.4f}" with the following: if img.info.get("parameters") is None:
img.info["parameters"] = f"ImageReward Score: {score:.4f}"
else:
img.info["parameters"] += f"\n ImageReward Score: {score:.4f}" This modification tries to ensure that the ImageReward Score information is properly added to the Please let us know if this resolves the issue. |
I have a similar error, tried the fixes here, imagereward is installed and showing when running pip show, but still get this error...
Tried various fixes nothing seems to work. |
Thank you so much for the issue! Let's resolve it together 😀 Usually, I guess that the path of image directory makes little difference. There might be other problems. Could you please provide the full error message printed in the terminal? |
Hi :) Please consider the following, add this instructions to https://github.com/THUDM/ImageReward#integration-into-stable-diffusion-web-ui or directly from
|
Thank you very much for the suggestion! We have actually added similar code to ImageReward/sdwebui/image_reward.py Lines 20 to 31 in 9e96d39
|
I followed the instructions to use ImageReward with Stable Diffusion's webui, but I get the following error:
AttributeError: module 'ImageReward' has no attribute 'load'
The text was updated successfully, but these errors were encountered: