jaguarnut
This commit is contained in:
parent
5baffd360b
commit
f62d6a6dbc
|
@ -1,41 +0,0 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"attachments": {},
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"this came from upstream, but it is not yet fixed"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"!pip install -q https://github.com/camenduru/stable-diffusion-webui-colab/releases/download/0.0.15/xformers-0.0.15+e163309.d20230103-cp38-cp38-linux_x86_64.whl\n",
|
||||
"\n",
|
||||
"!git clone https://github.com/camenduru/stable-diffusion-webui\n",
|
||||
"!git clone https://github.com/deforum-art/deforum-for-automatic1111-webui /content/stable-diffusion-webui/extensions/deforum-for-automatic1111-webui\n",
|
||||
"!git clone https://github.com/yfszzx/stable-diffusion-webui-images-browser /content/stable-diffusion-webui/extensions/stable-diffusion-webui-images-browser\n",
|
||||
"!git clone https://github.com/camenduru/stable-diffusion-webui-huggingface /content/stable-diffusion-webui/extensions/stable-diffusion-webui-huggingface\n",
|
||||
"!git clone https://github.com/Vetchems/sd-civitai-browser /content/stable-diffusion-webui/extensions/sd-civitai-browser\n",
|
||||
"%cd /content/stable-diffusion-webui\n",
|
||||
"\n",
|
||||
"!wget https://huggingface.co/Linaqruf/anything-v3.0/resolve/main/Anything-V3.0-pruned.ckpt -O /content/stable-diffusion-webui/models/Stable-diffusion/Anything-V3.0-pruned.ckpt\n",
|
||||
"!wget https://huggingface.co/Linaqruf/anything-v3.0/resolve/main/Anything-V3.0.vae.pt -O /content/stable-diffusion-webui/models/Stable-diffusion/Anything-V3.0-pruned.vae.pt\n",
|
||||
"\n",
|
||||
"!python launch.py --share --xformers --api\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"language_info": {
|
||||
"name": "python"
|
||||
},
|
||||
"orig_nbformat": 4
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
11
main.py
11
main.py
|
@ -29,11 +29,12 @@ model_negative_prompts = {
|
|||
"Deliberate": "",
|
||||
"Dreamshaper": "",
|
||||
"DreamShaperXL_Lightning": "",
|
||||
"icbinp": "",
|
||||
"realisticVisionV60B1_v51VAE": "realisticvision-negative-embedding",
|
||||
"v1-5-pruned-emaonly": ""
|
||||
"v1-5-pruned-emaonly": "",
|
||||
"Juggernaut-XL_v9_RunDiffusionPhoto_v2":"bad eyes, cgi, airbrushed, plastic, watermark"
|
||||
}
|
||||
|
||||
|
||||
def encode_file_to_base64(path):
|
||||
with open(path, 'rb') as file:
|
||||
return base64.b64encode(file.read()).decode('utf-8')
|
||||
|
@ -128,6 +129,11 @@ def parse_input(input_string):
|
|||
else:
|
||||
prompt.append(f"{key}:{value}")
|
||||
|
||||
# Adjust dimensions for specific model
|
||||
if "Juggernaut-XL_v9_RunDiffusionPhoto_v2" in input_string:
|
||||
payload["width"] = 823
|
||||
payload["height"] = 1216
|
||||
|
||||
last_index = value_end_index
|
||||
|
||||
payload["prompt"] = " ".join(prompt).strip()
|
||||
|
@ -349,4 +355,5 @@ For more details, visit the [Stable Diffusion Wiki](https://github.com/AUTOMATIC
|
|||
Enjoy creating with Stable Diffusion Bot!
|
||||
""", disable_web_page_preview=True)
|
||||
|
||||
|
||||
app.run()
|
||||
|
|
Loading…
Reference in New Issue
Block a user