Let MOSS use the same LoRA picker and chain those adapters onto its graph.
The picker was hidden and the API cleared every stack, so a selected MOSS job could not carry a LoRA. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -662,6 +662,7 @@ function buildMossGenerateWorkflow(params: ImageV2BuildParams) {
|
||||
setInput(graph, SAVE, 'filename_prefix', params.filenamePrefix || 'v2-moss')
|
||||
|
||||
assertImageV2Graph(graph, 'generate', undefined, 'moss')
|
||||
const userLoras = applyImageV2UserLoras(graph, imageV2UserStack(params, 'moss'), 'moss')
|
||||
const loaders = loadImageNames(graph)
|
||||
console.log(JSON.stringify({
|
||||
src: 'image-v2',
|
||||
@@ -678,6 +679,7 @@ function buildMossGenerateWorkflow(params: ImageV2BuildParams) {
|
||||
},
|
||||
shift: IMAGE_V2_MOSS_SHIFT,
|
||||
slg: IMAGE_V2_MOSS_SLG_LAYER,
|
||||
loras: { user: userLoras },
|
||||
upsampler: false,
|
||||
steps,
|
||||
cfg,
|
||||
|
||||
@@ -440,7 +440,6 @@ function linkRef(value: unknown): [string, number] | null {
|
||||
}
|
||||
|
||||
export function assertImageV2LoraStack(stack: unknown, engine: 'flux' | 'krea' | 'moss') {
|
||||
if (engine === 'moss') return []
|
||||
const items = normalizeLoraStack(stack)
|
||||
const wrong = items.find((item) => {
|
||||
const tagged = imageLoraEngineOf(item.name)
|
||||
@@ -482,7 +481,7 @@ function clipConsumers(graph: WorkflowGraph) {
|
||||
export function applyImageV2UserLoras(
|
||||
graph: WorkflowGraph,
|
||||
stack?: unknown,
|
||||
engine: 'flux' | 'krea' = 'flux'
|
||||
engine: 'flux' | 'krea' | 'moss' = 'flux'
|
||||
) {
|
||||
stripExistingLoraLoaders(graph)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user