Sample Klein edits from source and bind Studio 2 extensions correctly
This commit is contained in:
@@ -34,6 +34,16 @@ export function attachHeroReference(g, image) {
|
||||
}
|
||||
return g
|
||||
}
|
||||
export function sampleKleinSource(graph, denoise = .65) {
|
||||
if (!graph['11'] || !graph['19'] || !graph['17']) throw new Error('Klein source sampling nodes are missing.')
|
||||
graph['19'].inputs.latent_image=['11',0]
|
||||
delete graph['14']
|
||||
const steps=graph['17'].inputs.steps
|
||||
graph['17'].inputs.steps=Math.ceil(steps/denoise)
|
||||
graph.source_sigmas={class_type:'SplitSigmasDenoise',inputs:{sigmas:['17',0],denoise}}
|
||||
graph['19'].inputs.sigmas=['source_sigmas',1]
|
||||
return graph
|
||||
}
|
||||
/** The shared image builders have their own defaults and megapixel scalers.
|
||||
* Studio 2 must send its already resolved canvas size through those nodes. */
|
||||
export function applyResolvedImageSize(graph, {width,height}) {
|
||||
|
||||
Reference in New Issue
Block a user