Spaces:
Sleeping
Sleeping
:tada: change process
Browse files
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
|
89 |
-
|
90 |
-
if model_id not in DIFFUSERS_MODEL_IDS:
|
91 |
-
model_id = EXTERNAL_MODEL_MAPPING[model_id]
|
92 |
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
|
98 |
-
|
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
|