Spaces:
Sleeping
Sleeping
Commit
·
5c187de
1
Parent(s):
ac5f3b8
cuda
Browse files
app.py
CHANGED
|
@@ -69,8 +69,10 @@ def segmentation(img):
|
|
| 69 |
|
| 70 |
|
| 71 |
def upscale(image,prompt):
|
|
|
|
|
|
|
| 72 |
# pipeline = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-x4-upscaler")
|
| 73 |
-
pipeline = StableDiffusionLatentUpscalePipeline.from_pretrained("stabilityai/sd-x2-latent-upscaler", torch_dtype=torch.
|
| 74 |
upscaled_image = pipeline(prompt=prompt, image=image).images[0]
|
| 75 |
return upscaled_image
|
| 76 |
|
|
|
|
| 69 |
|
| 70 |
|
| 71 |
def upscale(image,prompt):
|
| 72 |
+
print("upscale")
|
| 73 |
+
|
| 74 |
# pipeline = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-x4-upscaler")
|
| 75 |
+
pipeline = StableDiffusionLatentUpscalePipeline.from_pretrained("stabilityai/sd-x2-latent-upscaler", torch_dtype=torch.float16).to('cuda')
|
| 76 |
upscaled_image = pipeline(prompt=prompt, image=image).images[0]
|
| 77 |
return upscaled_image
|
| 78 |
|