mirror of
https://github.com/karl0ss/ai_image_frame_server.git
synced 2025-06-27 02:39:13 +01:00
Compare commits
51 Commits
Author | SHA1 | Date | |
---|---|---|---|
4ea81daa47 | |||
070279cd78 | |||
6390199cb8 | |||
078c8aec34 | |||
d7883af040 | |||
e68a9ac75d | |||
1da2288104 | |||
7a5b41b5b5 | |||
3e86eb1880 | |||
bec1ae2893 | |||
7946e5dce5 | |||
c4e86a5433 | |||
d791c8b4ed | |||
9d80741da1 | |||
08f3a80169 | |||
c7d71bfd03 | |||
1a0542861c | |||
0fc549c199 | |||
f7f049aacb | |||
669dad4044 | |||
c726d23707 | |||
2c9429d640 | |||
ac388b0f4e | |||
4272e1d40e | |||
4e1e240e30 | |||
3d2524c2ba | |||
52574de881 | |||
ef9bf72b84 | |||
0cd6c6c5c8 | |||
cd6b8a8d25 | |||
1aa540fa03 | |||
33bfee0220 | |||
f041a6afea | |||
336c03a888 | |||
9ce6ff25ea | |||
5be690f6c1 | |||
4da908d0da | |||
7adaaf4491 | |||
a75c7c554a | |||
2ff03fe101 | |||
4b52e5c713 | |||
2a9a226dd1 | |||
3f2c59c5bb | |||
55ccd71383 | |||
4b62b5cd07 | |||
b8322e1fd8 | |||
d749da148e | |||
d344674e02 | |||
b1646a4c6e | |||
0b74672844 | |||
aabd19dd5f |
@ -1,5 +1,5 @@
|
|||||||
[tool.bumpversion]
|
[tool.bumpversion]
|
||||||
current_version = "0.1.6"
|
current_version = "0.2.4"
|
||||||
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
|
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
|
||||||
serialize = ["{major}.{minor}.{patch}"]
|
serialize = ["{major}.{minor}.{patch}"]
|
||||||
search = "{current_version}"
|
search = "{current_version}"
|
||||||
@ -7,12 +7,12 @@ replace = "{new_version}"
|
|||||||
regex = false
|
regex = false
|
||||||
ignore_missing_version = false
|
ignore_missing_version = false
|
||||||
ignore_missing_files = false
|
ignore_missing_files = false
|
||||||
tag = false
|
tag = true
|
||||||
sign_tags = false
|
sign_tags = false
|
||||||
tag_name = "v{new_version}"
|
tag_name = "{new_version}"
|
||||||
tag_message = "Bump version: {current_version} → {new_version}"
|
tag_message = "Bump version: {current_version} → {new_version}"
|
||||||
allow_dirty = false
|
allow_dirty = false
|
||||||
commit = false
|
commit = true
|
||||||
message = "Bump version: {current_version} → {new_version}"
|
message = "Bump version: {current_version} → {new_version}"
|
||||||
moveable_tags = []
|
moveable_tags = []
|
||||||
commit_args = ""
|
commit_args = ""
|
||||||
|
27
.github/workflows/docker-publish.yml
vendored
27
.github/workflows/docker-publish.yml
vendored
@ -2,8 +2,7 @@ name: Build and Publish Docker Image
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
tags: ["*"] # Only triggers on tag pushes
|
||||||
tags: ['*'] # triggers on any tag push
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@ -13,6 +12,8 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0 # ensures tags are fetched
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
@ -25,23 +26,15 @@ jobs:
|
|||||||
IMAGE_NAME="ai-frame-image-server"
|
IMAGE_NAME="ai-frame-image-server"
|
||||||
REGISTRY="${{ secrets.REGISTRY }}"
|
REGISTRY="${{ secrets.REGISTRY }}"
|
||||||
USERNAME="${{ secrets.USERNAME }}"
|
USERNAME="${{ secrets.USERNAME }}"
|
||||||
|
GIT_TAG="${GITHUB_REF#refs/tags/}"
|
||||||
|
IMAGE_TAGGED="$REGISTRY/$USERNAME/$IMAGE_NAME:$GIT_TAG"
|
||||||
IMAGE_LATEST="$REGISTRY/$USERNAME/$IMAGE_NAME:latest"
|
IMAGE_LATEST="$REGISTRY/$USERNAME/$IMAGE_NAME:latest"
|
||||||
|
|
||||||
# Always build and tag as latest
|
echo "🔧 Building $IMAGE_TAGGED and $IMAGE_LATEST"
|
||||||
echo "🔧 Building $IMAGE_LATEST"
|
docker build -t $IMAGE_LATEST -t $IMAGE_TAGGED .
|
||||||
docker build -t $IMAGE_LATEST .
|
|
||||||
|
echo "📤 Pushing $IMAGE_TAGGED"
|
||||||
|
docker push $IMAGE_TAGGED
|
||||||
|
|
||||||
echo "📤 Pushing $IMAGE_LATEST"
|
echo "📤 Pushing $IMAGE_LATEST"
|
||||||
docker push $IMAGE_LATEST
|
docker push $IMAGE_LATEST
|
||||||
|
|
||||||
# If this is a tag push, tag the image accordingly
|
|
||||||
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
|
|
||||||
GIT_TAG="${GITHUB_REF#refs/tags/}"
|
|
||||||
IMAGE_TAGGED="$REGISTRY/$USERNAME/$IMAGE_NAME:$GIT_TAG"
|
|
||||||
|
|
||||||
echo "🏷️ Also tagging as $IMAGE_TAGGED"
|
|
||||||
docker tag $IMAGE_LATEST $IMAGE_TAGGED
|
|
||||||
|
|
||||||
echo "📤 Pushing $IMAGE_TAGGED"
|
|
||||||
docker push $IMAGE_TAGGED
|
|
||||||
fi
|
|
||||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -9,3 +9,4 @@ output/
|
|||||||
prompts_log.jsonl
|
prompts_log.jsonl
|
||||||
publish.sh
|
publish.sh
|
||||||
test.py
|
test.py
|
||||||
|
.vscode/launch.json
|
||||||
|
1
.vscode/launch.json
vendored
1
.vscode/launch.json
vendored
@ -11,6 +11,7 @@
|
|||||||
"program": "${file}",
|
"program": "${file}",
|
||||||
"console": "integratedTerminal",
|
"console": "integratedTerminal",
|
||||||
"justMyCode": false,
|
"justMyCode": false,
|
||||||
|
"env": {"SECRET_KEY":"dkdkdk"}
|
||||||
// "args": [
|
// "args": [
|
||||||
// "--num_inference_steps",
|
// "--num_inference_steps",
|
||||||
// "6",
|
// "6",
|
||||||
|
@ -1,148 +1,50 @@
|
|||||||
from flask import (
|
from flask import Flask
|
||||||
Flask,
|
from libs.generic import load_config
|
||||||
render_template,
|
|
||||||
send_from_directory,
|
|
||||||
request,
|
|
||||||
jsonify,
|
|
||||||
)
|
|
||||||
import os
|
import os
|
||||||
import time
|
|
||||||
import threading
|
|
||||||
from apscheduler.schedulers.background import BackgroundScheduler
|
|
||||||
from libs.generic import load_config, load_recent_prompts, get_details_from_png, get_current_version
|
|
||||||
from libs.comfyui import cancel_current_job, create_image
|
|
||||||
from libs.ollama import create_prompt_on_openwebui
|
|
||||||
|
|
||||||
#workflow test commit
|
from routes import (
|
||||||
|
auth_routes,
|
||||||
|
gallery_routes,
|
||||||
|
image_routes,
|
||||||
|
index_routes,
|
||||||
|
job_routes,
|
||||||
|
create_routes,
|
||||||
|
settings_routes
|
||||||
|
)
|
||||||
|
|
||||||
user_config = load_config()
|
user_config = load_config()
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
app.secret_key = os.environ.get("SECRET_KEY")
|
||||||
|
|
||||||
image_folder = "./output"
|
# Inject config into routes that need it
|
||||||
|
create_routes.init_app(user_config)
|
||||||
|
auth_routes.init_app(user_config)
|
||||||
|
|
||||||
@app.route("/", methods=["GET"])
|
# Register blueprints
|
||||||
def index() -> str:
|
app.register_blueprint(index_routes.bp)
|
||||||
"""
|
app.register_blueprint(auth_routes.bp)
|
||||||
Renders the main HTML template with image and prompt.
|
app.register_blueprint(gallery_routes.bp)
|
||||||
"""
|
app.register_blueprint(image_routes.bp)
|
||||||
image_filename = "./image.png"
|
app.register_blueprint(job_routes.bp)
|
||||||
image_path = os.path.join(image_folder, image_filename)
|
app.register_blueprint(create_routes.bp)
|
||||||
|
app.register_blueprint(settings_routes.bp)
|
||||||
|
|
||||||
prompt = get_details_from_png(image_path)["p"]
|
# Optional: scheduler setup
|
||||||
|
from apscheduler.schedulers.background import BackgroundScheduler
|
||||||
|
import time
|
||||||
|
from libs.comfyui import create_image
|
||||||
|
|
||||||
version = get_current_version()
|
def scheduled_task():
|
||||||
|
|
||||||
return render_template(
|
|
||||||
"index.html",
|
|
||||||
image=image_filename,
|
|
||||||
prompt=prompt,
|
|
||||||
reload_interval=user_config["frame"]["reload_interval"],
|
|
||||||
version=version
|
|
||||||
)
|
|
||||||
|
|
||||||
@app.route("/images", methods=["GET"])
|
|
||||||
def gallery() -> str:
|
|
||||||
images = []
|
|
||||||
for f in os.listdir(image_folder):
|
|
||||||
if f.lower().endswith(('png', 'jpg', 'jpeg', 'gif')):
|
|
||||||
images.append({'filename': f})
|
|
||||||
images = sorted(images, key=lambda x: os.path.getmtime(os.path.join(image_folder, x['filename'])), reverse=True)
|
|
||||||
return render_template("gallery.html", images=images)
|
|
||||||
|
|
||||||
|
|
||||||
@app.route("/image-details/<filename>", methods=["GET"])
|
|
||||||
def image_details(filename):
|
|
||||||
path = os.path.join(image_folder, filename)
|
|
||||||
if not os.path.exists(path):
|
|
||||||
return {"error": "File not found"}, 404
|
|
||||||
details = get_details_from_png(path)
|
|
||||||
return {
|
|
||||||
"prompt": details["p"],
|
|
||||||
"model": details["m"]
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@app.route('/images/thumbnails/<path:filename>')
|
|
||||||
def serve_thumbnail(filename):
|
|
||||||
return send_from_directory('output/thumbnails', filename)
|
|
||||||
|
|
||||||
|
|
||||||
@app.route("/images/<filename>", methods=["GET"])
|
|
||||||
def images(filename: str) -> None:
|
|
||||||
"""
|
|
||||||
Serves the requested image file.
|
|
||||||
Args:
|
|
||||||
filename (str): The name of the image file.
|
|
||||||
Returns:
|
|
||||||
None: Sends the image file.
|
|
||||||
"""
|
|
||||||
return send_from_directory(image_folder, filename)
|
|
||||||
|
|
||||||
|
|
||||||
@app.route("/cancel", methods=["GET"])
|
|
||||||
def cancel_job() -> None:
|
|
||||||
"""
|
|
||||||
Serves the requested image file.
|
|
||||||
Args:
|
|
||||||
filename (str): The name of the image file.
|
|
||||||
Returns:
|
|
||||||
None: Sends the image file.
|
|
||||||
"""
|
|
||||||
return cancel_current_job()
|
|
||||||
|
|
||||||
|
|
||||||
@app.route("/create", methods=["GET", "POST"])
|
|
||||||
def create() -> str:
|
|
||||||
"""Handles image creation requests.
|
|
||||||
Args:
|
|
||||||
None
|
|
||||||
Returns:
|
|
||||||
str: Redirect to the main page or a JSON response.
|
|
||||||
"""
|
|
||||||
prompt = request.form.get("prompt") if request.method == "POST" else None
|
|
||||||
|
|
||||||
if prompt is None:
|
|
||||||
prompt = create_prompt_on_openwebui(user_config["comfyui"]["prompt"])
|
|
||||||
|
|
||||||
def create_image_in_background():
|
|
||||||
create_image(prompt)
|
|
||||||
|
|
||||||
threading.Thread(target=create_image_in_background).start()
|
|
||||||
return render_template('image_queued.html', prompt=prompt)
|
|
||||||
|
|
||||||
|
|
||||||
def scheduled_task() -> None:
|
|
||||||
"""Executes the scheduled image generation task."""
|
|
||||||
print(f"Executing scheduled task at {time.strftime('%Y-%m-%d %H:%M:%S')}")
|
print(f"Executing scheduled task at {time.strftime('%Y-%m-%d %H:%M:%S')}")
|
||||||
create_image(None)
|
create_image(None)
|
||||||
|
|
||||||
@app.route("/create_image", methods=["GET"])
|
|
||||||
def create_image_endpoint() -> str:
|
|
||||||
"""
|
|
||||||
Renders the create image template with image and prompt.
|
|
||||||
"""
|
|
||||||
|
|
||||||
return render_template(
|
|
||||||
"create_image.html"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if user_config["frame"]["auto_regen"] == "True":
|
if user_config["frame"]["auto_regen"] == "True":
|
||||||
if os.environ.get("WERKZEUG_RUN_MAIN") == "true":
|
if os.environ.get("WERKZEUG_RUN_MAIN") == "true":
|
||||||
scheduler = BackgroundScheduler()
|
scheduler = BackgroundScheduler()
|
||||||
regen_time = user_config["frame"]["regen_time"].split(":")
|
h, m = user_config["frame"]["regen_time"].split(":")
|
||||||
scheduler.add_job(
|
scheduler.add_job(scheduled_task, "cron", hour=h, minute=m, id="scheduled_task", max_instances=1, replace_existing=True)
|
||||||
scheduled_task,
|
|
||||||
"cron",
|
|
||||||
hour=regen_time[0],
|
|
||||||
minute=regen_time[1],
|
|
||||||
id="scheduled_task",
|
|
||||||
max_instances=1, # prevent overlapping
|
|
||||||
replace_existing=True # don't double-schedule
|
|
||||||
)
|
|
||||||
scheduler.start()
|
scheduler.start()
|
||||||
|
|
||||||
os.makedirs(image_folder, exist_ok=True)
|
os.makedirs("./output", exist_ok=True)
|
||||||
app.run(host="0.0.0.0", port=user_config["frame"]["port"], debug=True)
|
app.run(host="0.0.0.0", port=user_config["frame"]["port"], debug=True)
|
||||||
|
|
||||||
|
6
config.cfg
Normal file
6
config.cfg
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
[settings]
|
||||||
|
my_items = chelsea fc, stamford bridge, charpi dog, soccer, IT, computing, cybernetic insects, alien, predator, the simpsons, south park, nintendo, sega, xbox, playstation, pixelart, bmw e90, test
|
||||||
|
|
||||||
|
[comfyui]
|
||||||
|
topics = chelsea fc, stamford bridge, charpi dog, soccer, IT, computing, cybernetic insects, alien, predator, the simpsons, south park, nintendo, sega, xbox, playstation, pixelart, bmw e90, gg
|
||||||
|
|
@ -32,12 +32,9 @@ def get_available_models() -> list:
|
|||||||
response = requests.get(url)
|
response = requests.get(url)
|
||||||
if response.status_code == 200:
|
if response.status_code == 200:
|
||||||
data = response.json()
|
data = response.json()
|
||||||
return (
|
general = data.get("CheckpointLoaderSimple", {}).get("input", {}).get("required", {}).get("ckpt_name", [])[0]
|
||||||
data.get("CheckpointLoaderSimple", {})
|
flux = data.get("UnetLoaderGGUF", {}).get("input", {}).get("required", {}).get("unet_name", [])[0]
|
||||||
.get("input", {})
|
return general + flux
|
||||||
.get("required", {})
|
|
||||||
.get("ckpt_name", [])[0]
|
|
||||||
)
|
|
||||||
else:
|
else:
|
||||||
print(f"Failed to fetch models: {response.status_code}")
|
print(f"Failed to fetch models: {response.status_code}")
|
||||||
return []
|
return []
|
||||||
@ -64,13 +61,14 @@ def generate_image(
|
|||||||
file_name: str,
|
file_name: str,
|
||||||
comfy_prompt: str,
|
comfy_prompt: str,
|
||||||
workflow_path: str = "./workflow_sdxl.json",
|
workflow_path: str = "./workflow_sdxl.json",
|
||||||
prompt_node: str = "CLIP Text Encode (Prompt)",
|
prompt_node: str = "Positive",
|
||||||
seed_node: str = "KSampler",
|
seed_node: str = "KSampler",
|
||||||
seed_param: str = "seed",
|
seed_param: str = "seed",
|
||||||
save_node: str = "Save Image",
|
save_node: str = "Save Image",
|
||||||
save_param: str = "filename_prefix",
|
save_param: str = "filename_prefix",
|
||||||
model_node: Optional[str] = "Load Checkpoint",
|
model_node: Optional[str] = "Load Checkpoint",
|
||||||
model_param: Optional[str] = "ckpt_name",
|
model_param: Optional[str] = "ckpt_name",
|
||||||
|
model: Optional[str] = "None",
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Generates an image using the Comfy API with configurable workflow settings."""
|
"""Generates an image using the Comfy API with configurable workflow settings."""
|
||||||
try:
|
try:
|
||||||
@ -100,21 +98,7 @@ def generate_image(
|
|||||||
user_config["comfyui"]["height"],
|
user_config["comfyui"]["height"],
|
||||||
)
|
)
|
||||||
|
|
||||||
# Conditionally set model if node and param are provided
|
wf.set_node_param(model_node, model_param, model)
|
||||||
if model_node and model_param:
|
|
||||||
if "FLUX" in workflow_path:
|
|
||||||
valid_models = user_config["comfyui:flux"]["models"].split(",")
|
|
||||||
else:
|
|
||||||
available_model_list = user_config["comfyui"]["models"].split(",")
|
|
||||||
valid_models = list(
|
|
||||||
set(get_available_models()) & set(available_model_list)
|
|
||||||
)
|
|
||||||
|
|
||||||
if not valid_models:
|
|
||||||
raise Exception("No valid models available.")
|
|
||||||
|
|
||||||
model = random.choice(valid_models)
|
|
||||||
wf.set_node_param(model_node, model_param, model)
|
|
||||||
|
|
||||||
# Generate image
|
# Generate image
|
||||||
logging.debug(f"Generating image: {file_name}")
|
logging.debug(f"Generating image: {file_name}")
|
||||||
@ -135,23 +119,40 @@ def generate_image(
|
|||||||
logging.error(f"Failed to generate image for UID: {file_name}. Error: {e}")
|
logging.error(f"Failed to generate image for UID: {file_name}. Error: {e}")
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
def select_model(model: str) -> tuple[str, str]:
|
||||||
|
use_flux = json.loads(user_config["comfyui"].get("FLUX", "false").lower())
|
||||||
|
only_flux = json.loads(user_config["comfyui"].get("ONLY_FLUX", "false").lower())
|
||||||
|
|
||||||
|
if model == "Random":
|
||||||
|
selected_workflow = "FLUX" if (use_flux and (only_flux or random.choice([True, False]))) else "SDXL"
|
||||||
|
elif "flux" in model.lower():
|
||||||
|
selected_workflow = "FLUX"
|
||||||
|
else:
|
||||||
|
selected_workflow = "SDXL"
|
||||||
|
|
||||||
|
if model == "Random":
|
||||||
|
if selected_workflow == "FLUX":
|
||||||
|
valid_models = user_config["comfyui:flux"]["models"].split(",")
|
||||||
|
else: # SDXL
|
||||||
|
available_model_list = user_config["comfyui"]["models"].split(",")
|
||||||
|
valid_models = list(set(get_available_models()) & set(available_model_list))
|
||||||
|
model = random.choice(valid_models)
|
||||||
|
|
||||||
|
return selected_workflow, model
|
||||||
|
|
||||||
|
|
||||||
|
def create_image(prompt: str | None = None, model: str = "Random") -> None:
|
||||||
|
"""Generate an image with a chosen workflow (Random, FLUX*, or SDXL*)."""
|
||||||
|
|
||||||
def create_image(prompt: str | None = None) -> None:
|
|
||||||
"""Main function for generating images."""
|
|
||||||
if prompt is None:
|
if prompt is None:
|
||||||
prompt = create_prompt_on_openwebui(user_config["comfyui"]["prompt"])
|
prompt = create_prompt_on_openwebui(user_config["comfyui"]["prompt"])
|
||||||
|
|
||||||
if not prompt:
|
if not prompt:
|
||||||
logging.error("No prompt generated.")
|
logging.error("No prompt generated.")
|
||||||
return
|
return
|
||||||
|
|
||||||
save_prompt(prompt)
|
save_prompt(prompt)
|
||||||
|
selected_workflow, model = select_model(model)
|
||||||
use_flux = json.loads((user_config["comfyui"].get("FLUX", False)).lower())
|
|
||||||
only_flux = json.loads((user_config["comfyui"].get("ONLY_FLUX", False)).lower())
|
|
||||||
|
|
||||||
selected_workflow = "SDXL"
|
|
||||||
if use_flux:
|
|
||||||
selected_workflow = "FLUX" if only_flux else random.choice(["FLUX", "SDXL"])
|
|
||||||
|
|
||||||
if selected_workflow == "FLUX":
|
if selected_workflow == "FLUX":
|
||||||
generate_image(
|
generate_image(
|
||||||
@ -163,12 +164,11 @@ def create_image(prompt: str | None = None) -> None:
|
|||||||
seed_param="seed",
|
seed_param="seed",
|
||||||
save_node="CivitAI Image Saver",
|
save_node="CivitAI Image Saver",
|
||||||
save_param="filename",
|
save_param="filename",
|
||||||
model_node="CivitAI Image Saver",
|
model_node="UnetLoaderGGUFAdvancedDisTorchMultiGPU",
|
||||||
model_param="modelname",
|
model_param="unet_name",
|
||||||
|
model=model
|
||||||
)
|
)
|
||||||
else:
|
else: # SDXL
|
||||||
generate_image("image", prompt)
|
generate_image("image", comfy_prompt=prompt, model=model)
|
||||||
|
|
||||||
logging.info(f"{selected_workflow} generation started with prompt: {prompt}")
|
logging.info(f"{selected_workflow} generation started with prompt: {prompt}")
|
||||||
|
|
||||||
|
|
@ -66,6 +66,7 @@ def rename_image() -> str | None:
|
|||||||
|
|
||||||
def get_details_from_png(path):
|
def get_details_from_png(path):
|
||||||
try:
|
try:
|
||||||
|
date = datetime.fromtimestamp(os.path.getctime(path)).strftime("%d-%m-%Y")
|
||||||
with Image.open(path) as img:
|
with Image.open(path) as img:
|
||||||
try:
|
try:
|
||||||
# Flux workflow
|
# Flux workflow
|
||||||
@ -77,7 +78,7 @@ def get_details_from_png(path):
|
|||||||
data = json.loads(img.info["prompt"])
|
data = json.loads(img.info["prompt"])
|
||||||
prompt = data['6']['inputs']['text']
|
prompt = data['6']['inputs']['text']
|
||||||
model = data['4']['inputs']['ckpt_name']
|
model = data['4']['inputs']['ckpt_name']
|
||||||
return {"p":prompt,"m":model} or {"p":"","m":""}
|
return {"p":prompt,"m":model,"d":date} or {"p":"","m":"","c":""}
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Error reading metadata from {path}: {e}")
|
print(f"Error reading metadata from {path}: {e}")
|
||||||
return ""
|
return ""
|
||||||
@ -98,6 +99,18 @@ def get_current_version():
|
|||||||
print("Error running bump-my-version:", e)
|
print("Error running bump-my-version:", e)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
def load_models_from_config():
|
||||||
|
flux_models = load_config()["comfyui:flux"]["models"].split(",")
|
||||||
|
sdxl_models = load_config()["comfyui"]["models"].split(",")
|
||||||
|
sorted_flux_models = sorted(flux_models, key=str.lower)
|
||||||
|
sorted_sdxl_models = sorted(sdxl_models, key=str.lower)
|
||||||
|
return sorted_sdxl_models, sorted_flux_models
|
||||||
|
|
||||||
|
|
||||||
|
def load_topics_from_config():
|
||||||
|
topics = load_config()["comfyui"]["topics"].split(",")
|
||||||
|
sorted_topics = sorted(topics, key=str.lower)
|
||||||
|
return sorted_topics
|
||||||
|
|
||||||
user_config = load_config()
|
user_config = load_config()
|
||||||
output_folder = user_config["comfyui"]["output_dir"]
|
output_folder = user_config["comfyui"]["output_dir"]
|
@ -12,25 +12,33 @@ LOG_FILE = "./prompts_log.jsonl"
|
|||||||
user_config = load_config()
|
user_config = load_config()
|
||||||
output_folder = user_config["comfyui"]["output_dir"]
|
output_folder = user_config["comfyui"]["output_dir"]
|
||||||
|
|
||||||
def create_prompt_on_openwebui(prompt: str) -> str:
|
def create_prompt_on_openwebui(prompt: str, topic: str = "random") -> str:
|
||||||
"""Sends prompt to OpenWebui and returns the generated response."""
|
"""Sends prompt to OpenWebui and returns the generated response."""
|
||||||
|
topic_instruction = ""
|
||||||
|
selected_topic = ""
|
||||||
# Unique list of recent prompts
|
# Unique list of recent prompts
|
||||||
recent_prompts = list(set(load_recent_prompts()))
|
recent_prompts = list(set(load_recent_prompts()))
|
||||||
# Decide on whether to include a topic (e.g., 30% chance to include)
|
if topic == "random":
|
||||||
topics = [t.strip() for t in user_config["comfyui"]["topics"].split(",") if t.strip()]
|
topics = [t.strip() for t in user_config["comfyui"]["topics"].split(",") if t.strip()]
|
||||||
topic_instruction = ""
|
|
||||||
if random.random() < 0.5 and topics:
|
|
||||||
selected_topic = random.choice(topics)
|
selected_topic = random.choice(topics)
|
||||||
|
elif topic != "":
|
||||||
|
selected_topic = topic
|
||||||
|
else:
|
||||||
|
# Decide on whether to include a topic (e.g., 30% chance to include)
|
||||||
|
topics = [t.strip() for t in user_config["comfyui"]["topics"].split(",") if t.strip()]
|
||||||
|
if random.random() < 0.3 and topics:
|
||||||
|
selected_topic = random.choice(topics)
|
||||||
|
if selected_topic != "":
|
||||||
topic_instruction = f" Incorporate the theme of '{selected_topic}' into the new prompt."
|
topic_instruction = f" Incorporate the theme of '{selected_topic}' into the new prompt."
|
||||||
|
|
||||||
user_content = (
|
user_content = (
|
||||||
"Here are the prompts from the last 7 days:\n\n"
|
"Can you generate me a really random image idea, Do not exceed 10 words. Use clear language, not poetic metaphors.”"
|
||||||
+ "\n".join(f"{i+1}. {p}" for i, p in enumerate(recent_prompts))
|
|
||||||
+ "\n\nDo not repeat ideas, themes, or settings from the above. "
|
|
||||||
"Now generate a new, completely original Stable Diffusion prompt that hasn't been done yet."
|
|
||||||
+ topic_instruction
|
+ topic_instruction
|
||||||
|
+ "Avoid prompts similar to the following:"
|
||||||
|
+ "\n".join(f"{i+1}. {p}" for i, p in enumerate(recent_prompts))
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
model = random.choice(user_config["openwebui"]["models"].split(","))
|
model = random.choice(user_config["openwebui"]["models"].split(","))
|
||||||
response = litellm.completion(
|
response = litellm.completion(
|
||||||
api_base=user_config["openwebui"]["base_url"],
|
api_base=user_config["openwebui"]["base_url"],
|
||||||
@ -67,4 +75,4 @@ def create_prompt_on_openwebui(prompt: str) -> str:
|
|||||||
# )
|
# )
|
||||||
# prompt = response["choices"][0]["message"]["content"].strip('"')
|
# prompt = response["choices"][0]["message"]["content"].strip('"')
|
||||||
logging.debug(prompt)
|
logging.debug(prompt)
|
||||||
return prompt
|
return prompt.split(": ")[-1]
|
11
routes/__init__.py
Normal file
11
routes/__init__.py
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
from . import auth_routes, create_routes, gallery_routes, image_routes, index_routes, job_routes, settings_routes
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
"auth_routes",
|
||||||
|
"create_routes",
|
||||||
|
"gallery_routes",
|
||||||
|
"image_routes",
|
||||||
|
"index_routes",
|
||||||
|
"job_routes",
|
||||||
|
"settings_routes"
|
||||||
|
]
|
29
routes/auth_routes.py
Normal file
29
routes/auth_routes.py
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
from flask import Blueprint, render_template, request, redirect, url_for, session
|
||||||
|
from libs.generic import load_models_from_config, load_topics_from_config
|
||||||
|
from urllib.parse import urlparse, urljoin
|
||||||
|
|
||||||
|
bp = Blueprint("auth_routes", __name__)
|
||||||
|
user_config = None
|
||||||
|
|
||||||
|
def init_app(config):
|
||||||
|
global user_config
|
||||||
|
user_config = config
|
||||||
|
|
||||||
|
def is_safe_url(target):
|
||||||
|
ref_url = urlparse(request.host_url)
|
||||||
|
test_url = urlparse(urljoin(request.host_url, target))
|
||||||
|
return test_url.scheme in ("http", "https") and ref_url.netloc == test_url.netloc
|
||||||
|
|
||||||
|
@bp.route("/login", methods=["GET", "POST"])
|
||||||
|
def login():
|
||||||
|
next_url = request.args.get("next") if request.method == "GET" else request.form.get("next")
|
||||||
|
|
||||||
|
if request.method == "POST":
|
||||||
|
if request.form["password"] == user_config["frame"]["password_for_auth"]:
|
||||||
|
session["authenticated"] = True
|
||||||
|
if next_url and is_safe_url(next_url):
|
||||||
|
return redirect(next_url)
|
||||||
|
return redirect(url_for("create_image")) # fallback
|
||||||
|
return redirect(url_for("auth_routes.login", next=next_url)) # retry with `next`
|
||||||
|
|
||||||
|
return render_template("login.html", next=next_url)
|
41
routes/create_routes.py
Normal file
41
routes/create_routes.py
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
from flask import Blueprint, request, render_template, redirect, url_for, session
|
||||||
|
import threading
|
||||||
|
from libs.comfyui import create_image, select_model, get_available_models
|
||||||
|
from libs.ollama import create_prompt_on_openwebui
|
||||||
|
from libs.generic import load_models_from_config, load_topics_from_config
|
||||||
|
import os
|
||||||
|
|
||||||
|
bp = Blueprint("create_routes", __name__)
|
||||||
|
user_config = None # will be set in init_app
|
||||||
|
|
||||||
|
@bp.route("/create", methods=["GET", "POST"])
|
||||||
|
def create():
|
||||||
|
if request.method == "POST":
|
||||||
|
prompt = request.form.get("prompt")
|
||||||
|
selected_workflow, model = select_model(request.form.get("model") or "Random")
|
||||||
|
topic = request.form.get("topic")
|
||||||
|
|
||||||
|
if not prompt:
|
||||||
|
prompt = create_prompt_on_openwebui(user_config["comfyui"]["prompt"], topic)
|
||||||
|
|
||||||
|
threading.Thread(target=lambda: create_image(prompt, model)).start()
|
||||||
|
return redirect(url_for("create_routes.image_queued", prompt=prompt, model=model.split(".")[0]))
|
||||||
|
|
||||||
|
return render_template("create_image.html", models=load_models_from_config()[0]+load_models_from_config()[1], topics=load_topics_from_config())
|
||||||
|
|
||||||
|
@bp.route("/image_queued")
|
||||||
|
def image_queued():
|
||||||
|
prompt = request.args.get("prompt", "No prompt provided.")
|
||||||
|
model = request.args.get("model", "No model selected.").split(".")[0]
|
||||||
|
return render_template("image_queued.html", prompt=prompt, model=model)
|
||||||
|
|
||||||
|
@bp.route("/create_image", methods=["GET"])
|
||||||
|
def create_image_page():
|
||||||
|
if user_config["frame"]["create_requires_auth"] == "True" and not session.get("authenticated"):
|
||||||
|
return redirect(url_for("auth_routes.login", next=request.path))
|
||||||
|
return render_template("create_image.html", models=load_models_from_config()[0]+load_models_from_config()[1], topics=load_topics_from_config())
|
||||||
|
|
||||||
|
|
||||||
|
def init_app(config):
|
||||||
|
global user_config
|
||||||
|
user_config = config
|
15
routes/gallery_routes.py
Normal file
15
routes/gallery_routes.py
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
from flask import Blueprint, render_template
|
||||||
|
import os
|
||||||
|
|
||||||
|
bp = Blueprint("gallery_routes", __name__)
|
||||||
|
image_folder = "./output"
|
||||||
|
|
||||||
|
@bp.route("/images", methods=["GET"])
|
||||||
|
def gallery():
|
||||||
|
images = [
|
||||||
|
{"filename": f}
|
||||||
|
for f in os.listdir(image_folder)
|
||||||
|
if f.lower().endswith(("png", "jpg", "jpeg", "gif"))
|
||||||
|
]
|
||||||
|
images = sorted(images, key=lambda x: os.path.getmtime(os.path.join(image_folder, x["filename"])), reverse=True)
|
||||||
|
return render_template("gallery.html", images=images)
|
22
routes/image_routes.py
Normal file
22
routes/image_routes.py
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
from flask import Blueprint, send_from_directory, jsonify
|
||||||
|
import os
|
||||||
|
from libs.generic import get_details_from_png
|
||||||
|
|
||||||
|
bp = Blueprint("image_routes", __name__)
|
||||||
|
image_folder = "./output"
|
||||||
|
|
||||||
|
@bp.route("/images/<filename>", methods=["GET"])
|
||||||
|
def serve_image(filename):
|
||||||
|
return send_from_directory(image_folder, filename)
|
||||||
|
|
||||||
|
@bp.route("/images/thumbnails/<path:filename>")
|
||||||
|
def serve_thumbnail(filename):
|
||||||
|
return send_from_directory("output/thumbnails", filename)
|
||||||
|
|
||||||
|
@bp.route("/image-details/<filename>", methods=["GET"])
|
||||||
|
def image_details(filename):
|
||||||
|
path = os.path.join(image_folder, filename)
|
||||||
|
if not os.path.exists(path):
|
||||||
|
return jsonify({"error": "File not found"}), 404
|
||||||
|
details = get_details_from_png(path)
|
||||||
|
return jsonify({"prompt": details["p"], "model": details["m"], "date": details["d"]})
|
22
routes/index_routes.py
Normal file
22
routes/index_routes.py
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
from flask import Blueprint, render_template
|
||||||
|
import os
|
||||||
|
from libs.generic import get_details_from_png, get_current_version, load_config
|
||||||
|
|
||||||
|
bp = Blueprint("index_routes", __name__)
|
||||||
|
image_folder = "./output"
|
||||||
|
user_config = load_config()
|
||||||
|
|
||||||
|
@bp.route("/", methods=["GET"])
|
||||||
|
def index():
|
||||||
|
image_filename = "./image.png"
|
||||||
|
image_path = os.path.join(image_folder, image_filename)
|
||||||
|
prompt = get_details_from_png(image_path)["p"]
|
||||||
|
version = get_current_version()
|
||||||
|
|
||||||
|
return render_template(
|
||||||
|
"index.html",
|
||||||
|
image=image_filename,
|
||||||
|
prompt=prompt,
|
||||||
|
reload_interval=user_config["frame"]["reload_interval"],
|
||||||
|
version=version,
|
||||||
|
)
|
8
routes/job_routes.py
Normal file
8
routes/job_routes.py
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
from flask import Blueprint
|
||||||
|
from libs.comfyui import cancel_current_job
|
||||||
|
|
||||||
|
bp = Blueprint("job_routes", __name__)
|
||||||
|
|
||||||
|
@bp.route("/cancel", methods=["GET"])
|
||||||
|
def cancel_job():
|
||||||
|
return cancel_current_job()
|
98
routes/settings_routes.py
Normal file
98
routes/settings_routes.py
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
from flask import Blueprint, render_template, request, redirect, url_for, session
|
||||||
|
import configparser
|
||||||
|
from libs.generic import load_topics_from_config, load_models_from_config
|
||||||
|
|
||||||
|
bp = Blueprint('settings_route', __name__)
|
||||||
|
CONFIG_PATH = "./user_config.cfg"
|
||||||
|
|
||||||
|
@bp.route('/settings', methods=['GET', 'POST'])
|
||||||
|
def config_editor():
|
||||||
|
if not session.get("authenticated"):
|
||||||
|
return redirect(url_for("auth_routes.login", next=request.path))
|
||||||
|
|
||||||
|
config = configparser.ConfigParser()
|
||||||
|
config.read(CONFIG_PATH)
|
||||||
|
|
||||||
|
topics = config.get('comfyui', 'topics', fallback='').split(',')
|
||||||
|
general_models = config.get('comfyui', 'models', fallback='').split(',')
|
||||||
|
flux_models = config.get('comfyui:flux', 'models', fallback='').split(',')
|
||||||
|
|
||||||
|
topics = [t.strip() for t in topics if t.strip()]
|
||||||
|
general_models = [m.strip() for m in general_models if m.strip()]
|
||||||
|
flux_models = [m.strip() for m in flux_models if m.strip()]
|
||||||
|
|
||||||
|
if request.method == 'POST':
|
||||||
|
if 'new_topic' in request.form:
|
||||||
|
new_topic = request.form.get('new_topic', '').strip()
|
||||||
|
if new_topic and new_topic not in topics:
|
||||||
|
topics.append(new_topic)
|
||||||
|
|
||||||
|
if 'delete_topic' in request.form:
|
||||||
|
to_delete = request.form.getlist('delete_topic')
|
||||||
|
topics = [topic for topic in topics if topic not in to_delete]
|
||||||
|
|
||||||
|
if 'new_model' in request.form:
|
||||||
|
new_model = request.form.get('new_model', '').strip()
|
||||||
|
if new_model:
|
||||||
|
if 'flux' in new_model and new_model not in flux_models:
|
||||||
|
flux_models.append(new_model)
|
||||||
|
elif 'flux' not in new_model and new_model not in general_models:
|
||||||
|
general_models.append(new_model)
|
||||||
|
|
||||||
|
if 'delete_model' in request.form:
|
||||||
|
to_delete = request.form.getlist('delete_model')
|
||||||
|
general_models = [m for m in general_models if m not in to_delete]
|
||||||
|
flux_models = [m for m in flux_models if m not in to_delete]
|
||||||
|
|
||||||
|
# Save models/topics into the shared config object
|
||||||
|
if not config.has_section('comfyui'):
|
||||||
|
config.add_section('comfyui')
|
||||||
|
if not config.has_section('comfyui:flux'):
|
||||||
|
config.add_section('comfyui:flux')
|
||||||
|
|
||||||
|
config.set('comfyui', 'models', ','.join(general_models))
|
||||||
|
config.set('comfyui:flux', 'models', ','.join(flux_models))
|
||||||
|
config.set('comfyui', 'topics', ','.join(topics))
|
||||||
|
|
||||||
|
# Handle dynamic CFG field updates (excluding DEFAULT and protected keys)
|
||||||
|
for section in config.sections():
|
||||||
|
for key in config[section]:
|
||||||
|
if key == 'models' and section in ('comfyui', 'comfyui:flux'):
|
||||||
|
continue
|
||||||
|
if key == 'topics' and section == 'comfyui':
|
||||||
|
continue
|
||||||
|
form_key = f"{section}:{key}"
|
||||||
|
if form_key in request.form:
|
||||||
|
new_value = request.form[form_key]
|
||||||
|
# Prevent overwriting masked secrets unless actually changed
|
||||||
|
if key in ('password_for_auth', 'api_key') and new_value == "********":
|
||||||
|
continue # Skip overwriting
|
||||||
|
config[section][key] = new_value
|
||||||
|
|
||||||
|
|
||||||
|
# Save everything at once
|
||||||
|
with open(CONFIG_PATH, 'w') as configfile:
|
||||||
|
config.write(configfile)
|
||||||
|
|
||||||
|
return redirect(url_for('settings_route.config_editor'))
|
||||||
|
|
||||||
|
# Prepare filtered config for display
|
||||||
|
filtered_config = {}
|
||||||
|
for section in config.sections():
|
||||||
|
items = {
|
||||||
|
k: v for k, v in config[section].items()
|
||||||
|
if not (
|
||||||
|
(k == 'models' and section in ('comfyui', 'comfyui:flux')) or
|
||||||
|
(k == 'topics' and section == 'comfyui')
|
||||||
|
)
|
||||||
|
}
|
||||||
|
if items: # only include non-empty sections
|
||||||
|
filtered_config[section] = items
|
||||||
|
|
||||||
|
return render_template(
|
||||||
|
'settings.html',
|
||||||
|
topics=sorted(topics,key=str.lower),
|
||||||
|
models=sorted(general_models + flux_models,key=str.lower),
|
||||||
|
config_sections=filtered_config.keys(),
|
||||||
|
config_values=filtered_config
|
||||||
|
)
|
@ -1,15 +1,19 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Create An Image</title>
|
<title>Create An Image</title>
|
||||||
<style>
|
<style>
|
||||||
|
/* ---------- reset ---------- */
|
||||||
* {
|
* {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ---------- layout ---------- */
|
||||||
body {
|
body {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@ -21,6 +25,7 @@
|
|||||||
font-family: Arial, sans-serif;
|
font-family: Arial, sans-serif;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
textarea {
|
textarea {
|
||||||
width: 80vw;
|
width: 80vw;
|
||||||
height: 200px;
|
height: 200px;
|
||||||
@ -34,11 +39,15 @@
|
|||||||
color: #eee;
|
color: #eee;
|
||||||
border: 1px solid #333;
|
border: 1px solid #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button-group {
|
.button-group {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 20px;
|
gap: 20px;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
button {
|
|
||||||
|
button,
|
||||||
|
select {
|
||||||
background: #333;
|
background: #333;
|
||||||
color: white;
|
color: white;
|
||||||
border: none;
|
border: none;
|
||||||
@ -48,7 +57,9 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: background 0.3s;
|
transition: background 0.3s;
|
||||||
}
|
}
|
||||||
button:hover {
|
|
||||||
|
button:hover,
|
||||||
|
select:hover {
|
||||||
background: #555;
|
background: #555;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -60,9 +71,10 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
background: rgba(0, 0, 0, 0.6);
|
background: rgba(0, 0, 0, 0.6);
|
||||||
visibility: hidden; /* toggled in JS */
|
visibility: hidden;
|
||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.spinner {
|
.spinner {
|
||||||
width: 50px;
|
width: 50px;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
@ -71,16 +83,78 @@
|
|||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
animation: spin 0.8s linear infinite;
|
animation: spin 0.8s linear infinite;
|
||||||
}
|
}
|
||||||
@keyframes spin { to { transform: rotate(360deg); } }
|
|
||||||
|
@keyframes spin {
|
||||||
|
to {
|
||||||
|
transform: rotate(360deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 600px) {
|
||||||
|
body {
|
||||||
|
min-height: 100dvh;
|
||||||
|
height: auto;
|
||||||
|
justify-content: flex-start;
|
||||||
|
padding-top: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-group {
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: stretch;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
button,
|
||||||
|
select {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
textarea {
|
||||||
|
height: 150px;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<h1 style="margin-bottom: 20px;">Create An Image</h1>
|
<h1 style="margin-bottom: 20px;">Create An Image</h1>
|
||||||
|
|
||||||
<textarea id="prompt-box" placeholder="Enter your custom prompt here..."></textarea>
|
<textarea id="prompt-box" placeholder="Enter your custom prompt here..."></textarea>
|
||||||
|
|
||||||
<div class="button-group">
|
<div class="button-group">
|
||||||
<button onclick="showSpinner(); location.href='/'">Back</button>
|
<button onclick="showSpinner(); location.href='/'">Back</button>
|
||||||
|
|
||||||
<button onclick="sendPrompt()">Send Prompt</button>
|
<button onclick="sendPrompt()">Send Prompt</button>
|
||||||
<button onclick="showSpinner(); location.href='/create'">Random Prompt</button>
|
|
||||||
|
<button onclick="randomPrompt()">Random Prompt</button>
|
||||||
|
|
||||||
|
<select id="model-select">
|
||||||
|
<option value="" selected>Random</option>
|
||||||
|
<!-- Group: FLUX -->
|
||||||
|
<optgroup label="FLUX">
|
||||||
|
{% for m in models if 'flux' in m|lower %}
|
||||||
|
<option value="{{ m }}">{{ m.rsplit('.', 1)[0] }}</option>
|
||||||
|
{% endfor %}
|
||||||
|
</optgroup>
|
||||||
|
<!-- Group: SDXL -->
|
||||||
|
<optgroup label="SDXL">
|
||||||
|
{% for m in models if 'flux' not in m|lower %}
|
||||||
|
<option value="{{ m }}">{{ m.rsplit('.', 1)[0] }}</option>
|
||||||
|
{% endfor %}
|
||||||
|
</optgroup>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="topic-select">
|
||||||
|
<option value="">No Topic</option>
|
||||||
|
<option value="random">Random</option>
|
||||||
|
<optgroup label="Topics">
|
||||||
|
{% for t in topics %}
|
||||||
|
<option value="{{ t }}">{{ t }}</option>
|
||||||
|
{% endfor %}
|
||||||
|
</optgroup>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- waiting overlay -->
|
<!-- waiting overlay -->
|
||||||
@ -90,30 +164,56 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
const overlay = document.getElementById('spinner-overlay');
|
const overlay = document.getElementById('spinner-overlay');
|
||||||
function showSpinner() {
|
|
||||||
overlay.style.visibility = 'visible';
|
function showSpinner() { overlay.style.visibility = 'visible'; }
|
||||||
}
|
|
||||||
|
|
||||||
function sendPrompt() {
|
function sendPrompt() {
|
||||||
showSpinner();
|
showSpinner();
|
||||||
const prompt = document.getElementById('prompt-box').value;
|
const prompt = document.getElementById('prompt-box').value;
|
||||||
|
const model = document.getElementById('model-select').value;
|
||||||
|
|
||||||
const formData = new URLSearchParams();
|
const formData = new URLSearchParams();
|
||||||
formData.append('prompt', prompt);
|
formData.append('prompt', prompt);
|
||||||
|
formData.append('model', model);
|
||||||
|
|
||||||
fetch('/create', {
|
fetch('/create', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
||||||
body: formData.toString()
|
body: formData.toString()
|
||||||
})
|
})
|
||||||
.then(response => {
|
.then(response => {
|
||||||
// If server redirects, follow it; otherwise go to /create
|
window.location.href = response.redirected ? response.url : '/create';
|
||||||
window.location.href = response.redirected ? response.url : '/create';
|
})
|
||||||
|
.catch(error => {
|
||||||
|
overlay.style.visibility = 'hidden';
|
||||||
|
alert("Error sending prompt: " + error);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// wrapper for Random Prompt button so it also sends the model
|
||||||
|
function randomPrompt() {
|
||||||
|
showSpinner();
|
||||||
|
const model = document.getElementById('model-select').value;
|
||||||
|
const topic = document.getElementById('topic-select').value; // this line was missing
|
||||||
|
|
||||||
|
const formData = new URLSearchParams();
|
||||||
|
formData.append('model', model);
|
||||||
|
formData.append('topic', topic); // include topic in request
|
||||||
|
|
||||||
|
fetch('/create', {
|
||||||
|
method: 'POST',
|
||||||
|
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
||||||
|
body: formData.toString()
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.then(response => {
|
||||||
overlay.style.visibility = 'hidden'; // hide spinner on failure
|
window.location.href = response.redirected ? response.url : '/create';
|
||||||
alert("Error sending prompt: " + error);
|
})
|
||||||
});
|
.catch(error => {
|
||||||
|
overlay.style.visibility = 'hidden';
|
||||||
|
alert("Error requesting random prompt: " + error);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
@ -55,6 +55,7 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
|
padding: 20px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.lightbox img {
|
.lightbox img {
|
||||||
@ -100,6 +101,10 @@
|
|||||||
max-width: 80%;
|
max-width: 80%;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
|
max-height: 25vh;
|
||||||
|
/* NEW: restrict height */
|
||||||
|
overflow-y: auto;
|
||||||
|
/* NEW: allow vertical scroll */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Back button fixed top right */
|
/* Back button fixed top right */
|
||||||
@ -158,6 +163,10 @@
|
|||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
max-width: 90%;
|
max-width: 90%;
|
||||||
padding: 8px 16px;
|
padding: 8px 16px;
|
||||||
|
max-height: 20vh;
|
||||||
|
/* smaller height for mobile */
|
||||||
|
overflow-y: auto;
|
||||||
|
/* keep scroll on mobile too */
|
||||||
}
|
}
|
||||||
|
|
||||||
.button-link {
|
.button-link {
|
||||||
@ -255,7 +264,8 @@
|
|||||||
|
|
||||||
if (detailsCache[filename]) {
|
if (detailsCache[filename]) {
|
||||||
document.getElementById("lightbox-prompt").textContent =
|
document.getElementById("lightbox-prompt").textContent =
|
||||||
`Model: ${detailsCache[filename].model}\n\n${detailsCache[filename].prompt}`;
|
`Model:${detailsCache[filename].model} - Created:${detailsCache[filename].date}\n\n${detailsCache[filename].prompt}`;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
document.getElementById("lightbox-prompt").textContent = "Loading…";
|
document.getElementById("lightbox-prompt").textContent = "Loading…";
|
||||||
|
|
||||||
@ -267,7 +277,7 @@
|
|||||||
.then(data => {
|
.then(data => {
|
||||||
detailsCache[filename] = data; // Cache the data
|
detailsCache[filename] = data; // Cache the data
|
||||||
document.getElementById("lightbox-prompt").textContent =
|
document.getElementById("lightbox-prompt").textContent =
|
||||||
`Model: ${data.model}\n\n${data.prompt}`;
|
`Model:${data.model} - Created:${data.date}\n\n${data.prompt}`;
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
document.getElementById("lightbox-prompt").textContent = "Couldn’t load details.";
|
document.getElementById("lightbox-prompt").textContent = "Couldn’t load details.";
|
||||||
@ -277,8 +287,17 @@
|
|||||||
|
|
||||||
function nextImage() {
|
function nextImage() {
|
||||||
const images = getGalleryImages();
|
const images = getGalleryImages();
|
||||||
currentIndex = (currentIndex + 1) % images.length;
|
if (currentIndex + 1 >= images.length && loadedCount < allImages.length) {
|
||||||
showImageAndLoadDetails(currentIndex);
|
loadNextBatch();
|
||||||
|
// Wait briefly to ensure DOM updates
|
||||||
|
setTimeout(() => {
|
||||||
|
currentIndex++;
|
||||||
|
showImageAndLoadDetails(currentIndex);
|
||||||
|
}, 100);
|
||||||
|
} else {
|
||||||
|
currentIndex = (currentIndex + 1) % images.length;
|
||||||
|
showImageAndLoadDetails(currentIndex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function prevImage() {
|
function prevImage() {
|
||||||
@ -287,6 +306,7 @@
|
|||||||
showImageAndLoadDetails(currentIndex);
|
showImageAndLoadDetails(currentIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function closeLightbox() {
|
function closeLightbox() {
|
||||||
document.getElementById("lightbox").style.display = "none";
|
document.getElementById("lightbox").style.display = "none";
|
||||||
}
|
}
|
||||||
|
@ -52,10 +52,11 @@
|
|||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="message">Image will be made using prompt:</div>
|
<div class="message">Image will be made with <i>{{ model }}</i> using prompt:</div>
|
||||||
<div class="prompt-text">
|
<div class="prompt-text">
|
||||||
{{ prompt }}
|
{{ prompt }}
|
||||||
</div>
|
</div>
|
||||||
<button onclick="location.href='/'">Home</button>
|
<button onclick="location.href='/'">Home</button>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
@ -21,9 +21,12 @@
|
|||||||
background: black;
|
background: black;
|
||||||
color: white;
|
color: white;
|
||||||
font-family: Arial, sans-serif;
|
font-family: Arial, sans-serif;
|
||||||
position: relative; /* So fixed elements inside work well */
|
position: relative;
|
||||||
|
padding-top: 20px;
|
||||||
|
padding-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.image-container {
|
.image-container {
|
||||||
max-width: 90vw;
|
max-width: 90vw;
|
||||||
max-height: 80vh;
|
max-height: 80vh;
|
||||||
@ -50,6 +53,10 @@
|
|||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
max-width: 80vw;
|
max-width: 80vw;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
max-height: 30vh;
|
||||||
|
/* NEW: limit height */
|
||||||
|
overflow-y: auto;
|
||||||
|
/* NEW: allow scrolling */
|
||||||
}
|
}
|
||||||
|
|
||||||
.button-group {
|
.button-group {
|
||||||
@ -85,9 +92,47 @@
|
|||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
pointer-events: none;
|
|
||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.version a {
|
||||||
|
color: inherit;
|
||||||
|
text-decoration: none;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.version a:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.image-container {
|
||||||
|
max-width: 100vw;
|
||||||
|
max-height: 50vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
max-width: 100%;
|
||||||
|
max-height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.prompt {
|
||||||
|
max-height: 20vh;
|
||||||
|
font-size: 14px;
|
||||||
|
padding: 10px 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-group {
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-link {
|
||||||
|
font-size: 14px;
|
||||||
|
padding: 8px 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
@ -99,7 +144,7 @@
|
|||||||
<body>
|
<body>
|
||||||
{% if image %}
|
{% if image %}
|
||||||
<div class="image-container">
|
<div class="image-container">
|
||||||
<img src="{{ url_for('images', filename=image) }}" alt="Latest Image" />
|
<img src="{{ url_for('image_routes.serve_image', filename=image) }}" alt="Latest Image" />
|
||||||
</div>
|
</div>
|
||||||
{% if prompt %}
|
{% if prompt %}
|
||||||
<div class="prompt">{{ prompt }}</div>
|
<div class="prompt">{{ prompt }}</div>
|
||||||
@ -113,7 +158,9 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<!-- Version number at bottom right -->
|
<!-- Version number at bottom right -->
|
||||||
<div class="version">v{{ version }}</div>
|
<div class="version">
|
||||||
|
<a href="{{ url_for('settings_route.config_editor') }}">v{{ version }}</a>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
73
templates/login.html
Normal file
73
templates/login.html
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Login</title>
|
||||||
|
<style>
|
||||||
|
* {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
height: 100vh;
|
||||||
|
background: black;
|
||||||
|
color: white;
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
padding: 20px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.message {
|
||||||
|
font-size: 22px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
.prompt-text {
|
||||||
|
font-size: 20px;
|
||||||
|
background: #111;
|
||||||
|
padding: 20px;
|
||||||
|
border-radius: 10px;
|
||||||
|
border: 1px solid #333;
|
||||||
|
max-width: 80vw;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
}
|
||||||
|
input[type="password"] {
|
||||||
|
padding: 10px;
|
||||||
|
border-radius: 8px;
|
||||||
|
border: 1px solid #555;
|
||||||
|
background: #222;
|
||||||
|
color: white;
|
||||||
|
font-size: 16px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
width: 250px;
|
||||||
|
}
|
||||||
|
button {
|
||||||
|
background: #333;
|
||||||
|
color: white;
|
||||||
|
border: none;
|
||||||
|
padding: 10px 20px;
|
||||||
|
border-radius: 8px;
|
||||||
|
font-size: 16px;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: background 0.3s;
|
||||||
|
}
|
||||||
|
button:hover {
|
||||||
|
background: #555;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="message">Please enter the password to continue:</div>
|
||||||
|
<form method="post">
|
||||||
|
<div class="prompt-text">
|
||||||
|
<input type="password" name="password" placeholder="Password" required>
|
||||||
|
<input type="hidden" name="next" value="{{ next }}">
|
||||||
|
</div>
|
||||||
|
<button type="submit">Login</button>
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>
|
192
templates/settings.html
Normal file
192
templates/settings.html
Normal file
@ -0,0 +1,192 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<title>Config Editor</title>
|
||||||
|
<style>
|
||||||
|
* {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
background: black;
|
||||||
|
color: white;
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
min-height: 100vh;
|
||||||
|
padding: 40px 20px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box {
|
||||||
|
background: #1a1a1a;
|
||||||
|
padding: 20px;
|
||||||
|
border-radius: 12px;
|
||||||
|
width: 45%;
|
||||||
|
min-width: 300px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
font-size: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
form {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
select,
|
||||||
|
input[type="text"] {
|
||||||
|
width: 100%;
|
||||||
|
padding: 10px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
font-size: 16px;
|
||||||
|
border-radius: 6px;
|
||||||
|
border: none;
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
width: 100%;
|
||||||
|
background: #333;
|
||||||
|
color: white;
|
||||||
|
text-decoration: none;
|
||||||
|
padding: 10px;
|
||||||
|
border-radius: 8px;
|
||||||
|
font-size: 16px;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: background 0.3s;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
button:hover {
|
||||||
|
background: #555;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-group {
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-link {
|
||||||
|
background: #333;
|
||||||
|
height: 40px;
|
||||||
|
color: white;
|
||||||
|
text-decoration: none;
|
||||||
|
padding: 10px 20px;
|
||||||
|
border-radius: 8px;
|
||||||
|
font-size: 16px;
|
||||||
|
transition: background 0.3s;
|
||||||
|
display: inline-block;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-link:hover {
|
||||||
|
background: #555;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
body {
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box {
|
||||||
|
width: 90%;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.back-button-wrapper {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div class="box">
|
||||||
|
<h2>Topics</h2>
|
||||||
|
<form method="post">
|
||||||
|
<select name="delete_topic">
|
||||||
|
{% for item in topics %}
|
||||||
|
<option value="{{ item }}">{{ item }}</option>
|
||||||
|
{% endfor %}
|
||||||
|
</select>
|
||||||
|
<button name="delete_topic" type="submit">Delete Selected Topic</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<form method="post">
|
||||||
|
<input type="text" name="new_topic" placeholder="New topic">
|
||||||
|
<button name="new_topic" type="submit">Add Topic</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="box">
|
||||||
|
<h2>Models</h2>
|
||||||
|
<form method="post">
|
||||||
|
<select name="delete_model">
|
||||||
|
{% for item in models %}
|
||||||
|
<option value="{{ item }}">{{ item }}</option>
|
||||||
|
{% endfor %}
|
||||||
|
</select>
|
||||||
|
<button name="delete_model" type="submit">Delete Selected Model</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<form method="post">
|
||||||
|
<input type="text" name="new_model" placeholder="New model">
|
||||||
|
<button name="new_model" type="submit">Add Model</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="box" style="width: 100%;">
|
||||||
|
<h2>Config Values</h2>
|
||||||
|
<form method="post" style="display:flex; flex-wrap:wrap; justify-content:space-between;">
|
||||||
|
{% for section in config_sections %}
|
||||||
|
<div class="box">
|
||||||
|
<h2>[{{ section }}]</h2>
|
||||||
|
{% for key, value in config_values[section].items() %}
|
||||||
|
<label>{{ key }}</label>
|
||||||
|
{% if value.lower() in ['true', 'false'] %}
|
||||||
|
<select name="{{ section }}:{{ key }}">
|
||||||
|
<option value="True" {% if value.lower()=='true' %}selected{% endif %}>True</option>
|
||||||
|
<option value="False" {% if value.lower()=='false' %}selected{% endif %}>False</option>
|
||||||
|
</select>
|
||||||
|
{% else %}
|
||||||
|
{% if key in ['password_for_auth', 'api_key'] %}
|
||||||
|
<input type="text" name="{{ section }}:{{ key }}" value="********" placeholder="********">
|
||||||
|
{% elif value.lower() in ['true', 'false'] %}
|
||||||
|
<select name="{{ section }}:{{ key }}">
|
||||||
|
<option value="True" {% if value.lower()=='true' %}selected{% endif %}>True</option>
|
||||||
|
<option value="False" {% if value.lower()=='false' %}selected{% endif %}>False</option>
|
||||||
|
</select>
|
||||||
|
{% else %}
|
||||||
|
<input type="text" name="{{ section }}:{{ key }}" value="{{ value }}">
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
<div class="box" style="width: 100%;">
|
||||||
|
<button type="submit">Save Config</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="back-button-wrapper">
|
||||||
|
<a href="/" class="button-link">Back to Home</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
@ -3,6 +3,8 @@ reload_interval = 30000
|
|||||||
auto_regen = True
|
auto_regen = True
|
||||||
regen_time = 03:00
|
regen_time = 03:00
|
||||||
port = 5000
|
port = 5000
|
||||||
|
create_requires_auth = False
|
||||||
|
password_for_auth = create
|
||||||
|
|
||||||
[comfyui]
|
[comfyui]
|
||||||
comfyui_url = http://comfyui
|
comfyui_url = http://comfyui
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
1
|
1
|
||||||
],
|
],
|
||||||
"vae": [
|
"vae": [
|
||||||
"27",
|
"73",
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -15,75 +15,6 @@
|
|||||||
"title": "VAE Decode"
|
"title": "VAE Decode"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"22": {
|
|
||||||
"inputs": {
|
|
||||||
"clip_name1": "t5/t5xxl_fp8_e4m3fn.safetensors",
|
|
||||||
"clip_name2": "clip_l.safetensors",
|
|
||||||
"type": "flux",
|
|
||||||
"device": "default"
|
|
||||||
},
|
|
||||||
"class_type": "DualCLIPLoader",
|
|
||||||
"_meta": {
|
|
||||||
"title": "DualCLIPLoader"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"27": {
|
|
||||||
"inputs": {
|
|
||||||
"vae_name": "FLUX1/ae.safetensors"
|
|
||||||
},
|
|
||||||
"class_type": "VAELoader",
|
|
||||||
"_meta": {
|
|
||||||
"title": "Load VAE"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"32": {
|
|
||||||
"inputs": {
|
|
||||||
"upscale_model": [
|
|
||||||
"33",
|
|
||||||
0
|
|
||||||
],
|
|
||||||
"image": [
|
|
||||||
"8",
|
|
||||||
0
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"class_type": "ImageUpscaleWithModel",
|
|
||||||
"_meta": {
|
|
||||||
"title": "Upscale Image (using Model)"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"33": {
|
|
||||||
"inputs": {
|
|
||||||
"model_name": "4x-UltraSharp.pth"
|
|
||||||
},
|
|
||||||
"class_type": "UpscaleModelLoader",
|
|
||||||
"_meta": {
|
|
||||||
"title": "Load Upscale Model"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"34": {
|
|
||||||
"inputs": {
|
|
||||||
"upscale_method": "lanczos",
|
|
||||||
"scale_by": 0.5,
|
|
||||||
"image": [
|
|
||||||
"32",
|
|
||||||
0
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"class_type": "ImageScaleBy",
|
|
||||||
"_meta": {
|
|
||||||
"title": "Half size"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"35": {
|
|
||||||
"inputs": {
|
|
||||||
"unet_name": "flux1-dev-Q4_0.gguf"
|
|
||||||
},
|
|
||||||
"class_type": "UnetLoaderGGUF",
|
|
||||||
"_meta": {
|
|
||||||
"title": "Unet Loader (GGUF)"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"40": {
|
"40": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"int": 20
|
"int": 20
|
||||||
@ -126,10 +57,7 @@
|
|||||||
"50",
|
"50",
|
||||||
1
|
1
|
||||||
],
|
],
|
||||||
"scheduler": [
|
"scheduler_name": "normal",
|
||||||
"49",
|
|
||||||
1
|
|
||||||
],
|
|
||||||
"positive": [
|
"positive": [
|
||||||
"44",
|
"44",
|
||||||
0
|
0
|
||||||
@ -172,7 +100,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"images": [
|
"images": [
|
||||||
"34",
|
"8",
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -183,7 +111,7 @@
|
|||||||
},
|
},
|
||||||
"44": {
|
"44": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"text": "",
|
"text": "Yautja Predator wielding flamethrower in smoky, cyberpunk alleyway darkness",
|
||||||
"speak_and_recognation": {
|
"speak_and_recognation": {
|
||||||
"__value__": [
|
"__value__": [
|
||||||
false,
|
false,
|
||||||
@ -198,7 +126,7 @@
|
|||||||
},
|
},
|
||||||
"45": {
|
"45": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"text": "",
|
"text": "text, watermark, deformed Avoid flat colors, poor lighting, and artificial elements. No unrealistic elements, low resolution, or flat colors. Avoid generic objects, poor lighting, and inconsistent styles, blurry, low-quality, distorted faces, overexposed lighting, extra limbs, bad anatomy, low contrast",
|
||||||
"speak_and_recognation": {
|
"speak_and_recognation": {
|
||||||
"__value__": [
|
"__value__": [
|
||||||
false,
|
false,
|
||||||
@ -224,18 +152,19 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"clip": [
|
"clip": [
|
||||||
"68",
|
"72",
|
||||||
1
|
0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"class_type": "CLIPTextEncode",
|
"class_type": "CLIPTextEncode",
|
||||||
"_meta": {
|
"_meta": {
|
||||||
"title": "CLIP Text Encode (Prompt)"
|
"title": "Prompt Encoder"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"48": {
|
"48": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"seed": 903006749445372
|
"seed": 47371998700984,
|
||||||
|
"increment": 1
|
||||||
},
|
},
|
||||||
"class_type": "Seed Generator (Image Saver)",
|
"class_type": "Seed Generator (Image Saver)",
|
||||||
"_meta": {
|
"_meta": {
|
||||||
@ -248,7 +177,7 @@
|
|||||||
},
|
},
|
||||||
"class_type": "Scheduler Selector (Comfy) (Image Saver)",
|
"class_type": "Scheduler Selector (Comfy) (Image Saver)",
|
||||||
"_meta": {
|
"_meta": {
|
||||||
"title": "Scheduler Selector"
|
"title": "Scheduler"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"50": {
|
"50": {
|
||||||
@ -257,66 +186,27 @@
|
|||||||
},
|
},
|
||||||
"class_type": "Sampler Selector (Image Saver)",
|
"class_type": "Sampler Selector (Image Saver)",
|
||||||
"_meta": {
|
"_meta": {
|
||||||
"title": "Sampler Selector (Image Saver)"
|
"title": "Sampler"
|
||||||
}
|
|
||||||
},
|
|
||||||
"51": {
|
|
||||||
"inputs": {
|
|
||||||
"images": [
|
|
||||||
"8",
|
|
||||||
0
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"class_type": "PreviewImage",
|
|
||||||
"_meta": {
|
|
||||||
"title": "Preview Image"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"52": {
|
"52": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"float": 3.5
|
"float": 3.500000000000001
|
||||||
},
|
},
|
||||||
"class_type": "Float Literal (Image Saver)",
|
"class_type": "Float Literal (Image Saver)",
|
||||||
"_meta": {
|
"_meta": {
|
||||||
"title": "CFG"
|
"title": "CFG Scale"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"53": {
|
"53": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"float": 1
|
"float": 1.0000000000000002
|
||||||
},
|
},
|
||||||
"class_type": "Float Literal (Image Saver)",
|
"class_type": "Float Literal (Image Saver)",
|
||||||
"_meta": {
|
"_meta": {
|
||||||
"title": "Denoise"
|
"title": "Denoise"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"60": {
|
|
||||||
"inputs": {
|
|
||||||
"clip_l": "",
|
|
||||||
"t5xxl": [
|
|
||||||
"44",
|
|
||||||
0
|
|
||||||
],
|
|
||||||
"guidance": [
|
|
||||||
"52",
|
|
||||||
0
|
|
||||||
],
|
|
||||||
"speak_and_recognation": {
|
|
||||||
"__value__": [
|
|
||||||
false,
|
|
||||||
true
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"clip": [
|
|
||||||
"68",
|
|
||||||
1
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"class_type": "CLIPTextEncodeFlux",
|
|
||||||
"_meta": {
|
|
||||||
"title": "CLIPTextEncodeFlux"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"62": {
|
"62": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"noise": [
|
"noise": [
|
||||||
@ -342,7 +232,7 @@
|
|||||||
},
|
},
|
||||||
"class_type": "SamplerCustomAdvanced",
|
"class_type": "SamplerCustomAdvanced",
|
||||||
"_meta": {
|
"_meta": {
|
||||||
"title": "SamplerCustomAdvanced"
|
"title": "Custom Sampler"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"63": {
|
"63": {
|
||||||
@ -354,7 +244,7 @@
|
|||||||
},
|
},
|
||||||
"class_type": "KSamplerSelect",
|
"class_type": "KSamplerSelect",
|
||||||
"_meta": {
|
"_meta": {
|
||||||
"title": "KSamplerSelect"
|
"title": "KSampler Select"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"64": {
|
"64": {
|
||||||
@ -372,13 +262,13 @@
|
|||||||
0
|
0
|
||||||
],
|
],
|
||||||
"model": [
|
"model": [
|
||||||
"68",
|
"35",
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"class_type": "BasicScheduler",
|
"class_type": "BasicScheduler",
|
||||||
"_meta": {
|
"_meta": {
|
||||||
"title": "BasicScheduler"
|
"title": "Sigma Generator"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"65": {
|
"65": {
|
||||||
@ -390,13 +280,13 @@
|
|||||||
},
|
},
|
||||||
"class_type": "RandomNoise",
|
"class_type": "RandomNoise",
|
||||||
"_meta": {
|
"_meta": {
|
||||||
"title": "RandomNoise"
|
"title": "Noise Generator"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"67": {
|
"67": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"model": [
|
"model": [
|
||||||
"68",
|
"35",
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"conditioning": [
|
"conditioning": [
|
||||||
@ -406,31 +296,48 @@
|
|||||||
},
|
},
|
||||||
"class_type": "BasicGuider",
|
"class_type": "BasicGuider",
|
||||||
"_meta": {
|
"_meta": {
|
||||||
"title": "BasicGuider"
|
"title": "Prompt Guider"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"68": {
|
"72": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"lora_01": "None",
|
"clip_name1": "t5-v1_1-xxl-encoder-Q4_K_M.gguf",
|
||||||
"strength_01": 1,
|
"clip_name2": "clip_l.safetensors",
|
||||||
"lora_02": "None",
|
"type": "flux",
|
||||||
"strength_02": 1,
|
"device": "cuda:0",
|
||||||
"lora_03": "None",
|
"virtual_vram_gb": 0,
|
||||||
"strength_03": 1,
|
"use_other_vram": false,
|
||||||
"lora_04": "None",
|
"expert_mode_allocations": ""
|
||||||
"strength_04": 1,
|
|
||||||
"model": [
|
|
||||||
"35",
|
|
||||||
0
|
|
||||||
],
|
|
||||||
"clip": [
|
|
||||||
"22",
|
|
||||||
0
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"class_type": "Lora Loader Stack (rgthree)",
|
"class_type": "DualCLIPLoaderGGUFDisTorchMultiGPU",
|
||||||
"_meta": {
|
"_meta": {
|
||||||
"title": "Lora Loader Stack (rgthree)"
|
"title": "DualCLIPLoaderGGUFDisTorchMultiGPU"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"73": {
|
||||||
|
"inputs": {
|
||||||
|
"vae_name": "FLUX1/ae.safetensors",
|
||||||
|
"device": "cuda:0"
|
||||||
|
},
|
||||||
|
"class_type": "VAELoaderMultiGPU",
|
||||||
|
"_meta": {
|
||||||
|
"title": "VAELoaderMultiGPU"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"35": {
|
||||||
|
"inputs": {
|
||||||
|
"unet_name": "flux1-dev-Q4_0.gguf",
|
||||||
|
"dequant_dtype": "default",
|
||||||
|
"patch_dtype": "default",
|
||||||
|
"patch_on_device": false,
|
||||||
|
"device": "cuda:1",
|
||||||
|
"virtual_vram_gb": 0,
|
||||||
|
"use_other_vram": false,
|
||||||
|
"expert_mode_allocations": ""
|
||||||
|
},
|
||||||
|
"class_type": "UnetLoaderGGUFAdvancedDisTorchMultiGPU",
|
||||||
|
"_meta": {
|
||||||
|
"title": "UnetLoaderGGUFAdvancedDisTorchMultiGPU"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
433
workflow_flux_original.json
Normal file
433
workflow_flux_original.json
Normal file
@ -0,0 +1,433 @@
|
|||||||
|
{
|
||||||
|
"8": {
|
||||||
|
"inputs": {
|
||||||
|
"samples": [
|
||||||
|
"62",
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"vae": [
|
||||||
|
"27",
|
||||||
|
0
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"class_type": "VAEDecode",
|
||||||
|
"_meta": {
|
||||||
|
"title": "VAE Decode"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"22": {
|
||||||
|
"inputs": {
|
||||||
|
"clip_name1": "t5/t5xxl_fp8_e4m3fn.safetensors",
|
||||||
|
"clip_name2": "clip_l.safetensors",
|
||||||
|
"type": "flux",
|
||||||
|
"device": "default"
|
||||||
|
},
|
||||||
|
"class_type": "DualCLIPLoader",
|
||||||
|
"_meta": {
|
||||||
|
"title": "DualCLIPLoader"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"27": {
|
||||||
|
"inputs": {
|
||||||
|
"vae_name": "FLUX1/ae.safetensors"
|
||||||
|
},
|
||||||
|
"class_type": "VAELoader",
|
||||||
|
"_meta": {
|
||||||
|
"title": "Load VAE"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"32": {
|
||||||
|
"inputs": {
|
||||||
|
"upscale_model": [
|
||||||
|
"33",
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"image": [
|
||||||
|
"8",
|
||||||
|
0
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"class_type": "ImageUpscaleWithModel",
|
||||||
|
"_meta": {
|
||||||
|
"title": "Upscale Image (using Model)"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"33": {
|
||||||
|
"inputs": {
|
||||||
|
"model_name": "4x-UltraSharp.pth"
|
||||||
|
},
|
||||||
|
"class_type": "UpscaleModelLoader",
|
||||||
|
"_meta": {
|
||||||
|
"title": "Load Upscale Model"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"34": {
|
||||||
|
"inputs": {
|
||||||
|
"upscale_method": "lanczos",
|
||||||
|
"scale_by": 0.5,
|
||||||
|
"image": [
|
||||||
|
"32",
|
||||||
|
0
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"class_type": "ImageScaleBy",
|
||||||
|
"_meta": {
|
||||||
|
"title": "Half size"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"35": {
|
||||||
|
"inputs": {
|
||||||
|
"unet_name": "flux1-dev-Q4_0.gguf"
|
||||||
|
},
|
||||||
|
"class_type": "UnetLoaderGGUF",
|
||||||
|
"_meta": {
|
||||||
|
"title": "Unet Loader (GGUF)"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"40": {
|
||||||
|
"inputs": {
|
||||||
|
"int": 20
|
||||||
|
},
|
||||||
|
"class_type": "Int Literal (Image Saver)",
|
||||||
|
"_meta": {
|
||||||
|
"title": "Generation Steps"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"41": {
|
||||||
|
"inputs": {
|
||||||
|
"width": 720,
|
||||||
|
"height": 1080,
|
||||||
|
"aspect_ratio": "custom",
|
||||||
|
"swap_dimensions": "Off",
|
||||||
|
"upscale_factor": 2,
|
||||||
|
"prescale_factor": 1,
|
||||||
|
"batch_size": 1
|
||||||
|
},
|
||||||
|
"class_type": "CR Aspect Ratio",
|
||||||
|
"_meta": {
|
||||||
|
"title": "CR Aspect Ratio"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"42": {
|
||||||
|
"inputs": {
|
||||||
|
"filename": "THISFILE",
|
||||||
|
"path": "",
|
||||||
|
"extension": "png",
|
||||||
|
"steps": [
|
||||||
|
"40",
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"cfg": [
|
||||||
|
"52",
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"modelname": "flux1-dev-Q4_0.gguf",
|
||||||
|
"sampler_name": [
|
||||||
|
"50",
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"positive": [
|
||||||
|
"44",
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"negative": [
|
||||||
|
"45",
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"seed_value": [
|
||||||
|
"48",
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"width": [
|
||||||
|
"41",
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"height": [
|
||||||
|
"41",
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"lossless_webp": true,
|
||||||
|
"quality_jpeg_or_webp": 100,
|
||||||
|
"optimize_png": false,
|
||||||
|
"counter": 0,
|
||||||
|
"denoise": [
|
||||||
|
"53",
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"clip_skip": 0,
|
||||||
|
"time_format": "%Y-%m-%d-%H%M%S",
|
||||||
|
"save_workflow_as_json": true,
|
||||||
|
"embed_workflow": true,
|
||||||
|
"additional_hashes": "",
|
||||||
|
"download_civitai_data": true,
|
||||||
|
"easy_remix": true,
|
||||||
|
"speak_and_recognation": {
|
||||||
|
"__value__": [
|
||||||
|
false,
|
||||||
|
true
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"images": [
|
||||||
|
"34",
|
||||||
|
0
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"class_type": "Image Saver",
|
||||||
|
"_meta": {
|
||||||
|
"title": "CivitAI Image Saver"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"44": {
|
||||||
|
"inputs": {
|
||||||
|
"text": "",
|
||||||
|
"speak_and_recognation": {
|
||||||
|
"__value__": [
|
||||||
|
false,
|
||||||
|
true
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"class_type": "ttN text",
|
||||||
|
"_meta": {
|
||||||
|
"title": "Positive Prompt T5"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"45": {
|
||||||
|
"inputs": {
|
||||||
|
"text": "text, watermark, deformed Avoid flat colors, poor lighting, and artificial elements. No unrealistic elements, low resolution, or flat colors. Avoid generic objects, poor lighting, and inconsistent styles, blurry, low-quality, distorted faces, overexposed lighting, extra limbs, bad anatomy, low contrast",
|
||||||
|
"speak_and_recognation": {
|
||||||
|
"__value__": [
|
||||||
|
false,
|
||||||
|
true
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"class_type": "ttN text",
|
||||||
|
"_meta": {
|
||||||
|
"title": "Negative Prompt"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"47": {
|
||||||
|
"inputs": {
|
||||||
|
"text": [
|
||||||
|
"44",
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"speak_and_recognation": {
|
||||||
|
"__value__": [
|
||||||
|
false,
|
||||||
|
true
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"clip": [
|
||||||
|
"68",
|
||||||
|
1
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"class_type": "CLIPTextEncode",
|
||||||
|
"_meta": {
|
||||||
|
"title": "CLIP Text Encode (Prompt)"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"48": {
|
||||||
|
"inputs": {
|
||||||
|
"seed": 903006749445372,
|
||||||
|
"increment": 1
|
||||||
|
},
|
||||||
|
"class_type": "Seed Generator (Image Saver)",
|
||||||
|
"_meta": {
|
||||||
|
"title": "Seed"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"49": {
|
||||||
|
"inputs": {
|
||||||
|
"scheduler": "beta"
|
||||||
|
},
|
||||||
|
"class_type": "Scheduler Selector (Comfy) (Image Saver)",
|
||||||
|
"_meta": {
|
||||||
|
"title": "Scheduler Selector"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"50": {
|
||||||
|
"inputs": {
|
||||||
|
"sampler_name": "euler"
|
||||||
|
},
|
||||||
|
"class_type": "Sampler Selector (Image Saver)",
|
||||||
|
"_meta": {
|
||||||
|
"title": "Sampler Selector (Image Saver)"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"51": {
|
||||||
|
"inputs": {
|
||||||
|
"images": [
|
||||||
|
"8",
|
||||||
|
0
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"class_type": "PreviewImage",
|
||||||
|
"_meta": {
|
||||||
|
"title": "Preview Image"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"52": {
|
||||||
|
"inputs": {
|
||||||
|
"float": 3.5
|
||||||
|
},
|
||||||
|
"class_type": "Float Literal (Image Saver)",
|
||||||
|
"_meta": {
|
||||||
|
"title": "CFG"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"53": {
|
||||||
|
"inputs": {
|
||||||
|
"float": 1
|
||||||
|
},
|
||||||
|
"class_type": "Float Literal (Image Saver)",
|
||||||
|
"_meta": {
|
||||||
|
"title": "Denoise"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"60": {
|
||||||
|
"inputs": {
|
||||||
|
"clip_l": "",
|
||||||
|
"t5xxl": [
|
||||||
|
"44",
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"guidance": [
|
||||||
|
"52",
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"speak_and_recognation": {
|
||||||
|
"__value__": [
|
||||||
|
false,
|
||||||
|
true
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"clip": [
|
||||||
|
"68",
|
||||||
|
1
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"class_type": "CLIPTextEncodeFlux",
|
||||||
|
"_meta": {
|
||||||
|
"title": "CLIPTextEncodeFlux"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"62": {
|
||||||
|
"inputs": {
|
||||||
|
"noise": [
|
||||||
|
"65",
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"guider": [
|
||||||
|
"67",
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"sampler": [
|
||||||
|
"63",
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"sigmas": [
|
||||||
|
"64",
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"latent_image": [
|
||||||
|
"41",
|
||||||
|
5
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"class_type": "SamplerCustomAdvanced",
|
||||||
|
"_meta": {
|
||||||
|
"title": "SamplerCustomAdvanced"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"63": {
|
||||||
|
"inputs": {
|
||||||
|
"sampler_name": [
|
||||||
|
"50",
|
||||||
|
0
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"class_type": "KSamplerSelect",
|
||||||
|
"_meta": {
|
||||||
|
"title": "KSamplerSelect"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"64": {
|
||||||
|
"inputs": {
|
||||||
|
"scheduler": [
|
||||||
|
"49",
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"steps": [
|
||||||
|
"40",
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"denoise": [
|
||||||
|
"53",
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"model": [
|
||||||
|
"68",
|
||||||
|
0
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"class_type": "BasicScheduler",
|
||||||
|
"_meta": {
|
||||||
|
"title": "BasicScheduler"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"65": {
|
||||||
|
"inputs": {
|
||||||
|
"noise_seed": [
|
||||||
|
"48",
|
||||||
|
0
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"class_type": "RandomNoise",
|
||||||
|
"_meta": {
|
||||||
|
"title": "RandomNoise"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"67": {
|
||||||
|
"inputs": {
|
||||||
|
"model": [
|
||||||
|
"68",
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"conditioning": [
|
||||||
|
"47",
|
||||||
|
0
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"class_type": "BasicGuider",
|
||||||
|
"_meta": {
|
||||||
|
"title": "BasicGuider"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"68": {
|
||||||
|
"inputs": {
|
||||||
|
"lora_01": "None",
|
||||||
|
"strength_01": 1,
|
||||||
|
"lora_02": "None",
|
||||||
|
"strength_02": 1,
|
||||||
|
"lora_03": "None",
|
||||||
|
"strength_03": 1,
|
||||||
|
"lora_04": "None",
|
||||||
|
"strength_04": 1,
|
||||||
|
"model": [
|
||||||
|
"35",
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"clip": [
|
||||||
|
"22",
|
||||||
|
0
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"class_type": "Lora Loader Stack (rgthree)",
|
||||||
|
"_meta": {
|
||||||
|
"title": "Lora Loader Stack (rgthree)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -59,7 +59,7 @@
|
|||||||
},
|
},
|
||||||
"class_type": "CLIPTextEncode",
|
"class_type": "CLIPTextEncode",
|
||||||
"_meta": {
|
"_meta": {
|
||||||
"title": "CLIP Text Encode (Prompt)"
|
"title": "Positive"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"7": {
|
"7": {
|
||||||
@ -72,7 +72,7 @@
|
|||||||
},
|
},
|
||||||
"class_type": "CLIPTextEncode",
|
"class_type": "CLIPTextEncode",
|
||||||
"_meta": {
|
"_meta": {
|
||||||
"title": "CLIP Text Encode (Prompt)"
|
"title": "Negative"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"8": {
|
"8": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user