fix paths for promptgen
This commit is contained in:
@@ -5,13 +5,13 @@ import random
|
||||
script_path = os.path.dirname(os.path.realpath(__file__))
|
||||
comfy_path = script_path.split('custom_nodes')[0]
|
||||
|
||||
if not os.path.exists(f'{comfy_path}custom_nodes/VextraNodes/binary/distilgpt2-stable-diffusion-v2'):
|
||||
if not os.path.exists(f'{comfy_path}custom_nodes/ComfyUI-Vextra-Nodes/binary/distilgpt2-stable-diffusion-v2'):
|
||||
print('Downloading model...')
|
||||
os.system(f'git clone https://huggingface.co/FredZhang7/distilgpt2-stable-diffusion-v2 {comfy_path}custom_nodes/ComfyUI-Vextra-Nodes/binary/distilgpt2-stable-diffusion-v2')
|
||||
|
||||
tokenizer = GPT2Tokenizer.from_pretrained('distilgpt2')
|
||||
tokenizer.add_special_tokens({'pad_token': '[PAD]'})
|
||||
model = GPT2LMHeadModel.from_pretrained(f'{comfy_path}custom_nodes/VextraNodes/binary/distilgpt2-stable-diffusion-v2')
|
||||
model = GPT2LMHeadModel.from_pretrained(f'{comfy_path}custom_nodes/ComfyUI-Vextra-Nodes/binary/distilgpt2-stable-diffusion-v2')
|
||||
|
||||
class GetPrompt():
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user