shyamsn97 / mario-gpt

[Neurips 2023] Generating Mario Levels with GPT2. Code for the paper "MarioGPT: Open-Ended Text2Level Generation through Large Language Models" https://arxiv.org/abs/2302.05981
https://huggingface.co/shyamsn97/Mario-GPT2-700-context-length
MIT License
1.11k stars 100 forks source link

Doesn't works #8

Closed zwobot1980 closed 1 year ago

zwobot1980 commented 1 year ago

Hi, i did try to use your exemple but it doesnt works. See the message on the screenshot.

Mario-GPT

you example script

from mario_gpt.lm import MarioLM from mario_gpt.utils import view_level, convert_level_to_png

pretrained_model = shyamsn97/Mario-GPT2-700-context-length

mario_lm = MarioLM()

prompts = ["many pipes, many enemies, many blocks, high elevation"]

generate level of size 700, pump temperature up to ~2.4 for more stochastic but playable levels

generated_level = mario_lm.sample( prompts=prompts, num_steps=700, temperature=2.0, use_tqdm=True )

show string list

view_level(generated_level, mario_lm.tokenizer) convert_level_to_png(generated_level, "generated_level.png", mario_lm.tokenizer)

shyamsn97 commented 1 year ago

Hey! In the works to update the pypi package. Right now you can either use num_steps = ((anything divisible by 14) - 1) or you can install the package from source

shyamsn97 commented 1 year ago

Should be working now, feel free to open another issue if theres additional errors!

zwobot1980 commented 1 year ago

Thank you for your help. I will try it :-)

Am 18.02.2023 um 09:33 schrieb Shyam Sudhakaran @.***>:

Closed #8 https://github.com/shyamsn97/mario-gpt/issues/8 as completed.

— Reply to this email directly, view it on GitHub https://github.com/shyamsn97/mario-gpt/issues/8#event-8552613092, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXCD35VOZWTDYQ4NQA4JWFLWYCCNBANCNFSM6AAAAAAU7Q6KXY. You are receiving this because you authored the thread.