Spaces:
Running
on
Zero
Running
on
Zero
removed one diff
Browse files- check_app.py +5 -3
check_app.py
CHANGED
@@ -7,8 +7,7 @@ from diffusers import (
|
|
7 |
AuraFlowPipeline,
|
8 |
Kandinsky3Pipeline,
|
9 |
HunyuanDiTPipeline,
|
10 |
-
LuminaText2ImgPipeline
|
11 |
-
OneDiffusionPipeline,
|
12 |
)
|
13 |
import gradio as gr
|
14 |
|
@@ -96,6 +95,7 @@ def generate_image_with_progress(pipe, prompt, num_steps, guidance_scale=None, s
|
|
96 |
|
97 |
def create_pipeline_logic(model_name, config):
|
98 |
def logic(prompt_text):
|
|
|
99 |
progress = gr.Progress()
|
100 |
num_steps = 30
|
101 |
guidance_scale = 7.5 # Example guidance scale, can be adjusted per model
|
@@ -103,7 +103,9 @@ def create_pipeline_logic(model_name, config):
|
|
103 |
|
104 |
pipe_class = config["pipeline_class"]
|
105 |
pipe = pipe_class.from_pretrained(
|
106 |
-
config["repo_id"],
|
|
|
|
|
107 |
).to("cuda")
|
108 |
image = generate_image_with_progress(
|
109 |
pipe, prompt_text, num_steps=num_steps, guidance_scale=guidance_scale, seed=seed, progress=progress
|
|
|
7 |
AuraFlowPipeline,
|
8 |
Kandinsky3Pipeline,
|
9 |
HunyuanDiTPipeline,
|
10 |
+
LuminaText2ImgPipeline
|
|
|
11 |
)
|
12 |
import gradio as gr
|
13 |
|
|
|
95 |
|
96 |
def create_pipeline_logic(model_name, config):
|
97 |
def logic(prompt_text):
|
98 |
+
print(f"starting {model_name}")
|
99 |
progress = gr.Progress()
|
100 |
num_steps = 30
|
101 |
guidance_scale = 7.5 # Example guidance scale, can be adjusted per model
|
|
|
103 |
|
104 |
pipe_class = config["pipeline_class"]
|
105 |
pipe = pipe_class.from_pretrained(
|
106 |
+
config["repo_id"],
|
107 |
+
#cache_dir=config["cache_dir"],
|
108 |
+
torch_dtype=torch.bfloat16
|
109 |
).to("cuda")
|
110 |
image = generate_image_with_progress(
|
111 |
pipe, prompt_text, num_steps=num_steps, guidance_scale=guidance_scale, seed=seed, progress=progress
|