Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -46,15 +46,13 @@ def infer(
|
|
46 |
'generator': generator,
|
47 |
}
|
48 |
|
49 |
-
if model_id !=
|
50 |
pipe = DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch_dtype)
|
51 |
pipe = pipe.to(device)
|
52 |
image = pipe(**params).images[0]
|
53 |
else:
|
54 |
image = pipe_default(**params).images[0]
|
55 |
|
56 |
-
|
57 |
-
|
58 |
return image, pipe.name_or_path
|
59 |
|
60 |
css = """
|
|
|
46 |
'generator': generator,
|
47 |
}
|
48 |
|
49 |
+
if model_id != model_id_default:
|
50 |
pipe = DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch_dtype)
|
51 |
pipe = pipe.to(device)
|
52 |
image = pipe(**params).images[0]
|
53 |
else:
|
54 |
image = pipe_default(**params).images[0]
|
55 |
|
|
|
|
|
56 |
return image, pipe.name_or_path
|
57 |
|
58 |
css = """
|