Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -55,7 +55,6 @@ def generate(
|
|
55 |
model = 'SG161222/Realistic_Vision_V6.0_B1_noVAE',
|
56 |
vaecall = 'stabilityai/sd-vae-ft-mse',
|
57 |
lora = 'amazonaws-la/juliette',
|
58 |
-
sampler = 'EulerAncestralDiscreteScheduler',
|
59 |
lora_scale: float = 0.7,
|
60 |
) -> PIL.Image.Image:
|
61 |
if torch.cuda.is_available():
|
@@ -63,13 +62,12 @@ def generate(
|
|
63 |
if not use_vae:
|
64 |
pipe = DiffusionPipeline.from_pretrained(model, torch_dtype=torch.float16)
|
65 |
sampler_class = sampler
|
66 |
-
pipe.scheduler =
|
67 |
|
68 |
if use_vae:
|
69 |
vae = AutoencoderKL.from_pretrained(vaecall, torch_dtype=torch.float16)
|
70 |
pipe = DiffusionPipeline.from_pretrained(model, vae=vae, torch_dtype=torch.float16)
|
71 |
-
|
72 |
-
pipe.scheduler = sampler_class.from_config(pipe.scheduler.config)
|
73 |
|
74 |
if use_lora:
|
75 |
pipe.load_lora_weights(lora)
|
@@ -145,7 +143,6 @@ with gr.Blocks(css="style.css") as demo:
|
|
145 |
visible=os.getenv("SHOW_DUPLICATE_BUTTON") == "1",
|
146 |
)
|
147 |
with gr.Group():
|
148 |
-
sampler = gr.Text(label='Sampler', value='EulerAncestralDiscreteScheduler')
|
149 |
model = gr.Text(label='Modelo')
|
150 |
vaecall = gr.Text(label='VAE')
|
151 |
lora = gr.Text(label='LoRA')
|
@@ -334,7 +331,6 @@ with gr.Blocks(css="style.css") as demo:
|
|
334 |
model,
|
335 |
vaecall,
|
336 |
lora,
|
337 |
-
sampler,
|
338 |
lora_scale,
|
339 |
],
|
340 |
outputs=result,
|
|
|
55 |
model = 'SG161222/Realistic_Vision_V6.0_B1_noVAE',
|
56 |
vaecall = 'stabilityai/sd-vae-ft-mse',
|
57 |
lora = 'amazonaws-la/juliette',
|
|
|
58 |
lora_scale: float = 0.7,
|
59 |
) -> PIL.Image.Image:
|
60 |
if torch.cuda.is_available():
|
|
|
62 |
if not use_vae:
|
63 |
pipe = DiffusionPipeline.from_pretrained(model, torch_dtype=torch.float16)
|
64 |
sampler_class = sampler
|
65 |
+
pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
|
66 |
|
67 |
if use_vae:
|
68 |
vae = AutoencoderKL.from_pretrained(vaecall, torch_dtype=torch.float16)
|
69 |
pipe = DiffusionPipeline.from_pretrained(model, vae=vae, torch_dtype=torch.float16)
|
70 |
+
pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
|
|
|
71 |
|
72 |
if use_lora:
|
73 |
pipe.load_lora_weights(lora)
|
|
|
143 |
visible=os.getenv("SHOW_DUPLICATE_BUTTON") == "1",
|
144 |
)
|
145 |
with gr.Group():
|
|
|
146 |
model = gr.Text(label='Modelo')
|
147 |
vaecall = gr.Text(label='VAE')
|
148 |
lora = gr.Text(label='LoRA')
|
|
|
331 |
model,
|
332 |
vaecall,
|
333 |
lora,
|
|
|
334 |
lora_scale,
|
335 |
],
|
336 |
outputs=result,
|