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
8d66827b
Commit
8d66827b
authored
Mar 25, 2023
by
comfyanonymous
Browse files
Merge branch 'slot-color' of
https://github.com/jn-jairo/ComfyUI
parents
58695f9c
070b5749
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
web/scripts/app.js
web/scripts/app.js
+23
-0
No files found.
web/scripts/app.js
View file @
8d66827b
...
@@ -486,6 +486,27 @@ class ComfyApp {
...
@@ -486,6 +486,27 @@ class ComfyApp {
}
}
}
}
/**
* Setup slot colors for types
*/
setupSlotColors
()
{
let
colors
=
{
"
CLIP
"
:
"
#556B2F
"
,
// Olive green
"
CLIP_VISION
"
:
"
#4B0082
"
,
// Dark purple
"
CLIP_VISION_OUTPUT
"
:
"
#006400
"
,
// Dark green
"
CONDITIONING
"
:
"
#FF1493
"
,
// Deep pink
"
CONTROL_NET
"
:
"
#8B4513
"
,
// Dark brown
"
IMAGE
"
:
"
#8B0000
"
,
// Dark red
"
LATENT
"
:
"
#00008B
"
,
// Dark blue
"
MASK
"
:
"
#2F4F4F
"
,
// Dark gray
"
MODEL
"
:
"
#FF8C00
"
,
// Dark orange
"
STYLE_MODEL
"
:
"
#004A4A
"
,
// Dark teal
"
VAE
"
:
"
#4F394F
"
,
// Dark plum
};
Object
.
assign
(
this
.
canvas
.
default_connection_color_byType
,
colors
);
}
/**
/**
* Set up the app on the page
* Set up the app on the page
*/
*/
...
@@ -501,6 +522,8 @@ class ComfyApp {
...
@@ -501,6 +522,8 @@ class ComfyApp {
const
canvas
=
(
this
.
canvas
=
new
LGraphCanvas
(
canvasEl
,
this
.
graph
));
const
canvas
=
(
this
.
canvas
=
new
LGraphCanvas
(
canvasEl
,
this
.
graph
));
this
.
ctx
=
canvasEl
.
getContext
(
"
2d
"
);
this
.
ctx
=
canvasEl
.
getContext
(
"
2d
"
);
this
.
setupSlotColors
();
this
.
graph
.
start
();
this
.
graph
.
start
();
function
resizeCanvas
()
{
function
resizeCanvas
()
{
...
...
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