mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #4310] [Issue]: Noodle refresh sends corrupt ComfyUI/gallery images to OpenAI instead of skipping them #2331
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#2331
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @thetopham on GitHub (Jul 30, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4310
Originally assigned to: @SpicyMarinara on GitHub.
Summary
When a recent Noodle post contains a broken/corrupt local gallery image associated with the configured ComfyUI-backed image connection, Noodle retries the undecodable bytes through image captioning and then through the main OpenAI timeline request. OpenAI rejects the attachment as an invalid image, the timeline refresh returns 500, and the automatic scheduler keeps retrying.
At the reported repro, the local ComfyUI endpoint was not running/open and Noodle displayed broken image links. The logs prove that the affected post already referenced a locally persisted PNG that Sharp could not decode; they do not prove that endpoint downtime was the original moment the file became corrupt. The Engine bug is reproducible from the persisted invalid-image state even without another ComfyUI request.
Expected behavior
Actual behavior
The affected post is marked as image-generated with model
krea2and references a local character-gallery PNG. The file exists and has a PNG signature, but Sharp rejects its contents withpngload_buffer: libspng read error.The current path then:
The image data you provided does not represent a valid image.From 2026-07-29 22:00 MDT through 2026-07-30 12:48 MDT, the journal contained 18 Sharp optimization failures, 16 matching invalid-image caption failures for the same post, and 18 invalid-image timeline refresh failures.
Steps to reproduce
stagingwith Noodle generation using an OpenAI connection and Noodle image generation using a local/private ComfyUI-backed connection.Noodle settings at failure time
Snapshot captured before image captioning was toggled off as a temporary workaround:
refreshesPerDay:2participantSelectionMode:allparticipantMin:15participantMax:20maxGeneratedPostsPerRefresh:20maxRepliesPerRefresh:5maxRepostsPerRefresh:0maxLikesPerRefresh:17maxImagesPerRefresh:25enableImagePrompts:trueimageGenerationConnectionId: configured connectionkrea2(image_generation, servicecomfyui, private/local endpoint; URL and internal ID omitted)imageGenerationPrompt:Create either a social-media-ready character image or an in-character meme for the post. For character images, mention build, clothing, visible appearance, pose, expression, setting, lighting, mood, and composition. For memes, mention meme format, visual gag, composition, and short readable caption/text when relevant.imageGenerationUseAvatarReferences:falseimageGenerationIncludeDescriptions:falseallowGalleryImageAttachments:trueimageCaptioningEnabled:trueimageCaptioningConnectionId:nullimageCaptioningUseConnectionDefault:falsegpt-5.6-solviaopenai_chatgptenableLorebookContext:falseincludeCharacterSchedules:falseenableEnhancedTimelineWriting:trueallowProfessorMari:falseallowRandomUsers:falseinvitedCharacterGroupIds:[]21(names omitted)carryoverMode:conversationcarryoverModes:[conversation]carryoverHours:48carryoverMaxItems:8theme:systemgenerationConnectionId: configured connectiongpt-5.6-sol(openai_chatgpt; internal ID omitted)enableNoodler:falsenoodlerGenerationGuidance: shipped default adult-platform guidanceprivateGenerationGuidance: same value asnoodlerGenerationGuidanceautoPostingScheduleEnabled:trueautoPostingDefaultIntensity:1reviewImagePromptsBeforeSend: omitted/falseon the failing automatic scheduler pathEnvironment
stagingcommit571a76684f0d569d577919c39405344a7c184841marinara.servicekrea2using the ComfyUI service against a private/local endpoint; endpoint not running/open at repro (user-reported)gpt-5.6-solviaopenai_chatgptLogs, screenshots, or video
Representative journal sequence (post ID redacted):
Relevant stack path:
Additional context
This is Engine-owned host integration: the failing code is in Noodle vision preparation, shared image captioning, provider request shaping, and the public Noodle generation service.
Source-level cause at the inspected commit:
packages/server/src/services/noodle/noodle-vision.ts: after Sharp throws,optimizeNoodleVisionImagereturns the original buffer whenever it is under the unoptimized-size threshold.packages/server/src/services/generation/image-captioning-runtime.ts: a caption failure returnsnull.packages/server/src/services/noodle/noodle-public-prompt.service.ts: anullcaption puts the attachment back intovisionAttachments, so the invalid bytes are sent again in the main request.The exact post text, character identity, private endpoint URL, connection IDs, and API credentials are intentionally omitted. Turning image captioning off was attempted after the captured settings snapshot, but it does not repair the invalid stored image or the raw-buffer fallback.
No matching issue, PR, or issue-linked branch was found for this failure. No implementation owner is assigned and no code work has started.
Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:
@SpicyMarinara commented on GitHub (Jul 30, 2026):
Claimed by @SpicyMarinara in draft PR #4322. The implementation will stay narrow: reject undecodable Noodle images before captioning or multimodal attachment, then prove the refresh can continue text-only.
@SpicyMarinara commented on GitHub (Jul 31, 2026):
Fixed in #4322 and merged into
stagingas9bc60818d. Corrupt or undecodable timeline images are now skipped before captioning/multimodal generation so Noodle refresh can continue text-only.