Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -63,9 +63,9 @@ download_file("https://huggingface.co/ai-forever/Real-ESRGAN/resolve/main/RealES
|
|
| 63 |
download_file("https://huggingface.co/ai-forever/Real-ESRGAN/resolve/main/RealESRGAN_x4.pth?download=true", "models/upscalers/", "RealESRGAN_x4.pth")
|
| 64 |
|
| 65 |
# Download the model files
|
| 66 |
-
ckpt_dir_pony = snapshot_download(repo_id="John6666/pony-realism-
|
| 67 |
-
ckpt_dir_cyber = snapshot_download(repo_id="John6666/cyberrealistic-pony-
|
| 68 |
-
ckpt_dir_stallion = snapshot_download(repo_id="
|
| 69 |
|
| 70 |
# Load the models
|
| 71 |
vae_pony = AutoencoderKL.from_pretrained(os.path.join(ckpt_dir_pony, "vae"), torch_dtype=torch.float16)
|
|
@@ -211,11 +211,11 @@ def generate_image(model_choice, additional_positive_prompt, additional_negative
|
|
| 211 |
input_image=None, progress=gr.Progress(track_tqdm=True)):
|
| 212 |
|
| 213 |
# Select the appropriate pipe based on the model choice
|
| 214 |
-
if model_choice == "Pony Realism
|
| 215 |
pipe = pipe_pony
|
| 216 |
-
elif model_choice == "Cyber Realistic Pony
|
| 217 |
pipe = pipe_cyber
|
| 218 |
-
else: # "
|
| 219 |
pipe = pipe_stallion
|
| 220 |
|
| 221 |
if use_random_seed:
|
|
@@ -300,12 +300,12 @@ with gr.Blocks(theme='bethecloud/storj_theme') as demo:
|
|
| 300 |
gr.HTML("""
|
| 301 |
<h1 align="center">Pony Realism / Cyber Realism / Stallion Dreams</h1>
|
| 302 |
<p align="center">
|
| 303 |
-
<a href="https://huggingface.co/John6666/pony-realism-
|
| 304 |
-
<a href="https://huggingface.co/John6666/cyberrealistic-pony-
|
| 305 |
-
<a href="https://huggingface.co/
|
| 306 |
<a href="https://civitai.com/models/372465/pony-realism" target="_blank">[Pony Realism civitai]</a>
|
| 307 |
<a href="https://civitai.com/models/443821?modelVersionId=680915" target="_blank">[Cyberrealistic Pony civitai]</a>
|
| 308 |
-
<a href="https://civitai.com/models/
|
| 309 |
<a href="https://huggingface.co/microsoft/Florence-2-base" target="_blank">[Florence-2 Model]</a>
|
| 310 |
<a href="https://huggingface.co/gokaygokay/Lamini-Prompt-Enchance-Long" target="_blank">[Prompt Enhancer Long]</a>
|
| 311 |
<a href="https://huggingface.co/gokaygokay/Lamini-Prompt-Enchance" target="_blank">[Prompt Enhancer Medium]</a>
|
|
@@ -315,9 +315,9 @@ with gr.Blocks(theme='bethecloud/storj_theme') as demo:
|
|
| 315 |
with gr.Row():
|
| 316 |
with gr.Column(scale=1):
|
| 317 |
model_choice = gr.Dropdown(
|
| 318 |
-
["Pony Realism
|
| 319 |
label="Model Choice",
|
| 320 |
-
value="Pony Realism
|
| 321 |
positive_prompt = gr.Textbox(label="Positive Prompt", placeholder="Add your positive prompt here")
|
| 322 |
negative_prompt = gr.Textbox(label="Negative Prompt", placeholder="Add your negative prompt here")
|
| 323 |
|
|
|
|
| 63 |
download_file("https://huggingface.co/ai-forever/Real-ESRGAN/resolve/main/RealESRGAN_x4.pth?download=true", "models/upscalers/", "RealESRGAN_x4.pth")
|
| 64 |
|
| 65 |
# Download the model files
|
| 66 |
+
ckpt_dir_pony = snapshot_download(repo_id="John6666/pony-realism-v22main-sdxl")
|
| 67 |
+
ckpt_dir_cyber = snapshot_download(repo_id="John6666/cyberrealistic-pony-v65-sdxl")
|
| 68 |
+
ckpt_dir_stallion = snapshot_download(repo_id="TheImposterImposters/tamePony_v25")
|
| 69 |
|
| 70 |
# Load the models
|
| 71 |
vae_pony = AutoencoderKL.from_pretrained(os.path.join(ckpt_dir_pony, "vae"), torch_dtype=torch.float16)
|
|
|
|
| 211 |
input_image=None, progress=gr.Progress(track_tqdm=True)):
|
| 212 |
|
| 213 |
# Select the appropriate pipe based on the model choice
|
| 214 |
+
if model_choice == "Pony Realism v22":
|
| 215 |
pipe = pipe_pony
|
| 216 |
+
elif model_choice == "Cyber Realistic Pony v65":
|
| 217 |
pipe = pipe_cyber
|
| 218 |
+
else: # "Tame Pony"
|
| 219 |
pipe = pipe_stallion
|
| 220 |
|
| 221 |
if use_random_seed:
|
|
|
|
| 300 |
gr.HTML("""
|
| 301 |
<h1 align="center">Pony Realism / Cyber Realism / Stallion Dreams</h1>
|
| 302 |
<p align="center">
|
| 303 |
+
<a href="https://huggingface.co/John6666/pony-realism-v22main-sdxl/" target="_blank">[Pony Realism]</a>
|
| 304 |
+
<a href="https://huggingface.co/John6666/cyberrealistic-pony-v65-sdxl" target="_blank">[Cyberrealistic Pony]</a>
|
| 305 |
+
<a href="https://huggingface.co/TheImposterImposters/tamePony_v25" target="_blank">[Tame Pony]</a><br>
|
| 306 |
<a href="https://civitai.com/models/372465/pony-realism" target="_blank">[Pony Realism civitai]</a>
|
| 307 |
<a href="https://civitai.com/models/443821?modelVersionId=680915" target="_blank">[Cyberrealistic Pony civitai]</a>
|
| 308 |
+
<a href="https://civitai.com/models/722045/tame-pony-the-authenticity-machine" target="_blank">[Tame Pony civitai]</a>
|
| 309 |
<a href="https://huggingface.co/microsoft/Florence-2-base" target="_blank">[Florence-2 Model]</a>
|
| 310 |
<a href="https://huggingface.co/gokaygokay/Lamini-Prompt-Enchance-Long" target="_blank">[Prompt Enhancer Long]</a>
|
| 311 |
<a href="https://huggingface.co/gokaygokay/Lamini-Prompt-Enchance" target="_blank">[Prompt Enhancer Medium]</a>
|
|
|
|
| 315 |
with gr.Row():
|
| 316 |
with gr.Column(scale=1):
|
| 317 |
model_choice = gr.Dropdown(
|
| 318 |
+
["Pony Realism v22", "Cyber Realistic Pony v65", "Tame Pony v25"],
|
| 319 |
label="Model Choice",
|
| 320 |
+
value="Pony Realism v22")
|
| 321 |
positive_prompt = gr.Textbox(label="Positive Prompt", placeholder="Add your positive prompt here")
|
| 322 |
negative_prompt = gr.Textbox(label="Negative Prompt", placeholder="Add your negative prompt here")
|
| 323 |
|