Spaces:
Running
on
Zero
Running
on
Zero
Update
Browse files
app.py
CHANGED
|
@@ -39,7 +39,6 @@ if device.type == "cpu":
|
|
| 39 |
pipe = MultiResPipeline.from_pretrained(model_id)
|
| 40 |
else:
|
| 41 |
pipe = MultiResPipeline.from_pretrained(model_id, torch_dtype=torch.float16, revision="fp16")
|
| 42 |
-
pipe = pipe.to(device)
|
| 43 |
pipe.scheduler = DPMSolverMultistepScheduler(
|
| 44 |
beta_start=0.00085,
|
| 45 |
beta_end=0.012,
|
|
@@ -53,6 +52,10 @@ pipe.scheduler = DPMSolverMultistepScheduler(
|
|
| 53 |
lower_order_final=True,
|
| 54 |
)
|
| 55 |
string_to_param_dict = load_learned_concepts(pipe, "textual_inversion_outputs/")
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
|
| 57 |
|
| 58 |
@spaces.GPU
|
|
|
|
| 39 |
pipe = MultiResPipeline.from_pretrained(model_id)
|
| 40 |
else:
|
| 41 |
pipe = MultiResPipeline.from_pretrained(model_id, torch_dtype=torch.float16, revision="fp16")
|
|
|
|
| 42 |
pipe.scheduler = DPMSolverMultistepScheduler(
|
| 43 |
beta_start=0.00085,
|
| 44 |
beta_end=0.012,
|
|
|
|
| 52 |
lower_order_final=True,
|
| 53 |
)
|
| 54 |
string_to_param_dict = load_learned_concepts(pipe, "textual_inversion_outputs/")
|
| 55 |
+
for k, v in list(string_to_param_dict.items()):
|
| 56 |
+
string_to_param_dict[k] = v.to(device)
|
| 57 |
+
pipe.to(device)
|
| 58 |
+
pipe.text_encoder.to(device)
|
| 59 |
|
| 60 |
|
| 61 |
@spaces.GPU
|