Spaces:
Runtime error
Runtime error
enable safety feature
Browse files
stablediffusion-infinity/app.py
CHANGED
@@ -108,9 +108,10 @@ def sync_rooms_data_repo():
|
|
108 |
|
109 |
def get_model():
|
110 |
if "inpaint" not in model:
|
111 |
-
scheduler = EulerAncestralDiscreteScheduler.from_pretrained(
|
|
|
112 |
inpaint = DiffusionPipeline.from_pretrained(
|
113 |
-
"
|
114 |
inpaint.scheduler = scheduler
|
115 |
inpaint = inpaint.to("cuda")
|
116 |
model["inpaint"] = inpaint
|
@@ -185,6 +186,7 @@ async def run_outpaint(
|
|
185 |
num_inference_steps=step,
|
186 |
guidance_scale=guidance,
|
187 |
)
|
|
|
188 |
image = output["images"][0]
|
189 |
is_nsfw = False
|
190 |
if "nsfw_content_detected" in output:
|
|
|
108 |
|
109 |
def get_model():
|
110 |
if "inpaint" not in model:
|
111 |
+
scheduler = EulerAncestralDiscreteScheduler.from_pretrained(
|
112 |
+
"stabilityai/stable-diffusion-2-base", subfolder="scheduler")
|
113 |
inpaint = DiffusionPipeline.from_pretrained(
|
114 |
+
"radames/stable-diffusion-v2-inpainting", torch_dtype=torch.float16)
|
115 |
inpaint.scheduler = scheduler
|
116 |
inpaint = inpaint.to("cuda")
|
117 |
model["inpaint"] = inpaint
|
|
|
186 |
num_inference_steps=step,
|
187 |
guidance_scale=guidance,
|
188 |
)
|
189 |
+
print(output)
|
190 |
image = output["images"][0]
|
191 |
is_nsfw = False
|
192 |
if "nsfw_content_detected" in output:
|