Repository navigation
SD3.5 Large and FLUX.1: forward guidance_scale, prompt_2 and negative_prompt_2 to the pipeline - #5557
Open
singhharsh1708 wants to merge 1 commit into
Conversation
…_prompt_2 to the pipeline
singhharsh1708
requested review from
a team,
ddjukicTT,
dmadicTT,
fivanovicTT,
knovokmetTT,
ljovanovicTT,
lmuravljovTT,
nanicicTT,
visnjakrsmanovicTT,
vpetrovicTT and
ztorlakTT
as code owners
November 9, 2026 16:46
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.
ImageGenerateRequestacceptsguidance_scale,prompt_2andnegative_prompt_2, butTTDiTRunner.run(tt-media-server/tt_model_runners/dit_runners.py) passes only the prompt, negative prompt, steps and seed torun_single_prompt, so for SD3.5 Large and FLUX.1-dev the three fields never reach the pipeline: SD3.5's classifier-free guidance stays at the pipeline's 3.5, FLUX.1-dev's guidance embedding stays at 3.5, and the second text encoder gets the first prompt. SDXL honours the same fields through its own runner (#883, #927).TTDiTRunner.runnow adds the keyword arguments a_pipeline_kwargs(request)hook returns; the base returns none, andTTSD35RunnerandTTFlux1Runnerreturnguidance_scale,prompt_2andnegative_prompt_2.guidance_scaleis forwarded only when the client sent it (model_fields_set), because the request default of 5.0 is SDXL's; a request without it keeps each pipeline's own default, so served output does not change for existing clients. FLUX.1-schnell accepts and ignores guidance, as before. Motif and QwenImage, whose pipelines takecfg_scale, forward nothing extra.The receiving side is tenstorrent/tt-metal#65025, which adds the three arguments to
PipelineAPIMixin.run_single_prompt. Against a tt-metal pin that predates it, the runner checks therun_single_promptsignature, logs a warning and drops the arguments it does not have, so a request that sets them still succeeds (today they are dropped silently).New
tests/test_dit_runner_request_fields.py, loading the real module the waytest_video_stage_metrics_wiring.pydoes: explicit fields reach a recording pipeline for both runners, a default request leaves all three unset, Motif and QwenImage forward nothing, and a pipeline with the old signature gets the call without them plus one warning. On main 3 of the 7 fail; with this changetests/test_dit_runner_request_fields.py tests/test_video_stage_metrics_wiring.py tests/test_minimax_h3_lightx2v_runner.py tests/test_kontext_api.py tests/test_video_runner.py: 115 passed. Not run on device; no image-quality comparison was made.