vilarin commited on
Commit
35aa514
1 Parent(s): ce19625

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -10,8 +10,8 @@ from translatepy import Translator
10
  translator = Translator()
11
 
12
  # Constants
13
- base = "Corcelio/openvision"
14
- vae = "madebyollin/sdxl-vae-fp16-fix"
15
 
16
  CSS = """
17
  .gradio-container {
@@ -31,13 +31,13 @@ JS = """function () {
31
 
32
  # Load VAE component
33
  vae = AutoencoderKL.from_pretrained(
34
- "madebyollin/sdxl-vae-fp16-fix",
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(base, vae=vae, torch_dtype=torch.float16).to("cuda")
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