Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,7 +3,7 @@ import torch
|
|
| 3 |
import numpy as np
|
| 4 |
from PIL import Image
|
| 5 |
from diffusers.models import AutoencoderKL
|
| 6 |
-
from diffusers import AutoPipelineForInpainting, UNet2DConditionModel, DiffusionPipeline
|
| 7 |
import diffusers
|
| 8 |
from share_btn import community_icon_html, loading_icon_html, share_js
|
| 9 |
|
|
@@ -21,7 +21,7 @@ def read_content(file_path: str) -> str:
|
|
| 21 |
|
| 22 |
def predict(dict, prompt="", negative_prompt="", guidance_scale=7.5, steps=30, strength=0.8,model="Realistic_V5.0", scheduler="DPMSolverMultistepScheduler-Karras"):
|
| 23 |
|
| 24 |
-
pipe =
|
| 25 |
|
| 26 |
if model == "Realistic_V5.1":
|
| 27 |
pipe = AutoPipelineForInpainting.from_pretrained("SG161222/Realistic_Vision_V5.1_noVAE", vae=vae).to("cuda")
|
|
|
|
| 3 |
import numpy as np
|
| 4 |
from PIL import Image
|
| 5 |
from diffusers.models import AutoencoderKL
|
| 6 |
+
from diffusers import AutoPipelineForInpainting, UNet2DConditionModel, DiffusionPipeline, StableDiffusionInpaintPipeline
|
| 7 |
import diffusers
|
| 8 |
from share_btn import community_icon_html, loading_icon_html, share_js
|
| 9 |
|
|
|
|
| 21 |
|
| 22 |
def predict(dict, prompt="", negative_prompt="", guidance_scale=7.5, steps=30, strength=0.8,model="Realistic_V5.0", scheduler="DPMSolverMultistepScheduler-Karras"):
|
| 23 |
|
| 24 |
+
pipe = StableDiffusionInpaintPipeline.from_pretrained("SG161222/Realistic_Vision_V5.0_noVAE",vae=vae).to("cuda")
|
| 25 |
|
| 26 |
if model == "Realistic_V5.1":
|
| 27 |
pipe = AutoPipelineForInpainting.from_pretrained("SG161222/Realistic_Vision_V5.1_noVAE", vae=vae).to("cuda")
|