Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -16,11 +16,11 @@ login(token=a )
|
|
| 16 |
|
| 17 |
|
| 18 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 19 |
-
|
| 20 |
#model_repo_id = "stable-diffusion-v1-5/stable-diffusion-v1-5"
|
| 21 |
#model_repo_id = "cagliostrolab/animagine-xl-4.0"
|
| 22 |
#model_repo_id = "stabilityai/stable-diffusion-xl-base-1.0"
|
| 23 |
-
model_repo_id ="black-forest-labs/FLUX.1-dev"
|
| 24 |
|
| 25 |
|
| 26 |
|
|
@@ -70,7 +70,7 @@ def infer(
|
|
| 70 |
if randomize_seed:
|
| 71 |
seed = random.randint(0, MAX_SEED)
|
| 72 |
|
| 73 |
-
generator = torch.Generator(
|
| 74 |
|
| 75 |
image = pipe(
|
| 76 |
prompt=prompt,
|
|
@@ -156,7 +156,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 156 |
minimum=0.0,
|
| 157 |
maximum=10.0,
|
| 158 |
step=0.1,
|
| 159 |
-
value=
|
| 160 |
)
|
| 161 |
|
| 162 |
num_inference_steps = gr.Slider(
|
|
@@ -164,7 +164,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 164 |
minimum=1,
|
| 165 |
maximum=50,
|
| 166 |
step=1,
|
| 167 |
-
value=
|
| 168 |
)
|
| 169 |
|
| 170 |
gr.Examples(examples=examples, inputs=[prompt])
|
|
|
|
| 16 |
|
| 17 |
|
| 18 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 19 |
+
model_repo_id = "stabilityai/sdxl-turbo" # "stable-diffusion-v1-5/stable-diffusion-v1-5" # Replace to the model you would like to use
|
| 20 |
#model_repo_id = "stable-diffusion-v1-5/stable-diffusion-v1-5"
|
| 21 |
#model_repo_id = "cagliostrolab/animagine-xl-4.0"
|
| 22 |
#model_repo_id = "stabilityai/stable-diffusion-xl-base-1.0"
|
| 23 |
+
#model_repo_id ="black-forest-labs/FLUX.1-dev"
|
| 24 |
|
| 25 |
|
| 26 |
|
|
|
|
| 70 |
if randomize_seed:
|
| 71 |
seed = random.randint(0, MAX_SEED)
|
| 72 |
|
| 73 |
+
generator = torch.Generator().manual_seed(seed)
|
| 74 |
|
| 75 |
image = pipe(
|
| 76 |
prompt=prompt,
|
|
|
|
| 156 |
minimum=0.0,
|
| 157 |
maximum=10.0,
|
| 158 |
step=0.1,
|
| 159 |
+
value=0.0, # Replace with defaults that work for your model
|
| 160 |
)
|
| 161 |
|
| 162 |
num_inference_steps = gr.Slider(
|
|
|
|
| 164 |
minimum=1,
|
| 165 |
maximum=50,
|
| 166 |
step=1,
|
| 167 |
+
value=3, # Replace with defaults that work for your model
|
| 168 |
)
|
| 169 |
|
| 170 |
gr.Examples(examples=examples, inputs=[prompt])
|