Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
import gradio as gr
|
|
|
2 |
import torch
|
3 |
import spaces
|
4 |
from diffusers import FluxPipeline, FluxTransformer2DModel
|
@@ -32,6 +33,8 @@ pipe = FluxPipeline.from_pretrained(
|
|
32 |
)
|
33 |
pipe.to(device)
|
34 |
|
|
|
|
|
35 |
@spaces.GPU
|
36 |
def infer(prompt, seed, randomize_seed, num_inference_steps, progress=gr.Progress(track_tqdm=True)):
|
37 |
prompt_template = f"A side by side 4 frame image showing consecutive stills from a looped gif moving from left to right. The gif is {prompt}"
|
|
|
1 |
import gradio as gr
|
2 |
+
import numpy as np
|
3 |
import torch
|
4 |
import spaces
|
5 |
from diffusers import FluxPipeline, FluxTransformer2DModel
|
|
|
33 |
)
|
34 |
pipe.to(device)
|
35 |
|
36 |
+
MAX_SEED = np.iinfo(np.int32).max
|
37 |
+
|
38 |
@spaces.GPU
|
39 |
def infer(prompt, seed, randomize_seed, num_inference_steps, progress=gr.Progress(track_tqdm=True)):
|
40 |
prompt_template = f"A side by side 4 frame image showing consecutive stills from a looped gif moving from left to right. The gif is {prompt}"
|