기본 콘텐츠로 건너뛰기

Wan2.1 Text to Image - Wan2.1 을 이용한 이미지 생성 (Comfyui)

Wan 2.1 은 텍스트나 이미지를 입력하면 고품질의 영상을 만들어주는 AI 비디오 생성 모델입니다.  

지금은 Wan2.2 모델이 출시되었다.   보통 Wan2.1 은 Video 를 생성할 수있는 오픈소스 모델로 Comfyui 에서 Wan2.1 또는 Wan2.2 를 통하여 Text 나 Image 를 가지고 쉽게 Video 를 생성할 수 있는데, 여기서는 Wan2.1 모델을 이용하여 Text to Image 를 생성해 볼 려고 한다.

Wan2.1 모델을 이용하여 이미지를 생성해 보면, 상당히  품질이 뛰어나며 생생한 사실적인 이미지를 만들어준다.   다만  모델의 크기가 커서 이미지 생성 속도가 느린 단점이 있다.

Wan2.1 로 만든 이미지

위의 이미지를 보면  상당히 고품질 이미지로 얼굴의 솜털마저 자연스럽게 보이며, 좀 더 사실적인 사진 느낌을 나타내 준다.

1. Wan2.1 을 사용하기 위한 필요 모델들 다운로드

  • wan2.1_t2v_14B_fp8_scaled : 여기서는 이 모델을 사용하여 이미지를 만들어 본다.  이 모델의 다운 로드는  에 있기 때문에 구글에서 검색하여   에 서 다운 받아 기존의 Flux 모델 설치된 폴더에 설치하면 된다.
  • CLIP 모델 : umt5_xxl_fp8_e4m3fn_scaled.safetensors 이것을 다운 받아 설치하여 사용한다.  다운 받을 곳은 ( https://comfyanonymous.github.io/ComfyUI_examples/wan/  ) 에 들어가면 다운 받을 수 있다.
  • VAE : wan_2.1_vae.safetensors 이 모델을 다운받아 사용해야 한다.
  • Lora 모델 : Wan2.1_T2V_14B_FusionX_LoRA 와 Wan21_T2V_14B_lightx2v_cfg_step_distill_lora_rank32 두 종류를 구글 검색하여 다운 받아 사용한다.  물론 Lora 파일이 없어도 이미지 생성이 가능하지만 생성 시간이 좀 더 걸린다.  ( https://huggingface.co/vrgamedevgirl84/Wan14BT2VFusioniX/tree/main/FusionX_LoRa  ),  (  https://huggingface.co/Kijai/WanVideo_comfy/blob/main/Wan21_T2V_14B_lightx2v_cfg_step_distill_lora_rank32.safetensors )  참조.
  • Sampler 와 Scheduler  는 euler , Simple 를 사용해도 되지만,  좀 더 고품질을 위하여   "res_2s"와 "bong_tangent" 를 사용하면 좋다.  두 샘플러와 스케줄러는 각각 "Res4Lyf" 커스텀 노드를 설치하면 사용가능하다.

2. Workflow

Wan2.1 용 text to image  Workflow

Workflow는 특별히 복잡하지 않는 다른 이미지 생성형 Workflow 와 유사하다.
step 은 8 step, cfg 는 1 로 하여 생성,  가급적 이미지 사이즈는 1536 x 1536  이 좋다.
필요한 모델들을 정상적으로 다운하고 설치 하였으면 실행해 보면 된다.

3. 이미지 생성 비교

  • Prompt : masterpiece,best quality,amazing quality,absurdres,
black hair,short hair,bob cut,straight hair,hair between eyes,nail polish,
1girl,petite, tall, slim, slender, small head, 
wearing black microskirt,white_shirt,black blazer,red lace thighhighs, business_suit,  red panties, long legs, high heel, confidently pose,
She bites her lower lip slightly while gazing seductively at the camera,
cross arms,
simple background,studio background,shadows,looking at viewer,front view,facing viewer,seductive smile,dutch angle,full body,

Flux 이미지


Wan2.1 이미지
Wan2.1 이미지가 좀 더 사실적인 이미지 느낌이다.

  • Prompt : Create a stunning pyrography artwork on a wooden canvas in brown frame,depicting a beautiful korean lady,
a green, knitted dress designed with a halter neck style. The fabric has a mesh-like, open-knit pattern that creates a breathable look. It is form-fitting, accentuating the curves of the body, and extends to mid-thigh in length. The halter neck is secured with ties, adding a playful touch to the overall design. This dress appears suited for casual summer outings or beachwear.
 The pyrography technique uses finely burned lines and shading to create a realistic yet artistic representation of the woman, with varying depths and tones to emphasize the outline of woman. The background remains minimalist of flower symbol, allowing the intricate details of the dress to stand out, evoking a serene and timeless aesthetic.

Flux 이미지


Wan2.1 이미지
이미지를 확대해 보면 Wan2.1 이미지가 좀 더 디테일하고 고품질인것을 알 수 있다.
이미지의 스타일은 각자의 취향이기 때문에 어느것이 더 낫다고 단정하기는 어렵다.

  • Prompt : A mesmerizing and intricate work of art featuring a water droplet-shaped design that embodies the purity and tranquility of nature. Within the transparent droplet,  A sophisticated black-and-white silhouette illustration featuring an elegant woman at the center. Her long, flowing hair is gently swept by the wind, creating a sense of movement and grace. half body drawing,
Her body is depicted using smooth, flowing curves, emphasizing elegance and fluidity. 
Surrounding and seamlessly intertwining with her silhouette are organic botanical elements, including delicate leaf-like shapes and vine-like curves, symbolizing harmony between humanity and nature. filled with ivy plants, leaves and red flowers. The composition maintains a natural rhythm with soft, fluid lines, enhancing the sense of unity. 
The strong contrast between the black silhouette and the white background creates a bold and visually striking effect, making the design both minimalistic and sophisticated.
 The smooth, curved edges of the droplet contrast beautifully with the soft, atmospheric blend of colors, creating a visually captivating and ethereal composition.

Flux 이미지


Wan2.1 이미지
개인적으로 이번 이미지는 Flux 에서 만든 이미지가 더 prompt 에 적합하다고 생각된다.
그렇지만  Wan2.1 이미지도 선명하게 잘 만들어 졌다.

  • Prompt : This image is a stylized representation merging feminine allure with romantic elements. The composition features a woman's face rendered in delicate black line art, with a vibrant red rose positioned above her hair, symbolizing love and beauty. text "Love" in heart, side view,An intricate arrangement of swirling vines adds a touch of fluidity. In the foreground, a red heart and an ampersand, embellished with a bow, contribute depth, while a subtle starry texture on the heart evokes a magical quality. The visual style draws inspiration from modern graphic design, combining elegance with minimalist aesthetics.

Flux 이미지


Wan2.1 이미지
두 이미지 모두 Text 표시도 정확하게 만들어 준다.   Flux 가 좀 더 예술적이고 추상적인 느낌이 들지만 , Wan2.1 도 다른 느낌으로 좋은 이미지를 만들어 준다.

  • Prompt : illustration of a beautiful woman,
A highly realistic 8K rendering of a cozy mountain retreat in winter. A charming log cabin with warm, golden light glowing from the windows, nestled among snow-covered pine trees. Soft smoke gently rises from the chimney, blending into the crisp evening air. A wooden porch with a rustic rocking chair and a small snow-covered table adds to the cozy charm. Tiny lanterns hang along the porch, casting a soft, welcoming glow. Light snowflakes drift peacefully from the sky.
Sitting at the front door is a beautiful woman with long, wavy hair, wearing a cozy oversized sweater, warm leggings, and fluffy boots. She holds a steaming cup of coffee with both hands, gently blowing on it. Wisps of hot steam curl upward from the cup, glowing softly in the cold air, adding to the sense of warmth. Her expression is serene and content as she gazes at the snowy landscape. The frosted windows behind her reveal a crackling fireplace and festive decorations, enhancing the warmth of the scene. The background features a serene winter landscape with a soft pink and orange sunset, adding a dreamy and tranquil atmosphere.

Flux 이미지


Wan2.1 이미지

같은 프롬프트 다른 느낌의 두 이미지 이다.

  • Prompt : animation style, animation character,A stunning woman with long, wavy, chestnut-brown hair sitting elegantly on a marble staircase.detailed eyes, perfect eyes, ((deep violet eyes:1.4)), She wears a short, white, sleeveless dress with intricate floral lace embroidery, designed with a slit that subtly reveals her leg, exuding sophistication and allure. Her pose is confident and poised, with one leg bent close to her chest and the other elegantly extended downward, showcasing the graceful curves of her figure. Her arms rest lightly on her raised knee, adding to her natural and captivating demeanor. She wears gold high-heeled shoes with delicate ankle straps, perfectly complementing her outfit. The background features classic architectural elements, such as stone columns and steps, enhancing the timeless elegance of the scene. Soft, natural lighting bathes her in a warm glow, accentuating her flawless skin and delicate facial features.
Wan2.1 이미지 

Prompt : masterpiece, ultra-detailed , best quality, Clear focus, shadow, anime-style,
Sensual Pose on Calm Waters,
This enchanting silhouette scene features a romantic woman against a softly illuminated background.
soft ambient lighting, beautiful korean woman kneeling on a reflective lake surface, water gently splashing around her, wet lace bodysuit clinging to her body, long wavy hair falling over her shoulders, confident and intense expression, gentle water droplets rising as she moves, soft blue and golden lighting creating dramatic reflections, sensual and elegant, water reflecting the sky and her delicate silhouette, subtle mist creating an aura of mystery.((looking away, face up, half close eyes:1.4)), sunshine on the face,
Wan2.1 이미지

Wan2.1 은 Video 만 잘 만들어 줄 뿐만 아니라 이렇게 고화질의 이미지 생성도 잘 한다.
Flux 가 고화질의 좋은 이미지를 만들어 주지만 , Wan2.1 도 역시 고품질의 이미지를 잘 만들어 준다.




댓글

이 블로그의 인기 게시물

Comfyui Wildcard 사용법 - Stable Diffusion , Flux 에서 쉽게 Random Prompt 로 이미지 만들기

 Comfyui Wildcard 사용법에 대하여 알아본다. Comfyui 로 Stable Diffusion 또는 Flux 로 이미지를 만들 때 Prompt 가 이미지를 결정하는데 매우 중요한 역할을 한다.  영어가 모국어가 아닌 이상 영어로 prompt 를 만드는 것이 참 어려운 일이다. 물론 처음에는 많은 다른 사람들이 사용한 prompt 들을 모방하여 수정하고 사용하는데 이런 일을 하나하나 해 보기가 시간이 많이 걸리고 어렵다.   그래서 Random 으로 prompt 가 만들어 져서 이미지가 생성되고 그 이미지 중에서 마음에 드는 이미지들을 골라 그 이미지의 Prompt들 만을 가지고 보완하고 개선하면 더 편리하고 좋지 않을까 생각이 든다.  그런 식의 Random Prompt 생성이 가능하게 해주는 것이 wildcard 사용이다. Joker는 card game에서 wildcard 이다. 1. Wildcard 의 의미      와일드 카드(Wildcard)란 카드 게임에서 유래되었다.  이런 카드 게임에서 모든 카드의 대용으로 쓸 수 있는 비장의 카드를 와일드 카드라고 한다. 포커나 훌라를 할 때 조커가 이런 역할을 하는데 ,  이 의미가 컴퓨터와 스포츠로 확장되어 사용되는 것이다. 컴퓨터 용어로 쓰일 때는 한 디렉터리 내에 여러 파일이 존재하거나, 파일 이름의 뒷부분을 정확히 알지 못하는 경우에도 사용할 수 있는 명령어를 말합니다. '*'을 넣으면 빠진 것에 어떤 문자열이 있든지 대신할 수 있고,  '?'는 임의의 한 문자에만  대응한다. Comfyui 에서 wildcard 사용은 "--문자열--"  이런 식으로 wildcard 사용 가능한 노드에 prompt 를 입력해 주면 그 노드는 "문자열" 에  해당되는 파일을 찾아 그 파일 내용 중에서 임의의 일부분을 prompt 로 대체해 준다. 2. Wildcard 사...

Flux Lora 제작 - Local 에서 Fluxgym 을 이용하여 자체 Lora 만들기

 Flux Lora 는 일관된 이미지를 만드는데 꼭 필요하다. 특히 일관된 얼굴의 이미지를 만드는데 있어서 다른 기능들 (ipadapter , controlnet, imgtoimg 등) 을 이용하는 것 보다 훨씬 일정한 캐릭터를 생성하게 해준다.  문제는 이런 Lora는 주로 CIVITAI , Tensor, Hugging face 등 사이트에서 다운 받아 사용하면 되지만  그것은 나만의 독특한 캐릭터가 아니고 나의 취향과 일치 되기가 어려워서 Lora를 구하기가 어렵다.  아니면 그런 사이트 내에서 자체 Lora를 제작하면 되는데 모두 비용이 필요하다. 여기 소개하는 Fluxgym AI 는 Local 컴퓨터에서 VRAM 12G 이상이면 자체 Lora를 만들 수 있게 해준다.   소요되는 시간도 생각보다 많이 걸리지 않는다.   이제 설치하고 자체 Lora를 한번 만들어 보자. Fluxgym 으로 만든 Lora 대표이미지 1. fluxgym 설치 pinokio 앱을 실행한다. ( pinokio 앱 설치 참조 ) 우측 상단 맨 처음 아이콘 (discover) 클릭 fluxgym 을 찾아서 클릭 fluxgym 이것을 클릭하면 된다. 여러가지 파일들을 설치하기 때문에 시간이 좀 소요될 것이다. 모든 설치가 끝나면 pinokio 브라우저 하단 부분에 fluxgym 메뉴가 추가된다. fluxgym 나중에 불필요하면 삭제(쓰레기통 아이콘 클릭) 하면 모두 unintall 된다. 2. fluxgym 실행 항상 pinokio 앱을 실행하여 pinokio 브라우저에서 fluxgym 을 클릭하면 된다. flux화면3-1 -. 1번항 : 여기에 입력한 대로 fluxgym/outputs/ 의 하위 폴더를 만들어 준다. -. 2번항 : Lora를 작동시키는 trigger word 를 입력한다. (예,  hart_style_a......) -. 3번항 : 자신의 가능한 VRAM 선택 : 나는 12 G 선택 ...

Pinokio 앱 설치 - 오픈 소스 AI 플랫폼

  Pinokio 는 오픈 소스 AI 플랫폼이다. 로컬에서 AI 애플리케이션을 쉽게 설치하고 실행할 수 있게 도와주는 오픈 소스 AI 플랫폼이다. 이 플랫폼은 사용자가 복잡한 설치 과정 없이 클릭 한 번으로 AI 도구들을 설치할 수 있도록 설계되어 있다. 이를 통해 기술적인 배경 지식이 없는 초보자나 비전문가들도 쉽게 AI 애플리케이션을 사용할 수 있다.   이미 설치되어 있는 애플리케이션이 있어도 별도의 독립된 공간에서 문제없이 사용할 수 있게 해준다.   우리가 stable diffusion 을 comfyui 에서 사용하기 위해서는 "Python", "git ....", "conda"  뭔지 모르지만 설치해야 하는데 pinokio 브라우저에서 원 클릭으로 알아서 설치를 해주기 때문에  컴맹인 일반인도 쉽게 설치하고 사용 할 수 있다. pinokio.computer 1. Pinokio 주요 기능 원클릭 설치 : 복잡한 환경 설정이나 명령어 입력 없이도 다양한 AI 모델을 한 번의 클릭으로 설치할 수 있다. 예를 들어, Comfyui 나 Flux 같은 AI 도구들을 손쉽게 설치할 수 있다. 다양한 AI 애플리케이션 제공 : Pinokio는 다양한 오픈 소스 AI 애플리케이션을 제공하는 허브 역할을 하며, Pinokio 브라우저 나 홈페이지에서 쉽게 찾아 설치할 수 있다. 브라우저 기반 인터페이스 : 모든 설치된 애플리케이션은 Pinokio 웹 브라우저에서 관리할 수 있어, 친숙한 인터페이스로 쉽게 사용이 가능하다. 독립적인 가상 컴퓨터 : Pinokio는 백엔드 작업을 자동으로 처리하여, 애플리케이션이 로컬에서 실행되는 동안 인터넷에 연결되어 있지 않아도 된다. 2. Pinokio 설치 구글에서 pinokio 를 검색하여 " pinokio.computer " 를 클릭 Download 클릭 다운로드 된 pinokio 압축 파일을  푼다. pinokio 설치파일을 실행하여 설치 설치과정은 복...