Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ def run(checkpoint, prompt):
|
|
9 |
model_id = checkpoint
|
10 |
adapter_id = "latent-consistency/lcm-lora-sdv1-5"
|
11 |
|
12 |
-
pipe = AutoPipelineForText2Image.
|
13 |
pipe.scheduler = LCMScheduler.from_config(pipe.scheduler.config)
|
14 |
|
15 |
# load and fuse lcm lora
|
@@ -21,7 +21,7 @@ def run(checkpoint, prompt):
|
|
21 |
return image
|
22 |
|
23 |
with gr.Blocks() as demo:
|
24 |
-
input_checkpoint = gr.Text(value="
|
25 |
input_prompt = gr.Text(value="Self-portrait oil painting, a beautiful cyborg with golden hair, 8k", label="Prompt")
|
26 |
out = gr.Image(type="pil")
|
27 |
btn = gr.Button("Run")
|
|
|
9 |
model_id = checkpoint
|
10 |
adapter_id = "latent-consistency/lcm-lora-sdv1-5"
|
11 |
|
12 |
+
pipe = AutoPipelineForText2Image.from_pretrained(model_id, torch_dtype=torch.float32, safety_checker=None).to("cpu")
|
13 |
pipe.scheduler = LCMScheduler.from_config(pipe.scheduler.config)
|
14 |
|
15 |
# load and fuse lcm lora
|
|
|
21 |
return image
|
22 |
|
23 |
with gr.Blocks() as demo:
|
24 |
+
input_checkpoint = gr.Text(value="Lykon/dreamshaper-8", label="Checkpoint")
|
25 |
input_prompt = gr.Text(value="Self-portrait oil painting, a beautiful cyborg with golden hair, 8k", label="Prompt")
|
26 |
out = gr.Image(type="pil")
|
27 |
btn = gr.Button("Run")
|