Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -34,7 +34,7 @@ device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
34 |
pipe = StableDiffusionInpaintPipeline.from_pretrained(
|
35 |
"runwayml/stable-diffusion-inpainting",
|
36 |
revision="fp16",
|
37 |
-
|
38 |
).to(device)
|
39 |
|
40 |
def predict(image, prompt):
|
@@ -57,6 +57,7 @@ def predict(image, prompt):
|
|
57 |
image=image,
|
58 |
mask_image=mask_image,
|
59 |
guidance_scale=5,
|
|
|
60 |
num_images_per_prompt=1,
|
61 |
).images
|
62 |
|
|
|
34 |
pipe = StableDiffusionInpaintPipeline.from_pretrained(
|
35 |
"runwayml/stable-diffusion-inpainting",
|
36 |
revision="fp16",
|
37 |
+
torch_dtype=torch.float16,
|
38 |
).to(device)
|
39 |
|
40 |
def predict(image, prompt):
|
|
|
57 |
image=image,
|
58 |
mask_image=mask_image,
|
59 |
guidance_scale=5,
|
60 |
+
generator=torch.Generator(device="cuda").manual_seed(0),
|
61 |
num_images_per_prompt=1,
|
62 |
).images
|
63 |
|