Spaces:
Sleeping
Sleeping
updates
Browse files
app.py
CHANGED
@@ -14,7 +14,7 @@ def generate(inp):
|
|
14 |
torch.cuda.empty_cache()
|
15 |
print(f"Is CUDA available: {torch.cuda.is_available()}")
|
16 |
|
17 |
-
pipeline = StableDiffusionPipeline.from_pretrained(
|
18 |
|
19 |
#pipeline.scheduler = DPMSolverMultistepScheduler.from_config(pipeline.scheduler.config)
|
20 |
#another comment
|
|
|
14 |
torch.cuda.empty_cache()
|
15 |
print(f"Is CUDA available: {torch.cuda.is_available()}")
|
16 |
|
17 |
+
pipeline = StableDiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-2-1", torch_dtype=torch.float16)
|
18 |
|
19 |
#pipeline.scheduler = DPMSolverMultistepScheduler.from_config(pipeline.scheduler.config)
|
20 |
#another comment
|
main.py
CHANGED
@@ -20,7 +20,7 @@ def generate_image(prompt, inference_steps, model):
|
|
20 |
torch.cuda.empty_cache()
|
21 |
print(f"Is CUDA available: {torch.cuda.is_available()}")
|
22 |
|
23 |
-
pipeline = StableDiffusionPipeline.from_pretrained(
|
24 |
|
25 |
#pipeline.scheduler = DPMSolverMultistepScheduler.from_config(pipeline.scheduler.config)
|
26 |
#another comment
|
|
|
20 |
torch.cuda.empty_cache()
|
21 |
print(f"Is CUDA available: {torch.cuda.is_available()}")
|
22 |
|
23 |
+
pipeline = StableDiffusionPipeline.from_pretrained(str(model), torch_dtype=torch.float16)
|
24 |
|
25 |
#pipeline.scheduler = DPMSolverMultistepScheduler.from_config(pipeline.scheduler.config)
|
26 |
#another comment
|