Skip to content

Commit

Permalink
change Inputs to inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamadrostami committed Feb 26, 2024
1 parent f2c1759 commit 339f50c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ type Meta struct {
type Node struct {
errors []error
ID ID `json:"-"`
Inputs map[string]any `json:"Inputs"`
Inputs map[string]any `json:"inputs"`
ClassType string `json:"class_type"`
Meta Meta `json:"_meta"`
Outputs map[string]int `json:"-"`
Expand Down
2 changes: 1 addition & 1 deletion workflow_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ func TestWorkflowJsonHappy(t *testing.T) {
}{
{
name: "test simple workflow",
want: "{\"1\":{\"Inputs\":{\"ckpt_name\":\"checkpoint_name\"},\"class_type\":\"CheckpointLoaderSimple\",\"_meta\":{\"title\":\"Load Checkpoint\"}},\"2\":{\"Inputs\":{\"clip\":[\"1\",1],\"text\":\"positive prompt\"},\"class_type\":\"CLIPTextEncode\",\"_meta\":{\"title\":\"CLIP Text Encode (Prompt)\"}},\"3\":{\"Inputs\":{\"clip\":[\"1\",1],\"text\":\"negative prompt\"},\"class_type\":\"CLIPTextEncode\",\"_meta\":{\"title\":\"CLIP Text Encode (Prompt)\"}},\"4\":{\"Inputs\":{\"batch_size\":1,\"height\":1024,\"width\":1024},\"class_type\":\"EmptyLatentImage\",\"_meta\":{\"title\":\"Empty Latent Image\"}},\"5\":{\"Inputs\":{\"cfg\":8,\"denoise\":1,\"latent_image\":[\"4\",0],\"model\":[\"1\",0],\"negative\":[\"3\",0],\"positive\":[\"2\",0],\"sampler_name\":\"euler\",\"scheduler\":\"kerras\",\"steps\":30},\"class_type\":\"KSampler\",\"_meta\":{\"title\":\"KSampler\"}},\"6\":{\"Inputs\":{\"samples\":[\"5\",0],\"vae\":[\"1\",2]},\"class_type\":\"VAEDecode\",\"_meta\":{\"title\":\"VAEDecode\"}}}",
want: "{\"1\":{\"inputs\":{\"ckpt_name\":\"checkpoint_name\"},\"class_type\":\"CheckpointLoaderSimple\",\"_meta\":{\"title\":\"Load Checkpoint\"}},\"2\":{\"inputs\":{\"clip\":[\"1\",1],\"text\":\"positive prompt\"},\"class_type\":\"CLIPTextEncode\",\"_meta\":{\"title\":\"CLIP Text Encode (Prompt)\"}},\"3\":{\"inputs\":{\"clip\":[\"1\",1],\"text\":\"negative prompt\"},\"class_type\":\"CLIPTextEncode\",\"_meta\":{\"title\":\"CLIP Text Encode (Prompt)\"}},\"4\":{\"inputs\":{\"batch_size\":1,\"height\":1024,\"width\":1024},\"class_type\":\"EmptyLatentImage\",\"_meta\":{\"title\":\"Empty Latent Image\"}},\"5\":{\"inputs\":{\"cfg\":8,\"denoise\":1,\"latent_image\":[\"4\",0],\"model\":[\"1\",0],\"negative\":[\"3\",0],\"positive\":[\"2\",0],\"sampler_name\":\"euler\",\"scheduler\":\"kerras\",\"steps\":30},\"class_type\":\"KSampler\",\"_meta\":{\"title\":\"KSampler\"}},\"6\":{\"inputs\":{\"samples\":[\"5\",0],\"vae\":[\"1\",2]},\"class_type\":\"VAEDecode\",\"_meta\":{\"title\":\"VAEDecode\"}}}",
wantErr: false,
},
}
Expand Down

0 comments on commit 339f50c

Please sign in to comment.