mirror of
https://github.com/karl0ss/ai_image_frame_server.git
synced 2025-06-26 18:29:13 +01:00
Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
4ea81daa47 | |||
070279cd78 | |||
6390199cb8 | |||
078c8aec34 | |||
d7883af040 | |||
e68a9ac75d | |||
1da2288104 | |||
7a5b41b5b5 | |||
3e86eb1880 |
@ -1,5 +1,5 @@
|
|||||||
[tool.bumpversion]
|
[tool.bumpversion]
|
||||||
current_version = "0.2.0"
|
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}"
|
||||||
|
@ -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 []
|
||||||
@ -167,7 +164,7 @@ def create_image(prompt: str | None = None, model: str = "Random") -> 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="Unet Loader (GGUF)",
|
model_node="UnetLoaderGGUFAdvancedDisTorchMultiGPU",
|
||||||
model_param="unet_name",
|
model_param="unet_name",
|
||||||
model=model
|
model=model
|
||||||
)
|
)
|
||||||
|
@ -102,12 +102,15 @@ def get_current_version():
|
|||||||
def load_models_from_config():
|
def load_models_from_config():
|
||||||
flux_models = load_config()["comfyui:flux"]["models"].split(",")
|
flux_models = load_config()["comfyui:flux"]["models"].split(",")
|
||||||
sdxl_models = load_config()["comfyui"]["models"].split(",")
|
sdxl_models = load_config()["comfyui"]["models"].split(",")
|
||||||
all_models = flux_models + sdxl_models
|
sorted_flux_models = sorted(flux_models, key=str.lower)
|
||||||
return all_models
|
sorted_sdxl_models = sorted(sdxl_models, key=str.lower)
|
||||||
|
return sorted_sdxl_models, sorted_flux_models
|
||||||
|
|
||||||
|
|
||||||
def load_topics_from_config():
|
def load_topics_from_config():
|
||||||
topics = load_config()["comfyui"]["topics"].split(",")
|
topics = load_config()["comfyui"]["topics"].split(",")
|
||||||
return topics
|
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"]
|
@ -1,6 +1,6 @@
|
|||||||
from flask import Blueprint, request, render_template, redirect, url_for, session
|
from flask import Blueprint, request, render_template, redirect, url_for, session
|
||||||
import threading
|
import threading
|
||||||
from libs.comfyui import create_image, select_model
|
from libs.comfyui import create_image, select_model, get_available_models
|
||||||
from libs.ollama import create_prompt_on_openwebui
|
from libs.ollama import create_prompt_on_openwebui
|
||||||
from libs.generic import load_models_from_config, load_topics_from_config
|
from libs.generic import load_models_from_config, load_topics_from_config
|
||||||
import os
|
import os
|
||||||
@ -21,7 +21,7 @@ def create():
|
|||||||
threading.Thread(target=lambda: create_image(prompt, model)).start()
|
threading.Thread(target=lambda: create_image(prompt, model)).start()
|
||||||
return redirect(url_for("create_routes.image_queued", prompt=prompt, model=model.split(".")[0]))
|
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(), topics=load_topics_from_config())
|
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")
|
@bp.route("/image_queued")
|
||||||
def image_queued():
|
def image_queued():
|
||||||
@ -33,7 +33,7 @@ def image_queued():
|
|||||||
def create_image_page():
|
def create_image_page():
|
||||||
if user_config["frame"]["create_requires_auth"] == "True" and not session.get("authenticated"):
|
if user_config["frame"]["create_requires_auth"] == "True" and not session.get("authenticated"):
|
||||||
return redirect(url_for("auth_routes.login", next=request.path))
|
return redirect(url_for("auth_routes.login", next=request.path))
|
||||||
return render_template("create_image.html", models=load_models_from_config(), topics=load_topics_from_config())
|
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):
|
def init_app(config):
|
||||||
|
@ -1,40 +1,98 @@
|
|||||||
from flask import Blueprint, render_template, request, redirect, url_for, session
|
from flask import Blueprint, render_template, request, redirect, url_for, session
|
||||||
import configparser
|
import configparser
|
||||||
from libs.generic import load_topics_from_config
|
from libs.generic import load_topics_from_config, load_models_from_config
|
||||||
|
|
||||||
bp = Blueprint('settings_route', __name__)
|
bp = Blueprint('settings_route', __name__)
|
||||||
CONFIG_PATH = "./user_config.cfg"
|
CONFIG_PATH = "./user_config.cfg"
|
||||||
|
|
||||||
def save_items(items):
|
|
||||||
config = configparser.ConfigParser()
|
|
||||||
config.read(CONFIG_PATH)
|
|
||||||
|
|
||||||
# Make sure the section exists
|
|
||||||
if not config.has_section('comfyui'):
|
|
||||||
config.add_section('comfyui')
|
|
||||||
|
|
||||||
# Save updated list to the 'topics' key
|
|
||||||
config.set('comfyui', 'topics', ', '.join(items))
|
|
||||||
|
|
||||||
with open(CONFIG_PATH, 'w') as configfile:
|
|
||||||
config.write(configfile)
|
|
||||||
|
|
||||||
@bp.route('/settings', methods=['GET', 'POST'])
|
@bp.route('/settings', methods=['GET', 'POST'])
|
||||||
def config_editor():
|
def config_editor():
|
||||||
if not session.get("authenticated"):
|
if not session.get("authenticated"):
|
||||||
return redirect(url_for("auth_routes.login", next=request.path))
|
return redirect(url_for("auth_routes.login", next=request.path))
|
||||||
items = load_topics_from_config() # should return list[str]
|
|
||||||
|
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 request.method == 'POST':
|
||||||
if 'new_topic' in request.form:
|
if 'new_topic' in request.form:
|
||||||
new_item = request.form.get('new_topic', '').strip()
|
new_topic = request.form.get('new_topic', '').strip()
|
||||||
if new_item and new_item not in items:
|
if new_topic and new_topic not in topics:
|
||||||
items.append(new_item)
|
topics.append(new_topic)
|
||||||
elif 'delete_topic' in request.form:
|
|
||||||
to_delete = request.form.getlist('delete_topic')
|
if 'delete_topic' in request.form:
|
||||||
items = [item for item in items if item not in to_delete]
|
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)
|
||||||
|
|
||||||
save_items(items)
|
|
||||||
return redirect(url_for('settings_route.config_editor'))
|
return redirect(url_for('settings_route.config_editor'))
|
||||||
|
|
||||||
return render_template('settings.html', topics=items)
|
# 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
|
||||||
|
)
|
||||||
|
@ -92,10 +92,20 @@
|
|||||||
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) {
|
@media (max-width: 768px) {
|
||||||
.image-container {
|
.image-container {
|
||||||
max-width: 100vw;
|
max-width: 100vw;
|
||||||
@ -148,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>
|
@ -147,6 +147,41 @@
|
|||||||
<button name="new_model" type="submit">Add Model</button>
|
<button name="new_model" type="submit">Add Model</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</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">
|
<div class="back-button-wrapper">
|
||||||
<a href="/" class="button-link">Back to Home</a>
|
<a href="/" class="button-link">Back to Home</a>
|
||||||
|
@ -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": {
|
||||||
@ -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)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user