Add extra prompts, endless generation, random character default, and small fixes
- Add extra positive/negative prompt textareas to all 9 detail pages with session persistence - Add Endless generation button to all detail pages (continuous preview generation until stopped) - Default character selector to "Random Character" on all secondary detail pages - Fix queue clear endpoint (remove spurious auth check) - Refactor app.py into routes/ and services/ modules - Update CLAUDE.md with new architecture documentation - Various data file updates and cleanup Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,40 @@
|
||||
{% extends "layout.html" %}
|
||||
|
||||
{% block content %}
|
||||
<!-- Generate Character Modal -->
|
||||
<div class="modal fade" id="generateCharModal" tabindex="-1" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Generate Character from Look</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
|
||||
</div>
|
||||
<form method="POST" action="{{ url_for('generate_character_from_look', slug=look.slug) }}">
|
||||
<div class="modal-body">
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Character Name</label>
|
||||
<input type="text" class="form-control" name="character_name"
|
||||
value="{{ look.name }}" required>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" name="use_llm" id="use_llm" checked>
|
||||
<label class="form-check-label" for="use_llm">
|
||||
Use LLM to generate detailed character
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-text text-muted">
|
||||
The look's LoRA will be automatically assigned to the new character.
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
|
||||
<button type="submit" class="btn btn-primary">Generate Character</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- JSON Editor Modal -->
|
||||
<div class="modal fade" id="jsonEditorModal" tabindex="-1" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg modal-dialog-centered">
|
||||
@@ -29,21 +63,10 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Image Modal -->
|
||||
<div class="modal fade" id="imageModal" tabindex="-1" aria-hidden="true">
|
||||
<div class="modal-dialog modal-xl modal-dialog-centered">
|
||||
<div class="modal-content bg-transparent border-0">
|
||||
<div class="modal-body p-0 text-center">
|
||||
<img id="modalImage" src="" alt="Enlarged Image" class="img-fluid" style="max-height: 90vh;">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="card mb-4">
|
||||
<div class="img-container" style="height: auto; min-height: 400px; cursor: pointer;" data-bs-toggle="modal" data-bs-target="#imageModal" onclick="showImage(this.querySelector('img') ? this.querySelector('img').src : '')">
|
||||
<div class="img-container" style="height: auto; min-height: 400px; cursor: pointer;" onclick="openGallery([this.querySelector('img') ? this.querySelector('img').src : this.src || ''], 0)">
|
||||
{% if look.image_path %}
|
||||
<img src="{{ url_for('static', filename='uploads/' + look.image_path) }}" alt="{{ look.name }}" class="img-fluid"
|
||||
data-preview-path="{{ look.image_path }}">
|
||||
@@ -52,20 +75,12 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form action="{{ url_for('upload_look_image', slug=look.slug) }}" method="post" enctype="multipart/form-data">
|
||||
<div class="mb-3">
|
||||
<label for="image" class="form-label">Update Image</label>
|
||||
<input class="form-control" type="file" id="image" name="image" required>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary w-100 mb-2">Upload</button>
|
||||
</form>
|
||||
|
||||
{# Character Selector #}
|
||||
<div class="mb-3">
|
||||
<label for="character_select" class="form-label">Preview with Character</label>
|
||||
<select class="form-select" id="character_select" name="character_slug" form="generate-form">
|
||||
<option value="">-- No Character --</option>
|
||||
<option value="__random__" {% if selected_character == '__random__' %}selected{% endif %}>🎲 Random Character</option>
|
||||
<option value="__random__" {% if selected_character == '__random__' or not selected_character %}selected{% endif %}>🎲 Random Character</option>
|
||||
{% for char in characters %}
|
||||
<option value="{{ char.slug }}"
|
||||
{% if selected_character == char.character_id or selected_character == char.slug %}selected
|
||||
@@ -73,11 +88,29 @@
|
||||
{% endif %}>{{ char.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<div class="form-text">Defaults to the linked character.</div>
|
||||
<div class="form-text">Defaults to the first linked character.</div>
|
||||
</div>
|
||||
|
||||
{# Additional Prompts #}
|
||||
<div class="mb-2">
|
||||
<label for="extra_positive" class="form-label">Additional Positive</label>
|
||||
<textarea class="form-control form-control-sm font-monospace" id="extra_positive" name="extra_positive" rows="2" placeholder="e.g. masterpiece, best quality" form="generate-form">{{ extra_positive or '' }}</textarea>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="extra_negative" class="form-label">Additional Negative</label>
|
||||
<textarea class="form-control form-control-sm font-monospace" id="extra_negative" name="extra_negative" rows="2" placeholder="e.g. blurry, low quality" form="generate-form">{{ extra_negative or '' }}</textarea>
|
||||
</div>
|
||||
|
||||
<div class="d-grid gap-2">
|
||||
<button type="submit" name="action" value="preview" class="btn btn-success" form="generate-form">Generate Preview</button>
|
||||
<div class="input-group input-group-sm mb-1">
|
||||
<span class="input-group-text">Seed</span>
|
||||
<input type="number" class="form-control" id="seed-input" name="seed" form="generate-form" placeholder="Random" min="1" step="1">
|
||||
<button type="button" class="btn btn-outline-secondary" id="seed-clear-btn" title="Clear (random)">×</button>
|
||||
</div>
|
||||
<button type="submit" name="action" value="preview" class="btn btn-success" form="generate-form" data-requires="comfyui">Generate Preview</button>
|
||||
<button type="button" class="btn btn-outline-info" id="endless-btn" onclick="window._endlessStart()" data-requires="comfyui">Endless</button>
|
||||
<button type="button" class="btn btn-danger d-none" id="endless-stop-btn" onclick="window._endlessStop()">Stop Endless</button>
|
||||
<small class="text-muted d-none" id="endless-counter"></small>
|
||||
<button type="submit" form="generate-form" formaction="{{ url_for('save_look_defaults', slug=look.slug) }}" class="btn btn-sm btn-outline-secondary mt-2">Save as Default Selection</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -99,7 +132,7 @@
|
||||
</form>
|
||||
</div>
|
||||
<div class="card-body p-0">
|
||||
<div class="img-container" style="height: auto; min-height: 400px; cursor: pointer;" data-bs-toggle="modal" data-bs-target="#imageModal" onclick="showImage(this.querySelector('img') ? this.querySelector('img').src : '')">
|
||||
<div class="img-container" style="height: auto; min-height: 400px; cursor: pointer;" onclick="openGallery([this.querySelector('img') ? this.querySelector('img').src : this.src || ''], 0)">
|
||||
<img id="preview-img" src="{{ url_for('static', filename='uploads/' + preview_image) if preview_image else '' }}" alt="Preview" class="img-fluid">
|
||||
</div>
|
||||
</div>
|
||||
@@ -114,10 +147,8 @@
|
||||
{% if 'special::tags' in preferences %}checked{% endif %}
|
||||
{% elif look.default_fields is not none %}
|
||||
{% if 'special::tags' in look.default_fields %}checked{% endif %}
|
||||
{% else %}
|
||||
checked
|
||||
{% endif %}>
|
||||
<label class="form-check-label text-white small" for="includeTags">Include</label>
|
||||
<label class="form-check-label text-white small {% if look.default_fields is not none and 'special::tags' in look.default_fields %}text-accent{% endif %}" for="includeTags">Include</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@@ -134,18 +165,41 @@
|
||||
<div class="d-flex justify-content-between align-items-center mb-4">
|
||||
<div>
|
||||
<h1 class="mb-0">{{ look.name }}</h1>
|
||||
{% if look.character_id %}
|
||||
<small class="text-muted">Linked to: <strong>{{ look.character_id.replace('_', ' ').title() }}</strong></small>
|
||||
{% if linked_character_ids %}
|
||||
<small class="text-muted">
|
||||
Linked to:
|
||||
{% for char_id in linked_character_ids %}
|
||||
<a href="{{ url_for('detail', slug=char_id) }}" class="badge bg-primary text-decoration-none">{{ char_id.replace('_', ' ').title() }}</a>{% if not loop.last %} {% endif %}
|
||||
{% endfor %}
|
||||
</small>
|
||||
{% endif %}
|
||||
<br>
|
||||
<a href="{{ url_for('edit_look', slug=look.slug) }}" class="btn btn-sm btn-link text-decoration-none">Edit Profile</a>
|
||||
</div>
|
||||
<div class="d-flex gap-2">
|
||||
<button type="button" class="btn btn-outline-secondary" data-bs-toggle="modal" data-bs-target="#jsonEditorModal">Edit JSON</button>
|
||||
<button type="button" class="btn btn-accent" data-bs-toggle="modal" data-bs-target="#generateCharModal">
|
||||
<i class="bi bi-person-plus"></i> Generate Character
|
||||
</button>
|
||||
<a href="{{ url_for('transfer_resource', category='looks', slug=look.slug) }}" class="btn btn-outline-primary">Transfer</a>
|
||||
<a href="{{ url_for('looks_index') }}" class="btn btn-outline-secondary">Back to Library</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ul class="nav nav-tabs mb-4" id="detailTabs" role="tablist">
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link active" id="settings-tab" data-bs-toggle="tab" data-bs-target="#settings-pane" type="button" role="tab">Settings</button>
|
||||
</li>
|
||||
{% if look.data.get('lora', {}).get('lora_name', '') != '' %}
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link" id="strengths-tab" data-bs-toggle="tab" data-bs-target="#strengths-pane" type="button" role="tab">Strengths</button>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
||||
<div class="tab-content" id="detailTabContent">
|
||||
<div class="tab-pane fade show active" id="settings-pane" role="tabpanel">
|
||||
|
||||
<form id="generate-form" action="{{ url_for('generate_look_image', slug=look.slug) }}" method="post">
|
||||
{# Positive prompt #}
|
||||
{% if look.data.positive %}
|
||||
@@ -188,31 +242,40 @@
|
||||
<div class="card-body">
|
||||
<dl class="row mb-0">
|
||||
{% for key, value in lora.items() %}
|
||||
<dt class="col-sm-4 text-capitalize">
|
||||
<input class="form-check-input me-1" type="checkbox" name="include_field" value="lora::{{ key }}"
|
||||
{% if preferences is not none %}
|
||||
{% set is_default = look.default_fields is not none and ('lora::' ~ key) in look.default_fields %}
|
||||
<dt class="col-sm-4 text-capitalize {% if is_default %}text-accent{% endif %}">
|
||||
<input class="form-check-input me-1" type="checkbox" name="include_field" value="lora::{{ key }}"
|
||||
{% if preferences is not none %}
|
||||
{% if 'lora::' + key in preferences %}checked{% endif %}
|
||||
{% elif look.default_fields is not none %}
|
||||
{% if 'lora::' + key in look.default_fields %}checked{% endif %}
|
||||
{% if is_default %}checked{% endif %}
|
||||
{% else %}
|
||||
{% if value %}checked{% endif %}
|
||||
{% endif %}>
|
||||
{{ key.replace('_', ' ') }}
|
||||
</dt>
|
||||
<dd class="col-sm-8">{{ value if value else '--' }}</dd>
|
||||
{{ key.replace('_', ' ') }}
|
||||
{% if is_default %}<span class="badge bg-primary ms-1" style="font-size: 0.55rem; vertical-align: middle;">DEF</span>{% endif %}
|
||||
</dt>
|
||||
<dd class="col-sm-8 {% if is_default %}text-accent{% endif %}">{{ value if value else '--' }}</dd>
|
||||
{% endfor %}
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</form>
|
||||
|
||||
</div>{# /settings-pane #}
|
||||
|
||||
{% set sg_has_lora = look.data.get('lora', {}).get('lora_name', '') != '' %}
|
||||
{% if sg_has_lora %}
|
||||
<div class="tab-pane fade" id="strengths-pane" role="tabpanel">
|
||||
{% set sg_entity = look %}
|
||||
{% set sg_category = 'looks' %}
|
||||
{% include 'partials/strengths_gallery.html' %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>{# /tab-content #}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% set sg_entity = look %}
|
||||
{% set sg_category = 'looks' %}
|
||||
{% set sg_has_lora = look.data.get('lora', {}).get('lora_name', '') != '' %}
|
||||
{% include 'partials/strengths_gallery.html' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
@@ -276,9 +339,14 @@
|
||||
if (data.error) { alert('Error: ' + data.error); progressContainer.classList.add('d-none'); return; }
|
||||
const jobResult = await waitForJob(data.job_id);
|
||||
if (jobResult.result?.image_url) selectPreview(jobResult.result.relative_path, jobResult.result.image_url);
|
||||
updateSeedFromResult(jobResult.result);
|
||||
} catch (err) { console.error(err); alert('Generation failed: ' + err.message); }
|
||||
finally { progressContainer.classList.add('d-none'); progressBar.classList.remove('progress-bar-striped', 'progress-bar-animated'); }
|
||||
});
|
||||
|
||||
window._onEndlessResult = function(jobResult) {
|
||||
if (jobResult.result?.image_url) selectPreview(jobResult.result.relative_path, jobResult.result.image_url);
|
||||
};
|
||||
});
|
||||
|
||||
function showImage(src) {
|
||||
|
||||
@@ -17,15 +17,27 @@
|
||||
<label for="look_name" class="form-label">Display Name</label>
|
||||
<input type="text" class="form-control" id="look_name" name="look_name" value="{{ look.name }}" required>
|
||||
</div>
|
||||
<!-- Multi-Character Selector -->
|
||||
<div class="mb-3">
|
||||
<label for="character_id" class="form-label">Linked Character</label>
|
||||
<select class="form-select" id="character_id" name="character_id">
|
||||
<option value="">— None —</option>
|
||||
{% for char in characters %}
|
||||
<option value="{{ char.character_id }}" {% if look.character_id == char.character_id %}selected{% endif %}>{{ char.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<div class="form-text">Associates this look with a character for generation and LoRA suggestions.</div>
|
||||
<label class="form-label">Linked Characters</label>
|
||||
<div class="card">
|
||||
<div class="card-header bg-light">
|
||||
<small class="text-muted">Check to link this look to characters</small>
|
||||
</div>
|
||||
<div class="card-body" style="max-height: 300px; overflow-y: auto;">
|
||||
{% for char in characters %}
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" name="character_ids"
|
||||
value="{{ char.character_id }}" id="char_{{ char.character_id }}"
|
||||
{% if char.character_id in (look.character_ids or []) %}checked{% endif %}>
|
||||
<label class="form-check-label" for="char_{{ char.character_id }}">
|
||||
{{ char.name }}
|
||||
</label>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-text">Associates this look with multiple characters for generation and LoRA suggestions.</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="tags" class="form-label">Tags (comma separated)</label>
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
<div class="d-flex justify-content-between align-items-center mb-4">
|
||||
<h2>Looks Library</h2>
|
||||
<div class="d-flex gap-1 align-items-center">
|
||||
<button id="batch-generate-btn" class="btn btn-sm btn-outline-success btn-icon" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Generate cover images for looks without one"><img src="{{ url_for('static', filename='icons/new-cover-batch.png') }}"></button>
|
||||
<button id="regenerate-all-btn" class="btn btn-sm btn-outline-danger btn-icon" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Regenerate cover images for all looks"><img src="{{ url_for('static', filename='icons/new-cover-batch.png') }}"></button>
|
||||
<button id="batch-generate-btn" class="btn btn-sm btn-outline-success btn-icon" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Generate cover images for looks without one" data-requires="comfyui"><img src="{{ url_for('static', filename='icons/new-cover-batch.png') }}"></button>
|
||||
<button id="regenerate-all-btn" class="btn btn-sm btn-outline-danger btn-icon" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Regenerate cover images for all looks" data-requires="comfyui"><img src="{{ url_for('static', filename='icons/new-cover-batch.png') }}"></button>
|
||||
<form action="{{ url_for('bulk_create_looks_from_loras') }}" method="post" class="d-contents">
|
||||
<button type="submit" class="btn btn-sm btn-primary btn-icon" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Create new look entries from all LoRA files in the Looks folder"><img src="{{ url_for('static', filename='icons/new-file.png') }}"></button>
|
||||
</form>
|
||||
@@ -20,37 +20,10 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Batch Progress Bar -->
|
||||
<div id="batch-progress-container" class="card mb-4 d-none">
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between align-items-center mb-1">
|
||||
<h5 id="batch-status-text" class="mb-0">Batch Generating Looks...</h5>
|
||||
<span id="batch-node-status" class="badge bg-info text-dark">Starting...</span>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<small class="text-muted">Overall Batch Progress</small>
|
||||
<div class="progress" role="progressbar" aria-label="Batch Progress" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="height: 10px;">
|
||||
<div id="batch-progress-bar" class="progress-bar bg-success" style="width: 0%"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-2">
|
||||
<div class="d-flex justify-content-between">
|
||||
<small id="current-item-name" class="text-muted mb-1"></small>
|
||||
<small id="current-step-progress" class="text-muted mb-1"></small>
|
||||
</div>
|
||||
<div class="progress" role="progressbar" aria-label="Task Progress" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="height: 20px;">
|
||||
<div id="task-progress-bar" class="progress-bar progress-bar-striped progress-bar-animated bg-info" style="width: 0%"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row row-cols-2 row-cols-sm-3 row-cols-md-4 row-cols-lg-5 row-cols-xl-6 g-3">
|
||||
{% for look in looks %}
|
||||
<div class="col" id="card-{{ look.slug }}">
|
||||
<div class="card h-100 character-card" onclick="window.location.href='{{ url_for('look_detail', slug=look.slug) }}'">
|
||||
<div class="card h-100 character-card {% if request.args.get('highlight') == look.slug %}border-success border-3 highlight-card{% endif %}" onclick="window.location.href='{{ url_for('look_detail', slug=look.slug) }}'">
|
||||
<div class="img-container">
|
||||
{% if look.image_path %}
|
||||
<img id="img-{{ look.slug }}" src="{{ url_for('static', filename='uploads/' + look.image_path) }}" alt="{{ look.name }}">
|
||||
@@ -96,15 +69,29 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
<style>
|
||||
.highlight-card {
|
||||
animation: highlight-pulse 2s ease-in-out 3;
|
||||
box-shadow: 0 0 20px rgba(25, 135, 84, 0.5) !important;
|
||||
}
|
||||
@keyframes highlight-pulse {
|
||||
0%, 100% { box-shadow: 0 0 20px rgba(25, 135, 84, 0.5); }
|
||||
50% { box-shadow: 0 0 30px rgba(25, 135, 84, 0.8); }
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
// Handle highlight parameter
|
||||
const highlightSlug = new URLSearchParams(window.location.search).get('highlight');
|
||||
if (highlightSlug) {
|
||||
const card = document.getElementById(`card-${highlightSlug}`);
|
||||
if (card) {
|
||||
card.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
}
|
||||
}
|
||||
|
||||
const batchBtn = document.getElementById('batch-generate-btn');
|
||||
const regenAllBtn = document.getElementById('regenerate-all-btn');
|
||||
const progressBar = document.getElementById('batch-progress-bar');
|
||||
const taskProgressBar = document.getElementById('task-progress-bar');
|
||||
const container = document.getElementById('batch-progress-container');
|
||||
const statusText = document.getElementById('batch-status-text');
|
||||
const nodeStatus = document.getElementById('batch-node-status');
|
||||
const itemNameText = document.getElementById('current-item-name');
|
||||
const stepProgressText = document.getElementById('current-step-progress');
|
||||
|
||||
@@ -153,17 +140,12 @@
|
||||
|
||||
batchBtn.disabled = true;
|
||||
regenAllBtn.disabled = true;
|
||||
container.classList.remove('d-none');
|
||||
|
||||
// Phase 1: Queue all jobs upfront
|
||||
progressBar.style.width = '100%';
|
||||
progressBar.textContent = '';
|
||||
progressBar.classList.add('progress-bar-striped', 'progress-bar-animated');
|
||||
nodeStatus.textContent = 'Queuing…';
|
||||
|
||||
const jobs = [];
|
||||
for (const item of missing) {
|
||||
statusText.textContent = `Queuing ${jobs.length + 1} / ${missing.length}…`;
|
||||
|
||||
try {
|
||||
const genResp = await fetch(`/look/${item.slug}/generate`, {
|
||||
method: 'POST',
|
||||
@@ -178,11 +160,6 @@
|
||||
}
|
||||
|
||||
// Phase 2: Poll all concurrently
|
||||
progressBar.classList.remove('progress-bar-striped', 'progress-bar-animated');
|
||||
progressBar.style.width = '0%';
|
||||
progressBar.textContent = '0%';
|
||||
statusText.textContent = `0 / ${jobs.length} done`;
|
||||
|
||||
// Start polling queue for current job label
|
||||
queuePollInterval = setInterval(updateCurrentJobLabel, 1000);
|
||||
updateCurrentJobLabel(); // Initial update
|
||||
@@ -200,11 +177,6 @@
|
||||
} catch (err) {
|
||||
console.error(`Failed for ${item.name}:`, err);
|
||||
}
|
||||
completed++;
|
||||
const pct = Math.round((completed / jobs.length) * 100);
|
||||
progressBar.style.width = `${pct}%`;
|
||||
progressBar.textContent = `${pct}%`;
|
||||
statusText.textContent = `${completed} / ${jobs.length} done`;
|
||||
}));
|
||||
|
||||
// Stop polling queue
|
||||
@@ -213,17 +185,9 @@
|
||||
queuePollInterval = null;
|
||||
}
|
||||
|
||||
progressBar.style.width = '100%';
|
||||
progressBar.textContent = '100%';
|
||||
statusText.textContent = 'Batch Look Generation Complete!';
|
||||
itemNameText.textContent = '';
|
||||
nodeStatus.textContent = 'Done';
|
||||
stepProgressText.textContent = '';
|
||||
taskProgressBar.style.width = '0%';
|
||||
taskProgressBar.textContent = '';
|
||||
batchBtn.disabled = false;
|
||||
regenAllBtn.disabled = false;
|
||||
setTimeout(() => container.classList.add('d-none'), 5000);
|
||||
alert(`Batch generation complete! ${jobs.length} look images processed.`);
|
||||
}
|
||||
|
||||
batchBtn.addEventListener('click', async () => {
|
||||
|
||||
Reference in New Issue
Block a user