Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -131,7 +131,7 @@ def txt_to_img(model_path, prompt, neg_prompt, guidance, steps, width, height, g
|
|
131 |
if is_colab or current_model == custom_model:
|
132 |
pipe = StableDiffusionPipeline.from_pretrained(current_model_path, torch_dtype=torch.float16, scheduler=scheduler, safety_checker=lambda images, clip_input: (images, False))
|
133 |
else:
|
134 |
-
pipe = StableDiffusionPipeline.from_pretrained(current_model_path, torch_dtype=torch.float16, scheduler=scheduler
|
135 |
# pipe = pipe.to("cpu")
|
136 |
# pipe = current_model.pipe_t2i
|
137 |
|
@@ -165,7 +165,7 @@ def img_to_img(model_path, prompt, neg_prompt, img, strength, guidance, steps, w
|
|
165 |
if is_colab or current_model == custom_model:
|
166 |
pipe = StableDiffusionImg2ImgPipeline.from_pretrained(current_model_path, torch_dtype=torch.float16, scheduler=scheduler, safety_checker=lambda images, clip_input: (images, False))
|
167 |
else:
|
168 |
-
pipe = StableDiffusionImg2ImgPipeline.from_pretrained(current_model_path, torch_dtype=torch.float16, scheduler=scheduler
|
169 |
# pipe = pipe.to("cpu")
|
170 |
# pipe = current_model.pipe_i2i
|
171 |
|
|
|
131 |
if is_colab or current_model == custom_model:
|
132 |
pipe = StableDiffusionPipeline.from_pretrained(current_model_path, torch_dtype=torch.float16, scheduler=scheduler, safety_checker=lambda images, clip_input: (images, False))
|
133 |
else:
|
134 |
+
pipe = StableDiffusionPipeline.from_pretrained(current_model_path, torch_dtype=torch.float16, scheduler=scheduler)
|
135 |
# pipe = pipe.to("cpu")
|
136 |
# pipe = current_model.pipe_t2i
|
137 |
|
|
|
165 |
if is_colab or current_model == custom_model:
|
166 |
pipe = StableDiffusionImg2ImgPipeline.from_pretrained(current_model_path, torch_dtype=torch.float16, scheduler=scheduler, safety_checker=lambda images, clip_input: (images, False))
|
167 |
else:
|
168 |
+
pipe = StableDiffusionImg2ImgPipeline.from_pretrained(current_model_path, torch_dtype=torch.float16, scheduler=scheduler)
|
169 |
# pipe = pipe.to("cpu")
|
170 |
# pipe = current_model.pipe_i2i
|
171 |
|