dippoo commited on
Commit
136976f
·
1 Parent(s): a5fa801

Fix: Add job tracking to img2img cloud generation

Browse files
src/content_engine/__pycache__/main.cpython-311.pyc CHANGED
Binary files a/src/content_engine/__pycache__/main.cpython-311.pyc and b/src/content_engine/__pycache__/main.cpython-311.pyc differ
 
src/content_engine/api/__pycache__/routes_generation.cpython-311.pyc CHANGED
Binary files a/src/content_engine/api/__pycache__/routes_generation.cpython-311.pyc and b/src/content_engine/api/__pycache__/routes_generation.cpython-311.pyc differ
 
src/content_engine/api/ui.html CHANGED
@@ -2191,8 +2191,18 @@ async function doGenerate() {
2191
  const data = await res.json();
2192
  if (!res.ok) throw new Error(data.detail || 'Generation failed');
2193
 
2194
- const backendLabel = selectedBackend === 'cloud' ? 'Cloud edit' : 'Local img2img';
2195
- toast(`${backendLabel} generation started!`, 'info');
 
 
 
 
 
 
 
 
 
 
2196
  await pollForNewImage(startTime);
2197
  return;
2198
  }
 
2191
  const data = await res.json();
2192
  if (!res.ok) throw new Error(data.detail || 'Generation failed');
2193
 
2194
+ // Track job ID for cloud img2img
2195
+ if (selectedBackend === 'cloud' && data.job_id) {
2196
+ currentJobId = data.job_id;
2197
+ toast(`Cloud edit started (${data.job_id.substring(0,8)})`, 'info');
2198
+ pollJobStatus(data.job_id).catch(e => {
2199
+ if (e.message) toast('Job failed: ' + e.message, 'error');
2200
+ });
2201
+ } else {
2202
+ const backendLabel = selectedBackend === 'cloud' ? 'Cloud edit' : 'Local img2img';
2203
+ toast(`${backendLabel} generation started!`, 'info');
2204
+ }
2205
+
2206
  await pollForNewImage(startTime);
2207
  return;
2208
  }