Skip to content

Commit ec2d674

Browse files
committed
Modified the LoRA example of mutable torch trt module
1 parent 6fe31f8 commit ec2d674

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

examples/dynamo/mutable_torchtrt_module_example.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,13 @@
8383
"immutable_weights": False,
8484
}
8585

86-
model_id = "runwayml/stable-diffusion-v1-5"
86+
model_id = "stabilityai/stable-diffusion-xl-base-1.0"
8787
device = "cuda:0"
8888

89-
prompt = "house in forest, shuimobysim, wuchangshuo, best quality"
90-
negative = "(worst quality:2), (low quality:2), (normal quality:2), lowres, normal quality, out of focus, cloudy, (watermark:2),"
89+
prompt = "cinematic photo elsa, police uniform <lora:princess_xl_v2:0.8>, . 35mm photograph, film, bokeh, professional, 4k, highly detailed"
90+
negative = "drawing, painting, crayon, sketch, graphite, impressionist, noisy, blurry, soft, deformed, ugly, nude"
9191

92-
pipe = DiffusionPipeline.from_pretrained(
93-
model_id, revision="fp16", torch_dtype=torch.float16
94-
)
92+
pipe = DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
9593
pipe.to(device)
9694

9795
# The only extra line you need
@@ -103,7 +101,7 @@
103101
# Standard Huggingface LoRA loading procedure
104102
pipe.load_lora_weights(
105103
"stablediffusionapi/load_lora_embeddings",
106-
weight_name="moxin.safetensors",
104+
weight_name="all-disney-princess-xl-lo.safetensors",
107105
adapter_name="lora1",
108106
)
109107
pipe.set_adapters(["lora1"], adapter_weights=[1])

0 commit comments

Comments
 (0)