ravi.naik commited on
Commit
ae99932
Β·
1 Parent(s): b87b512

Updated README & requirements.txt

Browse files
Files changed (2) hide show
  1. README.md +78 -2
  2. requirements.txt +0 -0
README.md CHANGED
@@ -1,5 +1,5 @@
1
  ---
2
- title: ERA SESSION20
3
  emoji: 🌍
4
  colorFrom: indigo
5
  colorTo: pink
@@ -10,4 +10,80 @@ pinned: false
10
  license: mit
11
  ---
12
 
13
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ title: ERA SESSION20 - Stable Diffusion: Generative Art with Guidance
3
  emoji: 🌍
4
  colorFrom: indigo
5
  colorTo: pink
 
10
  license: mit
11
  ---
12
 
13
+ **Styles Used:**
14
+ 1. [Oil style](https://huggingface.co/sd-concepts-library/oil-style)
15
+ 2. [Xyz](https://huggingface.co/sd-concepts-library/xyz)
16
+ 3. [Allante](https://huggingface.co/sd-concepts-library/style-of-marc-allante)
17
+ 4. [Moebius](https://huggingface.co/sd-concepts-library/moebius)
18
+ 5. [Polygons](https://huggingface.co/sd-concepts-library/low-poly-hd-logos-icons)
19
+
20
+ ### Result of Experiments with different styles:
21
+ **Prompt:** `"a cat and dog in the style of cs"` \
22
+ _"cs" in the prompt refers to "custom style" whose embedding is replaced by each of the concept embeddings shown below_
23
+ ![image](https://github.com/RaviNaik/ERA-SESSION20/assets/23289802/1effe375-6ef4-4adc-be7b-d6311fdaa50d)
24
+
25
+ ---
26
+ **Prompt:** `"dolphin swimming on Mars in the style of cs"`
27
+ ![image](https://github.com/RaviNaik/ERA-SESSION20/assets/23289802/2cd32248-4233-42c0-97c0-00e1ae8fdc85)
28
+
29
+ ### Result of Experiments with Guidance loss functions:
30
+ **Prompt:** `"a mouse in the style of cs"`
31
+ **Loss Function:**
32
+ ```python
33
+ def loss_fn(images):
34
+ return images.mean()
35
+ ```
36
+ ![image](https://github.com/RaviNaik/ERA-SESSION20/assets/23289802/c9d46e14-44bb-4ea7-88a4-26ef46344fce)
37
+ ---
38
+ ```python
39
+ def loss_fn(images):
40
+ return -images.median()/3
41
+ ```
42
+ ![image](https://github.com/RaviNaik/ERA-SESSION20/assets/23289802/2649e4f6-3de5-4e54-8f22-3d65874b7b07)
43
+ ---
44
+ ```python
45
+ def loss_fn(images):
46
+ error = (images - images.min()) / 255*(images.max() - images.min())
47
+ return error.mean()
48
+ ```
49
+ ![image](https://github.com/RaviNaik/ERA-SESSION20/assets/23289802/6399c780-e9b7-42f8-8d90-44c8b40d5265)
50
+ ---
51
+ **Prompt:** `"angry german shephard in the style of cs"`
52
+ ```python
53
+ def loss_fn(images):
54
+ error1 = torch.abs(images[:, 0] - 0.9)
55
+ error2 = torch.abs(images[:, 1] - 0.9)
56
+ error3 = torch.abs(images[:, 2] - 0.9)
57
+ return (
58
+ torch.sin(error1.mean()) + torch.sin(error2.mean()) + torch.sin(error3.mean())
59
+ ) / 3
60
+ ```
61
+ ![image](https://github.com/RaviNaik/ERA-SESSION20/assets/23289802/fa7d30ed-4efd-4504-b89c-94e093f51f9c)
62
+
63
+ ---
64
+ **Prompt:** `"A campfire (oil on canvas)"`
65
+ ```python
66
+ def loss_fn(images):
67
+ error1 = torch.abs(images[:, 0] - 0.9)
68
+ error2 = torch.abs(images[:, 1] - 0.9)
69
+ error3 = torch.abs(images[:, 2] - 0.9)
70
+ return (
71
+ torch.sin((error1 * error2 * error3)).mean()
72
+ + torch.cos((error1 * error2 * error3)).mean()
73
+ )
74
+ ```
75
+ ![image](https://github.com/RaviNaik/ERA-SESSION20/assets/23289802/88382dae-6701-4103-a664-ed17727b690f)
76
+
77
+ ---
78
+ ```python
79
+ def loss_fn(images):
80
+ error1 = torch.abs(images[:, 0] - 0.9)
81
+ error2 = torch.abs(images[:, 1] - 0.9)
82
+ error3 = torch.abs(images[:, 2] - 0.9)
83
+ return (
84
+ torch.sin(error1.mean()) + torch.sin(error2.mean()) + torch.sin(error3.mean())
85
+ ) / 3
86
+ ```
87
+ ![image](https://github.com/RaviNaik/ERA-SESSION20/assets/23289802/0ab3edad-579d-4821-b992-6c18b61bd444)
88
+
89
+
requirements.txt CHANGED
Binary files a/requirements.txt and b/requirements.txt differ