Spaces:
Runtime error
Runtime error
new backend params
Browse files
frontend/src/lib/App.svelte
CHANGED
@@ -136,17 +136,14 @@
|
|
136 |
$isLoading = true;
|
137 |
const sessionHash = crypto.randomUUID();
|
138 |
const payload = {
|
139 |
-
fn_index:
|
140 |
data: [
|
141 |
getImageCrop($clickedPosition),
|
142 |
_prompt,
|
143 |
0.75,
|
144 |
7.5,
|
145 |
30,
|
146 |
-
|
147 |
-
'patchmatch',
|
148 |
-
true,
|
149 |
-
null
|
150 |
],
|
151 |
session_hash: sessionHash
|
152 |
};
|
@@ -185,10 +182,10 @@
|
|
185 |
break;
|
186 |
case 'process_completed':
|
187 |
try {
|
188 |
-
const imgBase64 = data.output.data[0]
|
189 |
-
|
190 |
|
191 |
-
const imgBlob = await base64ToBlob(
|
192 |
const imgURL = await uploadImage(imgBlob, _prompt);
|
193 |
|
194 |
$imagesList.push({
|
|
|
136 |
$isLoading = true;
|
137 |
const sessionHash = crypto.randomUUID();
|
138 |
const payload = {
|
139 |
+
fn_index: 0,
|
140 |
data: [
|
141 |
getImageCrop($clickedPosition),
|
142 |
_prompt,
|
143 |
0.75,
|
144 |
7.5,
|
145 |
30,
|
146 |
+
'patchmatch'
|
|
|
|
|
|
|
147 |
],
|
148 |
session_hash: sessionHash
|
149 |
};
|
|
|
182 |
break;
|
183 |
case 'process_completed':
|
184 |
try {
|
185 |
+
const imgBase64 = data.output.data[0] as string;
|
186 |
+
const isNSWF = data.output.data[1] as boolean;
|
187 |
|
188 |
+
const imgBlob = await base64ToBlob(imgBase64);
|
189 |
const imgURL = await uploadImage(imgBlob, _prompt);
|
190 |
|
191 |
$imagesList.push({
|