Update README.md
Browse files
README.md
CHANGED
@@ -158,6 +158,34 @@ grid
|
|
158 |
|
159 |
![image/png](https://cdn-uploads.huggingface.co/production/uploads/623ce1c6b66fedf374859fe7/0ROO1Ob2Z-GYPepYyyAGg.png)
|
160 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
161 |
## Fine-tuning script
|
162 |
|
163 |
Download this script: [SD2x DreamBooth-Fine-Tune.ipynb](https://huggingface.co/lamm-mit/SD2x-leaf-inspired/resolve/main/SD2x_DreamBooth_Fine-Tune.ipynb)
|
|
|
158 |
|
159 |
![image/png](https://cdn-uploads.huggingface.co/production/uploads/623ce1c6b66fedf374859fe7/0ROO1Ob2Z-GYPepYyyAGg.png)
|
160 |
|
161 |
+
|
162 |
+
We can further edit the image:
|
163 |
+
|
164 |
+
|
165 |
+
![image/png](https://cdn-uploads.huggingface.co/production/uploads/623ce1c6b66fedf374859fe7/c-1b4J-as6b2p9ZQSSLjK.png)
|
166 |
+
```
|
167 |
+
fname='image_grid_2-of-4__20240722_150458.png'
|
168 |
+
init_image = Image.open(fname).convert("RGB")
|
169 |
+
init_image = init_image.resize((768, 768))
|
170 |
+
|
171 |
+
prompt = "A nicely connected white spider web."
|
172 |
+
num_samples = 4
|
173 |
+
num_rows = 1
|
174 |
+
|
175 |
+
all_images = []
|
176 |
+
for _ in range(num_rows):
|
177 |
+
images = img2imgpipe(prompt, image=init_image,
|
178 |
+
num_images_per_prompt=num_samples, strength=0.8, num_inference_steps=10, guidance_scale=20).images
|
179 |
+
all_images.extend(images)
|
180 |
+
|
181 |
+
grid = image_grid(images, num_rows, num_samples, save_individual_files=True)
|
182 |
+
grid
|
183 |
+
```
|
184 |
+
![image/png](https://cdn-uploads.huggingface.co/production/uploads/623ce1c6b66fedf374859fe7/izv21tOqJntVAwes0TEzu.png)
|
185 |
+
|
186 |
+
A detailed view of one of them:
|
187 |
+
![image/png](https://cdn-uploads.huggingface.co/production/uploads/623ce1c6b66fedf374859fe7/Ik7RkGzrx0N8gkNfkei3j.png)
|
188 |
+
|
189 |
## Fine-tuning script
|
190 |
|
191 |
Download this script: [SD2x DreamBooth-Fine-Tune.ipynb](https://huggingface.co/lamm-mit/SD2x-leaf-inspired/resolve/main/SD2x_DreamBooth_Fine-Tune.ipynb)
|