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]: config.txt the path not support relative path #2940

Closed
5 tasks
andyhebear opened this issue May 17, 2024 · 1 comment
Closed
5 tasks

[Bug]: config.txt the path not support relative path #2940

andyhebear opened this issue May 17, 2024 · 1 comment
Labels
bug Something isn't working invalid This doesn't seem right

Comments

@andyhebear
Copy link

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?

Python 3.10.11 (tags/v3.10.11:7d4cc5a, Apr 5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]
Fooocus version: 2.3.1
Failed to load config key: {"path_checkpoints": ["..\..\checkpoints"]} is invalid or does not exist; will use {"path_checkpoints": ["../models/checkpoints/"]} instead.
Failed to load config key: {"path_loras": ["..\..\loras"]} is invalid or does not exist; will use {"path_loras": ["../models/loras/"]} instead.
Failed to load config key: {"path_embeddings": "..\models\embeddings"} is invalid or does not exist; will use {"path_embeddings": "../models/embeddings/"} instead.
Failed to load config key: {"path_vae_approx": "..\models\vae_approx"} is invalid or does not exist; will use {"path_vae_approx": "../models/vae_approx/"} instead.
Failed to load config key: {"path_upscale_models": "..\models\upscale_models"} is invalid or does not exist; will use {"path_upscale_models": "../models/upscale_models/"} instead.
Failed to load config key: {"path_inpaint": "..\models\inpaint"} is invalid or does not exist; will use {"path_inpaint": "../models/inpaint/"} instead.
Failed to load config key: {"path_controlnet": "..\models\controlnet"} is invalid or does not exist; will use {"path_controlnet": "../models/controlnet/"} instead.
Failed to load config key: {"path_clip_vision": "..\models\clip_vision"} is invalid or does not exist; will use {"path_clip_vision": "../models/clip_vision/"} instead.
Failed to load config key: {"path_fooocus_expansion": "..\models\prompt_expansion\fooocus_expansion"} is invalid or does not exist; will use {"path_fooocus_expansion": "../models/prompt_expansion/fooocus_expansion"} instead.
Failed to load config key: {"path_wildcards": "..\wildcards"} is invalid or does not exist; will use {"path_wildcards": "../wildcards/"} instead.
[Cleanup] Attempting to delete content of temp dir C:\Users\rains\AppData\Local\Temp\fooocus
[Cleanup] Cleanup successful
Downloading: "https://huggingface.co/lllyasviel/fav_models/resolve/main/fav/juggernautXL_v8Rundiffusion.safetensors" t

Steps to reproduce the problem

修改config.txt文件的 key对应value 的路径值为相对路径,以便与其他UI框架共享 checkpoints 与loras,运行后发生错误

What should have happened?

{
"path_checkpoints": [
"..\..\checkpoints"
],
"path_loras": [
"..\..\loras"
],
"path_embeddings": "..\models\embeddings",
"path_vae_approx": "..\models\vae_approx",
"path_upscale_models": "..\models\upscale_models",
"path_inpaint": "..\models\inpaint",
"path_controlnet": "..\models\controlnet",
"path_clip_vision": "..\models\clip_vision",
"path_fooocus_expansion": "..\models\prompt_expansion\fooocus_expansion",
"path_wildcards": "..\wildcards",
"path_outputs": "..\..\outputs"
}

What browsers do you use to access Fooocus?

No response

Where are you running Fooocus?

None

What operating system are you using?

No response

Console logs

Python 3.10.11 (tags/v3.10.11:7d4cc5a, Apr  5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]
Fooocus version: 2.3.1
Failed to load config key: {"path_checkpoints": ["..\\..\\checkpoints"]} is invalid or does not exist; will use {"path_checkpoints": ["../models/checkpoints/"]} instead.
Failed to load config key: {"path_loras": ["..\\..\\loras"]} is invalid or does not exist; will use {"path_loras": ["../models/loras/"]} instead.
Failed to load config key: {"path_embeddings": "..\\models\\embeddings"} is invalid or does not exist; will use {"path_embeddings": "../models/embeddings/"} instead.
Failed to load config key: {"path_vae_approx": "..\\models\\vae_approx"} is invalid or does not exist; will use {"path_vae_approx": "../models/vae_approx/"} instead.
Failed to load config key: {"path_upscale_models": "..\\models\\upscale_models"} is invalid or does not exist; will use {"path_upscale_models": "../models/upscale_models/"} instead.
Failed to load config key: {"path_inpaint": "..\\models\\inpaint"} is invalid or does not exist; will use {"path_inpaint": "../models/inpaint/"} instead.
Failed to load config key: {"path_controlnet": "..\\models\\controlnet"} is invalid or does not exist; will use {"path_controlnet": "../models/controlnet/"} instead.
Failed to load config key: {"path_clip_vision": "..\\models\\clip_vision"} is invalid or does not exist; will use {"path_clip_vision": "../models/clip_vision/"} instead.
Failed to load config key: {"path_fooocus_expansion": "..\\models\\prompt_expansion\\fooocus_expansion"} is invalid or does not exist; will use {"path_fooocus_expansion": "../models/prompt_expansion/fooocus_expansion"} instead.
Failed to load config key: {"path_wildcards": "..\\wildcards"} is invalid or does not exist; will use {"path_wildcards": "../wildcards/"} instead.
[Cleanup] Attempting to delete content of temp dir C:\Users\rains\AppData\Local\Temp\fooocus
[Cleanup] Cleanup successful

Additional information

No response

@andyhebear andyhebear added bug Something isn't working triage This needs an (initial) review labels May 17, 2024
@mashb1t
Copy link
Collaborator

mashb1t commented May 17, 2024

Relative paths are supported but the target paths you chose are probably not valid.
Please ensure the path is correct. Keep in mind that you need to use .. for parent directory and . for current directory.

Example:

  • Fooocus
    • models
    • config.txt
  • stable-diffusion-webui
    • models
      • Lora
"path_checkpoints": ".\\models\\checkpoints",
"path_loras": "..\\stable-diffusion-webui\\models\\Lora",

FYI path_checkpoints and path_loras can both be written in json array syntax as they support multiple paths.

@mashb1t mashb1t closed this as not planned Won't fix, can't repro, duplicate, stale May 17, 2024
@mashb1t mashb1t added invalid This doesn't seem right and removed triage This needs an (initial) review labels May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants