Skip to content

Update demo_4M_sampler.py #18

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all 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
4 changes: 3 additions & 1 deletion fourm/demo_4M_sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,8 @@ def __init__(self,
self.mods_sr = mods_sr or list(set(fm_sr.encoder_modalities) | set(fm_sr.decoder_modalities))
else:
self.sampler_fm_sr = None
self.mods_sr = []


# Load tokenizers
self.toks = {}
Expand Down Expand Up @@ -537,4 +539,4 @@ def modalities_to_pil(self, mod_dict, use_fixed_plotting_order=False, resize=Non
plot_name = MODALITY_PLOTTING_NAME_MAP.get(mod_name, mod_name)
plotted_modalities.append((img_pil, plot_name))

return plotted_modalities
return plotted_modalities