Spaces:
Paused

File size: 4,726 Bytes
bc9f3e6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
/* ==========================================================================

   PyTorchInstallDialog — the "Detect & Install GPU PyTorch" popup. The

   Settings tab's fix-env button opens this instead of silently installing

   the recommended path: it shows the hardware detection report and every

   build that can run on this PC (CPU / NVIDIA CUDA / Intel XPU / AMD ROCm)

   with its reason, so the USER decides which PyTorch to install. Same

   centered-card over a dimmed backdrop language as the app's other themed

   dialogs (.firstrun-*, .lal-confirm-*, .llcpp-*, .llsrv-*, .wsrv-*) — rides

   the app tokens, so it themes with light/dark automatically.

   ========================================================================== */

.ptch-overlay {
  position: fixed;
  inset: 0;
  z-index: 10010;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.ptch-box {
  background: var(--bg-elev, #ffffff);
  border: 1px solid var(--card-border, #e7e0d3);
  border-left: 5px solid var(--primary-600, #d97757);
  border-radius: var(--radius, 14px);
  padding: 22px 24px;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
  animation: ptch-pop 0.22s ease-out;
}

@keyframes ptch-pop {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.ptch-title {
  font-family: var(--font-display, Georgia, "Times New Roman", serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-strong, #000000);
  margin-bottom: 12px;
}

/* The hardware detection report — what the app actually found on this PC

   (GPU name, CPU name, driver CUDA version, compute capability, and the

   torch device currently active). */
.ptch-detect {
  color: var(--text-strong, #000000);
  font-size: 0.85rem;
  line-height: 1.6;
  padding: 10px 12px;
  background: var(--amber-bg, #fbf0dc);
  border: 1px solid var(--amber-line, #eed9b0);
  border-radius: var(--radius-sm, 8px);
  margin-bottom: 12px;
}

.ptch-pick {
  color: var(--text-strong, #000000);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.ptch-opts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
  max-height: 260px;
  overflow-y: auto;
}

.ptch-loading,
.ptch-err {
  color: var(--text-dim, #4a4a4a);
  padding: 8px 0 16px;
}

.ptch-err {
  color: var(--danger, #b4453a);
}

.ptch-opt {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid var(--card-border, #e7e0d3);
  border-radius: var(--radius-sm, 8px);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.ptch-opt:hover {
  border-color: var(--primary-600, #d97757);
}

.ptch-opt.sel {
  border-color: var(--primary-600, #d97757);
  background: color-mix(in srgb, var(--primary-600, #d97757) 8%, transparent);
}

.ptch-opt.unavail {
  opacity: 0.55;
  cursor: not-allowed;
}

.ptch-opt input[type="radio"] {
  margin-top: 3px;
  accent-color: var(--primary-600, #d97757);
}

.ptch-opt-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ptch-opt-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-strong, #000000);
}

.ptch-rec {
  margin-left: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary-700, #b05a36);
}

.ptch-na {
  margin-left: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim, #4a4a4a);
}

.ptch-opt-reason {
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-dim, #4a4a4a);
}

.ptch-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.ptch-cancel {
  border: 1px solid var(--card-border, #e7e0d3);
  background: transparent;
  color: var(--text-strong, #000000);
  border-radius: 10px;
  padding: 9px 18px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.ptch-cancel:hover {
  filter: brightness(1.05);
}

.ptch-ok {
  border: 1px solid var(--primary-600, #d97757);
  background: var(--primary-600, #d97757);
  color: #ffffff;
  border-radius: 10px;
  padding: 9px 18px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.ptch-ok:hover {
  filter: brightness(1.05);
}

/* Draggable title bar */
.ptch-drag-handle {
  cursor: grab;
  user-select: none;
}

.ptch-drag-handle:active {
  cursor: grabbing;
}

.ptch-box.dragging .ptch-drag-handle {
  cursor: grabbing;
}