Spaces:
Paused
Paused
Added CPU path
Browse files
app.py
CHANGED
|
@@ -17,16 +17,16 @@ if deviceStr == "cuda":
|
|
| 17 |
revision="fp16",
|
| 18 |
torch_dtype=torch.float16,
|
| 19 |
safety_checker=lambda images, **kwargs: (images, False))
|
|
|
|
|
|
|
| 20 |
else:
|
| 21 |
pipeline = StableDiffusionInpaintPipeline.from_pretrained("runwayml/stable-diffusion-inpainting",
|
| 22 |
-
revision="fp16",
|
| 23 |
-
torch_dtype=torch.float16,
|
| 24 |
safety_checker=lambda images, **kwargs: (images, False))
|
| 25 |
|
| 26 |
#superresolutionPipe = StableDiffusionUpscalePipeline.from_pretrained("stabilityai/stable-diffusion-x4-upscaler")
|
| 27 |
|
| 28 |
-
pipeline.to(device)
|
| 29 |
-
pipeline.enable_xformers_memory_efficient_attention()
|
| 30 |
#pipeline.scheduler = DPMSolverMultistepScheduler.from_config(pipeline.scheduler.config)
|
| 31 |
#generator = torch.Generator(device).manual_seed(seed)
|
| 32 |
latents = torch.randn((1, 4, 64, 64), device=device)
|
|
|
|
| 17 |
revision="fp16",
|
| 18 |
torch_dtype=torch.float16,
|
| 19 |
safety_checker=lambda images, **kwargs: (images, False))
|
| 20 |
+
pipeline.to(device)
|
| 21 |
+
pipeline.enable_xformers_memory_efficient_attention()
|
| 22 |
else:
|
| 23 |
pipeline = StableDiffusionInpaintPipeline.from_pretrained("runwayml/stable-diffusion-inpainting",
|
| 24 |
+
#revision="fp16",
|
| 25 |
+
#torch_dtype=torch.float16,
|
| 26 |
safety_checker=lambda images, **kwargs: (images, False))
|
| 27 |
|
| 28 |
#superresolutionPipe = StableDiffusionUpscalePipeline.from_pretrained("stabilityai/stable-diffusion-x4-upscaler")
|
| 29 |
|
|
|
|
|
|
|
| 30 |
#pipeline.scheduler = DPMSolverMultistepScheduler.from_config(pipeline.scheduler.config)
|
| 31 |
#generator = torch.Generator(device).manual_seed(seed)
|
| 32 |
latents = torch.randn((1, 4, 64, 64), device=device)
|