Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -59,7 +59,7 @@ current_model_path = current_model.path
|
|
59 |
if is_colab:
|
60 |
pipe = StableDiffusionPipeline.from_pretrained(
|
61 |
current_model.path,
|
62 |
-
torch_dtype=torch.
|
63 |
scheduler=DPMSolverMultistepScheduler.from_pretrained(current_model.path, subfolder="scheduler"),
|
64 |
safety_checker=lambda images, clip_input: (images, False)
|
65 |
)
|
@@ -67,7 +67,7 @@ if is_colab:
|
|
67 |
else:
|
68 |
pipe = StableDiffusionPipeline.from_pretrained(
|
69 |
current_model.path,
|
70 |
-
torch_dtype=torch.
|
71 |
scheduler=DPMSolverMultistepScheduler.from_pretrained(current_model.path, subfolder="scheduler")
|
72 |
)
|
73 |
|
@@ -148,14 +148,14 @@ def txt_to_img(model_path, prompt, n_images, neg_prompt, guidance, steps, width,
|
|
148 |
if is_colab or current_model == custom_model:
|
149 |
pipe = StableDiffusionPipeline.from_pretrained(
|
150 |
current_model_path,
|
151 |
-
torch_dtype=torch.
|
152 |
scheduler=DPMSolverMultistepScheduler.from_pretrained(current_model.path, subfolder="scheduler"),
|
153 |
safety_checker=lambda images, clip_input: (images, False)
|
154 |
)
|
155 |
else:
|
156 |
pipe = StableDiffusionPipeline.from_pretrained(
|
157 |
current_model_path,
|
158 |
-
torch_dtype=torch.
|
159 |
scheduler=DPMSolverMultistepScheduler.from_pretrained(current_model.path, subfolder="scheduler")
|
160 |
)
|
161 |
# pipe = pipe.to("cpu")
|
@@ -197,14 +197,14 @@ def img_to_img(model_path, prompt, n_images, neg_prompt, img, strength, guidance
|
|
197 |
if is_colab or current_model == custom_model:
|
198 |
pipe = StableDiffusionImg2ImgPipeline.from_pretrained(
|
199 |
current_model_path,
|
200 |
-
torch_dtype=torch.
|
201 |
scheduler=DPMSolverMultistepScheduler.from_pretrained(current_model.path, subfolder="scheduler"),
|
202 |
safety_checker=lambda images, clip_input: (images, False)
|
203 |
)
|
204 |
else:
|
205 |
pipe = StableDiffusionImg2ImgPipeline.from_pretrained(
|
206 |
current_model_path,
|
207 |
-
torch_dtype=torch.
|
208 |
scheduler=DPMSolverMultistepScheduler.from_pretrained(current_model.path, subfolder="scheduler")
|
209 |
)
|
210 |
# pipe = pipe.to("cpu")
|
|
|
59 |
if is_colab:
|
60 |
pipe = StableDiffusionPipeline.from_pretrained(
|
61 |
current_model.path,
|
62 |
+
torch_dtype=torch.float32,
|
63 |
scheduler=DPMSolverMultistepScheduler.from_pretrained(current_model.path, subfolder="scheduler"),
|
64 |
safety_checker=lambda images, clip_input: (images, False)
|
65 |
)
|
|
|
67 |
else:
|
68 |
pipe = StableDiffusionPipeline.from_pretrained(
|
69 |
current_model.path,
|
70 |
+
torch_dtype=torch.float32,
|
71 |
scheduler=DPMSolverMultistepScheduler.from_pretrained(current_model.path, subfolder="scheduler")
|
72 |
)
|
73 |
|
|
|
148 |
if is_colab or current_model == custom_model:
|
149 |
pipe = StableDiffusionPipeline.from_pretrained(
|
150 |
current_model_path,
|
151 |
+
torch_dtype=torch.float32,
|
152 |
scheduler=DPMSolverMultistepScheduler.from_pretrained(current_model.path, subfolder="scheduler"),
|
153 |
safety_checker=lambda images, clip_input: (images, False)
|
154 |
)
|
155 |
else:
|
156 |
pipe = StableDiffusionPipeline.from_pretrained(
|
157 |
current_model_path,
|
158 |
+
torch_dtype=torch.float32,
|
159 |
scheduler=DPMSolverMultistepScheduler.from_pretrained(current_model.path, subfolder="scheduler")
|
160 |
)
|
161 |
# pipe = pipe.to("cpu")
|
|
|
197 |
if is_colab or current_model == custom_model:
|
198 |
pipe = StableDiffusionImg2ImgPipeline.from_pretrained(
|
199 |
current_model_path,
|
200 |
+
torch_dtype=torch.float32,
|
201 |
scheduler=DPMSolverMultistepScheduler.from_pretrained(current_model.path, subfolder="scheduler"),
|
202 |
safety_checker=lambda images, clip_input: (images, False)
|
203 |
)
|
204 |
else:
|
205 |
pipe = StableDiffusionImg2ImgPipeline.from_pretrained(
|
206 |
current_model_path,
|
207 |
+
torch_dtype=torch.float32,
|
208 |
scheduler=DPMSolverMultistepScheduler.from_pretrained(current_model.path, subfolder="scheduler")
|
209 |
)
|
210 |
# pipe = pipe.to("cpu")
|