mochifz commited on
Commit
6763cf2
1 Parent(s): a546565

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -75,7 +75,7 @@ def Loading(model_name, is_xl, is_cuda):
75
  text2img = pipeline_class.from_pretrained(model_name, torch_dtype=torch.float16, variant="fp16", use_safetensors=True).to(device)
76
  else:
77
  text2img = pipeline_class.from_pretrained(model_name, use_safetensors=True).to(device)
78
- if is_xl:
79
  text2img.enable_xformers_memory_efficient_attention()
80
  text2img.vae.enable_xformers_memory_efficient_attention()
81
  text2img.safety_checker = None
@@ -83,7 +83,7 @@ def Loading(model_name, is_xl, is_cuda):
83
  return model_name
84
  with gr.Blocks() as demo:
85
  with gr.Row():
86
- model_name = gr.Textbox(value="nota-ai/bk-sdm-tiny-2m", label=translations[language]['model_name'])
87
  is_xl = gr.Checkbox(label="SDXL")
88
  is_cuda = gr.Checkbox(label="cuda", value=torch.cuda.is_available())
89
  loading = gr.Button(translations[language]['loading'])
 
75
  text2img = pipeline_class.from_pretrained(model_name, torch_dtype=torch.float16, variant="fp16", use_safetensors=True).to(device)
76
  else:
77
  text2img = pipeline_class.from_pretrained(model_name, use_safetensors=True).to(device)
78
+ if is_cuda:
79
  text2img.enable_xformers_memory_efficient_attention()
80
  text2img.vae.enable_xformers_memory_efficient_attention()
81
  text2img.safety_checker = None
 
83
  return model_name
84
  with gr.Blocks() as demo:
85
  with gr.Row():
86
+ model_name = gr.Textbox(value="John6666/pony-realism-v21main-sdxl", label=translations[language]['model_name'])
87
  is_xl = gr.Checkbox(label="SDXL")
88
  is_cuda = gr.Checkbox(label="cuda", value=torch.cuda.is_available())
89
  loading = gr.Button(translations[language]['loading'])