Spaces:
Build error
Build error
Commit
·
87fdcac
1
Parent(s):
923b990
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,11 +6,17 @@ from diffusers import DDPMScheduler, StableDiffusionPipeline
|
|
| 6 |
import time
|
| 7 |
|
| 8 |
def create_pipeline(name):
|
| 9 |
-
if name == "
|
| 10 |
scheduler = DDPMScheduler(beta_start=0.00085, beta_end=0.012,
|
| 11 |
beta_schedule="scaled_linear", num_train_timesteps=1000)
|
| 12 |
pipe = StableDiffusionPipeline.from_pretrained(name, scheduler=scheduler)
|
| 13 |
pipe.safety_checker = lambda images, clip_input: (images, False)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
else:
|
| 15 |
pipe = OVStableDiffusionPipeline.from_pretrained(name, compile=False)
|
| 16 |
pipe.reshape(batch_size=1, height=512, width=512, num_images_per_prompt=1)
|
|
|
|
| 6 |
import time
|
| 7 |
|
| 8 |
def create_pipeline(name):
|
| 9 |
+
if name == "valhalla/sd-pokemon-model":
|
| 10 |
scheduler = DDPMScheduler(beta_start=0.00085, beta_end=0.012,
|
| 11 |
beta_schedule="scaled_linear", num_train_timesteps=1000)
|
| 12 |
pipe = StableDiffusionPipeline.from_pretrained(name, scheduler=scheduler)
|
| 13 |
pipe.safety_checker = lambda images, clip_input: (images, False)
|
| 14 |
+
elif name == "stable-diffusion-pokemons-valhalla-fp32":
|
| 15 |
+
scheduler = DDPMScheduler(beta_start=0.00085, beta_end=0.012,
|
| 16 |
+
beta_schedule="scaled_linear", num_train_timesteps=1000)
|
| 17 |
+
pipe = OVStableDiffusionPipeline.from_pretrained(name, compile=False, scheduler=scheduler)
|
| 18 |
+
pipe.reshape(batch_size=1, height=512, width=512, num_images_per_prompt=1)
|
| 19 |
+
pipe.compile()
|
| 20 |
else:
|
| 21 |
pipe = OVStableDiffusionPipeline.from_pretrained(name, compile=False)
|
| 22 |
pipe.reshape(batch_size=1, height=512, width=512, num_images_per_prompt=1)
|