williamyang1991 / DualStyleGAN

[CVPR 2022] Pastiche Master: Exemplar-Based High-Resolution Portrait Style Transfer
Other
1.61k stars 249 forks source link

訓練問題 #95

Closed qppppq closed 9 months ago

qppppq commented 9 months ago

你好,我想自己訓練畢卡索的風格,我的資料集目前只用了29張圖片,完成readme上的所有步驟後,執行時出現以下錯誤。

(hope) ubuntu@sslab-server:~/hung_tmp/DualStyleGAN$ python style_transfer.py --style picasso Load options align_face: False content: ./data/content/081680.jpg data_path: ./data/ exstyle_name: refined_exstyle_code.npy model_name: generator.pt model_path: ./checkpoint/ name: cartoon_transfer output_path: ./output/ preserve_color: False style: picasso style_id: 53 truncation: 0.75 weight: [0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]


Loading pSp from checkpoint: ./checkpoint/encoder.pt Load models successfully! /home/ubuntu/hung_tmp/DualStyleGAN/model/stylegan/op/conv2d_gradfix.py:88: UserWarning: conv2d_gradfix not supported on PyTorch 1.10.1+cu111. Falling back to torch.nn.functional.conv2d(). warnings.warn( Traceback (most recent call last): File "style_transfer.py", line 108, in stylename = list(exstyles.keys())[args.style_id] IndexError: list index out of range

williamyang1991 commented 9 months ago

只用了29張圖片 style_id: 53

只有29张图像,那style_id就应该小于29

qppppq commented 9 months ago

了解,謝謝你

qppppq commented 9 months ago

還想請教你 style id 是對應資料及有多少數量嗎?

williamyang1991 commented 9 months ago

qppppq commented 9 months ago

謝謝