[Bugfix][HunyuanImage] fix accuracy in stream mode (#4265)
Signed-off-by: dengyunyang <584797741@qq.com> Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
This commit is contained in:
1 parent
18e083e512
commit
14879d6619
2 files changed
+6
-1
No files matched your search
@@ -185,7 +185,8 @@ def ar2diffusion(
|
||||
for i, ar_output in enumerate(ar_outputs):
|
||||
output = ar_output.outputs[0]
|
||||
generated_token_ids = output.cumulative_token_ids
|
||||
generated_text = getattr(output, "text", "") or ""
|
||||
# Prefer cumulative_text, fallback to text if aggregation dropped it
|
||||
generated_text = getattr(output, "cumulative_text", None) or getattr(output, "text", "") or ""
|
||||
|
||||
# Get original prompt info
|
||||
original_prompt = prompt[i] if i < len(prompt) else {}
|
||||
|
||||
Reference in new issue
Block a user