mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-01-25 15:55:18 +00:00
robust paste for image
This commit is contained in:
parent
70e02b443f
commit
28677342c1
@ -165,7 +165,16 @@ export class ComfyApp {
|
|||||||
if(ComfyApp.clipspace.widgets) {
|
if(ComfyApp.clipspace.widgets) {
|
||||||
ComfyApp.clipspace.widgets.forEach(({ type, name, value }) => {
|
ComfyApp.clipspace.widgets.forEach(({ type, name, value }) => {
|
||||||
const prop = Object.values(node.widgets).find(obj => obj.type === type && obj.name === name);
|
const prop = Object.values(node.widgets).find(obj => obj.type === type && obj.name === name);
|
||||||
if (prop && prop.type != 'button') {
|
if (prop && prop.type != 'image') {
|
||||||
|
if(typeof prop.value == "string" && value.filename) {
|
||||||
|
prop.value = (value.subfolder?value.subfolder+'/':'') + value.filename + (value.type?` [${value.type}]`:'');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
prop.value = value;
|
||||||
|
prop.callback(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (prop && prop.type != 'button') {
|
||||||
prop.value = value;
|
prop.value = value;
|
||||||
prop.callback(value);
|
prop.callback(value);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user