Spaces:
Sleeping
Sleeping
Commit
·
1cf38a3
1
Parent(s):
475a3b8
up2
Browse files
app.py
CHANGED
@@ -75,13 +75,14 @@ def upscale(image, prompt):
|
|
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")
|
80 |
|
81 |
#up
|
82 |
|
83 |
#pipeline = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-x4-upscaler")
|
84 |
-
|
|
|
85 |
ret = pipeline(prompt=prompt,
|
86 |
image=image,
|
87 |
num_inference_steps=20,
|
|
|
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")
|
80 |
|
81 |
#up
|
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,
|