Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse filesRemoved SD 1.5
app.py
CHANGED
|
@@ -34,11 +34,6 @@ def load_model(model_name):
|
|
| 34 |
torch_dtype=torch.float16,
|
| 35 |
variant="fp16"
|
| 36 |
).to("cuda")
|
| 37 |
-
elif model_name == "runwayml/stable-diffusion-v1-5":
|
| 38 |
-
pipeline = StableDiffusionPipeline.from_pretrained(
|
| 39 |
-
model_name,
|
| 40 |
-
torch_dtype=torch.float16
|
| 41 |
-
).to("cuda")
|
| 42 |
elif model_name == "ByteDance/SDXL-Lightning":
|
| 43 |
base = "stabilityai/stable-diffusion-xl-base-1.0"
|
| 44 |
ckpt = "sdxl_lightning_4step_unet.safetensors"
|
|
@@ -82,8 +77,6 @@ pipeline_text2image = load_model(default_model)
|
|
| 82 |
def getimgen(prompt, model_name):
|
| 83 |
if model_name == "stabilityai/sdxl-turbo":
|
| 84 |
return pipeline_text2image(prompt=prompt, guidance_scale=0.0, num_inference_steps=2).images[0]
|
| 85 |
-
elif model_name == "runwayml/stable-diffusion-v1-5":
|
| 86 |
-
return pipeline_text2image(prompt).images[0]
|
| 87 |
elif model_name == "ByteDance/SDXL-Lightning":
|
| 88 |
return pipeline_text2image(prompt, num_inference_steps=4, guidance_scale=0).images[0]
|
| 89 |
elif model_name == "segmind/SSD-1B":
|
|
@@ -273,7 +266,6 @@ This demo provides an insightful look into how current text-to-image models hand
|
|
| 273 |
"stabilityai/sdxl-turbo",
|
| 274 |
"ByteDance/SDXL-Lightning",
|
| 275 |
"stabilityai/stable-diffusion-2",
|
| 276 |
-
"runwayml/stable-diffusion-v1-5",
|
| 277 |
"segmind/SSD-1B"
|
| 278 |
],
|
| 279 |
value=default_model
|
|
|
|
| 34 |
torch_dtype=torch.float16,
|
| 35 |
variant="fp16"
|
| 36 |
).to("cuda")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
elif model_name == "ByteDance/SDXL-Lightning":
|
| 38 |
base = "stabilityai/stable-diffusion-xl-base-1.0"
|
| 39 |
ckpt = "sdxl_lightning_4step_unet.safetensors"
|
|
|
|
| 77 |
def getimgen(prompt, model_name):
|
| 78 |
if model_name == "stabilityai/sdxl-turbo":
|
| 79 |
return pipeline_text2image(prompt=prompt, guidance_scale=0.0, num_inference_steps=2).images[0]
|
|
|
|
|
|
|
| 80 |
elif model_name == "ByteDance/SDXL-Lightning":
|
| 81 |
return pipeline_text2image(prompt, num_inference_steps=4, guidance_scale=0).images[0]
|
| 82 |
elif model_name == "segmind/SSD-1B":
|
|
|
|
| 266 |
"stabilityai/sdxl-turbo",
|
| 267 |
"ByteDance/SDXL-Lightning",
|
| 268 |
"stabilityai/stable-diffusion-2",
|
|
|
|
| 269 |
"segmind/SSD-1B"
|
| 270 |
],
|
| 271 |
value=default_model
|