k-l-lambda / stylegan-web

A web porting for NVlabs' StyleGAN.
160 stars 41 forks source link

Why is the interface called three times when merging pictures? #1

Closed lance0916 closed 4 years ago

lance0916 commented 4 years ago

@app.route('/generate', methods=['GET'])

k-l-lambda commented 4 years ago

Thanks for your report. @snailwudada

Did you open the browser inspector? I notice that when I'm in the chrome inspector tab Network, I will receive twice generate requests, without it, it's normal, only once. And according to browser network log, only one request sent, so this may be not a bug. Maybe some http cache header should be set to prevent unnecessary payload.

By the way, I have suffered the verbose Flask log a lot. Welcome to any refining advice.

lance0916 commented 4 years ago

Thank you, I understand. The generate interface generates images based on the latentCode. When it is on the merger page, a new latentCode is calculated based on the latentCode of the two images, and then the new latentCode is used to call the generate interface to generate the image.

k-l-lambda commented 4 years ago

Yes, initial requests are necessary.