GithubHelp home page GithubHelp logo

Comments (7)

ke1ne avatar ke1ne commented on September 7, 2024 3

@lllyasviel I would propose to:

  1. make downloading of models optional instead of forced;
  2. add settings page so user can set paths to existing model directories.

from fooocus.

jlitz avatar jlitz commented on September 7, 2024 2

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.

teadrinker avatar teadrinker commented on September 7, 2024 2

Please support configurable paths similar to ComfyUI:

https://github.com/comfyanonymous/ComfyUI/blob/master/extra_model_paths.yaml.example

from fooocus.

uarefans avatar uarefans commented on September 7, 2024 2

Notes: Just work for me, i don't know if this code break author code, just want share

  1. create config.json in same folder with readme.md (change C:\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"
    }
  2. 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.

WinstonWoof avatar WinstonWoof commented on September 7, 2024 1

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.

mashb1t avatar mashb1t commented on September 7, 2024 1

This is all now possible by using presets and the config.txt. Closing this issue.

from fooocus.

eypacha avatar eypacha commented on September 7, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.