mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-02-05 13:12:55 +08:00
fix random sampling with pin_memory
This commit is contained in:
parent
a4a5735d0a
commit
2d22d72cda
@ -134,7 +134,7 @@ class PersonalizedBase(Dataset):
|
|||||||
if self.tag_drop_out != 0 or self.shuffle_tags:
|
if self.tag_drop_out != 0 or self.shuffle_tags:
|
||||||
entry.cond_text = self.create_text(entry.filename_text)
|
entry.cond_text = self.create_text(entry.filename_text)
|
||||||
if self.latent_sampling_method == "random":
|
if self.latent_sampling_method == "random":
|
||||||
entry.latent_sample = shared.sd_model.get_first_stage_encoding(entry.latent_dist)
|
entry.latent_sample = shared.sd_model.get_first_stage_encoding(entry.latent_dist).to(devices.cpu)
|
||||||
return entry
|
return entry
|
||||||
|
|
||||||
class PersonalizedDataLoader(DataLoader):
|
class PersonalizedDataLoader(DataLoader):
|
||||||
|
Loading…
Reference in New Issue
Block a user