Update README.md
Browse files
README.md
CHANGED
|
@@ -263,12 +263,12 @@ my_base_model = keras_cv.models.StableDiffusion(img_width=512, img_height=512)
|
|
| 263 |
```
|
| 264 |
### 4. Load Weights from the h5 model which is hosted on Hugging Face:
|
| 265 |
```python
|
| 266 |
-
my_base_model.diffusion_model.load_weights(path/to/file/renaissance_model.h5)
|
| 267 |
```
|
| 268 |
### 5. Create a variable to hold the values of the to-be-generated image such as prompt, batch size, iterations, and seed
|
| 269 |
```python
|
| 270 |
img = my_base_model.text_to_image(
|
| 271 |
-
prompt=A woman with an enigmatic smile against a dark background,
|
| 272 |
batch_size=1, # How many images to generate at once
|
| 273 |
num_steps=25, # Number of iterations (controls image quality)
|
| 274 |
seed=123, # Set this to always get the same image from the same prompt
|
|
@@ -279,7 +279,7 @@ img = my_base_model.text_to_image(
|
|
| 279 |
def plot_images(images):
|
| 280 |
plt.figure(figsize=(5, 5))
|
| 281 |
plt.imshow(images)
|
| 282 |
-
plt.axis(
|
| 283 |
|
| 284 |
plot_images(img)
|
| 285 |
```
|
|
|
|
| 263 |
```
|
| 264 |
### 4. Load Weights from the h5 model which is hosted on Hugging Face:
|
| 265 |
```python
|
| 266 |
+
my_base_model.diffusion_model.load_weights('path/to/file/renaissance_model.h5')
|
| 267 |
```
|
| 268 |
### 5. Create a variable to hold the values of the to-be-generated image such as prompt, batch size, iterations, and seed
|
| 269 |
```python
|
| 270 |
img = my_base_model.text_to_image(
|
| 271 |
+
prompt='A woman with an enigmatic smile against a dark background',
|
| 272 |
batch_size=1, # How many images to generate at once
|
| 273 |
num_steps=25, # Number of iterations (controls image quality)
|
| 274 |
seed=123, # Set this to always get the same image from the same prompt
|
|
|
|
| 279 |
def plot_images(images):
|
| 280 |
plt.figure(figsize=(5, 5))
|
| 281 |
plt.imshow(images)
|
| 282 |
+
plt.axis('off')
|
| 283 |
|
| 284 |
plot_images(img)
|
| 285 |
```
|