[GH-ISSUE #6350] [Issue]: Add SwarmUI save toggle and pass native LoRAs and reference images #3547

Closed
opened 2026-10-21 06:04:10 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @SpicyMarinara on GitHub (Sep 19, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6350

Originally assigned to: @SpicyMarinara on GitHub.

Summary

Native SwarmUI generation hardcodes image saving off and does not pass LoRA or reference-image parameters when no custom Comfy workflow is configured. Add a configurable save toggle, defaulting to off, and support native SwarmUI LoRA and reference-image parameters.

Expected behavior

Generated images should remain unsaved by default unless the user enables a save-to-SwarmUI-backend toggle. When using native SwarmUI generation without a custom workflow, configured LoRAs and reference images should also be passed to SwarmUI and affect the generated output.

Actual behavior

Generated images are not saved to SwarmUI History because the request hardcodes donotsave: true. Without a custom Comfy workflow, the request returns after setting basic parameters and does not include configured LoRAs or reference images; generated avatar and selfie outputs consequently lacked the expected LoRA and reference-image effects.

Steps to reproduce

  1. Run Marinara Engine v2.4.6 (build cc783dd) with a SwarmUI connection.
  2. Use native SwarmUI image generation without configuring a custom Comfy workflow.
  3. Generate an image and inspect SwarmUI History; the generated image is not present.
  4. Configure a LoRA and a reference image, then generate an avatar or selfie.
  5. Inspect the output and request behavior; basic settings are applied, but the LoRA and reference image are not reflected.

Environment

  • Marinara Engine version: v2.4.6, build cc783dd
  • Install type: Not provided
  • OS + version: Not provided
  • Browser or app shell: Not provided

Logs, screenshots, or video

No logs provided. Discord attachments include screenshots showing generated images missing from SwarmUI History when donotsave is true, images appearing after changing it to false, and outputs missing LoRA/reference-image effects.

Additional context

The reported code path is packages/server/src/services/image/image-generation.ts, in buildSwarmUiGenerationBody. It sets donotsave: true and returns early when request.comfyWorkflow is empty, before adding LoRA or reference-image parameters. The reporter tested an unverified local diff that set donotsave: false and added native loras, loraweights, promptimages, and extra_metadata.promptimages_filename; this produced outputs with the expected character effects, but the diff was minimally tested and should be independently validated.

Discord thread: images (SwarmUI): Toggle backend saving of images in SwarmUI
Discord thread link: https://discord.com/channels/1417099416812392641/1550522515942678558
Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653)

Discord thread transcript (27 messages)
[2026-09-18T15:02:55.116Z] jae: out of the box, ME is configured to [not save](https://github.com/Pasta-Devs/Marinara-Engine/blob/main/packages/server/src/services/image/image-generation.ts#L3503) images generated by SwarmUI to the native SwarmUI backend (though image generation otherwise works). You can see this demonstrated int he first and second images, where I run a test generation, but the delicious pasta is not saved in History

If you change the `true` to `false` in the linked code, and rebuild, you get behaviour like the third and fourth images, where the pile of italian goodness is saved in History as expected.

Obviously, a literal change in the hardcode isn't useful, so: requesting a Toggle (default off/false) to optionally save to the backend. It would be a useful feature for me to do inspection and debugging of image gen, and to also archive my work

` ` `
Release: v2.4.6
Build: cc783dd
` ` `
Marinara-Engine/packages/server/src/services/image/image-generation...
AI frontend. Contribute to Pasta-Devs/Marinara-Engine development by creating an account on GitHub.

[attached image 1: https://cdn.discordapp.com/attachments/1550522515942678558/1550522519688187964/image.png?ex=6aaf4ce0&is=6aadfb60&hm=9cbddb94a616ed23566280107a267149f8b681eff262171f25db91ba70cd92ca&]
[attached image 2: https://cdn.discordapp.com/attachments/1550522515942678558/1550522520313270393/image.png?ex=6aaf4ce0&is=6aadfb60&hm=2893fa060dfd1e93d1ebc0ba72735e14ba7a0cb289b3c3f8fa0743fb4b9b35d6&]
[attached image 3: https://cdn.discordapp.com/attachments/1550522515942678558/1550522521407717556/image.png?ex=6aaf4ce0&is=6aadfb60&hm=7b8e4b7694dec3e633b649ad0276a1f08e017b144db925d2108f2fd0643e4654&]
[attached image 4: https://cdn.discordapp.com/attachments/1550522515942678558/1550522522083131522/image.png?ex=6aaf4ce0&is=6aadfb60&hm=be3498e390641ff04fd8d97c11dacb21a82f3b5fef753d81dcf5df5f687e2b28&]
[Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550522515942678558]

[2026-09-18T15:02:57.835Z] Professor Mari [bot]: Howdy!

Thank you for submitting a new bug report/feature request, your support means a lot. A member of the team will look into it as soon as possible, and if they find it valid, they will open a GitHub Issue out of it. You can check whether it was addressed on the staging build of Marinara Engine. **Do not ping any of the developers, this will not speed up the process.**

**Please include a Support Diagnostic in the post if you haven't done it yet.** Otherwise, ignore this step. To grab it, go to the Marinara Engine tab:

`Settings -> Advanced -> Support Diagnostics -> Copy Support Diagnostics.`

If your report is about any of the **Agents**, please provide **the Agent's version** which you can grab from here:

`Agents -> Download Agents -> Installed Agents -> Selected Agent -> Installed Version`

Thank you, this will help tremendously.

This is an automated message, but if you reply to it, I will do my best to assist you using my LLM-powered brain. That said, it's best for a human to handle this case.

Cheers!
[Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550522527347122200]

[2026-09-18T15:15:37.719Z] Marinara: And if you send it with connection’s custom parameters?
[Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550525714531352598]

[2026-09-18T15:26:48.477Z] jae: Oh: that’s interesting. The custom params don’t seem to be going through at all - I have Loras set up, but they aren’t on these images (which I can tell because they are being saved in my debug build)
[Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550528527894454343]

[2026-09-18T15:26:58.012Z] jae: Let me see what else is missing.
[Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550528567887269922]

[2026-09-18T15:34:12.527Z] jae: model = ok
steps = ok
cfg = ok
sampler = ok
scheduler = ok
denoise = ?
clip skip = ?
loras = NO
prompt pos = ok
prompt neg = ok

i also dont _think_ reference images are working right either, but going to need to do some additional testing (which is really what the saved image is useful for)
[Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550530390375276555]

[2026-09-18T15:35:44.883Z] jae: these are my various custom settings changes and their result:

[attached image 1: https://cdn.discordapp.com/attachments/1550522515942678558/1550530775969964203/image.png?ex=6aaf5490&is=6aae0310&hm=8de2fd8e624e94b8d48116cd576e1f88c69c30dfb3af228e6bfbb2762371efac&]
[attached image 2: https://cdn.discordapp.com/attachments/1550522515942678558/1550530776578130003/image.png?ex=6aaf5490&is=6aae0310&hm=5b1fe88c989b9aeb6a98669d6357c38be9080e556acd8cc4baa9f21b0b36c7eb&]
[attached image 3: https://cdn.discordapp.com/attachments/1550522515942678558/1550530777341628466/image.png?ex=6aaf5490&is=6aae0310&hm=5bd70a592b74b269ea5e4ec1c7f52575142786ae8b72d366faed5a474aee08da&]
[Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550530777744154624]

[2026-09-18T15:37:11.138Z] jae: if reference images or loras were used, i'd expect output like this:

[attached image 1: https://cdn.discordapp.com/attachments/1550522515942678558/1550531139213590623/image.png?ex=6aaf54e7&is=6aae0367&hm=6ffdb44220197fae898791dea3259276fc8bc68210f477ae2b2cb2775ae4767c&]
[Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550531139524108329]

[2026-09-18T15:37:25.229Z] jae: (let me know if that's what you meant)
[Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550531198625914991]

[2026-09-18T18:24:58.649Z] Marinara: For tests these params wont't work.
[Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550573365725757613]

[2026-09-18T18:25:03.427Z] Marinara: Test image drops them.
[Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550573385766010882]

[2026-09-18T18:26:12.104Z] jae: weird, okay let me try elsehwere
[Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550573673818365963]

[2026-09-18T18:29:01.814Z] jae: same on avatar gen, no lora, no reference image, the rest of the settings seem okay:

[attached image 1: https://cdn.discordapp.com/attachments/1550522515942678558/1550574385402744923/image.png?ex=6aaed46d&is=6aad82ed&hm=c47c0b74ed7e7fb4a49e7158686fc0709a5e1e91a71fd405fed5b439af2d4008&]
[Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550574385633689711]

[2026-09-18T18:35:24.058Z] jae: and same with selfie: no lora, no reference image, everything else okay:
(have confirmed i'm sending avatar references)

[attached image 1: https://cdn.discordapp.com/attachments/1550522515942678558/1550575988268732536/image.png?ex=6aaed5eb&is=6aad846b&hm=481b2bf6d657c39fbbd98aecbdc21bed66959287192eef0222a8e1eb347d0f1e&]
[attached image 2: https://cdn.discordapp.com/attachments/1550522515942678558/1550575988570857532/image.png?ex=6aaed5eb&is=6aad846b&hm=e16f61e48b208fa8169487ea57dc52ddaa5b90ec26463aafaf111cc466adcb5d&]
[Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550575988881231912]

[2026-09-18T19:02:44.243Z] Marinara: Uh, weird.
[Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550582868315602945]

[2026-09-18T19:02:48.705Z] Marinara: Would need someone else to confirm.
[Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550582887030460467]

[2026-09-18T19:07:11.496Z] jae: understandable
[Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550583989255798885]

[2026-09-18T19:08:43.954Z] jae: so this has kinda turned from "can i get a `donotsave` checkbox?" to "can i get that, but also the SwamUI images implementation might be missing some features"
[Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550584377053020161]

[2026-09-18T19:09:03.960Z] Marinara: @Beta Tester Anyone here using SwarmUI experiencing any issues with references not being passed? Or LORAs?
[Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550584460964003891]

[2026-09-18T19:09:08.409Z] Marinara: Uh.
[Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550584479624593491]

[2026-09-18T19:09:14.579Z] Marinara: I'll ask in the channel.
[Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550584505503580161]

[2026-09-18T19:12:32.154Z] jae: thanks - happy to attempt to repro anything herre
[Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550585334193197077]

[2026-09-18T19:26:11.226Z] jae: i _think_ that unless you have a custom comfy workflow in the connection (which you shouldnt need, because you're using a swarm api call to avoid workflows), it just never sends lora or references:
https://github.com/Pasta-Devs/Marinara-Engine/blob/main/packages/server/src/services/image/image-generation.ts#L3500-L3517

` ` `
 const body: Record<string, unknown> = {
    session_id: sessionId,
    images: 1,
    donotsave: true,
    prompt,
    negativeprompt: negativePrompt,
    width: request.width ?? 512,
    height: request.height ?? 768,
    seed,
    steps: defaults.steps,
    cfgscale: defaults.cfgScale,
    sampler: defaults.sampler,
    scheduler: defaults.scheduler,
  };
  if (model) body.model = model;

  const workflowText = request.comfyWorkflow?.trim();
  if (!workflowText) return body;
` ` `

"body doesnt contain lora/ref; do you have a confy workflow? if not, that's all you get for the body)"
Marinara-Engine/packages/server/src/services/image/image-generation...
AI frontend. Contribute to Pasta-Devs/Marinara-Engine development by creating an account on GitHub.
[Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550588769629896796]

[2026-09-19T01:08:10.535Z] jae: take this with a grain of salt, and with EXTREMELY minimal testing, but i've got an LLM-guided diff that adds loras + reference images to the native swarmUI generation, as well as my hardcoded `donotsave: true` - which is showing me that it's DTRT, and i actually get outputs that look like my characters again

[attached image 1: https://cdn.discordapp.com/attachments/1550522515942678558/1550674833384144916/image.png?ex=6aaf31fa&is=6aade07a&hm=f2f3e184f1c0e992c15f6553fed50060a1efda50ff3645c4a2feec61091ac506&]
[Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550674833849847858]

[2026-09-19T01:09:20.313Z] jae: ` ` `diff
diff --git a/packages/server/src/services/image/image-generation.ts b/packages/server/src/services/image/image-generation.ts
index b4ac25fed..29328f966 100644
--- a/packages/server/src/services/image/image-generation.ts
+++ b/packages/server/src/services/image/image-generation.ts
@@ -3500,7 +3500,7 @@ export function buildSwarmUiGenerationBody(request: ImageGenRequest, sessionId:
   const body: Record<string, unknown> = {
     session_id: sessionId,
     images: 1,
-    donotsave: true,
+    donotsave: false,
     prompt,
     negativeprompt: negativePrompt,
     width: request.width ?? 512,
@@ -3514,7 +3514,25 @@ export function buildSwarmUiGenerationBody(request: ImageGenRequest, sessionId:
   if (model) body.model = model;
 
   const workflowText = request.comfyWorkflow?.trim();
-  if (!workflowText) return body;
+  if (!workflowText) {
+    // Without a raw workflow, LoRAs and references must go as native SwarmUI params.
+    const loras = defaults.loras.filter((lora) => lora.model.trim());
+    if (loras.length > 0) {
+      body.loras = loras.map((lora) => lora.model).join(",");
+      body.loraweights = loras.map((lora) => String(lora.strength)).join(",");
+    }
+    // Mirror SwarmUI's UI: data URLs, plus filenames so outputs list the Prompt Images.
+    // No placeholder here: it exists to fill workflow slots, not to be a real prompt image.
+    const references = collectComfyReferenceImages(request, {
+      ...defaults,
+      uploadPlaceholderOnMissingReference: false,
+    }).map(decodeReferenceImage);
+    if (references.length > 0) {
+      body.promptimages = references.map((ref) => `data:${ref.mimeType};base64,${ref.base64}`);
+      body.extra_metadata = { promptimages_filename: references.map((ref, i) => `reference-${i + 1}.${ref.ext}`) };
+    }
+    return body;
+  }
   if (/%reference_image_name(?:_0[1-4])?%/.test(workflowText)) {
     throw new Error(
` ` `
[Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550675126520127609]

[2026-09-19T01:10:53.427Z] jae: (had to trim that to fit, so prob not a proper diff, but no changes are missing anyway)
[Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550675517068410891]

[2026-09-19T01:12:15.595Z] jae: (i would not claim that this is "the answer", because it might only work for me + krea + whatever phase of the moon. local image gen is _tricky_)
[Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550675861705859284]

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @SpicyMarinara on GitHub (Sep 19, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6350 Originally assigned to: @SpicyMarinara on GitHub. ## Summary Native SwarmUI generation hardcodes image saving off and does not pass LoRA or reference-image parameters when no custom Comfy workflow is configured. Add a configurable save toggle, defaulting to off, and support native SwarmUI LoRA and reference-image parameters. ## Expected behavior Generated images should remain unsaved by default unless the user enables a save-to-SwarmUI-backend toggle. When using native SwarmUI generation without a custom workflow, configured LoRAs and reference images should also be passed to SwarmUI and affect the generated output. ## Actual behavior Generated images are not saved to SwarmUI History because the request hardcodes `donotsave: true`. Without a custom Comfy workflow, the request returns after setting basic parameters and does not include configured LoRAs or reference images; generated avatar and selfie outputs consequently lacked the expected LoRA and reference-image effects. ## Steps to reproduce 1. Run Marinara Engine v2.4.6 (build cc783dd) with a SwarmUI connection. 2. Use native SwarmUI image generation without configuring a custom Comfy workflow. 3. Generate an image and inspect SwarmUI History; the generated image is not present. 4. Configure a LoRA and a reference image, then generate an avatar or selfie. 5. Inspect the output and request behavior; basic settings are applied, but the LoRA and reference image are not reflected. ## Environment - Marinara Engine version: v2.4.6, build cc783dd - Install type: Not provided - OS + version: Not provided - Browser or app shell: Not provided ## Logs, screenshots, or video No logs provided. Discord attachments include screenshots showing generated images missing from SwarmUI History when `donotsave` is true, images appearing after changing it to false, and outputs missing LoRA/reference-image effects. ## Additional context The reported code path is `packages/server/src/services/image/image-generation.ts`, in `buildSwarmUiGenerationBody`. It sets `donotsave: true` and returns early when `request.comfyWorkflow` is empty, before adding LoRA or reference-image parameters. The reporter tested an unverified local diff that set `donotsave: false` and added native `loras`, `loraweights`, `promptimages`, and `extra_metadata.promptimages_filename`; this produced outputs with the expected character effects, but the diff was minimally tested and should be independently validated. Discord thread: images (SwarmUI): Toggle backend saving of images in SwarmUI Discord thread link: https://discord.com/channels/1417099416812392641/1550522515942678558 Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653) <details> <summary>Discord thread transcript (27 messages)</summary> ```text [2026-09-18T15:02:55.116Z] jae: out of the box, ME is configured to [not save](https://github.com/Pasta-Devs/Marinara-Engine/blob/main/packages/server/src/services/image/image-generation.ts#L3503) images generated by SwarmUI to the native SwarmUI backend (though image generation otherwise works). You can see this demonstrated int he first and second images, where I run a test generation, but the delicious pasta is not saved in History If you change the `true` to `false` in the linked code, and rebuild, you get behaviour like the third and fourth images, where the pile of italian goodness is saved in History as expected. Obviously, a literal change in the hardcode isn't useful, so: requesting a Toggle (default off/false) to optionally save to the backend. It would be a useful feature for me to do inspection and debugging of image gen, and to also archive my work ` ` ` Release: v2.4.6 Build: cc783dd ` ` ` Marinara-Engine/packages/server/src/services/image/image-generation... AI frontend. Contribute to Pasta-Devs/Marinara-Engine development by creating an account on GitHub. [attached image 1: https://cdn.discordapp.com/attachments/1550522515942678558/1550522519688187964/image.png?ex=6aaf4ce0&is=6aadfb60&hm=9cbddb94a616ed23566280107a267149f8b681eff262171f25db91ba70cd92ca&] [attached image 2: https://cdn.discordapp.com/attachments/1550522515942678558/1550522520313270393/image.png?ex=6aaf4ce0&is=6aadfb60&hm=2893fa060dfd1e93d1ebc0ba72735e14ba7a0cb289b3c3f8fa0743fb4b9b35d6&] [attached image 3: https://cdn.discordapp.com/attachments/1550522515942678558/1550522521407717556/image.png?ex=6aaf4ce0&is=6aadfb60&hm=7b8e4b7694dec3e633b649ad0276a1f08e017b144db925d2108f2fd0643e4654&] [attached image 4: https://cdn.discordapp.com/attachments/1550522515942678558/1550522522083131522/image.png?ex=6aaf4ce0&is=6aadfb60&hm=be3498e390641ff04fd8d97c11dacb21a82f3b5fef753d81dcf5df5f687e2b28&] [Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550522515942678558] [2026-09-18T15:02:57.835Z] Professor Mari [bot]: Howdy! Thank you for submitting a new bug report/feature request, your support means a lot. A member of the team will look into it as soon as possible, and if they find it valid, they will open a GitHub Issue out of it. You can check whether it was addressed on the staging build of Marinara Engine. **Do not ping any of the developers, this will not speed up the process.** **Please include a Support Diagnostic in the post if you haven't done it yet.** Otherwise, ignore this step. To grab it, go to the Marinara Engine tab: `Settings -> Advanced -> Support Diagnostics -> Copy Support Diagnostics.` If your report is about any of the **Agents**, please provide **the Agent's version** which you can grab from here: `Agents -> Download Agents -> Installed Agents -> Selected Agent -> Installed Version` Thank you, this will help tremendously. This is an automated message, but if you reply to it, I will do my best to assist you using my LLM-powered brain. That said, it's best for a human to handle this case. Cheers! [Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550522527347122200] [2026-09-18T15:15:37.719Z] Marinara: And if you send it with connection’s custom parameters? [Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550525714531352598] [2026-09-18T15:26:48.477Z] jae: Oh: that’s interesting. The custom params don’t seem to be going through at all - I have Loras set up, but they aren’t on these images (which I can tell because they are being saved in my debug build) [Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550528527894454343] [2026-09-18T15:26:58.012Z] jae: Let me see what else is missing. [Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550528567887269922] [2026-09-18T15:34:12.527Z] jae: model = ok steps = ok cfg = ok sampler = ok scheduler = ok denoise = ? clip skip = ? loras = NO prompt pos = ok prompt neg = ok i also dont _think_ reference images are working right either, but going to need to do some additional testing (which is really what the saved image is useful for) [Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550530390375276555] [2026-09-18T15:35:44.883Z] jae: these are my various custom settings changes and their result: [attached image 1: https://cdn.discordapp.com/attachments/1550522515942678558/1550530775969964203/image.png?ex=6aaf5490&is=6aae0310&hm=8de2fd8e624e94b8d48116cd576e1f88c69c30dfb3af228e6bfbb2762371efac&] [attached image 2: https://cdn.discordapp.com/attachments/1550522515942678558/1550530776578130003/image.png?ex=6aaf5490&is=6aae0310&hm=5b1fe88c989b9aeb6a98669d6357c38be9080e556acd8cc4baa9f21b0b36c7eb&] [attached image 3: https://cdn.discordapp.com/attachments/1550522515942678558/1550530777341628466/image.png?ex=6aaf5490&is=6aae0310&hm=5bd70a592b74b269ea5e4ec1c7f52575142786ae8b72d366faed5a474aee08da&] [Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550530777744154624] [2026-09-18T15:37:11.138Z] jae: if reference images or loras were used, i'd expect output like this: [attached image 1: https://cdn.discordapp.com/attachments/1550522515942678558/1550531139213590623/image.png?ex=6aaf54e7&is=6aae0367&hm=6ffdb44220197fae898791dea3259276fc8bc68210f477ae2b2cb2775ae4767c&] [Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550531139524108329] [2026-09-18T15:37:25.229Z] jae: (let me know if that's what you meant) [Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550531198625914991] [2026-09-18T18:24:58.649Z] Marinara: For tests these params wont't work. [Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550573365725757613] [2026-09-18T18:25:03.427Z] Marinara: Test image drops them. [Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550573385766010882] [2026-09-18T18:26:12.104Z] jae: weird, okay let me try elsehwere [Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550573673818365963] [2026-09-18T18:29:01.814Z] jae: same on avatar gen, no lora, no reference image, the rest of the settings seem okay: [attached image 1: https://cdn.discordapp.com/attachments/1550522515942678558/1550574385402744923/image.png?ex=6aaed46d&is=6aad82ed&hm=c47c0b74ed7e7fb4a49e7158686fc0709a5e1e91a71fd405fed5b439af2d4008&] [Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550574385633689711] [2026-09-18T18:35:24.058Z] jae: and same with selfie: no lora, no reference image, everything else okay: (have confirmed i'm sending avatar references) [attached image 1: https://cdn.discordapp.com/attachments/1550522515942678558/1550575988268732536/image.png?ex=6aaed5eb&is=6aad846b&hm=481b2bf6d657c39fbbd98aecbdc21bed66959287192eef0222a8e1eb347d0f1e&] [attached image 2: https://cdn.discordapp.com/attachments/1550522515942678558/1550575988570857532/image.png?ex=6aaed5eb&is=6aad846b&hm=e16f61e48b208fa8169487ea57dc52ddaa5b90ec26463aafaf111cc466adcb5d&] [Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550575988881231912] [2026-09-18T19:02:44.243Z] Marinara: Uh, weird. [Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550582868315602945] [2026-09-18T19:02:48.705Z] Marinara: Would need someone else to confirm. [Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550582887030460467] [2026-09-18T19:07:11.496Z] jae: understandable [Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550583989255798885] [2026-09-18T19:08:43.954Z] jae: so this has kinda turned from "can i get a `donotsave` checkbox?" to "can i get that, but also the SwamUI images implementation might be missing some features" [Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550584377053020161] [2026-09-18T19:09:03.960Z] Marinara: @Beta Tester Anyone here using SwarmUI experiencing any issues with references not being passed? Or LORAs? [Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550584460964003891] [2026-09-18T19:09:08.409Z] Marinara: Uh. [Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550584479624593491] [2026-09-18T19:09:14.579Z] Marinara: I'll ask in the channel. [Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550584505503580161] [2026-09-18T19:12:32.154Z] jae: thanks - happy to attempt to repro anything herre [Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550585334193197077] [2026-09-18T19:26:11.226Z] jae: i _think_ that unless you have a custom comfy workflow in the connection (which you shouldnt need, because you're using a swarm api call to avoid workflows), it just never sends lora or references: https://github.com/Pasta-Devs/Marinara-Engine/blob/main/packages/server/src/services/image/image-generation.ts#L3500-L3517 ` ` ` const body: Record<string, unknown> = { session_id: sessionId, images: 1, donotsave: true, prompt, negativeprompt: negativePrompt, width: request.width ?? 512, height: request.height ?? 768, seed, steps: defaults.steps, cfgscale: defaults.cfgScale, sampler: defaults.sampler, scheduler: defaults.scheduler, }; if (model) body.model = model; const workflowText = request.comfyWorkflow?.trim(); if (!workflowText) return body; ` ` ` "body doesnt contain lora/ref; do you have a confy workflow? if not, that's all you get for the body)" Marinara-Engine/packages/server/src/services/image/image-generation... AI frontend. Contribute to Pasta-Devs/Marinara-Engine development by creating an account on GitHub. [Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550588769629896796] [2026-09-19T01:08:10.535Z] jae: take this with a grain of salt, and with EXTREMELY minimal testing, but i've got an LLM-guided diff that adds loras + reference images to the native swarmUI generation, as well as my hardcoded `donotsave: true` - which is showing me that it's DTRT, and i actually get outputs that look like my characters again [attached image 1: https://cdn.discordapp.com/attachments/1550522515942678558/1550674833384144916/image.png?ex=6aaf31fa&is=6aade07a&hm=f2f3e184f1c0e992c15f6553fed50060a1efda50ff3645c4a2feec61091ac506&] [Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550674833849847858] [2026-09-19T01:09:20.313Z] jae: ` ` `diff diff --git a/packages/server/src/services/image/image-generation.ts b/packages/server/src/services/image/image-generation.ts index b4ac25fed..29328f966 100644 --- a/packages/server/src/services/image/image-generation.ts +++ b/packages/server/src/services/image/image-generation.ts @@ -3500,7 +3500,7 @@ export function buildSwarmUiGenerationBody(request: ImageGenRequest, sessionId: const body: Record<string, unknown> = { session_id: sessionId, images: 1, - donotsave: true, + donotsave: false, prompt, negativeprompt: negativePrompt, width: request.width ?? 512, @@ -3514,7 +3514,25 @@ export function buildSwarmUiGenerationBody(request: ImageGenRequest, sessionId: if (model) body.model = model; const workflowText = request.comfyWorkflow?.trim(); - if (!workflowText) return body; + if (!workflowText) { + // Without a raw workflow, LoRAs and references must go as native SwarmUI params. + const loras = defaults.loras.filter((lora) => lora.model.trim()); + if (loras.length > 0) { + body.loras = loras.map((lora) => lora.model).join(","); + body.loraweights = loras.map((lora) => String(lora.strength)).join(","); + } + // Mirror SwarmUI's UI: data URLs, plus filenames so outputs list the Prompt Images. + // No placeholder here: it exists to fill workflow slots, not to be a real prompt image. + const references = collectComfyReferenceImages(request, { + ...defaults, + uploadPlaceholderOnMissingReference: false, + }).map(decodeReferenceImage); + if (references.length > 0) { + body.promptimages = references.map((ref) => `data:${ref.mimeType};base64,${ref.base64}`); + body.extra_metadata = { promptimages_filename: references.map((ref, i) => `reference-${i + 1}.${ref.ext}`) }; + } + return body; + } if (/%reference_image_name(?:_0[1-4])?%/.test(workflowText)) { throw new Error( ` ` ` [Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550675126520127609] [2026-09-19T01:10:53.427Z] jae: (had to trim that to fit, so prob not a proper diff, but no changes are missing anyway) [Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550675517068410891] [2026-09-19T01:12:15.595Z] jae: (i would not claim that this is "the answer", because it might only work for me + krea + whatever phase of the moon. local image gen is _tricky_) [Discord message: https://discord.com/channels/1417099416812392641/1550522515942678558/1550675861705859284] ``` </details> ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 06:04:10 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Sep 19, 2026):

Owner: @SpicyMarinara, assisted by Codex. Taking this report in the issue sweep tracked by draft PR #6359. I will trace the affected path, keep the fix small, and record the relevant regression proof before merging to staging.

<!-- gh-comment-id:5741686273 --> @SpicyMarinara commented on GitHub (Sep 19, 2026): Owner: @SpicyMarinara, assisted by Codex. Taking this report in the issue sweep tracked by draft PR #6359. I will trace the affected path, keep the fix small, and record the relevant regression proof before merging to staging.
Author
Owner

@SpicyMarinara commented on GitHub (Sep 19, 2026):

Merged to staging in #6359. Native SwarmUI requests now carry configured LoRAs, weights, and reference images. Save images in SwarmUI is an opt-in connection setting and survives reload. Wire-format and browser persistence proofs pass; the GPU-backed backend remains a manual verification item.

<!-- gh-comment-id:5742475624 --> @SpicyMarinara commented on GitHub (Sep 19, 2026): Merged to staging in #6359. Native SwarmUI requests now carry configured LoRAs, weights, and reference images. Save images in SwarmUI is an opt-in connection setting and survives reload. Wire-format and browser persistence proofs pass; the GPU-backed backend remains a manual verification item.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#3547
No description provided.