Add optional reference photo conditioning to Flux generation
This commit is contained in:
@@ -1149,6 +1149,9 @@ async function startStudioEditJob(item: StudioJob) {
|
||||
}
|
||||
: null
|
||||
const refId = payload.referenceStillId
|
||||
if (refId && !existsSync(stillPath(item.ownerKey, refId))) {
|
||||
throw new Error('The reference photo is missing from the library')
|
||||
}
|
||||
const reference = refId && existsSync(stillPath(item.ownerKey, refId))
|
||||
? {
|
||||
filename: payload.referenceStillFilename || 'image2.png',
|
||||
@@ -1230,7 +1233,7 @@ async function startStudioEditJob(item: StudioJob) {
|
||||
engine: v2Engine,
|
||||
task: payload.v2Task || (graphMode === 'generate' ? 't2i' : 'scene'),
|
||||
image: graphMode === 'generate' ? null : image,
|
||||
reference: graphMode === 'compose' ? reference : null,
|
||||
reference: graphMode === 'compose' || (graphMode === 'generate' && v2Engine === 'flux') ? reference : null,
|
||||
mask,
|
||||
prompt: payload.prompt,
|
||||
negative: payload.negative || '',
|
||||
|
||||
Reference in New Issue
Block a user