zhiweili
commited on
Commit
•
13cda97
1
Parent(s):
fd9040f
upscale disable hidiffusion
Browse files- upscale.py +0 -5
upscale.py
CHANGED
@@ -3,16 +3,11 @@ import torch
|
|
3 |
from PIL import Image
|
4 |
from diffusers import StableDiffusionUpscalePipeline
|
5 |
|
6 |
-
from hidiffusion import apply_hidiffusion
|
7 |
-
|
8 |
-
|
9 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
10 |
model_id = "stabilityai/stable-diffusion-x4-upscaler"
|
11 |
upscale_pipe = StableDiffusionUpscalePipeline.from_pretrained(model_id, torch_dtype=torch.float16)
|
12 |
upscale_pipe = upscale_pipe.to(device)
|
13 |
|
14 |
-
apply_hidiffusion(upscale_pipe)
|
15 |
-
|
16 |
def upscale_image(
|
17 |
input_image: Image,
|
18 |
prompt: str,
|
|
|
3 |
from PIL import Image
|
4 |
from diffusers import StableDiffusionUpscalePipeline
|
5 |
|
|
|
|
|
|
|
6 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
7 |
model_id = "stabilityai/stable-diffusion-x4-upscaler"
|
8 |
upscale_pipe = StableDiffusionUpscalePipeline.from_pretrained(model_id, torch_dtype=torch.float16)
|
9 |
upscale_pipe = upscale_pipe.to(device)
|
10 |
|
|
|
|
|
11 |
def upscale_image(
|
12 |
input_image: Image,
|
13 |
prompt: str,
|