AlStable Alashazam commited on
Commit
bca5f82
0 Parent(s):

Duplicate from Alashazam/Harmony

Browse files

Co-authored-by: Allakhazam <Alashazam@users.noreply.huggingface.co>

Files changed (3) hide show
  1. .gitattributes +34 -0
  2. README.md +12 -0
  3. app.py +45 -0
.gitattributes ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tflite filter=lfs diff=lfs merge=lfs -text
29
+ *.tgz filter=lfs diff=lfs merge=lfs -text
30
+ *.wasm filter=lfs diff=lfs merge=lfs -text
31
+ *.xz filter=lfs diff=lfs merge=lfs -text
32
+ *.zip filter=lfs diff=lfs merge=lfs -text
33
+ *.zst filter=lfs diff=lfs merge=lfs -text
34
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: Harmony Prompts
3
+ emoji: 🧙🏻‍♂️
4
+ colorFrom: indigo
5
+ colorTo: purple
6
+ sdk: gradio
7
+ sdk_version: 3.15.0
8
+ app_file: app.py
9
+ duplicated_from: Alashazam/Harmony
10
+ ---
11
+
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
app.py ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio
2
+
3
+ class Model:
4
+ def __init__(self, name, path="", prefix=""):
5
+ self.name = name
6
+ self.path = path
7
+ self.prefix = prefix
8
+
9
+ models = [
10
+ Model("Marvel","models/ItsJayQz/Marvel_WhatIf_Diffusion", "whatif style"),
11
+ Model("Cyberpunk Anime Diffusion", "models/DGSpitzer/Cyberpunk-Anime-Diffusion", "dgs illustration style"),
12
+ Model("Portrait plus", "models/wavymulder/portraitplus", "portrait+ style"),
13
+ Model("CF25", "models/gsdf/Counterfeit-V2.5", "anime style"),
14
+ Model("vintedois", "models/22h/vintedois-diffusion-v0-1", "vintedois style"),
15
+ Model("dreamlike", "models/dreamlike-art/dreamlike-diffusion-1.0","dreamlike style"),
16
+ #Model("Orange Mix","models/WarriorMama777/OrangeMixs", "OrangeMixs style"),
17
+ Model("GTA5","models/ItsJayQz/GTA5_Artwork_Diffusion", "GTA5 style")
18
+ ]
19
+
20
+ model1=[]
21
+ model2=[]
22
+ model3=[]
23
+
24
+ for i in range(len(models)):
25
+ model3.append(models[i].name)
26
+ model1.append(gradio.Interface.load(models[i].path))
27
+ model2.append(models[i].prefix)
28
+
29
+ def process1(prompt, modelSelected):
30
+ if (modelSelected==''):
31
+ modelSelected = "Marvel"
32
+ model_idx=model3.index(modelSelected)
33
+ prompt+=", in "+model2[model_idx]
34
+ image_return = model1[model_idx](prompt)
35
+ return image_return
36
+
37
+ sandbox = gradio.Interface(fn=process1,
38
+ inputs=[gradio.Textbox(label="Enter Prompt:"), gradio.Dropdown(model3)],
39
+ outputs=[gradio.Image(label="Produced Image")],
40
+ title='Text to Image',
41
+ examples=[["Portrait close up, Elvis Presley, concert hall in the background", "GTA5"],
42
+ ["Marvel Blackwidow portrait close up. building city background", "Marvel"],
43
+ ["A white rabbit wizard, Hogwart University, Castle in the background", "dreamlike"]])
44
+
45
+ sandbox.queue(concurrency_count=20).launch()