Closed barepixels closed 1 year ago
Another time symbolic link get wiped out is when Fooocus crash hard.
I try to generate without using Refinner. I was testing Fooocus crash I closed the CMD window and browser tab Relaunch the run-moonride.bat Fooocus delete the Symbolic links (checkpoints and loras) created new folders and begins to download the safetensors
@barepixels You're right, it seems git sees symlinks as changes. Please try with directory junctions, like that:
mklink /j D:\Fooocus\models\checkpoints E:\models\sdxl-checkpoints
PS If you don't mind old school Norton Commander style UI (I am old, I know 😂), you can use Far Manager - it makes creating links a bit easier (by simply pressing Alt-F6, and then selecting link type).
Will report back
/j also get wipe out like /d
@barepixels Strange - junctions worked for me. I am out for the weekend, but we can back to this later on, like check results step by step, after each command.
it work for me too ... till I had a crash ... upon relaunch symlinks were gone. similar to /d
I redo symlinks, it's working now again. will let you know if it happens again
After seeing
xiaoyoucheng mentioned this issue 17 hours ago fix AttributeError: 'NoneType' object has no attribute 'clip' #13 Merged @MoonRide303 MoonRide303 closed this as completed in #13 8 hours ago
I decided to quit Fooocus MRE CMD window and relaunch
BAMM
symlinks with /J gone. Fooocus MRE replaced symlinks with folders and starts to download safetensors
@barepixels: I did simple test, like that:
then changed branches (between main and moonride-main) and launched Fooocus few times (via python .\launch.py
from Anaconda PowerShell) and it works fine - git status remains clear, and content of that directory remains unchanged.
I also use hardlinks for single files for a long time (those are limited to single drive) created with Far Manager (allows to do things like hardlinks for 100 files in few seconds), and never had any issues with those, either.
Could you post exact commands you used, and also information how do you launch Fooocus?
mklink /J E:\Fooocus_win64_1-1-10\Fooocus-MoonRide\models\checkpoints D:\stable-diffusion-shared\Ckpt\XL
mklink /J E:\Fooocus_win64_1-1-10\Fooocus-MoonRide\models\loras D:\stable-diffusion-shared\Lora\SDXL
then I launch run-moonride.bat which is locate at: E:\Fooocus_win64_1-1-10/run-moonride.bat
@barepixels Could you provide content of that run-moonride.bat
file? I don't have it in my repository.
.\python_embeded\python.exe -s Fooocus-MoonRide\entry_with_update.py pause
From this instruction https://github.com/MoonRide303/Fooocus-MRE/issues/1
Should I be using launch.py in Fooocus-MoonRide folder?
@barepixels As Anaconda user I never needed to use standalone Python. I will take a look at that distribution from original Fooocus, and see how it works - and then if I can reproduce this issue.
I appreciate your help. Is it that hard or time-consuming to just add the paths to setting.json?
Wish list:
modelfile_path = lorafile_path = temp_outputs_path = able to set default style to "none" or my preferred choice of style
BTW other have symlinks problem too: https://github.com/lllyasviel/Fooocus/issues/161
@barepixels I guess you might be right - for most normal users it would be probably much easier to simply setup the paths via settings file rather than having to struggle with mklink, or wondering why those links are getting destroyed. I'll do it this way.
As for parameters related to generating images I was thinking about having another json with default prompt parameters - stuff like default style would go there, then.
@barepixels Done (customizing paths), available on moonride-main - let me know if works for you.
Confirm, paths.json works.
TIP for some people: must write with / such as "D:/stable-diffusion-shared/Ckpt/XL" Windows \ such as "D:\stable-diffusion-shared\Ckpt\XL" will not work.
THANK YOU
Okay, closing then - btw. I've just enhanced settings.json - you can now customize default style, and also many other settings :).
Confirm, paths.json works.
TIP for some people: must write with / such as "D:/stable-diffusion-shared/Ckpt/XL" Windows \ such as "D:\stable-diffusion-shared\Ckpt\XL" will not work.
THANK YOU
@barepixels Sorry to bother you. Looking for this information made me very happy, but when I tried to operate it, it couldn't achieve the effect. Modifying the folder location according to the prompts you mentioned didn't work. I don't know how to achieve the goal after repeated modifications (please refer to the attached file), please guide me! Thank you! paths-example -json.txt
@hzeasy Please make sure that:
Content of sample working customized paths.json file:
{
"path_checkpoints": "D:/tools/Fooocus/models/checkpoints/",
"path_loras": "D:/tools/Fooocus/models/loras/",
"path_embeddings": "D:/tools/Fooocus/models/embeddings/",
"path_clip_vision": "D:/tools/Fooocus/models/clip_vision/",
"path_controlnet": "D:/tools/Fooocus/models/controlnet/",
"path_styles": "../sdxl_styles/",
"path_outputs": "../outputs/"
}
@MoonRide303 Thank you for your help. The path issue has been resolved because I have been keeping the original paths example. json and changing it to paths. json will work fine. However, I have encountered other issues during runtime recently, but there is no need to resolve them in a timely manner. I would like to wait for you to update the MRE before trying again. Thank you!
@hzeasy Please make sure that:
- File name is exactly "paths.json" (you might need to enable showing file extensions in Windows).
- Paths don't contain unwanted space (like in this example of yours).
Content of sample working customized paths.json file:
{ "path_checkpoints": "D:/tools/Fooocus/models/checkpoints/", "path_loras": "D:/tools/Fooocus/models/loras/", "path_embeddings": "D:/tools/Fooocus/models/embeddings/", "path_clip_vision": "D:/tools/Fooocus/models/clip_vision/", "path_controlnet": "D:/tools/Fooocus/models/controlnet/", "path_styles": "../sdxl_styles/", "path_outputs": "../outputs/" }
@MoonRide303 Hello, the previous issue has been resolved, but a new fault has been introduced: click“ 📔 Current Log 📔 The 'Previous Log' will display a 'detail': 'File not found:./outputs/2023-09-16/log. html.' This prompt is known to be caused by a change in the path, but I am not sure where to fix it. If possible, please let me know. Thank you.
@hzeasy Did you generate any images on that machine (current / previous day)? Those links need existing log files to work, and those files are created when you're generating images on given machine.
@MoonRide303 Yes, the image was output at the specified path normally, and the log.html file is also available, but it cannot be called in the UI.
@hzeasy You're right, custom outputs path wasn't properly handled when generating links to log files - I've just fixed (commit a922734) - it should work fine when you update to latest version.
@MoonRide303 The path issue has been resolved after updating to version 2.0.19, including some other minor issues. And I also found that the Control-LoRA in CN has changed to a folding option. If it's to make room for adding more LORA control functions? If it's true, that would be great! I think the advantage of using MRE lies in its control, and even in version 1.0, I made a video introducing MRE and promoted it on Bilibili. Thank you for your MRE upgrade work. Wishing you success in your work!
@hzeasy Yeah, I will be looking into either more CNs / Control-LoRAs, and/or IP-Adapters - but I'd need to make sure it's easy to use and providing high quality results, first (like Canny and Depth, or Revision workflow, which are working pretty well - but it's not so obvious for other models / workflows like Recolor).
@hzeasy Yeah, I will be looking into either more CNs / Control-LoRAs, and/or IP-Adapters - but I'd need to make sure it's easy to use and providing high quality results, first (like Canny and Depth, or Revision workflow, which are working pretty well - but it's not so obvious for other models / workflows like Recolor).
@MoonRide303 oh! That's really worth looking forward to. It shouldn't be easy to implement them. IP-Adapters is indeed a very good feature, but please keep fooocus' optimized performance, because currently my 3060-6G graphics card can use CN very well, even if I combine Canny and There is no problem if Depth is started at the same time..
@hzeasy Today I will need to fix some bugs - it seems all that VM code from vanilla wasn't compatible with current Comfy, and newer MRE versions (after v2.0.14) don't work on lower end machines (when trying to use refiner).
Update: fixed in v2.0.19 (disabled that VM from vanilla, that was causing problems when used with new Comfy - and it's not really needed with new Comfy, which automates most of the model memory management).
Update: fixed in v2.0.19 (disabled that VM from vanilla, that was causing problems when used with new Comfy - and it's not really needed with new Comfy, which automates most of the model memory management).
@MoonRide303 I'm so excited to share what you're doing. I'm a layman on programming codes, so I usually can only turn to ChatGPT, haha. I tested lllyasviel version 2.0.62 today and encountered a GPU memory problem after simply taking out 3 pictures.This situation occasionally occurred in previous MRE versions, and I think it should be optimized.I asked lllyasviel this question。 Then I ran it on MRE with the same parameters. At the same time, the three pictures came out very quickly, but I noticed a warning. I had not seen this before, but it did not affect the picture output.
@lllyasviel I get the same errors using the latest vanilla Fooocus 2.0.62 two pictures came out very quickly, but I noticed a warning. I had not seen this before, but it did not affect the picture output.
UPDATE: It seem to go away. No longer have the errors. Wondering what changes did I made. UPDATE: It seem to came back on relaunch
Got symbolic links working (thanks) but whenever Fooocus update, it deletes symbolic links and replace with actual folders and starts download missing safetensors. Link to Symbolic Link tutorial https://youtu.be/RDH5IuyPJtk
My current solution is hard code modules/path.py
Before modelfile_path = os.path.abspath(os.path.join(os.path.dirname(file), '../models/checkpoints/')) lorafile_path = os.path.abspath(os.path.join(os.path.dirname(file), '../models/loras/'))
After modelfile_path = os.path.abspath(os.path.join(os.path.dirname(file), 'D:\stable-diffusion-shared\Ckpt\XL')) lorafile_path = os.path.abspath(os.path.join(os.path.dirname(file), 'D:\stable-diffusion-shared\Lora\SDXL'))