Spaces:
Runtime error
Runtime error
Rename cond_tau to adapter_conditioning_factor
Browse files- app_base.py +7 -6
- app_sketch.py +7 -6
- model.py +2 -2
app_base.py
CHANGED
@@ -28,7 +28,7 @@ def create_demo(model: Model) -> gr.Blocks:
|
|
28 |
num_inference_steps: int = 30,
|
29 |
guidance_scale: float = 5.0,
|
30 |
adapter_conditioning_scale: float = 1.0,
|
31 |
-
|
32 |
seed: int = 0,
|
33 |
apply_preprocess: bool = True,
|
34 |
progress=gr.Progress(track_tqdm=True),
|
@@ -43,7 +43,7 @@ def create_demo(model: Model) -> gr.Blocks:
|
|
43 |
num_inference_steps=num_inference_steps,
|
44 |
guidance_scale=guidance_scale,
|
45 |
adapter_conditioning_scale=adapter_conditioning_scale,
|
46 |
-
|
47 |
seed=seed,
|
48 |
apply_preprocess=apply_preprocess,
|
49 |
)
|
@@ -130,14 +130,15 @@ def create_demo(model: Model) -> gr.Blocks:
|
|
130 |
value=5.0,
|
131 |
)
|
132 |
adapter_conditioning_scale = gr.Slider(
|
133 |
-
label="Adapter
|
134 |
minimum=0.5,
|
135 |
maximum=1,
|
136 |
step=0.1,
|
137 |
value=1.0,
|
138 |
)
|
139 |
-
|
140 |
-
label="
|
|
|
141 |
minimum=0.5,
|
142 |
maximum=1.0,
|
143 |
step=0.1,
|
@@ -177,7 +178,7 @@ def create_demo(model: Model) -> gr.Blocks:
|
|
177 |
num_inference_steps,
|
178 |
guidance_scale,
|
179 |
adapter_conditioning_scale,
|
180 |
-
|
181 |
seed,
|
182 |
apply_preprocess,
|
183 |
]
|
|
|
28 |
num_inference_steps: int = 30,
|
29 |
guidance_scale: float = 5.0,
|
30 |
adapter_conditioning_scale: float = 1.0,
|
31 |
+
adapter_conditioning_factor: float = 1.0,
|
32 |
seed: int = 0,
|
33 |
apply_preprocess: bool = True,
|
34 |
progress=gr.Progress(track_tqdm=True),
|
|
|
43 |
num_inference_steps=num_inference_steps,
|
44 |
guidance_scale=guidance_scale,
|
45 |
adapter_conditioning_scale=adapter_conditioning_scale,
|
46 |
+
adapter_conditioning_factor=adapter_conditioning_factor,
|
47 |
seed=seed,
|
48 |
apply_preprocess=apply_preprocess,
|
49 |
)
|
|
|
130 |
value=5.0,
|
131 |
)
|
132 |
adapter_conditioning_scale = gr.Slider(
|
133 |
+
label="Adapter conditioning scale",
|
134 |
minimum=0.5,
|
135 |
maximum=1,
|
136 |
step=0.1,
|
137 |
value=1.0,
|
138 |
)
|
139 |
+
adapter_conditioning_factor = gr.Slider(
|
140 |
+
label="Adapter conditioning factor",
|
141 |
+
info="Fraction of timesteps for which adapter should be applied",
|
142 |
minimum=0.5,
|
143 |
maximum=1.0,
|
144 |
step=0.1,
|
|
|
178 |
num_inference_steps,
|
179 |
guidance_scale,
|
180 |
adapter_conditioning_scale,
|
181 |
+
adapter_conditioning_factor,
|
182 |
seed,
|
183 |
apply_preprocess,
|
184 |
]
|
app_sketch.py
CHANGED
@@ -26,7 +26,7 @@ def create_demo(model: Model) -> gr.Blocks:
|
|
26 |
num_steps: int = 25,
|
27 |
guidance_scale: float = 5,
|
28 |
adapter_conditioning_scale: float = 0.8,
|
29 |
-
|
30 |
seed: int = 0,
|
31 |
progress=gr.Progress(track_tqdm=True),
|
32 |
) -> PIL.Image.Image:
|
@@ -44,7 +44,7 @@ def create_demo(model: Model) -> gr.Blocks:
|
|
44 |
num_inference_steps=num_steps,
|
45 |
guidance_scale=guidance_scale,
|
46 |
adapter_conditioning_scale=adapter_conditioning_scale,
|
47 |
-
|
48 |
seed=seed,
|
49 |
apply_preprocess=False,
|
50 |
)[1]
|
@@ -83,14 +83,15 @@ def create_demo(model: Model) -> gr.Blocks:
|
|
83 |
value=5,
|
84 |
)
|
85 |
adapter_conditioning_scale = gr.Slider(
|
86 |
-
label="Adapter
|
87 |
minimum=0.5,
|
88 |
maximum=1,
|
89 |
step=0.1,
|
90 |
value=0.8,
|
91 |
)
|
92 |
-
|
93 |
-
label="
|
|
|
94 |
minimum=0.5,
|
95 |
maximum=1,
|
96 |
step=0.1,
|
@@ -115,7 +116,7 @@ def create_demo(model: Model) -> gr.Blocks:
|
|
115 |
num_steps,
|
116 |
guidance_scale,
|
117 |
adapter_conditioning_scale,
|
118 |
-
|
119 |
seed,
|
120 |
]
|
121 |
prompt.submit(
|
|
|
26 |
num_steps: int = 25,
|
27 |
guidance_scale: float = 5,
|
28 |
adapter_conditioning_scale: float = 0.8,
|
29 |
+
adapter_conditioning_factor: float = 0.8,
|
30 |
seed: int = 0,
|
31 |
progress=gr.Progress(track_tqdm=True),
|
32 |
) -> PIL.Image.Image:
|
|
|
44 |
num_inference_steps=num_steps,
|
45 |
guidance_scale=guidance_scale,
|
46 |
adapter_conditioning_scale=adapter_conditioning_scale,
|
47 |
+
adapter_conditioning_factor=adapter_conditioning_factor,
|
48 |
seed=seed,
|
49 |
apply_preprocess=False,
|
50 |
)[1]
|
|
|
83 |
value=5,
|
84 |
)
|
85 |
adapter_conditioning_scale = gr.Slider(
|
86 |
+
label="Adapter conditioning scale",
|
87 |
minimum=0.5,
|
88 |
maximum=1,
|
89 |
step=0.1,
|
90 |
value=0.8,
|
91 |
)
|
92 |
+
adapter_conditioning_factor = gr.Slider(
|
93 |
+
label="Adapter conditioning factor",
|
94 |
+
info="Fraction of timesteps for which adapter should be applied",
|
95 |
minimum=0.5,
|
96 |
maximum=1,
|
97 |
step=0.1,
|
|
|
116 |
num_steps,
|
117 |
guidance_scale,
|
118 |
adapter_conditioning_scale,
|
119 |
+
adapter_conditioning_factor,
|
120 |
seed,
|
121 |
]
|
122 |
prompt.submit(
|
model.py
CHANGED
@@ -317,7 +317,7 @@ class Model:
|
|
317 |
num_inference_steps: int = 30,
|
318 |
guidance_scale: float = 5.0,
|
319 |
adapter_conditioning_scale: float = 1.0,
|
320 |
-
|
321 |
seed: int = 0,
|
322 |
apply_preprocess: bool = True,
|
323 |
) -> list[PIL.Image.Image]:
|
@@ -344,7 +344,7 @@ class Model:
|
|
344 |
image=image,
|
345 |
num_inference_steps=num_inference_steps,
|
346 |
adapter_conditioning_scale=adapter_conditioning_scale,
|
347 |
-
adapter_conditioning_factor=
|
348 |
generator=generator,
|
349 |
guidance_scale=guidance_scale,
|
350 |
).images[0]
|
|
|
317 |
num_inference_steps: int = 30,
|
318 |
guidance_scale: float = 5.0,
|
319 |
adapter_conditioning_scale: float = 1.0,
|
320 |
+
adapter_conditioning_factor: float = 1.0,
|
321 |
seed: int = 0,
|
322 |
apply_preprocess: bool = True,
|
323 |
) -> list[PIL.Image.Image]:
|
|
|
344 |
image=image,
|
345 |
num_inference_steps=num_inference_steps,
|
346 |
adapter_conditioning_scale=adapter_conditioning_scale,
|
347 |
+
adapter_conditioning_factor=adapter_conditioning_factor,
|
348 |
generator=generator,
|
349 |
guidance_scale=guidance_scale,
|
350 |
).images[0]
|