Skip to content

[Fix] Test of sd3 lora #9843

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Nov 5, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 31 additions & 31 deletions tests/lora/test_lora_layers_sd3.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def get_inputs(self, device, seed=0):

def test_sd3_img2img_lora(self):
pipe = self.pipeline_class.from_pretrained(self.repo_id, torch_dtype=torch.float16)
pipe.load_lora_weights("nerijs/pixel-art-xl", weight_name="pixel-art-xl.safetensors")
pipe.load_lora_weights("zwloong/sd3-lora-training-rank16-v2", weight_name="pytorch_lora_weights.safetensors")
pipe.enable_sequential_cpu_offload()

inputs = self.get_inputs(torch_device)
Expand All @@ -175,36 +175,36 @@ def test_sd3_img2img_lora(self):
image_slice = image[0, :10, :10]
expected_slice = np.array(
[
0.47827148,
0.5,
0.71972656,
0.3955078,
0.4194336,
0.69628906,
0.37036133,
0.40820312,
0.6923828,
0.36450195,
0.40429688,
0.6904297,
0.35595703,
0.39257812,
0.68652344,
0.35498047,
0.3984375,
0.68310547,
0.34716797,
0.3996582,
0.6855469,
0.3388672,
0.3959961,
0.6816406,
0.34033203,
0.40429688,
0.6845703,
0.34228516,
0.4086914,
0.6870117,
0.5371094,
0.5439453,
0.67041016,
0.53808594,
0.5517578,
0.69921875,
0.49389648,
0.51123047,
0.6640625,
0.49291992,
0.5136719,
0.66796875,
0.46557617,
0.4873047,
0.65234375,
0.48754883,
0.5136719,
0.6665039,
0.48364258,
0.51171875,
0.67578125,
0.484375,
0.51464844,
0.67626953,
0.48876953,
0.52441406,
0.67871094,
0.4958496,
0.53027344,
0.6928711,
]
)

Expand Down