Spaces:
Sleeping
Sleeping
Commit
·
3e709a9
1
Parent(s):
1cf38a3
up 3
Browse files
app.py
CHANGED
|
@@ -72,8 +72,8 @@ def segmentation(img):
|
|
| 72 |
def upscale(image, prompt):
|
| 73 |
print("upscale",image,prompt)
|
| 74 |
|
| 75 |
-
image.thumbnail((512, 512))
|
| 76 |
-
print("resize",image)
|
| 77 |
|
| 78 |
# pipeline = StableDiffusionUpscalePipeline.from_pretrained("stabilityai/stable-diffusion-x4-upscaler", torch_dtype=torch.float16)
|
| 79 |
# pipeline = pipeline.to("cuda")
|
|
@@ -82,7 +82,7 @@ def upscale(image, prompt):
|
|
| 82 |
|
| 83 |
#pipeline = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-x4-upscaler")
|
| 84 |
pipeline = StableDiffusionLatentUpscalePipeline.from_pretrained("stabilityai/sd-x2-latent-upscaler", torch_dtype=torch.float16).to('cuda')
|
| 85 |
-
|
| 86 |
ret = pipeline(prompt=prompt,
|
| 87 |
image=image,
|
| 88 |
num_inference_steps=20,
|
|
|
|
| 72 |
def upscale(image, prompt):
|
| 73 |
print("upscale",image,prompt)
|
| 74 |
|
| 75 |
+
# image.thumbnail((512, 512))
|
| 76 |
+
# print("resize",image)
|
| 77 |
|
| 78 |
# pipeline = StableDiffusionUpscalePipeline.from_pretrained("stabilityai/stable-diffusion-x4-upscaler", torch_dtype=torch.float16)
|
| 79 |
# pipeline = pipeline.to("cuda")
|
|
|
|
| 82 |
|
| 83 |
#pipeline = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-x4-upscaler")
|
| 84 |
pipeline = StableDiffusionLatentUpscalePipeline.from_pretrained("stabilityai/sd-x2-latent-upscaler", torch_dtype=torch.float16).to('cuda')
|
| 85 |
+
|
| 86 |
ret = pipeline(prompt=prompt,
|
| 87 |
image=image,
|
| 88 |
num_inference_steps=20,
|