joelkoch commited on
Commit
538f222
·
1 Parent(s): ad29cd1

Remove all scribble bird stuff

Browse files
Files changed (1) hide show
  1. public-apps/sd_controlnet.livemd +0 -47
public-apps/sd_controlnet.livemd CHANGED
@@ -70,53 +70,6 @@ serving =
70
  )
71
  ```
72
 
73
- ```elixir
74
- Kino.Text.new("Scribble Bird")
75
- livebook_dir = Path.absname(__DIR__)
76
-
77
- bird_file_input =
78
- Kino.Input.text("Bird file path", default: livebook_dir <> "/scribble_bird.png")
79
- ```
80
-
81
- ```elixir
82
- bird_file = Kino.Input.read(bird_file_input)
83
-
84
- bird_image = StbImage.read_file!(bird_file) |> StbImage.to_nx()
85
-
86
- bird_image_tensor =
87
- bird_image
88
- |> Nx.reshape({512, 512, 3})
89
- |> NxImage.to_continuous(0, 1)
90
-
91
- Kino.Image.new(bird_image)
92
- ```
93
-
94
- ```elixir
95
- bird_prompt = "a bird, high quality, detailed"
96
- bird_negative_prompt = "ugly, low quality, blurry"
97
-
98
- Kino.Layout.grid([
99
- Kino.Text.new("prompt: " <> bird_prompt),
100
- Kino.Text.new("negative prompt:" <> bird_negative_prompt)
101
- ])
102
- ```
103
-
104
- ```elixir
105
- Kino.Text.new("Generate image ...")
106
-
107
- output =
108
- Nx.Serving.run(serving, %{
109
- prompt: bird_prompt,
110
- negative_prompt: bird_negative_prompt,
111
- controlnet_conditioning: bird_image_tensor
112
- })
113
-
114
- for result <- output.results do
115
- Kino.Image.new(result.image)
116
- end
117
- |> Kino.Layout.grid(columns: 2)
118
- ```
119
-
120
  ## Your own input
121
 
122
  ```elixir
 
70
  )
71
  ```
72
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73
  ## Your own input
74
 
75
  ```elixir