Skip to content

Commit 34129e3

Browse files
committed
Remove debug JSON dump from ComfyClient QueuePromptAsync
1 parent decb7d1 commit 34129e3

1 file changed

Lines changed: 6 additions & 24 deletions

File tree

StabilityMatrix.Core/Inference/ComfyClient.cs

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -333,31 +333,12 @@ public async Task<ComfyTask> QueuePromptAsync(
333333
{
334334
var request = new ComfyPromptRequest { ClientId = ClientId, Prompt = nodes };
335335

336-
#if DEBUG
337-
try
338-
{
339-
var json = JsonSerializer.Serialize(request, jsonSerializerOptions);
340-
341-
var debugDir = Path.Combine(
342-
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
343-
"StabilityMatrix",
344-
"Debug"
345-
);
346-
347-
Directory.CreateDirectory(debugDir);
348-
349-
var path = Path.Combine(debugDir, "wan_workflow_debug_request.json");
350-
351-
File.WriteAllText(path, json);
352-
353-
Logger.Debug("WAN DEBUG: Dumped final request JSON to {0}", path);
354-
}
355-
catch (Exception ex)
336+
public async Task<ComfyTask> QueuePromptAsync(
337+
Dictionary<string, ComfyNode> nodes,
338+
CancellationToken cancellationToken = default
339+
)
356340
{
357-
Logger.Error(ex, "WAN DEBUG: Failed to dump final request JSON");
358-
}
359-
#endif
360-
341+
var request = new ComfyPromptRequest { ClientId = ClientId, Prompt = nodes };
361342

362343
var result = await comfyApi.PostPrompt(request, cancellationToken).ConfigureAwait(false);
363344

@@ -368,6 +349,7 @@ public async Task<ComfyTask> QueuePromptAsync(
368349
return task;
369350
}
370351

352+
371353
public async Task InterruptPromptAsync(CancellationToken cancellationToken = default)
372354
{
373355
await comfyApi.PostInterrupt(cancellationToken).ConfigureAwait(false);

0 commit comments

Comments
 (0)