Update app.py
Browse files
app.py
CHANGED
@@ -10,8 +10,8 @@ from translatepy import Translator
|
|
10 |
translator = Translator()
|
11 |
|
12 |
# Constants
|
13 |
-
|
14 |
-
|
15 |
|
16 |
CSS = """
|
17 |
.gradio-container {
|
@@ -31,13 +31,13 @@ JS = """function () {
|
|
31 |
|
32 |
# Load VAE component
|
33 |
vae = AutoencoderKL.from_pretrained(
|
34 |
-
|
35 |
torch_dtype=torch.float16
|
36 |
)
|
37 |
|
38 |
# Ensure model and scheduler are initialized in GPU-enabled function
|
39 |
if torch.cuda.is_available():
|
40 |
-
pipe = StableDiffusionXLPipeline.from_pretrained(
|
41 |
|
42 |
|
43 |
|
|
|
10 |
translator = Translator()
|
11 |
|
12 |
# Constants
|
13 |
+
model = "Corcelio/openvision"
|
14 |
+
vae_model = "madebyollin/sdxl-vae-fp16-fix"
|
15 |
|
16 |
CSS = """
|
17 |
.gradio-container {
|
|
|
31 |
|
32 |
# Load VAE component
|
33 |
vae = AutoencoderKL.from_pretrained(
|
34 |
+
vae_model,
|
35 |
torch_dtype=torch.float16
|
36 |
)
|
37 |
|
38 |
# Ensure model and scheduler are initialized in GPU-enabled function
|
39 |
if torch.cuda.is_available():
|
40 |
+
pipe = StableDiffusionXLPipeline.from_pretrained(model, vae=vae, torch_dtype=torch.float16).to("cuda")
|
41 |
|
42 |
|
43 |
|