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]: Generator Randomly stops, log says: TypeError: expected str, bytes or os.PathLike object, not list #2973

Closed
3 of 5 tasks
MeAmCat opened this issue May 21, 2024 · 2 comments
Labels
bug Something isn't working can't reproduce This can not be reproduced feedback pending Waiting for further information wontfix / cantfix This will not be worked on

Comments

@MeAmCat
Copy link

MeAmCat commented May 21, 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?

Upon generating an image I get the following error:"
File "C:\AI generation\Fooocus_win64_2-1-831\Fooocus\modules\private_logger.py", line 18, in get_current_html_path
date_string, local_temp_filename, only_name = generate_temp_filename(folder=modules.config.path_outputs,
File "C:\AI generation\Fooocus_win64_2-1-831\Fooocus\modules\util.py", line 162, in generate_temp_filename
result = os.path.join(folder, date_string, filename)
File "ntpath.py", line 104, in join
TypeError: expected str, bytes or os.PathLike object, not list
(I am unsure if there should be more information, please let me know where to find the full log.)
I have tried disabling all styles,loras, and switching base model.
The image preview loads but does not fully complete. Even with an empty prompt.

Upon further inspection it seems that the developer setting "Save Metadata to Images" is causing this.
Nevermind, It seems my config file was corrupted somehow. Anyways all that I have changed was the "example_inpaint_prompts".
Note: I was not using the inpainting function after the error occurred.

I hope you can do something with this information.

Steps to reproduce the problem

  1. Make a config file with the "example_inpaint_prompts" variable and add some information.
  2. Run any prompt or even nothing.
  3. The prompt will crash at the end of generation.

What should have happened?

Fooocus should have fully generated my image.

What browsers do you use to access Fooocus?

Microsoft Edge, Other

Where are you running Fooocus?

Locally

What operating system are you using?

Windows 11 Pro (Different edition, similar to enterprise)

Console logs

C:\AI generation\Fooocus_win64_2-1-831>.\python_embeded\python.exe -s Fooocus\entry_with_update.py
Already up-to-date
Update succeeded.
[System ARGV] ['Fooocus\\entry_with_update.py']
Python 3.10.9 (tags/v3.10.9:1dd9be6, Dec  6 2022, 20:01:21) [MSC v.1934 64 bit (AMD64)]
Fooocus version: 2.3.1
[Cleanup] Attempting to delete content of temp dir C:\Users\▯▯▯▯▯▯\AppData\Local\Temp\fooocus
[Cleanup] Cleanup successful
Total VRAM 12288 MB, total RAM 32589 MB
Set vram state to: NORMAL_VRAM
Always offload VRAM
Device: cuda:0 NVIDIA GeForce RTX 3060 : native
VAE dtype: torch.bfloat16
Using pytorch cross attention
Refiner unloaded.
Running on local URL:  http://127.0.0.1:7865

To create a public link, set `share=True` in `launch()`.
IMPORTANT: You are using gradio version 3.41.2, however version 4.29.0 is available, please upgrade.
--------
model_type EPS
UNet ADM Dimension 2816
Using pytorch attention in VAE
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
Using pytorch attention in VAE
extra {'cond_stage_model.clip_l.logit_scale', 'cond_stage_model.clip_l.text_projection', 'cond_stage_model.clip_g.transformer.text_model.embeddings.position_ids'}
Base model loaded: C:\AI generation\Fooocus_win64_2-1-831\Fooocus\models\checkpoints\juggernautXL_v8Rundiffusion.safetensors
Request to load LoRAs [['sd_xl_offset_example-lora_1.0.safetensors', 0.1], ['None', 1.0], ['None', 1.0], ['None', 1.0], ['None', 1.0]] for model [C:\AI generation\Fooocus_win64_2-1-831\Fooocus\models\checkpoints\juggernautXL_v8Rundiffusion.safetensors].
Loaded LoRA [C:\AI generation\Fooocus_win64_2-1-831\Fooocus\models\loras\sd_xl_offset_example-lora_1.0.safetensors] for UNet [C:\AI generation\Fooocus_win64_2-1-831\Fooocus\models\checkpoints\juggernautXL_v8Rundiffusion.safetensors] with 788 keys at weight 0.1.
Fooocus V2 Expansion: Vocab with 642 words.
Fooocus Expansion engine loaded for cuda:0, use_fp16 = True.
Requested to load SDXLClipModel
Requested to load GPT2LMHeadModel
Loading 2 new models
Loaded preset: C:\AI generation\Fooocus_win64_2-1-831\Fooocus\presets\realistic PN.json
[Fooocus Model Management] Moving model(s) has taken 0.45 seconds
Started worker with PID 5380
App started successful. Use the app with http://127.0.0.1:7865/ or 127.0.0.1:7865
Loaded preset: C:\AI generation\Fooocus_win64_2-1-831\Fooocus\presets\realistic.json
[Parameters] Adaptive CFG = 7
[Parameters] Sharpness = 2
[Parameters] ControlNet Softness = 0.25
[Parameters] ADM Scale = 1.5 : 0.8 : 0.3
[Parameters] CFG = 3.0
[Parameters] Seed = 7785474341207679933
[Parameters] Sampler = dpmpp_2m_sde_gpu - karras
[Parameters] Steps = 30 - 15
[Fooocus] Initializing ...
[Fooocus] Loading models ...
Refiner unloaded.
model_type EPS
UNet ADM Dimension 2816
Using pytorch attention in VAE
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
Using pytorch attention in VAE
extra {'cond_stage_model.clip_l.logit_scale', 'cond_stage_model.clip_l.text_projection', 'cond_stage_model.clip_g.transformer.text_model.embeddings.position_ids'}
Base model loaded: C:\AI generation\Fooocus_win64_2-1-831\Fooocus\models\checkpoints\realisticStockPhoto_v20.safetensors
Request to load LoRAs [['SDXL_FILM_PHOTOGRAPHY_STYLE_BetaV0.4.safetensors', 0.25], ['None', 1.0], ['None', 1.0], ['None', 1.0], ['None', 1.0]] for model [C:\AI generation\Fooocus_win64_2-1-831\Fooocus\models\checkpoints\realisticStockPhoto_v20.safetensors].
Loaded LoRA [C:\AI generation\Fooocus_win64_2-1-831\Fooocus\models\loras\SDXL_FILM_PHOTOGRAPHY_STYLE_BetaV0.4.safetensors] for UNet [C:\AI generation\Fooocus_win64_2-1-831\Fooocus\models\checkpoints\realisticStockPhoto_v20.safetensors] with 788 keys at weight 0.25.
Loaded LoRA [C:\AI generation\Fooocus_win64_2-1-831\Fooocus\models\loras\SDXL_FILM_PHOTOGRAPHY_STYLE_BetaV0.4.safetensors] for CLIP [C:\AI generation\Fooocus_win64_2-1-831\Fooocus\models\checkpoints\realisticStockPhoto_v20.safetensors] with 264 keys at weight 0.25.
Requested to load SDXLClipModel
Loading 1 new model
[Fooocus Model Management] Moving model(s) has taken 1.24 seconds
[Fooocus] Processing prompts ...
[Fooocus] Encoding positive #1 ...
[Fooocus] Encoding positive #2 ...
[Fooocus] Encoding negative #1 ...
[Fooocus] Encoding negative #2 ...
[Parameters] Denoising Strength = 1.0
[Parameters] Initial Latent shape: Image Space (1152, 896)
Preparation time: 6.69 seconds
[Sampler] refiner_swap_method = joint
[Sampler] sigma_min = 0.0291671771556139, sigma_max = 14.614643096923828
Requested to load SDXL
Loading 1 new model
[Fooocus Model Management] Moving model(s) has taken 1.67 seconds
100%|██████████████████████████████████████████████████████████████████████████████████| 30/30 [00:23<00:00,  1.28it/s]
Requested to load AutoencoderKL
Loading 1 new model
[Fooocus Model Management] Moving model(s) has taken 0.10 seconds
Image generated with private log at: C:\AI generation\Fooocus_win64_2-1-831\Fooocus\outputs\2024-05-21\log.html
Generating and saving time: 26.39 seconds
[Sampler] refiner_swap_method = joint
[Sampler] sigma_min = 0.0291671771556139, sigma_max = 14.614643096923828
Requested to load SDXL
Loading 1 new model
[Fooocus Model Management] Moving model(s) has taken 1.06 seconds
100%|██████████████████████████████████████████████████████████████████████████████████| 30/30 [00:22<00:00,  1.32it/s]
Requested to load AutoencoderKL
Loading 1 new model
Image generated with private log at: C:\AI generation\Fooocus_win64_2-1-831\Fooocus\outputs\2024-05-21\log.html
Generating and saving time: 24.93 seconds
Requested to load SDXLClipModel
Requested to load GPT2LMHeadModel
Loading 2 new models
Total time: 58.05 seconds
[Fooocus Model Management] Moving model(s) has taken 0.59 seconds

Additional information

I have a different version of Windows, however this hasnt impacted most programs and I dont believe this is causing the issue.

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

mashb1t commented May 21, 2024

Hey @MeAmCat,
i can't reproduce the issue, everything works fine.

Fooocus\modules\private_logger.py", line 18, in get_current_html_path

This indicates that your paths were messed up. Is it still not working or can this issue be closed?

Screenshot (working):
screencapture-localhost-7865-2024-05-21-22_51_24

config.txt

{
    "default_save_metadata_to_images": true,
    "default_metadata_scheme": "fooocus",
    "metadata_created_by": "mashb1t",
    "example_inpaint_prompts": [
        "freckles",
        "foo",
        "bar",
        "baz"
    ]
}

@mashb1t mashb1t added wontfix / cantfix This will not be worked on can't reproduce This can not be reproduced feedback pending Waiting for further information and removed triage This needs an (initial) review labels May 21, 2024
@MeAmCat
Copy link
Author

MeAmCat commented May 22, 2024

I removed the config, and everything works now. Thanks for the help :)

@MeAmCat MeAmCat closed this as completed May 22, 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 can't reproduce This can not be reproduced feedback pending Waiting for further information wontfix / cantfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants