mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-05-08 08:12:34 +08:00
216 lines
52 KiB
JavaScript
216 lines
52 KiB
JavaScript
const WC_VARIABLES = {
|
|
mainWidth : 100,
|
|
selectWidth : 300,
|
|
textColor: 'var(--fg-color)',
|
|
bgMain : 'var(--bg-color)',
|
|
itemColor: 'var(--item-color)',
|
|
borderColor : 'var(--fg-color)',
|
|
selectedColor : 'var(--sel-color)',
|
|
defaultCollection : [{"name":"Default txt2img","graph":"{\"last_node_id\":9,\"last_link_id\":9,\"nodes\":[{\"id\":7,\"type\":\"CLIPTextEncode\",\"pos\":[413,389],\"size\":{\"0\":425.27801513671875,\"1\":180.6060791015625},\"flags\":{},\"order\":3,\"mode\":0,\"inputs\":[{\"name\":\"clip\",\"type\":\"CLIP\",\"link\":5}],\"outputs\":[{\"name\":\"CONDITIONING\",\"type\":\"CONDITIONING\",\"links\":[6],\"slot_index\":0}],\"properties\":{},\"widgets_values\":[\"bad hands\"]},{\"id\":6,\"type\":\"CLIPTextEncode\",\"pos\":[415,186],\"size\":{\"0\":422.84503173828125,\"1\":164.31304931640625},\"flags\":{},\"order\":2,\"mode\":0,\"inputs\":[{\"name\":\"clip\",\"type\":\"CLIP\",\"link\":3}],\"outputs\":[{\"name\":\"CONDITIONING\",\"type\":\"CONDITIONING\",\"links\":[4],\"slot_index\":0}],\"properties\":{},\"widgets_values\":[\"masterpiece best quality girl\"]},{\"id\":5,\"type\":\"EmptyLatentImage\",\"pos\":[473,609],\"size\":{\"0\":315,\"1\":106},\"flags\":{},\"order\":0,\"mode\":0,\"outputs\":[{\"name\":\"LATENT\",\"type\":\"LATENT\",\"links\":[2],\"slot_index\":0}],\"properties\":{},\"widgets_values\":[512,512,1]},{\"id\":3,\"type\":\"KSampler\",\"pos\":[863,186],\"size\":{\"0\":315,\"1\":262},\"flags\":{},\"order\":4,\"mode\":0,\"inputs\":[{\"name\":\"model\",\"type\":\"MODEL\",\"link\":1},{\"name\":\"positive\",\"type\":\"CONDITIONING\",\"link\":4},{\"name\":\"negative\",\"type\":\"CONDITIONING\",\"link\":6},{\"name\":\"latent_image\",\"type\":\"LATENT\",\"link\":2}],\"outputs\":[{\"name\":\"LATENT\",\"type\":\"LATENT\",\"links\":[7],\"slot_index\":0}],\"properties\":{},\"widgets_values\":[8566257,true,20,8,\"euler\",\"normal\",1]},{\"id\":8,\"type\":\"VAEDecode\",\"pos\":[1209,188],\"size\":{\"0\":210,\"1\":46},\"flags\":{},\"order\":5,\"mode\":0,\"inputs\":[{\"name\":\"samples\",\"type\":\"LATENT\",\"link\":7},{\"name\":\"vae\",\"type\":\"VAE\",\"link\":8}],\"outputs\":[{\"name\":\"IMAGE\",\"type\":\"IMAGE\",\"links\":[9],\"slot_index\":0}],\"properties\":{}},{\"id\":9,\"type\":\"SaveImage\",\"pos\":[1451,189],\"size\":{\"0\":210,\"1\":58},\"flags\":{},\"order\":6,\"mode\":0,\"inputs\":[{\"name\":\"images\",\"type\":\"IMAGE\",\"link\":9}],\"properties\":{},\"widgets_values\":[\"ComfyUI\"]},{\"id\":4,\"type\":\"CheckpointLoaderSimple\",\"pos\":[26,474],\"size\":{\"0\":315,\"1\":98},\"flags\":{},\"order\":1,\"mode\":0,\"outputs\":[{\"name\":\"MODEL\",\"type\":\"MODEL\",\"links\":[1],\"slot_index\":0},{\"name\":\"CLIP\",\"type\":\"CLIP\",\"links\":[3,5],\"slot_index\":1},{\"name\":\"VAE\",\"type\":\"VAE\",\"links\":[8],\"slot_index\":2}],\"properties\":{},\"widgets_values\":[\"v1-5-pruned-emaonly.ckpt\"]}],\"links\":[[1,4,0,3,0,\"MODEL\"],[2,5,0,3,3,\"LATENT\"],[3,4,1,6,0,\"CLIP\"],[4,6,0,3,1,\"CONDITIONING\"],[5,4,1,7,0,\"CLIP\"],[6,7,0,3,2,\"CONDITIONING\"],[7,3,0,8,0,\"LATENT\"],[8,4,2,8,1,\"VAE\"],[9,8,0,9,0,\"IMAGE\"],[null,null,null,null,null,null],[null,null,null,null,null,null]],\"groups\":[],\"config\":{},\"extra\":{},\"version\":0.4}"},{"name":null,"graph":"{\"last_node_id\":9,\"last_link_id\":9,\"nodes\":[{\"id\":7,\"type\":\"CLIPTextEncode\",\"pos\":[413,389],\"size\":{\"0\":425.27801513671875,\"1\":180.6060791015625},\"flags\":{},\"order\":3,\"mode\":0,\"inputs\":[{\"name\":\"clip\",\"type\":\"CLIP\",\"link\":5}],\"outputs\":[{\"name\":\"CONDITIONING\",\"type\":\"CONDITIONING\",\"links\":[6],\"slot_index\":0}],\"properties\":{},\"widgets_values\":[\"bad hands\"]},{\"id\":6,\"type\":\"CLIPTextEncode\",\"pos\":[415,186],\"size\":{\"0\":422.84503173828125,\"1\":164.31304931640625},\"flags\":{},\"order\":2,\"mode\":0,\"inputs\":[{\"name\":\"clip\",\"type\":\"CLIP\",\"link\":3}],\"outputs\":[{\"name\":\"CONDITIONING\",\"type\":\"CONDITIONING\",\"links\":[4],\"slot_index\":0}],\"properties\":{},\"widgets_values\":[\"masterpiece best quality girl\"]},{\"id\":5,\"type\":\"EmptyLatentImage\",\"pos\":[473,609],\"size\":{\"0\":315,\"1\":106},\"flags\":{},\"order\":0,\"mode\":0,\"outputs\":[{\"name\":\"LATENT\",\"type\":\"LATENT\",\"links\":[2],\"slot_index\":0}],\"properties\":{},\"widgets_values\":[512,512,1]},{\"id\":3,\"type\":\"KSampler\",\"pos\":[863,186],\"size\":{\"0\":315,\"1\":262},\"flags\":{},\"order\":4,\"mode\":0,\"inputs\":[{\"name\":\"model\",\"type\":\"MODEL\",\"link\":1},{\"name\":\"positive\",\"type\":\"CONDITIONING\",\"link\":4},{\"name\":\"negative\",\"type\":\"CONDITIONING\",\"link\":6},{\"name\":\"latent_image\",\"type\":\"LATENT\",\"link\":2}],\"outputs\":[{\"name\":\"LATENT\",\"type\":\"LATENT\",\"links\":[7],\"slot_index\":0}],\"properties\":{},\"widgets_values\":[8566257,true,20,8,\"euler\",\"normal\",1]},{\"id\":8,\"type\":\"VAEDecode\",\"pos\":[1209,188],\"size\":{\"0\":210,\"1\":46},\"flags\":{},\"order\":5,\"mode\":0,\"inputs\":[{\"name\":\"samples\",\"type\":\"LATENT\",\"link\":7},{\"name\":\"vae\",\"type\":\"VAE\",\"link\":8}],\"outputs\":[{\"name\":\"IMAGE\",\"type\":\"IMAGE\",\"links\":[9],\"slot_index\":0}],\"properties\":{}},{\"id\":9,\"type\":\"SaveImage\",\"pos\":[1451,189],\"size\":{\"0\":210,\"1\":58},\"flags\":{},\"order\":6,\"mode\":0,\"inputs\":[{\"name\":\"images\",\"type\":\"IMAGE\",\"link\":9}],\"properties\":{},\"widgets_values\":[\"ComfyUI\"]},{\"id\":4,\"type\":\"CheckpointLoaderSimple\",\"pos\":[26,474],\"size\":{\"0\":315,\"1\":98},\"flags\":{},\"order\":1,\"mode\":0,\"outputs\":[{\"name\":\"MODEL\",\"type\":\"MODEL\",\"links\":[1],\"slot_index\":0},{\"name\":\"CLIP\",\"type\":\"CLIP\",\"links\":[3,5],\"slot_index\":1},{\"name\":\"VAE\",\"type\":\"VAE\",\"links\":[8],\"slot_index\":2}],\"properties\":{},\"widgets_values\":[\"v1-5-pruned-emaonly.ckpt\"]}],\"links\":[[1,4,0,3,0,\"MODEL\"],[2,5,0,3,3,\"LATENT\"],[3,4,1,6,0,\"CLIP\"],[4,6,0,3,1,\"CONDITIONING\"],[5,4,1,7,0,\"CLIP\"],[6,7,0,3,2,\"CONDITIONING\"],[7,3,0,8,0,\"LATENT\"],[8,4,2,8,1,\"VAE\"],[9,8,0,9,0,\"IMAGE\"],[null,null,null,null,null,null],[null,null,null,null,null,null]],\"groups\":[],\"config\":{},\"extra\":{},\"version\":0.4}"},{"name":"Area composition","graph":"{\"last_node_id\":28,\"last_link_id\":42,\"nodes\":[{\"id\":3,\"type\":\"CLIPTextEncode\",\"pos\":[-812.4973481399987,385.41009769999977],\"size\":{\"0\":446.56036376953125,\"1\":154.70550537109375},\"flags\":{},\"order\":8,\"mode\":0,\"inputs\":[{\"name\":\"clip\",\"type\":\"CLIP\",\"link\":8}],\"outputs\":[{\"name\":\"CONDITIONING\",\"type\":\"CONDITIONING\",\"links\":[2],\"slot_index\":0}],\"title\":\"MID-TOP - 2/4 : Prompt\",\"properties\":{},\"widgets_values\":[\"evening sunset skies without the sun hot oranges to pastel purple gradients\"],\"color\":\"#322\",\"bgcolor\":\"#533\"},{\"id\":5,\"type\":\"CLIPTextEncode\",\"pos\":[-814.4973481399987,597.4100976999994],\"size\":{\"0\":446.56036376953125,\"1\":154.70550537109375},\"flags\":{},\"order\":9,\"mode\":0,\"inputs\":[{\"name\":\"clip\",\"type\":\"CLIP\",\"link\":9,\"slot_index\":0}],\"outputs\":[{\"name\":\"CONDITIONING\",\"type\":\"CONDITIONING\",\"links\":[3],\"slot_index\":0}],\"title\":\"MID-BOTTOM 3/4 : Prompt\",\"properties\":{},\"widgets_values\":[\"sapphire blue skies with faint cumulous clouds deep in the background\"],\"color\":\"#322\",\"bgcolor\":\"#533\"},{\"id\":26,\"type\":\"SaveImage\",\"pos\":[3196,-111],\"size\":{\"0\":1124.9013671875,\"1\":2007.5218505859375},\"flags\":{},\"order\":25,\"mode\":0,\"inputs\":[{\"name\":\"images\",\"type\":\"IMAGE\",\"link\":37,\"slot_index\":0}],\"title\":\"MAIN - Area Composition\",\"properties\":{},\"widgets_values\":[\"MAIN - Area Composition - Atlas\"],\"color\":\"#232\",\"bgcolor\":\"#353\"},{\"id\":27,\"type\":\"CheckpointLoader\",\"pos\":[795,-143],\"size\":{\"0\":315,\"1\":122},\"flags\":{},\"order\":0,\"mode\":0,\"outputs\":[{\"name\":\"MODEL\",\"type\":\"MODEL\",\"links\":[38],\"slot_index\":0},{\"name\":\"CLIP\",\"type\":\"CLIP\",\"links\":[39,40],\"slot_index\":1},{\"name\":\"VAE\",\"type\":\"VAE\",\"links\":null}],\"properties\":{},\"widgets_values\":[\"v1-inference_clip_skip_2.yaml\",\"dreamlike-diffusion-1.0.ckpt\"],\"color\":\"#232\",\"bgcolor\":\"#353\"},{\"id\":20,\"type\":\"SaveImage\",\"pos\":[1943,284],\"size\":{\"0\":491.4075927734375,\"1\":935.403564453125},\"flags\":{},\"order\":22,\"mode\":0,\"inputs\":[{\"name\":\"images\",\"type\":\"IMAGE\",\"link\":30}],\"properties\":{},\"widgets_values\":[\"Area Composition - Atlas\"],\"color\":\"#432\",\"bgcolor\":\"#653\"},{\"id\":23,\"type\":\"KSampler\",\"pos\":[1979,-143],\"size\":{\"0\":318.0801086425781,\"1\":262},\"flags\":{},\"order\":23,\"mode\":0,\"inputs\":[{\"name\":\"model\",\"type\":\"MODEL\",\"link\":38},{\"name\":\"positive\",\"type\":\"CONDITIONING\",\"link\":31},{\"name\":\"negative\",\"type\":\"CONDITIONING\",\"link\":32},{\"name\":\"latent_image\",\"type\":\"LATENT\",\"link\":34}],\"outputs\":[{\"name\":\"LATENT\",\"type\":\"LATENT\",\"links\":[35],\"slot_index\":0}],\"properties\":{},\"widgets_values\":[483957472548012,true,20,8.5,\"dpmpp_2m\",\"simple\",1],\"color\":\"#232\",\"bgcolor\":\"#353\"},{\"id\":21,\"type\":\"CLIPTextEncode\",\"pos\":[1322,-58],\"size\":{\"0\":444.1192932128906,\"1\":182.81419372558594},\"flags\":{},\"order\":3,\"mode\":0,\"inputs\":[{\"name\":\"clip\",\"type\":\"CLIP\",\"link\":39}],\"outputs\":[{\"name\":\"CONDITIONING\",\"type\":\"CONDITIONING\",\"links\":[31],\"slot_index\":0}],\"title\":\"Prompt - Final\",\"properties\":{},\"widgets_values\":[\"a beautiful nature scene with mountains with forest and ocean beach at base with big beautiful sky with galaxies stars sunrise sunset\"],\"color\":\"#232\",\"bgcolor\":\"#353\"},{\"id\":22,\"type\":\"CLIPTextEncode\",\"pos\":[1325,179],\"size\":{\"0\":444.36114501953125,\"1\":185.03204345703125},\"flags\":{},\"order\":4,\"mode\":0,\"inputs\":[{\"name\":\"clip\",\"type\":\"CLIP\",\"link\":40,\"slot_index\":0}],\"outputs\":[{\"name\":\"CONDITIONING\",\"type\":\"CONDITIONING\",\"links\":[32],\"slot_index\":0}],\"title\":\"Negative Prompt - Final\",\"properties\":{},\"widgets_values\":[\"text, cropped, signature, watermark, username, blurry, sketch, split screen\"],\"color\":\"#232\",\"bgcolor\":\"#353\"},{\"id\":24,\"type\":\"LatentUpscale\",\"pos\":[1403,437],\"size\":{\"0\":315,\"1\":130},\"flags\":{},\"order\":21,\"mode\":0,\"inputs\":[{\"name\":\"samples\",\"type\":\"LATENT\",\"link\":33}],\"outputs\":[{\"name\":\"LATENT\",\"type\":\"LATENT\",\"links\":[34],\"slot_index\":0}],\"properties\":{},\"widgets_values\":[\"nearest-exact\",1088,1920,\"disabled\"],\"color\":\"#232\",\"bgcolor\":\"#353\"},{\"id\":1,\"type\":\"CLIPTextEncode\",\"pos\":[-805,179],\"size\":{\"0\":446.56036376953125,\"1\":154.70550537109375},\"flags\":{},\"order\":10,\"mode\":0,\"inputs\":[{\"name\":\"clip\",\"type\":\"CLIP\",\"link\":10,\"slot_index\":0}],\"outputs\":[{\"name\":\"CONDITIONING\",\"type\":\"CONDITIONING\",\"links\":[1],\"slot_index\":0}],\"title\":\"TOP - 1/4 : Prompt\",\"properties\":{},\"widgets_values\":[\"the stary sky with faint galactic nebula\"],\"color\":\"#322\",\"bgcolor\":\"#533\"},{\"id\":10,\"type\":\"CLIPTextEncode\",\"pos\":[-822,1029],\"size\":{\"0\":444.1192932128906,\"1\":182.81419372558594},\"flags\":{},\"order\":5,\"mode\":0,\"inputs\":[{\"name\":\"clip\",\"type\":\"CLIP\",\"link\":5}],\"outputs\":[{\"name\":\"CONDITIONING\",\"type\":\"CONDITIONING\",\"links\":[25],\"slot_index\":0}],\"title\":\"Prompt - Main\",\"properties\":{},\"widgets_values\":[\"a beautiful nature scene with mountains with forest and ocean beach at base with big beautiful sky with galaxies stars sunrise sunset\"],\"color\":\"#432\",\"bgcolor\":\"#653\"},{\"id\":2,\"type\":\"ConditioningSetArea\",\"pos\":[-346,179],\"size\":{\"0\":317.4000244140625,\"1\":154},\"flags\":{},\"order\":14,\"mode\":0,\"inputs\":[{\"name\":\"conditioning\",\"type\":\"CONDITIONING\",\"link\":1}],\"outputs\":[{\"name\":\"CONDITIONING\",\"type\":\"CONDITIONING\",\"links\":[14],\"slot_index\":0}],\"properties\":{},\"widgets_values\":[704,384,0,0,1],\"color\":\"#322\",\"bgcolor\":\"#533\"},{\"id\":4,\"type\":\"ConditioningSetArea\",\"pos\":[-349,386],\"size\":{\"0\":317.4000244140625,\"1\":154},\"flags\":{},\"order\":12,\"mode\":0,\"inputs\":[{\"name\":\"conditioning\",\"type\":\"CONDITIONING\",\"link\":2,\"slot_index\":0}],\"outputs\":[{\"name\":\"CONDITIONING\",\"type\":\"CONDITIONING\",\"links\":[15]}],\"properties\":{},\"widgets_values\":[704,384,0,320,1],\"color\":\"#322\",\"bgcolor\":\"#533\"},{\"id\":6,\"type\":\"ConditioningSetArea\",\"pos\":[-354,599],\"size\":{\"0\":317.4000244140625,\"1\":154},\"flags\":{},\"order\":13,\"mode\":0,\"inputs\":[{\"name\":\"conditioning\",\"type\":\"CONDITIONING\",\"link\":3}],\"outputs\":[{\"name\":\"CONDITIONING\",\"type\":\"CONDITIONING\",\"links\":[17],\"slot_index\":0}],\"properties\":{},\"widgets_values\":[704,384,0,512,1],\"color\":\"#322\",\"bgcolor\":\"#533\"},{\"id\":8,\"type\":\"ConditioningSetArea\",\"pos\":[-357,810],\"size\":{\"0\":317.4000244140625,\"1\":154},\"flags\":{},\"order\":11,\"mode\":0,\"inputs\":[{\"name\":\"conditioning\",\"type\":\"CONDITIONING\",\"link\":4,\"slot_index\":0}],\"outputs\":[{\"name\":\"CONDITIONING\",\"type\":\"CONDITIONING\",\"links\":[22],\"slot_index\":0}],\"properties\":{},\"widgets_values\":[704,384,0,704,1],\"color\":\"#322\",\"bgcolor\":\"#533\"},{\"id\":14,\"type\":\"ConditioningCombine\",\"pos\":[-8,278],\"size\":{\"0\":342.5999755859375,\"1\":46},\"flags\":{},\"order\":16,\"mode\":0,\"inputs\":[{\"name\":\"conditioning_1\",\"type\":\"CONDITIONING\",\"link\":14},{\"name\":\"conditioning_2\",\"type\":\"CONDITIONING\",\"link\":15,\"slot_index\":1}],\"outputs\":[{\"name\":\"CONDITIONING\",\"type\":\"CONDITIONING\",\"links\":[16],\"slot_index\":0}],\"properties\":{},\"color\":\"#322\",\"bgcolor\":\"#533\"},{\"id\":15,\"type\":\"ConditioningCombine\",\"pos\":[367,580],\"size\":{\"0\":342.5999755859375,\"1\":250},\"flags\":{},\"order\":17,\"mode\":0,\"inputs\":[{\"name\":\"conditioning_1\",\"type\":\"CONDITIONING\",\"link\":16},{\"name\":\"conditioning_2\",\"type\":\"CONDITIONING\",\"link\":17}],\"outputs\":[{\"name\":\"CONDITIONING\",\"type\":\"CONDITIONING\",\"links\":[24],\"slot_index\":0}],\"properties\":{},\"color\":\"#322\",\"bgcolor\":\"#533\"},{\"id\":17,\"type\":\"ConditioningCombine\",\"pos\":[742,776],\"size\":{\"0\":342.5999755859375,\"1\":46},\"flags\":{},\"order\":18,\"mode\":0,\"inputs\":[{\"name\":\"conditioning_1\",\"type\":\"CONDITIONING\",\"link\":24},{\"name\":\"conditioning_2\",\"type\":\"CONDITIONING\",\"link\":26}],\"outputs\":[{\"name\":\"CONDITIONING\",\"type\":\"CONDITIONING\",\"links\":[27],\"slot_index\":0}],\"properties\":{},\"color\":\"#322\",\"bgcolor\":\"#533\"},{\"id\":12,\"type\":\"KSampler\",\"pos\":[1102,903],\"size\":{\"0\":316.89642333984375,\"1\":262},\"flags\":{\"collapsed\":false},\"order\":19,\"mode\":0,\"inputs\":[{\"name\":\"model\",\"type\":\"MODEL\",\"link\":11,\"slot_index\":0},{\"name\":\"positive\",\"type\":\"CONDITIONING\",\"link\":27},{\"name\":\"negative\",\"type\":\"CONDITIONING\",\"link\":12},{\"name\":\"latent_image\",\"type\":\"LATENT\",\"link\":13,\"slot_index\":3}],\"outputs\":[{\"name\":\"LATENT\",\"type\":\"LATENT\",\"links\":[29,33],\"slot_index\":0}],\"properties\":{},\"widgets_values\":[294572759157973,true,20,8.5,\"dpmpp_sde\",\"normal\",1],\"color\":\"#432\",\"bgcolor\":\"#653\"},{\"id\":13,\"type\":\"EmptyLatentImage\",\"pos\":[585,1394],\"size\":{\"0\":315,\"1\":106},\"flags\":{},\"order\":1,\"mode\":0,\"outputs\":[{\"name\":\"LATENT\",\"type\":\"LATENT\",\"links\":[13]}],\"properties\":{},\"widgets_values\":[704,1280,1],\"color\":\"#432\",\"bgcolor\":\"#653\"},{\"id\":11,\"type\":\"CLIPTextEncode\",\"pos\":[-820,1430],\"size\":{\"0\":444.36114501953125,\"1\":185.03204345703125},\"flags\":{},\"order\":6,\"mode\":0,\"inputs\":[{\"name\":\"clip\",\"type\":\"CLIP\",\"link\":6}],\"outputs\":[{\"name\":\"CONDITIONING\",\"type\":\"CONDITIONING\",\"links\":[12],\"slot_index\":0}],\"title\":\"Negative Prompt - Main\",\"properties\":{},\"widgets_values\":[\"text, cropped, signature, watermark, username, blurry, sketch, split screen, mountains in sky\"],\"color\":\"#432\",\"bgcolor\":\"#653\"},{\"id\":25,\"type\":\"VAEDecode\",\"pos\":[2661,1300],\"size\":{\"0\":342.2445983886719,\"1\":250},\"flags\":{},\"order\":24,\"mode\":0,\"inputs\":[{\"name\":\"samples\",\"type\":\"LATENT\",\"link\":35},{\"name\":\"vae\",\"type\":\"VAE\",\"link\":42}],\"outputs\":[{\"name\":\"IMAGE\",\"type\":\"IMAGE\",\"links\":[37]}],\"properties\":{},\"color\":\"#232\",\"bgcolor\":\"#353\"},{\"id\":16,\"type\":\"ConditioningCombine\",\"pos\":[61,904],\"size\":{\"0\":342.5999755859375,\"1\":46},\"flags\":{},\"order\":15,\"mode\":0,\"inputs\":[{\"name\":\"conditioning_1\",\"type\":\"CONDITIONING\",\"link\":22,\"slot_index\":0},{\"name\":\"conditioning_2\",\"type\":\"CONDITIONING\",\"link\":25,\"slot_index\":1}],\"outputs\":[{\"name\":\"CONDITIONING\",\"type\":\"CONDITIONING\",\"links\":[26],\"slot_index\":0}],\"properties\":{},\"color\":\"#322\",\"bgcolor\":\"#533\"},{\"id\":7,\"type\":\"CLIPTextEncode\",\"pos\":[-832,808],\"size\":{\"0\":446.56036376953125,\"1\":154.70550537109375},\"flags\":{},\"order\":7,\"mode\":0,\"inputs\":[{\"name\":\"clip\",\"type\":\"CLIP\",\"link\":7}],\"outputs\":[{\"name\":\"CONDITIONING\",\"type\":\"CONDITIONING\",\"links\":[4],\"slot_index\":0}],\"title\":\"BOTTOM 4/4 : Prompt\",\"properties\":{},\"widgets_values\":[\"early morning sunrise with faint hues of violet and blue\"],\"color\":\"#322\",\"bgcolor\":\"#533\"},{\"id\":9,\"type\":\"CheckpointLoader\",\"pos\":[-1461,1390],\"size\":{\"0\":315,\"1\":122},\"flags\":{},\"order\":2,\"mode\":0,\"outputs\":[{\"name\":\"MODEL\",\"type\":\"MODEL\",\"links\":[11],\"slot_index\":0},{\"name\":\"CLIP\",\"type\":\"CLIP\",\"links\":[5,6,7,8,9,10],\"slot_index\":1},{\"name\":\"VAE\",\"type\":\"VAE\",\"links\":[41,42],\"slot_index\":2}],\"properties\":{},\"widgets_values\":[\"v1-inference_clip_skip_2.yaml\",\"deliberate_v2.safetensors\"],\"color\":\"#432\",\"bgcolor\":\"#653\"},{\"id\":19,\"type\":\"VAEDecode\",\"pos\":[1534,925],\"size\":{\"0\":342.3963928222656,\"1\":250},\"flags\":{},\"order\":20,\"mode\":0,\"inputs\":[{\"name\":\"samples\",\"type\":\"LATENT\",\"link\":29},{\"name\":\"vae\",\"type\":\"VAE\",\"link\":41,\"slot_index\":1}],\"outputs\":[{\"name\":\"IMAGE\",\"type\":\"IMAGE\",\"links\":[30],\"slot_index\":0}],\"properties\":{},\"color\":\"#432\",\"bgcolor\":\"#653\"}],\"links\":[[1,1,0,2,0,\"CONDITIONING\"],[2,3,0,4,0,\"CONDITIONING\"],[3,5,0,6,0,\"CONDITIONING\"],[4,7,0,8,0,\"CONDITIONING\"],[5,9,1,10,0,\"CLIP\"],[6,9,1,11,0,\"CLIP\"],[7,9,1,7,0,\"CLIP\"],[8,9,1,3,0,\"CLIP\"],[9,9,1,5,0,\"CLIP\"],[10,9,1,1,0,\"CLIP\"],[11,9,0,12,0,\"MODEL\"],[12,11,0,12,2,\"CONDITIONING\"],[13,13,0,12,3,\"LATENT\"],[14,2,0,14,0,\"CONDITIONING\"],[15,4,0,14,1,\"CONDITIONING\"],[16,14,0,15,0,\"CONDITIONING\"],[17,6,0,15,1,\"CONDITIONING\"],[22,8,0,16,0,\"CONDITIONING\"],[24,15,0,17,0,\"CONDITIONING\"],[25,10,0,16,1,\"CONDITIONING\"],[26,16,0,17,1,\"CONDITIONING\"],[27,17,0,12,1,\"CONDITIONING\"],[29,12,0,19,0,\"LATENT\"],[30,19,0,20,0,\"IMAGE\"],[31,21,0,23,1,\"CONDITIONING\"],[32,22,0,23,2,\"CONDITIONING\"],[33,12,0,24,0,\"LATENT\"],[34,24,0,23,3,\"LATENT\"],[35,23,0,25,0,\"LATENT\"],[37,25,0,26,0,\"IMAGE\"],[38,27,0,23,0,\"MODEL\"],[39,27,1,21,0,\"CLIP\"],[40,27,1,22,0,\"CLIP\"],[41,9,2,19,1,\"VAE\"],[42,9,2,25,1,\"VAE\"],[null,null,null,null,null,null],[null,null,null,null,null,null]],\"groups\":[],\"config\":{},\"extra\":{},\"version\":0.4}"},{"name":"co-loranet","graph":"{\"last_node_id\":21,\"last_link_id\":30,\"nodes\":[{\"id\":10,\"type\":\"VAEDecode\",\"pos\":[525.3670029629992,209.47477007300003],\"size\":{\"0\":210,\"1\":46},\"flags\":{},\"order\":13,\"mode\":0,\"inputs\":[{\"name\":\"samples\",\"type\":\"LATENT\",\"link\":11},{\"name\":\"vae\",\"type\":\"VAE\",\"link\":10,\"slot_index\":1}],\"outputs\":[{\"name\":\"IMAGE\",\"type\":\"IMAGE\",\"links\":[19,28]}],\"properties\":{}},{\"id\":6,\"type\":\"CLIPTextEncode\",\"pos\":[-120.63299703700008,29.474770073000002],\"size\":{\"0\":724.4323120117188,\"1\":132.67372131347656},\"flags\":{},\"order\":9,\"mode\":0,\"inputs\":[{\"name\":\"clip\",\"type\":\"CLIP\",\"link\":17}],\"outputs\":[{\"name\":\"CONDITIONING\",\"type\":\"CONDITIONING\",\"links\":[3],\"slot_index\":0}],\"title\":\"Prompt\",\"properties\":{},\"widgets_values\":[\"giant oak tree, twisting roots, high definition, 8k\"],\"color\":\"#232\",\"bgcolor\":\"#353\"},{\"id\":8,\"type\":\"VAELoader\",\"pos\":[192.36700296300015,485.47477007299995],\"size\":{\"0\":315,\"1\":58},\"flags\":{},\"order\":0,\"mode\":0,\"outputs\":[{\"name\":\"VAE\",\"type\":\"VAE\",\"links\":[10]}],\"properties\":{},\"widgets_values\":[\"vae-ft-mse-840000-ema-pruned.ckpt\"],\"color\":\"#233\",\"bgcolor\":\"#355\"},{\"id\":9,\"type\":\"KSampler\",\"pos\":[195.36700296300017,191.4747700730001],\"size\":{\"0\":312.6015625,\"1\":262},\"flags\":{},\"order\":12,\"mode\":0,\"inputs\":[{\"name\":\"model\",\"type\":\"MODEL\",\"link\":15,\"slot_index\":0},{\"name\":\"positive\",\"type\":\"CONDITIONING\",\"link\":8,\"slot_index\":1},{\"name\":\"negative\",\"type\":\"CONDITIONING\",\"link\":7,\"slot_index\":2},{\"name\":\"latent_image\",\"type\":\"LATENT\",\"link\":9}],\"outputs\":[{\"name\":\"LATENT\",\"type\":\"LATENT\",\"links\":[11],\"slot_index\":0}],\"properties\":{},\"widgets_values\":[94653359559670,true,20,7.5,\"euler_ancestral\",\"normal\",1],\"color\":\"#432\",\"bgcolor\":\"#653\"},{\"id\":16,\"type\":\"PreviewImage\",\"pos\":[198.9048279629996,790.0738430729999],\"size\":{\"0\":309.1241149902344,\"1\":280.2747497558594},\"flags\":{},\"order\":8,\"mode\":0,\"inputs\":[{\"name\":\"images\",\"type\":\"IMAGE\",\"link\":22}],\"properties\":{}},{\"id\":3,\"type\":\"LoadImage\",\"pos\":[-422.63299703699977,638.4747700729997],\"size\":{\"0\":300.12945556640625,\"1\":413.77020263671875},\"flags\":{},\"order\":1,\"mode\":0,\"outputs\":[{\"name\":\"IMAGE\",\"type\":\"IMAGE\",\"links\":[29],\"slot_index\":0},{\"name\":\"MASK\",\"type\":\"MASK\",\"links\":null}],\"title\":\"LOAD SCRIBBLE HERE\",\"properties\":{},\"widgets_values\":[\"Atlas3.png\",\"image\"],\"color\":\"#332922\",\"bgcolor\":\"#593930\"},{\"id\":7,\"type\":\"EmptyLatentImage\",\"pos\":[-118.63299703700005,192.47477007300003],\"size\":{\"0\":315,\"1\":106},\"flags\":{},\"order\":2,\"mode\":0,\"outputs\":[{\"name\":\"LATENT\",\"type\":\"LATENT\",\"links\":[9],\"slot_index\":0}],\"properties\":{},\"widgets_values\":[640,512,1],\"color\":\"#432\",\"bgcolor\":\"#653\"},{\"id\":2,\"type\":\"ControlNetLoader\",\"pos\":[196.36700296300017,702.4747700729997],\"size\":{\"0\":308.9294738769531,\"1\":58},\"flags\":{},\"order\":3,\"mode\":0,\"outputs\":[{\"name\":\"CONTROL_NET\",\"type\":\"CONTROL_NET\",\"links\":[1],\"slot_index\":0}],\"properties\":{},\"widgets_values\":[\"control_sd15_depth.pth\"],\"color\":\"#332922\",\"bgcolor\":\"#593930\"},{\"id\":5,\"type\":\"CLIPTextEncode\",\"pos\":[605.9048279630005,31.073843073],\"size\":{\"0\":718.3997802734375,\"1\":126.99008178710938},\"flags\":{},\"order\":10,\"mode\":0,\"inputs\":[{\"name\":\"clip\",\"type\":\"CLIP\",\"link\":18,\"slot_index\":0}],\"outputs\":[{\"name\":\"CONDITIONING\",\"type\":\"CONDITIONING\",\"links\":[7]}],\"title\":\"Negative Prompt\",\"properties\":{},\"widgets_values\":[\"fog, deformed, uneven, blurry, artist name\"],\"color\":\"#323\",\"bgcolor\":\"#535\"},{\"id\":1,\"type\":\"CheckpointLoader\",\"pos\":[-119.63299703700008,490.47477007299995],\"size\":{\"0\":315,\"1\":122},\"flags\":{},\"order\":4,\"mode\":0,\"outputs\":[{\"name\":\"MODEL\",\"type\":\"MODEL\",\"links\":[14]},{\"name\":\"CLIP\",\"type\":\"CLIP\",\"links\":[16],\"slot_index\":1},{\"name\":\"VAE\",\"type\":\"VAE\",\"links\":null}],\"properties\":{},\"widgets_values\":[\"v1-inference_clip_skip_2.yaml\",\"mdjrny-v4.ckpt\"],\"color\":\"#432\",\"bgcolor\":\"#653\"},{\"id\":14,\"type\":\"LoraLoader\",\"pos\":[-119.63299703700008,333.47477007299995],\"size\":{\"0\":315,\"1\":126},\"flags\":{},\"order\":7,\"mode\":0,\"inputs\":[{\"name\":\"model\",\"type\":\"MODEL\",\"link\":14},{\"name\":\"clip\",\"type\":\"CLIP\",\"link\":16}],\"outputs\":[{\"name\":\"MODEL\",\"type\":\"MODEL\",\"links\":[15],\"slot_index\":0},{\"name\":\"CLIP\",\"type\":\"CLIP\",\"links\":[17,18],\"slot_index\":1}],\"properties\":{},\"widgets_values\":[\"openjourneyLora.safetensors\",1,1],\"color\":\"#222\",\"bgcolor\":\"#000\"},{\"id\":18,\"type\":\"ImageUpscaleWithModel\",\"pos\":[1864.9048279629994,434.073843073],\"size\":{\"0\":241.79998779296875,\"1\":46},\"flags\":{},\"order\":16,\"mode\":0,\"inputs\":[{\"name\":\"upscale_model\",\"type\":\"UPSCALE_MODEL\",\"link\":24},{\"name\":\"image\",\"type\":\"IMAGE\",\"link\":26}],\"outputs\":[{\"name\":\"IMAGE\",\"type\":\"IMAGE\",\"links\":[27],\"slot_index\":0}],\"properties\":{}},{\"id\":4,\"type\":\"ControlNetApply\",\"pos\":[195.36700296300017,573.4747700729997],\"size\":{\"0\":313.7499084472656,\"1\":98},\"flags\":{},\"order\":11,\"mode\":0,\"inputs\":[{\"name\":\"conditioning\",\"type\":\"CONDITIONING\",\"link\":3},{\"name\":\"control_net\",\"type\":\"CONTROL_NET\",\"link\":1},{\"name\":\"image\",\"type\":\"IMAGE\",\"link\":30}],\"outputs\":[{\"name\":\"CONDITIONING\",\"type\":\"CONDITIONING\",\"links\":[8]}],\"properties\":{},\"widgets_values\":[1],\"color\":\"#332922\",\"bgcolor\":\"#593930\"},{\"id\":15,\"type\":\"ImageInvert\",\"pos\":[-61.63299703699961,704.4747700729997],\"size\":{\"0\":210,\"1\":250},\"flags\":{},\"order\":6,\"mode\":0,\"inputs\":[{\"name\":\"image\",\"type\":\"IMAGE\",\"link\":29}],\"outputs\":[{\"name\":\"IMAGE\",\"type\":\"IMAGE\",\"links\":[22,30],\"slot_index\":0}],\"properties\":{}},{\"id\":11,\"type\":\"SaveImage\",\"pos\":[509,191],\"size\":{\"0\":679.6660766601562,\"1\":590.6744995117188},\"flags\":{},\"order\":14,\"mode\":0,\"inputs\":[{\"name\":\"images\",\"type\":\"IMAGE\",\"link\":19,\"slot_index\":0}],\"properties\":{},\"widgets_values\":[\"Co-LoRA Net - Atlas ComfyUI\"]},{\"id\":17,\"type\":\"ImageScale\",\"pos\":[1187,280],\"size\":{\"0\":315,\"1\":130},\"flags\":{},\"order\":15,\"mode\":0,\"inputs\":[{\"name\":\"image\",\"type\":\"IMAGE\",\"link\":28,\"slot_index\":0}],\"outputs\":[{\"name\":\"IMAGE\",\"type\":\"IMAGE\",\"links\":[26],\"slot_index\":0}],\"properties\":{},\"widgets_values\":[\"nearest-exact\",640,512,\"disabled\"]},{\"id\":21,\"type\":\"SaveImage\",\"pos\":[1505,190],\"size\":{\"0\":2573.809814453125,\"1\":2122.748046875},\"flags\":{},\"order\":17,\"mode\":0,\"inputs\":[{\"name\":\"images\",\"type\":\"IMAGE\",\"link\":27}],\"properties\":{},\"widgets_values\":[\"ComfyUI\"]},{\"id\":19,\"type\":\"UpscaleModelLoader\",\"pos\":[1188,191],\"size\":{\"0\":315,\"1\":250},\"flags\":{},\"order\":5,\"mode\":0,\"outputs\":[{\"name\":\"UPSCALE_MODEL\",\"type\":\"UPSCALE_MODEL\",\"links\":[24],\"slot_index\":0}],\"properties\":{},\"widgets_values\":[\"RealESRGAN_x4.pth\"]}],\"links\":[[1,2,0,4,1,\"CONTROL_NET\"],[3,6,0,4,0,\"CONDITIONING\"],[7,5,0,9,2,\"CONDITIONING\"],[8,4,0,9,1,\"CONDITIONING\"],[9,7,0,9,3,\"LATENT\"],[10,8,0,10,1,\"VAE\"],[11,9,0,10,0,\"LATENT\"],[14,1,0,14,0,\"MODEL\"],[15,14,0,9,0,\"MODEL\"],[16,1,1,14,1,\"CLIP\"],[17,14,1,6,0,\"CLIP\"],[18,14,1,5,0,\"CLIP\"],[19,10,0,11,0,\"IMAGE\"],[22,15,0,16,0,\"IMAGE\"],[24,19,0,18,0,\"UPSCALE_MODEL\"],[26,17,0,18,1,\"IMAGE\"],[27,18,0,21,0,\"IMAGE\"],[28,10,0,17,0,\"IMAGE\"],[29,3,0,15,0,\"IMAGE\"],[30,15,0,4,2,\"IMAGE\"],[null,null,null,null,null,null],[null,null,null,null,null,null]],\"groups\":[{\"title\":\"insert in /ComfyUI/models/controlnet/ -- Should be a .pth file\",\"bounding\":[506,1094,658,80],\"color\":\"#3f789e\"}],\"config\":{},\"extra\":{},\"version\":0.4}"},{"name":"Control Net","graph":"{\"last_node_id\":13,\"last_link_id\":13,\"nodes\":[{\"id\":9,\"type\":\"KSampler\",\"pos\":[1791,170],\"size\":{\"0\":312.6015625,\"1\":262},\"flags\":{},\"order\":9,\"mode\":0,\"inputs\":[{\"name\":\"model\",\"type\":\"MODEL\",\"link\":6,\"slot_index\":0},{\"name\":\"positive\",\"type\":\"CONDITIONING\",\"link\":8,\"slot_index\":1},{\"name\":\"negative\",\"type\":\"CONDITIONING\",\"link\":7,\"slot_index\":2},{\"name\":\"latent_image\",\"type\":\"LATENT\",\"link\":9}],\"outputs\":[{\"name\":\"LATENT\",\"type\":\"LATENT\",\"links\":[11],\"slot_index\":0}],\"properties\":{},\"widgets_values\":[399580003849942,true,50,6,\"euler_ancestral\",\"normal\",1]},{\"id\":6,\"type\":\"CLIPTextEncode\",\"pos\":[399,244],\"size\":{\"0\":724.4323120117188,\"1\":132.67372131347656},\"flags\":{},\"order\":5,\"mode\":0,\"inputs\":[{\"name\":\"clip\",\"type\":\"CLIP\",\"link\":2}],\"outputs\":[{\"name\":\"CONDITIONING\",\"type\":\"CONDITIONING\",\"links\":[3],\"slot_index\":0}],\"title\":\"Prompt\",\"properties\":{},\"widgets_values\":[\"realistic girl, red hair with green tips, pink background, hand in front of face, left eye winking\"],\"color\":\"#232\",\"bgcolor\":\"#353\"},{\"id\":8,\"type\":\"VAELoader\",\"pos\":[1797,486],\"size\":{\"0\":315,\"1\":58},\"flags\":{},\"order\":0,\"mode\":0,\"outputs\":[{\"name\":\"VAE\",\"type\":\"VAE\",\"links\":[10]}],\"properties\":{},\"widgets_values\":[\"vae-ft-mse-840000-ema-pruned.ckpt\"]},{\"id\":10,\"type\":\"VAEDecode\",\"pos\":[2173,171],\"size\":{\"0\":210,\"1\":46},\"flags\":{},\"order\":10,\"mode\":0,\"inputs\":[{\"name\":\"samples\",\"type\":\"LATENT\",\"link\":11},{\"name\":\"vae\",\"type\":\"VAE\",\"link\":10,\"slot_index\":1}],\"outputs\":[{\"name\":\"IMAGE\",\"type\":\"IMAGE\",\"links\":[12]}],\"properties\":{}},{\"id\":11,\"type\":\"SaveImage\",\"pos\":[2462,172],\"size\":{\"0\":878.1104736328125,\"1\":678.10888671875},\"flags\":{},\"order\":11,\"mode\":0,\"inputs\":[{\"name\":\"images\",\"type\":\"IMAGE\",\"link\":12,\"slot_index\":0}],\"properties\":{},\"widgets_values\":[\"Control Net - Atlas\"]},{\"id\":1,\"type\":\"CheckpointLoader\",\"pos\":[-200,166],\"size\":{\"0\":315,\"1\":122},\"flags\":{},\"order\":1,\"mode\":0,\"outputs\":[{\"name\":\"MODEL\",\"type\":\"MODEL\",\"links\":[6]},{\"name\":\"CLIP\",\"type\":\"CLIP\",\"links\":[2,4],\"slot_index\":1},{\"name\":\"VAE\",\"type\":\"VAE\",\"links\":null}],\"properties\":{},\"widgets_values\":[\"v1-inference_clip_skip_2.yaml\",\"v1-5-pruned-emaonly.ckpt\"]},{\"id\":4,\"type\":\"ControlNetApply\",\"pos\":[1345,242],\"size\":{\"0\":313.7499084472656,\"1\":98},\"flags\":{},\"order\":8,\"mode\":0,\"inputs\":[{\"name\":\"conditioning\",\"type\":\"CONDITIONING\",\"link\":3},{\"name\":\"control_net\",\"type\":\"CONTROL_NET\",\"link\":1},{\"name\":\"image\",\"type\":\"IMAGE\",\"link\":5}],\"outputs\":[{\"name\":\"CONDITIONING\",\"type\":\"CONDITIONING\",\"links\":[8]}],\"properties\":{},\"widgets_values\":[1]},{\"id\":5,\"type\":\"CLIPTextEncode\",\"pos\":[884,996],\"size\":{\"0\":718.3997802734375,\"1\":126.99008178710938},\"flags\":{},\"order\":6,\"mode\":0,\"inputs\":[{\"name\":\"clip\",\"type\":\"CLIP\",\"link\":4,\"slot_index\":0}],\"outputs\":[{\"name\":\"CONDITIONING\",\"type\":\"CONDITIONING\",\"links\":[7]}],\"title\":\"Negative Prompt\",\"properties\":{},\"widgets_values\":[\"(hands), error, cropped, blurry, artist name, signature, sketch extra fingers\"],\"color\":\"#323\",\"bgcolor\":\"#535\"},{\"id\":13,\"type\":\"SaveImage\",\"pos\":[1365,456],\"size\":{\"0\":287.3158264160156,\"1\":397.7742919921875},\"flags\":{},\"order\":7,\"mode\":0,\"inputs\":[{\"name\":\"images\",\"type\":\"IMAGE\",\"link\":13,\"slot_index\":0}],\"properties\":{},\"widgets_values\":[\"ComfyUI\"]},{\"id\":7,\"type\":\"EmptyLatentImage\",\"pos\":[1392,1179],\"size\":{\"0\":315,\"1\":106},\"flags\":{},\"order\":2,\"mode\":0,\"outputs\":[{\"name\":\"LATENT\",\"type\":\"LATENT\",\"links\":[9],\"slot_index\":0}],\"properties\":{},\"widgets_values\":[512,640,1]},{\"id\":2,\"type\":\"ControlNetLoader\",\"pos\":[809,600],\"size\":{\"0\":315,\"1\":58},\"flags\":{},\"order\":3,\"mode\":0,\"outputs\":[{\"name\":\"CONTROL_NET\",\"type\":\"CONTROL_NET\",\"links\":[1],\"slot_index\":0}],\"properties\":{},\"widgets_values\":[\"control_sd15_normal.pth\"]},{\"id\":3,\"type\":\"LoadImage\",\"pos\":[777,722],\"size\":{\"0\":349.4769287109375,\"1\":102},\"flags\":{},\"order\":4,\"mode\":0,\"outputs\":[{\"name\":\"IMAGE\",\"type\":\"IMAGE\",\"links\":[5,13],\"slot_index\":0},{\"name\":\"MASK\",\"type\":\"MASK\",\"links\":null}],\"title\":\"LOAD SCRIBBLE HERE\",\"properties\":{},\"widgets_values\":[\"TEST.png\",\"image\"],\"color\":\"#233\",\"bgcolor\":\"#355\"}],\"links\":[[1,2,0,4,1,\"CONTROL_NET\"],[2,1,1,6,0,\"CLIP\"],[3,6,0,4,0,\"CONDITIONING\"],[4,1,1,5,0,\"CLIP\"],[5,3,0,4,2,\"IMAGE\"],[6,1,0,9,0,\"MODEL\"],[7,5,0,9,2,\"CONDITIONING\"],[8,4,0,9,1,\"CONDITIONING\"],[9,7,0,9,3,\"LATENT\"],[10,8,0,10,1,\"VAE\"],[11,9,0,10,0,\"LATENT\"],[12,10,0,11,0,\"IMAGE\"],[13,3,0,13,0,\"IMAGE\"],[null,null,null,null,null,null],[null,null,null,null,null,null]],\"groups\":[{\"title\":\"insert in /ComfyUI/models/controlnet/ -- Should be a .pth file\",\"bounding\":[-283,417,658,80],\"color\":\"#3f789e\"}],\"config\":{},\"extra\":{},\"version\":0.4}"},{"name":"Hi-res Fix","graph":"{\"last_node_id\":12,\"last_link_id\":29,\"nodes\":[{\"id\":7,\"type\":\"SaveImage\",\"pos\":[454,291],\"size\":{\"0\":802.18798828125,\"1\":393.6972961425781},\"flags\":{\"pinned\":false},\"order\":7,\"mode\":0,\"inputs\":[{\"name\":\"images\",\"type\":\"IMAGE\",\"link\":9}],\"properties\":{},\"widgets_values\":[\"Hi-Res Fix - Atlas\"]},{\"id\":12,\"type\":\"SaveImage\",\"pos\":[556,849],\"size\":{\"0\":1502.815673828125,\"1\":855.1776733398438},\"flags\":{},\"order\":10,\"mode\":0,\"inputs\":[{\"name\":\"images\",\"type\":\"IMAGE\",\"link\":10,\"slot_index\":0}],\"properties\":{},\"widgets_values\":[\"Hi-Res Fix - Atlas\"]},{\"id\":11,\"type\":\"VAEDecode\",\"pos\":[54,1219],\"size\":{\"0\":313.92291259765625,\"1\":46},\"flags\":{},\"order\":9,\"mode\":0,\"inputs\":[{\"name\":\"samples\",\"type\":\"LATENT\",\"link\":27,\"slot_index\":0},{\"name\":\"vae\",\"type\":\"VAE\",\"link\":11,\"slot_index\":1}],\"outputs\":[{\"name\":\"IMAGE\",\"type\":\"IMAGE\",\"links\":[10]}],\"properties\":{}},{\"id\":5,\"type\":\"EmptyLatentImage\",\"pos\":[-984,1111],\"size\":{\"0\":315,\"1\":106},\"flags\":{},\"order\":0,\"mode\":0,\"outputs\":[{\"name\":\"LATENT\",\"type\":\"LATENT\",\"links\":[6]}],\"properties\":{},\"widgets_values\":[512,512,1]},{\"id\":3,\"type\":\"CLIPTextEncode\",\"pos\":[-1231,784],\"size\":{\"0\":400,\"1\":200},\"flags\":{},\"order\":3,\"mode\":0,\"inputs\":[{\"name\":\"clip\",\"type\":\"CLIP\",\"link\":22,\"slot_index\":0}],\"outputs\":[{\"name\":\"CONDITIONING\",\"type\":\"CONDITIONING\",\"links\":[24,26],\"slot_index\":0}],\"title\":\"Negative Prompt\",\"properties\":{},\"widgets_values\":[\"\"],\"color\":\"#323\",\"bgcolor\":\"#535\"},{\"id\":2,\"type\":\"CLIPTextEncode\",\"pos\":[-1311,396],\"size\":{\"0\":400,\"1\":200},\"flags\":{},\"order\":2,\"mode\":0,\"inputs\":[{\"name\":\"clip\",\"type\":\"CLIP\",\"link\":21,\"slot_index\":0}],\"outputs\":[{\"name\":\"CONDITIONING\",\"type\":\"CONDITIONING\",\"links\":[23,25],\"slot_index\":0}],\"title\":\"Prompt\",\"properties\":{},\"widgets_values\":[\"chocolate cake with strawberries on top, highly detailed, professional bakery, cinematic photography, 4k\"],\"color\":\"#232\",\"bgcolor\":\"#353\"},{\"id\":1,\"type\":\"CheckpointLoader\",\"pos\":[-1757,680],\"size\":{\"0\":315,\"1\":122},\"flags\":{},\"order\":1,\"mode\":0,\"outputs\":[{\"name\":\"MODEL\",\"type\":\"MODEL\",\"links\":[3,13],\"slot_index\":0},{\"name\":\"CLIP\",\"type\":\"CLIP\",\"links\":[21,22],\"slot_index\":1},{\"name\":\"VAE\",\"type\":\"VAE\",\"links\":[8,11]}],\"properties\":{},\"widgets_values\":[\"v1-inference.yaml\",\"deliberate_v2.safetensors\"]},{\"id\":6,\"type\":\"VAEDecode\",\"pos\":[-52,436],\"size\":{\"0\":312.97412109375,\"1\":46},\"flags\":{},\"order\":5,\"mode\":0,\"inputs\":[{\"name\":\"samples\",\"type\":\"LATENT\",\"link\":7,\"slot_index\":0},{\"name\":\"vae\",\"type\":\"VAE\",\"link\":8,\"slot_index\":1}],\"outputs\":[{\"name\":\"IMAGE\",\"type\":\"IMAGE\",\"links\":[9],\"slot_index\":0}],\"properties\":{}},{\"id\":4,\"type\":\"KSampler\",\"pos\":[-459,304],\"size\":{\"0\":315,\"1\":262},\"flags\":{},\"order\":4,\"mode\":0,\"inputs\":[{\"name\":\"model\",\"type\":\"MODEL\",\"link\":3},{\"name\":\"positive\",\"type\":\"CONDITIONING\",\"link\":23,\"slot_index\":1},{\"name\":\"negative\",\"type\":\"CONDITIONING\",\"link\":24,\"slot_index\":2},{\"name\":\"latent_image\",\"type\":\"LATENT\",\"link\":6,\"slot_index\":3}],\"outputs\":[{\"name\":\"LATENT\",\"type\":\"LATENT\",\"links\":[7,29]}],\"properties\":{},\"widgets_values\":[781202832577905,true,20,8,\"euler_ancestral\",\"normal\",1]},{\"id\":10,\"type\":\"KSampler\",\"pos\":[-165,669],\"size\":{\"0\":315,\"1\":262},\"flags\":{},\"order\":8,\"mode\":0,\"inputs\":[{\"name\":\"model\",\"type\":\"MODEL\",\"link\":13,\"slot_index\":0},{\"name\":\"positive\",\"type\":\"CONDITIONING\",\"link\":25,\"slot_index\":1},{\"name\":\"negative\",\"type\":\"CONDITIONING\",\"link\":26,\"slot_index\":2},{\"name\":\"latent_image\",\"type\":\"LATENT\",\"link\":28,\"slot_index\":3}],\"outputs\":[{\"name\":\"LATENT\",\"type\":\"LATENT\",\"links\":[27]}],\"properties\":{},\"widgets_values\":[394986326194695,true,14,8,\"dpmpp_2m\",\"simple\",0.49999999999999956]},{\"id\":8,\"type\":\"LatentUpscale\",\"pos\":[-518,944],\"size\":{\"0\":315,\"1\":130},\"flags\":{},\"order\":6,\"mode\":0,\"inputs\":[{\"name\":\"samples\",\"type\":\"LATENT\",\"link\":29,\"slot_index\":0}],\"outputs\":[{\"name\":\"LATENT\",\"type\":\"LATENT\",\"links\":[28]}],\"properties\":{},\"widgets_values\":[\"nearest-exact\",768,768,\"disabled\"]}],\"links\":[[3,1,0,4,0,\"MODEL\"],[6,5,0,4,3,\"LATENT\"],[7,4,0,6,0,\"LATENT\"],[8,1,2,6,1,\"VAE\"],[9,6,0,7,0,\"IMAGE\"],[10,11,0,12,0,\"IMAGE\"],[11,1,2,11,1,\"VAE\"],[13,1,0,10,0,\"MODEL\"],[21,1,1,2,0,\"CLIP\"],[22,1,1,3,0,\"CLIP\"],[23,2,0,4,1,\"CONDITIONING\"],[24,3,0,4,2,\"CONDITIONING\"],[25,2,0,10,1,\"CONDITIONING\"],[26,3,0,10,2,\"CONDITIONING\"],[27,10,0,11,0,\"LATENT\"],[28,8,0,10,3,\"LATENT\"],[29,4,0,8,0,\"LATENT\"],[null,null,null,null,null,null],[null,null,null,null,null,null]],\"groups\":[],\"config\":{},\"extra\":{},\"version\":0.4}"},{"name":"Image Upscaler","graph":"{\"last_node_id\":11,\"last_link_id\":10,\"nodes\":[{\"id\":10,\"type\":\"SaveImage\",\"pos\":[695,151],\"size\":{\"0\":1500.8460693359375,\"1\":927.6019287109375},\"flags\":{},\"order\":5,\"mode\":0,\"inputs\":[{\"name\":\"images\",\"type\":\"IMAGE\",\"link\":9,\"slot_index\":0}],\"properties\":{},\"widgets_values\":[\"Image Upscaler Atlas ComfyUI\"]},{\"id\":7,\"type\":\"ImageUpscaleWithModel\",\"pos\":[282,496],\"size\":{\"0\":315.4982604980469,\"1\":250},\"flags\":{},\"order\":4,\"mode\":0,\"inputs\":[{\"name\":\"upscale_model\",\"type\":\"UPSCALE_MODEL\",\"link\":5,\"slot_index\":0},{\"name\":\"image\",\"type\":\"IMAGE\",\"link\":7,\"slot_index\":1}],\"outputs\":[{\"name\":\"IMAGE\",\"type\":\"IMAGE\",\"links\":[9]}],\"properties\":{}},{\"id\":8,\"type\":\"ImageScale\",\"pos\":[-147,512],\"size\":{\"0\":315,\"1\":130},\"flags\":{},\"order\":2,\"mode\":0,\"inputs\":[{\"name\":\"image\",\"type\":\"IMAGE\",\"link\":6}],\"outputs\":[{\"name\":\"IMAGE\",\"type\":\"IMAGE\",\"links\":[7],\"slot_index\":0}],\"properties\":{},\"widgets_values\":[\"nearest-exact\",768,512,\"disabled\"]},{\"id\":11,\"type\":\"PreviewImage\",\"pos\":[-114,949],\"size\":{\"0\":630.5836181640625,\"1\":344.1615905761719},\"flags\":{},\"order\":3,\"mode\":0,\"inputs\":[{\"name\":\"images\",\"type\":\"IMAGE\",\"link\":10,\"slot_index\":0}],\"properties\":{}},{\"id\":5,\"type\":\"LoadImage\",\"pos\":[-579,682],\"size\":{\"0\":338.4964294433594,\"1\":323.1502990722656},\"flags\":{},\"order\":0,\"mode\":0,\"outputs\":[{\"name\":\"IMAGE\",\"type\":\"IMAGE\",\"links\":[6,10],\"slot_index\":0},{\"name\":\"MASK\",\"type\":\"MASK\",\"links\":null}],\"properties\":{},\"widgets_values\":[\"example.png\",\"image\"]},{\"id\":6,\"type\":\"UpscaleModelLoader\",\"pos\":[-157,197],\"size\":{\"0\":315,\"1\":58},\"flags\":{\"collapsed\":false},\"order\":1,\"mode\":0,\"outputs\":[{\"name\":\"UPSCALE_MODEL\",\"type\":\"UPSCALE_MODEL\",\"links\":[5],\"slot_index\":0}],\"properties\":{},\"widgets_values\":[\"RealESRGAN_x8.pth\"]}],\"links\":[[5,6,0,7,0,\"UPSCALE_MODEL\"],[6,5,0,8,0,\"IMAGE\"],[7,8,0,7,1,\"IMAGE\"],[9,7,0,10,0,\"IMAGE\"],[10,5,0,11,0,\"IMAGE\"],[null,null,null,null,null,null],[null,null,null,null,null,null]],\"groups\":[{\"title\":\"this is the best place to get the ESRGAN files. Just open the ZIP, then copy all the files from the 'models' folder into the 'upscalers' folder in ComfyUI\",\"bounding\":[-65,7,140,80],\"color\":\"#88A\"},{\"title\":\"https://huggingface.co/sberbank-ai/Real-ESRGAN/tree/main\",\"bounding\":[88,55,140,80],\"color\":\"#b58b2a\"}],\"config\":{},\"extra\":{},\"version\":0.4}"},{"name":"Lora loader","graph":"{\"last_node_id\":9,\"last_link_id\":13,\"nodes\":[{\"id\":8,\"type\":\"VAEDecode\",\"pos\":[1173,853],\"size\":{\"0\":315.9195556640625,\"1\":146.11546325683594},\"flags\":{},\"order\":6,\"mode\":0,\"inputs\":[{\"name\":\"samples\",\"type\":\"LATENT\",\"link\":4,\"slot_index\":0},{\"name\":\"vae\",\"type\":\"VAE\",\"link\":2,\"slot_index\":1}],\"outputs\":[{\"name\":\"IMAGE\",\"type\":\"IMAGE\",\"links\":[1],\"slot_index\":0}],\"properties\":{}},{\"id\":3,\"type\":\"CLIPTextEncode\",\"pos\":[289,99],\"size\":{\"0\":400,\"1\":200},\"flags\":{},\"order\":3,\"mode\":0,\"inputs\":[{\"name\":\"clip\",\"type\":\"CLIP\",\"link\":12}],\"outputs\":[{\"name\":\"CONDITIONING\",\"type\":\"CONDITIONING\",\"links\":[8],\"slot_index\":0}],\"title\":\"Prompt\",\"properties\":{},\"widgets_values\":[\"portrait of kujou sara, sidelocks, signature, yellow eyes, gradient background, high-detail, 8k\"],\"color\":\"#232\",\"bgcolor\":\"#353\"},{\"id\":4,\"type\":\"CLIPTextEncode\",\"pos\":[273,349],\"size\":{\"0\":400,\"1\":200},\"flags\":{},\"order\":4,\"mode\":0,\"inputs\":[{\"name\":\"clip\",\"type\":\"CLIP\",\"link\":13,\"slot_index\":0}],\"outputs\":[{\"name\":\"CONDITIONING\",\"type\":\"CONDITIONING\",\"links\":[9],\"slot_index\":0}],\"title\":\"Negative Prompt\",\"properties\":{},\"widgets_values\":[\"deformed face, deformed hands\"],\"color\":\"#323\",\"bgcolor\":\"#535\"},{\"id\":6,\"type\":\"EmptyLatentImage\",\"pos\":[343,623],\"size\":{\"0\":315,\"1\":106},\"flags\":{},\"order\":0,\"mode\":0,\"outputs\":[{\"name\":\"LATENT\",\"type\":\"LATENT\",\"links\":[5],\"slot_index\":0}],\"properties\":{},\"widgets_values\":[512,768,1]},{\"id\":9,\"type\":\"SaveImage\",\"pos\":[1583,395],\"size\":{\"0\":607.1799926757812,\"1\":604.0999755859375},\"flags\":{},\"order\":7,\"mode\":0,\"inputs\":[{\"name\":\"images\",\"type\":\"IMAGE\",\"link\":1}],\"properties\":{},\"widgets_values\":[\"LoRA Modeler Atlas ComfyUI\"]},{\"id\":2,\"type\":\"LoraLoader\",\"pos\":[-95,39],\"size\":{\"0\":318.9715270996094,\"1\":126},\"flags\":{},\"order\":2,\"mode\":0,\"inputs\":[{\"name\":\"model\",\"type\":\"MODEL\",\"link\":3},{\"name\":\"clip\",\"type\":\"CLIP\",\"link\":11}],\"outputs\":[{\"name\":\"MODEL\",\"type\":\"MODEL\",\"links\":[10],\"slot_index\":0},{\"name\":\"CLIP\",\"type\":\"CLIP\",\"links\":[12,13],\"slot_index\":1}],\"properties\":{},\"widgets_values\":[\"Barbara_hardpruned.safetensors\",1,1]},{\"id\":1,\"type\":\"CheckpointLoaderSimple\",\"pos\":[-620,830],\"size\":{\"0\":315.22015380859375,\"1\":126.0708999633789},\"flags\":{},\"order\":1,\"mode\":0,\"outputs\":[{\"name\":\"MODEL\",\"type\":\"MODEL\",\"links\":[3],\"slot_index\":0},{\"name\":\"CLIP\",\"type\":\"CLIP\",\"links\":[11],\"slot_index\":1},{\"name\":\"VAE\",\"type\":\"VAE\",\"links\":[2]}],\"properties\":{},\"widgets_values\":[\"wd-v1-3-float32.ckpt\"]},{\"id\":7,\"type\":\"KSampler\",\"pos\":[890,8],\"size\":{\"0\":315.5923767089844,\"1\":277.85797119140625},\"flags\":{},\"order\":5,\"mode\":0,\"inputs\":[{\"name\":\"model\",\"type\":\"MODEL\",\"link\":10},{\"name\":\"positive\",\"type\":\"CONDITIONING\",\"link\":8},{\"name\":\"negative\",\"type\":\"CONDITIONING\",\"link\":9},{\"name\":\"latent_image\",\"type\":\"LATENT\",\"link\":5}],\"outputs\":[{\"name\":\"LATENT\",\"type\":\"LATENT\",\"links\":[4]}],\"properties\":{},\"widgets_values\":[842854956676494,true,20,8,\"euler_ancestral\",\"karras\",1]}],\"links\":[[1,8,0,9,0,\"IMAGE\"],[2,1,2,8,1,\"VAE\"],[3,1,0,2,0,\"MODEL\"],[4,7,0,8,0,\"LATENT\"],[5,6,0,7,3,\"LATENT\"],[8,3,0,7,1,\"CONDITIONING\"],[9,4,0,7,2,\"CONDITIONING\"],[10,2,0,7,0,\"MODEL\"],[11,1,1,2,1,\"CLIP\"],[12,2,1,3,0,\"CLIP\"],[13,2,1,4,0,\"CLIP\"],[null,null,null,null,null,null],[null,null,null,null,null,null]],\"groups\":[{\"title\":\"For my RainWing -- Genshin Impact LORAs -- https://huggingface.co/YoungMasterFromSect/Trauter_LoRAs/tree/main/LoRA/Genshin-Impact\",\"bounding\":[-11,-120,1510,80],\"color\":\"#b06634\"}],\"config\":{},\"extra\":{},\"version\":0.4}"}]
|
|
}
|
|
|
|
const OPE_VARIABLES = {
|
|
mainWidth : 100,
|
|
mainHeight: 100,
|
|
topIdent : 20,
|
|
borderColor : 'var(--fg-color)',
|
|
bgMain : 'var(--bg-color)',
|
|
editorURL : 'https://zhuyu1997.github.io/open-pose-editor/'
|
|
}
|
|
|
|
class WC{
|
|
constructor(TARGET){
|
|
this.mainFrame = $Add('div', TARGET, {style: {position: 'fixed', width: `${WC_VARIABLES.mainWidth}%`, top: 0, left:0, background: WC_VARIABLES.bgMain , borderBottom : `solid 1px ${WC_VARIABLES.borderColor}`, zIndex: 3}});
|
|
|
|
this.loader = $Add("input", $d.body, {
|
|
type: "file",
|
|
accept: ".json",
|
|
style: { display: "none" },
|
|
onchange: () => {
|
|
this.restore(this.loader.files[0]);
|
|
},
|
|
});
|
|
|
|
//this.slideFrame = $Add('div', this.mainFrame, {innerHTML : '↔', style : {background : WC_VARIABLES.bgMain, position: 'absolute', left: `${WC_VARIABLES.mainWidth}px`, border : `solid 1px ${WC_VARIABLES.borderColor}`, borderLeft : `solid 0 white`, cursor: 'pointer'}, onclick : ()=>{this.slide()} } );
|
|
this.Title = $Add('span', this.mainFrame, {innerHTML: 'ComfyUI', style : {textAlign: 'center', marginRight: '20px'}});
|
|
|
|
this.controlPanel = $Add('span', this.mainFrame, {style : {textAlign: 'center'} } );
|
|
|
|
this.itemSelect = $Add('select', this.controlPanel, {style : {width : `${WC_VARIABLES.selectWidth}px`, background : WC_VARIABLES.bgMain, color : WC_VARIABLES.textColor}, onchange : () => {this.select() } } );
|
|
|
|
this.addWorkflow = $Add('span', this.controlPanel, {type : 'button', innerHTML : 'Add', style : {cursor : 'pointer', border: `solid 1px ${WC_VARIABLES.textColor}`, borderRadius : '5px', marginLeft: '5px'}, onclick : () => {this.add(prompt(), jsonEncode(app.graph.serialize() ) ) } } );
|
|
this.removeWorkflow = $Add('span', this.controlPanel, {type : 'button', innerHTML : 'Remove', style : {cursor : 'pointer', border: `solid 1px ${WC_VARIABLES.textColor}`, borderRadius : '5px', marginLeft: '5px'}, onclick : () => {this.remove() } } );
|
|
this.renameWorkflow = $Add('span', this.controlPanel, {type : 'button', innerHTML : 'Rename', style : {cursor : 'pointer', border: `solid 1px ${WC_VARIABLES.textColor}`, borderRadius : '5px', marginLeft: '5px'}, onclick : () => {this.rename() } } );
|
|
this.backupWorkflow = $Add('span', this.controlPanel, {type : 'button', innerHTML : 'Backup', style : {cursor : 'pointer', border: `solid 1px ${WC_VARIABLES.textColor}`, borderRadius : '5px', marginLeft: '5px'}, onclick : () => {this.backup() } } );
|
|
this.restoreWorkflow = $Add('span', this.controlPanel, {type : 'button', innerHTML : 'Restore', style : {cursor : 'pointer', border: `solid 1px ${WC_VARIABLES.textColor}`, borderRadius : '5px', marginLeft: '5px'}, onclick : () => {this.loader.click() } } );
|
|
|
|
this.unselectWorkflow = $Add('option', this.itemSelect, {value : -1, style : {}, innerHTML : 'Not selected' } );
|
|
|
|
this.selected = undefined;
|
|
this.items = [];
|
|
|
|
this.load();
|
|
|
|
this.saveInterval = setInterval(() => {
|
|
if (this.selected != undefined){
|
|
this.items[this.selected].save(jsonEncode(app.graph.serialize()));
|
|
}
|
|
this.save();
|
|
}, 1000);
|
|
|
|
this.opened = true;
|
|
//this.slide();
|
|
}
|
|
slide(){
|
|
if (this.opened){
|
|
this.opened = !this.opened;
|
|
this.mainFrame.style.left = `${0 - WC_VARIABLES.mainWidth}px`;
|
|
}else{
|
|
this.opened = !this.opened;
|
|
this.mainFrame.style.left = 0;
|
|
}
|
|
}
|
|
add(NAME, GRAPH){
|
|
if (NAME != null && NAME != '')this.items.push(new WCItem(this, NAME, GRAPH));
|
|
}
|
|
remove(){
|
|
if (this.selected == undefined) return 0;
|
|
this.items[this.selected].remove();
|
|
this.items.splice(this.selected, 1);
|
|
this.unselect();
|
|
for (let i = 0; i < this.items.length; i++){
|
|
this.items[i].id = i;
|
|
}
|
|
}
|
|
rename(){
|
|
if (this.selected == undefined) return 0;
|
|
this.items[this.selected].rename(prompt());
|
|
}
|
|
save(){
|
|
let data = [];
|
|
for(let i = 0; i < this.items.length; i++){
|
|
data.push({name : this.items[i].name, graph : this.items[i].graph});
|
|
}
|
|
lsSet('WorkflowCollection', jsonEncode(data));
|
|
}
|
|
backup(){
|
|
const json = lsGet('WorkflowCollection');
|
|
const blob = new Blob([json], { type: "application/json" });
|
|
const url = URL.createObjectURL(blob);
|
|
const a = $Add("a", $d.body, {
|
|
href: url,
|
|
download: "WorkflowCollection.json",
|
|
style: { display: "none" }
|
|
});
|
|
a.click();
|
|
setTimeout(function () {
|
|
a.remove();
|
|
window.URL.revokeObjectURL(url);
|
|
}, 0);
|
|
}
|
|
restore(FILE){
|
|
if (FILE.type === "application/json" || FILE.name.endsWith(".json")) {
|
|
const reader = new FileReader();
|
|
reader.onload = () => {
|
|
this.load(jsonDecode(reader.result));
|
|
};
|
|
reader.readAsText(FILE);
|
|
}
|
|
}
|
|
load(DATA){
|
|
if (DATA != undefined){
|
|
for (let i = 0; i < this.items.length; i++){
|
|
this.items[i].remove();
|
|
}
|
|
this.items = [];
|
|
lsSet('WorkflowCollection', jsonEncode(DATA));
|
|
}
|
|
if (lsGet('WorkflowCollection') == null) {
|
|
lsSet('WorkflowCollection', jsonEncode(DEFAULT_COLLECTIONS));
|
|
}
|
|
let data = jsonDecode(lsGet('WorkflowCollection'));
|
|
if (data == null) {data = []};
|
|
for (let i = 0; i < data.length; i++){
|
|
this.add(data[i].name, data[i].graph);
|
|
}
|
|
this.unselect();
|
|
}
|
|
select(){
|
|
this.selected = (this.itemSelect.value == -1) ? undefined : this.itemSelect.value;
|
|
for (let i = 0; i < this.items.length; i++){
|
|
if (i == this.selected){
|
|
this.items[i].frame.style.background = WC_VARIABLES.selectedColor;
|
|
}else{
|
|
this.items[i].frame.style.background = WC_VARIABLES.itemColor;
|
|
}
|
|
}
|
|
if (this.selected == undefined){
|
|
this.unselectWorkflow.style.background = WC_VARIABLES.selectedColor;
|
|
}else{
|
|
this.unselectWorkflow.style.background = WC_VARIABLES.itemColor;
|
|
}
|
|
if (this.selected != undefined) this.items[Number(this.selected)].select()
|
|
}
|
|
unselect(){
|
|
this.selected = undefined;
|
|
this.select();
|
|
}
|
|
}
|
|
|
|
class WCItem{
|
|
constructor(PARENT, NAME, GRAPH){
|
|
this.parent = PARENT;
|
|
this.name = NAME;
|
|
this.frame = $Add('option', this.parent.itemSelect, {innerHTML: this.name, value: this.parent.items.length, style:{} });
|
|
this.id = this.parent.items.length;
|
|
this.graph = GRAPH;
|
|
}
|
|
remove(){
|
|
this.frame.remove();
|
|
delete this;
|
|
}
|
|
select(){
|
|
//this.parent.selected = this.id;
|
|
//this.parent.select();
|
|
app.graph.clear();
|
|
this.load();
|
|
}
|
|
rename(NAME){
|
|
this.name = NAME;
|
|
this.frame.innerHTML = this.name;
|
|
}
|
|
save(GRAPH){
|
|
this.graph = GRAPH;
|
|
}
|
|
load(){
|
|
app.loadGraphData(jsonDecode(this.graph));
|
|
}
|
|
}
|
|
|
|
class OPE{
|
|
constructor(TARGET){
|
|
this.mainFrame = $Add('div', TARGET, {style: {position: 'fixed', width: `${OPE_VARIABLES.mainWidth}%`, height: `${OPE_VARIABLES.mainHeight}%`, top: 0, left:`-${OPE_VARIABLES.mainWidth}%`, background: WC_VARIABLES.bgMain, zIndex: 2}});
|
|
this.slideFrame = $Add('div', this.mainFrame, {innerHTML : 'OPE', style : {background : OPE_VARIABLES.bgMain, position: 'absolute', left: `${OPE_VARIABLES.mainWidth}%`, top: `${OPE_VARIABLES.topIdent}px`, border : `solid 1px ${OPE_VARIABLES.borderColor}`, cursor: 'pointer'}, onclick : ()=>{this.slide()} } );
|
|
|
|
this.iFrame = $Add('iframe', this.mainFrame, {width: '100%', height: '100%', src : OPE_VARIABLES.editorURL, style : {border : 'none'} } );
|
|
|
|
this.opened = false;
|
|
}
|
|
slide(){
|
|
if (this.opened){
|
|
this.opened = !this.opened;
|
|
this.mainFrame.style.left = `-${OPE_VARIABLES.mainWidth}%`;
|
|
console.log(this.slideFrame.style.left);
|
|
this.slideFrame.style.left = `${OPE_VARIABLES.mainWidth}%`;
|
|
console.log(this.slideFrame.style.left);
|
|
}else{
|
|
this.opened = !this.opened;
|
|
this.mainFrame.style.left = 0;
|
|
this.slideFrame.style.left = 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
wc = new WC(qs('body'));
|
|
ope = new OPE(qs('body'));
|