Giter VIP home page Giter VIP logo

Comments (30)

That-Dude avatar That-Dude commented on July 2, 2024 3

It would be convenient to just drag a PNG generated with your fork into the GUI and have it populated, that's the expected behaviour from the current userbase.

from fooocus-mre.

MoonRide303 avatar MoonRide303 commented on July 2, 2024 2

@theelefant log file is feature added by original Fooocus author and he mentioned still working on it. But temporary HTML file aren't really most convenient way for loading prompt from them, so I don't think this log file will be used like that.

I like the general idea, though, so (when I'll have some spare time) I will look into ComfyUI and try figuring out how loading settings from PNG / JSON files is done there (as well as restoring previous session state). But Comfy uses different UI framework, and it might not so trivial to port this functionality to Fooocus - so no promises.

from fooocus-mre.

That-Dude avatar That-Dude commented on July 2, 2024 2

Jason who? 😀

But those options should probably be tickboxes rather than radio buttons.

from fooocus-mre.

theelefant avatar theelefant commented on July 2, 2024 1

Log files have a list of generated inages. How would it knows which one you want to load. Better would be load a specific PNG with metada

@barepixels I was referring to the JSON log introduced by this repository and not the HTML one from the original repository.

from fooocus-mre.

MoonRide303 avatar MoonRide303 commented on July 2, 2024 1

@barepixels I have initial version of loading prompt parameters from both JSON and PNG files working - should be ready to use today or tomorrow.

from fooocus-mre.

barepixels avatar barepixels commented on July 2, 2024 1

I will make a feature request at lllyasviel/Fooocus

from fooocus-mre.

MoonRide303 avatar MoonRide303 commented on July 2, 2024 1

Done & merged:
image

from fooocus-mre.

barepixels avatar barepixels commented on July 2, 2024

Log files have a list of generated inages. How would it knows which one you want to load. Better would be load a specific PNG with metada

from fooocus-mre.

MoonRide303 avatar MoonRide303 commented on July 2, 2024

@That-Dude Yeah, I really liked that in ComfyUI myself (as well as remembering UI state after the restart) - those are really nice quality-of-life features in Comfy :).

from fooocus-mre.

barepixels avatar barepixels commented on July 2, 2024

vote

from fooocus-mre.

barepixels avatar barepixels commented on July 2, 2024

Dude, you are my hero

from fooocus-mre.

theelefant avatar theelefant commented on July 2, 2024

@barepixels I have initial version of loading prompt parameters from both JSON and PNG files working - should be ready to use today or tomorrow.

@MoonRide303 Awesome! Many thanks!

from fooocus-mre.

MoonRide303 avatar MoonRide303 commented on July 2, 2024

Just merged into moonride-main. It should work on metadata saved by current version, but might not be compatible with images generated with older versions. Let me know if it works for you.

from fooocus-mre.

barepixels avatar barepixels commented on July 2, 2024

REPORTING
After updating, I generate a new image. Then quit/relaunch Fooocus
Load the latest generate PNG.
All settings restored :-)

But three didn't
Advance check box is unchecked before it was set as check
Image Number is at 2, before it was set at 1
Save Metadata is set at Disable before it was set at PNG

It's kinda annoying having to change those three EVERYTIME I launch Fooocus. Not elegant and time waster

from fooocus-mre.

barepixels avatar barepixels commented on July 2, 2024

Am happy to report: Using "deference mode" in Photoshop to compare. The image generated before and image generated after loading PNG are exactly the same, down to pixel level

You did great MoonRide303. Thank you

from fooocus-mre.

MoonRide303 avatar MoonRide303 commented on July 2, 2024

@barepixels Settings like Saving metadata option, and number of generated images are related to UI itself, not particular prompt / image. I agree it would be nice to have last UI settings automatically restored, but that's a bit different functionality. Btw. I found one bug, related to switch slider value loading - should be fixed now.

from fooocus-mre.

That-Dude avatar That-Dude commented on July 2, 2024

@barepixels I have initial version of loading prompt parameters from both JSON and PNG files working - should be ready to use today or tomorrow.

You're on fire!

from fooocus-mre.

