Spaces:
Sleeping
Sleeping
michaelapplydesign
commited on
Commit
·
6672974
1
Parent(s):
3e709a9
up
Browse files
app.py
CHANGED
@@ -1,3 +1,6 @@
|
|
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
import numpy as np
|
3 |
from models import make_inpainting
|
@@ -78,9 +81,6 @@ def upscale(image, prompt):
|
|
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,
|
|
|
1 |
+
import os
|
2 |
+
os.environ['CUDA_DEVICE_ORDER'] = 'PCI_BUS_ID'
|
3 |
+
os.environ['CUDA_VISIBLE_DEVICES'] = '2'
|
4 |
import gradio as gr
|
5 |
import numpy as np
|
6 |
from models import make_inpainting
|
|
|
81 |
# pipeline = StableDiffusionUpscalePipeline.from_pretrained("stabilityai/stable-diffusion-x4-upscaler", torch_dtype=torch.float16)
|
82 |
# pipeline = pipeline.to("cuda")
|
83 |
|
|
|
|
|
|
|
84 |
pipeline = StableDiffusionLatentUpscalePipeline.from_pretrained("stabilityai/sd-x2-latent-upscaler", torch_dtype=torch.float16).to('cuda')
|
85 |
|
86 |
ret = pipeline(prompt=prompt,
|