Skip to content

Commit c91cce7

Browse files
Fix image urls (#1957)
1 parent 1a14b7c commit c91cce7

File tree

3 files changed

+24
-53
lines changed

3 files changed

+24
-53
lines changed

guides/ipynb/keras_hub/stable_diffusion_3_in_keras_hub.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@
4444
},
4545
"outputs": [],
4646
"source": [
47-
"!!pip install -Uq keras\n",
48-
"!!pip install -Uq git+https://github.com/keras-team/keras-hub.git\n",
49-
"!!wget --user-agent=\"User-Agent: Mozilla/5.0\" -O mountain_dog.png https://i.imgur.com/3AHYG9Z.png\n",
50-
"!!wget --user-agent=\"User-Agent: Mozilla/5.0\" -O mountain_dog_mask.png https://i.imgur.com/n3Prpj6.png"
47+
"!pip install -Uq keras\n",
48+
"!pip install -Uq git+https://github.com/keras-team/keras-hub.git\n",
49+
"!wget --user-agent=\"User-Agent: Mozilla/5.0\" -O mountain_dog.png https://i.imgur.com/3AHYG9Z.png\n",
50+
"!wget --user-agent=\"User-Agent: Mozilla/5.0\" -O mountain_dog_mask.png https://i.imgur.com/n3Prpj6.png"
5151
]
5252
},
5353
{

guides/md/keras_hub/segment_anything_in_keras_hub.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ plt.show()
240240

241241

242242

243-
![png](/content/keras-io/guides/img/segment_anything_in_keras_hub/segment_anything_in_keras_hub_11_0.png)
243+
![png](/img/guides/segment_anything_in_keras_hub/segment_anything_in_keras_hub_11_0.png)
244244

245245

246246

@@ -262,7 +262,7 @@ plt.show()
262262

263263

264264

265-
![png](/content/keras-io/guides/img/segment_anything_in_keras_hub/segment_anything_in_keras_hub_13_0.png)
265+
![png](/img/guides/segment_anything_in_keras_hub/segment_anything_in_keras_hub_13_0.png)
266266

267267

268268

@@ -326,7 +326,7 @@ plt.show()
326326

327327

328328

329-
![png](/content/keras-io/guides/img/segment_anything_in_keras_hub/segment_anything_in_keras_hub_17_0.png)
329+
![png](/img/guides/segment_anything_in_keras_hub/segment_anything_in_keras_hub_17_0.png)
330330

331331

332332

@@ -354,7 +354,7 @@ plt.show()
354354

355355

356356

357-
![png](/content/keras-io/guides/img/segment_anything_in_keras_hub/segment_anything_in_keras_hub_20_0.png)
357+
![png](/img/guides/segment_anything_in_keras_hub/segment_anything_in_keras_hub_20_0.png)
358358

359359

360360

@@ -395,7 +395,7 @@ plt.show()
395395
```
396396
</div>
397397

398-
![png](/content/keras-io/guides/img/segment_anything_in_keras_hub/segment_anything_in_keras_hub_23_1.png)
398+
![png](/img/guides/segment_anything_in_keras_hub/segment_anything_in_keras_hub_23_1.png)
399399

400400

401401

@@ -442,7 +442,7 @@ plt.show()
442442
```
443443
</div>
444444

445-
![png](/content/keras-io/guides/img/segment_anything_in_keras_hub/segment_anything_in_keras_hub_25_1.png)
445+
![png](/img/guides/segment_anything_in_keras_hub/segment_anything_in_keras_hub_25_1.png)
446446

447447

448448

@@ -625,7 +625,7 @@ WARNING:matplotlib.image:Clipping input data to the valid range for imshow with
625625
```
626626
</div>
627627

628-
![png](/content/keras-io/guides/img/segment_anything_in_keras_hub/segment_anything_in_keras_hub_31_2.png)
628+
![png](/img/guides/segment_anything_in_keras_hub/segment_anything_in_keras_hub_31_2.png)
629629

630630

631631

@@ -690,7 +690,7 @@ WARNING:matplotlib.image:Clipping input data to the valid range for imshow with
690690
```
691691
</div>
692692

693-
![png](/content/keras-io/guides/img/segment_anything_in_keras_hub/segment_anything_in_keras_hub_35_1.png)
693+
![png](/img/guides/segment_anything_in_keras_hub/segment_anything_in_keras_hub_35_1.png)
694694

695695

696696

guides/md/keras_hub/stable_diffusion_3_in_keras_hub.md

Lines changed: 12 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ To get started, let's install a few dependencies and get images for our demo:
2828

2929

3030
```python
31-
!!pip install -Uq keras
32-
!!pip install -Uq git+https://github.com/keras-team/keras-hub.git
33-
!!wget --user-agent="User-Agent: Mozilla/5.0" -O mountain_dog.png https://i.imgur.com/3AHYG9Z.png
34-
!!wget --user-agent="User-Agent: Mozilla/5.0" -O mountain_dog_mask.png https://i.imgur.com/n3Prpj6.png
31+
!pip install -Uq keras
32+
!pip install -Uq git+https://github.com/keras-team/keras-hub.git
33+
!wget --user-agent="User-Agent: Mozilla/5.0" -O mountain_dog.png https://i.imgur.com/3AHYG9Z.png
34+
!wget --user-agent="User-Agent: Mozilla/5.0" -O mountain_dog_mask.png https://i.imgur.com/n3Prpj6.png
3535
```
3636

3737

@@ -50,22 +50,7 @@ import matplotlib.pyplot as plt
5050
import numpy as np
5151
from PIL import Image
5252
```
53-
<div class="k-default-codeblock">
54-
```
55-
['--2024-10-13 15:04:25-- https://i.imgur.com/n3Prpj6.png',
56-
'Resolving i.imgur.com (i.imgur.com)... 151.101.196.193',
57-
'Connecting to i.imgur.com (i.imgur.com)|151.101.196.193|:443... connected.',
58-
'HTTP request sent, awaiting response... 200 OK',
59-
'Length: 20520 (20K) [image/png]',
60-
'Saving to: ‘mountain_dog_mask.png’',
61-
'',
62-
' 0K .......... .......... 100% 676K=0.03s',
63-
'',
64-
'2024-10-13 15:04:26 (676 KB/s) - ‘mountain_dog_mask.png’ saved [20520/20520]',
65-
'']
6653

67-
```
68-
</div>
6954
---
7055
## Introduction
7156

@@ -139,21 +124,7 @@ preprocessor = keras_hub.models.StableDiffusion3TextToImagePreprocessor.from_pre
139124
text_to_image = keras_hub.models.StableDiffusion3TextToImage(backbone, preprocessor)
140125
```
141126

142-
<div class="k-default-codeblock">
143-
```
144-
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
145-
I0000 00:00:1728803077.293173 2901459 cuda_executor.cc:1015] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero. See more at https://github.com/torvalds/linux/blob/v6.0/Documentation/ABI/testing/sysfs-bus-pci#L344-L355
146-
I0000 00:00:1728803077.320598 2901459 cuda_executor.cc:1015] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero. See more at https://github.com/torvalds/linux/blob/v6.0/Documentation/ABI/testing/sysfs-bus-pci#L344-L355
147-
I0000 00:00:1728803077.320755 2901459 cuda_executor.cc:1015] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero. See more at https://github.com/torvalds/linux/blob/v6.0/Documentation/ABI/testing/sysfs-bus-pci#L344-L355
148-
I0000 00:00:1728803077.322098 2901459 cuda_executor.cc:1015] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero. See more at https://github.com/torvalds/linux/blob/v6.0/Documentation/ABI/testing/sysfs-bus-pci#L344-L355
149-
I0000 00:00:1728803077.322213 2901459 cuda_executor.cc:1015] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero. See more at https://github.com/torvalds/linux/blob/v6.0/Documentation/ABI/testing/sysfs-bus-pci#L344-L355
150-
I0000 00:00:1728803077.322309 2901459 cuda_executor.cc:1015] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero. See more at https://github.com/torvalds/linux/blob/v6.0/Documentation/ABI/testing/sysfs-bus-pci#L344-L355
151-
I0000 00:00:1728803077.325873 2901459 cuda_executor.cc:1015] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero. See more at https://github.com/torvalds/linux/blob/v6.0/Documentation/ABI/testing/sysfs-bus-pci#L344-L355
152-
I0000 00:00:1728803077.325981 2901459 cuda_executor.cc:1015] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero. See more at https://github.com/torvalds/linux/blob/v6.0/Documentation/ABI/testing/sysfs-bus-pci#L344-L355
153-
I0000 00:00:1728803077.326081 2901459 cuda_executor.cc:1015] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero. See more at https://github.com/torvalds/linux/blob/v6.0/Documentation/ABI/testing/sysfs-bus-pci#L344-L355
154127

155-
```
156-
</div>
157128
Next, we give it a prompt:
158129

159130

@@ -172,7 +143,7 @@ display_generated_images(generated_image)
172143

173144

174145

175-
![png](/home/hongyu/workspace/keras-io/guides/img/stable_diffusion_3_in_keras_hub/stable_diffusion_3_in_keras_hub_7_0.png)
146+
![png](/img/guides/stable_diffusion_3_in_keras_hub/stable_diffusion_3_in_keras_hub_7_0.png)
176147

177148

178149

@@ -253,7 +224,7 @@ display_generated_images(generated_images)
253224

254225

255226

256-
![png](/home/hongyu/workspace/keras-io/guides/img/stable_diffusion_3_in_keras_hub/stable_diffusion_3_in_keras_hub_10_0.png)
227+
![png](/img/guides/stable_diffusion_3_in_keras_hub/stable_diffusion_3_in_keras_hub_10_0.png)
257228

258229

259230

@@ -285,7 +256,7 @@ Cost time (`num_steps=50`): 6.18s
285256
```
286257
</div>
287258

288-
![png](/home/hongyu/workspace/keras-io/guides/img/stable_diffusion_3_in_keras_hub/stable_diffusion_3_in_keras_hub_12_3.png)
259+
![png](/img/guides/stable_diffusion_3_in_keras_hub/stable_diffusion_3_in_keras_hub_12_3.png)
289260

290261

291262

@@ -309,7 +280,7 @@ display_generated_images(generated_images)
309280

310281

311282

312-
![png](/home/hongyu/workspace/keras-io/guides/img/stable_diffusion_3_in_keras_hub/stable_diffusion_3_in_keras_hub_14_0.png)
283+
![png](/img/guides/stable_diffusion_3_in_keras_hub/stable_diffusion_3_in_keras_hub_14_0.png)
313284

314285

315286

@@ -331,7 +302,7 @@ display_generated_images(generated_images)
331302

332303

333304

334-
![png](/home/hongyu/workspace/keras-io/guides/img/stable_diffusion_3_in_keras_hub/stable_diffusion_3_in_keras_hub_16_0.png)
305+
![png](/img/guides/stable_diffusion_3_in_keras_hub/stable_diffusion_3_in_keras_hub_16_0.png)
335306

336307

337308

@@ -384,7 +355,7 @@ display_generated_images(
384355

385356

386357

387-
![png](/home/hongyu/workspace/keras-io/guides/img/stable_diffusion_3_in_keras_hub/stable_diffusion_3_in_keras_hub_19_0.png)
358+
![png](/img/guides/stable_diffusion_3_in_keras_hub/stable_diffusion_3_in_keras_hub_19_0.png)
388359

389360

390361

@@ -432,7 +403,7 @@ display_generated_images(generated_images)
432403

433404

434405

435-
![png](/home/hongyu/workspace/keras-io/guides/img/stable_diffusion_3_in_keras_hub/stable_diffusion_3_in_keras_hub_22_0.png)
406+
![png](/img/guides/stable_diffusion_3_in_keras_hub/stable_diffusion_3_in_keras_hub_22_0.png)
436407

437408

438409

@@ -484,7 +455,7 @@ display_generated_images(
484455

485456

486457

487-
![png](/home/hongyu/workspace/keras-io/guides/img/stable_diffusion_3_in_keras_hub/stable_diffusion_3_in_keras_hub_24_0.png)
458+
![png](/img/guides/stable_diffusion_3_in_keras_hub/stable_diffusion_3_in_keras_hub_24_0.png)
488459

489460

490461

0 commit comments

Comments
 (0)