Spaces:
Runtime error
Runtime error
switch to DPM
Browse files
app.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
import jax.numpy as jnp
|
| 3 |
from diffusers import FlaxStableDiffusionControlNetPipeline, FlaxControlNetModel
|
| 4 |
-
from diffusers import FlaxScoreSdeVeScheduler
|
| 5 |
import torch
|
| 6 |
torch.backends.cuda.matmul.allow_tf32 = True
|
| 7 |
import torchvision
|
|
@@ -35,7 +35,7 @@ pipe, params = FlaxStableDiffusionControlNetPipeline.from_pretrained(
|
|
| 35 |
revision="flax",
|
| 36 |
dtype=jnp.bfloat16,
|
| 37 |
)
|
| 38 |
-
pipe.scheduler =
|
| 39 |
#pipe.enable_model_cpu_offload()
|
| 40 |
#pipe.enable_xformers_memory_efficient_attention()
|
| 41 |
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import jax.numpy as jnp
|
| 3 |
from diffusers import FlaxStableDiffusionControlNetPipeline, FlaxControlNetModel
|
| 4 |
+
from diffusers import FlaxScoreSdeVeScheduler, FlaxDPMSolverMultistepScheduler
|
| 5 |
import torch
|
| 6 |
torch.backends.cuda.matmul.allow_tf32 = True
|
| 7 |
import torchvision
|
|
|
|
| 35 |
revision="flax",
|
| 36 |
dtype=jnp.bfloat16,
|
| 37 |
)
|
| 38 |
+
pipe.scheduler = FlaxDPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
|
| 39 |
#pipe.enable_model_cpu_offload()
|
| 40 |
#pipe.enable_xformers_memory_efficient_attention()
|
| 41 |
|