Skip to content
6 changes: 3 additions & 3 deletions 01.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ sl_folder ${SD01_DIR}/models gfpgan ${BASE_DIR}/models gfpgan

sl_folder ${HOME} "Stable Diffusion UI" ${BASE_DIR}/outputs 01-Easy-Diffusion

if [ ! -f "$SD01_DIR/scripts/config.json" ]; then
cp -v "${SD_INSTALL_DIR}/parameters/01.txt" "$SD01_DIR/scripts/config.json"
if [ ! -f "$SD01_DIR/config.yaml" ]; then
cp -v "${SD_INSTALL_DIR}/parameters/01.txt" "$SD01_DIR/config.yaml"
fi

if [ ! -f "$SD01_DIR/start.sh" ]; then
curl -L https://github.com/easydiffusion/easydiffusion/releases/download/v2.5.41a/Easy-Diffusion-Linux.zip --output edui.zip
curl -L https://github.com/easydiffusion/easydiffusion/releases/download/v3.0.2/Easy-Diffusion-Linux.zip --output edui.zip
unzip edui.zip
cp -rf easy-diffusion/* .
rm -rf easy-diffusion
Expand Down
2 changes: 1 addition & 1 deletion 06.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ source /sl_folder.sh
export PATH="/home/abc/miniconda3/bin:$PATH"

mkdir -p ${SD06_DIR}
mkdir -p /config/outputs/06-Fooocus
mkdir -p $BASE_DIR/outputs/06-Fooocus

if [ ! -d ${SD06_DIR}/env ]; then
conda create -p ${SD06_DIR}/env -y
Expand Down
57 changes: 57 additions & 0 deletions custom-sample.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#!/bin/bash
source /sl_folder.sh

export PATH="/home/abc/miniconda3/bin:$PATH"

# Set Variables and parameters

# Name of the custom WebUI (will be used for the program itself and the output directory)
export CustomNAME="FooocusMRE"

# Name of the base folder for custom WebUIs
export CustomBASE="00-custom"

# Complete Path for the program files
export CustomPATH="/config/$CustomBASE/$CustomNAME"

# Parameters to pass at launch
export CustomPARAMETERS="--listen 0.0.0.0 --port 9000"

# Folders creation (Program files and output)
mkdir -p ${CustomPATH}
mkdir -p $BASE_DIR/outputs/$CustomBASE/$CustomNAME

# Creation and Activation on the Conda Virtual Env
if [ ! -d ${CustomPATH}/env ]; then
conda create -p ${CustomPATH}/env -y
fi
source activate ${CustomPATH}/env
conda install -n base conda-libmamba-solver -y
conda install -c conda-forge git python=3.10 pip --solver=libmamba -y
conda install -c nvidia cuda-cudart --solver=libmamba -y

# Clone/update program files
if [ ! -d ${CustomPATH}/Fooocus-MRE ]; then
cd "${CustomPATH}" && git clone https://github.com/MoonRide303/Fooocus-MRE.git
fi
cd ${CustomPATH}/Fooocus-MRE
git pull -X ours

# Using the sl_folder to create symlinks needed to use the common models folder
sl_folder ${CustomPATH}/Fooocus-MRE/models checkpoints ${BASE_DIR}/models stable-diffusion
sl_folder ${CustomPATH}/Fooocus-MRE/models loras ${BASE_DIR}/models lora
sl_folder ${CustomPATH}/Fooocus-MRE/models vae ${BASE_DIR}/models vae
sl_folder ${CustomPATH}/Fooocus-MRE/models embeddings ${BASE_DIR}/models embeddings
sl_folder ${CustomPATH}/Fooocus-MRE/models hypernetworks ${BASE_DIR}/models hypernetwork
sl_folder ${CustomPATH}/Fooocus-MRE/models upscale_models ${BASE_DIR}/models upscale
sl_folder ${CustomPATH}/Fooocus-MRE/models clip_vision ${BASE_DIR}/models clip_vision
sl_folder ${CustomPATH}/Fooocus-MRE/models controlnet ${BASE_DIR}/models controlnet

sl_folder ${CustomPATH}/Fooocus-MRE outputs ${BASE_DIR}/outputs/$CustomBASE $CustomNAME

# installation of requirements
cd ${CustomPATH}/Fooocus-MRE
pip install -r requirements_versions.txt

# Launch Fooocus-MRE
python launch.py ${CustomPARAMETERS}
8 changes: 8 additions & 0 deletions entry.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
#!/bin/bash

# Copy sample custom script in user folder if it doesn't exists

if [ ! -f "$BASE_DIR/scripts/custom-sample.sh" ]; then
mkdir -p $BASE_DIR/scripts
cp -v "/custom-sample.sh" "$BASE_DIR/scripts/custom-sample.sh"
fi

case $WEBUI_VERSION in
01)
. /01.sh
Expand Down Expand Up @@ -38,6 +45,7 @@ case $WEBUI_VERSION in
. /70.sh
;;
*)
. $BASE_DIR/scripts/$WEBUI_VERSION
echo error in webui selection variable
;;
esac
23 changes: 22 additions & 1 deletion parameters/01.txt
Original file line number Diff line number Diff line change
@@ -1 +1,22 @@
{"render_devices": "auto", "update_branch": "main", "net": {"listen_port": 9000, "listen_to_network": true}}
# Change listen_port if port 9000 is already in use on your system
# Set listen_to_network to true to make Easy Diffusion accessibble on your local network
net:
listen_port: 9000
listen_to_network: true
render_devices: auto

# Set open_browser_on_start to false to disable opening a new browser tab on each restart
ui:
open_browser_on_start: false

# set update_branch to main to use the stable version, or to beta to use the experimental
# beta version.
update_branch: main

# Set force_save_path to enforce an auto save path. Clients will not be able to change or
# disable auto save when this option is set. Please adapt the path in the examples to your
# needs.
# Windows:
# force_save_path: C:\\Easy Diffusion Images\\
# Linux:
force_save_path: /config/outputs/01-Easy-Diffusion