Skip to content

Conversation

@jtreminio
Copy link
Contributor

@jtreminio jtreminio commented Nov 7, 2025

Use as:

<param[segment_sampler]:euler_a>
<param[segment_scheduler]:beta>
<segment:face,0.6,0.5>
CleanShot 2025-11-07 at 16 49 30

@jtreminio jtreminio marked this pull request as draft November 7, 2025 19:54
@jtreminio jtreminio changed the title Adds Segment Sampler and Scheduler params Adds Segment Sampler, Scheduler, and VAE params Nov 7, 2025
@jtreminio jtreminio marked this pull request as ready for review November 7, 2025 20:00
@jtreminio
Copy link
Contributor Author

Use as:

<param[segment_sampler]:euler_a>
<param[segment_scheduler]:beta>
<segment:face,0.6,0.5>

@jtreminio jtreminio changed the title Adds Segment Sampler, Scheduler, and VAE params Adds Segment Sampler and Scheduler Nov 7, 2025
@mcmonkey4eva
Copy link
Member

They need to appended, not prepended

@jtreminio
Copy link
Contributor Author

jtreminio commented Nov 7, 2025

They need to appended, not prepended

done:

<segment:face,0.6,0.5> generation_prompt_here<param[segment_sampler]:heunpp2> <param[segment_scheduler]:turbo>

@jtreminio
Copy link
Contributor Author

Leaving previous comment, but what's inserted now is prepended with space:

<segment:face,0.6,0.5> generation_prompt <param[segment_sampler]:euler> <param[segment_scheduler]:normal>

@mcmonkey4eva
Copy link
Member

mcmonkey4eva commented Nov 7, 2025

I'd do <segment:etc><param><param> text etc

The important bit is being after <segment:> as that makes it actually apply to the segment, place relative to text is just what looks nicer, and imo chunk the technical bits into one block

@jtreminio
Copy link
Contributor Author

Now:

<segment:face,0.6,0.5><param[segment_sampler]:euler><param[segment_scheduler]:normal> foobar

@jtreminio
Copy link
Contributor Author

Not ready to merge, I think. I'm getting:

0: Parameter 'segment_sampler' does not exist and will be ignored.,
1: Parameter 'segment_scheduler' does not exist and will be ignored.```

but comfyui sees the data ... and maybe getting overridden later on. Will add screenshots in a bit.

@mcmonkey4eva
Copy link
Member

sampler not segment_sampler

@jtreminio
Copy link
Contributor Author

Young Mexican woman, smiling, looking at viewer.
Outside, sunny, park, lake.
Closeup photography, RAW photo.

<segment:face,0.2,0.2><param[sampler]:dpmpp_2m_sde><param[scheduler]:karras> masterpiece, best quality
<segment:hair,0.2,0.2><param[sampler]:dpmpp_2m_sde><param[scheduler]:karras> masterpiece, best quality
0908001-Young Mexican woman, smiling, looking at-chromaChroma1-HD-GGUF---FP8_-_fp8_scale

@jtreminio
Copy link
Contributor Author

The only thing I can't figure out is how to get "Segment Sampler" and Segment Scheduler" to show up in the metadata portion:

CleanShot 2025-11-08 at 09 14 32

This would work fine when using <param[segment_sampler] and <param[segment_scheduler] but not when I remove segment_

"normal", Toggleable: true, FeatureFlag: "comfyui", Group: T2IParamTypes.GroupRefinerOverrides, OrderPriority: -1.5,
GetValues: (_) => Schedulers
));
SegmentSamplerParam = T2IParamTypes.Register<string>(new("Segment Sampler", SamplerParam.Type.Description + "\nThis is an override to only affect the Segment stage.",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reiterate: these params should not exist

setupDropdown('input_sampler', this.segmentModalSampler, 'text_prompt_segment_sampler_toggle');
setupDropdown('input_scheduler', this.segmentModalScheduler, 'text_prompt_segment_scheduler_toggle');
}
catch (e) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eh? what's this empty catch?

long seed = g.UserInput.Get(T2IParamTypes.Seed) + 2 + i;
double cfg = g.UserInput.GetNullable(T2IParamTypes.CFGScale, part.ContextID, false) ?? g.UserInput.GetNullable(T2IParamTypes.SegmentCFGScale, part.ContextID) ?? g.UserInput.GetNullable(T2IParamTypes.RefinerCFGScale, part.ContextID) ?? g.UserInput.Get(T2IParamTypes.CFGScale, 7, sectionId: part.ContextID);
string sampler = g.CreateKSampler(model, prompt, negPrompt, [g.MaskShrunkInfo.MaskedLatent, 0], cfg, steps, startStep, 10000, seed, false, true, sectionId: part.ContextID);
string explicitSampler = g.UserInput.Get(ComfyUIBackendExtension.SamplerParam, null, sectionId: part.ContextID, includeBase: false);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is needed? should already be grabbing the correct sampler in existing code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants