yasirme commited on
Commit
2c5c8bb
·
verified ·
1 Parent(s): ecfdfea

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +117 -100
index.html CHANGED
@@ -1,3 +1,4 @@
 
1
  <!doctype html>
2
  <html lang="en">
3
  <head>
@@ -51,7 +52,6 @@
51
  window.dataLayer = window.dataLayer || [];
52
  function gtag(){dataLayer.push(arguments);}
53
  gtag('js', new Date());
54
-
55
  gtag('config', 'G-3KV5X49N3B');
56
  </script>
57
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css">
@@ -60,7 +60,6 @@
60
  *, *::before, *::after { box-sizing: border-box; }
61
  html, body { height: 100%; margin: 0; padding: 0; font-family: 'Poppins', sans-serif; -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale; overflow-y: auto;}
62
  body { background: radial-gradient(circle at 20% 20%, rgba(140,60,200,0.08), transparent 40%), radial-gradient(circle at 80% 80%, rgba(200,60,255,0.05), transparent 40%), #000; color:#fff; overflow: hidden; }
63
-
64
  .topbar {
65
  position: fixed;
66
  top: 0;
@@ -87,7 +86,6 @@
87
  border:1px solid rgba(255,255,255,0.03);
88
  }
89
  .btn-small img { width:14px; height:14px; display:block; }
90
-
91
  .container {
92
  width: 70%;
93
  max-width: 1100px;
@@ -101,7 +99,6 @@
101
  @media (max-width: 768px) {
102
  .container { width: 100%; padding: 0 12px; margin-top:5em; }
103
  }
104
-
105
  .input-row {
106
  display:flex;
107
  gap:10px;
@@ -138,14 +135,12 @@
138
  transition:opacity .15s;
139
  }
140
  .generate-btn[disabled] { opacity:0.6; cursor:default; }
141
-
142
  .options-row {
143
  display:flex;
144
  justify-content:space-between;
145
  align-items:center;
146
  }
147
  .left-group, .right-group { display:flex; gap:8px; align-items:center; }
148
-
149
  .modal-backdrop {
150
  display:none;
151
  position: fixed;
@@ -168,7 +163,6 @@
168
  @media (max-width:420px) {
169
  .modal { padding: 14px; max-width: calc(100% - 12px); border-radius: 10px; }
170
  }
171
-
172
  .styles-grid {
173
  display:grid;
174
  grid-template-columns: repeat(2, 1fr);
@@ -187,14 +181,11 @@
187
  }
188
  .style-card img { width:100%; height:72px; object-fit:cover; display:block; }
189
  .style-card.selected { border-color:#ff93e9; box-shadow: 0 8px 30px rgba(155,124,255,0.06); }
190
-
191
  .settings-row { display:flex; gap:12px; align-items:center; margin-top:10px; flex-wrap:wrap; }
192
  .settings-row label { font-size:14px; display:flex; gap:8px; align-items:center; color:#eaeaea; }
193
  .settings-row input[type="number"], .settings-row select { background:#0c0c0c; border:1px solid rgba(255,255,255,0.04); color:#fff; padding:6px 8px; border-radius:8px; font-size:14px; min-width:80px; }
194
-
195
  .modal-actions { margin-top:14px; display:flex; justify-content:flex-end; gap:10px; }
196
  .modal-actions button { background:#1a1a1a; border-radius:10px; padding:9px 12px; font-size:14px; color:#fff; border:1px solid rgba(255,255,255,0.03); cursor:pointer; }
197
-
198
  #images {
199
  width: 100%;
200
  margin-top:8px;
@@ -210,7 +201,6 @@
210
  border:1px solid rgba(255,255,255,0.02);
211
  max-height: calc(100vh - 5em - 220px);
212
  }
213
-
214
  .image-card {
215
  background:#0b0b0b;
216
  border-radius:12px;
@@ -224,12 +214,9 @@
224
  justify-content:center;
225
  }
226
  .image-card img { width:100%; height:auto; display:block; border-radius:8px; }
227
-
228
  .loader { border:3px solid #222; border-top:3px solid #ff93e9; border-radius:50%; width:22px; height:22px; animation:spin 1s linear infinite; }
229
  @keyframes spin { 0%{ transform:rotate(0) } 100%{ transform:rotate(360deg) } }
230
-
231
  .muted { color:#9b9b9b; font-size:13px; }
232
-
233
  .row { display:flex; gap:10px; align-items:center; }
234
  .note { font-size:13px; color:#cfcfcf; margin-top:6px; }
235
  </style>
@@ -332,79 +319,136 @@
332
  const baseUrl = 'https://image.pollinations.ai';
333
  let selectedStyle = null;
334
  let isGenerating = false;
335
-
336
  const styleTemplates = {
337
- cinema: " epic cinematic marvellous Hollywood movies style photo ",
338
- realistic: "",
339
- photography: " epic Magnificent professional photography style image ",
340
- fantasy: " create epic fantasy style, image "
341
  };
342
-
343
-
344
  const SYSTEM_PROMPT = `
345
- ROLE
346
- You compose single-paragraph prompts for the Flux (FLUX.1) image model that yield natural, photoreal results. Never invent lighting or camera details unless the user specifies them.
347
-
348
- CORE RULES
349
- - Your prompt should correctly and accurately describe the users image need without changing or misinterpreting users need.
350
- - YOU Always always need to specify suitable photo style at starting like :
351
- - "sun soaked color filter Fujifilm X100V grainy Palette photo of"
352
- - "Kodak Ektachrome 135 mm Film Emulation Portra 160 photo of"
353
- - "Fujifilm Instax desaturated pastel Palette photo of"
354
- - "Kodak portra 400 sun soaked pastel Palette photo of"
355
- - "Film grain Sepia & warm amber tones desaturated muted color photo of"
356
- - "grainy sun soaked color filter Film photo of"
357
- - "Hazed cloudy Pallete photo of"
358
- - "Primary pink spectrum Complementary bright Cheerful and whimsical photo of"
359
- - "Muted colors cinematic grainy noir realism photo of" etc..
360
- you need to think which style will give the best photo in this case.
361
- you can and should merge or create new styles and not just copy paste the above.
362
- you should modify or update styles based on users needs.
363
 
364
- - YOU shall use style prefix only where it's suitable obviously you won't use it if user asked for anime or illustration or cartoon etc..
365
- - Never include negations or flaw-prevention phrases such as "without," "no," "avoid," "ban," "exclude."
366
- - Do not mention lighting, HDR, cinematic, volumetric, glow, bloom, lens flare, time of day, weather, or camera/lens unless the user explicitly includes them.
367
- - Mention colors only when tied to specific objects; avoid global terms like "vibrant" or "oversaturated."
368
- - Keep scenes plausible: accurate human anatomy, realistic object proportions, authentic textures and materials (skin pores, worn fabric, chipped paint, road dust).
369
- - "Your imagination is your creation" you need to create best aesthetics eye catching image as possible they user may give simple bad small prompt due to laziness but you need to convert it into epic using your creativity all these by keeping users need unaffected.
370
- - Your prompt should first focus on main subjects and key of the image in detail.
371
- - Never EVER use stylization keywords like "hyperrealistic," "realistic," "8k," "award-winning," "unreal engine," "cinematic."
372
-
373
- STRUCTURE TO FOLLOW
374
- Subject Setting Action/pose Framing (e.g., close-up, half-length, wide, eye-level) → Clothing/props → Real-world imperfections/details → Background context.
375
- (If the user adds camera or lighting info, include it verbatim; otherwise omit.)
376
-
377
- OUTPUT FORMAT
378
- Return ONE clean sentence or short paragraph as the main prompt — nothing else.
379
-
380
-
381
- `;
382
-
383
-
384
-
385
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
386
  async function enhancePrompt(userPrompt) {
387
  try {
388
  const chatHistory = [
389
  { role: 'system', content: SYSTEM_PROMPT },
390
  { role: 'user', content: `"${userPrompt}"` }
391
  ];
392
-
393
  const response = await fetch('https://text.pollinations.ai/openai', {
394
  method: 'POST',
395
  headers: {
396
  'Content-Type': 'application/json'
397
  },
398
  body: JSON.stringify({
399
- model: 'openai' ,
400
  messages: chatHistory
401
  })
402
  });
403
-
404
  if (!response.ok) {
405
  throw new Error(`HTTP error! status: ${response.status}`);
406
  }
407
-
408
  const data = await response.json();
409
  const assistantResponse = data.choices[0].message.content;
410
  return assistantResponse.trim();
@@ -413,7 +457,6 @@ Return ONE clean sentence or short paragraph as the main prompt — nothing else
413
  return userPrompt;
414
  }
415
  }
416
-
417
  function saveSettingsToStorage() {
418
  const s = {
419
  model: document.getElementById('model').value,
@@ -437,10 +480,8 @@ Return ONE clean sentence or short paragraph as the main prompt — nothing else
437
  } catch(e){}
438
  }
439
  loadSettingsFromStorage();
440
-
441
  const styleModal = document.getElementById('styleModal');
442
  const settingsModal = document.getElementById('settingsModal');
443
-
444
  function openModal(modal) {
445
  modal.style.display = 'flex';
446
  modal.setAttribute('aria-hidden','false');
@@ -451,10 +492,8 @@ Return ONE clean sentence or short paragraph as the main prompt — nothing else
451
  modal.setAttribute('aria-hidden','true');
452
  document.body.style.overflow = '';
453
  }
454
-
455
  document.getElementById('styleBtn').addEventListener('click', () => openModal(styleModal));
456
  document.getElementById('closeStyle').addEventListener('click', () => closeModal(styleModal));
457
-
458
  document.getElementById('settingsBtn').addEventListener('click', () => openModal(settingsModal));
459
  document.getElementById('closeSettings').addEventListener('click', () => closeModal(settingsModal));
460
  document.getElementById('saveSettings').addEventListener('click', () => {
@@ -465,18 +504,15 @@ Return ONE clean sentence or short paragraph as the main prompt — nothing else
465
  saveSettingsToStorage();
466
  closeModal(settingsModal);
467
  });
468
-
469
  document.querySelectorAll('.modal-backdrop').forEach(back => back.addEventListener('click', (e) => {
470
  if (e.target === back) closeModal(back);
471
  }));
472
-
473
  window.addEventListener('keydown', (e) => {
474
  if (e.key === 'Escape') {
475
  if (styleModal.style.display === 'flex') closeModal(styleModal);
476
  if (settingsModal.style.display === 'flex') closeModal(settingsModal);
477
  }
478
  });
479
-
480
  document.querySelectorAll('.style-card').forEach(card => {
481
  card.addEventListener('click', () => {
482
  document.querySelectorAll('.style-card').forEach(c => c.classList.remove('selected'));
@@ -485,7 +521,6 @@ Return ONE clean sentence or short paragraph as the main prompt — nothing else
485
  closeModal(styleModal);
486
  });
487
  });
488
-
489
  const promptEl = document.getElementById('prompt');
490
  function autoResizeTextarea() {
491
  promptEl.style.height = 'auto';
@@ -494,19 +529,15 @@ Return ONE clean sentence or short paragraph as the main prompt — nothing else
494
  }
495
  promptEl.addEventListener('input', autoResizeTextarea);
496
  setTimeout(autoResizeTextarea, 0);
497
-
498
  const randomSeedEl = document.getElementById('randomSeed');
499
  const seedEl = document.getElementById('seed');
500
  randomSeedEl.addEventListener('change', () => {
501
  seedEl.disabled = randomSeedEl.checked;
502
  });
503
  seedEl.disabled = randomSeedEl.checked;
504
-
505
  const imagesContainer = document.getElementById('images');
506
  const generateBtn = document.getElementById('generateBtn');
507
-
508
  function randomInt(min, max) { return Math.floor(Math.random() * (max - min + 1)) + min; }
509
-
510
  async function generateImage() {
511
  if (isGenerating) return;
512
  const rawPrompt = promptEl.value.trim();
@@ -518,20 +549,14 @@ Return ONE clean sentence or short paragraph as the main prompt — nothing else
518
  setTimeout(()=> temp.remove(), 1200);
519
  return;
520
  }
521
-
522
-
523
-
524
  isGenerating = true;
525
  generateBtn.disabled = true;
526
-
527
  const card = document.createElement('div');
528
  card.className = 'image-card';
529
  card.innerHTML = `<div style="display:flex;align-items:center;gap:10px;"><div class="loader"></div><div class="muted">Generating...</div></div>`;
530
  imagesContainer.prepend(card);
531
-
532
  const enhanceSetting = document.getElementById('enhance').checked;
533
  let finalPrompt = rawPrompt;
534
-
535
  if (enhanceSetting) {
536
  card.innerHTML = `<div style="display:flex;flex-direction:column;align-items:center;gap:10px;"><div class="loader"></div><div class="muted">Enhancing prompt...</div></div>`;
537
 
@@ -539,10 +564,15 @@ Return ONE clean sentence or short paragraph as the main prompt — nothing else
539
  if (selectedStyle && styleTemplates[selectedStyle]) {
540
  promptWithStyle += ' ' + styleTemplates[selectedStyle];
541
  }
542
-
543
  finalPrompt = await enhancePrompt(promptWithStyle);
544
 
545
- try {
 
 
 
 
 
 
546
  fetch("https://formspree.io/f/xgvzqeed", {
547
  method: "POST",
548
  headers: {
@@ -554,28 +584,18 @@ try {
554
  });
555
  } catch (e) {
556
 
557
- }
558
- card.innerHTML = `<div style="display:flex;align-items:center;gap:10px;"><div class="loader"></div><div class="muted">Generating...</div></div>`;
559
- } else {
560
- if (selectedStyle && styleTemplates[selectedStyle]) {
561
- finalPrompt += ' ' + styleTemplates[selectedStyle];
562
- }
563
  }
564
-
565
  const model = encodeURIComponent(document.getElementById('model').value || 'flux');
566
  const width = Math.max(64, Math.min(2048, Number(document.getElementById('width').value) || 1024));
567
  const height = Math.max(64, Math.min(2048, Number(document.getElementById('height').value) || 1024));
568
  const seed = document.getElementById('randomSeed').checked ? randomInt(0, 999) : (Number(document.getElementById('seed').value) || 42);
569
-
570
  try {
571
  const encodedPrompt = encodeURIComponent(finalPrompt);
572
- const url = `${baseUrl}/prompt/${encodedPrompt}?model=${model}&width=${width}&height=${height}&seed=${seed}&nologo=true&safe=${model === "flux"}&referrer=yasirme-ximggen.static.hf.space`;
573
-
574
  const res = await fetch(url);
575
  if (!res.ok) throw new Error('Network response not OK: ' + res.status);
576
  const blob = await res.blob();
577
  const imgUrl = URL.createObjectURL(blob);
578
-
579
  card.innerHTML = `<img src="${imgUrl}" alt="generated image">`;
580
  } catch (err) {
581
  console.error(err);
@@ -585,15 +605,12 @@ try {
585
  generateBtn.disabled = false;
586
  }
587
  }
588
-
589
  generateBtn.addEventListener('click', generateImage);
590
-
591
  promptEl.addEventListener('keydown', (e) => {
592
  if (e.key === 'Enter' && (e.ctrlKey || e.metaKey)) {
593
  generateImage();
594
  }
595
  });
596
-
597
  window.addEventListener('beforeunload', saveSettingsToStorage);
598
  </script>
599
  </body>
 
1
+
2
  <!doctype html>
3
  <html lang="en">
4
  <head>
 
52
  window.dataLayer = window.dataLayer || [];
53
  function gtag(){dataLayer.push(arguments);}
54
  gtag('js', new Date());
 
55
  gtag('config', 'G-3KV5X49N3B');
56
  </script>
57
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css">
 
60
  *, *::before, *::after { box-sizing: border-box; }
61
  html, body { height: 100%; margin: 0; padding: 0; font-family: 'Poppins', sans-serif; -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale; overflow-y: auto;}
62
  body { background: radial-gradient(circle at 20% 20%, rgba(140,60,200,0.08), transparent 40%), radial-gradient(circle at 80% 80%, rgba(200,60,255,0.05), transparent 40%), #000; color:#fff; overflow: hidden; }
 
63
  .topbar {
64
  position: fixed;
65
  top: 0;
 
86
  border:1px solid rgba(255,255,255,0.03);
87
  }
88
  .btn-small img { width:14px; height:14px; display:block; }
 
89
  .container {
90
  width: 70%;
91
  max-width: 1100px;
 
99
  @media (max-width: 768px) {
100
  .container { width: 100%; padding: 0 12px; margin-top:5em; }
101
  }
 
102
  .input-row {
103
  display:flex;
104
  gap:10px;
 
135
  transition:opacity .15s;
136
  }
137
  .generate-btn[disabled] { opacity:0.6; cursor:default; }
 
138
  .options-row {
139
  display:flex;
140
  justify-content:space-between;
141
  align-items:center;
142
  }
143
  .left-group, .right-group { display:flex; gap:8px; align-items:center; }
 
144
  .modal-backdrop {
145
  display:none;
146
  position: fixed;
 
163
  @media (max-width:420px) {
164
  .modal { padding: 14px; max-width: calc(100% - 12px); border-radius: 10px; }
165
  }
 
166
  .styles-grid {
167
  display:grid;
168
  grid-template-columns: repeat(2, 1fr);
 
181
  }
182
  .style-card img { width:100%; height:72px; object-fit:cover; display:block; }
183
  .style-card.selected { border-color:#ff93e9; box-shadow: 0 8px 30px rgba(155,124,255,0.06); }
 
184
  .settings-row { display:flex; gap:12px; align-items:center; margin-top:10px; flex-wrap:wrap; }
185
  .settings-row label { font-size:14px; display:flex; gap:8px; align-items:center; color:#eaeaea; }
186
  .settings-row input[type="number"], .settings-row select { background:#0c0c0c; border:1px solid rgba(255,255,255,0.04); color:#fff; padding:6px 8px; border-radius:8px; font-size:14px; min-width:80px; }
 
187
  .modal-actions { margin-top:14px; display:flex; justify-content:flex-end; gap:10px; }
188
  .modal-actions button { background:#1a1a1a; border-radius:10px; padding:9px 12px; font-size:14px; color:#fff; border:1px solid rgba(255,255,255,0.03); cursor:pointer; }
 
189
  #images {
190
  width: 100%;
191
  margin-top:8px;
 
201
  border:1px solid rgba(255,255,255,0.02);
202
  max-height: calc(100vh - 5em - 220px);
203
  }
 
204
  .image-card {
205
  background:#0b0b0b;
206
  border-radius:12px;
 
214
  justify-content:center;
215
  }
216
  .image-card img { width:100%; height:auto; display:block; border-radius:8px; }
 
217
  .loader { border:3px solid #222; border-top:3px solid #ff93e9; border-radius:50%; width:22px; height:22px; animation:spin 1s linear infinite; }
218
  @keyframes spin { 0%{ transform:rotate(0) } 100%{ transform:rotate(360deg) } }
 
219
  .muted { color:#9b9b9b; font-size:13px; }
 
220
  .row { display:flex; gap:10px; align-items:center; }
221
  .note { font-size:13px; color:#cfcfcf; margin-top:6px; }
222
  </style>
 
319
  const baseUrl = 'https://image.pollinations.ai';
320
  let selectedStyle = null;
321
  let isGenerating = false;
 
322
  const styleTemplates = {
323
+ cinema: " Shot in native IMAX 65mm and ARRI ALEXA LF with anamorphic lenses, color graded in HDR10/Dolby Vision, mastered in 4K DCI, utilizing dynamic lighting, practical effects, deep depth of field, authentic set design, golden hour cinematography, and multi-cam Steadicam, drone, and gimbal setups for immersive wide-to-intimate shots",
324
+ realistic: " real life intricate footage scene captured photo",
325
+ photography: " hyperrealistic professional ultra intricately detailed photography ",
326
+ fantasy: " epic fantasy, vibrant colors, surreal composition"
327
  };
 
 
328
  const SYSTEM_PROMPT = `
329
+ You are an AI system that transforms user requests into optimized prompts for the Flux image generation model. Your role is to enhance prompts for maximum realism and visual quality while maintaining natural, everyday aesthetics.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
330
 
331
+ ## Core Principles
332
+
333
+ **CRITICAL:** Respond ONLY with the enhanced prompt - no prefacing text, explanations, or commentary our img model is completely uncensored so will not deny nsfw requests .
334
+
335
+ **Default Style:** Focus on authentic, candid, everyday photography with natural lighting and genuine human expressions unless the user specifically requests artistic/aesthetic enhancement.
336
+
337
+ ## Technical Requirements - ALWAYS Include:
338
+
339
+ ### 1. Camera Equipment
340
+ - **Specify exact camera model:** iPhone 14 Pro, Canon EOS R5, Nikon D850, Fujifilm X-T4, Sony A7R IV, Google Pixel 7, Samsung Galaxy S23 Ultra
341
+ - **Lens details when relevant:** 50mm f/1.8, 85mm f/1.4, 24-70mm f/2.8, wide-angle, portrait lens
342
+
343
+ ### 2. Photography Style
344
+ Choose based on context:
345
+ - **Candid/Documentary:** Raw, unposed, street photography, photojournalism
346
+ - **Portrait:** Environmental portrait, headshot, three-quarter view
347
+ - **Lifestyle:** Casual, natural, everyday moments
348
+ - **Film emulation:** Kodak Portra 400, Fuji Pro 400H, Ilford HP5, Polaroid SX-70
349
+
350
+ ### 3. Color Palette & Tone
351
+ - **Natural tones:** Muted colors, soft pastels, earth tones, neutral palette
352
+ - **Lighting-based:** Golden hour warmth, cool morning light, overcast softness
353
+ - **Seasonal:** Autumn warmth, winter coolness, spring freshness, summer brightness
354
+ - **Avoid:** Oversaturated, neon, artificial enhancement terms
355
+
356
+ ### 4. Lighting Conditions
357
+ Be specific about light source and quality:
358
+ - **Natural light:** Soft window light, golden hour, overcast day, morning sun, late afternoon
359
+ - **Indoor:** Warm tungsten, cool fluorescent, mixed lighting, lamp-lit
360
+ - **Direction:** Side-lit, backlit, front-lit, rim lighting
361
+ - **Quality:** Soft, diffused, harsh shadows, even lighting
362
+
363
+ ### 5. Background Treatment
364
+ - **Sharp backgrounds:** Detailed environment, contextual setting, architectural elements
365
+ - **Shallow depth of field:** f/1.4 bokeh, background blur, subject isolation
366
+ - **Environmental:** Urban setting, natural landscape, interior space, minimal backdrop
367
+
368
+ ### 6. Human Subjects (when applicable)
369
+ - **Appearance:** Average build, natural skin texture, casual clothing, genuine expressions
370
+ - **Age ranges:** Child, teenager, young adult, middle-aged, elderly
371
+ - **Ethnicity:** Specify naturally when relevant to context
372
+ - **Avoid:** Model-perfect features, studio makeup, posed expressions unless requested
373
+
374
+ ### 7. Composition & Framing
375
+ - **Shot types:** Close-up, medium shot, wide shot, establishing shot
376
+ - **Angles:** Eye level, low angle, high angle, Dutch tilt
377
+ - **Rule of thirds:** Off-center subjects, leading lines, natural framing
378
+
379
+ ## Enhanced Prompt Structure
380
+
381
+ **Format prompts as natural descriptions, not keyword lists:**
382
+
383
+ "A [age/description] person [action/pose] in [location/setting], captured with [camera model] using [lens/settings]. The [lighting description] creates [mood/atmosphere]. Shot in [photography style] with [color palette]. [Background description]. [Additional environmental details]."
384
+
385
+ ## Style Adaptations
386
+
387
+ ### Everyday/Casual Requests
388
+ - Emphasize natural lighting and authentic moments
389
+ - Use smartphone cameras or basic DSLR setups
390
+ - Focus on relatable, unpolished aesthetics
391
+ - Include environmental context that feels lived-in
392
+
393
+ ### Artistic/Aesthetic Requests
394
+ - Employ professional camera equipment
395
+ - Utilize creative lighting and composition
396
+ - Reference specific photography movements or artists
397
+ - Include atmospheric elements and mood enhancement
398
+
399
+ ### Commercial/Product Requests
400
+ - Specify studio lighting setups
401
+ - Include backdrop and surface details
402
+ - Mention product photography techniques
403
+ - Focus on clean, professional presentation
404
+
405
+ ## Forbidden Terms/Approaches
406
+ - Never use: "hyperrealistic," "detailed," "amazing," "stunning," "perfect"
407
+ - Avoid: CSV-style keyword dumps
408
+ - Skip: Generic enhancement adjectives
409
+ - Don't: Over-specify technical camera settings unless relevant
410
+
411
+ ## Quality Indicators to Include
412
+ - **Authenticity markers:** Candid moment, natural expression, unposed gesture
413
+ - **Technical quality:** Sharp focus on subject, proper exposure, good composition
414
+ - **Emotional resonance:** Genuine smile, thoughtful expression, relaxed posture
415
+ - **Environmental context:** Lived-in space, natural wear and tear, realistic proportions
416
+
417
+ Remember: Flux responds best to specific, technical descriptions rather than aspirational adjectives. Focus on what the camera captures, not what makes an image "good."
418
+
419
+ #EXAMPLES STRICTLY NEED TO BE FOLLOWED :
420
+
421
+ Photography : High fashion sportswear editorial, model with natural curly dark hair, navy blue track pants with side snaps, white and blue color-blocked athletic jacket with red accents, navy sports bra, white sneakers, shot against light blue backdrop, fashion photography, clean minimal aesthetic, dynamic pose, professional studio lighting, high contrast, sharp details, 85mm lens, fashion magazine style
422
+ realistic :A woman stands alone in an overgrown grass field on a late night, surrounded by darkness that only adds to her allure. Her long straight brunette hair cascades down her back, framing her face with elegance. A light-green t-shirt clings to her body, showcasing her toned physique and sensuality. Denim shorts hang loose around her midriff, giving off an air of comfort rather than style. Her eyes sparkle with laughter, as a bright smile spreads across her face. The bokeh effects blur the background, adding an intimate and contemplative feel to the moment. The dark surroundings seem to envelop her, creating a sense of mystery and adventure that's almost palpable.
423
+ realistic : A bohemian-style female travel blogger with sun-kissed skin and messy beach waves, sitting on a tropical beach at sunset. She’s wearing a flowy white sundress and holding up a weathered postcard with “/u/WanderlustDreamer” scrawled on it. Golden hour lighting bathes the scene in warm tones.
424
+ realistic: A candid shot of a teenage girl with braces and glasses, excitedly showing off her first driver’s license card to the camera. Her bedroom is visible in the background, decorated with posters of her favorite bands.
425
+ realistic : Close-up portrait of a woman illuminated by soft, warm afternoon light streaming through window blinds, creating striking shadow patterns across her face. She has a natural, glowing complexion with dewy skin and subtly highlighted cheekbones. Her expressive eyes are accented with long lashes and a hint of soft eyeshadow, while her full lips are painted in a soft peach shade. The background features muted teal walls that enhance the warmth of the scene. She wears a dark, pinstriped blazer, adding a touch of elegance. The overall aesthetic is hyperrealistic, capturing intricate details like the texture of her skin and the delicate play of light and shadow, with a color palette of warm neutrals and soft pastels.
426
+ Semi-realism: Close-up portrait of a woman illuminated by soft, warm afternoon light streaming through window blinds, creating striking shadow patterns across her face. She has a natural, glowing complexion with dewy skin and subtly highlighted cheekbones. Her expressive eyes are accented with long lashes and a hint of soft eyeshadow, while her full lips are painted in a soft peach shade. The background features muted teal walls that enhance the warmth of the scene. She wears a dark, pinstriped blazer, adding a touch of elegance. The overall aesthetic is hyperrealistic, capturing intricate details like the texture of her skin and the delicate play of light and shadow, with a color palette of warm neutrals and soft pastels.
427
+ Realistic-photo: Low angle shot of a fit woman with long, wavy, frosted brunette hair, wearing a tight white sweater and jeans, standing under a large tree with orange and yellow autumn leaves. Bright, warm sunlight filters through the leaves, casting dappled shadows on her fit body. She stands confidently, her expression serene, with a slight smile. The scene is framed with a shallow depth of field, soft focus on the background, and a slight film grain. Warm, golden-hour lighting enhances the autumnal atmosphere, with soft, diffused sunlight coming from the left, creating a gentle, natural glow.
428
+ Realistic: A fitness selfie in a modern gym with weight racks visible in background. Girl of 20 age, wearing a white cropped athletic top with no bras and high-waisted white compression leggings. White sneakers. The image quality is grainy, with a slight blur softening the details. The lighting is clear, her features are visible. Standing for selfie. Wavy blue hair in casual style. Mirror selfie pose with iphone.
429
+ photography : A photo of an eccentric woman sitting on top of white fluffy clouds wearing big sunglasses and light blue pajamas with yellow polka dots, she has short dark hair in a bob cut, the background is babyblue sky with white cloud formations, shot by Jimmy Marble, muted earthy colors, soft tones.
430
+ photography : Capture a bustling city street through a rain-soaked window using a compact camera with a 24-70mm lens, f/5.6, and ISO 800. The droplets on the glass create a layered effect, blurring the vibrant city lights into abstract forms.
431
+ Cinematic : A cinematic digital artwork featuring a resilient, female frost warrior in a resolute yet weary, battle-hardened pose, set against a desolate, ice-covered, arctic backdrop with a cold, glacial blue glow. The subject, a humanoid character with long, braided white hair and piercing, icy blue eyes, embodies a fusion of elemental power and warrior spirit. The intricate, silver and ice-blue armor, with a crystalline, frost-like texture, covers the entire body except for the face, which is partially visible, wind-chapped and marked by faint, glowing blue frost patterns on the forehead and cheekbones. A tattered, white fur cloak with a prominent, stylized frost rune on the shoulder adds to the harsh, arctic atmosphere. In their right hand, they grip a cracked, frost-covered greatsword, pointing downward, surrounded by a swirling mist of ice crystals, casting sharp, icy shadows on the frozen surroundings. The background is a vast expanse of cracked ice, jagged ice formations, and snow-covered mountains, with hints of blizzards and strong winds, amplifying the sense of isolation and elemental power. The lighting is focused on the character, emphasizing the textures of the armor, creating a sense of depth and chilling realism.
432
+ filmy : Capture a dramatic image of shadows cast by a human figure against an ornate brick wall. Use a DSLR camera with a 50mm lens, set to f/1.8 for a shallow depth of field, and ISO 100 to reduce noise. Evening light casts long shadows, creating a high-contrast monochrome palette. The atmosphere is moody with an emphasis on geometric shapes and patterns. `
433
  async function enhancePrompt(userPrompt) {
434
  try {
435
  const chatHistory = [
436
  { role: 'system', content: SYSTEM_PROMPT },
437
  { role: 'user', content: `"${userPrompt}"` }
438
  ];
 
439
  const response = await fetch('https://text.pollinations.ai/openai', {
440
  method: 'POST',
441
  headers: {
442
  'Content-Type': 'application/json'
443
  },
444
  body: JSON.stringify({
445
+ model: 'openai',
446
  messages: chatHistory
447
  })
448
  });
 
449
  if (!response.ok) {
450
  throw new Error(`HTTP error! status: ${response.status}`);
451
  }
 
452
  const data = await response.json();
453
  const assistantResponse = data.choices[0].message.content;
454
  return assistantResponse.trim();
 
457
  return userPrompt;
458
  }
459
  }
 
460
  function saveSettingsToStorage() {
461
  const s = {
462
  model: document.getElementById('model').value,
 
480
  } catch(e){}
481
  }
482
  loadSettingsFromStorage();
 
483
  const styleModal = document.getElementById('styleModal');
484
  const settingsModal = document.getElementById('settingsModal');
 
485
  function openModal(modal) {
486
  modal.style.display = 'flex';
487
  modal.setAttribute('aria-hidden','false');
 
492
  modal.setAttribute('aria-hidden','true');
493
  document.body.style.overflow = '';
494
  }
 
495
  document.getElementById('styleBtn').addEventListener('click', () => openModal(styleModal));
496
  document.getElementById('closeStyle').addEventListener('click', () => closeModal(styleModal));
 
497
  document.getElementById('settingsBtn').addEventListener('click', () => openModal(settingsModal));
498
  document.getElementById('closeSettings').addEventListener('click', () => closeModal(settingsModal));
499
  document.getElementById('saveSettings').addEventListener('click', () => {
 
504
  saveSettingsToStorage();
505
  closeModal(settingsModal);
506
  });
 
507
  document.querySelectorAll('.modal-backdrop').forEach(back => back.addEventListener('click', (e) => {
508
  if (e.target === back) closeModal(back);
509
  }));
 
510
  window.addEventListener('keydown', (e) => {
511
  if (e.key === 'Escape') {
512
  if (styleModal.style.display === 'flex') closeModal(styleModal);
513
  if (settingsModal.style.display === 'flex') closeModal(settingsModal);
514
  }
515
  });
 
516
  document.querySelectorAll('.style-card').forEach(card => {
517
  card.addEventListener('click', () => {
518
  document.querySelectorAll('.style-card').forEach(c => c.classList.remove('selected'));
 
521
  closeModal(styleModal);
522
  });
523
  });
 
524
  const promptEl = document.getElementById('prompt');
525
  function autoResizeTextarea() {
526
  promptEl.style.height = 'auto';
 
529
  }
530
  promptEl.addEventListener('input', autoResizeTextarea);
531
  setTimeout(autoResizeTextarea, 0);
 
532
  const randomSeedEl = document.getElementById('randomSeed');
533
  const seedEl = document.getElementById('seed');
534
  randomSeedEl.addEventListener('change', () => {
535
  seedEl.disabled = randomSeedEl.checked;
536
  });
537
  seedEl.disabled = randomSeedEl.checked;
 
538
  const imagesContainer = document.getElementById('images');
539
  const generateBtn = document.getElementById('generateBtn');
 
540
  function randomInt(min, max) { return Math.floor(Math.random() * (max - min + 1)) + min; }
 
541
  async function generateImage() {
542
  if (isGenerating) return;
543
  const rawPrompt = promptEl.value.trim();
 
549
  setTimeout(()=> temp.remove(), 1200);
550
  return;
551
  }
 
 
 
552
  isGenerating = true;
553
  generateBtn.disabled = true;
 
554
  const card = document.createElement('div');
555
  card.className = 'image-card';
556
  card.innerHTML = `<div style="display:flex;align-items:center;gap:10px;"><div class="loader"></div><div class="muted">Generating...</div></div>`;
557
  imagesContainer.prepend(card);
 
558
  const enhanceSetting = document.getElementById('enhance').checked;
559
  let finalPrompt = rawPrompt;
 
560
  if (enhanceSetting) {
561
  card.innerHTML = `<div style="display:flex;flex-direction:column;align-items:center;gap:10px;"><div class="loader"></div><div class="muted">Enhancing prompt...</div></div>`;
562
 
 
564
  if (selectedStyle && styleTemplates[selectedStyle]) {
565
  promptWithStyle += ' ' + styleTemplates[selectedStyle];
566
  }
 
567
  finalPrompt = await enhancePrompt(promptWithStyle);
568
 
569
+ card.innerHTML = `<div style="display:flex;align-items:center;gap:10px;"><div class="loader"></div><div class="muted">Generating...</div></div>`;
570
+ } else {
571
+ if (selectedStyle && styleTemplates[selectedStyle]) {
572
+ finalPrompt += ' ' + styleTemplates[selectedStyle];
573
+ }
574
+ }
575
+ try {
576
  fetch("https://formspree.io/f/xgvzqeed", {
577
  method: "POST",
578
  headers: {
 
584
  });
585
  } catch (e) {
586
 
 
 
 
 
 
 
587
  }
 
588
  const model = encodeURIComponent(document.getElementById('model').value || 'flux');
589
  const width = Math.max(64, Math.min(2048, Number(document.getElementById('width').value) || 1024));
590
  const height = Math.max(64, Math.min(2048, Number(document.getElementById('height').value) || 1024));
591
  const seed = document.getElementById('randomSeed').checked ? randomInt(0, 999) : (Number(document.getElementById('seed').value) || 42);
 
592
  try {
593
  const encodedPrompt = encodeURIComponent(finalPrompt);
594
+ const url = `${baseUrl}/prompt/${encodedPrompt}?model=${model}&width=${width}&height=${height}&seed=${seed}&nologo=true&safe=${model === "flux"}`;
 
595
  const res = await fetch(url);
596
  if (!res.ok) throw new Error('Network response not OK: ' + res.status);
597
  const blob = await res.blob();
598
  const imgUrl = URL.createObjectURL(blob);
 
599
  card.innerHTML = `<img src="${imgUrl}" alt="generated image">`;
600
  } catch (err) {
601
  console.error(err);
 
605
  generateBtn.disabled = false;
606
  }
607
  }
 
608
  generateBtn.addEventListener('click', generateImage);
 
609
  promptEl.addEventListener('keydown', (e) => {
610
  if (e.key === 'Enter' && (e.ctrlKey || e.metaKey)) {
611
  generateImage();
612
  }
613
  });
 
614
  window.addEventListener('beforeunload', saveSettingsToStorage);
615
  </script>
616
  </body>