Prgckwb commited on
Commit
1c38bbc
1 Parent(s): cc8ba3d

:tada: change process

Browse files
Files changed (1) hide show
  1. app.py +7 -9
app.py CHANGED
@@ -85,17 +85,15 @@ def inference(
85
  global current_model_id, pipe
86
 
87
  progress(0.1, 'Loading pipeline...')
88
- if model_id != current_model_id:
89
- # For NOT Diffusers' Models
90
- if model_id not in DIFFUSERS_MODEL_IDS:
91
- model_id = EXTERNAL_MODEL_MAPPING[model_id]
92
 
93
- pipe = DiffusionPipeline.from_pretrained(
94
- model_id,
95
- torch_dtype=torch.float16,
96
- )
97
 
98
- current_model_id = model_id
99
 
100
  if not safety_checker:
101
  pipe.safety_checker = None
 
85
  global current_model_id, pipe
86
 
87
  progress(0.1, 'Loading pipeline...')
88
+ if model_id not in DIFFUSERS_MODEL_IDS:
89
+ model_id = EXTERNAL_MODEL_MAPPING[model_id]
 
 
90
 
91
+ pipe = DiffusionPipeline.from_pretrained(
92
+ model_id,
93
+ torch_dtype=torch.float16,
94
+ )
95
 
96
+ current_model_id = model_id
97
 
98
  if not safety_checker:
99
  pipe.safety_checker = None