ljleb / sd-webui-freeu

a1111 implementation of https://github.com/ChenyangSi/FreeU
MIT License
303 stars 16 forks source link

Req: Presets JSON #48

Closed torridgristle closed 4 months ago

torridgristle commented 4 months ago

I'm trying to create a presets JSON file with the right formatting so I can save the updated values, but I can't seem to get it right despite copying the default presets from the script. Could you upload the presets json to the github? It's currently in .gitignore

ljleb commented 4 months ago

The presets.json file is for all user defined presets. the default presets are loaded from the code instead.

The TL;DR of the formatting is that it should be the same exact format that the API uses.

If you really want to a preset template that you want to modify programmatically later, you can alternatively start the webui with the extension installed and use the UI to save it. It should use the appropriate preset format.

To make this quicker for you, here is the contents of my presets.json:

{
    "old sd1.4": {
        "start_ratio": 0,
        "stop_ratio": 1,
        "transition_smoothness": 0,
        "version": "1",
        "stage_infos": [
            {
                "backbone_factor": 1.1,
                "skip_factor": 0.6
            },
            {
                "backbone_factor": 1.2,
                "skip_factor": 0.4
            },
            {}
        ]
    },
    "old sd2.1": {
        "start_ratio": 0,
        "stop_ratio": 1,
        "transition_smoothness": 0,
        "version": "1",
        "stage_infos": [
            {
                "backbone_factor": 1.1,
                "skip_factor": 0.6
            },
            {
                "backbone_factor": 1.2,
                "skip_factor": 0.4
            },
            {}
        ]
    },
    "old sdxl": {
        "start_ratio": 0,
        "stop_ratio": 1,
        "transition_smoothness": 0,
        "version": "1",
        "stage_infos": [
            {
                "backbone_factor": 1.1,
                "skip_factor": 0.6
            },
            {
                "backbone_factor": 1.2,
                "skip_factor": 0.4
            },
            {}
        ]
    }
}