Update main.py
Browse files
main.py
CHANGED
@@ -75,6 +75,53 @@ def generate_image(request: User):
|
|
75 |
return {"image": response}
|
76 |
|
77 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
@app.post("/test")
|
79 |
def test(request: User):
|
80 |
return {'data': f'Prompt is {request.prompt} Model is {request.model}'}
|
|
|
75 |
return {"image": response}
|
76 |
|
77 |
|
78 |
+
details = {
|
79 |
+
1: {'Absolute Reality V1.6': 'absolutereality_V16.safetensors [37db0fc3]',
|
80 |
+
'Analog V1': 'analog-diffusion-1.0.ckpt [9ca13f02]',
|
81 |
+
'Anything V3': 'anythingv3_0-pruned.ckpt [2700c435]',
|
82 |
+
'Anything V4.5': 'anything-v4.5-pruned.ckpt [65745d25]',
|
83 |
+
'Anything V5': 'anythingV5_PrtRE.safetensors [893e49b9]',
|
84 |
+
'AbyssOrangeMix V3': 'AOM3A3_orangemixs.safetensors [9600da17]',
|
85 |
+
'Deliberate V2': 'deliberate_v2.safetensors [10ec4b29]',
|
86 |
+
'Dreamlike Diffusion V1': 'dreamlike-diffusion-1.0.safetensors [5c9fd6e0]',
|
87 |
+
'Dreamlike Diffusion V2': 'dreamlike-diffusion-2.0.safetensors [fdcf65e7]',
|
88 |
+
'Dreamshaper 6 baked vae': 'dreamshaper_6BakedVae.safetensors [114c8abb]',
|
89 |
+
'Dreamshaper 7': 'dreamshaper_7.safetensors [5cf5ae06]',
|
90 |
+
'Dreamshaper 8': 'dreamshaper_8.safetensors [9d40847d]',
|
91 |
+
'Eimis Anime Diffusion V1.0': 'EimisAnimeDiffusion_V1.ckpt [4f828a15]',
|
92 |
+
"Elldreth's Vivid": 'elldreths-vivid-mix.safetensors [342d9d26]',
|
93 |
+
'Lyriel V1.6': 'lyriel_v16.safetensors [68fceea2]',
|
94 |
+
'MechaMix V1.0': 'mechamix_v10.safetensors [ee685731]',
|
95 |
+
'MeinaMix Meina V9': 'meinamix_meinaV9.safetensors [2ec66ab0]',
|
96 |
+
'MeinaMix Meina V11': 'meinamix_meinaV11.safetensors [b56ce717]',
|
97 |
+
'Openjourney V4': 'openjourney_V4.ckpt [ca2f377f]',
|
98 |
+
'Portrait+ V1': 'portraitplus_V1.0.safetensors [1400e684]',
|
99 |
+
'Realistic Vision V1.4': 'Realistic_Vision_V1.4-pruned-fp16.safetensors [8d21810b]',
|
100 |
+
'Realistic Vision V4.0': 'Realistic_Vision_V4.0.safetensors [29a7afaa]',
|
101 |
+
'Realistic Vision V5.0': 'Realistic_Vision_V5.0.safetensors [614d1063]',
|
102 |
+
'Redshift Diffusion V1.0': 'redshift_diffusion-V10.safetensors [1400e684]',
|
103 |
+
'ReV Animated V1.2.2': 'revAnimated_v122.safetensors [3f4fefd9]',
|
104 |
+
'SD V1.4': 'sdv1_4.ckpt [7460a6fa]',
|
105 |
+
'SD V1.5': 'v1-5-pruned-emaonly.ckpt [81761151]',
|
106 |
+
"Shonin's Beautiful People V1.0": 'shoninsBeautiful_v10.safetensors [25d8c546]',
|
107 |
+
"TheAlly's Mix II": 'theallys-mix-ii-churned.safetensors [5d9225a4]',
|
108 |
+
'Timeless V1': 'timeless-1.0.ckpt [7c4971d4]'
|
109 |
+
},
|
110 |
+
2: {
|
111 |
+
'Euler': 'Euler',
|
112 |
+
'Euler a': 'Euler a',
|
113 |
+
'Heun': 'Heun',
|
114 |
+
'DPM++ 2M Karras': 'DPM++ 2M Karras',
|
115 |
+
'DPM++ SDE Karras': 'DPM++ SDE Karras',
|
116 |
+
'DDIM': 'DDIM'
|
117 |
+
}
|
118 |
+
}
|
119 |
+
|
120 |
+
@app.get("/imagen-details/{detail_id}")
|
121 |
+
def image_detail(detail_id: int = Path(None, description="The ID of 1.model id and 2.sampler id")):
|
122 |
+
return details[detail_id]
|
123 |
+
|
124 |
+
|
125 |
@app.post("/test")
|
126 |
def test(request: User):
|
127 |
return {'data': f'Prompt is {request.prompt} Model is {request.model}'}
|