Compare commits

...

1 Commits

Author SHA1 Message Date
Terry Jia
170b2dfb7b fix(load3d): load Preview3DAdvanced output from temp/, allow temp loadFolder 2026-06-04 22:30:45 -04:00
4 changed files with 10 additions and 6 deletions

View File

@@ -725,7 +725,7 @@ describe('Comfy.Preview3DAdvanced.nodeCreated', () => {
await preview3DAdvancedExt.nodeCreated(node)
expect(configureForSaveMeshMock).toHaveBeenCalledWith(
'output',
'temp',
'prev/model.glb',
{ silentOnNotFound: true }
)
@@ -851,7 +851,7 @@ describe('Comfy.Preview3DAdvanced.nodeCreated', () => {
expect(node.properties['Last Time Model File']).toBe('sub/nested/mesh.glb')
expect(configureForSaveMeshMock).toHaveBeenCalledWith(
'output',
'temp',
'sub/nested/mesh.glb',
{ silentOnNotFound: true }
)

View File

@@ -688,7 +688,7 @@ useExtensionService().registerExtension({
if (!lastTimeModelFile) return
const config = new Load3DConfiguration(load3d, node.properties)
config.configureForSaveMesh('output', lastTimeModelFile as string, {
config.configureForSaveMesh('temp', lastTimeModelFile as string, {
silentOnNotFound: true
})
@@ -782,7 +782,7 @@ useExtensionService().registerExtension({
const currentLoad3d = resolveLoad3d()
const config = new Load3DConfiguration(currentLoad3d, node.properties)
config.configureForSaveMesh('output', normalizedPath, {
config.configureForSaveMesh('temp', normalizedPath, {
silentOnNotFound: true
})

View File

@@ -46,7 +46,7 @@ class Load3DConfiguration {
) {}
configureForSaveMesh(
loadFolder: 'input' | 'output',
loadFolder: 'input' | 'output' | 'temp',
filePath: string,
options?: { silentOnNotFound?: boolean }
) {

View File

@@ -191,7 +191,11 @@ export class LoaderManager implements LoaderManagerInterface {
return null
}
const loadRootFolder = params.get('type') === 'output' ? 'output' : 'input'
const requestedType = params.get('type')
const loadRootFolder =
requestedType === 'output' || requestedType === 'temp'
? requestedType
: 'input'
const subfolder = params.get('subfolder') ?? ''
const path =
'api/view?type=' +