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

UnboundLocalError: local variable 'img2' referenced before assignment #69

Closed
dawancha opened this issue Sep 12, 2023 · 2 comments
Closed

Comments

@dawancha
Copy link

Just updated to the newest version,it got error:
File "/mnt/workspace/stable-diffusion-webui/extensions/sd-webui-EasyPhoto/scripts/easyphoto_train.py", line 78, in easyphoto_train_forward
image = process_rotate_image(image).convert("RGB")
File "/mnt/workspace/stable-diffusion-webui/extensions/sd-webui-EasyPhoto/scripts/easyphoto_train.py", line 229, in process_rotate_image
return img2
UnboundLocalError: local variable 'img2' referenced before assignment

@dawancha
Copy link
Author

dawancha commented Sep 12, 2023

I debugged it and found that the sentence of code "exif.get(orientation, None)" returns None.

@wuziheng
Copy link
Collaborator

Thanks for your debug, we now fixed it in #PR70 and we will enhance our UT before PR

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

2 participants