oscerd opened a new pull request, #25933:
URL: https://github.com/apache/camel/pull/25933

   ## Issue
   [CAMEL-24540](https://issues.apache.org/jira/browse/CAMEL-24540)
   
   Two small correctness gaps in the Hugging Face task predictors, both 
incomplete ports of the pattern
   the other predictors follow.
   
   ### 1. Model revision ignored for two tasks
   `SentenceEmbeddingsPredictor` and `TextToImagePredictor` did not pass 
`config.getRevision()` into their
   generated Python script, so pinning a model revision/branch silently had no 
effect for these two tasks
   (the other eight pass it). The revision is now threaded into:
   - `sentence_embeddings.py` — `SentenceTransformer(model, device=..., 
revision=...)`
   - `text_to_image.py` — `StableDiffusionPipeline.from_pretrained(model, 
revision=..., ...)`
   
   ### 2. Text-to-image never set the OUTPUT header
   `TextToImagePredictor.processOutput` set the image bytes as the message body 
but never set the
   `OUTPUT` header, even though its Javadoc documents that header. It now sets
   `HuggingFaceConstants.OUTPUT` to the image bytes alongside the body.
   
   ## Testing
   - New `RevisionAndOutputHeaderTest` asserts both scripts pin the configured 
revision and that
     text-to-image publishes the image on the `OUTPUT` header.
   - `mvn -Psourcecheck validate` green.
   
   _Claude Code on behalf of oscerd_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to