Spaces:
Running
Running
Update index.html
Browse files- index.html +146 -222
index.html
CHANGED
|
@@ -3,286 +3,210 @@
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
-
<title>
|
| 7 |
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
|
| 9 |
<style>
|
| 10 |
-
@import url('https://fonts.googleapis.com/css2?family=
|
| 11 |
-
body { font-family: '
|
| 12 |
-
|
| 13 |
-
.
|
| 14 |
-
.
|
| 15 |
-
.model
|
| 16 |
-
|
| 17 |
-
.
|
| 18 |
-
.
|
| 19 |
-
.status-
|
| 20 |
</style>
|
| 21 |
</head>
|
| 22 |
-
<body class="p-4 md:p-10">
|
| 23 |
|
| 24 |
-
<div class="max-w-
|
| 25 |
-
<header class="
|
| 26 |
-
<
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
</header>
|
| 29 |
|
| 30 |
-
<div class="grid grid-cols-1 lg:grid-cols-
|
| 31 |
|
| 32 |
-
<div class="lg:col-span-
|
| 33 |
|
| 34 |
-
<div class="glass
|
| 35 |
-
<h2 class="text-
|
| 36 |
-
<label class="block text-sm font-light text-slate-400 mb-2">Tu Concepto Base (s茅 creativo, nosotros lo estructuramos)</label>
|
| 37 |
-
<textarea id="rawPrompt" oninput="analyzePrompt()" rows="6" class="w-full bg-slate-900 border border-slate-700 rounded-xl p-4 text-white placeholder-slate-600 outline-none input-glow transition mb-4" placeholder="Ej: Un drag贸n de cristal en una cueva submarina, estilo anime, luces suaves..."></textarea>
|
| 38 |
|
| 39 |
-
<div class="
|
| 40 |
-
<
|
| 41 |
-
<div>
|
| 42 |
-
<span class="text-xs text-slate-500 uppercase block">Caracteres</span>
|
| 43 |
-
<span id="charCount" class="text-lg font-bold">0</span>
|
| 44 |
-
</div>
|
| 45 |
-
<div class="w-2/3 h-2 bg-slate-700 rounded-full overflow-hidden">
|
| 46 |
-
<div id="promptLengthBar" class="h-full bg-fuchsia-500 transition-all" style="width:0%;"></div>
|
| 47 |
-
</div>
|
| 48 |
-
</div>
|
| 49 |
-
<div class="bg-slate-900/50 p-4 rounded-xl border border-slate-800 flex justify-between items-center">
|
| 50 |
-
<div>
|
| 51 |
-
<span class="text-xs text-slate-500 uppercase block">Riesgo de Bloqueo</span>
|
| 52 |
-
<span id="riskLevel" class="text-lg font-bold text-green-400">BAJO</span>
|
| 53 |
-
</div>
|
| 54 |
-
<div id="safetyBadge" class="text-xs font-bold status-badge py-1 px-3 rounded-full bg-green-900/30 text-green-400">SEGURO</div>
|
| 55 |
-
</div>
|
| 56 |
-
</div>
|
| 57 |
-
</div>
|
| 58 |
-
|
| 59 |
-
<div class="grid grid-cols-1 md:grid-cols-2 gap-8">
|
| 60 |
-
<div class="glass-card p-8 rounded-3xl shadow-xl">
|
| 61 |
-
<h3 class="text-xl font-bold mb-4 text-fuchsia-400">2. Motor de IA</h3>
|
| 62 |
-
<label class="block text-sm font-light text-slate-400 mb-3">Selecciona tu modelo preferido:</label>
|
| 63 |
-
<div class="grid grid-cols-2 gap-3">
|
| 64 |
-
<button onclick="updateModel('flux')" id="m-flux" class="model-btn p-3 rounded-xl border border-slate-700 text-xs font-bold active">FLUX.1</button>
|
| 65 |
-
<button onclick="updateModel('mj')" id="m-mj" class="model-btn p-3 rounded-xl border border-slate-700 text-xs font-bold">MIDJOURNEY</button>
|
| 66 |
-
<button onclick="updateModel('sdxl')" id="m-sdxl" class="model-btn p-3 rounded-xl border border-slate-700 text-xs font-bold">SDXL 1.0</button>
|
| 67 |
-
<button onclick="updateModel('dalle')" id="m-dalle" class="model-btn p-3 rounded-xl border border-slate-700 text-xs font-bold">DALL-E 3</button>
|
| 68 |
-
</div>
|
| 69 |
</div>
|
| 70 |
|
| 71 |
-
<div class="
|
| 72 |
-
<
|
| 73 |
-
<
|
| 74 |
-
<
|
| 75 |
-
|
| 76 |
-
<button onclick="applyStyle('cinematic')" class="style-btn p-3 rounded-xl border border-slate-700 text-xs font-bold">CINEM脕TICO</button>
|
| 77 |
-
<button onclick="applyStyle('anime')" class="style-btn p-3 rounded-xl border border-slate-700 text-xs font-bold">ANIME</button>
|
| 78 |
-
<button onclick="applyStyle('oil painting')" class="style-btn p-3 rounded-xl border border-slate-700 text-xs font-bold">PINTURA AL 脫LEO</button>
|
| 79 |
-
</div>
|
| 80 |
</div>
|
| 81 |
-
</div>
|
| 82 |
|
| 83 |
-
|
| 84 |
-
<h3 class="text-xl font-bold mb-4 text-fuchsia-400">4. Ajustes Finos (Iluminaci贸n & C谩mara)</h3>
|
| 85 |
-
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
| 86 |
<div>
|
| 87 |
-
<label class="
|
| 88 |
-
<select id="
|
| 89 |
-
<option value="">
|
| 90 |
-
<option value="
|
| 91 |
-
<option value="
|
| 92 |
-
<option value="
|
|
|
|
| 93 |
</select>
|
| 94 |
</div>
|
| 95 |
<div>
|
| 96 |
-
<label class="
|
| 97 |
-
<select id="
|
| 98 |
-
<option value="">
|
| 99 |
-
<option value="
|
| 100 |
-
<option value="
|
| 101 |
-
<option value="
|
| 102 |
-
<option value="top-down">Cenital</option>
|
| 103 |
</select>
|
| 104 |
</div>
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 113 |
</select>
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
<option value="
|
| 119 |
-
<option value="1:1">1:1 (Cuadrado)</option>
|
| 120 |
-
<option value="9:16">9:16 (Vertical)</option>
|
| 121 |
-
<option value="21:9">21:9 (Ultra Wide)</option>
|
| 122 |
</select>
|
| 123 |
</div>
|
| 124 |
</div>
|
| 125 |
-
</div>
|
| 126 |
-
|
| 127 |
-
<button onclick="generateApex()" class="btn-forge w-full py-5 rounded-2xl text-white font-black text-xl uppercase tracking-wider shadow-2xl">
|
| 128 |
-
<i class="fa-solid fa-fire text-white mr-3"></i> FORJAR PROMPT APEX
|
| 129 |
-
</button>
|
| 130 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 131 |
</div>
|
| 132 |
|
| 133 |
-
<div class="lg:col-span-
|
| 134 |
|
| 135 |
-
<div class="glass
|
| 136 |
-
<h3 class="text-
|
| 137 |
-
<div
|
| 138 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 139 |
</div>
|
| 140 |
|
| 141 |
-
<div class="glass
|
| 142 |
-
<
|
| 143 |
-
|
| 144 |
-
|
|
|
|
|
|
|
| 145 |
</div>
|
| 146 |
|
| 147 |
-
<div class="glass
|
| 148 |
-
<
|
| 149 |
-
|
| 150 |
-
<
|
| 151 |
-
<div class="text-slate-500">CFG Scale:</div><div id="s-cfg" class="font-bold">N/A</div>
|
| 152 |
-
<div class="text-slate-500">Steps:</div><div id="s-step" class="font-bold">N/A</div>
|
| 153 |
-
<div class="text-slate-500">Scheduler:</div><div id="s-sched" class="font-bold">N/A</div>
|
| 154 |
</div>
|
|
|
|
| 155 |
</div>
|
|
|
|
| 156 |
</div>
|
| 157 |
</div>
|
| 158 |
</div>
|
| 159 |
|
| 160 |
<script>
|
| 161 |
-
let
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
dalle: { sampler: 'Diffusion', cfg: 'Auto', steps: 'Auto', sched: 'Internal', neg: 'Avoid: watermarks, low resolution, text, blurry artifacts, duplicate images' }
|
| 170 |
-
};
|
| 171 |
-
|
| 172 |
-
const redFlags = ['blood', 'kill', 'gore', 'naked', 'explicit', 'violence', 'weapon', 'drug', 'suicide', 'political leader', 'hate speech'];
|
| 173 |
-
|
| 174 |
-
const styles = {
|
| 175 |
-
photorealistic: 'hyperrealistic, photorealistic, 8k, ultra-detailed, sharp focus, RAW photo',
|
| 176 |
-
cinematic: 'cinematic still, film grain, dramatic lighting, anamorphic lens, epic composition',
|
| 177 |
-
anime: 'anime style, vibrant colors, Studio Ghibli inspired, detailed line art, cell shaded',
|
| 178 |
-
'oil painting': 'oil painting, textured brushstrokes, classical art, masterpiece, heavy impasto'
|
| 179 |
};
|
| 180 |
|
| 181 |
-
function
|
| 182 |
-
|
| 183 |
-
document.
|
| 184 |
-
|
| 185 |
-
const lengthPercentage = Math.min(100, (val.length / 100) * 100); // 100 chars = 100%
|
| 186 |
-
document.getElementById('promptLengthBar').style.width = `${lengthPercentage}%`;
|
| 187 |
-
|
| 188 |
-
let risks = redFlags.filter(word => val.includes(word));
|
| 189 |
-
const riskLevelEl = document.getElementById('riskLevel');
|
| 190 |
-
const safetyBadgeEl = document.getElementById('safetyBadge');
|
| 191 |
-
|
| 192 |
-
if (risks.length > 0) {
|
| 193 |
-
riskLevelEl.innerText = `ALTO (${risks[0]})`;
|
| 194 |
-
riskLevelEl.className = 'text-lg font-bold text-red-400';
|
| 195 |
-
safetyBadgeEl.innerText = "RIESGO DE BLOQUEO";
|
| 196 |
-
safetyBadgeEl.className = "text-xs font-bold status-badge py-1 px-3 rounded-full bg-red-900/30 text-red-400";
|
| 197 |
-
} else if (val.length > 0 && val.length < 30) {
|
| 198 |
-
riskLevelEl.innerText = 'MEDIO (Vago)';
|
| 199 |
-
riskLevelEl.className = 'text-lg font-bold text-yellow-400';
|
| 200 |
-
safetyBadgeEl.innerText = "PROMPT GEN脡RICO";
|
| 201 |
-
safetyBadgeEl.className = "text-xs font-bold status-badge py-1 px-3 rounded-full bg-yellow-900/30 text-yellow-400";
|
| 202 |
-
}
|
| 203 |
-
else {
|
| 204 |
-
riskLevelEl.innerText = 'BAJO';
|
| 205 |
-
riskLevelEl.className = 'text-lg font-bold text-green-400';
|
| 206 |
-
safetyBadgeEl.innerText = "PROMPT SEGURO";
|
| 207 |
-
safetyBadgeEl.className = "text-xs font-bold status-badge py-1 px-3 rounded-full bg-green-900/30 text-green-400";
|
| 208 |
-
}
|
| 209 |
-
}
|
| 210 |
-
|
| 211 |
-
function updateModel(m) {
|
| 212 |
-
currentModel = m;
|
| 213 |
-
document.querySelectorAll('.model-btn').forEach(b => b.classList.remove('active'));
|
| 214 |
document.getElementById(`m-${m}`).classList.add('active');
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
|
| 219 |
-
|
| 220 |
-
document.querySelectorAll('.style-btn').forEach(b => b.classList.remove('active'));
|
| 221 |
-
event.target.classList.add('active');
|
| 222 |
}
|
| 223 |
|
| 224 |
-
function
|
| 225 |
-
const
|
| 226 |
-
const
|
|
|
|
|
|
|
| 227 |
|
| 228 |
-
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
|
| 232 |
-
if
|
| 233 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 234 |
}
|
| 235 |
-
lightPrompt = parts.length > 0 ? parts.join(' ') + ' illumination' : '';
|
| 236 |
}
|
| 237 |
|
| 238 |
-
function
|
| 239 |
-
const
|
| 240 |
-
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
|
| 244 |
|
| 245 |
-
|
| 246 |
-
const camera = document.getElementById('cameraType').value;
|
| 247 |
-
const ar = document.getElementById('ar').value;
|
| 248 |
|
| 249 |
let pos = "";
|
| 250 |
-
let
|
| 251 |
-
|
| 252 |
-
|
| 253 |
-
|
| 254 |
-
|
| 255 |
-
|
| 256 |
-
|
| 257 |
-
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
pos = `(masterpiece:1.3), (best quality), ${raw}, ${styleText ? styleText + ', ' : ''}${finalLight}, ${camera}, 8k, UHD, intricate details`;
|
| 262 |
}
|
| 263 |
|
| 264 |
-
document.getElementById('
|
| 265 |
-
document.getElementById('
|
| 266 |
-
updateTechSpecs(); // Asegura que los tech specs se actualicen con el prompt
|
| 267 |
}
|
| 268 |
|
| 269 |
-
function
|
| 270 |
-
const config = engines[currentModel];
|
| 271 |
-
document.getElementById('s-samp').innerText = config.sampler;
|
| 272 |
-
document.getElementById('s-cfg').innerText = config.cfg;
|
| 273 |
-
document.getElementById('s-step').innerText = config.steps;
|
| 274 |
-
document.getElementById('s-sched').innerText = config.sched;
|
| 275 |
-
}
|
| 276 |
-
|
| 277 |
-
function copyText(id) {
|
| 278 |
navigator.clipboard.writeText(document.getElementById(id).innerText);
|
| 279 |
-
alert("
|
| 280 |
}
|
| 281 |
-
|
| 282 |
-
// Inicializaci贸n
|
| 283 |
-
updateModel('flux'); // Set default model
|
| 284 |
-
updateLightPrompt(); // Initialize light prompt
|
| 285 |
-
analyzePrompt(); // Initial analysis
|
| 286 |
</script>
|
| 287 |
</body>
|
| 288 |
</html>
|
|
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Aether Forge v8 - Master Edition</title>
|
| 7 |
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
|
| 9 |
<style>
|
| 10 |
+
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;500;700&display=swap');
|
| 11 |
+
body { font-family: 'Space Grotesk', sans-serif; background: #020617; color: #f1f5f9; }
|
| 12 |
+
.glass { background: rgba(15, 23, 42, 0.8); backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, 0.1); }
|
| 13 |
+
.accent-purple { color: #a855f7; }
|
| 14 |
+
.btn-model { border: 1px solid #334155; transition: 0.3s; }
|
| 15 |
+
.btn-model.active { background: #6366f1; border-color: #818cf8; box-shadow: 0 0 15px rgba(99, 102, 241, 0.4); }
|
| 16 |
+
select { background: #0f172a !important; border-color: #334155 !important; }
|
| 17 |
+
.status-optimal { color: #4ade80; }
|
| 18 |
+
.status-warn { color: #fbbf24; }
|
| 19 |
+
.status-crit { color: #f87171; }
|
| 20 |
</style>
|
| 21 |
</head>
|
| 22 |
+
<body class="p-4 md:p-10 min-h-screen">
|
| 23 |
|
| 24 |
+
<div class="max-w-7xl mx-auto">
|
| 25 |
+
<header class="flex justify-between items-end mb-10">
|
| 26 |
+
<div>
|
| 27 |
+
<h1 class="text-4xl font-bold tracking-tighter">AETHER<span class="accent-purple font-black italic">FORGE</span> <span class="text-sm font-light text-slate-500">v8.0</span></h1>
|
| 28 |
+
<p class="text-slate-400">Generador de Estructuras Realistas y Amateur</p>
|
| 29 |
+
</div>
|
| 30 |
+
<div id="safetyStatus" class="text-[10px] font-bold px-4 py-2 rounded-full border border-slate-700 bg-slate-900/50">
|
| 31 |
+
ANALIZADOR: ESPERANDO...
|
| 32 |
+
</div>
|
| 33 |
</header>
|
| 34 |
|
| 35 |
+
<div class="grid grid-cols-1 lg:grid-cols-12 gap-8">
|
| 36 |
|
| 37 |
+
<div class="lg:col-span-7 space-y-6">
|
| 38 |
|
| 39 |
+
<div class="glass p-8 rounded-[2.5rem] shadow-2xl">
|
| 40 |
+
<h2 class="text-xs font-bold uppercase tracking-[0.2em] text-indigo-400 mb-6">Configuraci贸n del Generador</h2>
|
|
|
|
|
|
|
| 41 |
|
| 42 |
+
<div class="mb-8">
|
| 43 |
+
<textarea id="rawInput" oninput="liveAnalysis()" rows="4" class="w-full bg-slate-950/50 border border-slate-800 rounded-2xl p-5 text-lg outline-none focus:border-indigo-500 transition-all" placeholder="Describe tu escena (ej: Un hombre caminando por Madrid de noche)"></textarea>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
</div>
|
| 45 |
|
| 46 |
+
<div class="grid grid-cols-2 md:grid-cols-4 gap-2 mb-8">
|
| 47 |
+
<button onclick="selectModel('flux')" id="m-flux" class="btn-model p-3 rounded-xl text-[10px] font-bold active">FLUX.1 PRO</button>
|
| 48 |
+
<button onclick="selectModel('sdxl')" id="m-sdxl" class="btn-model p-3 rounded-xl text-[10px] font-bold">SDXL 1.0</button>
|
| 49 |
+
<button onclick="selectModel('mj')" id="m-mj" class="btn-model p-3 rounded-xl text-[10px] font-bold">MIDJOURNEY</button>
|
| 50 |
+
<button onclick="selectModel('dalle')" id="m-dalle" class="btn-model p-3 rounded-xl text-[10px] font-bold">DALL-E 3</button>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
</div>
|
|
|
|
| 52 |
|
| 53 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-8">
|
|
|
|
|
|
|
| 54 |
<div>
|
| 55 |
+
<label class="text-[10px] font-bold text-slate-500 uppercase block mb-2">Sampler</label>
|
| 56 |
+
<select id="sampler" class="w-full p-3 rounded-xl border text-xs outline-none">
|
| 57 |
+
<option value="Euler">Euler (Est谩ndar)</option>
|
| 58 |
+
<option value="DPM++ 2M SDE">DPM++ 2M SDE (Realismo)</option>
|
| 59 |
+
<option value="DPM++ SDE">DPM++ SDE (Lento/Calidad)</option>
|
| 60 |
+
<option value="UniPC">UniPC (R谩pido)</option>
|
| 61 |
+
<option value="FlowMatch">FlowMatch (Solo Flux)</option>
|
| 62 |
</select>
|
| 63 |
</div>
|
| 64 |
<div>
|
| 65 |
+
<label class="text-[10px] font-bold text-slate-500 uppercase block mb-2">Scheduler</label>
|
| 66 |
+
<select id="scheduler" class="w-full p-3 rounded-xl border text-xs outline-none">
|
| 67 |
+
<option value="Karras">Karras (Suave)</option>
|
| 68 |
+
<option value="Normal">Normal</option>
|
| 69 |
+
<option value="Beta">Beta (Agresivo)</option>
|
| 70 |
+
<option value="Simple">Simple</option>
|
|
|
|
| 71 |
</select>
|
| 72 |
</div>
|
| 73 |
+
</div>
|
| 74 |
+
|
| 75 |
+
<div class="bg-indigo-950/10 border border-indigo-500/20 p-6 rounded-3xl mb-8">
|
| 76 |
+
<h3 class="text-xs font-bold text-indigo-300 uppercase mb-4 tracking-widest flex items-center gap-2">
|
| 77 |
+
<i class="fa-solid fa-camera"></i> Motor de Fotograf铆a Amateur
|
| 78 |
+
</h3>
|
| 79 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
| 80 |
+
<select id="amateurStyle" class="w-full p-3 rounded-xl border border-slate-700 text-xs outline-none">
|
| 81 |
+
<option value="">Sin estilo amateur (Pro/Limpio)</option>
|
| 82 |
+
<option value="iphone_candid">Foto de iPhone (Candid/Flash)</option>
|
| 83 |
+
<option value="security_cam">C谩mara de Seguridad (CCTV)</option>
|
| 84 |
+
<option value="disposable_cam">C谩mara Desechable (Kodak 200)</option>
|
| 85 |
+
<option value="snapchat_style">Estilo Snapchat (Vertical/Blurry)</option>
|
| 86 |
+
<option value="vhs_lofi">VHS Lofi (1990s)</option>
|
| 87 |
</select>
|
| 88 |
+
<select id="lens" class="w-full p-3 rounded-xl border border-slate-700 text-xs outline-none">
|
| 89 |
+
<option value="35mm f/1.8">35mm f/1.8 (Retrato)</option>
|
| 90 |
+
<option value="24mm Wide">24mm (Gran Angular)</option>
|
| 91 |
+
<option value="8mm Fisheye">8mm (Ojo de Pez)</option>
|
| 92 |
+
<option value="Zoom Blur">Zoom Blur (Movimiento)</option>
|
|
|
|
|
|
|
|
|
|
| 93 |
</select>
|
| 94 |
</div>
|
| 95 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 96 |
|
| 97 |
+
<button onclick="generatePrompt()" class="w-full py-5 rounded-2xl bg-indigo-600 hover:bg-indigo-500 text-white font-black uppercase tracking-widest shadow-xl transition-all">
|
| 98 |
+
FORJAR PROMPT MAESTRO
|
| 99 |
+
</button>
|
| 100 |
+
</div>
|
| 101 |
</div>
|
| 102 |
|
| 103 |
+
<div class="lg:col-span-5 space-y-6">
|
| 104 |
|
| 105 |
+
<div class="glass p-6 rounded-[2rem]">
|
| 106 |
+
<h3 class="text-[10px] font-bold uppercase text-slate-500 mb-4">An谩lisis de Estructura</h3>
|
| 107 |
+
<div class="space-y-4">
|
| 108 |
+
<div class="flex justify-between items-center text-xs">
|
| 109 |
+
<span>Densidad de Detalle</span>
|
| 110 |
+
<span id="densityScore" class="font-bold">0%</span>
|
| 111 |
+
</div>
|
| 112 |
+
<div class="w-full h-1.5 bg-slate-800 rounded-full">
|
| 113 |
+
<div id="densityBar" class="h-full bg-indigo-500 transition-all" style="width: 0%"></div>
|
| 114 |
+
</div>
|
| 115 |
+
</div>
|
| 116 |
</div>
|
| 117 |
|
| 118 |
+
<div class="glass p-6 rounded-[2rem] border-l-4 border-indigo-500">
|
| 119 |
+
<div class="flex justify-between mb-4">
|
| 120 |
+
<h3 class="text-[10px] font-bold uppercase text-indigo-400">Prompt Optimizado</h3>
|
| 121 |
+
<button onclick="copy('finalPos')" class="text-slate-500 hover:text-white"><i class="fa-regular fa-copy"></i></button>
|
| 122 |
+
</div>
|
| 123 |
+
<div id="finalPos" class="text-sm leading-relaxed text-slate-300 italic min-h-[100px]">Esperando datos...</div>
|
| 124 |
</div>
|
| 125 |
|
| 126 |
+
<div class="glass p-6 rounded-[2rem] border-l-4 border-red-500">
|
| 127 |
+
<div class="flex justify-between mb-4">
|
| 128 |
+
<h3 class="text-[10px] font-bold uppercase text-red-400">Prompt Negativo</h3>
|
| 129 |
+
<button onclick="copy('finalNeg')" class="text-slate-500 hover:text-white"><i class="fa-regular fa-copy"></i></button>
|
|
|
|
|
|
|
|
|
|
| 130 |
</div>
|
| 131 |
+
<div id="finalNeg" class="text-[10px] text-red-200/50">---</div>
|
| 132 |
</div>
|
| 133 |
+
|
| 134 |
</div>
|
| 135 |
</div>
|
| 136 |
</div>
|
| 137 |
|
| 138 |
<script>
|
| 139 |
+
let model = 'flux';
|
| 140 |
+
|
| 141 |
+
const presets = {
|
| 142 |
+
iphone_candid: "taken on iPhone, vertical photo, flash photography, slightly blurry, accidental shot, realistic skin textures, grainy night photo",
|
| 143 |
+
security_cam: "CCTV footage, high angle, fisheye lens, grainy, black and white, digital noise, security camera timestamp",
|
| 144 |
+
disposable_cam: "1990s disposable camera style, vintage film grain, light leaks, overexposed flash, nostalgic atmosphere",
|
| 145 |
+
snapchat_style: "mobile phone screen capture, snapchat style, low quality camera, digital zoom artifacts",
|
| 146 |
+
vhs_lofi: "VHS tape rip, tracking lines, color bleeding, 4:3 aspect ratio, 1980s aesthetic"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 147 |
};
|
| 148 |
|
| 149 |
+
function selectModel(m) {
|
| 150 |
+
model = m;
|
| 151 |
+
document.querySelectorAll('.btn-model').forEach(b => b.classList.remove('active'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 152 |
document.getElementById(`m-${m}`).classList.add('active');
|
| 153 |
+
|
| 154 |
+
// Sugerencia de Sampler seg煤n modelo
|
| 155 |
+
const s = document.getElementById('sampler');
|
| 156 |
+
if(m === 'flux') s.value = 'FlowMatch';
|
| 157 |
+
else if(m === 'sdxl') s.value = 'DPM++ 2M SDE';
|
|
|
|
|
|
|
| 158 |
}
|
| 159 |
|
| 160 |
+
function liveAnalysis() {
|
| 161 |
+
const input = document.getElementById('rawInput').value;
|
| 162 |
+
const score = Math.min(100, (input.length / 150) * 100);
|
| 163 |
+
document.getElementById('densityBar').style.width = score + '%';
|
| 164 |
+
document.getElementById('densityScore').innerText = Math.round(score) + '%';
|
| 165 |
|
| 166 |
+
const badge = document.getElementById('safetyStatus');
|
| 167 |
+
const redFlags = ['nude', 'kill', 'gore', 'political'];
|
| 168 |
+
let danger = redFlags.some(word => input.toLowerCase().includes(word));
|
| 169 |
+
|
| 170 |
+
if(danger) {
|
| 171 |
+
badge.innerText = "ANALIZADOR: RIESGO CR脥TICO";
|
| 172 |
+
badge.className = "text-[10px] font-bold px-4 py-2 rounded-full border border-red-500 bg-red-900/20 status-crit";
|
| 173 |
+
} else {
|
| 174 |
+
badge.innerText = "ANALIZADOR: SEGURO";
|
| 175 |
+
badge.className = "text-[10px] font-bold px-4 py-2 rounded-full border border-green-500 bg-green-900/20 status-optimal";
|
| 176 |
}
|
|
|
|
| 177 |
}
|
| 178 |
|
| 179 |
+
function generatePrompt() {
|
| 180 |
+
const input = document.getElementById('rawInput').value;
|
| 181 |
+
const amateur = document.getElementById('amateurStyle').value;
|
| 182 |
+
const lens = document.getElementById('lens').value;
|
| 183 |
+
const sampler = document.getElementById('sampler').value;
|
| 184 |
+
const scheduler = document.getElementById('scheduler').value;
|
| 185 |
|
| 186 |
+
if(!input) return alert("Escribe una idea");
|
|
|
|
|
|
|
| 187 |
|
| 188 |
let pos = "";
|
| 189 |
+
let amateurText = presets[amateur] || "high quality, professional photography, masterpiece";
|
| 190 |
+
|
| 191 |
+
// L贸gica por Modelo
|
| 192 |
+
if(model === 'flux') {
|
| 193 |
+
pos = `[Subject: ${input}] [Style: ${amateurText}] [Lens: ${lens}] [Technical: Sampler ${sampler}, Scheduler ${scheduler}]`;
|
| 194 |
+
} else if(model === 'mj') {
|
| 195 |
+
pos = `${input}, ${amateurText}, ${lens}, shot on film --v 6.0 --stylize 250`;
|
| 196 |
+
} else if(model === 'sdxl') {
|
| 197 |
+
pos = `(amateur photography:1.2), ${input}, ${amateurText}, ${lens}, highly realistic, detailed skin, 8k uhd`;
|
| 198 |
+
} else {
|
| 199 |
+
pos = `A photo of ${input}. Style: ${amateurText}. Technical info: ${lens}. Captured on a real device.`;
|
|
|
|
| 200 |
}
|
| 201 |
|
| 202 |
+
document.getElementById('finalPos').innerText = pos;
|
| 203 |
+
document.getElementById('finalNeg').innerText = "3d render, cartoon, anime, artificial, perfect skin, airbrushed, plastic, cropped, watermark, signature";
|
|
|
|
| 204 |
}
|
| 205 |
|
| 206 |
+
function copy(id) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 207 |
navigator.clipboard.writeText(document.getElementById(id).innerText);
|
| 208 |
+
alert("Copiado!");
|
| 209 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 210 |
</script>
|
| 211 |
</body>
|
| 212 |
</html>
|