Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
ComfyUI
Commits
b2517b4c
Commit
b2517b4c
authored
Dec 02, 2023
by
comfyanonymous
Browse files
Load api workflow if regular workflow isn't in loaded image.
parent
88e2c974
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
web/scripts/app.js
web/scripts/app.js
+6
-0
No files found.
web/scripts/app.js
View file @
b2517b4c
...
...
@@ -1878,6 +1878,8 @@ export class ComfyApp {
if
(
pngInfo
)
{
if
(
pngInfo
.
workflow
)
{
await
this
.
loadGraphData
(
JSON
.
parse
(
pngInfo
.
workflow
));
}
else
if
(
pngInfo
.
prompt
)
{
this
.
loadApiJson
(
JSON
.
parse
(
pngInfo
.
prompt
));
}
else
if
(
pngInfo
.
parameters
)
{
importA1111
(
this
.
graph
,
pngInfo
.
parameters
);
}
...
...
@@ -1889,6 +1891,8 @@ export class ComfyApp {
this
.
loadGraphData
(
JSON
.
parse
(
pngInfo
.
workflow
));
}
else
if
(
pngInfo
.
Workflow
)
{
this
.
loadGraphData
(
JSON
.
parse
(
pngInfo
.
Workflow
));
// Support loading workflows from that webp custom node.
}
else
if
(
pngInfo
.
prompt
)
{
this
.
loadApiJson
(
JSON
.
parse
(
pngInfo
.
prompt
));
}
}
}
else
if
(
file
.
type
===
"
application/json
"
||
file
.
name
?.
endsWith
(
"
.json
"
))
{
...
...
@@ -1908,6 +1912,8 @@ export class ComfyApp {
const
info
=
await
getLatentMetadata
(
file
);
if
(
info
.
workflow
)
{
await
this
.
loadGraphData
(
JSON
.
parse
(
info
.
workflow
));
}
else
if
(
info
.
prompt
)
{
this
.
loadApiJson
(
JSON
.
parse
(
info
.
prompt
));
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment