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

Serious code bug in your demo_gr.py !!! #402

Open
xyLiu339 opened this issue Jan 21, 2025 · 0 comments
Open

Serious code bug in your demo_gr.py !!! #402

xyLiu339 opened this issue Jan 21, 2025 · 0 comments

Comments

@xyLiu339
Copy link

There is a serious code bug in the demo_gr. When handling the img2img task, at line 74, after scaling the pixel colors from 0 to 255 down to 0 to 1, it fails to normalize them to the range of -1 to 1. As a result, there is data deviation in the subsequent VAE encoding process and subsequent processes, causing the generated image to have an obvious color shift although it shows fidelity to the original image in terms of content. This phenomenon has been proven through experiments. In contrast, the input image is processed correctly in demo_st (normalized to the range of -1 to 1). If anyone encounters the same problem, please provide your feedback. Thank you.
Samples are provided below.

(a) This is the condition image input.
Image
(b) Using your flux/demo_gr without fixing the bug conditioned on (a) (New prompt: People are happy playing on the beach.)
Image
(c) Using my correct flux/demo_gr conditioned on (a) (New prompt: People are happy playing on the beach.)
Image

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

1 participant