waveshaker commited on
Commit
63d90a2
·
verified ·
1 Parent(s): 6d85d81

Create index.html

Browse files
Files changed (1) hide show
  1. frontend_cache/index.html +200 -0
frontend_cache/index.html ADDED
@@ -0,0 +1,200 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Universal T2I - Studio API Test</title>
7
+ <link rel="stylesheet" href="style.css">
8
+ <script>
9
+ (function() {
10
+ const mask = document.createElement('div');
11
+ mask.id = 'global-loading-mask';
12
+
13
+ // 直接锁死所有样式,确保两次刷新长得一模一样
14
+ mask.style.cssText = `
15
+ position: fixed !important;
16
+ inset: 0 !important;
17
+ background-color: #121212 !important;
18
+ z-index: 2147483647 !important;
19
+ display: flex;
20
+ flex-direction: column;
21
+ justify-content: center;
22
+ align-items: center;
23
+ `;
24
+
25
+ mask.innerHTML = `
26
+ <div style="width: 40px; height: 40px; border: 3px solid #333; border-top-color: #FF7F50; border-radius: 50%; animation: spin 1s linear infinite;"></div>
27
+ <div style="color: #888; margin-top: 16px; font-size: 14px; font-weight: 500; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;">Waking up Studio...</div>
28
+ <style>@keyframes spin { 100% { transform: rotate(360deg); } }</style>
29
+ `;
30
+
31
+ // 立即插入
32
+ document.documentElement.appendChild(mask);
33
+ })();
34
+ </script>
35
+ </head>
36
+ <body>
37
+ <div class="layout">
38
+ <!-- 🟢 1. 左侧:参数控制区 -->
39
+ <div class="panel left-panel">
40
+ <div class="header-row">
41
+ <h2>Sampler</h2>
42
+ <div class="header-status-text" id="backend-status-wrapper" title="Checking backend status...">
43
+ <span>Backend:</span>
44
+ <div id="backend-status-dot" class="status-dot loading"></div>
45
+ </div>
46
+ </div>
47
+
48
+ <div class="form-group">
49
+ <label>Base Model</label>
50
+ <select id="unet-select">
51
+ <option value="">⏳ Loading models...</option>
52
+ </select>
53
+ </div>
54
+
55
+ <div class="form-group">
56
+ <label>Prompt</label>
57
+ <textarea id="prompt" rows="4">20 years old woman, 1girl, RAW photo, PORTRAIT, (photorealistic:1.37, realistic), (straight from front:1.2), looking at viewer, ((wearing a simple white t-shirt:1.4)), (casual clothing:1.2), soft lighting, high quality, film grain, Fujifilm XT3, ((dynamic pose:1.2)), ((upper body:1.6)), (professional lighting:1.6), (blurred cafe or minimalist room background:1.2), clean environment, centered composition, dead center, medium shot, ample negative space around.</textarea>
58
+ </div>
59
+
60
+ <!-- 🌟 新增:1MP 比例快捷按钮 -->
61
+ <div class="form-group">
62
+ <label>Aspect Ratio • 1MP</label>
63
+ <div class="aspect-ratio-row">
64
+ <button type="button" class="ratio-btn active" data-ratio="1:1">1:1</button>
65
+ <button type="button" class="ratio-btn" data-ratio="3:4">3:4</button>
66
+ <button type="button" class="ratio-btn" data-ratio="9:16">9:16</button>
67
+ <button type="button" class="ratio-btn" data-ratio="4:3">4:3</button>
68
+ <button type="button" class="ratio-btn" data-ratio="16:9">16:9</button>
69
+ </div>
70
+ </div>
71
+
72
+ <div class="form-row">
73
+ <div class="form-group">
74
+ <label>Width</label>
75
+ <div class="slider-group">
76
+ <input type="range" id="width-slider" min="16" max="1728" step="16" value="1024">
77
+ <input type="number" id="width-input" min="16" max="1728" value="1024">
78
+ </div>
79
+ </div>
80
+ <div class="form-group">
81
+ <label>Height</label>
82
+ <div class="slider-group">
83
+ <input type="range" id="height-slider" min="16" max="1728" step="16" value="1024">
84
+ <input type="number" id="height-input" min="16" max="1728" value="1024">
85
+ </div>
86
+ </div>
87
+ </div>
88
+
89
+ <div class="form-row">
90
+ <div class="form-group">
91
+ <label>Steps</label>
92
+ <div class="slider-group">
93
+ <input type="range" id="steps-slider" min="4" max="50" step="1" value="8">
94
+ <input type="number" id="steps-input" min="4" max="50" value="8">
95
+ </div>
96
+ </div>
97
+ <div class="form-group">
98
+ <label>CFG</label>
99
+ <div class="slider-group">
100
+ <input type="range" id="cfg-slider" min="1" max="10" step="0.1" value="1.0">
101
+ <input type="number" id="cfg-input" min="1" max="10" step="0.1" value="1.0">
102
+ </div>
103
+ </div>
104
+ </div>
105
+
106
+ <div class="form-row" style="grid-template-columns: 1fr 1fr 1fr;">
107
+ <div class="form-group" style="margin-bottom: 0;">
108
+ <label>Sampler</label>
109
+ <select id="sampler"></select>
110
+ </div>
111
+ <div class="form-group" style="margin-bottom: 0;">
112
+ <label>Scheduler</label>
113
+ <select id="scheduler"></select>
114
+ </div>
115
+ <div class="form-group" style="margin-bottom: 0;">
116
+ <label>Seed</label>
117
+ <div class="seed-group">
118
+ <input type="number" id="seed" value="-1">
119
+ <button type="button" id="random-seed-btn" title="Randomize Seed">🎲</button>
120
+ </div>
121
+ </div>
122
+ </div>
123
+
124
+ <div class="form-group">
125
+ <label>Base / Turbo LoRAs</label>
126
+ <div id="base-lora-container"></div>
127
+ </div>
128
+
129
+ <button id="generate-btn">Generate</button>
130
+ </div>
131
+
132
+ <!-- 🟡 2. 中间:图库 -->
133
+ <div class="panel middle-panel">
134
+ <div class="header-row">
135
+ <div class="header-title-group">
136
+ <h2>Character LoRA</h2>
137
+ <span class="divider">|</span>
138
+ <a href="https://huggingface.co/spaces/waveshaker/loras_gallery" target="_blank" class="gallery-link">🖼️ Gallery ↗</a>
139
+ </div>
140
+ <div class="header-status-text" id="lora-count">0 Models</div>
141
+ </div>
142
+
143
+ <!-- 🌟 幽灵占位大图区 -->
144
+ <div class="preview-wrapper">
145
+ <div id="preview-placeholder" class="preview-placeholder">
146
+ <span>No LoRA Selected</span>
147
+ </div>
148
+ <img id="selected-lora-big-img" class="selected-big-img" src="">
149
+ </div>
150
+
151
+ <div class="selected-hud-bar">
152
+ <div class="hud-left">
153
+ <input type="checkbox" id="char-enable" class="hud-checkbox" checked>
154
+ <span class="hud-label">Selected:</span>
155
+ <span id="selected-lora-name" class="hud-name" style="color: var(--text-muted);">None</span>
156
+ </div>
157
+ <div class="hud-strength-group">
158
+ <span class="hud-label">Strength</span>
159
+ <input type="number" id="char-strength" value="1.0" step="0.05">
160
+ </div>
161
+ </div>
162
+
163
+ <div class="gallery-scroll-container" id="gallery-container">
164
+ <div class="gallery-grid" id="gallery-grid">
165
+ <div style="color: var(--text-muted); font-size: 13px; grid-column: span 3;">⏳ Loading gallery...</div>
166
+ </div>
167
+ </div>
168
+ </div>
169
+
170
+ <!-- 🔵 3. 右侧:Output & Logs -->
171
+ <div class="panel right-panel">
172
+ <div class="header-row">
173
+ <h2>Output</h2>
174
+ </div>
175
+
176
+ <!-- 🌟 顶部:400x400 预览方框 -->
177
+ <div class="image-preview-box">
178
+ <div id="placeholder-text" class="placeholder-text">Image area</div>
179
+ <img id="result-image" src="" alt="Generated Image">
180
+ </div>
181
+
182
+ <!-- 🌟 底部:专属日志面板 -->
183
+ <div class="log-panel" id="log-panel">
184
+ <div class="log-header" style="display: flex; justify-content: space-between; align-items: center;">
185
+ <span>Status Logs</span>
186
+ <label style="display: flex; align-items: center; gap: 6px; cursor: pointer; font-weight: normal; font-size: 12px; color: var(--text-muted); margin: 0;">
187
+ <input type="checkbox" id="auto-scroll-toggle" checked style="width: 14px !important; height: 14px !important;">
188
+ <span id="auto-scroll-text">Auto-scroll</span>
189
+ </label>
190
+ </div>
191
+ <div class="log-content" id="log-content">
192
+ <div class="log-line">Ready.</div>
193
+ </div>
194
+ </div>
195
+ </div>
196
+ </div>
197
+
198
+ <script src="app.js"></script>
199
+ </body>
200
+ </html>