zhiweili
commited on
Commit
·
ab854ef
1
Parent(s):
f7998c5
fix gr not found
Browse files- app_upscale.py +2 -1
app_upscale.py
CHANGED
@@ -3,10 +3,11 @@ from PIL import Image
|
|
3 |
from io import BytesIO
|
4 |
from diffusers import StableDiffusionUpscalePipeline
|
5 |
import torch
|
|
|
6 |
|
7 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
8 |
|
9 |
-
print('
|
10 |
|
11 |
model_id = "stabilityai/stable-diffusion-x4-upscaler"
|
12 |
upscale_pipe = StableDiffusionUpscalePipeline.from_pretrained(model_id, torch_dtype=torch.float16)
|
|
|
3 |
from io import BytesIO
|
4 |
from diffusers import StableDiffusionUpscalePipeline
|
5 |
import torch
|
6 |
+
import gradio as gr
|
7 |
|
8 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
9 |
|
10 |
+
print(f'{device} is available')
|
11 |
|
12 |
model_id = "stabilityai/stable-diffusion-x4-upscaler"
|
13 |
upscale_pipe = StableDiffusionUpscalePipeline.from_pretrained(model_id, torch_dtype=torch.float16)
|