gen_compare_v11 initial
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- gen_compare_v11/README.md +102 -0
- gen_compare_v11/control_images.yaml +34 -0
- gen_compare_v11/control_images/anime2_512x512.png +3 -0
- gen_compare_v11/control_images/bird_512x512.png +3 -0
- gen_compare_v11/control_images/converted/canny_vermeer_512x512.png +3 -0
- gen_compare_v11/control_images/converted/colorshuffle_vermeer_512x512.png +3 -0
- gen_compare_v11/control_images/converted/hed_pexels-wallace-chuck-2383750_512x512.png +3 -0
- gen_compare_v11/control_images/converted/lineart_wolf_512x512.png +3 -0
- gen_compare_v11/control_images/converted/lineartanime_anime2_512x512.png +3 -0
- gen_compare_v11/control_images/converted/midas_pexels-sound-on-3760767_512x512.png +3 -0
- gen_compare_v11/control_images/converted/mlsd_room_512x512.png +3 -0
- gen_compare_v11/control_images/converted/normalbae_person_leaves_512x512.png +3 -0
- gen_compare_v11/control_images/converted/oneformer_adk20_house_512x512.png +3 -0
- gen_compare_v11/control_images/converted/oneformer_coco_house_512x512.png +3 -0
- gen_compare_v11/control_images/converted/openpose_pexels-sound-on-3760693_512x512.png +3 -0
- gen_compare_v11/control_images/converted/openpose_pexels-sound-on-3760767_512x512.png +3 -0
- gen_compare_v11/control_images/converted/openpose_pexels-sound-on-3760847_512x512.png +3 -0
- gen_compare_v11/control_images/converted/openpose_pexels-wallace-chuck-2383750_512x512.png +3 -0
- gen_compare_v11/control_images/converted/pidi_pexels-sound-on-3760767_512x512.png +3 -0
- gen_compare_v11/control_images/converted/shuffle_vermeer_512x512.png +3 -0
- gen_compare_v11/control_images/converted/uniformer_house_512x512.png +3 -0
- gen_compare_v11/control_images/converted/zoe_pexels-sound-on-3760767_512x512.png +3 -0
- gen_compare_v11/control_images/house_512x512.png +3 -0
- gen_compare_v11/control_images/human_512x512.png +3 -0
- gen_compare_v11/control_images/person_leaves_512x512.png +3 -0
- gen_compare_v11/control_images/pexels-sound-on-3760693_512x512.png +3 -0
- gen_compare_v11/control_images/pexels-sound-on-3760767_512x512.png +3 -0
- gen_compare_v11/control_images/pexels-sound-on-3760847_512x512.png +3 -0
- gen_compare_v11/control_images/pexels-wallace-chuck-2383750_512x512.png +3 -0
- gen_compare_v11/control_images/room_512x512.png +3 -0
- gen_compare_v11/control_images/vermeer_512x512.png +3 -0
- gen_compare_v11/control_images/wolf_512x512.png +3 -0
- gen_compare_v11/gen_diffusers_image.py +73 -0
- gen_compare_v11/gen_diffusers_image.sh +21 -0
- gen_compare_v11/gen_markdown.py +66 -0
- gen_compare_v11/gen_markdowns.sh +4 -0
- gen_compare_v11/gen_reference_image.py +77 -0
- gen_compare_v11/gen_reference_image.sh +21 -0
- gen_compare_v11/output_images/diffusers/output_p_sd15_canny_0_0.png +3 -0
- gen_compare_v11/output_images/diffusers/output_p_sd15_canny_0_1.png +3 -0
- gen_compare_v11/output_images/diffusers/output_p_sd15_canny_0_2.png +3 -0
- gen_compare_v11/output_images/diffusers/output_p_sd15_canny_0_3.png +3 -0
- gen_compare_v11/output_images/diffusers/output_p_sd15_depth_0_0.png +3 -0
- gen_compare_v11/output_images/diffusers/output_p_sd15_depth_0_1.png +3 -0
- gen_compare_v11/output_images/diffusers/output_p_sd15_depth_0_2.png +3 -0
- gen_compare_v11/output_images/diffusers/output_p_sd15_depth_0_3.png +3 -0
- gen_compare_v11/output_images/diffusers/output_p_sd15_depth_1_0.png +3 -0
- gen_compare_v11/output_images/diffusers/output_p_sd15_depth_1_1.png +3 -0
- gen_compare_v11/output_images/diffusers/output_p_sd15_depth_1_2.png +3 -0
- gen_compare_v11/output_images/diffusers/output_p_sd15_depth_1_3.png +3 -0
gen_compare_v11/README.md
ADDED
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# ControlNet Generation Comparison
|
2 |
+
|
3 |
+
## control_v11p_sd15_canny
|
4 |
+
|
5 |
+
|seed|conditional image|ref|diffusers|
|
6 |
+
|:---:|:---:|:---:|:---:|
|
7 |
+
|0|<a href="././control_images/converted//canny_vermeer_512x512.png"><img width="128" src="././control_images/converted//canny_vermeer_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_canny_0_0.png"><img width="128" src="./output_images/ref/output_p_sd15_canny_0_0.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_canny_0_0.png"><img width="128" src="./output_images/diffusers/output_p_sd15_canny_0_0.png"/></a>|
|
8 |
+
|1|<a href="././control_images/converted//canny_vermeer_512x512.png"><img width="128" src="././control_images/converted//canny_vermeer_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_canny_0_1.png"><img width="128" src="./output_images/ref/output_p_sd15_canny_0_1.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_canny_0_1.png"><img width="128" src="./output_images/diffusers/output_p_sd15_canny_0_1.png"/></a>|
|
9 |
+
|2|<a href="././control_images/converted//canny_vermeer_512x512.png"><img width="128" src="././control_images/converted//canny_vermeer_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_canny_0_2.png"><img width="128" src="./output_images/ref/output_p_sd15_canny_0_2.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_canny_0_2.png"><img width="128" src="./output_images/diffusers/output_p_sd15_canny_0_2.png"/></a>|
|
10 |
+
|3|<a href="././control_images/converted//canny_vermeer_512x512.png"><img width="128" src="././control_images/converted//canny_vermeer_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_canny_0_3.png"><img width="128" src="./output_images/ref/output_p_sd15_canny_0_3.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_canny_0_3.png"><img width="128" src="./output_images/diffusers/output_p_sd15_canny_0_3.png"/></a>|
|
11 |
+
## control_v11p_sd15_depth
|
12 |
+
|
13 |
+
|seed|conditional image|ref|diffusers|
|
14 |
+
|:---:|:---:|:---:|:---:|
|
15 |
+
|0|<a href="././control_images/converted//zoe_pexels-sound-on-3760767_512x512.png"><img width="128" src="././control_images/converted//zoe_pexels-sound-on-3760767_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_depth_0_0.png"><img width="128" src="./output_images/ref/output_p_sd15_depth_0_0.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_depth_0_0.png"><img width="128" src="./output_images/diffusers/output_p_sd15_depth_0_0.png"/></a>|
|
16 |
+
|1|<a href="././control_images/converted//zoe_pexels-sound-on-3760767_512x512.png"><img width="128" src="././control_images/converted//zoe_pexels-sound-on-3760767_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_depth_0_1.png"><img width="128" src="./output_images/ref/output_p_sd15_depth_0_1.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_depth_0_1.png"><img width="128" src="./output_images/diffusers/output_p_sd15_depth_0_1.png"/></a>|
|
17 |
+
|2|<a href="././control_images/converted//zoe_pexels-sound-on-3760767_512x512.png"><img width="128" src="././control_images/converted//zoe_pexels-sound-on-3760767_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_depth_0_2.png"><img width="128" src="./output_images/ref/output_p_sd15_depth_0_2.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_depth_0_2.png"><img width="128" src="./output_images/diffusers/output_p_sd15_depth_0_2.png"/></a>|
|
18 |
+
|3|<a href="././control_images/converted//zoe_pexels-sound-on-3760767_512x512.png"><img width="128" src="././control_images/converted//zoe_pexels-sound-on-3760767_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_depth_0_3.png"><img width="128" src="./output_images/ref/output_p_sd15_depth_0_3.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_depth_0_3.png"><img width="128" src="./output_images/diffusers/output_p_sd15_depth_0_3.png"/></a>|
|
19 |
+
|0|<a href="././control_images/converted//midas_pexels-sound-on-3760767_512x512.png"><img width="128" src="././control_images/converted//midas_pexels-sound-on-3760767_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_depth_1_0.png"><img width="128" src="./output_images/ref/output_p_sd15_depth_1_0.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_depth_1_0.png"><img width="128" src="./output_images/diffusers/output_p_sd15_depth_1_0.png"/></a>|
|
20 |
+
|1|<a href="././control_images/converted//midas_pexels-sound-on-3760767_512x512.png"><img width="128" src="././control_images/converted//midas_pexels-sound-on-3760767_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_depth_1_1.png"><img width="128" src="./output_images/ref/output_p_sd15_depth_1_1.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_depth_1_1.png"><img width="128" src="./output_images/diffusers/output_p_sd15_depth_1_1.png"/></a>|
|
21 |
+
|2|<a href="././control_images/converted//midas_pexels-sound-on-3760767_512x512.png"><img width="128" src="././control_images/converted//midas_pexels-sound-on-3760767_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_depth_1_2.png"><img width="128" src="./output_images/ref/output_p_sd15_depth_1_2.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_depth_1_2.png"><img width="128" src="./output_images/diffusers/output_p_sd15_depth_1_2.png"/></a>|
|
22 |
+
|3|<a href="././control_images/converted//midas_pexels-sound-on-3760767_512x512.png"><img width="128" src="././control_images/converted//midas_pexels-sound-on-3760767_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_depth_1_3.png"><img width="128" src="./output_images/ref/output_p_sd15_depth_1_3.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_depth_1_3.png"><img width="128" src="./output_images/diffusers/output_p_sd15_depth_1_3.png"/></a>|
|
23 |
+
## control_v11p_sd15_mlsd
|
24 |
+
|
25 |
+
|seed|conditional image|ref|diffusers|
|
26 |
+
|:---:|:---:|:---:|:---:|
|
27 |
+
|0|<a href="././control_images/converted//mlsd_room_512x512.png"><img width="128" src="././control_images/converted//mlsd_room_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_mlsd_0_0.png"><img width="128" src="./output_images/ref/output_p_sd15_mlsd_0_0.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_mlsd_0_0.png"><img width="128" src="./output_images/diffusers/output_p_sd15_mlsd_0_0.png"/></a>|
|
28 |
+
|1|<a href="././control_images/converted//mlsd_room_512x512.png"><img width="128" src="././control_images/converted//mlsd_room_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_mlsd_0_1.png"><img width="128" src="./output_images/ref/output_p_sd15_mlsd_0_1.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_mlsd_0_1.png"><img width="128" src="./output_images/diffusers/output_p_sd15_mlsd_0_1.png"/></a>|
|
29 |
+
|2|<a href="././control_images/converted//mlsd_room_512x512.png"><img width="128" src="././control_images/converted//mlsd_room_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_mlsd_0_2.png"><img width="128" src="./output_images/ref/output_p_sd15_mlsd_0_2.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_mlsd_0_2.png"><img width="128" src="./output_images/diffusers/output_p_sd15_mlsd_0_2.png"/></a>|
|
30 |
+
|3|<a href="././control_images/converted//mlsd_room_512x512.png"><img width="128" src="././control_images/converted//mlsd_room_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_mlsd_0_3.png"><img width="128" src="./output_images/ref/output_p_sd15_mlsd_0_3.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_mlsd_0_3.png"><img width="128" src="./output_images/diffusers/output_p_sd15_mlsd_0_3.png"/></a>|
|
31 |
+
## control_v11p_sd15_normalbae
|
32 |
+
|
33 |
+
|seed|conditional image|ref|diffusers|
|
34 |
+
|:---:|:---:|:---:|:---:|
|
35 |
+
|0|<a href="././control_images/converted//normalbae_person_leaves_512x512.png"><img width="128" src="././control_images/converted//normalbae_person_leaves_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_normalbae_0_0.png"><img width="128" src="./output_images/ref/output_p_sd15_normalbae_0_0.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_normalbae_0_0.png"><img width="128" src="./output_images/diffusers/output_p_sd15_normalbae_0_0.png"/></a>|
|
36 |
+
|1|<a href="././control_images/converted//normalbae_person_leaves_512x512.png"><img width="128" src="././control_images/converted//normalbae_person_leaves_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_normalbae_0_1.png"><img width="128" src="./output_images/ref/output_p_sd15_normalbae_0_1.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_normalbae_0_1.png"><img width="128" src="./output_images/diffusers/output_p_sd15_normalbae_0_1.png"/></a>|
|
37 |
+
|2|<a href="././control_images/converted//normalbae_person_leaves_512x512.png"><img width="128" src="././control_images/converted//normalbae_person_leaves_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_normalbae_0_2.png"><img width="128" src="./output_images/ref/output_p_sd15_normalbae_0_2.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_normalbae_0_2.png"><img width="128" src="./output_images/diffusers/output_p_sd15_normalbae_0_2.png"/></a>|
|
38 |
+
|3|<a href="././control_images/converted//normalbae_person_leaves_512x512.png"><img width="128" src="././control_images/converted//normalbae_person_leaves_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_normalbae_0_3.png"><img width="128" src="./output_images/ref/output_p_sd15_normalbae_0_3.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_normalbae_0_3.png"><img width="128" src="./output_images/diffusers/output_p_sd15_normalbae_0_3.png"/></a>|
|
39 |
+
## control_v11p_sd15_openpose
|
40 |
+
|
41 |
+
|seed|conditional image|ref|diffusers|
|
42 |
+
|:---:|:---:|:---:|:---:|
|
43 |
+
|0|<a href="././control_images/converted//openpose_pexels-sound-on-3760847_512x512.png"><img width="128" src="././control_images/converted//openpose_pexels-sound-on-3760847_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_openpose_0_0.png"><img width="128" src="./output_images/ref/output_p_sd15_openpose_0_0.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_openpose_0_0.png"><img width="128" src="./output_images/diffusers/output_p_sd15_openpose_0_0.png"/></a>|
|
44 |
+
|1|<a href="././control_images/converted//openpose_pexels-sound-on-3760847_512x512.png"><img width="128" src="././control_images/converted//openpose_pexels-sound-on-3760847_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_openpose_0_1.png"><img width="128" src="./output_images/ref/output_p_sd15_openpose_0_1.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_openpose_0_1.png"><img width="128" src="./output_images/diffusers/output_p_sd15_openpose_0_1.png"/></a>|
|
45 |
+
|2|<a href="././control_images/converted//openpose_pexels-sound-on-3760847_512x512.png"><img width="128" src="././control_images/converted//openpose_pexels-sound-on-3760847_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_openpose_0_2.png"><img width="128" src="./output_images/ref/output_p_sd15_openpose_0_2.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_openpose_0_2.png"><img width="128" src="./output_images/diffusers/output_p_sd15_openpose_0_2.png"/></a>|
|
46 |
+
|3|<a href="././control_images/converted//openpose_pexels-sound-on-3760847_512x512.png"><img width="128" src="././control_images/converted//openpose_pexels-sound-on-3760847_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_openpose_0_3.png"><img width="128" src="./output_images/ref/output_p_sd15_openpose_0_3.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_openpose_0_3.png"><img width="128" src="./output_images/diffusers/output_p_sd15_openpose_0_3.png"/></a>|
|
47 |
+
## control_v11p_sd15_scribble
|
48 |
+
|
49 |
+
|seed|conditional image|ref|diffusers|
|
50 |
+
|:---:|:---:|:---:|:---:|
|
51 |
+
|0|<a href="././control_images/converted//hed_pexels-wallace-chuck-2383750_512x512.png"><img width="128" src="././control_images/converted//hed_pexels-wallace-chuck-2383750_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_scribble_0_0.png"><img width="128" src="./output_images/ref/output_p_sd15_scribble_0_0.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_scribble_0_0.png"><img width="128" src="./output_images/diffusers/output_p_sd15_scribble_0_0.png"/></a>|
|
52 |
+
|1|<a href="././control_images/converted//hed_pexels-wallace-chuck-2383750_512x512.png"><img width="128" src="././control_images/converted//hed_pexels-wallace-chuck-2383750_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_scribble_0_1.png"><img width="128" src="./output_images/ref/output_p_sd15_scribble_0_1.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_scribble_0_1.png"><img width="128" src="./output_images/diffusers/output_p_sd15_scribble_0_1.png"/></a>|
|
53 |
+
|2|<a href="././control_images/converted//hed_pexels-wallace-chuck-2383750_512x512.png"><img width="128" src="././control_images/converted//hed_pexels-wallace-chuck-2383750_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_scribble_0_2.png"><img width="128" src="./output_images/ref/output_p_sd15_scribble_0_2.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_scribble_0_2.png"><img width="128" src="./output_images/diffusers/output_p_sd15_scribble_0_2.png"/></a>|
|
54 |
+
|3|<a href="././control_images/converted//hed_pexels-wallace-chuck-2383750_512x512.png"><img width="128" src="././control_images/converted//hed_pexels-wallace-chuck-2383750_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_scribble_0_3.png"><img width="128" src="./output_images/ref/output_p_sd15_scribble_0_3.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_scribble_0_3.png"><img width="128" src="./output_images/diffusers/output_p_sd15_scribble_0_3.png"/></a>|
|
55 |
+
|0|<a href="././control_images/converted//pidi_pexels-sound-on-3760767_512x512.png"><img width="128" src="././control_images/converted//pidi_pexels-sound-on-3760767_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_scribble_1_0.png"><img width="128" src="./output_images/ref/output_p_sd15_scribble_1_0.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_scribble_1_0.png"><img width="128" src="./output_images/diffusers/output_p_sd15_scribble_1_0.png"/></a>|
|
56 |
+
|1|<a href="././control_images/converted//pidi_pexels-sound-on-3760767_512x512.png"><img width="128" src="././control_images/converted//pidi_pexels-sound-on-3760767_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_scribble_1_1.png"><img width="128" src="./output_images/ref/output_p_sd15_scribble_1_1.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_scribble_1_1.png"><img width="128" src="./output_images/diffusers/output_p_sd15_scribble_1_1.png"/></a>|
|
57 |
+
|2|<a href="././control_images/converted//pidi_pexels-sound-on-3760767_512x512.png"><img width="128" src="././control_images/converted//pidi_pexels-sound-on-3760767_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_scribble_1_2.png"><img width="128" src="./output_images/ref/output_p_sd15_scribble_1_2.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_scribble_1_2.png"><img width="128" src="./output_images/diffusers/output_p_sd15_scribble_1_2.png"/></a>|
|
58 |
+
|3|<a href="././control_images/converted//pidi_pexels-sound-on-3760767_512x512.png"><img width="128" src="././control_images/converted//pidi_pexels-sound-on-3760767_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_scribble_1_3.png"><img width="128" src="./output_images/ref/output_p_sd15_scribble_1_3.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_scribble_1_3.png"><img width="128" src="./output_images/diffusers/output_p_sd15_scribble_1_3.png"/></a>|
|
59 |
+
## control_v11p_sd15_seg
|
60 |
+
|
61 |
+
|seed|conditional image|ref|diffusers|
|
62 |
+
|:---:|:---:|:---:|:---:|
|
63 |
+
|0|<a href="././control_images/converted//oneformer_adk20_house_512x512.png"><img width="128" src="././control_images/converted//oneformer_adk20_house_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_seg_0_0.png"><img width="128" src="./output_images/ref/output_p_sd15_seg_0_0.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_seg_0_0.png"><img width="128" src="./output_images/diffusers/output_p_sd15_seg_0_0.png"/></a>|
|
64 |
+
|1|<a href="././control_images/converted//oneformer_adk20_house_512x512.png"><img width="128" src="././control_images/converted//oneformer_adk20_house_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_seg_0_1.png"><img width="128" src="./output_images/ref/output_p_sd15_seg_0_1.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_seg_0_1.png"><img width="128" src="./output_images/diffusers/output_p_sd15_seg_0_1.png"/></a>|
|
65 |
+
|2|<a href="././control_images/converted//oneformer_adk20_house_512x512.png"><img width="128" src="././control_images/converted//oneformer_adk20_house_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_seg_0_2.png"><img width="128" src="./output_images/ref/output_p_sd15_seg_0_2.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_seg_0_2.png"><img width="128" src="./output_images/diffusers/output_p_sd15_seg_0_2.png"/></a>|
|
66 |
+
|3|<a href="././control_images/converted//oneformer_adk20_house_512x512.png"><img width="128" src="././control_images/converted//oneformer_adk20_house_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_seg_0_3.png"><img width="128" src="./output_images/ref/output_p_sd15_seg_0_3.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_seg_0_3.png"><img width="128" src="./output_images/diffusers/output_p_sd15_seg_0_3.png"/></a>|
|
67 |
+
|0|<a href="././control_images/converted//oneformer_coco_house_512x512.png"><img width="128" src="././control_images/converted//oneformer_coco_house_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_seg_1_0.png"><img width="128" src="./output_images/ref/output_p_sd15_seg_1_0.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_seg_1_0.png"><img width="128" src="./output_images/diffusers/output_p_sd15_seg_1_0.png"/></a>|
|
68 |
+
|1|<a href="././control_images/converted//oneformer_coco_house_512x512.png"><img width="128" src="././control_images/converted//oneformer_coco_house_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_seg_1_1.png"><img width="128" src="./output_images/ref/output_p_sd15_seg_1_1.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_seg_1_1.png"><img width="128" src="./output_images/diffusers/output_p_sd15_seg_1_1.png"/></a>|
|
69 |
+
|2|<a href="././control_images/converted//oneformer_coco_house_512x512.png"><img width="128" src="././control_images/converted//oneformer_coco_house_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_seg_1_2.png"><img width="128" src="./output_images/ref/output_p_sd15_seg_1_2.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_seg_1_2.png"><img width="128" src="./output_images/diffusers/output_p_sd15_seg_1_2.png"/></a>|
|
70 |
+
|3|<a href="././control_images/converted//oneformer_coco_house_512x512.png"><img width="128" src="././control_images/converted//oneformer_coco_house_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_seg_1_3.png"><img width="128" src="./output_images/ref/output_p_sd15_seg_1_3.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_seg_1_3.png"><img width="128" src="./output_images/diffusers/output_p_sd15_seg_1_3.png"/></a>|
|
71 |
+
|0|<a href="././control_images/converted//uniformer_house_512x512.png"><img width="128" src="././control_images/converted//uniformer_house_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_seg_2_0.png"><img width="128" src="./output_images/ref/output_p_sd15_seg_2_0.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_seg_2_0.png"><img width="128" src="./output_images/diffusers/output_p_sd15_seg_2_0.png"/></a>|
|
72 |
+
|1|<a href="././control_images/converted//uniformer_house_512x512.png"><img width="128" src="././control_images/converted//uniformer_house_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_seg_2_1.png"><img width="128" src="./output_images/ref/output_p_sd15_seg_2_1.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_seg_2_1.png"><img width="128" src="./output_images/diffusers/output_p_sd15_seg_2_1.png"/></a>|
|
73 |
+
|2|<a href="././control_images/converted//uniformer_house_512x512.png"><img width="128" src="././control_images/converted//uniformer_house_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_seg_2_2.png"><img width="128" src="./output_images/ref/output_p_sd15_seg_2_2.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_seg_2_2.png"><img width="128" src="./output_images/diffusers/output_p_sd15_seg_2_2.png"/></a>|
|
74 |
+
|3|<a href="././control_images/converted//uniformer_house_512x512.png"><img width="128" src="././control_images/converted//uniformer_house_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_seg_2_3.png"><img width="128" src="./output_images/ref/output_p_sd15_seg_2_3.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_seg_2_3.png"><img width="128" src="./output_images/diffusers/output_p_sd15_seg_2_3.png"/></a>|
|
75 |
+
## control_v11p_sd15_softedge
|
76 |
+
|
77 |
+
|seed|conditional image|ref|diffusers|
|
78 |
+
|:---:|:---:|:---:|:---:|
|
79 |
+
|0|<a href="././control_images/converted//hed_pexels-wallace-chuck-2383750_512x512.png"><img width="128" src="././control_images/converted//hed_pexels-wallace-chuck-2383750_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_softedge_0_0.png"><img width="128" src="./output_images/ref/output_p_sd15_softedge_0_0.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_softedge_0_0.png"><img width="128" src="./output_images/diffusers/output_p_sd15_softedge_0_0.png"/></a>|
|
80 |
+
|1|<a href="././control_images/converted//hed_pexels-wallace-chuck-2383750_512x512.png"><img width="128" src="././control_images/converted//hed_pexels-wallace-chuck-2383750_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_softedge_0_1.png"><img width="128" src="./output_images/ref/output_p_sd15_softedge_0_1.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_softedge_0_1.png"><img width="128" src="./output_images/diffusers/output_p_sd15_softedge_0_1.png"/></a>|
|
81 |
+
|2|<a href="././control_images/converted//hed_pexels-wallace-chuck-2383750_512x512.png"><img width="128" src="././control_images/converted//hed_pexels-wallace-chuck-2383750_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_softedge_0_2.png"><img width="128" src="./output_images/ref/output_p_sd15_softedge_0_2.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_softedge_0_2.png"><img width="128" src="./output_images/diffusers/output_p_sd15_softedge_0_2.png"/></a>|
|
82 |
+
|3|<a href="././control_images/converted//hed_pexels-wallace-chuck-2383750_512x512.png"><img width="128" src="././control_images/converted//hed_pexels-wallace-chuck-2383750_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_softedge_0_3.png"><img width="128" src="./output_images/ref/output_p_sd15_softedge_0_3.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_softedge_0_3.png"><img width="128" src="./output_images/diffusers/output_p_sd15_softedge_0_3.png"/></a>|
|
83 |
+
|0|<a href="././control_images/converted//pidi_pexels-sound-on-3760767_512x512.png"><img width="128" src="././control_images/converted//pidi_pexels-sound-on-3760767_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_softedge_1_0.png"><img width="128" src="./output_images/ref/output_p_sd15_softedge_1_0.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_softedge_1_0.png"><img width="128" src="./output_images/diffusers/output_p_sd15_softedge_1_0.png"/></a>|
|
84 |
+
|1|<a href="././control_images/converted//pidi_pexels-sound-on-3760767_512x512.png"><img width="128" src="././control_images/converted//pidi_pexels-sound-on-3760767_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_softedge_1_1.png"><img width="128" src="./output_images/ref/output_p_sd15_softedge_1_1.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_softedge_1_1.png"><img width="128" src="./output_images/diffusers/output_p_sd15_softedge_1_1.png"/></a>|
|
85 |
+
|2|<a href="././control_images/converted//pidi_pexels-sound-on-3760767_512x512.png"><img width="128" src="././control_images/converted//pidi_pexels-sound-on-3760767_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_softedge_1_2.png"><img width="128" src="./output_images/ref/output_p_sd15_softedge_1_2.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_softedge_1_2.png"><img width="128" src="./output_images/diffusers/output_p_sd15_softedge_1_2.png"/></a>|
|
86 |
+
|3|<a href="././control_images/converted//pidi_pexels-sound-on-3760767_512x512.png"><img width="128" src="././control_images/converted//pidi_pexels-sound-on-3760767_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_softedge_1_3.png"><img width="128" src="./output_images/ref/output_p_sd15_softedge_1_3.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_softedge_1_3.png"><img width="128" src="./output_images/diffusers/output_p_sd15_softedge_1_3.png"/></a>|
|
87 |
+
## control_v11p_sd15_lineart
|
88 |
+
|
89 |
+
|seed|conditional image|ref|diffusers|
|
90 |
+
|:---:|:---:|:---:|:---:|
|
91 |
+
|0|<a href="././control_images/converted//lineart_wolf_512x512.png"><img width="128" src="././control_images/converted//lineart_wolf_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_lineart_0_0.png"><img width="128" src="./output_images/ref/output_p_sd15_lineart_0_0.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_lineart_0_0.png"><img width="128" src="./output_images/diffusers/output_p_sd15_lineart_0_0.png"/></a>|
|
92 |
+
|1|<a href="././control_images/converted//lineart_wolf_512x512.png"><img width="128" src="././control_images/converted//lineart_wolf_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_lineart_0_1.png"><img width="128" src="./output_images/ref/output_p_sd15_lineart_0_1.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_lineart_0_1.png"><img width="128" src="./output_images/diffusers/output_p_sd15_lineart_0_1.png"/></a>|
|
93 |
+
|2|<a href="././control_images/converted//lineart_wolf_512x512.png"><img width="128" src="././control_images/converted//lineart_wolf_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_lineart_0_2.png"><img width="128" src="./output_images/ref/output_p_sd15_lineart_0_2.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_lineart_0_2.png"><img width="128" src="./output_images/diffusers/output_p_sd15_lineart_0_2.png"/></a>|
|
94 |
+
|3|<a href="././control_images/converted//lineart_wolf_512x512.png"><img width="128" src="././control_images/converted//lineart_wolf_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15_lineart_0_3.png"><img width="128" src="./output_images/ref/output_p_sd15_lineart_0_3.png"/></a>|<a href="./output_images/diffusers/output_p_sd15_lineart_0_3.png"><img width="128" src="./output_images/diffusers/output_p_sd15_lineart_0_3.png"/></a>|
|
95 |
+
## control_v11p_sd15s2_lineart_anime
|
96 |
+
|
97 |
+
|seed|conditional image|ref|diffusers|
|
98 |
+
|:---:|:---:|:---:|:---:|
|
99 |
+
|0|<a href="././control_images/converted//lineartanime_anime2_512x512.png"><img width="128" src="././control_images/converted//lineartanime_anime2_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15s2_lineart_anime_0_0.png"><img width="128" src="./output_images/ref/output_p_sd15s2_lineart_anime_0_0.png"/></a>|<a href="./output_images/diffusers/output_p_sd15s2_lineart_anime_0_0.png"><img width="128" src="./output_images/diffusers/output_p_sd15s2_lineart_anime_0_0.png"/></a>|
|
100 |
+
|1|<a href="././control_images/converted//lineartanime_anime2_512x512.png"><img width="128" src="././control_images/converted//lineartanime_anime2_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15s2_lineart_anime_0_1.png"><img width="128" src="./output_images/ref/output_p_sd15s2_lineart_anime_0_1.png"/></a>|<a href="./output_images/diffusers/output_p_sd15s2_lineart_anime_0_1.png"><img width="128" src="./output_images/diffusers/output_p_sd15s2_lineart_anime_0_1.png"/></a>|
|
101 |
+
|2|<a href="././control_images/converted//lineartanime_anime2_512x512.png"><img width="128" src="././control_images/converted//lineartanime_anime2_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15s2_lineart_anime_0_2.png"><img width="128" src="./output_images/ref/output_p_sd15s2_lineart_anime_0_2.png"/></a>|<a href="./output_images/diffusers/output_p_sd15s2_lineart_anime_0_2.png"><img width="128" src="./output_images/diffusers/output_p_sd15s2_lineart_anime_0_2.png"/></a>|
|
102 |
+
|3|<a href="././control_images/converted//lineartanime_anime2_512x512.png"><img width="128" src="././control_images/converted//lineartanime_anime2_512x512.png"/></a>|<a href="./output_images/ref/output_p_sd15s2_lineart_anime_0_3.png"><img width="128" src="./output_images/ref/output_p_sd15s2_lineart_anime_0_3.png"/></a>|<a href="./output_images/diffusers/output_p_sd15s2_lineart_anime_0_3.png"><img width="128" src="./output_images/diffusers/output_p_sd15s2_lineart_anime_0_3.png"/></a>|
|
gen_compare_v11/control_images.yaml
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
p_sd15_canny:
|
2 |
+
- canny_vermeer_512x512.png
|
3 |
+
p_sd15_depth:
|
4 |
+
- zoe_pexels-sound-on-3760767_512x512.png
|
5 |
+
- midas_pexels-sound-on-3760767_512x512.png
|
6 |
+
p_sd15_lineart:
|
7 |
+
- lineart_wolf_512x512.png
|
8 |
+
p_sd15_mlsd:
|
9 |
+
- mlsd_room_512x512.png
|
10 |
+
p_sd15_normalbae:
|
11 |
+
- normalbae_person_leaves_512x512.png
|
12 |
+
p_sd15_openpose:
|
13 |
+
- openpose_pexels-sound-on-3760847_512x512.png
|
14 |
+
# - openpose_pexels-sound-on-3760693_512x512.png
|
15 |
+
# - openpose_pexels-sound-on-3760767_512x512.png
|
16 |
+
# - openpose_pexels-wallace-chuck-2383750_512x512.png
|
17 |
+
p_sd15_scribble:
|
18 |
+
- hed_pexels-wallace-chuck-2383750_512x512.png
|
19 |
+
- pidi_pexels-sound-on-3760767_512x512.png
|
20 |
+
p_sd15_softedge:
|
21 |
+
- hed_pexels-wallace-chuck-2383750_512x512.png
|
22 |
+
- pidi_pexels-sound-on-3760767_512x512.png
|
23 |
+
p_sd15_seg:
|
24 |
+
- oneformer_adk20_house_512x512.png
|
25 |
+
- oneformer_coco_house_512x512.png
|
26 |
+
- uniformer_house_512x512.png
|
27 |
+
p_sd15s2_lineart_anime:
|
28 |
+
- lineartanime_anime2_512x512.png
|
29 |
+
# p_sd15_inpaint:
|
30 |
+
# e_sd15_shuffle:
|
31 |
+
# - colorshuffle_vermeer_512x512.png
|
32 |
+
# - shuffle_vermeer_512x512.png
|
33 |
+
# e_sd15_ip2p:
|
34 |
+
# u_sd15_tile:
|
gen_compare_v11/control_images/anime2_512x512.png
ADDED
Git LFS Details
|
gen_compare_v11/control_images/bird_512x512.png
ADDED
Git LFS Details
|
gen_compare_v11/control_images/converted/canny_vermeer_512x512.png
ADDED
Git LFS Details
|
gen_compare_v11/control_images/converted/colorshuffle_vermeer_512x512.png
ADDED
Git LFS Details
|
gen_compare_v11/control_images/converted/hed_pexels-wallace-chuck-2383750_512x512.png
ADDED
Git LFS Details
|
gen_compare_v11/control_images/converted/lineart_wolf_512x512.png
ADDED
Git LFS Details
|
gen_compare_v11/control_images/converted/lineartanime_anime2_512x512.png
ADDED
Git LFS Details
|
gen_compare_v11/control_images/converted/midas_pexels-sound-on-3760767_512x512.png
ADDED
Git LFS Details
|
gen_compare_v11/control_images/converted/mlsd_room_512x512.png
ADDED
Git LFS Details
|
gen_compare_v11/control_images/converted/normalbae_person_leaves_512x512.png
ADDED
Git LFS Details
|
gen_compare_v11/control_images/converted/oneformer_adk20_house_512x512.png
ADDED
Git LFS Details
|
gen_compare_v11/control_images/converted/oneformer_coco_house_512x512.png
ADDED
Git LFS Details
|
gen_compare_v11/control_images/converted/openpose_pexels-sound-on-3760693_512x512.png
ADDED
Git LFS Details
|
gen_compare_v11/control_images/converted/openpose_pexels-sound-on-3760767_512x512.png
ADDED
Git LFS Details
|
gen_compare_v11/control_images/converted/openpose_pexels-sound-on-3760847_512x512.png
ADDED
Git LFS Details
|
gen_compare_v11/control_images/converted/openpose_pexels-wallace-chuck-2383750_512x512.png
ADDED
Git LFS Details
|
gen_compare_v11/control_images/converted/pidi_pexels-sound-on-3760767_512x512.png
ADDED
Git LFS Details
|
gen_compare_v11/control_images/converted/shuffle_vermeer_512x512.png
ADDED
Git LFS Details
|
gen_compare_v11/control_images/converted/uniformer_house_512x512.png
ADDED
Git LFS Details
|
gen_compare_v11/control_images/converted/zoe_pexels-sound-on-3760767_512x512.png
ADDED
Git LFS Details
|
gen_compare_v11/control_images/house_512x512.png
ADDED
Git LFS Details
|
gen_compare_v11/control_images/human_512x512.png
ADDED
Git LFS Details
|
gen_compare_v11/control_images/person_leaves_512x512.png
ADDED
Git LFS Details
|
gen_compare_v11/control_images/pexels-sound-on-3760693_512x512.png
ADDED
Git LFS Details
|
gen_compare_v11/control_images/pexels-sound-on-3760767_512x512.png
ADDED
Git LFS Details
|
gen_compare_v11/control_images/pexels-sound-on-3760847_512x512.png
ADDED
Git LFS Details
|
gen_compare_v11/control_images/pexels-wallace-chuck-2383750_512x512.png
ADDED
Git LFS Details
|
gen_compare_v11/control_images/room_512x512.png
ADDED
Git LFS Details
|
gen_compare_v11/control_images/vermeer_512x512.png
ADDED
Git LFS Details
|
gen_compare_v11/control_images/wolf_512x512.png
ADDED
Git LFS Details
|
gen_compare_v11/gen_diffusers_image.py
ADDED
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Diffusers' ControlNet Implementation Subjective Evaluation
|
2 |
+
|
3 |
+
import einops
|
4 |
+
import numpy as np
|
5 |
+
import torch
|
6 |
+
import sys
|
7 |
+
import os
|
8 |
+
import yaml
|
9 |
+
|
10 |
+
from diffusers import StableDiffusionControlNetPipeline, ControlNetModel, DDIMScheduler
|
11 |
+
|
12 |
+
from PIL import Image
|
13 |
+
|
14 |
+
test_prompt = "best quality, extremely detailed"
|
15 |
+
test_negative_prompt = "lowres, bad anatomy, worst quality, low quality"
|
16 |
+
|
17 |
+
def generate_image(seed, prompt, negative_prompt, control, guess_mode=False):
|
18 |
+
latent = torch.randn((1,4,64,64), device="cpu", generator=torch.Generator(device="cpu").manual_seed(seed)).cuda()
|
19 |
+
image = pipe(
|
20 |
+
prompt=prompt,
|
21 |
+
negative_prompt=negative_prompt,
|
22 |
+
guidance_scale=4.0 if guess_mode else 9.0,
|
23 |
+
num_inference_steps=50 if guess_mode else 20,
|
24 |
+
latents=latent,
|
25 |
+
image=control,
|
26 |
+
# guess_mode=guess_mode,
|
27 |
+
).images[0]
|
28 |
+
return image
|
29 |
+
|
30 |
+
def control_images(control_image_folder, model_name):
|
31 |
+
with open('./control_images.yaml', 'r') as f:
|
32 |
+
d = yaml.safe_load(f)
|
33 |
+
filenames = d[model_name]
|
34 |
+
return [Image.open(f'{control_image_folder}/{fn}').convert("RGB") for fn in filenames]
|
35 |
+
|
36 |
+
if __name__ == '__main__':
|
37 |
+
model_name = sys.argv[1]
|
38 |
+
control_image_folder = './control_images/converted/'
|
39 |
+
output_image_folder = './output_images/diffusers/'
|
40 |
+
os.makedirs(output_image_folder, exist_ok=True)
|
41 |
+
|
42 |
+
model_id = 'takuma104/control_v11'
|
43 |
+
subfolder = f'control_v11{model_name}'
|
44 |
+
|
45 |
+
controlnet = ControlNetModel.from_pretrained(model_id, subfolder=subfolder)
|
46 |
+
if model_name == 'p_sd15s2_lineart_anime':
|
47 |
+
base_model_id = 'Linaqruf/anything-v3.0'
|
48 |
+
base_model_revision = None
|
49 |
+
else:
|
50 |
+
base_model_id = "runwayml/stable-diffusion-v1-5"
|
51 |
+
base_model_revision = 'non-ema'
|
52 |
+
|
53 |
+
pipe = StableDiffusionControlNetPipeline.from_pretrained(base_model_id,
|
54 |
+
revision=base_model_revision,
|
55 |
+
controlnet=controlnet,
|
56 |
+
safety_checker=None).to("cuda")
|
57 |
+
pipe.scheduler = DDIMScheduler.from_config(pipe.scheduler.config)
|
58 |
+
|
59 |
+
for i, control_image in enumerate(control_images(control_image_folder, model_name)):
|
60 |
+
control = np.array(control_image)[:,:,::-1].copy()
|
61 |
+
control = torch.from_numpy(control).float().cuda() / 255.0
|
62 |
+
control = torch.stack([control for _ in range(1)], dim=0)
|
63 |
+
control = einops.rearrange(control, 'b h w c -> b c h w').clone()
|
64 |
+
|
65 |
+
# if model_name == 'p_sd15_normalbae': # workaround, this should not be necessary
|
66 |
+
# control = torch.flip(control, dims=[1]) # RGB -> BGR
|
67 |
+
|
68 |
+
for seed in range(4):
|
69 |
+
image = generate_image(seed=seed,
|
70 |
+
prompt=test_prompt,
|
71 |
+
negative_prompt=test_negative_prompt,
|
72 |
+
control=control)
|
73 |
+
image.save(f'{output_image_folder}output_{model_name}_{i}_{seed}.png')
|
gen_compare_v11/gen_diffusers_image.sh
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/bin/bash
|
2 |
+
|
3 |
+
models=(
|
4 |
+
"p_sd15_canny"
|
5 |
+
"p_sd15_depth"
|
6 |
+
"p_sd15_mlsd"
|
7 |
+
"p_sd15_normalbae"
|
8 |
+
"p_sd15_openpose"
|
9 |
+
"p_sd15_scribble"
|
10 |
+
"p_sd15_seg"
|
11 |
+
"p_sd15_softedge"
|
12 |
+
"p_sd15_lineart"
|
13 |
+
"p_sd15s2_lineart_anime"
|
14 |
+
)
|
15 |
+
# models=("p_sd15_inpaint" "e_sd15_shuffle" "e_sd15_ip2p" "u_sd15_tile")
|
16 |
+
|
17 |
+
for model in "${models[@]}"
|
18 |
+
do
|
19 |
+
echo $model
|
20 |
+
python gen_diffusers_image.py $model
|
21 |
+
done
|
gen_compare_v11/gen_markdown.py
ADDED
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import sys
|
2 |
+
import yaml
|
3 |
+
import os
|
4 |
+
|
5 |
+
cnet_models = [
|
6 |
+
"p_sd15_canny",
|
7 |
+
"p_sd15_depth",
|
8 |
+
"p_sd15_mlsd" ,
|
9 |
+
"p_sd15_normalbae",
|
10 |
+
"p_sd15_openpose",
|
11 |
+
"p_sd15_scribble",
|
12 |
+
"p_sd15_seg",
|
13 |
+
"p_sd15_softedge",
|
14 |
+
"p_sd15_lineart",
|
15 |
+
"p_sd15s2_lineart_anime",
|
16 |
+
# "p_sd15_inpaint",
|
17 |
+
# "e_sd15_shuffle",
|
18 |
+
# "e_sd15_ip2p",
|
19 |
+
# "u_sd15_tile",
|
20 |
+
]
|
21 |
+
|
22 |
+
processors = ["ref", "diffusers"]
|
23 |
+
|
24 |
+
print(f"# ControlNet Generation Comparison")
|
25 |
+
print("")
|
26 |
+
|
27 |
+
def control_image_filenames(model_name):
|
28 |
+
with open('./control_images.yaml', 'r') as f:
|
29 |
+
d = yaml.safe_load(f)
|
30 |
+
return d[model_name]
|
31 |
+
|
32 |
+
def print_header():
|
33 |
+
print("|seed|conditional image|", end="")
|
34 |
+
for proc in processors:
|
35 |
+
print(f"{proc}|", end="")
|
36 |
+
print("")
|
37 |
+
|
38 |
+
print("|", end="")
|
39 |
+
for _ in range(len(processors) + 2):
|
40 |
+
print(":---:|", end="")
|
41 |
+
print("")
|
42 |
+
|
43 |
+
def get_url(path):
|
44 |
+
url = "./"
|
45 |
+
# url = 'https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare_v11/'
|
46 |
+
return url + path
|
47 |
+
|
48 |
+
control_image_folder = './control_images/converted/'
|
49 |
+
|
50 |
+
for cnet in cnet_models:
|
51 |
+
print(f"## control_v11{cnet}")
|
52 |
+
print("")
|
53 |
+
print_header()
|
54 |
+
|
55 |
+
for i, control_image_fn in enumerate(control_image_filenames(cnet)):
|
56 |
+
for seed in range(4):
|
57 |
+
print(f"|{seed}|", end="")
|
58 |
+
|
59 |
+
url = get_url(path=f"{control_image_folder}/{control_image_fn}")
|
60 |
+
print(f'<a href="{url}"><img width="128" src="{url}"/></a>|', end="")
|
61 |
+
|
62 |
+
for proc in processors:
|
63 |
+
url = get_url(path=f"output_images/{proc}/output_{cnet}_{i}_{seed:01d}.png")
|
64 |
+
print(f'<a href="{url}"><img width="128" src="{url}"/></a>|', end="")
|
65 |
+
|
66 |
+
print("")
|
gen_compare_v11/gen_markdowns.sh
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/bin/bash
|
2 |
+
|
3 |
+
python gen_markdown.py > README.md
|
4 |
+
|
gen_compare_v11/gen_reference_image.py
ADDED
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# from https://github.com/lllyasviel/ControlNet/blob/main/gradio_canny2image.py
|
2 |
+
|
3 |
+
import einops
|
4 |
+
import numpy as np
|
5 |
+
import torch
|
6 |
+
from PIL import Image
|
7 |
+
import sys
|
8 |
+
import os
|
9 |
+
import yaml
|
10 |
+
|
11 |
+
CONTROL_NET_PATH = '../../../ControlNet-v1-1-nightly'
|
12 |
+
CONTROL_NET_MODEL_PATH = '../../ControlNet-v1-1'
|
13 |
+
sys.path.append(CONTROL_NET_PATH)
|
14 |
+
|
15 |
+
from share import *
|
16 |
+
from pytorch_lightning import seed_everything
|
17 |
+
from cldm.model import create_model, load_state_dict
|
18 |
+
from cldm.ddim_hacked import DDIMSampler
|
19 |
+
from diffusers.utils import load_image
|
20 |
+
|
21 |
+
test_prompt = "best quality, extremely detailed"
|
22 |
+
test_negative_prompt = "lowres, bad anatomy, worst quality, low quality"
|
23 |
+
|
24 |
+
@torch.no_grad()
|
25 |
+
def generate(prompt, n_prompt, seed, control, ddim_steps=20, eta=0.0, scale=9.0, H=512, W=512, strength = 1.0, guess_mode=False):
|
26 |
+
seed_everything(seed)
|
27 |
+
|
28 |
+
cond = {"c_concat": [control], "c_crossattn": [model.get_learned_conditioning([prompt] * num_samples)]}
|
29 |
+
un_cond = {"c_concat": None if guess_mode else [control], "c_crossattn": [model.get_learned_conditioning([n_prompt] * num_samples)]}
|
30 |
+
shape = (4, H // 8, W // 8)
|
31 |
+
|
32 |
+
model.control_scales = [strength * (0.825 ** float(12 - i)) for i in range(13)] if guess_mode else ([strength] * 13) # Magic number. IDK why. Perhaps because 0.825**12<0.01 but 0.826**12>0.01
|
33 |
+
latent = torch.randn((1,) + shape, device="cpu", generator=torch.Generator(device="cpu").manual_seed(seed)).cuda()
|
34 |
+
samples, intermediates = ddim_sampler.sample(ddim_steps, num_samples,
|
35 |
+
shape, cond, x_T=latent,
|
36 |
+
verbose=False, eta=eta,
|
37 |
+
unconditional_guidance_scale=scale,
|
38 |
+
unconditional_conditioning=un_cond)
|
39 |
+
x_samples = model.decode_first_stage(samples)
|
40 |
+
x_samples = (einops.rearrange(x_samples, 'b c h w -> b h w c') * 127.5 + 127.5).cpu().numpy().clip(0, 255).astype(np.uint8)
|
41 |
+
|
42 |
+
return Image.fromarray(x_samples[0])
|
43 |
+
|
44 |
+
def control_images(control_image_folder, model_name):
|
45 |
+
with open('./control_images.yaml', 'r') as f:
|
46 |
+
d = yaml.safe_load(f)
|
47 |
+
filenames = d[model_name]
|
48 |
+
return [Image.open(f'{control_image_folder}/{fn}').convert("RGB") for fn in filenames]
|
49 |
+
|
50 |
+
if __name__ == '__main__':
|
51 |
+
model_name = sys.argv[1]
|
52 |
+
|
53 |
+
control_image_folder = './control_images/converted/'
|
54 |
+
output_image_folder = './output_images/ref/'
|
55 |
+
os.makedirs(output_image_folder, exist_ok=True)
|
56 |
+
|
57 |
+
if model_name == 'p_sd15s2_lineart_anime':
|
58 |
+
base_model_file = 'anything-v3-full.safetensors'
|
59 |
+
else:
|
60 |
+
base_model_file = 'v1-5-pruned.ckpt'
|
61 |
+
|
62 |
+
num_samples = 1
|
63 |
+
model = create_model(f'{CONTROL_NET_MODEL_PATH}/control_v11{model_name}.yaml').cpu()
|
64 |
+
model.load_state_dict(load_state_dict(f'{CONTROL_NET_PATH}/models/{base_model_file}', location='cuda'), strict=False)
|
65 |
+
model.load_state_dict(load_state_dict(f'{CONTROL_NET_MODEL_PATH}/control_v11{model_name}.pth', location='cuda'), strict=False)
|
66 |
+
model = model.cuda()
|
67 |
+
ddim_sampler = DDIMSampler(model)
|
68 |
+
|
69 |
+
for i, control_image in enumerate(control_images(control_image_folder, model_name)):
|
70 |
+
control = np.array(control_image)[:,:,::-1].copy()
|
71 |
+
control = torch.from_numpy(control).float().cuda() / 255.0
|
72 |
+
control = torch.stack([control for _ in range(num_samples)], dim=0)
|
73 |
+
control = einops.rearrange(control, 'b h w c -> b c h w').clone()
|
74 |
+
|
75 |
+
for seed in range(4):
|
76 |
+
image = generate(test_prompt, test_negative_prompt, seed=seed, control=control)
|
77 |
+
image.save(f'{output_image_folder}output_{model_name}_{i}_{seed}.png')
|
gen_compare_v11/gen_reference_image.sh
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/bin/bash
|
2 |
+
|
3 |
+
models=(
|
4 |
+
"p_sd15_canny"
|
5 |
+
"p_sd15_depth"
|
6 |
+
"p_sd15_mlsd"
|
7 |
+
"p_sd15_normalbae"
|
8 |
+
"p_sd15_openpose"
|
9 |
+
"p_sd15_scribble"
|
10 |
+
"p_sd15_seg"
|
11 |
+
"p_sd15_softedge"
|
12 |
+
"p_sd15_lineart"
|
13 |
+
"p_sd15s2_lineart_anime"
|
14 |
+
)
|
15 |
+
# models=("p_sd15_inpaint" "e_sd15_shuffle" "e_sd15_ip2p" "u_sd15_tile")
|
16 |
+
|
17 |
+
for model in "${models[@]}"
|
18 |
+
do
|
19 |
+
echo $model
|
20 |
+
python gen_reference_image.py $model
|
21 |
+
done
|
gen_compare_v11/output_images/diffusers/output_p_sd15_canny_0_0.png
ADDED
Git LFS Details
|
gen_compare_v11/output_images/diffusers/output_p_sd15_canny_0_1.png
ADDED
Git LFS Details
|
gen_compare_v11/output_images/diffusers/output_p_sd15_canny_0_2.png
ADDED
Git LFS Details
|
gen_compare_v11/output_images/diffusers/output_p_sd15_canny_0_3.png
ADDED
Git LFS Details
|
gen_compare_v11/output_images/diffusers/output_p_sd15_depth_0_0.png
ADDED
Git LFS Details
|
gen_compare_v11/output_images/diffusers/output_p_sd15_depth_0_1.png
ADDED
Git LFS Details
|
gen_compare_v11/output_images/diffusers/output_p_sd15_depth_0_2.png
ADDED
Git LFS Details
|
gen_compare_v11/output_images/diffusers/output_p_sd15_depth_0_3.png
ADDED
Git LFS Details
|
gen_compare_v11/output_images/diffusers/output_p_sd15_depth_1_0.png
ADDED
Git LFS Details
|
gen_compare_v11/output_images/diffusers/output_p_sd15_depth_1_1.png
ADDED
Git LFS Details
|
gen_compare_v11/output_images/diffusers/output_p_sd15_depth_1_2.png
ADDED
Git LFS Details
|
gen_compare_v11/output_images/diffusers/output_p_sd15_depth_1_3.png
ADDED
Git LFS Details
|