animeartstudio Sam Watson commited on
Commit
8dff715
β€’
0 Parent(s):

Duplicate from pulpapps/Diffusion30-Photo

Browse files

Co-authored-by: Sam Watson <[email protected]>

Files changed (3) hide show
  1. .gitattributes +34 -0
  2. README.md +13 -0
  3. app.py +113 -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,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: Maximum Multiplier
3
+ emoji: πŸ›•πŸ›•
4
+ colorFrom: green
5
+ colorTo: blue
6
+ sdk: gradio
7
+ sdk_version: 3.15.0
8
+ app_file: app.py
9
+ pinned: true
10
+ duplicated_from: pulpapps/Diffusion30-Photo
11
+ ---
12
+
13
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
app.py ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import os
3
+ import sys
4
+ from pathlib import Path
5
+
6
+ models = [
7
+ {"name": "Dreamlike Photoreal", "url": "dreamlike-art/dreamlike-photoreal-2.0"},
8
+ {"name": "AmiIReal", "url": "stablediffusionapi/amireal"},
9
+ {"name": "Analog Diffusion", "url": "wavymulder/Analog-Diffusion"},
10
+ {"name": "Circulus 2.8", "url": "circulus/sd-photoreal-v2.8"},
11
+ {"name": "Circulus Photoreal V2", "url": "circulus/sd-photoreal-real-v2"},
12
+ {"name": "Claudfuen 1", "url": "claudfuen/photorealistic-fuen-v1"},
13
+ {"name": "Collage Diffusion", "url": "wavymulder/collage-diffusion"},
14
+ {"name": "Cyberrealistic", "url": "stablediffusionapi/cyberrealistic"},
15
+ {"name": "Dreamful 2", "url": "Hius/DreamFul-V2"},
16
+ {"name": "Dreamlike Photoreal", "url": "dreamlike-art/dreamlike-photoreal-2.0"},
17
+ {"name": "GakkiMix768", "url": "Sa1i/gakki-mix-768"},
18
+ {"name": "Grimoeresigils", "url": "ECarbenia/grimoiresigils"},
19
+ {"name": "HARDBlend", "url": "theintuitiveye/HARDblend"},
20
+ {"name": "HassanBlend 1.4", "url": "hassanblend/hassanblend1.4"},
21
+ {"name": "HassanBlend 1.5.1.2", "url": "hassanblend/HassanBlend1.5.1.2"},
22
+ {"name": "Lomo Diffusion", "url": "wavymulder/lomo-diffusion"},
23
+ {"name": "Model Shoot", "url": "wavymulder/modelshoot"},
24
+ {"name": "Portrait Plus", "url": "wavymulder/portraitplus"},
25
+ {"name": "QuinceMix", "url": "Hemlok/QuinceMix"},
26
+ {"name": "Realistic Vision 1.4", "url": "SG161222/Realistic_Vision_V1.4"},
27
+ {"name": "The Ally", "url": "stablediffusionapi/the-ally"},
28
+ {"name": "Timeless Diffusion", "url": "wavymulder/timeless-diffusion"},
29
+ {"name": "UltraSkin", "url": "VegaKH/Ultraskin"},
30
+ {"name": "Wavyfusion", "url": "wavymulder/wavyfusion"},
31
+ ]
32
+
33
+ current_model = models[0]
34
+
35
+ text_gen = gr.Interface.load("spaces/daspartho/prompt-extend")
36
+
37
+ models2 = []
38
+ for model in models:
39
+ model_url = f"models/{model['url']}"
40
+ loaded_model = gr.Interface.load(model_url, live=True, preprocess=True)
41
+ models2.append(loaded_model)
42
+
43
+
44
+ def text_it(inputs, text_gen=text_gen):
45
+ return text_gen(inputs)
46
+
47
+
48
+ def set_model(current_model_index):
49
+ global current_model
50
+ current_model = models[current_model_index]
51
+ return gr.update(value=f"{current_model['name']}")
52
+
53
+
54
+ def send_it(inputs, model_choice):
55
+ proc = models2[model_choice]
56
+ return proc(inputs)
57
+
58
+
59
+ with gr.Blocks() as myface:
60
+ gr.HTML(
61
+
62
+ )
63
+
64
+ with gr.Row():
65
+ with gr.Row():
66
+ input_text = gr.Textbox(label="Prompt idea", placeholder="Eg. Luxury fashion model", lines=1)
67
+ # Model selection dropdown
68
+ model_name1 = gr.Dropdown(
69
+ label="Choose Model",
70
+ choices=[m["name"] for m in models],
71
+ type="index",
72
+ value=current_model["name"],
73
+ interactive=True,
74
+ )
75
+ with gr.Row():
76
+ see_prompts = gr.Button("Generate Prompts")
77
+ run = gr.Button("Generate Images", variant="primary")
78
+
79
+ with gr.Row():
80
+ output1 = gr.Image(label="")
81
+ output2 = gr.Image(label="")
82
+ output3 = gr.Image(label="")
83
+ with gr.Row():
84
+ magic1 = gr.Textbox(label="Generated Prompt", lines=2)
85
+ magic2 = gr.Textbox(label="Generated Prompt", lines=2)
86
+ magic3 = gr.Textbox(label="Generated Prompt", lines=2)
87
+ with gr.Row():
88
+ output4 = gr.Image(label="")
89
+ output5 = gr.Image(label="")
90
+ output6 = gr.Image(label="")
91
+ with gr.Row():
92
+ magic4 = gr.Textbox(label="Generated Prompt", lines=2)
93
+ magic5 = gr.Textbox(label="Generated Prompt", lines=2)
94
+ magic6 = gr.Textbox(label="Generated Prompt", lines=2)
95
+
96
+ model_name1.change(set_model, inputs=model_name1, outputs=[output1, output2, output3, output4, output5, output6])
97
+
98
+ run.click(send_it, inputs=[magic1, model_name1], outputs=[output1])
99
+ run.click(send_it, inputs=[magic2, model_name1], outputs=[output2])
100
+ run.click(send_it, inputs=[magic3, model_name1], outputs=[output3])
101
+ run.click(send_it, inputs=[magic4, model_name1], outputs=[output4])
102
+ run.click(send_it, inputs=[magic5, model_name1], outputs=[output5])
103
+ run.click(send_it, inputs=[magic6, model_name1], outputs=[output6])
104
+
105
+ see_prompts.click(text_it, inputs=[input_text], outputs=[magic1])
106
+ see_prompts.click(text_it, inputs=[input_text], outputs=[magic2])
107
+ see_prompts.click(text_it, inputs=[input_text], outputs=[magic3])
108
+ see_prompts.click(text_it, inputs=[input_text], outputs=[magic4])
109
+ see_prompts.click(text_it, inputs=[input_text], outputs=[magic5])
110
+ see_prompts.click(text_it, inputs=[input_text], outputs=[magic6])
111
+
112
+ myface.queue(concurrency_count=200)
113
+ myface.launch(inline=True, show_api=False, max_threads=400)