@@ -415,7 +415,7 @@ export class ComfyApp {
415
415
node . prototype . setSizeForImage = function ( force ) {
416
416
if ( ! force && this . animatedImages ) return ;
417
417
418
- if ( this . inputHeight ) {
418
+ if ( this . inputHeight || this . freeWidgetSpace > 210 ) {
419
419
this . setSize ( this . size ) ;
420
420
return ;
421
421
}
@@ -1883,6 +1883,8 @@ export class ComfyApp {
1883
1883
if ( pngInfo ) {
1884
1884
if ( pngInfo . workflow ) {
1885
1885
await this . loadGraphData ( JSON . parse ( pngInfo . workflow ) ) ;
1886
+ } else if ( pngInfo . prompt ) {
1887
+ this . loadApiJson ( JSON . parse ( pngInfo . prompt ) ) ;
1886
1888
} else if ( pngInfo . parameters ) {
1887
1889
importA1111 ( this . graph , pngInfo . parameters ) ;
1888
1890
}
@@ -1894,6 +1896,8 @@ export class ComfyApp {
1894
1896
this . loadGraphData ( JSON . parse ( pngInfo . workflow ) ) ;
1895
1897
} else if ( pngInfo . Workflow ) {
1896
1898
this . loadGraphData ( JSON . parse ( pngInfo . Workflow ) ) ; // Support loading workflows from that webp custom node.
1899
+ } else if ( pngInfo . prompt ) {
1900
+ this . loadApiJson ( JSON . parse ( pngInfo . prompt ) ) ;
1897
1901
}
1898
1902
}
1899
1903
} else if ( file . type === "application/json" || file . name ?. endsWith ( ".json" ) ) {
@@ -1913,6 +1917,8 @@ export class ComfyApp {
1913
1917
const info = await getLatentMetadata ( file ) ;
1914
1918
if ( info . workflow ) {
1915
1919
await this . loadGraphData ( JSON . parse ( info . workflow ) ) ;
1920
+ } else if ( info . prompt ) {
1921
+ this . loadApiJson ( JSON . parse ( info . prompt ) ) ;
1916
1922
}
1917
1923
}
1918
1924
}
0 commit comments