Spaces:
Runtime error
Runtime error
Update app3.py
Browse files
app3.py
CHANGED
|
@@ -52,49 +52,49 @@ def SD_call(prompt, image_prompt, age, weight, w_w, color, hair_color,h_c_w, ha
|
|
| 52 |
|
| 53 |
# Define your data (this could also be a JSON payload)
|
| 54 |
print("SD_processing")
|
| 55 |
-
# data = {
|
| 56 |
-
# "input": {
|
| 57 |
-
# "api": {
|
| 58 |
-
# "method": "POST",
|
| 59 |
-
# "endpoint": "/sdapi/v1/txt2img"
|
| 60 |
-
# },
|
| 61 |
-
# "payload": {
|
| 62 |
-
# "override_settings": {
|
| 63 |
-
# "sd_model_checkpoint": "CyberRealistic",
|
| 64 |
-
# "sd_vae": ""
|
| 65 |
-
# },
|
| 66 |
-
# "override_settings_restore_afterwards": True,
|
| 67 |
-
# "refiner_checkpoint": "",
|
| 68 |
-
# "refiner_switch_at": 0.8,
|
| 69 |
-
# "prompt": f"{total_prompt}, {positive}",
|
| 70 |
-
# "negative_prompt": f"EasyNegative, fat, paintings, sketches, lowres, ((monochrome)), ((grayscale)), bad anatomy, text, error, cropped, signature, watermark, username, blurry, bad feet, poorly drawn face, bad proportions, gross proportions, ng_deepnegative_v1_75t, badhandsv5-neg, {negative}",
|
| 71 |
-
# "seed": -1,
|
| 72 |
-
# "batch_size": 1,
|
| 73 |
-
# "steps": 30,
|
| 74 |
-
# "cfg_scale": 7,
|
| 75 |
-
# "width": 520,
|
| 76 |
-
# "height": 520,
|
| 77 |
-
# "sampler_name": "DPM++ SDE Karras",
|
| 78 |
-
# "sampler_index": "DPM++ SDE Karras",
|
| 79 |
-
# "restore_faces": False
|
| 80 |
-
# }
|
| 81 |
-
# }
|
| 82 |
-
# }
|
| 83 |
-
|
| 84 |
data = {
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 96 |
}
|
| 97 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 98 |
|
| 99 |
|
| 100 |
# Send the POST request with headers and data
|
|
|
|
| 52 |
|
| 53 |
# Define your data (this could also be a JSON payload)
|
| 54 |
print("SD_processing")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
data = {
|
| 56 |
+
"input": {
|
| 57 |
+
"api": {
|
| 58 |
+
"method": "POST",
|
| 59 |
+
"endpoint": "/sdapi/v1/txt2img"
|
| 60 |
+
},
|
| 61 |
+
"payload": {
|
| 62 |
+
"override_settings": {
|
| 63 |
+
"sd_model_checkpoint": "cyberrealistic_classicV21",
|
| 64 |
+
"sd_vae": "vae-ft-mse-840000-ema-pruned.safetensors"
|
| 65 |
+
},
|
| 66 |
+
"override_settings_restore_afterwards": True,
|
| 67 |
+
"refiner_checkpoint": "",
|
| 68 |
+
"refiner_switch_at": 0.8,
|
| 69 |
+
"prompt": f"{total_prompt}, {positive}",
|
| 70 |
+
"negative_prompt": f"EasyNegative, fat, paintings, sketches, lowres, ((monochrome)), ((grayscale)), bad anatomy, text, error, cropped, signature, watermark, username, blurry, bad feet, poorly drawn face, bad proportions, gross proportions, ng_deepnegative_v1_75t, badhandsv5-neg, {negative}",
|
| 71 |
+
"seed": -1,
|
| 72 |
+
"batch_size": 1,
|
| 73 |
+
"steps": 25,
|
| 74 |
+
"cfg_scale": 7,
|
| 75 |
+
"width": 520,
|
| 76 |
+
"height": 520,
|
| 77 |
+
"sampler_name": "DPM++ SDE Karras",
|
| 78 |
+
"sampler_index": "DPM++ SDE Karras",
|
| 79 |
+
"restore_faces": False
|
| 80 |
+
}
|
| 81 |
+
}
|
| 82 |
}
|
| 83 |
|
| 84 |
+
# data = {
|
| 85 |
+
# "input": {
|
| 86 |
+
# "prompt": f"{total_prompt}, {positive}",
|
| 87 |
+
# "negative_prompt": f"paintings, sketches, lowres, ((monochrome)), ((grayscale)), bad anatomy, text, error, cropped, signature, watermark, username, blurry, bad feet, poorly drawn face, bad proportions, gross proportions, badhandsv5-neg, {negative}",
|
| 88 |
+
# "width": 512,
|
| 89 |
+
# "height": 720,
|
| 90 |
+
# "guidance_scale": 7.5,
|
| 91 |
+
# "num_inference_steps": 30,
|
| 92 |
+
# "num_outputs": 1,
|
| 93 |
+
# "prompt_strength": 0.8,
|
| 94 |
+
# "scheduler": "K-LMS"
|
| 95 |
+
# }
|
| 96 |
+
# }
|
| 97 |
+
|
| 98 |
|
| 99 |
|
| 100 |
# Send the POST request with headers and data
|