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

[Bug]: parameter "default_cfg_tsnr" does not change when changing preset #2684

Closed
2 of 5 tasks
attyru opened this issue Mar 31, 2024 · 3 comments
Closed
2 of 5 tasks
Labels
enhancement New feature or request
Milestone

Comments

@attyru
Copy link

attyru commented Mar 31, 2024

Checklist

  • The issue has not been resolved by following the troubleshooting guide
  • The issue exists on a clean installation of Fooocus
  • The issue exists in the current version of Fooocus
  • The issue has not been reported before recently
  • The issue has been reported before but has not been fixed yet

What happened?

I have several presets created, each of them has different parameter values. When changing a preset in the interface, all parameters are loaded correctly except for "default_cfg_tsnr", it still has the previous value.

Steps to reproduce the problem

  1. Create new preset (or copy existing), open in notepad.
  2. Add "default_cfg_tsnr": 3.0, save.
  3. Restart or run Fooocus in web interface open "Advanced" tab and change "CFG Mimicking from TSNR" on 1,0.
  4. Go to the "Settings" tab and change preset on created in 1.)
  5. Open "Advanced" tab again - "CFG Mimicking from TSNR" not changed.

What should have happened?

corectly load "default_cfg_tsnr" parameter from preset json

What browsers do you use to access Fooocus?

Microsoft Edge

Where are you running Fooocus?

Locally

What operating system are you using?

Windows 11

Console logs

none

Additional information

No response

@attyru attyru added bug Something isn't working triage This needs an (initial) review labels Mar 31, 2024
@mashb1t
Copy link
Collaborator

mashb1t commented Apr 1, 2024

It's not necessarily a bug, but a feature as it is not in the array

Fooocus/modules/config.py

Lines 474 to 497 in e2f9bcb

possible_preset_keys = {
"default_model": "base_model",
"default_refiner": "refiner_model",
"default_refiner_switch": "refiner_switch",
"previous_default_models": "previous_default_models",
"default_loras_min_weight": "default_loras_min_weight",
"default_loras_max_weight": "default_loras_max_weight",
"default_loras": "<processed>",
"default_cfg_scale": "guidance_scale",
"default_sample_sharpness": "sharpness",
"default_sampler": "sampler",
"default_scheduler": "scheduler",
"default_overwrite_step": "steps",
"default_performance": "performance",
"default_image_number": "image_number",
"default_prompt": "prompt",
"default_prompt_negative": "negative_prompt",
"default_styles": "styles",
"default_aspect_ratio": "resolution",
"default_save_metadata_to_images": "default_save_metadata_to_images",
"checkpoint_downloads": "checkpoint_downloads",
"embeddings_downloads": "embeddings_downloads",
"lora_downloads": "lora_downloads"
}
and could be added.
It may already work when also setting adaptive_cfg in a preset in addition with default_cfg_tsnr with the same value. Please check.

@mashb1t mashb1t added enhancement New feature or request feedback pending Waiting for further information and removed triage This needs an (initial) review labels Apr 1, 2024
@attyru
Copy link
Author

attyru commented Apr 1, 2024

made it this way:
image

the value still doesn't change

@mashb1t mashb1t removed bug Something isn't working feedback pending Waiting for further information labels Apr 13, 2024
@mashb1t
Copy link
Collaborator

mashb1t commented May 26, 2024

implemented in #2990

@mashb1t mashb1t closed this as completed May 26, 2024
@mashb1t mashb1t added this to the 2.4.0 milestone May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants