Repository navigation
[Bug fix] tt_dit: run_single_prompt forwards guidance_scale, prompt_2 and negative_prompt_2 - #65025
Draft
singhharsh1708 wants to merge 1 commit into
Conversation
jbakerTT
marked this pull request as draft
November 12, 2026 15:54
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Category
Bug fix
Summary
PipelineAPIMixin.run_single_prompt(models/tt_dit/pipelines/pipeline_api.py) takes onlyprompt,negative_prompt,num_inference_steps,seedandon_event, so a caller holding a guidance scale or a second text-encoder prompt has no way to pass them short of calling the pipeline directly. tt-inference-server'sTTDiTRunnerserves SD3.5 Large and FLUX.1-dev through this entry point, and its image request already acceptsguidance_scale,prompt_2andnegative_prompt_2; today they stop at the runner, so SD3.5 Large always runs at the pipeline's 3.5 and both models feed the first prompt to the second encoder.This adds
guidance_scale,prompt_2andnegative_prompt_2torun_single_prompt. Each is forwarded only when given (asguidance_scale,prompts_2=[...],negative_prompts_2=[...]), so pipelines without those parameters (Motif, QwenImage and FIBO takecfg_scale; Mochi, Wan and Ideogram have no second prompt) are called exactly as before, and a caller passing an argument a pipeline lacks gets that pipeline's TypeError. With none of the three set the call is identical to the current one. The_Pipelineprotocol gains**kwargsto match.Notes for reviewers
Mapping
guidance_scaleontocfg_scalefor Motif, QwenImage and FIBO is left out on purpose; none of them is served with a guidance value through this entry point today, and the two names carry different defaults.Verification
New device-free test
models/tt_dit/tests/unit/test_pipeline_api.py, in the style oftest_observability.py, with a recording pipeline: the default call passes the original six keyword arguments and nothing else; a call with all three new arguments passes them as single-item lists and a float. On main the second test fails withTypeError: run_single_prompt() got an unexpected keyword argument 'prompt_2'; with this change both pass (run with--noconftesttogether withtest_observability.py: 10 passed).Not run: any pipeline on device or simulator. The existing callers (
test_performance_flux1.py,test_performance_motif.py,dataset_eval/test_tt_dit.py) pass only the old arguments and are unaffected.Code owners