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,6 +32,9 @@ if torch.cuda.is_available():
|
|
32 |
model,
|
33 |
transformer=transformer,
|
34 |
torch_dtype=torch.bfloat16)
|
|
|
|
|
|
|
35 |
pipe.to("cuda")
|
36 |
|
37 |
|
|
|
1 |
import spaces
|
2 |
import gradio as gr
|
3 |
import torch
|
4 |
+
from diffusers import FluxPipeline, FluxTransformer2DModel, EulerDiscreteScheduler
|
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 = EulerDiscreteScheduler.from_config(
|
36 |
+
pipe.scheduler.config, timestep_spacing="linspace", use_beta_sigmas=True
|
37 |
+
)
|
38 |
pipe.to("cuda")
|
39 |
|
40 |
|