lllyasviel / Fooocus

Focus on prompting and generating
GNU General Public License v3.0
40k stars 5.52k forks source link

repository path is not owned by the current user #148

Closed AytoMaximo closed 8 months ago

AytoMaximo commented 1 year ago

Hi!

Running the .bat file is not working for me. comfyanonymous/ComfyUI is not available for download for some reason.

image

lllyasviel commented 1 year ago

Many users have witness the problem "repository path is not owned by the current user". But we cannot reproduce this problem on any machines. The tests passed on my 4 windows devices with or without Git installed. Any help is extremely appreciated, if someone can help us to find the steps to reproduce this problem on our machine.

AytoMaximo commented 1 year ago

Many users have witness the problem "repository path is not owned by the current user". But we cannot reproduce this problem in any machines. The tests pasted on my 4 windows devices with or without Git installed. Any help is extremely appreciated, if someone can help us to find the steps to reproduce this problem on our machine.

Thank you for the answer! Can I overcome this issue by manually downloading the target repository using my Git client and placing it in the 'Fooocus\repositories\ComfyUI-from-StabilityAI-Official' directory? I'm at the step where I am trying to modify the 'entry_with_update.py' script so that it does not delete and re-download this repository.

lllyasviel commented 1 year ago

If you know what you are doing, you can follow the linux guide in windows. But all future updates will need manual git pull

lllyasviel commented 1 year ago

And all files are already distributed inside the 7z package, so that even if the git fails, the app will still work. You may have edited some files or used other method to download the App.

lllyasviel commented 1 year ago

And if someone how to solve this problem or how to make this problem reproducible, please let me know as soon as possible.

AytoMaximo commented 1 year ago

all files are already distributed inside the 7z package

I simply clicked here and extracted all files, launched .bat and got the error above. image

lllyasviel commented 1 year ago

If that is true, you can even run without internet if the models are already here. Run without internet is also tested extensively and there is no reason for lack of dependency if git fails.

Please let me know if someone has ideas

AytoMaximo commented 1 year ago

If that is true, you can even run without internet if the models are already here

The issue is that after extracting the 7Z file, the files are indeed present, but running the .bat file erases everything in the 'Fooocus\repositories\ComfyUI-from-StabilityAI-Official' folder and attempts to re-download them.

AytoMaximo commented 1 year ago

Please let me know if someone has ideas

Hey, I have a clue. I think the issue is related to the drive's file system type. I have a problem with exFAT, but unzipping to the NTFS file system causes no problems.

rraihansaputra commented 1 year ago

confirming @AytoMaximo; i had this issue the first day the repo was released but solved it by extracting and running on NTFS instead of exFAT. This is related to the git command.

i'm running the first release with the import cuda_malloc commented out without issues.

Guillaume-Fgt commented 1 year ago

Many users have witness the problem "repository path is not owned by the current user". But we cannot reproduce this problem on any machines. The tests passed on my 4 windows devices with or without Git installed. Any help is extremely appreciated, if someone can help us to find the steps to reproduce this problem on our machine.

I didn't have any trouble on my machine but I successfully reproduce it by doing the following steps:

console message:

Update failed. f:\Fooocus: repository path 'f:/Fooocus/' is not owned by current user Update succeeded.

EDIT: redid the same steps but using exFAT instead of NTFS file system format, without using cmd as administrator.

Get the not owned by current usermessage. I believe this is because exFAT doesn't handle permissions so the owner of the repo folder is nobody, which is different from current user.

AytoMaximo commented 1 year ago

Many users have witness the problem "repository path is not owned by the current user". But we cannot reproduce this problem on any machines. The tests passed on my 4 windows devices with or without Git installed. Any help is extremely appreciated, if someone can help us to find the steps to reproduce this problem on our machine.

I didn't have any trouble on my machine but I successfully reproduce it by doing the following steps:

  • run a Command Prompt as administrator
  • git clone Fooocus repo. Once finished, if you right click on the Fooocus dir created ==>Security tab ==>advanced button. The owner of the folder should be Administrators.
  • as a local user, create a venv, install pygit2 and run entry_with_update.py

console message:

Update failed. f:\Fooocus: repository path 'f:/Fooocus/' is not owned by current user Update succeeded.

Agreed, after chatting with ChatGPT yesterday, we came to the same conclusion: the exFAT drive type does not allow privilege control over files and folders, unlike NTFS. That's why you are facing some access problems.

Guillaume-Fgt commented 1 year ago

In my case, I used a USB stick formatted in NTFS. But I voluntary gave the ownership of the repo folder to an other account (admin). Maybe this mechanism is done automatically in other file system formats.

AytoMaximo commented 1 year ago

I'd really like to know how to overcome this exFAT limitation, because I intentionally bought a large external SSD to host big ML models. I mean without formatting everything now.

rraihansaputra commented 1 year ago

@AytoMaximo maybe you can try just extracting the repository first, then link/alias (I'm not sure what the term is for windows) the Fooocus/models directory to your external drive before running the .bat?

AytoMaximo commented 1 year ago

@AytoMaximo maybe you can try just extracting the repository first, then link/alias (I'm not sure what the term is for windows) the Fooocus/models directory to your external drive before running the .bat?

I wonder, If the batch file starts with erasing this directory, wouldn't it do the same with the alias? Or do you suggest placing the checkpoints on the exFAT drive and leaving Fooocus on the NTFS drive?

rraihansaputra commented 1 year ago

Yes, I suggest placing the checkpoints on the exFAT drive and leaving Foocus on the NTFS drive. The .bat only deletes the repository directory as far as i know.

lllyasviel commented 1 year ago

super interesting. let me take a look and see if i can fix it soon.

lllyasviel commented 1 year ago

I made a new package in 1.0.35 https://github.com/lllyasviel/Fooocus/releases/tag/1.0.35 Hopefully this is solved Someone please test

kirbykirby commented 1 year ago

I made a new package in 1.0.35 https://github.com/lllyasviel/Fooocus/releases/tag/1.0.35 Hopefully this is solved Someone please test

I run it on an external SSD with exFAT format. Same cuda_malloc issue. It ran smoothly before 1.032 update.

jw408 commented 1 year ago

I made a new package in 1.0.35 https://github.com/lllyasviel/Fooocus/releases/tag/1.0.35 Hopefully this is solved Someone please test

Tried and no dice, same error (linux/venv; WSL2) - https://github.com/lllyasviel/Fooocus/issues/169#issuecomment-1684033119

jw408 commented 1 year ago

Found a solution for people having this problem, see this other thread https://github.com/lllyasviel/Fooocus/issues/169#issuecomment-1684033119

CCC197 commented 10 months ago

微信图片_20231106114935有没有大佬知道这是怎么回事