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]: V2.3.0 NSFW option has denied access to checkpoint folder corrupting it #2582

Closed
3 of 5 tasks
bigfordy1983 opened this issue Mar 20, 2024 · 8 comments
Closed
3 of 5 tasks
Labels
bug Something isn't working triage This needs an (initial) review

Comments

@bigfordy1983
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?

When choosing the NSFW switch under the advanced options, and putting in any prompt. On generation of an image the following error occurs, changing the checkpoint folder to corrupted

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "E:\Fooocus\Fooocus\modules\async_worker.py", line 913, in worker
    handler(task)
  File "E:\Fooocus\python_embeded\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "E:\Fooocus\python_embeded\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "E:\Fooocus\Fooocus\modules\async_worker.py", line 429, in handler
    pipeline.refresh_everything(refiner_model_name=refiner_model_name, base_model_name=base_model_name,
  File "E:\Fooocus\python_embeded\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "E:\Fooocus\python_embeded\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "E:\Fooocus\Fooocus\modules\default_pipeline.py", line 233, in refresh_everything
    refresh_refiner_model(refiner_model_name)
  File "E:\Fooocus\python_embeded\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "E:\Fooocus\python_embeded\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "E:\Fooocus\Fooocus\modules\default_pipeline.py", line 91, in refresh_refiner_model
    model_refiner = core.load_model(filename)
  File "E:\Fooocus\python_embeded\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "E:\Fooocus\python_embeded\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "E:\Fooocus\Fooocus\modules\core.py", line 146, in load_model
    unet, clip, vae, clip_vision = load_checkpoint_guess_config(ckpt_filename, embedding_directory=path_embeddings)
  File "E:\Fooocus\Fooocus\ldm_patched\modules\sd.py", line 431, in load_checkpoint_guess_config
    sd = ldm_patched.modules.utils.load_torch_file(ckpt_path)
  File "E:\Fooocus\Fooocus\ldm_patched\modules\utils.py", line 22, in load_torch_file
    pl_sd = torch.load(ckpt, map_location=device, pickle_module=ldm_patched.modules.checkpoint_pickle)
  File "E:\Fooocus\Fooocus\modules\patch.py", line 481, in loader
    raise ValueError(exp)
ValueError: [Errno 13] Permission denied: 'E:\\Fooocus\\Fooocus\\models\\checkpoints'
File corrupted: E:\Fooocus\Fooocus\models\checkpoints
Fooocus has tried to move the corrupted file to E:\Fooocus\Fooocus\models\checkpoints.corrupted
You may try again now and Fooocus will download models again.

I have a bunch of additional checkpoints which I use, of which Aphrodite XL is one i've been using for sometime. It works fine when using realistic switch and manually changing models

Steps to reproduce the problem

Open Fooocus, Click advanced, choose nsfw. Put in generation text and hit generate. Not repeated attempts does not attempt to download the model again and the same traceback occurs.

What should have happened?

Should have loaded the model without issue and generated the image as per the prompt and settings

What browsers do you use to access Fooocus?

Google Chrome

Where are you running Fooocus?

Locally

What operating system are you using?

Windows 11

Console logs

Traceback (most recent call last):
  File "E:\Fooocus\Fooocus\modules\async_worker.py", line 913, in worker
    handler(task)
  File "E:\Fooocus\python_embeded\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "E:\Fooocus\python_embeded\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "E:\Fooocus\Fooocus\modules\async_worker.py", line 429, in handler
    pipeline.refresh_everything(refiner_model_name=refiner_model_name, base_model_name=base_model_name,
  File "E:\Fooocus\python_embeded\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "E:\Fooocus\python_embeded\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "E:\Fooocus\Fooocus\modules\default_pipeline.py", line 233, in refresh_everything
    refresh_refiner_model(refiner_model_name)
  File "E:\Fooocus\python_embeded\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "E:\Fooocus\python_embeded\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "E:\Fooocus\Fooocus\modules\default_pipeline.py", line 91, in refresh_refiner_model
    model_refiner = core.load_model(filename)
  File "E:\Fooocus\python_embeded\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "E:\Fooocus\python_embeded\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "E:\Fooocus\Fooocus\modules\core.py", line 146, in load_model
    unet, clip, vae, clip_vision = load_checkpoint_guess_config(ckpt_filename, embedding_directory=path_embeddings)
  File "E:\Fooocus\Fooocus\ldm_patched\modules\sd.py", line 431, in load_checkpoint_guess_config
    sd = ldm_patched.modules.utils.load_torch_file(ckpt_path)
  File "E:\Fooocus\Fooocus\ldm_patched\modules\utils.py", line 22, in load_torch_file
    pl_sd = torch.load(ckpt, map_location=device, pickle_module=ldm_patched.modules.checkpoint_pickle)
  File "E:\Fooocus\Fooocus\modules\patch.py", line 481, in loader
    raise ValueError(exp)
ValueError: [Errno 13] Permission denied: 'E:\\Fooocus\\Fooocus\\models\\checkpoints'
File corrupted: E:\Fooocus\Fooocus\models\checkpoints
Fooocus has tried to move the corrupted file to E:\Fooocus\Fooocus\models\checkpoints.corrupted
You may try again now and Fooocus will download models again.

Additional information

No response

@bigfordy1983 bigfordy1983 added bug Something isn't working triage This needs an (initial) review labels Mar 20, 2024
@poor7
Copy link

poor7 commented Mar 20, 2024

As far as I know, in the official version of Fooocus, there is no such option.

@bigfordy1983
Copy link
Author

I've only ever forked or cloned from the original Fooocus repo and this has updated itself automatically.

@bigfordy1983
Copy link
Author

Screenshot 2024-03-20 131052

@mashb1t
Copy link
Collaborator

mashb1t commented Mar 20, 2024

@bigfordy1983 NSFW only exists in my fork and the PR to the official Fooocus repository, so you should open the issue in my fork. Nevertheless this issue is not related to NSFW at all as the permissions were denied for your checkpoints folder. Make sure you have sufficient permissions to open the folder and/or re-download the model entirely.

@mashb1t mashb1t closed this as not planned Won't fix, can't repro, duplicate, stale Mar 20, 2024
@bigfordy1983
Copy link
Author

Thanks @mashb1t so how did my vanilla pull get an update from your fork? Makes no sense, but equally I am also not the most experienced at Github.

@mashb1t
Copy link
Collaborator

mashb1t commented Mar 20, 2024

@bigfordy1983 no idea, can't reconstruct what you did. Please check your fooocus_version file or the browser tab title or send a full console log showing the initial launch params until the error, not only he error.

@Koaxz
Copy link

Koaxz commented May 18, 2024

Where can I find the NSFW version?

@mashb1t
Copy link
Collaborator

mashb1t commented May 18, 2024

@Koaxz #958 has just been merged to develop and will be in release 2.4.0, which is dropping during next week. 2.4.0-RC1 will be made available tomorrow!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage This needs an (initial) review
Projects
None yet
Development

No branches or pull requests

4 participants