Kohaku-Blueleaf
commited on
Commit
·
fdecfa0
1
Parent(s):
e5e8e19
fixes
Browse files
app.py
CHANGED
@@ -185,11 +185,9 @@ if unexpected:
|
|
185 |
|
186 |
|
187 |
tipo_model_name, gguf_list = kgen_models.tipo_model_list[0]
|
188 |
-
kgen_models.
|
189 |
-
tipo_model_name,
|
190 |
-
gguf_list[-1],
|
191 |
)
|
192 |
-
tipo_loaded = False
|
193 |
print("Models loaded successfully. UI is ready.")
|
194 |
|
195 |
|
@@ -208,12 +206,6 @@ def generate(
|
|
208 |
seed: int,
|
209 |
progress=gr.Progress(),
|
210 |
):
|
211 |
-
global tipo_loaded
|
212 |
-
if not tipo_loaded:
|
213 |
-
kgen_models.load_model(
|
214 |
-
f"{tipo_model_name}_{gguf_list[-1]}", gguf=True, device="cpu"
|
215 |
-
)
|
216 |
-
tipo_loaded = True
|
217 |
as_w, as_h = aspect_ratio.split(":")
|
218 |
aspect_ratio = float(as_w) / float(as_h)
|
219 |
# Set seed for reproducibility
|
|
|
185 |
|
186 |
|
187 |
tipo_model_name, gguf_list = kgen_models.tipo_model_list[0]
|
188 |
+
kgen_models.load_model(
|
189 |
+
tipo_model_name, device="cuda"
|
|
|
190 |
)
|
|
|
191 |
print("Models loaded successfully. UI is ready.")
|
192 |
|
193 |
|
|
|
206 |
seed: int,
|
207 |
progress=gr.Progress(),
|
208 |
):
|
|
|
|
|
|
|
|
|
|
|
|
|
209 |
as_w, as_h = aspect_ratio.split(":")
|
210 |
aspect_ratio = float(as_w) / float(as_h)
|
211 |
# Set seed for reproducibility
|