That-Dude avatar That-Dude commented on July 2, 2024

@barepixels Settings like Saving metadata option, and number of generated images are related to UI itself, not particular prompt / image. I agree it would be nice to have last UI settings automatically restored, but that's a bit different functionality. Btw. I found one bug, related to switch slider value loading - should be fixed now.

How about exposing 'save-metadata-on' as a command line switch. Or just default it to on. I think you're flying solo with that patch anyway.

from fooocus-mre.

MoonRide303 avatar MoonRide303 commented on July 2, 2024

@That-Dude Yeah, it would be useful feature - but I'd rather do it as extension for save/restore UI state made in vanilla Fooocus. Let's first give lllyasviel a chance to speak how he sees it, to avoid duplicating work.

from fooocus-mre.

barepixels avatar barepixels commented on July 2, 2024

Not wanting to RISK generating images without saving metadata to PNG, I have hard code in Fooocus-MoonRide/webui.py

save_metadata = gr.Radio(label='Save Metadata', choices=['Disabled', 'JSON', 'PNG'], value='PNG')

While at the same file (webui.py) I change the default "Image Number" from 2 to 1

image_number = gr.Slider(label='Image Number', minimum=1, maximum=32, step=1, value=1)

Could not figure how to set "Advanced" to default "Checked"

from fooocus-mre.

MoonRide303 avatar MoonRide303 commented on July 2, 2024

@barepixels If you want to use quick hack, you can change (in webui.py)

                advanced_checkbox = gr.Checkbox(label='Advanced', value=False, container=False)
        with gr.Column(scale=0.5, visible=False) as right_col:

to

                advanced_checkbox = gr.Checkbox(label='Advanced', value=True, container=False)
        with gr.Column(scale=0.5, visible=True) as right_col:

from fooocus-mre.

barepixels avatar barepixels commented on July 2, 2024

Brother, it works. Thank you

No more annoying having to change these three EVERYTIME I launch Fooocus

Advanced check box is always on
Image Number is at 1
Save Metadata set at PNG as default

from fooocus-mre.

barepixels avatar barepixels commented on July 2, 2024

May I suggest to add a link to this fork at the footer. Or show me how.

link to git hub

from fooocus-mre.

theelefant avatar theelefant commented on July 2, 2024

Could we consider adding a fourth option, "JASON+PNG", in the Advanced Tab?

from fooocus-mre.

theelefant avatar theelefant commented on July 2, 2024

Voorhees :)

But yes, tickboxes would be better.

from fooocus-mre.

That-Dude avatar That-Dude commented on July 2, 2024

Done & merged: image

I'm concerned that you're not getting enough sleep Mr MoonRide :-)

from fooocus-mre.

MoonRide303 avatar MoonRide303 commented on July 2, 2024

@That-Dude Yeah, I could probably use some more of that :).

@barepixels You can check out latest version of moonride-main - I've added loading basic UI settings from JSON file (settings.json), it looks like that:
{"advanced_mode": false, "image_number": 2, "save_metadata_json": false, "save_metadata_png": false}
you can set your preferred values there, instead of having to edit the code.

from fooocus-mre.

barepixels avatar barepixels commented on July 2, 2024

settings.json work. However, I did have to change the file name from settings-example.json to settings.json

After making changes to settings.json, one must quit/relaunch run-moonride.bat

from fooocus-mre.

barepixels avatar barepixels commented on July 2, 2024

TIP: When load metadata from PNG one must make sure the "Random" check box is unchecked to insure the original seed is being used.

I suppose when choosing to load metadata from PNG "Random" checkbox should be automatically set as unchecked. But this is not a high priority for me.

Also wish to confirm metadata from yesterday's generated PNG still working.

from fooocus-mre.

MoonRide303 avatar MoonRide303 commented on July 2, 2024

@barepixels Good catch - I just corrected this random seed checkbox - should automatically untick now after loading prompt files (either PNG or JSON) that include seed value. Sample settings file is provided under different name is to avoid conflicts with changes coming from git to that file (which would happen if settings.json was edited locally by you, and then I would add some more fields to it, etc.).

Seems to be working pretty fine now, so... I am closing it :).

from fooocus-mre.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.