Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import spaces
|
2 |
import gradio as gr
|
3 |
import torch
|
4 |
-
from diffusers import FluxPipeline, FluxTransformer2DModel,
|
5 |
from huggingface_hub import hf_hub_download
|
6 |
from PIL import Image
|
7 |
import requests
|
@@ -32,7 +32,7 @@ if torch.cuda.is_available():
|
|
32 |
model,
|
33 |
transformer=transformer,
|
34 |
torch_dtype=torch.bfloat16)
|
35 |
-
pipe.scheduler =
|
36 |
pipe.scheduler.config, use_beta_sigmas=True
|
37 |
)
|
38 |
pipe.to("cuda")
|
|
|
1 |
import spaces
|
2 |
import gradio as gr
|
3 |
import torch
|
4 |
+
from diffusers import FluxPipeline, FluxTransformer2DModel, FlowMatchEulerDiscreteScheduler
|
5 |
from huggingface_hub import hf_hub_download
|
6 |
from PIL import Image
|
7 |
import requests
|
|
|
32 |
model,
|
33 |
transformer=transformer,
|
34 |
torch_dtype=torch.bfloat16)
|
35 |
+
pipe.scheduler = FlowMatchEulerDiscreteScheduler.from_config(
|
36 |
pipe.scheduler.config, use_beta_sigmas=True
|
37 |
)
|
38 |
pipe.to("cuda")
|