Comments (7)
@lllyasviel I would propose to:
- make downloading of models optional instead of forced;
- add settings page so user can set paths to existing model directories.
from fooocus.
yea doesn't make sense to d/l the models again should be optionable or have a setting to point to stored models.
from fooocus.
Please support configurable paths similar to ComfyUI:
https://github.com/comfyanonymous/ComfyUI/blob/master/extra_model_paths.yaml.example
from fooocus.
Notes: Just work for me, i don't know if this code break author code, just want share
- create
config.json
in same folder withreadme.md
(changeC:\Users\new\AI_Model
with your model folder ){ "modelfile_path": "C:\\Users\\new\\AI_Model\\checkpoints", "lorafile_path": "C:\\Users\\new\\AI_Model\\loras", "temp_outputs_path": "C:\\Users\\new\\AI_Fooocus\\Fooocus\\outputs" }
- edit
Fooocus\modules\path.py
import os
import json
# Load configuration from config.json
with open(os.path.abspath(os.path.join(os.path.dirname(__file__), '../config.json')), 'r') as config_file:
config = json.load(config_file)
# Access configuration values
modelfile_path = config["modelfile_path"]
lorafile_path = config["lorafile_path"]
temp_outputs_path = config["temp_outputs_path"]
# Delete or comment this 3 lines
#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/'))
#temp_outputs_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '../outputs/'))
# ... existing code
from fooocus.
Noooooo, I dont want anything being written to my "normal" windows folders. I want all of the installs to be standalone.
What would be useful though is if maintainers put instructions on how to create symlinks etc as part of the install (although thats a sperate issue , so many 12 o'colck flashers dont read any of the documentation as it is!!
from fooocus.
This is all now possible by using presets and the config.txt. Closing this issue.
from fooocus.
@uarefans This simple code is a good idea for a pull quest, I would only add some conditionals (to not download models on first run if custom folders are declared) and and Try Except for handle it. What do you think? I am not saying that you should do it, in a few days if I have free time I can write it.
from fooocus.
Related Issues (20)
- [Feature Request]: Iterate through all models in folder HOT 1
- Loras not working: ValueError: Error while deserializing header: MetadataIncompleteBuffer HOT 1
- [Bug]: custom preset fails HOT 2
- [Feature Request]: Using Florence 2 in describe option HOT 1
- [Bug]: No errors, not starting at all HOT 1
- [Feature Request]: Ability to pause/resume generations HOT 6
- [Feature Request]: Suggestions for adjusting log.html HOT 2
- [Bug]: Foocus not starting "ModuleNotFoundError: No module named 'supervision'" HOT 4
- [Bug]: API do not create Images HOT 1
- [Feature Request]: Add Support for Flux models HOT 1
- [Bug]: Plz fix A1111 Metadata scheme (with styles and Enhance) HOT 2
- [Bug]: Inpaint: Improve Detial - Not always work HOT 4
- [Feature Request]: Please add support for FLUX.1-dev HOT 1
- [Feature Request]: Plz add an option to export metadata for A1111/Forge/CivitAI HOT 1
- [Bug]: Inpaint or Outpaint->Improve Detail, Don´t work with the new update HOT 2
- Would width and height inputs be possible? [Feature Request]: HOT 1
- VRAM load doesn`t get lower [Bug]: HOT 1
- [Bug]: fooocus raising exception when load kolors checkpoint model HOT 1
- [Feature Request]: Add a "balanced" option in the performance section to sit between quality and speed HOT 3
- [Feature Request]: FaceSwap optimizer HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fooocus.