MoonRide303 / Fooocus-MRE

Focus on prompting and generating
GNU General Public License v3.0
954 stars 56 forks source link

Notify error in page when click Generate button. #113

Closed janl99 closed 1 year ago

janl99 commented 1 year ago

show error message: Expecting value: line 1 column 1 (char 0) fooocus-error-1 fooocus-error-2 fooocus-error-3

MoonRide303 commented 1 year ago

@janl99 Could you please try downloading last release (v2.0.19 - the small one, without env, as env didn't change), replace content of Fooocus-MRE with it, and start again? First run-mre-no-update.bat to see if v2.0.19 is fine, and then run-mre.bat with update - to check v2.0.78.1.

janl99 commented 1 year ago

I download v2.0.19 no env version, and repalce content for Fooocus-MRE. run-mre-no-update.bat the error is same.

janl99 commented 1 year ago

I will try to download the last release v2.0.19 with env, and then run-mre-no-update.bat to try. check is my env's problem.

janl99 commented 1 year ago

I'm true, download last release v2.0.19 with env , and unzip it. run run-mre-no-update.bat, show the error same. so, the error is only for me?

janl99 commented 1 year ago

but no error message show in fooocus's console. and error show in brower's console, so that's a javascript error, but i don't find the .js file in Fooocus-MRE dir. how can replace the front end js files, and where 's download it?

MoonRide303 commented 1 year ago

@janl99 It looks like js from webui.py (_js='playNotification()') - but it works fine on all my test machines. You can try:

  1. Using incognito mode.
  2. Disabling browser extensions.
  3. Using different browser (current Chrome and Edge without extensions work fine - at least on Windows).
janl99 commented 1 year ago

I have try: 1, chrome 116.0.5845.188, 2, firefox 117.0.1, 3, edge 92.0.902.67 it is show same error. I think the frontend .js file is lost or bad, how can replace items.

MoonRide303 commented 1 year ago

@janl99 It uses function definition from javascript/scrip.js. It works (play sounds if notification sound file is present) in both Chrome 117 and Edge 117, but I see JS error in the console, too: image

I will have to look into it (I don't like errors like that), but it's still strange it works on my PC, and doesn't on yours.

MoonRide303 commented 1 year ago

@janl99 Okay, I think I've found source of the problem - please try restarting with update to pull latest version, and check if it helped.

janl99 commented 1 year ago

`# webui.py line number 503

generate_button.click(fn=refresh_seed, inputs=[seed_random, image_seed], outputs=image_seed) \

    #     .then(fn=verify_input, inputs=[img2img_mode, control_lora_canny, input_gallery, revision_gallery, output_gallery], outputs=[img2img_mode, control_lora_canny, input_gallery]) \
    #     .then(fn=verify_revision, inputs=[revision_mode, input_gallery, revision_gallery, output_gallery], outputs=[revision_mode, revision_gallery]) \
    #     .then(fn=generate_clicked, inputs=ctrls + [input_gallery, revision_gallery, keep_input_names],
    #         outputs=[generate_button, stop_button, progress_html, progress_window, gallery_holder, output_gallery, metadata_viewer, gallery_tabs]) \
    #     .then(fn=get_current_links, inputs=None, outputs=links) \
    #     .then(fn=None, _js='playNotification()')

    # todo: try 1
    # call playNotification() js function can run. that is work fine.
    # generate_button.click(fn=None, _js='playNotification()')
    # todo: try 2
    # call refresh_seed python functon, that is not work, show error message: 
    '''
    error
    Expecting value: line 1 column 1 (char 0)
    '''
    generate_button.click(fn=refresh_seed, inputs=[seed_random, image_seed], outputs=image_seed)

    # todo: try 3
    # i have reinstall gradio, or upgrade gradio , show same error message. 

    # todo: try 4 
    # how can i try?`
MoonRide303 commented 1 year ago

@janl99 Just unzip last release again (if you didn't make any changes in env, then you can use the small one, without env), and start it via run-mre.bat - it should updated automatically to latest version with the fix.

janl99 commented 1 year ago

@janl99 Just unzip last release again (if you didn't make any changes in env, then you can use the small one, without env), and start it via run-mre.bat - it should updated automatically to latest version with the fix.

thanks, follow you step, the ui page is work fine. But when Generate Image , it's also show error message. But diffent before show error message, now can checked the Advanced checkboxs and show tabs, before can't.

MoonRide303 commented 1 year ago

@janl99 I will need some more details - like error message, log, or screenshot.