william_kent

Well-known member
i am a computer-illiterate retard how do i Actually Use VGQAN+CLIP

I'll try and keep it simple:

for the version I use - open this page

it's a codebook running python - it's divided into cells - each cell has a little arrow next to it, if you click the arrow the cell will run

1 - click the arrow next to the 'Licensed under MIT" cell
2 - click the arrow next to "nvidia-smi" - this will reserve a GPU instance
3 - click the arrow next to "!git clone" cell - this will download and install CLIP and associated libraries into a remote directory ( on google drive )
this cell will stop with a message that you have to "restart the runtime" - don't worry about this yet!

4 - the cell below starts with # !curl -L - you need to delete the #s and make sure there is no whitespace at the start of the lines

5 - at this point I scroll down to the section titled "settings for this run" and edit:

prompts=['this is where your text goes']

if there are apostrophes in your text then you'll need to create the prompt like this:

prompts={'''this is a prompt that lets you have a ' character in it''']

there is also a parameter:

image_prompts=[]

optional: you can put the url of an image here and the GAN will try to imitate the style, i.e,

image_prompts=['https://example.com/someimage.jpg']

( I've been experimenting with having both text and image prompt at the same time, but you can leave the image_prompts blank if you want )

I also change the following lines:

vqgan_config='vqgan_imagenet_f16_1024.yaml',
vqgan_checkpoint='vqgan_imagenet_f16_1024.ckpt',

to:

vqgan_config='vqgan_imagenet_f16_16384.yaml',
vqgan_checkpoint='vqgan_imagenet_f16_16384.ckpt',

you can safely ignore the other parameters until you get more used to using the code

5 - OK, we're ready to set it running - the menu at the top of the page has an entry titled "Runtime" - click on this, and then click on "Restart and Run All" - this will run all the cells - scroll to the bottom of the page and watch the images being generated - it takes about 10 minutes to determine whether the image is going to turn out OK or not - if you like the way it is going then let it run until you are happy with the image, otherwise go to the menu at the top and click "Runtime" and then "interrupt execution" - right-click on an image to download

6- once you've done the initial set up ( the "restart and run all" stage ) then you don't need to run all the cells again - you can 'interrupt" and edit the settings cell with new prompts, click the arrow on the settings cell to load the new parameters, then click the arrow next to "actually do the run" to set it off generating a new image

I hope this helps....
 

other_life

bioconfused
args = argparse.Namespace(
prompts=['and the wonderful ride through cyberspace'],
image_prompts=[''],
noise_prompt_seeds=[],
noise_prompt_weights=[],
size=[480, 480],
tv_weight=0.,
clip_model='ViT-B/32',
vqgan_config='vqgan_imagenet_f16_16384.yaml',
vqgan_checkpoint='vqgan_imagenet_f16_16384.ckpt'
step_size=0.05,
weight_decay=0.,
cutn=64,
cut_pow=1.,
display_freq=50,
seed=0,
 

other_life

bioconfused
dissensus automatically embeds the image url but that's the settings for the run and where i keep getting the error
 

william_kent

Well-known member
args = argparse.Namespace(
prompts=['and the wonderful ride through cyberspace'],
image_prompts=['your_mage_url'],
noise_prompt_seeds=[],
noise_prompt_weights=[],
size=[480, 480],
tv_weight=0.,
clip_model='ViT-B/32',
vqgan_config='vqgan_imagenet_f16_16384.yaml',
vqgan_checkpoint='vqgan_imagenet_f16_16384.ckpt',
step_size=0.05,
weight_decay=0.,
cutn=64,
cut_pow=1.,
display_freq=50,
seed=0,
)
 

linebaugh

Well-known member
1628976117585.png1628976137562.png

Im only getting images that look like this. Cool, but not 'in the style of francis bacon' and nothing like this:
fjRwYzk_spI7PUCTGjZR3A%2Ffrancis-bacon-from-muybridge-the-human-figure-in-motion-woman-emptying-a-bowl-of-water-paralytic-child-walking-on-all-fours-1965.jpg
 
Top